Skip to content

Commit

Permalink
Merge pull request #164 from BarthPaleologue/OrbitRenderingTweak
Browse files Browse the repository at this point in the history
Tweak orbit and axis rendering
  • Loading branch information
BarthPaleologue authored Nov 3, 2024
2 parents b04b773 + a2057d5 commit 9331a18
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/ts/orbit/axisRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export class AxisRenderer {
updatable: false
},
{
color: Color3.White(),
color: new Color3(0.4, 0.4, 0.4),
width: 5,
colorMode: GreasedLineMeshColorMode.COLOR_MODE_SET,
sizeAttenuation: true
Expand Down
4 changes: 2 additions & 2 deletions src/ts/orbit/orbitRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export class OrbitRenderer {

private createOrbitMesh(orbitalObject: OrbitalObject, scene: Scene) {
const orbit = orbitalObject.model.orbit;
const nbSteps = 1000;
const nbSteps = Math.max(100, Math.round(Math.sqrt(orbit.radius / 200e3)));
const timestep = orbit.period / nbSteps;
const points: Vector3[] = [];

Expand All @@ -60,7 +60,7 @@ export class OrbitRenderer {
updatable: false
},
{
color: Color3.White(),
color: new Color3(0.4, 0.4, 0.4),
width: 5,
colorMode: GreasedLineMeshColorMode.COLOR_MODE_SET,
sizeAttenuation: true
Expand Down

0 comments on commit 9331a18

Please sign in to comment.