Browse Source

Protect Object3D against the closure circular reference bug

Tristan VALCKE 8 years ago
parent
commit
8761dd924b
1 changed files with 2 additions and 3 deletions
  1. 2 3
      src/core/Object3D.js

+ 2 - 3
src/core/Object3D.js

@@ -101,7 +101,7 @@ function Object3D() {
 Object3D.DefaultUp = new Vector3( 0, 1, 0 );
 Object3D.DefaultMatrixAutoUpdate = true;
 
-Object3D.prototype = {
+Object.assign( Object3D.prototype, EventDispatcher.prototype, {
 
 	constructor: Object3D,
 
@@ -730,8 +730,7 @@ Object3D.prototype = {
 
 	}
 
-};
+} );
 
-Object.assign( Object3D.prototype, EventDispatcher.prototype );
 
 export { Object3D };