-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- separate TelluricPlanetModel from TelluricSatelliteModel - better names for physical properties => physics info - simplify CanHaveRings interface
- Loading branch information
1 parent
2b7ec5c
commit 1236e2f
Showing
48 changed files
with
408 additions
and
327 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,10 @@ | ||
// This file is part of Cosmos Journeyer | ||
// | ||
// Copyright (C) 2024 Barthélemy Paléologue <barth.paleologue@cosmosjourneyer.com> | ||
// | ||
// This program is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU Affero General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
// | ||
// This program is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU Affero General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU Affero General Public License | ||
// along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
|
||
import { CelestialBody, CelestialBodyModel } from "./celestialBody"; | ||
import { PlanetPhysicalProperties } from "./physicalProperties"; | ||
import { Transformable } from "./transformable"; | ||
import { PlanetaryMassObject, PlanetaryMassObjectModel } from "./planetaryMassObject"; | ||
import { OrbitalObjectType } from "./orbitalObject"; | ||
|
||
export interface Planet extends CelestialBody { | ||
model: PlanetModel; | ||
|
||
updateMaterial(stellarObjects: Transformable[], deltaSeconds: number): void; | ||
export interface Planet extends PlanetaryMassObject { | ||
readonly model: PlanetModel; | ||
} | ||
|
||
export type PlanetModel = CelestialBodyModel & { | ||
readonly type: OrbitalObjectType.TELLURIC_PLANET | OrbitalObjectType.GAS_PLANET | OrbitalObjectType.TELLURIC_SATELLITE; | ||
|
||
physics: PlanetPhysicalProperties; | ||
export type PlanetModel = PlanetaryMassObjectModel & { | ||
readonly type: OrbitalObjectType.TELLURIC_PLANET | OrbitalObjectType.GAS_PLANET; | ||
}; | ||
|
||
export function hasAtmosphere(planetModel: PlanetModel): boolean { | ||
return planetModel.physics.pressure > 0.05; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// This file is part of Cosmos Journeyer | ||
// | ||
// Copyright (C) 2024 Barthélemy Paléologue <barth.paleologue@cosmosjourneyer.com> | ||
// | ||
// This program is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU Affero General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
// | ||
// This program is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU Affero General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU Affero General Public License | ||
// along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
|
||
import { CelestialBody, CelestialBodyModel } from "./celestialBody"; | ||
import { PlanetaryMassObjectPhysicsInfo } from "./physicsInfo"; | ||
import { Transformable } from "./transformable"; | ||
|
||
export interface PlanetaryMassObject extends CelestialBody { | ||
readonly model: PlanetaryMassObjectModel; | ||
|
||
updateMaterial(stellarObjects: Transformable[], deltaSeconds: number): void; | ||
} | ||
|
||
export type PlanetaryMassObjectModel = CelestialBodyModel & { | ||
readonly physics: PlanetaryMassObjectPhysicsInfo; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.