Browse Source

Updated examples.

Mr.doob 7 months ago
parent
commit
ced25ced08

+ 1 - 1
examples/jsm/environments/RoomEnvironment.js

@@ -44,7 +44,7 @@ class RoomEnvironment extends Scene {
 		const roomMaterial = new MeshStandardMaterial( { side: BackSide } );
 		const boxMaterial = new MeshStandardMaterial();
 
-		const mainLight = new PointLight( 0xffffff, 900, 0, 2 );
+		const mainLight = new PointLight( 0xffffff, 900, 0, 0 );
 		mainLight.position.set( 0.418, 16.199, 0.300 );
 		this.add( mainLight );
 

+ 1 - 1
examples/webgl_helpers.html

@@ -51,7 +51,7 @@
 
 				scene = new THREE.Scene();
 
-				light = new THREE.PointLight();
+				light = new THREE.PointLight( 0xffffff, 1, 0, 0 );
 				light.position.set( 200, 100, 150 );
 				scene.add( light );
 

+ 2 - 2
examples/webgl_materials_subsurface_scattering.html

@@ -58,14 +58,14 @@
 			scene.add( directionalLight );
 
 			const pointLight1 = new THREE.Mesh( new THREE.SphereGeometry( 4, 8, 8 ), new THREE.MeshBasicMaterial( { color: 0xc1c1c1 } ) );
-			pointLight1.add( new THREE.PointLight( 0xc1c1c1, 4.0 ) );
+			pointLight1.add( new THREE.PointLight( 0xc1c1c1, 4.0, 0, 0 ) );
 			scene.add( pointLight1 );
 			pointLight1.position.x = 0;
 			pointLight1.position.y = - 50;
 			pointLight1.position.z = 350;
 
 			const pointLight2 = new THREE.Mesh( new THREE.SphereGeometry( 4, 8, 8 ), new THREE.MeshBasicMaterial( { color: 0xc1c100 } ) );
-			pointLight2.add( new THREE.PointLight( 0xc1c100, 0.75 ) );
+			pointLight2.add( new THREE.PointLight( 0xc1c100, 0.75, 0, 0 ) );
 			scene.add( pointLight2 );
 			pointLight2.position.x = - 100;
 			pointLight2.position.y = 20;

+ 4 - 4
examples/webgl_portal.html

@@ -147,19 +147,19 @@
 				scene.add( planeLeft );
 
 				// lights
-				const mainLight = new THREE.PointLight( 0xe7e7e7, 2.5 );
+				const mainLight = new THREE.PointLight( 0xe7e7e7, 2.5, 0, 0 );
 				mainLight.position.y = 60;
 				scene.add( mainLight );
 
-				const greenLight = new THREE.PointLight( 0x00ff00, 0.5 );
+				const greenLight = new THREE.PointLight( 0x00ff00, 0.5, 0, 0 );
 				greenLight.position.set( 550, 50, 0 );
 				scene.add( greenLight );
 
-				const redLight = new THREE.PointLight( 0xff0000, 0.5 );
+				const redLight = new THREE.PointLight( 0xff0000, 0.5, 0, 0 );
 				redLight.position.set( - 550, 50, 0 );
 				scene.add( redLight );
 
-				const blueLight = new THREE.PointLight( 0xbbbbfe, 0.5 );
+				const blueLight = new THREE.PointLight( 0xbbbbfe, 0.5, 0, 0 );
 				blueLight.position.set( 0, 50, 550 );
 				scene.add( blueLight );
 

+ 1 - 1
examples/webgl_shadowmap_pointlight.html

@@ -45,7 +45,7 @@
 
 				function createLight( color ) {
 
-					const intensity = 4;
+					const intensity = 200;
 
 					const light = new THREE.PointLight( color, intensity );
 					light.castShadow = true;

+ 1 - 1
examples/webgpu_lights_custom.html

@@ -72,7 +72,7 @@
 
 					const mesh = new THREE.Mesh( sphereGeometry, material );
 
-					const light = new THREE.PointLight( hexColor, 0.1 );
+					const light = new THREE.PointLight( hexColor, 0.1, 0, 0 );
 					light.add( mesh );
 
 					scene.add( light );

+ 1 - 2
examples/webgpu_lights_projector.html

@@ -108,8 +108,7 @@
 				projectorLight.position.set( 2.5, 5, 2.5 );
 				projectorLight.angle = Math.PI / 6;
 				projectorLight.penumbra = 1;
-				projectorLight.decay = 2;
-				projectorLight.distance = 0;
+				projectorLight.decay = 0;
 
 				projectorLight.castShadow = true;
 				projectorLight.shadow.mapSize.width = 1024;

+ 2 - 2
examples/webgpu_materials_sss.html

@@ -69,14 +69,14 @@
 				scene.add( directionalLight );
 
 				const pointLight1 = new THREE.Mesh( new THREE.SphereGeometry( 4, 8, 8 ), new THREE.MeshBasicMaterial( { color: 0xc1c1c1 } ) );
-				pointLight1.add( new THREE.PointLight( 0xc1c1c1, 4.0 ) );
+				pointLight1.add( new THREE.PointLight( 0xc1c1c1, 4.0, 0, 0 ) );
 				scene.add( pointLight1 );
 				pointLight1.position.x = 0;
 				pointLight1.position.y = - 50;
 				pointLight1.position.z = 350;
 
 				const pointLight2 = new THREE.Mesh( new THREE.SphereGeometry( 4, 8, 8 ), new THREE.MeshBasicMaterial( { color: 0xc1c100 } ) );
-				pointLight2.add( new THREE.PointLight( 0xc1c100, 0.75 ) );
+				pointLight2.add( new THREE.PointLight( 0xc1c100, 0.75, 0, 0 ) );
 				scene.add( pointLight2 );
 				pointLight2.position.x = - 100;
 				pointLight2.position.y = 20;

+ 1 - 1
examples/webgpu_shadowmap_pointlight.html

@@ -45,7 +45,7 @@
 
 				function createLight( color ) {
 
-					const intensity = 4;
+					const intensity = 200;
 
 					const light = new THREE.PointLight( color, intensity );
 					light.castShadow = true;

粤ICP备19079148号