Bladeren bron

Added 3mf examples to list.

Mr.doob 9 jaren geleden
bovenliggende
commit
6680a9c717
2 gewijzigde bestanden met toevoegingen van 4 en 3 verwijderingen
  1. 1 0
      examples/index.html
  2. 3 3
      examples/webgl_loader_3mf.html

+ 1 - 0
examples/index.html

@@ -250,6 +250,7 @@
 				"webgl_lines_dashed",
 				"webgl_lines_sphere",
 				"webgl_lines_splines",
+				"webgl_loader_3mf",
 				"webgl_loader_amf",
 				"webgl_loader_assimp2json",
 				"webgl_loader_awd",

+ 3 - 3
examples/webgl_loader_3mf.html

@@ -66,7 +66,7 @@
 				scene.add( new THREE.AmbientLight( 0x999999 ) );
 
 				var pointLight = new THREE.PointLight( 0xffffff, 0.6 );
-				pointLight.position.set( 80, 90, -150 );
+				pointLight.position.set( 80, 90, 150 );
 				scene.add( pointLight );
 
 				camera = new THREE.PerspectiveCamera( 35, window.innerWidth / window.innerHeight, 1, 500 );
@@ -86,9 +86,9 @@
 				document.body.appendChild( renderer.domElement );
 
 				var loader = new THREE.ThreeMFLoader();
-				loader.load( './models/3mf/cube_gears.3mf', function ( object3mf ) {
+				loader.load( './models/3mf/cube_gears.3mf', function ( object ) {
 
-					scene.add( object3mf );
+					scene.add( object );
 					render();
 
 				} );