@fps-games/editor 0.1.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.
- package/dist/authoring-apply.d.ts +21 -0
- package/dist/authoring-apply.d.ts.map +1 -0
- package/dist/authoring-apply.js +45 -0
- package/dist/authoring-apply.js.map +1 -0
- package/dist/index.d.ts +85 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +539 -0
- package/dist/index.js.map +1 -0
- package/dist/local-editor-harness.d.ts +173 -0
- package/dist/local-editor-harness.d.ts.map +1 -0
- package/dist/local-editor-harness.js +969 -0
- package/dist/local-editor-harness.js.map +1 -0
- package/node_modules/@fps-games/editor-babylon/dist/camera-controller.d.ts +20 -0
- package/node_modules/@fps-games/editor-babylon/dist/camera-controller.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-babylon/dist/camera-controller.js +239 -0
- package/node_modules/@fps-games/editor-babylon/dist/camera-controller.js.map +1 -0
- package/node_modules/@fps-games/editor-babylon/dist/edit-session.d.ts +30 -0
- package/node_modules/@fps-games/editor-babylon/dist/edit-session.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-babylon/dist/edit-session.js +297 -0
- package/node_modules/@fps-games/editor-babylon/dist/edit-session.js.map +1 -0
- package/node_modules/@fps-games/editor-babylon/dist/editor-world.d.ts +30 -0
- package/node_modules/@fps-games/editor-babylon/dist/editor-world.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-babylon/dist/editor-world.js +67 -0
- package/node_modules/@fps-games/editor-babylon/dist/editor-world.js.map +1 -0
- package/node_modules/@fps-games/editor-babylon/dist/event-guard.d.ts +13 -0
- package/node_modules/@fps-games/editor-babylon/dist/event-guard.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-babylon/dist/event-guard.js +101 -0
- package/node_modules/@fps-games/editor-babylon/dist/event-guard.js.map +1 -0
- package/node_modules/@fps-games/editor-babylon/dist/index.d.ts +19 -0
- package/node_modules/@fps-games/editor-babylon/dist/index.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-babylon/dist/index.js +18 -0
- package/node_modules/@fps-games/editor-babylon/dist/index.js.map +1 -0
- package/node_modules/@fps-games/editor-babylon/dist/input-controller.d.ts +3 -0
- package/node_modules/@fps-games/editor-babylon/dist/input-controller.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-babylon/dist/input-controller.js +182 -0
- package/node_modules/@fps-games/editor-babylon/dist/input-controller.js.map +1 -0
- package/node_modules/@fps-games/editor-babylon/dist/inspector-adapter.d.ts +13 -0
- package/node_modules/@fps-games/editor-babylon/dist/inspector-adapter.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-babylon/dist/inspector-adapter.js +94 -0
- package/node_modules/@fps-games/editor-babylon/dist/inspector-adapter.js.map +1 -0
- package/node_modules/@fps-games/editor-babylon/dist/inspector-host.d.ts +43 -0
- package/node_modules/@fps-games/editor-babylon/dist/inspector-host.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-babylon/dist/inspector-host.js +510 -0
- package/node_modules/@fps-games/editor-babylon/dist/inspector-host.js.map +1 -0
- package/node_modules/@fps-games/editor-babylon/dist/legacy-runtime.d.ts +5 -0
- package/node_modules/@fps-games/editor-babylon/dist/legacy-runtime.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-babylon/dist/legacy-runtime.js +5 -0
- package/node_modules/@fps-games/editor-babylon/dist/legacy-runtime.js.map +1 -0
- package/node_modules/@fps-games/editor-babylon/dist/material-property-adapter.d.ts +22 -0
- package/node_modules/@fps-games/editor-babylon/dist/material-property-adapter.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-babylon/dist/material-property-adapter.js +408 -0
- package/node_modules/@fps-games/editor-babylon/dist/material-property-adapter.js.map +1 -0
- package/node_modules/@fps-games/editor-babylon/dist/monitor.d.ts +39 -0
- package/node_modules/@fps-games/editor-babylon/dist/monitor.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-babylon/dist/monitor.js +780 -0
- package/node_modules/@fps-games/editor-babylon/dist/monitor.js.map +1 -0
- package/node_modules/@fps-games/editor-babylon/dist/outline-adapter.d.ts +37 -0
- package/node_modules/@fps-games/editor-babylon/dist/outline-adapter.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-babylon/dist/outline-adapter.js +268 -0
- package/node_modules/@fps-games/editor-babylon/dist/outline-adapter.js.map +1 -0
- package/node_modules/@fps-games/editor-babylon/dist/projection-selection-controller.d.ts +34 -0
- package/node_modules/@fps-games/editor-babylon/dist/projection-selection-controller.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-babylon/dist/projection-selection-controller.js +221 -0
- package/node_modules/@fps-games/editor-babylon/dist/projection-selection-controller.js.map +1 -0
- package/node_modules/@fps-games/editor-babylon/dist/projection.d.ts +90 -0
- package/node_modules/@fps-games/editor-babylon/dist/projection.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-babylon/dist/projection.js +479 -0
- package/node_modules/@fps-games/editor-babylon/dist/projection.js.map +1 -0
- package/node_modules/@fps-games/editor-babylon/dist/runtime-globals.d.ts +3 -0
- package/node_modules/@fps-games/editor-babylon/dist/runtime-globals.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-babylon/dist/runtime-globals.js +7 -0
- package/node_modules/@fps-games/editor-babylon/dist/runtime-globals.js.map +1 -0
- package/node_modules/@fps-games/editor-babylon/dist/scene-view-camera-controller.d.ts +18 -0
- package/node_modules/@fps-games/editor-babylon/dist/scene-view-camera-controller.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-babylon/dist/scene-view-camera-controller.js +213 -0
- package/node_modules/@fps-games/editor-babylon/dist/scene-view-camera-controller.js.map +1 -0
- package/node_modules/@fps-games/editor-babylon/dist/scene-view-input-controller.d.ts +36 -0
- package/node_modules/@fps-games/editor-babylon/dist/scene-view-input-controller.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-babylon/dist/scene-view-input-controller.js +272 -0
- package/node_modules/@fps-games/editor-babylon/dist/scene-view-input-controller.js.map +1 -0
- package/node_modules/@fps-games/editor-babylon/dist/selection-controller.d.ts +27 -0
- package/node_modules/@fps-games/editor-babylon/dist/selection-controller.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-babylon/dist/selection-controller.js +308 -0
- package/node_modules/@fps-games/editor-babylon/dist/selection-controller.js.map +1 -0
- package/node_modules/@fps-games/editor-babylon/dist/tool-controller.d.ts +17 -0
- package/node_modules/@fps-games/editor-babylon/dist/tool-controller.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-babylon/dist/tool-controller.js +83 -0
- package/node_modules/@fps-games/editor-babylon/dist/tool-controller.js.map +1 -0
- package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.d.ts +47 -0
- package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.js +689 -0
- package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.js.map +1 -0
- package/node_modules/@fps-games/editor-babylon/dist/types.d.ts +111 -0
- package/node_modules/@fps-games/editor-babylon/dist/types.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-babylon/dist/types.js +2 -0
- package/node_modules/@fps-games/editor-babylon/dist/types.js.map +1 -0
- package/node_modules/@fps-games/editor-babylon/package.json +25 -0
- package/node_modules/@fps-games/editor-browser/dist/index.d.ts +28 -0
- package/node_modules/@fps-games/editor-browser/dist/index.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/index.js +54 -0
- package/node_modules/@fps-games/editor-browser/dist/index.js.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-input-router.d.ts +12 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-input-router.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-input-router.js +80 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-input-router.js.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panel-registry.d.ts +11 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panel-registry.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panel-registry.js +33 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panel-registry.js.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.d.ts +9 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.js +444 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.js.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-primitives.d.ts +21 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-primitives.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-primitives.js +103 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-primitives.js.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-shared.d.ts +12 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-shared.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-shared.js +123 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-shared.js.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-shortcuts.d.ts +2 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-shortcuts.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-shortcuts.js +115 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-shortcuts.js.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-theme.d.ts +3 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-theme.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-theme.js +68 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-theme.js.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.d.ts +183 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.js +2 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.js.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-workbench.d.ts +58 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-workbench.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-workbench.js +136 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-workbench.js.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.d.ts +4 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.js +589 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.js.map +1 -0
- package/node_modules/@fps-games/editor-browser/package.json +16 -0
- package/node_modules/@fps-games/editor-core/dist/authoring-source.d.ts +211 -0
- package/node_modules/@fps-games/editor-core/dist/authoring-source.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/authoring-source.js +511 -0
- package/node_modules/@fps-games/editor-core/dist/authoring-source.js.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-session.d.ts +132 -0
- package/node_modules/@fps-games/editor-core/dist/editor-session.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-session.js +265 -0
- package/node_modules/@fps-games/editor-core/dist/editor-session.js.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/host-services.d.ts +24 -0
- package/node_modules/@fps-games/editor-core/dist/host-services.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/host-services.js +2 -0
- package/node_modules/@fps-games/editor-core/dist/host-services.js.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/index.d.ts +106 -0
- package/node_modules/@fps-games/editor-core/dist/index.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/index.js +217 -0
- package/node_modules/@fps-games/editor-core/dist/index.js.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/scene-graph.d.ts +44 -0
- package/node_modules/@fps-games/editor-core/dist/scene-graph.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/scene-graph.js +86 -0
- package/node_modules/@fps-games/editor-core/dist/scene-graph.js.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/scene-view-input.d.ts +41 -0
- package/node_modules/@fps-games/editor-core/dist/scene-view-input.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/scene-view-input.js +2 -0
- package/node_modules/@fps-games/editor-core/dist/scene-view-input.js.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/serialized-object.d.ts +53 -0
- package/node_modules/@fps-games/editor-core/dist/serialized-object.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/serialized-object.js +32 -0
- package/node_modules/@fps-games/editor-core/dist/serialized-object.js.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/transform-gizmo.d.ts +48 -0
- package/node_modules/@fps-games/editor-core/dist/transform-gizmo.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/transform-gizmo.js +2 -0
- package/node_modules/@fps-games/editor-core/dist/transform-gizmo.js.map +1 -0
- package/node_modules/@fps-games/editor-core/package.json +19 -0
- package/node_modules/@fps-games/editor-forge-play/dist/index.d.ts +46 -0
- package/node_modules/@fps-games/editor-forge-play/dist/index.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-forge-play/dist/index.js +156 -0
- package/node_modules/@fps-games/editor-forge-play/dist/index.js.map +1 -0
- package/node_modules/@fps-games/editor-forge-play/package.json +19 -0
- package/node_modules/@fps-games/editor-protocol/dist/index.d.ts +239 -0
- package/node_modules/@fps-games/editor-protocol/dist/index.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-protocol/dist/index.js +54 -0
- package/node_modules/@fps-games/editor-protocol/dist/index.js.map +1 -0
- package/node_modules/@fps-games/editor-protocol/package.json +16 -0
- package/package.json +40 -0
|
@@ -0,0 +1,510 @@
|
|
|
1
|
+
import { createBrowserHost } from '@fps-games/editor-browser';
|
|
2
|
+
import { getBabylonRuntime } from './runtime-globals';
|
|
3
|
+
import { getInspectorContainer, setInspectorPicking, syncInspectorToolState } from './inspector-adapter';
|
|
4
|
+
import { adaptMaterialPropertyChange } from './material-property-adapter';
|
|
5
|
+
import { applyOutlinePropertyChange, isOutlinePropertyKey } from './outline-adapter';
|
|
6
|
+
const INSPECTOR_V2_URL = 'https://preview.babylonjs.com/inspector/babylon.inspector-v2.bundle.js';
|
|
7
|
+
const INSPECTOR_HIGHLIGHT_SETTING_KEY = 'Babylon/Inspector/HighlightSelectedEntity';
|
|
8
|
+
function patchSelection(host) {
|
|
9
|
+
const SelectionCtor = host.window.Selection;
|
|
10
|
+
const RangeCtor = host.window.Range;
|
|
11
|
+
const NodeCtor = host.window.Node;
|
|
12
|
+
if (!SelectionCtor || !RangeCtor || !NodeCtor)
|
|
13
|
+
return;
|
|
14
|
+
const proto = SelectionCtor.prototype;
|
|
15
|
+
if (proto.__fpsEditorPatched)
|
|
16
|
+
return;
|
|
17
|
+
const original = proto.addRange;
|
|
18
|
+
proto.addRange = function patchedAddRange(range) {
|
|
19
|
+
original.call(this, range);
|
|
20
|
+
if (this.toString())
|
|
21
|
+
return;
|
|
22
|
+
let node = range.startContainer;
|
|
23
|
+
if (node.nodeType === NodeCtor.ELEMENT_NODE && range.startOffset < node.childNodes.length) {
|
|
24
|
+
node = node.childNodes[range.startOffset];
|
|
25
|
+
}
|
|
26
|
+
const element = (node.nodeType === NodeCtor.ELEMENT_NODE ? node : node.parentElement);
|
|
27
|
+
if (!element)
|
|
28
|
+
return;
|
|
29
|
+
element.style.setProperty('user-select', 'text', 'important');
|
|
30
|
+
original.call(this, range);
|
|
31
|
+
};
|
|
32
|
+
proto.__fpsEditorPatched = true;
|
|
33
|
+
}
|
|
34
|
+
function patchGizmoManagerPrototype(GizmoManager, marker) {
|
|
35
|
+
const proto = GizmoManager?.prototype;
|
|
36
|
+
if (!proto || proto[marker])
|
|
37
|
+
return;
|
|
38
|
+
const applyRotationOverride = (manager) => {
|
|
39
|
+
if (manager?.gizmos?.rotationGizmo)
|
|
40
|
+
manager.gizmos.rotationGizmo.updateGizmoRotationToMatchAttachedMesh = false;
|
|
41
|
+
};
|
|
42
|
+
const rotationDesc = Object.getOwnPropertyDescriptor(proto, 'rotationGizmoEnabled');
|
|
43
|
+
if (rotationDesc?.get && rotationDesc.set) {
|
|
44
|
+
const setRotationGizmoEnabled = rotationDesc.set;
|
|
45
|
+
Object.defineProperty(proto, 'rotationGizmoEnabled', {
|
|
46
|
+
configurable: true,
|
|
47
|
+
enumerable: rotationDesc.enumerable ?? false,
|
|
48
|
+
get: rotationDesc.get,
|
|
49
|
+
set(value) {
|
|
50
|
+
setRotationGizmoEnabled.call(this, value);
|
|
51
|
+
if (value)
|
|
52
|
+
applyRotationOverride(this);
|
|
53
|
+
},
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
const coordinatesDesc = Object.getOwnPropertyDescriptor(proto, 'coordinatesMode');
|
|
57
|
+
if (coordinatesDesc?.get && coordinatesDesc.set) {
|
|
58
|
+
const setCoordinatesMode = coordinatesDesc.set;
|
|
59
|
+
Object.defineProperty(proto, 'coordinatesMode', {
|
|
60
|
+
configurable: true,
|
|
61
|
+
enumerable: coordinatesDesc.enumerable ?? false,
|
|
62
|
+
get: coordinatesDesc.get,
|
|
63
|
+
set(value) {
|
|
64
|
+
setCoordinatesMode.call(this, value);
|
|
65
|
+
applyRotationOverride(this);
|
|
66
|
+
},
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
Object.defineProperty(proto, marker, {
|
|
70
|
+
value: true,
|
|
71
|
+
configurable: false,
|
|
72
|
+
enumerable: false,
|
|
73
|
+
writable: false,
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
function patchRotationGizmoPrototype(RotationGizmo, marker) {
|
|
77
|
+
const proto = RotationGizmo?.prototype;
|
|
78
|
+
if (!proto || proto[marker])
|
|
79
|
+
return;
|
|
80
|
+
const applyRotationOverride = (gizmo) => {
|
|
81
|
+
if (!gizmo)
|
|
82
|
+
return;
|
|
83
|
+
if (gizmo.xGizmo)
|
|
84
|
+
gizmo.xGizmo.updateGizmoRotationToMatchAttachedMesh = false;
|
|
85
|
+
if (gizmo.yGizmo)
|
|
86
|
+
gizmo.yGizmo.updateGizmoRotationToMatchAttachedMesh = false;
|
|
87
|
+
if (gizmo.zGizmo)
|
|
88
|
+
gizmo.zGizmo.updateGizmoRotationToMatchAttachedMesh = false;
|
|
89
|
+
};
|
|
90
|
+
const updateDesc = Object.getOwnPropertyDescriptor(proto, 'updateGizmoRotationToMatchAttachedMesh');
|
|
91
|
+
if (updateDesc?.get && updateDesc.set) {
|
|
92
|
+
const setUpdateGizmoRotation = updateDesc.set;
|
|
93
|
+
Object.defineProperty(proto, 'updateGizmoRotationToMatchAttachedMesh', {
|
|
94
|
+
configurable: true,
|
|
95
|
+
enumerable: updateDesc.enumerable ?? false,
|
|
96
|
+
get: updateDesc.get,
|
|
97
|
+
set(_value) {
|
|
98
|
+
setUpdateGizmoRotation.call(this, false);
|
|
99
|
+
applyRotationOverride(this);
|
|
100
|
+
},
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
const coordinatesDesc = Object.getOwnPropertyDescriptor(proto, 'coordinatesMode');
|
|
104
|
+
if (coordinatesDesc?.set) {
|
|
105
|
+
const setCoordinatesMode = coordinatesDesc.set;
|
|
106
|
+
Object.defineProperty(proto, 'coordinatesMode', {
|
|
107
|
+
configurable: true,
|
|
108
|
+
enumerable: coordinatesDesc.enumerable ?? false,
|
|
109
|
+
get: coordinatesDesc.get,
|
|
110
|
+
set(value) {
|
|
111
|
+
setCoordinatesMode.call(this, value);
|
|
112
|
+
applyRotationOverride(this);
|
|
113
|
+
},
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
Object.defineProperty(proto, marker, {
|
|
117
|
+
value: true,
|
|
118
|
+
configurable: false,
|
|
119
|
+
enumerable: false,
|
|
120
|
+
writable: false,
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
function patchPlaneRotationGizmoPrototype(PlaneRotationGizmo, marker) {
|
|
124
|
+
const proto = PlaneRotationGizmo?.prototype;
|
|
125
|
+
if (!proto || proto[marker])
|
|
126
|
+
return;
|
|
127
|
+
const forceDisabled = function forceDisabled() {
|
|
128
|
+
this._updateGizmoRotationToMatchAttachedMesh = false;
|
|
129
|
+
};
|
|
130
|
+
const baseProto = Object.getPrototypeOf(proto);
|
|
131
|
+
const updateDesc = baseProto ? Object.getOwnPropertyDescriptor(baseProto, 'updateGizmoRotationToMatchAttachedMesh') : null;
|
|
132
|
+
if (updateDesc?.get && updateDesc.set) {
|
|
133
|
+
const getUpdateGizmoRotation = updateDesc.get;
|
|
134
|
+
const setUpdateGizmoRotation = updateDesc.set;
|
|
135
|
+
Object.defineProperty(proto, 'updateGizmoRotationToMatchAttachedMesh', {
|
|
136
|
+
configurable: true,
|
|
137
|
+
enumerable: updateDesc.enumerable ?? false,
|
|
138
|
+
get() {
|
|
139
|
+
return getUpdateGizmoRotation.call(this);
|
|
140
|
+
},
|
|
141
|
+
set(_value) {
|
|
142
|
+
setUpdateGizmoRotation.call(this, false);
|
|
143
|
+
forceDisabled.call(this);
|
|
144
|
+
},
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
const coordinatesDesc = baseProto ? Object.getOwnPropertyDescriptor(baseProto, 'coordinatesMode') : null;
|
|
148
|
+
if (coordinatesDesc?.get && coordinatesDesc.set) {
|
|
149
|
+
const getCoordinatesMode = coordinatesDesc.get;
|
|
150
|
+
const setCoordinatesMode = coordinatesDesc.set;
|
|
151
|
+
Object.defineProperty(proto, 'coordinatesMode', {
|
|
152
|
+
configurable: true,
|
|
153
|
+
enumerable: coordinatesDesc.enumerable ?? false,
|
|
154
|
+
get() {
|
|
155
|
+
return getCoordinatesMode.call(this);
|
|
156
|
+
},
|
|
157
|
+
set(value) {
|
|
158
|
+
setCoordinatesMode.call(this, value);
|
|
159
|
+
forceDisabled.call(this);
|
|
160
|
+
},
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
Object.defineProperty(proto, marker, {
|
|
164
|
+
value: true,
|
|
165
|
+
configurable: false,
|
|
166
|
+
enumerable: false,
|
|
167
|
+
writable: false,
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
function patchBabylonGizmoClasses(source, markerPrefix) {
|
|
171
|
+
if (!source)
|
|
172
|
+
return;
|
|
173
|
+
patchGizmoManagerPrototype(source.GizmoManager, `${markerPrefix}Manager`);
|
|
174
|
+
patchRotationGizmoPrototype(source.RotationGizmo, `${markerPrefix}Rotation`);
|
|
175
|
+
patchPlaneRotationGizmoPrototype(source.PlaneRotationGizmo, `${markerPrefix}Plane`);
|
|
176
|
+
}
|
|
177
|
+
function patchInstancedMeshOutlineProperties(source, marker) {
|
|
178
|
+
const proto = source?.InstancedMesh?.prototype;
|
|
179
|
+
if (!proto || proto[marker])
|
|
180
|
+
return;
|
|
181
|
+
const defineForwardedProperty = (property) => {
|
|
182
|
+
Object.defineProperty(proto, property, {
|
|
183
|
+
configurable: true,
|
|
184
|
+
enumerable: true,
|
|
185
|
+
get() {
|
|
186
|
+
return this?.sourceMesh?.[property];
|
|
187
|
+
},
|
|
188
|
+
set(value) {
|
|
189
|
+
if (this?.sourceMesh) {
|
|
190
|
+
this.sourceMesh[property] = value;
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
193
|
+
Object.defineProperty(this, property, { value, writable: true, configurable: true, enumerable: true });
|
|
194
|
+
},
|
|
195
|
+
});
|
|
196
|
+
};
|
|
197
|
+
defineForwardedProperty('renderOutline');
|
|
198
|
+
defineForwardedProperty('outlineColor');
|
|
199
|
+
defineForwardedProperty('outlineWidth');
|
|
200
|
+
Object.defineProperty(proto, marker, {
|
|
201
|
+
value: true,
|
|
202
|
+
configurable: false,
|
|
203
|
+
enumerable: false,
|
|
204
|
+
writable: false,
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
function patchInspectorDefaults(host, babylon) {
|
|
208
|
+
try {
|
|
209
|
+
host.window.localStorage.setItem(INSPECTOR_HIGHLIGHT_SETTING_KEY, 'false');
|
|
210
|
+
}
|
|
211
|
+
catch { }
|
|
212
|
+
patchInstancedMeshOutlineProperties(getBabylonRuntime(babylon), '__fpsEditorInstancedOutlinePatched');
|
|
213
|
+
}
|
|
214
|
+
async function patchRotationGizmoDefaults(host, options) {
|
|
215
|
+
try {
|
|
216
|
+
patchInspectorDefaults(host, options.babylon);
|
|
217
|
+
patchBabylonGizmoClasses(getBabylonRuntime(options.babylon), '__fpsEditorRuntime');
|
|
218
|
+
const modules = await options.loadGizmoModules?.();
|
|
219
|
+
if (modules?.length) {
|
|
220
|
+
patchBabylonGizmoClasses(Object.assign({}, ...modules), '__fpsEditorModule');
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
catch { }
|
|
224
|
+
}
|
|
225
|
+
function injectInspectorStyle(host) {
|
|
226
|
+
if (host.document.getElementById('fps-editor-inspector-style'))
|
|
227
|
+
return;
|
|
228
|
+
const style = host.document.createElement('style');
|
|
229
|
+
style.id = 'fps-editor-inspector-style';
|
|
230
|
+
style.textContent = [
|
|
231
|
+
'#inspector-host, #babylon-inspector-container { z-index: 99999 !important; }',
|
|
232
|
+
'#inspector-host button.bridge-tool-inactive, #babylon-inspector-container button.bridge-tool-inactive {',
|
|
233
|
+
' background: transparent !important;',
|
|
234
|
+
' box-shadow: none !important;',
|
|
235
|
+
'}',
|
|
236
|
+
'#inspector-host button.bridge-tool-active, #babylon-inspector-container button.bridge-tool-active {',
|
|
237
|
+
' background: rgba(120, 120, 120, 0.22) !important;',
|
|
238
|
+
' box-shadow: inset 0 0 0 1px rgba(120, 120, 120, 0.55) !important;',
|
|
239
|
+
'}',
|
|
240
|
+
].join('\n');
|
|
241
|
+
host.document.head.appendChild(style);
|
|
242
|
+
}
|
|
243
|
+
function tuneOutlineLayer(scene) {
|
|
244
|
+
const engine = scene?.getEngine?.();
|
|
245
|
+
if (!engine?._virtualScenes)
|
|
246
|
+
return;
|
|
247
|
+
for (const virtualScene of engine._virtualScenes) {
|
|
248
|
+
for (const layer of virtualScene.effectLayers || []) {
|
|
249
|
+
if (layer.name !== 'InspectorSelectionOutline')
|
|
250
|
+
continue;
|
|
251
|
+
layer.clearSelection?.();
|
|
252
|
+
layer.outlineThickness = 0;
|
|
253
|
+
layer.occlusionStrength = 0;
|
|
254
|
+
layer.isEnabled = false;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
function serializeNode(node) {
|
|
259
|
+
if (!node)
|
|
260
|
+
return null;
|
|
261
|
+
const parent = node.parent ?? null;
|
|
262
|
+
return {
|
|
263
|
+
name: node.name ?? null,
|
|
264
|
+
id: node.id ?? null,
|
|
265
|
+
uniqueId: node.uniqueId ?? null,
|
|
266
|
+
type: node.getClassName?.() || node.constructor?.name || 'Unknown',
|
|
267
|
+
metadata: node.metadata ?? null,
|
|
268
|
+
parent: parent ? {
|
|
269
|
+
name: parent.name ?? null,
|
|
270
|
+
id: parent.uniqueId ?? parent.id ?? null,
|
|
271
|
+
type: parent.getClassName?.() || parent.constructor?.name || 'Unknown',
|
|
272
|
+
} : null,
|
|
273
|
+
transform: {
|
|
274
|
+
position: node.position ? { x: node.position.x, y: node.position.y, z: node.position.z } : null,
|
|
275
|
+
rotation: node.rotation ? { x: node.rotation.x, y: node.rotation.y, z: node.rotation.z } : null,
|
|
276
|
+
scaling: node.scaling ? { x: node.scaling.x, y: node.scaling.y, z: node.scaling.z } : null,
|
|
277
|
+
rotationQuaternion: node.rotationQuaternion
|
|
278
|
+
? { x: node.rotationQuaternion.x, y: node.rotationQuaternion.y, z: node.rotationQuaternion.z, w: node.rotationQuaternion.w }
|
|
279
|
+
: null,
|
|
280
|
+
},
|
|
281
|
+
material: node.material ? {
|
|
282
|
+
name: node.material.name ?? null,
|
|
283
|
+
type: node.material.getClassName?.() || node.material.constructor?.name || 'Unknown',
|
|
284
|
+
} : null,
|
|
285
|
+
};
|
|
286
|
+
}
|
|
287
|
+
async function ensureEditorInspector(host, options) {
|
|
288
|
+
const ensureInspectorReady = host.window.ensureInspectorReady;
|
|
289
|
+
if (typeof ensureInspectorReady === 'function') {
|
|
290
|
+
try {
|
|
291
|
+
const localInspector = await ensureInspectorReady();
|
|
292
|
+
if (localInspector?.ShowInspector)
|
|
293
|
+
return localInspector;
|
|
294
|
+
}
|
|
295
|
+
catch { }
|
|
296
|
+
}
|
|
297
|
+
const existing = host.window.INSPECTOR;
|
|
298
|
+
if (existing?.ShowInspector)
|
|
299
|
+
return existing;
|
|
300
|
+
const url = host.window.BRIDGE_INSPECTOR_URL || options.inspectorUrl || INSPECTOR_V2_URL;
|
|
301
|
+
try {
|
|
302
|
+
await new Promise((resolve, reject) => {
|
|
303
|
+
const script = host.document.createElement('script');
|
|
304
|
+
script.src = url;
|
|
305
|
+
script.onload = () => resolve();
|
|
306
|
+
script.onerror = () => reject(new Error(`Failed to load: ${url}`));
|
|
307
|
+
host.document.head.appendChild(script);
|
|
308
|
+
});
|
|
309
|
+
const loaded = host.window.INSPECTOR;
|
|
310
|
+
return loaded?.ShowInspector ? loaded : null;
|
|
311
|
+
}
|
|
312
|
+
catch {
|
|
313
|
+
return null;
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
function isHostHTMLElement(target, host) {
|
|
317
|
+
const ElementCtor = host.window.HTMLElement ?? HTMLElement;
|
|
318
|
+
return typeof ElementCtor === 'function' && target instanceof ElementCtor;
|
|
319
|
+
}
|
|
320
|
+
export function createEditorInspectorHost(options) {
|
|
321
|
+
const host = options.host ?? createBrowserHost();
|
|
322
|
+
let scene = null;
|
|
323
|
+
let inspectorVisible = false;
|
|
324
|
+
let inspectorToken = null;
|
|
325
|
+
let dblclickHandler = null;
|
|
326
|
+
let propertyChangedObservable = null;
|
|
327
|
+
let propertyChangedObserver = null;
|
|
328
|
+
function emitContextSelection(node) {
|
|
329
|
+
options.onContextSelection?.(serializeNode(node));
|
|
330
|
+
}
|
|
331
|
+
function unbindDblclick() {
|
|
332
|
+
if (!dblclickHandler)
|
|
333
|
+
return;
|
|
334
|
+
host.document.removeEventListener('dblclick', dblclickHandler);
|
|
335
|
+
dblclickHandler = null;
|
|
336
|
+
}
|
|
337
|
+
function unbindPropertyChanged() {
|
|
338
|
+
if (propertyChangedObservable && propertyChangedObserver) {
|
|
339
|
+
try {
|
|
340
|
+
propertyChangedObservable.remove?.(propertyChangedObserver);
|
|
341
|
+
}
|
|
342
|
+
catch { }
|
|
343
|
+
}
|
|
344
|
+
propertyChangedObservable = null;
|
|
345
|
+
propertyChangedObserver = null;
|
|
346
|
+
}
|
|
347
|
+
function bindPropertyChanged(v2) {
|
|
348
|
+
unbindPropertyChanged();
|
|
349
|
+
const observable = v2?.Inspector?.OnPropertyChangedObservable
|
|
350
|
+
?? getBabylonRuntime(options.babylon)?.Inspector?.OnPropertyChangedObservable
|
|
351
|
+
?? scene?.debugLayer?.onPropertyChangedObservable
|
|
352
|
+
?? null;
|
|
353
|
+
if (!observable?.add)
|
|
354
|
+
return;
|
|
355
|
+
propertyChangedObservable = observable;
|
|
356
|
+
propertyChangedObserver = observable.add((event) => {
|
|
357
|
+
const property = typeof event?.property === 'string' ? event.property : '';
|
|
358
|
+
const entity = event?.object ?? null;
|
|
359
|
+
if (!entity)
|
|
360
|
+
return;
|
|
361
|
+
if (isOutlinePropertyKey(property)) {
|
|
362
|
+
applyOutlinePropertyChange({
|
|
363
|
+
entity,
|
|
364
|
+
property,
|
|
365
|
+
value: event?.value,
|
|
366
|
+
initialValue: event?.initialValue,
|
|
367
|
+
});
|
|
368
|
+
return;
|
|
369
|
+
}
|
|
370
|
+
const materialChange = adaptMaterialPropertyChange({
|
|
371
|
+
scene,
|
|
372
|
+
selectedEntity: options.getSelectedEntity(),
|
|
373
|
+
entity,
|
|
374
|
+
propertyKey: property,
|
|
375
|
+
oldValue: event?.initialValue,
|
|
376
|
+
newValue: event?.value,
|
|
377
|
+
resolveBinding: node => options.resolveBinding?.(node) ?? null,
|
|
378
|
+
});
|
|
379
|
+
if (materialChange)
|
|
380
|
+
options.onMaterialPropertyChanged?.(materialChange);
|
|
381
|
+
});
|
|
382
|
+
}
|
|
383
|
+
function bindDblclick() {
|
|
384
|
+
unbindDblclick();
|
|
385
|
+
dblclickHandler = (event) => {
|
|
386
|
+
const selected = options.getSelectedEntity();
|
|
387
|
+
if (!selected)
|
|
388
|
+
return;
|
|
389
|
+
const rawTarget = event.target;
|
|
390
|
+
const target = isHostHTMLElement(rawTarget, host) ? rawTarget : null;
|
|
391
|
+
if (!target)
|
|
392
|
+
return;
|
|
393
|
+
const tag = target.tagName;
|
|
394
|
+
if (tag === 'INPUT' || tag === 'TEXTAREA' || tag === 'SELECT' || target.isContentEditable)
|
|
395
|
+
return;
|
|
396
|
+
const canvas = scene?.getEngine?.()?.getRenderingCanvas?.() ?? null;
|
|
397
|
+
if (rawTarget === canvas || target.closest?.('#inspector-host, #babylon-inspector-container')) {
|
|
398
|
+
emitContextSelection(selected);
|
|
399
|
+
}
|
|
400
|
+
};
|
|
401
|
+
host.document.addEventListener('dblclick', dblclickHandler);
|
|
402
|
+
}
|
|
403
|
+
function applyCurrentSelectionAndTool() {
|
|
404
|
+
const selectionController = options.getSelectionController();
|
|
405
|
+
const selectedEntity = options.getSelectedEntity();
|
|
406
|
+
if (selectedEntity)
|
|
407
|
+
selectionController?.selectEntity?.(selectedEntity, true);
|
|
408
|
+
const tool = options.getCurrentTool?.();
|
|
409
|
+
if (tool)
|
|
410
|
+
syncInspectorToolState(tool, getInspectorContainer(host), host);
|
|
411
|
+
}
|
|
412
|
+
return {
|
|
413
|
+
init(nextScene) {
|
|
414
|
+
scene = nextScene;
|
|
415
|
+
patchInspectorDefaults(host, options.babylon);
|
|
416
|
+
patchSelection(host);
|
|
417
|
+
void patchRotationGizmoDefaults(host, options);
|
|
418
|
+
},
|
|
419
|
+
async show() {
|
|
420
|
+
if (!scene)
|
|
421
|
+
return;
|
|
422
|
+
await patchRotationGizmoDefaults(host, options);
|
|
423
|
+
const selectionController = options.getSelectionController();
|
|
424
|
+
const v2 = await ensureEditorInspector(host, options);
|
|
425
|
+
if (v2?.ShowInspector) {
|
|
426
|
+
const selectionBridge = selectionController?.createV2SelectionBridge?.(v2);
|
|
427
|
+
const serviceDefinitions = [selectionBridge].filter(Boolean);
|
|
428
|
+
const inspectorOptions = {
|
|
429
|
+
...(typeof v2.ConvertOptions === 'function' ? v2.ConvertOptions({ embedMode: true }) : { layoutMode: 'overlay' }),
|
|
430
|
+
serviceDefinitions: serviceDefinitions.length ? serviceDefinitions : undefined,
|
|
431
|
+
};
|
|
432
|
+
inspectorToken = v2.ShowInspector(scene, inspectorOptions);
|
|
433
|
+
inspectorVisible = true;
|
|
434
|
+
injectInspectorStyle(host);
|
|
435
|
+
bindPropertyChanged(v2);
|
|
436
|
+
selectionController?.bindSelectionSourceTracking?.();
|
|
437
|
+
selectionController?.enablePicking?.();
|
|
438
|
+
bindDblclick();
|
|
439
|
+
host.setTimeout(() => tuneOutlineLayer(scene), 200);
|
|
440
|
+
applyCurrentSelectionAndTool();
|
|
441
|
+
return;
|
|
442
|
+
}
|
|
443
|
+
if (scene.debugLayer?.show) {
|
|
444
|
+
await scene.debugLayer.show({
|
|
445
|
+
embedMode: true,
|
|
446
|
+
initialTab: getBabylonRuntime(options.babylon)?.DebugLayerTab?.Properties ?? 0,
|
|
447
|
+
});
|
|
448
|
+
inspectorVisible = true;
|
|
449
|
+
injectInspectorStyle(host);
|
|
450
|
+
bindPropertyChanged();
|
|
451
|
+
selectionController?.bindSelectionSourceTracking?.();
|
|
452
|
+
selectionController?.enablePicking?.();
|
|
453
|
+
bindDblclick();
|
|
454
|
+
applyCurrentSelectionAndTool();
|
|
455
|
+
return;
|
|
456
|
+
}
|
|
457
|
+
const Inspector = getBabylonRuntime(options.babylon)?.Inspector;
|
|
458
|
+
if (Inspector?.Show) {
|
|
459
|
+
Inspector.Show(scene, {
|
|
460
|
+
embedMode: true,
|
|
461
|
+
initialTab: getBabylonRuntime(options.babylon)?.DebugLayerTab?.Properties ?? 0,
|
|
462
|
+
});
|
|
463
|
+
inspectorVisible = true;
|
|
464
|
+
injectInspectorStyle(host);
|
|
465
|
+
bindPropertyChanged();
|
|
466
|
+
selectionController?.bindSelectionSourceTracking?.();
|
|
467
|
+
selectionController?.enablePicking?.();
|
|
468
|
+
bindDblclick();
|
|
469
|
+
applyCurrentSelectionAndTool();
|
|
470
|
+
}
|
|
471
|
+
},
|
|
472
|
+
hide() {
|
|
473
|
+
if (!inspectorVisible)
|
|
474
|
+
return;
|
|
475
|
+
unbindDblclick();
|
|
476
|
+
unbindPropertyChanged();
|
|
477
|
+
options.getSelectionController()?.reset?.();
|
|
478
|
+
try {
|
|
479
|
+
if (inspectorToken) {
|
|
480
|
+
if (!inspectorToken.isDisposed)
|
|
481
|
+
inspectorToken.dispose();
|
|
482
|
+
inspectorToken = null;
|
|
483
|
+
}
|
|
484
|
+
else if (scene?.debugLayer) {
|
|
485
|
+
scene.debugLayer.hide();
|
|
486
|
+
}
|
|
487
|
+
else {
|
|
488
|
+
const Inspector = getBabylonRuntime(options.babylon)?.Inspector;
|
|
489
|
+
if (Inspector?.Hide)
|
|
490
|
+
Inspector.Hide();
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
catch { }
|
|
494
|
+
inspectorVisible = false;
|
|
495
|
+
},
|
|
496
|
+
isVisible() {
|
|
497
|
+
return inspectorVisible;
|
|
498
|
+
},
|
|
499
|
+
syncTool(tool) {
|
|
500
|
+
syncInspectorToolState(tool, getInspectorContainer(host), host);
|
|
501
|
+
},
|
|
502
|
+
tuneOutlineLayer() {
|
|
503
|
+
tuneOutlineLayer(scene);
|
|
504
|
+
},
|
|
505
|
+
};
|
|
506
|
+
}
|
|
507
|
+
export function setInspectorPickingState(enabled, host) {
|
|
508
|
+
return setInspectorPicking(enabled, getInspectorContainer(host));
|
|
509
|
+
}
|
|
510
|
+
//# sourceMappingURL=inspector-host.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inspector-host.js","sourceRoot":"","sources":["../src/inspector-host.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAoB,MAAM,2BAA2B,CAAC;AAEhF,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AACzG,OAAO,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAC1E,OAAO,EAAE,0BAA0B,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAGrF,MAAM,gBAAgB,GAAG,wEAAwE,CAAC;AAClG,MAAM,+BAA+B,GAAG,2CAA2C,CAAC;AAoCpF,SAAS,cAAc,CAAC,IAAiB;IACvC,MAAM,aAAa,GAAI,IAAI,CAAC,MAAqC,CAAC,SAAS,CAAC;IAC5E,MAAM,SAAS,GAAI,IAAI,CAAC,MAAqC,CAAC,KAAK,CAAC;IACpE,MAAM,QAAQ,GAAI,IAAI,CAAC,MAAqC,CAAC,IAAI,CAAC;IAClE,IAAI,CAAC,aAAa,IAAI,CAAC,SAAS,IAAI,CAAC,QAAQ;QAAE,OAAO;IACtD,MAAM,KAAK,GAAG,aAAa,CAAC,SAAyD,CAAC;IACtF,IAAI,KAAK,CAAC,kBAAkB;QAAE,OAAO;IACrC,MAAM,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;IAChC,KAAK,CAAC,QAAQ,GAAG,SAAS,eAAe,CAAC,KAAY;QACpD,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QAC3B,IAAI,IAAI,CAAC,QAAQ,EAAE;YAAE,OAA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AAC,OAAgB,EAAE,IAAkB;IAC3E,OAAO,mBAAmB,CAAC,OAAO,EAAE,qBAAqB,CAAC,IAAI,CAAC,CAAC,CAAC;AACnE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legacy-runtime.d.ts","sourceRoot":"","sources":["../src/legacy-runtime.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,wBAAwB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legacy-runtime.js","sourceRoot":"","sources":["../src/legacy-runtime.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { MaterialProp, MaterialRuntimeKind, MaterialValue, PersistentBinding } from '@fps-games/editor-protocol';
|
|
2
|
+
import type { BabylonRuntimeGlobal, CanonicalMaterialChange, RuntimeNode, RuntimeScene } from './types';
|
|
3
|
+
export declare const MATERIAL_CANONICAL_PATHS: readonly ["material.albedoColor", "material.emissiveColor", "material.metallic", "material.roughness", "material.alpha", "material.backFaceCulling", "material.albedoTexture.url", "material.normalTexture.url", "material.metallicTexture.url", "material.pbr.albedoColor", "material.pbr.baseWeight", "material.pbr.reflectivityColor", "material.pbr.microSurface", "material.pbr.emissiveColor", "material.pbr.ambientColor", "material.pbr.lightFalloff", "material.standard.diffuseColor", "material.standard.specularColor", "material.standard.specularPower", "material.standard.emissiveColor", "material.standard.ambientColor", "material.standard.useSpecularOverAlpha"];
|
|
4
|
+
type AdaptMaterialPropertyChangeOptions = {
|
|
5
|
+
scene: RuntimeScene | null;
|
|
6
|
+
selectedEntity: RuntimeNode | null;
|
|
7
|
+
entity: unknown;
|
|
8
|
+
propertyKey: unknown;
|
|
9
|
+
oldValue: unknown;
|
|
10
|
+
newValue: unknown;
|
|
11
|
+
resolveBinding: (node: RuntimeNode) => PersistentBinding | null;
|
|
12
|
+
};
|
|
13
|
+
type ApplyMaterialRuntimeOptions = {
|
|
14
|
+
babylon?: BabylonRuntimeGlobal | null;
|
|
15
|
+
};
|
|
16
|
+
export declare function resolveMaterialRuntimeKind(material: any): MaterialRuntimeKind;
|
|
17
|
+
export declare function adaptMaterialPropertyChange(options: AdaptMaterialPropertyChangeOptions): CanonicalMaterialChange | null;
|
|
18
|
+
export declare function applyMaterialValueToRuntimeMaterial(material: unknown, scene: RuntimeScene | null, path: MaterialProp, value: MaterialValue, options?: ApplyMaterialRuntimeOptions): boolean;
|
|
19
|
+
export declare function resolveMaterialOwnerNode(rootNode: RuntimeNode | null, ownerNodePath: string): RuntimeNode | null;
|
|
20
|
+
export declare function applyMaterialValueToRuntimeNode(ownerNode: RuntimeNode | null, scene: RuntimeScene | null, path: MaterialProp, value: MaterialValue, options?: ApplyMaterialRuntimeOptions): boolean;
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=material-property-adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"material-property-adapter.d.ts","sourceRoot":"","sources":["../src/material-property-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,mBAAmB,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAEtH,OAAO,KAAK,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAExG,eAAO,MAAM,wBAAwB,upBAuBO,CAAC;AAE7C,KAAK,kCAAkC,GAAG;IACxC,KAAK,EAAE,YAAY,GAAG,IAAI,CAAC;IAC3B,cAAc,EAAE,WAAW,GAAG,IAAI,CAAC;IACnC,MAAM,EAAE,OAAO,CAAC;IAChB,WAAW,EAAE,OAAO,CAAC;IACrB,Q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