Browse Source

Examples: Use ObjectLoader in webgl_materials_lightmap.html

Mugen87 6 years ago
parent
commit
e5e4c9226e
2 changed files with 3 additions and 132 deletions
  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