From d254c531a171926a3cce6796de421c4c67c17dc4 Mon Sep 17 00:00:00 2001 From: CrazyH <87752773+CrazyH2@users.noreply.github.com> Date: Thu, 21 Mar 2024 11:07:14 +0000 Subject: [PATCH] updtae it --- src/screens/screenManager.js | 2 +- src/world/render.js | 2 ++ src/world/scene.js | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/screens/screenManager.js b/src/screens/screenManager.js index 5a5a401..9c18dad 100644 --- a/src/screens/screenManager.js +++ b/src/screens/screenManager.js @@ -8,7 +8,7 @@ class ScreenManager { }; renderScreen(screenGroup) { - this.root.scene.scene.background = new THREE.Color(0x000000); + this.root.scene.background = new THREE.Color(0x000000); screenGroup.render(screenGroup.renderGroup); diff --git a/src/world/render.js b/src/world/render.js index 5127ed4..9d9429a 100644 --- a/src/world/render.js +++ b/src/world/render.js @@ -9,6 +9,8 @@ class Render { constructor(top) { this.top = top; + this.scene = new THREE.Scene(); + this.ScreenManager = new ScreenManager(this); this.render(); diff --git a/src/world/scene.js b/src/world/scene.js index f9d380b..139d8ac 100644 --- a/src/world/scene.js +++ b/src/world/scene.js @@ -8,7 +8,7 @@ class Scene { constructor(top) { this.top = top; - this.scene = new THREE.Scene(); + this.scene = this.top.scene; this.main(); };