Преглед на файлове

Fixed overwriting the scene instead of adding to it in VRML loader example. This preserves the lighting and the controls, so that the Box can be spinned and is lit.

Bart McLeod преди 11 години
родител
ревизия
f3dd45f67d
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      examples/webgl_loader_vrml.html

+ 1 - 1
examples/webgl_loader_vrml.html

@@ -88,7 +88,7 @@
 				var loader = new THREE.VRMLLoader();
 				loader.addEventListener( 'load', function ( event ) {
 
-					scene = event.content;
+					scene.add(event.content);
 
 				} );
 				loader.load( "models/vrml/simple.wrl" );