diff --git a/examples/js/loaders/ColladaLoader.js b/examples/js/loaders/ColladaLoader.js index a2ae5824933e133dd1cbcede85580d53a128f8ec..4d53d342ba6bcc8cb882770bccc6423db67155ed 100644 --- a/examples/js/loaders/ColladaLoader.js +++ b/examples/js/loaders/ColladaLoader.js @@ -1258,7 +1258,6 @@ THREE.ColladaLoader = function () { var intensity = lparams.intensity; var distance = lparams.distance; var angle = lparams.falloff_angle; - var exponent; // Intentionally undefined, don't know what this is yet switch ( lparams.technique ) { @@ -1275,7 +1274,7 @@ THREE.ColladaLoader = function () { case 'spot': - light = new THREE.SpotLight( color, intensity, distance, angle, exponent ); + light = new THREE.SpotLight( color, intensity, distance, angle ); light.position.set(0, 0, 1); break; diff --git a/examples/js/loaders/deprecated/SceneLoader.js b/examples/js/loaders/deprecated/SceneLoader.js index 48cc780a6452806ef2a8477e3df706383fce1983..0fe42b5394ee4d9fbc871a89c7783e1dd15d07c6 100644 --- a/examples/js/loaders/deprecated/SceneLoader.js +++ b/examples/js/loaders/deprecated/SceneLoader.js @@ -345,7 +345,7 @@ THREE.SceneLoader.prototype = { break; case 'SpotLight': - light = new THREE.SpotLight( color, intensity, distance, 1 ); + light = new THREE.SpotLight( color, intensity, distance ); light.angle = objJSON.angle; light.position.fromArray( position ); light.target.set( position[ 0 ], position[ 1 ] - distance, position[ 2 ] ); diff --git a/examples/webgl_loader_ctm.html b/examples/webgl_loader_ctm.html index 6047297740650a51b1a40e7f30b2bf15db8c56ab..449e251fb0f28260429890651d70dfb1ba817550 100644 --- a/examples/webgl_loader_ctm.html +++ b/examples/webgl_loader_ctm.html @@ -99,17 +99,18 @@ // LIGHTS - var ambient = new THREE.AmbientLight( 0x080808 ); - //scene.add( ambient ); + var ambient = new THREE.AmbientLight( 0x040404 ); + scene.add( ambient ); - var light = new THREE.SpotLight( 0xffeedd, 1.2, 650, Math.PI/2, 3 ); + var light = new THREE.SpotLight( 0xffeedd, 1.2, 650, Math.PI / 6 ); light.position.set( 0, -100, 500 ); light.castShadow = true; - light.shadowMapWidth = 2048; - light.shadowMapHeight = 2048; - light.shadowCameraFov = 45; - //light.shadowCameraVisible = true; + light.shadow.mapWidth = 1024; + light.shadow.mapHeight = 1024; + light.shadow.camera.fov = 45; + light.shadow.camera.far = 650; + // scene.add( new THREE.CameraHelper( light.shadow.camera ) ); scene.add( light ); diff --git a/examples/webgl_loader_gltf.html b/examples/webgl_loader_gltf.html index a9d31c152fe2aa74071568eaa1421fd8d78546b9..70f3f3389a0359cf75e0272bc3d8ef0a2221f9da 100644 --- a/examples/webgl_loader_gltf.html +++ b/examples/webgl_loader_gltf.html @@ -165,20 +165,23 @@ directionalLight.position.set( 0, -1, 1 ).normalize(); scene.add( directionalLight ); - spot1 = new THREE.SpotLight( 0xffffff, 1 ); + spot1 = new THREE.SpotLight( 0xffffff, 1, 0, Math.PI / 4, 0.75 ); spot1.position.set( -100, 200, 100 ); spot1.target.position.set( 0, 0, 0 ); if (sceneInfo.shadows) { - spot1.shadowCameraNear = 1; - spot1.shadowCameraFar = 1024; - spot1.castShadow = true; - spot1.shadowBias = 0.0001; - spot1.shadowMapWidth = 2048; - spot1.shadowMapHeight = 2048; + spot1.shadowCameraNear = 1; + spot1.shadowCameraFar = 1024; + spot1.castShadow = true; + spot1.shadowBias = 0.0001; + spot1.shadowMapWidth = 2048; + spot1.shadowMapHeight = 2048; + } + scene.add( spot1 ); + } // RENDERER diff --git a/examples/webgl_materials_cubemap_dynamic.html b/examples/webgl_materials_cubemap_dynamic.html index ba38b8965d63ca4ce63fd62511ff1ddba2b1ed03..2de840a6fdb38b9f6e6f0784c9cbfdc59e51b893 100644 --- a/examples/webgl_materials_cubemap_dynamic.html +++ b/examples/webgl_materials_cubemap_dynamic.html @@ -164,7 +164,7 @@ ambientLight = new THREE.AmbientLight( 0x555555 ); scene.add( ambientLight ); - spotLight = new THREE.SpotLight( 0xffffff, 1, 0, Math.PI/2, 1 ); + spotLight = new THREE.SpotLight( 0xffffff, 1, 0, Math.PI/2 ); spotLight.position.set( 0, 1800, 1500 ); spotLight.target.position.set( 0, 0, 0 ); spotLight.castShadow = true; diff --git a/examples/webgl_shading_physical.html b/examples/webgl_shading_physical.html index 108d8f7f8c7dcc5a902d78a2de8e8bdb450bf053..e8286d34a31926786de5a51475bc5bb6031056da 100644 --- a/examples/webgl_shading_physical.html +++ b/examples/webgl_shading_physical.html @@ -267,7 +267,7 @@ pointLight.position.set( 0, 0, 0 ); scene.add( pointLight ); - sunLight = new THREE.SpotLight( 0xffffff, sunIntensity, 0, Math.PI/2, 1 ); + sunLight = new THREE.SpotLight( 0xffffff, sunIntensity, 0, Math.PI/2 ); sunLight.position.set( 1000, 2000, 1000 ); sunLight.castShadow = true; diff --git a/examples/webgl_shadowmap.html b/examples/webgl_shadowmap.html index 72cbba361988e4b54ea10ed601991608af90e30c..d7b4c1d540bdce4b542795135cdabe71519542dc 100644 --- a/examples/webgl_shadowmap.html +++ b/examples/webgl_shadowmap.html @@ -105,7 +105,7 @@ var ambient = new THREE.AmbientLight( 0x444444 ); scene.add( ambient ); - light = new THREE.SpotLight( 0xffffff, 1, 0, Math.PI / 2, 1 ); + light = new THREE.SpotLight( 0xffffff, 1, 0, Math.PI / 2 ); light.position.set( 0, 1500, 1000 ); light.target.position.set( 0, 0, 0 ); diff --git a/examples/webgl_shadowmap_performance.html b/examples/webgl_shadowmap_performance.html index 7007c90d43af484a316e905dff4054065ec2638b..e4d49adf00c47b2efb9d8cd8dd22b693fdc3b1b7 100644 --- a/examples/webgl_shadowmap_performance.html +++ b/examples/webgl_shadowmap_performance.html @@ -100,7 +100,7 @@ var ambient = new THREE.AmbientLight( 0x444444 ); scene.add( ambient ); - light = new THREE.SpotLight( 0xffffff, 1, 0, Math.PI/2, 1 ); + light = new THREE.SpotLight( 0xffffff, 1, 0, Math.PI/2 ); light.position.set( 0, 1500, 1000 ); light.target.position.set( 0, 0, 0 ); diff --git a/examples/webgl_shadowmap_viewer.html b/examples/webgl_shadowmap_viewer.html index 6721503c13f81339cb02c4a9abdc13e35e0fd478..97d4950cf9dc8e63a8c03d9e3ede2bcf4cb55e46 100644 --- a/examples/webgl_shadowmap_viewer.html +++ b/examples/webgl_shadowmap_viewer.html @@ -72,6 +72,8 @@ spotLight = new THREE.SpotLight( 0xffffff ); spotLight.name = 'Spot Light'; + spotLight.angle = Math.PI / 5; + spotLight.penumbra = 0.3; spotLight.position.set( 10, 10, 5 ); spotLight.castShadow = true; spotLight.shadowCameraNear = 8;