We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3e8ca1e commit a72120aCopy full SHA for a72120a
examples/jsm/inspector/RendererInspector.js
@@ -1,5 +1,5 @@
1
2
-import { InspectorBase, TimestampQuery } from 'three/webgpu';
+import { InspectorBase, TimestampQuery, warnOnce } from 'three/webgpu';
3
4
class ObjectStats {
5
@@ -330,7 +330,17 @@ export class RendererInspector extends InspectorBase {
330
331
inspect( node ) {
332
333
- this.currentNodes.push( node );
+ const currentNodes = this.currentNodes;
334
+
335
+ if ( currentNodes !== null ) {
336
337
+ currentNodes.push( node );
338
339
+ } else {
340
341
+ warnOnce( 'RendererInspector: Unable to inspect node outside of frame scope. Use "renderer.setAnimationLoop()".' );
342
343
+ }
344
345
}
346
0 commit comments