提交 78833572 编写于 作者: M Mr.doob

Fixed GUI.

上级 bdf2502e
......@@ -138,9 +138,9 @@ var Code = function () {
_list.length = 0;
for ( var i = 0, l = scene.objects.length; i < l; i ++ ) {
for ( var i = 0, l = scene.children.length; i < l; i ++ ) {
var object = scene.objects[ i ];
var object = scene.children[ i ];
if ( object.geometry == undefined || object.geometry.gui == undefined ) {
......@@ -168,7 +168,7 @@ var Code = function () {
if ( object.scale.y != 1 ) string += '\n\tmesh.scale.y = ' + object.scale.y + ';';
if ( object.scale.z != 1 ) string += '\n\tmesh.scale.z = ' + object.scale.z + ';';
string += '\n\tscene.addObject( mesh );'; // string += '\n\tscene.add( mesh );';
string += '\n\tscene.add( mesh );';
_list.push( string );
......
......@@ -70,7 +70,7 @@ UI.Viewport = function () {
_projector.unprojectVector( vector, _camera );
var ray = new THREE.Ray( _camera.position, vector.subSelf( _camera.position ).normalize() );
var intersects = ray.intersectScene( _scene );
var intersects = ray.intersectObjects( _scene.children );
if ( intersects.length ) {
......@@ -92,7 +92,7 @@ UI.Viewport = function () {
_projector.unprojectVector( vector, _camera );
var ray = new THREE.Ray( _camera.position, vector.subSelf( _camera.position ).normalize() );
var intersects = ray.intersectScene( _scene );
var intersects = ray.intersectObjects( _scene.children );
if ( _SELECTED ) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册