Browse Source

Updated examples.

Mr.doob 5 tháng trước cách đây
mục cha
commit
d1d52994ab

+ 1 - 1
examples/webgl_lensflares.html

@@ -103,7 +103,7 @@
 
 				function addLight( h, s, l, x, y, z ) {
 
-					const light = new THREE.PointLight( 0xffffff, 1.5 );
+					const light = new THREE.PointLight( 0xffffff, 1.5, 0, 0 );
 					light.color.setHSL( h, s, l );
 					light.position.set( x, y, z );
 					scene.add( light );

+ 1 - 1
examples/webgl_materials_toon.html

@@ -147,7 +147,7 @@
 
 				scene.add( new THREE.AmbientLight( 0xc1c1c1, 3 ) );
 
-				const pointLight = new THREE.PointLight( 0xffffff, 2 );
+				const pointLight = new THREE.PointLight( 0xffffff, 2, 0, 0 );
 				particleLight.add( pointLight );
 
 				//

+ 4 - 4
examples/webgl_mirror.html

@@ -162,19 +162,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 );
 

+ 4 - 4
examples/webgl_refraction.html

@@ -117,19 +117,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 );
 

+ 2 - 2
examples/webgl_shadowmap_pointlight.html

@@ -45,7 +45,7 @@
 
 				function createLight( color ) {
 
-					const intensity = 200;
+					const intensity = 4;
 
 					const light = new THREE.PointLight( color, intensity );
 					light.castShadow = true;
@@ -55,7 +55,7 @@
 
 					let geometry = new THREE.SphereGeometry( 0.3, 12, 6 );
 					let material = new THREE.MeshBasicMaterial( { color: color } );
-					material.color.multiplyScalar( intensity );
+					material.color.multiplyScalar( 50 );
 					let sphere = new THREE.Mesh( geometry, material );
 					light.add( sphere );
 

+ 1 - 1
examples/webgpu_lensflares.html

@@ -115,7 +115,7 @@
 
 				function addLight( h, s, l, x, y, z ) {
 
-					const light = new THREE.PointLight( 0xffffff, 1.5 );
+					const light = new THREE.PointLight( 0xffffff, 1.5, 0, 0 );
 					light.color.setHSL( h, s, l );
 					light.position.set( x, y, z );
 					scene.add( light );

+ 1 - 1
examples/webgpu_materials_toon.html

@@ -168,7 +168,7 @@
 
 				scene.add( new THREE.AmbientLight( 0xc1c1c1, 3 ) );
 
-				const pointLight = new THREE.PointLight( 0xffffff, 2 );
+				const pointLight = new THREE.PointLight( 0xffffff, 2, 0, 0 );
 				particleLight.add( pointLight );
 
 				//

+ 4 - 4
examples/webgpu_mirror.html

@@ -162,19 +162,19 @@
 
 				// 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 );
 

+ 4 - 4
examples/webgpu_refraction.html

@@ -119,19 +119,19 @@
 
 				// 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 );
 

+ 2 - 2
examples/webgpu_shadowmap_pointlight.html

@@ -45,7 +45,7 @@
 
 				function createLight( color ) {
 
-					const intensity = 200;
+					const intensity = 4;
 
 					const light = new THREE.PointLight( color, intensity );
 					light.castShadow = true;
@@ -55,7 +55,7 @@
 
 					let geometry = new THREE.SphereGeometry( 0.3, 12, 6 );
 					let material = new THREE.MeshBasicMaterial( { color: color } );
-					material.color.multiplyScalar( intensity );
+					material.color.multiplyScalar( 50 );
 					let sphere = new THREE.Mesh( geometry, material );
 					light.add( sphere );
 

粤ICP备19079148号