src/core/World.js
/**
	* Inits all basic objects of the scene like the scene graph itself, the camera, lights
	* or the renderer.
	*
	* @return {World} A reference to this world object.
	*/
Inits all basic objects of the scene like the scene graph itself, the camera, lights
or the renderer.

@return {World} A reference to this world object.
Inits all basic objects of the scene like the scene graph itself the camera lights or the renderer . @return { World } A reference to this world object .
_initScene() {
		this.scene = new Scene();
		this.scene.background = new Color( 0xffffff );
		this.camera = new PerspectiveCamera( 40, window.innerWidth / window.innerHeight, 0.1, 1000 );
		this.camera.position.set( 0, 75, 100 );
		this.camera.add( this.assetManager.listener );
		if ( this.debug ) {
			this.helpers.axesHelper = new AxesHelper( 5 );
			this.helpers.axesHelper.visible = false;
			this.scene.add( this.helpers.axesHelper );
		}
		const hemiLight = new HemisphereLight( 0xffffff, 0x444444, 0.4 );
		hemiLight.position.set( 0, 100, 0 );
		this.scene.add( hemiLight );
		const dirLight = new DirectionalLight( 0xffffff, 0.8 );
		dirLight.position.set( - 700, 1000, - 750 );
		this.scene.add( dirLight );
		const sky = new Sky();
		sky.scale.setScalar( 1000 );
		sky.material.uniforms.turbidity.value = 5;
		sky.material.uniforms.rayleigh.value = 1.5;
		sky.material.uniforms.sunPosition.value.set( - 700, 1000, - 750 );
		this.scene.add( sky );
		this.renderer = new WebGLRenderer( { antialias: true } );
		this.renderer.setSize( window.innerWidth, window.innerHeight );
		this.renderer.autoClear = false;
		this.renderer.shadowMap.enabled = true;
		this.renderer.outputEncoding = sRGBEncoding;
		document.body.appendChild( this.renderer.domElement );
		window.addEventListener( 'resize', this._onWindowResize, false );
		return this;
	}
_initScene ( ) { this . scene = new Scene ( ) ; this . scene . background = new Color ( 0xffffff ) ; this . camera = new PerspectiveCamera ( 40 , window . innerWidth / window . innerHeight , 0.1 , 1000 ) ; this . camera . position . set ( 0 , 75 , 100 ) ; this . camera . add ( this . assetManager . listener ) ; if ( this . debug ) { this . helpers . axesHelper = new AxesHelper ( 5 ) ; this . helpers . axesHelper . visible = false ; this . scene . add ( this . helpers . axesHelper ) ; } const hemiLight = new HemisphereLight ( 0xffffff , 0x444444 , 0.4 ) ; hemiLight . position . set ( 0 , 100 , 0 ) ; this . scene . add ( hemiLight ) ; const dirLight = new DirectionalLight ( 0xffffff , 0.8 ) ; dirLight . position . set ( - 700 , 1000 , - 750 ) ; this . scene . add ( dirLight ) ; const sky = new Sky ( ) ; sky . scale . setScalar ( 1000 ) ; sky . material . uniforms . turbidity . value = 5 ; sky . material . uniforms . rayleigh . value = 1.5 ; sky . material . uniforms . sunPosition . value . set ( - 700 , 1000 , - 750 ) ; this . scene . add ( sky ) ; this . renderer = new WebGLRenderer ( { antialias : true } ) ; this . renderer . setSize ( window . innerWidth , window . innerHeight ) ; this . renderer . autoClear = false ; this . renderer . shadowMap . enabled = true ; this . renderer . outputEncoding = sRGBEncoding ; document . body . appendChild ( this . renderer . domElement ) ; window . addEventListener ( 'resize' , this . _onWindowResize , false ) ; return this ; }
Inits all basic objects of the scene like the scene graph itself, the camera, lights
 or the renderer.
Inits all basic objects of the scene like the scene graph itself the camera lights or the renderer .
// scene // camera // helpers // lights // sky // renderer // event listeners