dev
This commit is contained in:
@@ -131,7 +131,8 @@ export default {
|
|||||||
window.addEventListener('resize', this.resize);
|
window.addEventListener('resize', this.resize);
|
||||||
},
|
},
|
||||||
unmounted(){
|
unmounted(){
|
||||||
window,removeEventListener('resize', this.resize);
|
window.removeEventListener('resize', this.resize);
|
||||||
|
gameEngine.stop();
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
async loadScenario(){
|
async loadScenario(){
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ export default {
|
|||||||
this.object.scenes = this.object.scenes || [];
|
this.object.scenes = this.object.scenes || [];
|
||||||
},
|
},
|
||||||
unmounted(){
|
unmounted(){
|
||||||
window,removeEventListener('resize', this.resize);
|
window.removeEventListener('resize', this.resize);
|
||||||
},
|
},
|
||||||
computed:{
|
computed:{
|
||||||
vb(){
|
vb(){
|
||||||
|
|||||||
@@ -35,10 +35,10 @@ class GameEngine {
|
|||||||
// let light = new THREE.AmbientLight( 0x404040, 300 ); // soft white light
|
// let light = new THREE.AmbientLight( 0x404040, 300 ); // soft white light
|
||||||
// scene.add( this.light );
|
// scene.add( this.light );
|
||||||
|
|
||||||
const dirLight = new THREE.DirectionalLight( 0xffffff, 1 );
|
const dirLight = new THREE.DirectionalLight( 0xffffff, 4 );
|
||||||
dirLight.color.setHSL( 0.1, 1, 0.95 );
|
dirLight.color.setHSL( 0.1, 1, 0.95 );
|
||||||
dirLight.position.set( - 1, 1.75, 1 );
|
dirLight.position.set( -12, 33, 37 );
|
||||||
dirLight.position.multiplyScalar( 20 );
|
//dirLight.position.multiplyScalar( 20 );
|
||||||
scene.add( dirLight );
|
scene.add( dirLight );
|
||||||
|
|
||||||
dirLight.castShadow = true;
|
dirLight.castShadow = true;
|
||||||
@@ -53,8 +53,8 @@ class GameEngine {
|
|||||||
dirLight.shadow.camera.top = d;
|
dirLight.shadow.camera.top = d;
|
||||||
dirLight.shadow.camera.bottom = - d;
|
dirLight.shadow.camera.bottom = - d;
|
||||||
|
|
||||||
dirLight.shadow.camera.far = 3500;
|
dirLight.shadow.camera.far = 1000;
|
||||||
dirLight.shadow.bias = - 0.0001;
|
dirLight.shadow.bias = - 0.001;
|
||||||
|
|
||||||
const renderer = new THREE.WebGLRenderer({
|
const renderer = new THREE.WebGLRenderer({
|
||||||
antialias: true,
|
antialias: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user