From 49526dab747692f8f0ed4f59ceb359d40f46830d Mon Sep 17 00:00:00 2001 From: sunag Date: Sun, 14 Jun 2026 21:30:49 -0300 Subject: [PATCH] Inspector: Inline extensions configuration and remove `extensions.json` (#33812) --- examples/jsm/inspector/extensions/extensions.json | 6 ------ examples/jsm/inspector/tabs/Settings.js | 15 ++++++++------- 2 files changed, 8 insertions(+), 13 deletions(-) delete mode 100644 examples/jsm/inspector/extensions/extensions.json diff --git a/examples/jsm/inspector/extensions/extensions.json b/examples/jsm/inspector/extensions/extensions.json deleted file mode 100644 index 796793bb871e7f..00000000000000 --- a/examples/jsm/inspector/extensions/extensions.json +++ /dev/null @@ -1,6 +0,0 @@ -[ - { - "name": "TSL Graph", - "url": "./tsl-graph/TSLGraphEditor.js" - } -] diff --git a/examples/jsm/inspector/tabs/Settings.js b/examples/jsm/inspector/tabs/Settings.js index 579bce46d946df..0b5b420d4b523d 100644 --- a/examples/jsm/inspector/tabs/Settings.js +++ b/examples/jsm/inspector/tabs/Settings.js @@ -2,7 +2,12 @@ import { Parameters } from './Parameters.js'; import { WebGPURenderer, WebGLBackend, Node } from 'three/webgpu'; import { getItem, setItem } from '../Inspector.js'; -const _EXTENSIONS_PATH = '../extensions/extensions.json'; +const _extensions = [ + { + name: 'TSL Graph', + url: '../extensions/tsl-graph/TSLGraphEditor.js' + } +]; const _init = WebGPURenderer.prototype.init; @@ -261,7 +266,7 @@ Shares the same state across any page within the current origin.` ); extension.active = true; - const extUrl = new URL( extension.url, new URL( _EXTENSIONS_PATH, import.meta.url ) ).href; + const extUrl = new URL( extension.url, import.meta.url ).href; const module = await import( extUrl ); @@ -282,11 +287,7 @@ Shares the same state across any page within the current origin.` ); async _getExtensions() { - const url = new URL( _EXTENSIONS_PATH, import.meta.url ); - - const extensions = await fetch( url ).then( res => res.json() ); - - return extensions; + return _extensions; }