xonecas.ioDon't click! Sean Caetano Martin Sign in

space-browser / commits / b631278

fix: remove orbit lines

xonecas5 weeks agob6312780e78ff86c25b247caa34359c6ca0a4ab0parent f137b9b1 file changed

client/src/view.ts+0-17
@@ -208,22 +208,6 @@ function shipyardMesh(r: number): THREE.Group {
208208 return g;
209209 }
210210
211-// A faint dot ring: the planet's path, dim enough to read as background.
212-function orbitPath(radius: number): THREE.Group {
213- const g = new THREE.Group();
214- const n = Math.round(radius * 1.1);
215- const geo = new THREE.PlaneGeometry(CELL_WORLD, CELL_WORLD);
216- const mat = new THREE.MeshBasicMaterial({ color: lum(0.5, 3) });
217- for (let i = 0; i < n; i++) {
218- const a = (i / n) * Math.PI * 2;
219- const m = new THREE.Mesh(geo, mat);
220- m.position.set(Math.cos(a) * radius, Math.sin(a) * radius, 0);
221- g.add(m);
222- }
223- g.position.z = -2;
224- return g;
225-}
226-
227211 export class View {
228212 private renderer: THREE.WebGLRenderer;
229213 private scene = new THREE.Scene();
@@ -277,7 +261,6 @@ export class View {
277261 const mesh = planet.kind === 'shipyard' ? shipyardMesh(planet.r) : barrenMesh(planet.r);
278262 mesh.position.z = -1;
279263 this.scene.add(mesh);
280- this.scene.add(orbitPath(planet.orbit));
281264 this.planets.push({ planet, mesh });
282265 }
283266 }