@babylonjs/node-editor 9.4.0 → 9.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -55,6 +55,28 @@ export class NodeEditor {
|
|
|
55
55
|
static Show(options: INodeEditorOptions): void;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
+
}
|
|
59
|
+
declare module "@babylonjs/node-editor/main" {
|
|
60
|
+
/**
|
|
61
|
+
* Vite dev server entry point for the Node Material Editor.
|
|
62
|
+
*
|
|
63
|
+
* Architecture mirrors the playground:
|
|
64
|
+
* - public/index.js loads babylon from babylonServer (port 1337) as UMD bundles,
|
|
65
|
+
* creates a NodeMaterial, and calls BABYLON.NodeEditor.Show(hostElement, …).
|
|
66
|
+
* - The Vite middleware shim at /babylon.nodeEditor.js captures those args and
|
|
67
|
+
* fires a "babylonNodeEditorReady" CustomEvent.
|
|
68
|
+
* - This module listens for that event and THEN dynamically imports the editor.
|
|
69
|
+
*
|
|
70
|
+
* The dynamic import is critical: all `import { X } from "@babylonjs/core/…"` in the editor
|
|
71
|
+
* source are rewritten by babylonDevExternalsPlugin to `const { X } = window.BABYLON ?? {}`.
|
|
72
|
+
* Those bindings must be evaluated AFTER window.BABYLON is populated by the CDN
|
|
73
|
+
* loader, otherwise they capture undefined. Dynamic import defers the module graph
|
|
74
|
+
* evaluation until after the event fires (i.e. after BABYLON is ready).
|
|
75
|
+
*/
|
|
76
|
+
type ShowArgs = Parameters<(typeof import("@babylonjs/node-editor/nodeEditor"))["NodeEditor"]["Show"]>;
|
|
77
|
+
function StartEditor(args: ShowArgs): Promise<void>;
|
|
78
|
+
const Win: Record<string, unknown>;
|
|
79
|
+
|
|
58
80
|
}
|
|
59
81
|
declare module "@babylonjs/node-editor/index" {
|
|
60
82
|
export * from "@babylonjs/node-editor/nodeEditor";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@babylonjs/node-editor",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.5.0",
|
|
4
4
|
"main": "dist/babylon.nodeEditor.js",
|
|
5
5
|
"module": "dist/babylon.nodeEditor.js",
|
|
6
6
|
"esnext": "dist/babylon.nodeEditor.js",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"@types/react-dom": ">=16.0.9"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@babylonjs/core": "9.
|
|
26
|
+
"@babylonjs/core": "9.5.0",
|
|
27
27
|
"@tools/node-editor": "1.0.0",
|
|
28
28
|
"react": "^18.2.0",
|
|
29
29
|
"react-dom": "^18.2.0"
|