浏览代码

Protect Object3D against the closure circular reference bug

Tristan VALCKE 9 年之前
父节点
当前提交
8761dd924b
共有 1 个文件被更改,包括 2 次插入3 次删除
  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 };