From 7a8450fab37bfaf4a4ff66ac0c453ad77d1bbdfd Mon Sep 17 00:00:00 2001 From: Aki Date: Wed, 7 Apr 2021 01:28:28 +0200 Subject: Moved grid helper to skirmishgrid --- derelict.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/derelict.js b/derelict.js index 6e8ba5b..d8c967d 100644 --- a/derelict.js +++ b/derelict.js @@ -7,6 +7,7 @@ const SCALE = 10000 class SkirmishGrid { scene = new THREE.Scene() + helper = new THREE.GridHelper(50, 50) camera controls renderer @@ -26,6 +27,8 @@ class SkirmishGrid { this.controls.maxDistance = 30 this.controls.enableDamping = true this.controls.dampingFactor = 0.4 + + this.add(this.helper) } add(obj) { @@ -172,9 +175,6 @@ function init() { icon.then(icon => processKillmails(grid, killmails, icon)) }) - const helper = new THREE.GridHelper(50, 50) - grid.add(helper) - const loader = new THREE.TextureLoader() loader.loadAsync("https://i.imgur.com/rDGOLFC.jpg") // TODO: Don't use imgur as CDN. .then(skybox => { -- cgit v1.1