瀏覽代碼

Examples: Use ObjectLoader in webgl_materials_lightmap.html

Mugen87 6 年之前
父節點
當前提交
e5e4c9226e
共有 2 個文件被更改,包括 3 次插入132 次删除
  1. 0 120
      examples/models/json/lightmap/lightmap.json
  2. 3 12
      examples/webgl_materials_lightmap.html

File diff suppressed because it is too large
+ 0 - 120
examples/models/json/lightmap/lightmap.json


+ 3 - 12
examples/webgl_materials_lightmap.html

@@ -140,19 +140,10 @@
 
 				// MODEL
 
-				var loader = new THREE.JSONLoader();
-				loader.load( "models/json/lightmap/lightmap.json", function ( geometry, materials ) {
+				var loader = new THREE.ObjectLoader();
+				loader.load( "models/json/lightmap/lightmap.json", function ( object ) {
 
-					for ( var i = 0; i < materials.length; i ++ ) {
-
-						materials[ i ].lightMapIntensity = 0.75;
-
-					}
-
-					var mesh = new THREE.Mesh( geometry, materials );
-
-					mesh.scale.multiplyScalar( 100 );
-					scene.add( mesh );
+					scene.add( object );
 
 				} );
 

Some files were not shown because too many files changed in this diff