|
@@ -1572,7 +1572,7 @@ THREE.WebGLRenderer = function ( parameters ) {
|
|
|
var webglObject = objects.objectsImmediate[ i ];
|
|
|
var object = webglObject.object;
|
|
|
|
|
|
- if ( object.visible ) {
|
|
|
+ if ( object.visible === true ) {
|
|
|
|
|
|
setupMatrices( object, camera );
|
|
|
|
|
@@ -1645,59 +1645,61 @@ THREE.WebGLRenderer = function ( parameters ) {
|
|
|
|
|
|
function projectObject( object ) {
|
|
|
|
|
|
- if ( object.visible === false ) return;
|
|
|
+ if ( object.visible === true ) {
|
|
|
|
|
|
- if ( object instanceof THREE.Scene || object instanceof THREE.Group ) {
|
|
|
+ if ( object instanceof THREE.Scene || object instanceof THREE.Group ) {
|
|
|
|
|
|
- // skip
|
|
|
+ // skip
|
|
|
|
|
|
- } else {
|
|
|
+ } else {
|
|
|
|
|
|
- // update Skeleton objects
|
|
|
- if ( object instanceof THREE.SkinnedMesh ) {
|
|
|
+ // update Skeleton objects
|
|
|
+ if ( object instanceof THREE.SkinnedMesh ) {
|
|
|
|
|
|
- object.skeleton.update();
|
|
|
+ object.skeleton.update();
|
|
|
|
|
|
- }
|
|
|
+ }
|
|
|
|
|
|
- objects.init( object );
|
|
|
+ objects.init( object );
|
|
|
|
|
|
- if ( object instanceof THREE.Light ) {
|
|
|
+ if ( object instanceof THREE.Light ) {
|
|
|
|
|
|
- lights.push( object );
|
|
|
+ lights.push( object );
|
|
|
|
|
|
- } else if ( object instanceof THREE.Sprite ) {
|
|
|
+ } else if ( object instanceof THREE.Sprite ) {
|
|
|
|
|
|
- sprites.push( object );
|
|
|
+ sprites.push( object );
|
|
|
|
|
|
- } else if ( object instanceof THREE.LensFlare ) {
|
|
|
+ } else if ( object instanceof THREE.LensFlare ) {
|
|
|
|
|
|
- lensFlares.push( object );
|
|
|
+ lensFlares.push( object );
|
|
|
|
|
|
- } else {
|
|
|
+ } else {
|
|
|
|
|
|
- var webglObject = objects.objects[ object.id ];
|
|
|
+ var webglObject = objects.objects[ object.id ];
|
|
|
|
|
|
- if ( webglObject && ( object.frustumCulled === false || _frustum.intersectsObject( object ) === true ) ) {
|
|
|
+ if ( webglObject && ( object.frustumCulled === false || _frustum.intersectsObject( object ) === true ) ) {
|
|
|
|
|
|
- var material = object.material;
|
|
|
+ var material = object.material;
|
|
|
|
|
|
- if ( material.transparent ) {
|
|
|
+ if ( material.transparent ) {
|
|
|
|
|
|
- transparentObjects.push( webglObject );
|
|
|
+ transparentObjects.push( webglObject );
|
|
|
|
|
|
- } else {
|
|
|
+ } else {
|
|
|
|
|
|
- opaqueObjects.push( webglObject );
|
|
|
+ opaqueObjects.push( webglObject );
|
|
|
|
|
|
- }
|
|
|
+ }
|
|
|
|
|
|
- if ( _this.sortObjects === true ) {
|
|
|
+ if ( _this.sortObjects === true ) {
|
|
|
|
|
|
- _vector3.setFromMatrixPosition( object.matrixWorld );
|
|
|
- _vector3.applyProjection( _projScreenMatrix );
|
|
|
+ _vector3.setFromMatrixPosition( object.matrixWorld );
|
|
|
+ _vector3.applyProjection( _projScreenMatrix );
|
|
|
|
|
|
- webglObject.z = _vector3.z;
|
|
|
+ webglObject.z = _vector3.z;
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
|
|
@@ -1705,11 +1707,11 @@ THREE.WebGLRenderer = function ( parameters ) {
|
|
|
|
|
|
}
|
|
|
|
|
|
- }
|
|
|
+ for ( var i = 0, l = object.children.length; i < l; i ++ ) {
|
|
|
|
|
|
- for ( var i = 0, l = object.children.length; i < l; i ++ ) {
|
|
|
+ projectObject( object.children[ i ] );
|
|
|
|
|
|
- projectObject( object.children[ i ] );
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
|
|
@@ -1757,7 +1759,7 @@ THREE.WebGLRenderer = function ( parameters ) {
|
|
|
var webglObject = renderList[ i ];
|
|
|
var object = webglObject.object;
|
|
|
|
|
|
- if ( object.visible ) {
|
|
|
+ if ( object.visible === true ) {
|
|
|
|
|
|
if ( overrideMaterial ) {
|
|
|
|