浏览代码

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 12 年之前
父节点
当前提交
34ae7d6a43
共有 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();
 				var loader = new THREE.VRMLLoader();
 				loader.addEventListener( 'load', function ( event ) {
 				loader.addEventListener( 'load', function ( event ) {
 
 
-					scene = event.content;
+					scene.add(event.content);
 
 
 				} );
 				} );
 				loader.load( "models/vrml/simple.wrl" );
 				loader.load( "models/vrml/simple.wrl" );

粤ICP备19079148号