This commit is contained in:
2025-12-06 09:32:43 +02:00
parent 321dd8e31e
commit e5de8f75f8
+6 -5
View File
@@ -28,7 +28,7 @@ class GameEngine extends THREE.EventDispatcher{
this.opts = opts;
const gameEngine = this;
this.perspectiveCamera = new THREE.PerspectiveCamera(45, this.aspect, 0.1, 100);
this.perspectiveCamera = new THREE.PerspectiveCamera(45, this.aspect, 0.01, 99);
this.raycaster = new THREE.Raycaster();
this.perspectiveCamera.position.set(0, 0, 10);
@@ -40,15 +40,16 @@ class GameEngine extends THREE.EventDispatcher{
this.frustumSize * this.aspect / 2,
this.frustumSize / 2,
this.frustumSize / - 2,
0.01, 1000);
0.01, 1000
);
this.orthographicCamera.position.set(0, 0, 100);
const scene = new THREE.Scene();
this.scene = scene;
this.initCameraPivot()
// let light = new THREE.AmbientLight( 0x404040, 300 ); // soft white light
// scene.add( this.light );
// let light = new THREE.AmbientLight( 0x404040, 24 ); // soft white light
// scene.add( light );
var hemiLight = new THREE.HemisphereLight( 0xffffff, 0x444444 );
hemiLight.position.set(0, 33, 0);
@@ -422,7 +423,7 @@ class GameEngine extends THREE.EventDispatcher{
object.material.map.colorSpace = THREE.SRGBColorSpace;
}
}
//object.frustumCulled = false;
object.frustumCulled = false;
object.castShadow = true;
object.receiveShadow = true;
});