Skip to content

Commit

Permalink
Object3D: Clean up.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdoob committed Aug 23, 2022
1 parent 7ca0bb6 commit 757dadf
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/core/Object3D.js
Original file line number Diff line number Diff line change
Expand Up @@ -586,9 +586,11 @@ class Object3D extends EventDispatcher {

for ( let i = 0, l = children.length; i < l; i ++ ) {

if ( children[ i ].matrixWorldAutoUpdate === true || force === true ) {
const child = children[ i ];

children[ i ].updateMatrixWorld( force );
if ( child.matrixWorldAutoUpdate === true || force === true ) {

child.updateMatrixWorld( force );

}

Expand Down Expand Up @@ -626,9 +628,11 @@ class Object3D extends EventDispatcher {

for ( let i = 0, l = children.length; i < l; i ++ ) {

if ( children[ i ].matrixWorldAutoUpdate === true ) {
const child = children[ i ];

if ( child.matrixWorldAutoUpdate === true ) {

children[ i ].updateWorldMatrix( false, true );
child.updateWorldMatrix( false, true );

}

Expand Down

0 comments on commit 757dadf

Please sign in to comment.