Parcourir la source

DEVTOOLS access to AnimationMixer + Loaders (#32616)

Marcel Wiessler il y a 2 mois
Parent
commit
90d2cdd024
2 fichiers modifiés avec 12 ajouts et 0 suppressions
  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;
 		this.timeScale = 1.0;
 
 
+		if ( typeof __THREE_DEVTOOLS__ !== 'undefined' ) {
+
+			__THREE_DEVTOOLS__.dispatchEvent( new CustomEvent( 'observe', { detail: this } ) );
+
+		}
+
 	}
 	}
 
 
 	_bindAction( action, prototypeAction ) {
 	_bindAction( action, prototypeAction ) {

+ 6 - 0
src/loaders/Loader.js

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

粤ICP备19079148号