Skip to content

Commit 90d2cdd

Browse files
authored
DEVTOOLS access to AnimationMixer + Loaders (mrdoob#32616)
1 parent 35f8853 commit 90d2cdd

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/animation/AnimationMixer.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ class AnimationMixer extends EventDispatcher {
4848
*/
4949
this.timeScale = 1.0;
5050

51+
if ( typeof __THREE_DEVTOOLS__ !== 'undefined' ) {
52+
53+
__THREE_DEVTOOLS__.dispatchEvent( new CustomEvent( 'observe', { detail: this } ) );
54+
55+
}
56+
5157
}
5258

5359
_bindAction( action, prototypeAction ) {

src/loaders/Loader.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,12 @@ class Loader {
6161
*/
6262
this.requestHeader = {};
6363

64+
if ( typeof __THREE_DEVTOOLS__ !== 'undefined' ) {
65+
66+
__THREE_DEVTOOLS__.dispatchEvent( new CustomEvent( 'observe', { detail: this } ) );
67+
68+
}
69+
6470
}
6571

6672
/**

0 commit comments

Comments
 (0)