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

DEVTOOLS access to AnimationMixer + Loaders (#32616)

Marcel Wiessler 2 месяцев назад
Родитель
Сommit
90d2cdd024
2 измененных файлов с 12 добавлено и 0 удалено
  1. 6 0
      src/animation/AnimationMixer.js
  2. 6 0
      src/loaders/Loader.js

+ 6 - 0
src/animation/AnimationMixer.js

@@ -48,6 +48,12 @@ class AnimationMixer extends EventDispatcher {
 		 */
 		this.timeScale = 1.0;
 
+		if ( typeof __THREE_DEVTOOLS__ !== 'undefined' ) {
+
+			__THREE_DEVTOOLS__.dispatchEvent( new CustomEvent( 'observe', { detail: this } ) );
+
+		}
+
 	}
 
 	_bindAction( action, prototypeAction ) {

+ 6 - 0
src/loaders/Loader.js

@@ -61,6 +61,12 @@ class Loader {
 		 */
 		this.requestHeader = {};
 
+		if ( typeof __THREE_DEVTOOLS__ !== 'undefined' ) {
+
+			__THREE_DEVTOOLS__.dispatchEvent( new CustomEvent( 'observe', { detail: this } ) );
+
+		}
+
 	}
 
 	/**

粤ICP备19079148号