ソースを参照

Enabled devtools events.

Mr.doob 6 年 前
コミット
cdf7a2883c
2 ファイル変更4 行追加8 行削除
  1. 2 4
      src/renderers/WebGLRenderer.js
  2. 2 4
      src/scenes/Scene.js

+ 2 - 4
src/renderers/WebGLRenderer.js

@@ -2587,11 +2587,9 @@ function WebGLRenderer( parameters ) {
 
 	};
 
-	/*
-	if ( typeof __THREE_DEVTOOLS__ !== undefined ) {
-		__THREE_DEVTOOLS__.dispatchEvent( { type: 'renderer', value: this } );
+	if ( typeof __THREE_DEVTOOLS__ !== 'undefined' ) {
+		__THREE_DEVTOOLS__.dispatchEvent( new CustomEvent( 'observe', { detail: this } ) );
 	}
-	*/
 
 }
 

+ 2 - 4
src/scenes/Scene.js

@@ -16,11 +16,9 @@ function Scene() {
 
 	this.autoUpdate = true; // checked by the renderer
 
-	/*
-	if ( typeof __THREE_DEVTOOLS__ !== undefined ) {
-		__THREE_DEVTOOLS__.dispatchEvent( { type: 'scene', value: this } );
+	if ( typeof __THREE_DEVTOOLS__ !== 'undefined' ) {
+		__THREE_DEVTOOLS__.dispatchEvent( new CustomEvent( 'observe', { detail: this } ) );
 	}
-	*/
 
 }