This commit is contained in:
@@ -28,7 +28,7 @@ class GameEngine extends THREE.EventDispatcher{
|
|||||||
this.opts = opts;
|
this.opts = opts;
|
||||||
const gameEngine = this;
|
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.raycaster = new THREE.Raycaster();
|
||||||
this.perspectiveCamera.position.set(0, 0, 10);
|
this.perspectiveCamera.position.set(0, 0, 10);
|
||||||
|
|
||||||
@@ -40,15 +40,16 @@ class GameEngine extends THREE.EventDispatcher{
|
|||||||
this.frustumSize * this.aspect / 2,
|
this.frustumSize * this.aspect / 2,
|
||||||
this.frustumSize / 2,
|
this.frustumSize / 2,
|
||||||
this.frustumSize / - 2,
|
this.frustumSize / - 2,
|
||||||
0.01, 1000);
|
0.01, 1000
|
||||||
|
);
|
||||||
this.orthographicCamera.position.set(0, 0, 100);
|
this.orthographicCamera.position.set(0, 0, 100);
|
||||||
const scene = new THREE.Scene();
|
const scene = new THREE.Scene();
|
||||||
this.scene = scene;
|
this.scene = scene;
|
||||||
|
|
||||||
this.initCameraPivot()
|
this.initCameraPivot()
|
||||||
|
|
||||||
// let light = new THREE.AmbientLight( 0x404040, 300 ); // soft white light
|
// let light = new THREE.AmbientLight( 0x404040, 24 ); // soft white light
|
||||||
// scene.add( this.light );
|
// scene.add( light );
|
||||||
|
|
||||||
var hemiLight = new THREE.HemisphereLight( 0xffffff, 0x444444 );
|
var hemiLight = new THREE.HemisphereLight( 0xffffff, 0x444444 );
|
||||||
hemiLight.position.set(0, 33, 0);
|
hemiLight.position.set(0, 33, 0);
|
||||||
@@ -422,7 +423,7 @@ class GameEngine extends THREE.EventDispatcher{
|
|||||||
object.material.map.colorSpace = THREE.SRGBColorSpace;
|
object.material.map.colorSpace = THREE.SRGBColorSpace;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//object.frustumCulled = false;
|
object.frustumCulled = false;
|
||||||
object.castShadow = true;
|
object.castShadow = true;
|
||||||
object.receiveShadow = true;
|
object.receiveShadow = true;
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user