Просмотр исходного кода

Protect Object3D against the closure circular reference bug

Tristan VALCKE 9 лет назад
Родитель
Сommit
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 };

粤ICP备19079148号