瀏覽代碼

Examples: Make RectAreaLightUniformsLib module conform.

Mugen87 6 年之前
父節點
當前提交
d821e65b0d

+ 1 - 1
docs/api/en/lights/RectAreaLight.html

@@ -20,7 +20,7 @@
 			<ul>
 			<ul>
 				<li>There is no shadow support.</li>
 				<li>There is no shadow support.</li>
 				<li>Only [page:MeshStandardMaterial MeshStandardMaterial] and [page:MeshPhysicalMaterial MeshPhysicalMaterial] are supported.</li>
 				<li>Only [page:MeshStandardMaterial MeshStandardMaterial] and [page:MeshPhysicalMaterial MeshPhysicalMaterial] are supported.</li>
-				<li>You have to include [link:https://threejs.org/examples/js/lights/RectAreaLightUniformsLib.js RectAreaLightUniformsLib] into your scene.</li>
+				<li>You have to include [link:https://threejs.org/examples/js/lights/RectAreaLightUniformsLib.js RectAreaLightUniformsLib] into your scene and call *init()*.</li>
 			</ul>
 			</ul>
 		</p>
 		</p>
 
 

文件差異過大導致無法顯示
+ 2 - 2
examples/js/lights/RectAreaLightUniformsLib.js


+ 2 - 0
examples/webgl_lights_rectarealight.html

@@ -76,6 +76,8 @@
 				var ambient = new THREE.AmbientLight( 0xffffff, 0.1 );
 				var ambient = new THREE.AmbientLight( 0xffffff, 0.1 );
 				scene.add( ambient );
 				scene.add( ambient );
 
 
+				THREE.RectAreaLightUniformsLib.init();
+
 				rectLight = new THREE.RectAreaLight( 0xffffff, 1, 10, 10 );
 				rectLight = new THREE.RectAreaLight( 0xffffff, 1, 10, 10 );
 				rectLight.position.set( 5, 5, 0 );
 				rectLight.position.set( 5, 5, 0 );
 				scene.add( rectLight );
 				scene.add( rectLight );

+ 2 - 0
examples/webgl_materials_envmaps_parallax.html

@@ -422,6 +422,8 @@
 				var height = 50;
 				var height = 50;
 				var intensity = 10;
 				var intensity = 10;
 
 
+				THREE.RectAreaLightUniformsLib.init();
+
 				var blueRectLight = new THREE.RectAreaLight( 0xf3aaaa, intensity, width, height );
 				var blueRectLight = new THREE.RectAreaLight( 0xf3aaaa, intensity, width, height );
 				blueRectLight.position.set( 99, 5, 0 );
 				blueRectLight.position.set( 99, 5, 0 );
 				blueRectLight.lookAt( 0, 5, 0 );
 				blueRectLight.lookAt( 0, 5, 0 );

部分文件因文件數量過多而無法顯示