@fps-games/editor 0.1.7-beta.4 → 0.1.8
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/agent-bridge/capabilities/assets.d.ts.map +1 -1
- package/dist/agent-bridge/capabilities/assets.js +12 -7
- package/dist/agent-bridge/capabilities/assets.js.map +1 -1
- package/dist/agent-bridge/capabilities/host-lifecycle.d.ts +1 -1
- package/dist/agent-bridge/capabilities/host-lifecycle.d.ts.map +1 -1
- package/dist/agent-bridge/capabilities/host-lifecycle.js +4 -2
- package/dist/agent-bridge/capabilities/host-lifecycle.js.map +1 -1
- package/dist/agent-bridge/capabilities/prefabs.js +50 -0
- package/dist/agent-bridge/capabilities/prefabs.js.map +1 -1
- package/dist/agent-bridge/capability-sources.d.ts.map +1 -1
- package/dist/agent-bridge/capability-sources.js +4 -1
- package/dist/agent-bridge/capability-sources.js.map +1 -1
- package/dist/build-info.json +15 -15
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/local-editor-harness.d.ts +4 -0
- package/dist/local-editor-harness.d.ts.map +1 -1
- package/dist/local-editor-harness.js +145 -53
- package/dist/local-editor-harness.js.map +1 -1
- package/dist/playable-local-editor-host.d.ts +5 -1
- package/dist/playable-local-editor-host.d.ts.map +1 -1
- package/dist/playable-local-editor-host.js +74 -1
- package/dist/playable-local-editor-host.js.map +1 -1
- package/node_modules/@fps-games/babylon-renderer/package.json +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/inspector-host.d.ts +2 -0
- package/node_modules/@fps-games/editor-babylon/dist/inspector-host.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/inspector-host.js +1 -0
- package/node_modules/@fps-games/editor-babylon/dist/inspector-host.js.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/material-property-adapter.d.ts +6 -2
- package/node_modules/@fps-games/editor-babylon/dist/material-property-adapter.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/material-property-adapter.js +94 -24
- package/node_modules/@fps-games/editor-babylon/dist/material-property-adapter.js.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/material-slot-source-resolver.d.ts +6 -2
- package/node_modules/@fps-games/editor-babylon/dist/material-slot-source-resolver.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/material-slot-source-resolver.js +7 -0
- package/node_modules/@fps-games/editor-babylon/dist/material-slot-source-resolver.js.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/monitor.d.ts +2 -0
- package/node_modules/@fps-games/editor-babylon/dist/monitor.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/monitor.js +2 -0
- package/node_modules/@fps-games/editor-babylon/dist/monitor.js.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/projection.d.ts +19 -0
- package/node_modules/@fps-games/editor-babylon/dist/projection.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/projection.js +711 -35
- package/node_modules/@fps-games/editor-babylon/dist/projection.js.map +1 -1
- package/node_modules/@fps-games/editor-babylon/package.json +5 -5
- package/node_modules/@fps-games/editor-browser/dist/index.d.ts +2 -0
- package/node_modules/@fps-games/editor-browser/dist/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/index.js +1 -0
- package/node_modules/@fps-games/editor-browser/dist/index.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-modal-dialog.d.ts +26 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-modal-dialog.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-modal-dialog.js +187 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-modal-dialog.js.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.js +102 -2
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.d.ts +3 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.js +15 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/package.json +3 -3
- package/node_modules/@fps-games/editor-core/package.json +2 -2
- package/node_modules/@fps-games/editor-forge-play/package.json +2 -2
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/metadata.js +198 -53
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/metadata.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play-types.d.ts +4 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play-types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play.js +89 -9
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/host-controller.d.ts +3 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/host-controller.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/host-controller.js +59 -5
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/host-controller.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/index.d.ts +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/index.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/lifecycle.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/lifecycle.js +59 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/lifecycle.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/types.d.ts +25 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/binding.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/binding.js +29 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/binding.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/runtime-preview/nodes.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/runtime-preview/nodes.js +34 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/runtime-preview/nodes.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-compiler/compiler.js +6 -2
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-compiler/compiler.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/driver.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/driver.js +57 -3
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/driver.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/types.d.ts +30 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/session/patches.d.ts +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/session/patches.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/session/patches.js +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/session/patches.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/package.json +3 -3
- package/node_modules/@fps-games/editor-protocol/dist/agent-bridge.d.ts +13 -0
- package/node_modules/@fps-games/editor-protocol/dist/agent-bridge.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-protocol/dist/agent-bridge.js +29 -0
- package/node_modules/@fps-games/editor-protocol/dist/agent-bridge.js.map +1 -1
- package/node_modules/@fps-games/editor-protocol/dist/index.d.ts +6 -1
- package/node_modules/@fps-games/editor-protocol/dist/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-protocol/dist/index.js.map +1 -1
- package/node_modules/@fps-games/editor-protocol/package.json +1 -1
- package/package.json +8 -8
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import { createButton } from './local-editor-ui-shared.js';
|
|
2
|
+
import { applyLocalEditorTheme, LOCAL_EDITOR_THEME_CLASS, } from './local-editor-ui-theme.js';
|
|
3
|
+
export function createLocalEditorModalDialog(options) {
|
|
4
|
+
const { doc } = options;
|
|
5
|
+
const root = doc.createElement('div');
|
|
6
|
+
root.classList.add(LOCAL_EDITOR_THEME_CLASS);
|
|
7
|
+
root.dataset.editorModalDialog = 'true';
|
|
8
|
+
root.dataset.editorWorkbenchRegion = 'modal';
|
|
9
|
+
root.style.cssText = [
|
|
10
|
+
'position:fixed',
|
|
11
|
+
'inset:0',
|
|
12
|
+
'z-index:2147483643',
|
|
13
|
+
'display:none',
|
|
14
|
+
'align-items:center',
|
|
15
|
+
'justify-content:center',
|
|
16
|
+
'padding:32px',
|
|
17
|
+
'background:rgba(0,0,0,0.48)',
|
|
18
|
+
'font-family:var(--fps-editor-font)',
|
|
19
|
+
'color:var(--fps-editor-text)',
|
|
20
|
+
'pointer-events:auto',
|
|
21
|
+
].join(';');
|
|
22
|
+
const dialog = doc.createElement('div');
|
|
23
|
+
dialog.setAttribute('role', 'dialog');
|
|
24
|
+
dialog.setAttribute('aria-modal', 'true');
|
|
25
|
+
dialog.style.cssText = [
|
|
26
|
+
'width:min(460px,calc(100vw - 64px))',
|
|
27
|
+
'max-height:calc(100vh - 64px)',
|
|
28
|
+
'display:flex',
|
|
29
|
+
'flex-direction:column',
|
|
30
|
+
'gap:10px',
|
|
31
|
+
'padding:14px',
|
|
32
|
+
'border:1px solid var(--fps-editor-border)',
|
|
33
|
+
'border-radius:4px',
|
|
34
|
+
'background:var(--fps-editor-panel)',
|
|
35
|
+
'box-shadow:var(--fps-editor-shadow-modal)',
|
|
36
|
+
'overflow:hidden',
|
|
37
|
+
].join(';');
|
|
38
|
+
const header = doc.createElement('div');
|
|
39
|
+
header.style.cssText = 'display:flex;align-items:flex-start;justify-content:space-between;gap:12px';
|
|
40
|
+
const title = doc.createElement('h2');
|
|
41
|
+
title.style.cssText = [
|
|
42
|
+
'min-width:0',
|
|
43
|
+
'margin:0',
|
|
44
|
+
'overflow-wrap:anywhere',
|
|
45
|
+
'font-size:13px',
|
|
46
|
+
'font-weight:900',
|
|
47
|
+
'line-height:18px',
|
|
48
|
+
'color:var(--fps-editor-text-strong)',
|
|
49
|
+
].join(';');
|
|
50
|
+
header.appendChild(title);
|
|
51
|
+
const message = doc.createElement('div');
|
|
52
|
+
message.style.cssText = [
|
|
53
|
+
'color:var(--fps-editor-text)',
|
|
54
|
+
'font-size:12px',
|
|
55
|
+
'font-weight:750',
|
|
56
|
+
'line-height:18px',
|
|
57
|
+
'overflow-wrap:anywhere',
|
|
58
|
+
].join(';');
|
|
59
|
+
const details = doc.createElement('pre');
|
|
60
|
+
details.style.cssText = [
|
|
61
|
+
'display:none',
|
|
62
|
+
'max-height:min(180px,calc(100vh - 260px))',
|
|
63
|
+
'margin:0',
|
|
64
|
+
'overflow:auto',
|
|
65
|
+
'white-space:pre-wrap',
|
|
66
|
+
'word-break:break-word',
|
|
67
|
+
'padding:8px',
|
|
68
|
+
'border:1px solid var(--fps-editor-border-soft)',
|
|
69
|
+
'border-radius:3px',
|
|
70
|
+
'background:var(--fps-editor-field)',
|
|
71
|
+
'color:var(--fps-editor-muted-strong)',
|
|
72
|
+
'font-family:var(--fps-editor-font)',
|
|
73
|
+
'font-size:11px',
|
|
74
|
+
'font-weight:700',
|
|
75
|
+
'line-height:16px',
|
|
76
|
+
].join(';');
|
|
77
|
+
const footer = doc.createElement('div');
|
|
78
|
+
footer.style.cssText = 'display:flex;align-items:center;justify-content:flex-end;gap:8px';
|
|
79
|
+
const cancelButton = createButton(doc, 'Cancel');
|
|
80
|
+
cancelButton.dataset.editorModalDialogCancel = 'true';
|
|
81
|
+
const confirmButton = createButton(doc, 'OK');
|
|
82
|
+
confirmButton.dataset.editorModalDialogConfirm = 'true';
|
|
83
|
+
footer.append(cancelButton, confirmButton);
|
|
84
|
+
dialog.append(header, message, details, footer);
|
|
85
|
+
root.appendChild(dialog);
|
|
86
|
+
(options.host ?? doc.body).appendChild(root);
|
|
87
|
+
let active = null;
|
|
88
|
+
const syncTone = (tone) => {
|
|
89
|
+
const toneColor = tone === 'danger' || tone === 'error'
|
|
90
|
+
? 'var(--fps-editor-danger-strong)'
|
|
91
|
+
: tone === 'warning'
|
|
92
|
+
? 'var(--fps-editor-warn)'
|
|
93
|
+
: 'var(--fps-editor-text-strong)';
|
|
94
|
+
dialog.style.borderColor = tone === 'default' ? 'var(--fps-editor-border)' : toneColor;
|
|
95
|
+
title.style.color = toneColor;
|
|
96
|
+
confirmButton.style.borderColor = tone === 'default' ? 'var(--fps-editor-border)' : toneColor;
|
|
97
|
+
};
|
|
98
|
+
const show = (input, kind) => {
|
|
99
|
+
close();
|
|
100
|
+
applyLocalEditorTheme(root, options.getTheme?.());
|
|
101
|
+
const tone = input.tone ?? 'default';
|
|
102
|
+
title.textContent = input.title;
|
|
103
|
+
dialog.setAttribute('aria-label', input.title);
|
|
104
|
+
message.textContent = input.message;
|
|
105
|
+
details.textContent = input.details ?? '';
|
|
106
|
+
details.style.display = input.details ? 'block' : 'none';
|
|
107
|
+
setButtonLabel(cancelButton, input.cancelLabel ?? 'Cancel');
|
|
108
|
+
setButtonLabel(confirmButton, input.confirmLabel ?? 'OK');
|
|
109
|
+
cancelButton.style.display = kind === 'confirm' ? 'inline-flex' : 'none';
|
|
110
|
+
syncTone(tone);
|
|
111
|
+
root.style.display = 'flex';
|
|
112
|
+
options.onOpenChange?.(true);
|
|
113
|
+
setTimeout(() => {
|
|
114
|
+
(kind === 'confirm' ? cancelButton : confirmButton).focus({ preventScroll: true });
|
|
115
|
+
}, 0);
|
|
116
|
+
};
|
|
117
|
+
const settle = (confirmed) => {
|
|
118
|
+
const current = active;
|
|
119
|
+
if (!current)
|
|
120
|
+
return;
|
|
121
|
+
active = null;
|
|
122
|
+
root.style.display = 'none';
|
|
123
|
+
options.onOpenChange?.(false);
|
|
124
|
+
if (current.kind === 'confirm')
|
|
125
|
+
current.resolve(confirmed);
|
|
126
|
+
else
|
|
127
|
+
current.resolve();
|
|
128
|
+
};
|
|
129
|
+
function close() {
|
|
130
|
+
settle(false);
|
|
131
|
+
}
|
|
132
|
+
const onClick = (event) => {
|
|
133
|
+
const target = event.target instanceof Element ? event.target : null;
|
|
134
|
+
if (!target)
|
|
135
|
+
return;
|
|
136
|
+
if (target.closest('[data-editor-modal-dialog-confirm]')) {
|
|
137
|
+
event.preventDefault();
|
|
138
|
+
settle(true);
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
if (target.closest('[data-editor-modal-dialog-cancel]') || target === root) {
|
|
142
|
+
event.preventDefault();
|
|
143
|
+
settle(false);
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
const onKeyDown = (event) => {
|
|
147
|
+
if (!active || event.key !== 'Escape')
|
|
148
|
+
return;
|
|
149
|
+
event.preventDefault();
|
|
150
|
+
event.stopPropagation();
|
|
151
|
+
settle(false);
|
|
152
|
+
};
|
|
153
|
+
root.addEventListener('click', onClick);
|
|
154
|
+
doc.addEventListener('keydown', onKeyDown, { capture: true });
|
|
155
|
+
return {
|
|
156
|
+
isOpen() {
|
|
157
|
+
return !!active;
|
|
158
|
+
},
|
|
159
|
+
alert(input) {
|
|
160
|
+
return new Promise((resolve) => {
|
|
161
|
+
show(input, 'alert');
|
|
162
|
+
active = { kind: 'alert', resolve };
|
|
163
|
+
});
|
|
164
|
+
},
|
|
165
|
+
confirm(input) {
|
|
166
|
+
return new Promise((resolve) => {
|
|
167
|
+
show(input, 'confirm');
|
|
168
|
+
active = { kind: 'confirm', resolve };
|
|
169
|
+
});
|
|
170
|
+
},
|
|
171
|
+
close,
|
|
172
|
+
setTheme(theme) {
|
|
173
|
+
applyLocalEditorTheme(root, theme);
|
|
174
|
+
},
|
|
175
|
+
dispose() {
|
|
176
|
+
close();
|
|
177
|
+
root.removeEventListener('click', onClick);
|
|
178
|
+
doc.removeEventListener('keydown', onKeyDown, { capture: true });
|
|
179
|
+
root.remove();
|
|
180
|
+
},
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
function setButtonLabel(button, label) {
|
|
184
|
+
button.textContent = label;
|
|
185
|
+
button.setAttribute('aria-label', label);
|
|
186
|
+
}
|
|
187
|
+
//# sourceMappingURL=local-editor-ui-modal-dialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"local-editor-ui-modal-dialog.js","sourceRoot":"","sources":["../src/local-editor-ui-modal-dialog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EACL,qBAAqB,EACrB,wBAAwB,GAEzB,MAAM,yBAAyB,CAAC;AAuCjC,MAAM,UAAU,4BAA4B,CAC1C,OAAsC;IAEtC,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC;IACxB,MAAM,IAAI,GAAG,GAAG,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IACtC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;IAC7C,IAAI,CAAC,OAAO,CAAC,iBAAiB,GAAG,MAAM,CAAC;IACxC,IAAI,CAAC,OAAO,CAAC,qBAAqB,GAAG,OAAO,CAAC;IAC7C,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG;QACnB,gBAAgB;QAChB,SAAS;QACT,oBAAoB;QACpB,cAAc;QAC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,CAAC,SAAS,CAAC,GACrD,wCAAwC,CAU1C;AAuYD,wBAAgB,gDAAgD,CAAC,SAAS,EACxE,QAAQ,GAAE,SAAS,8CAA8C,CAAC,SAAS,CAAC,EAAO,EACnF,QAAQ,GAAE,2CAAqD,GAC9D,8CAA8C,CAAC,SAAS,CAAC,EAAE,CAS7D;AA+CD,wBAAgB,qDAAqD,CAAC,SAAS,EAC7E,aAAa,EAAE,SAAS,8CAA8C,CAAC,SAAS,CAAC,EAAE,EACnF,OAAO,EAAE,+CAA+C,CAAC,SAAS,CAAC,GAClE,8CAA8C,CAAC,SAAS,CAAC,GAAG,IAAI,CAKlE;AAmpED,wBAAgB,8CAA8C,CAAC,SAAS,EACtE,OAAO,EAAE,WAAW,EACpB,MAAM,EAAE,iCAAiC,CAAC,SAAS,CAAC,EACpD,QAAQ,EAAE,mCAAmC,CAAC,SAAS,CAAC,EACxD,OAAO,CAAC,EAAE,gDAAgD,GACzD,IAAI,CAqBN;AA0ID,wBAAgB,sCAAsC,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAO7E;AAED,wBAAgB,4CAA4C,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAKlF;AAED,wBAAgB,2CAA2C,CACzD,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,GAAG,OAAO,GACrB,MAAM,GAAG,IAAI,CAMf"}
|
|
@@ -2794,9 +2794,16 @@ function createInspectorMaterialSlotListItem(doc, item, labels) {
|
|
|
2794
2794
|
appendMaterialSlotListDetailRow(doc, content, labels.material, item.materialMeta || item.materialAssetId || item.materialLabel || '');
|
|
2795
2795
|
appendMaterialSlotListDetailRow(doc, content, labels.slotId, item.slotId ?? '');
|
|
2796
2796
|
appendMaterialSlotListDetailRow(doc, content, labels.ownerNodePath, item.ownerNodePath ?? '');
|
|
2797
|
-
appendMaterialSlotListDetailRow(doc, content, labels.
|
|
2797
|
+
appendMaterialSlotListDetailRow(doc, content, labels.primitive, formatMaterialSlotPrimitiveDetail(item));
|
|
2798
|
+
appendMaterialSlotListDetailRow(doc, content, labels.sourceMaterial, [
|
|
2799
|
+
item.sourceMaterialIndex == null ? '' : `#${item.sourceMaterialIndex}`,
|
|
2800
|
+
item.sourceMaterialName ?? '',
|
|
2801
|
+
item.materialNames && item.materialNames.length > 1 ? `(${item.materialNames.join(', ')})` : '',
|
|
2802
|
+
]
|
|
2798
2803
|
.filter(Boolean)
|
|
2799
2804
|
.join(' '));
|
|
2805
|
+
appendMaterialSlotListDetailRow(doc, content, labels.triangles, item.triangleCount == null ? '' : String(item.triangleCount));
|
|
2806
|
+
appendMaterialSlotListDetailRow(doc, content, labels.bounds, formatMaterialSlotBounds(item.boundingBox));
|
|
2800
2807
|
appendMaterialSlotListDetailRow(doc, content, labels.bindingPath, item.bindingPath ?? '');
|
|
2801
2808
|
details.appendChild(content);
|
|
2802
2809
|
return details;
|
|
@@ -2848,6 +2855,10 @@ function readInspectorMaterialSlotListItem(value) {
|
|
|
2848
2855
|
if (!key || !label)
|
|
2849
2856
|
return null;
|
|
2850
2857
|
const sourceMaterialIndex = value.sourceMaterialIndex;
|
|
2858
|
+
const nodeIndex = value.nodeIndex;
|
|
2859
|
+
const meshIndex = value.meshIndex;
|
|
2860
|
+
const primitiveIndex = value.primitiveIndex;
|
|
2861
|
+
const triangleCount = value.triangleCount;
|
|
2851
2862
|
return {
|
|
2852
2863
|
key,
|
|
2853
2864
|
label,
|
|
@@ -2858,8 +2869,16 @@ function readInspectorMaterialSlotListItem(value) {
|
|
|
2858
2869
|
materialLabel: readStringField(value, 'materialLabel') || undefined,
|
|
2859
2870
|
materialMeta: readStringField(value, 'materialMeta') || undefined,
|
|
2860
2871
|
materialPreview: isLocalEditorBrowserAssetPreview(value.materialPreview) ? value.materialPreview : undefined,
|
|
2872
|
+
nodeIndex: typeof nodeIndex === 'number' && Number.isFinite(nodeIndex) ? nodeIndex : undefined,
|
|
2873
|
+
nodeIndexPath: readNumberArrayField(value, 'nodeIndexPath'),
|
|
2874
|
+
meshIndex: typeof meshIndex === 'number' && Number.isFinite(meshIndex) ? meshIndex : undefined,
|
|
2875
|
+
primitiveIndex: typeof primitiveIndex === 'number' && Number.isFinite(primitiveIndex) ? primitiveIndex : undefined,
|
|
2861
2876
|
sourceMaterialIndex: typeof sourceMaterialIndex === 'number' && Number.isFinite(sourceMaterialIndex) ? sourceMaterialIndex : undefined,
|
|
2877
|
+
sourceMaterialIndices: readNumberArrayField(value, 'sourceMaterialIndices'),
|
|
2862
2878
|
sourceMaterialName: readStringField(value, 'sourceMaterialName') || undefined,
|
|
2879
|
+
materialNames: readStringArrayField(value, 'materialNames'),
|
|
2880
|
+
triangleCount: typeof triangleCount === 'number' && Number.isFinite(triangleCount) ? triangleCount : undefined,
|
|
2881
|
+
boundingBox: readMaterialSlotBoundsField(value, 'boundingBox'),
|
|
2863
2882
|
bindingPath: readStringField(value, 'bindingPath') || undefined,
|
|
2864
2883
|
};
|
|
2865
2884
|
}
|
|
@@ -2870,6 +2889,9 @@ function readInspectorMaterialSlotListLabels(property) {
|
|
|
2870
2889
|
slotId: readStringField(labels, 'slotId') || 'Slot ID',
|
|
2871
2890
|
ownerNodePath: readStringField(labels, 'ownerNodePath') || 'Owner Node Path',
|
|
2872
2891
|
sourceMaterial: readStringField(labels, 'sourceMaterial') || 'Source Material',
|
|
2892
|
+
primitive: readStringField(labels, 'primitive') || 'Primitive',
|
|
2893
|
+
triangles: readStringField(labels, 'triangles') || 'Triangles',
|
|
2894
|
+
bounds: readStringField(labels, 'bounds') || 'Bounds',
|
|
2873
2895
|
bindingPath: readStringField(labels, 'bindingPath') || 'Binding Path',
|
|
2874
2896
|
};
|
|
2875
2897
|
}
|
|
@@ -2877,12 +2899,73 @@ function readStringField(record, key) {
|
|
|
2877
2899
|
const value = record[key];
|
|
2878
2900
|
return typeof value === 'string' ? value : '';
|
|
2879
2901
|
}
|
|
2902
|
+
function readStringArrayField(record, key) {
|
|
2903
|
+
const value = record[key];
|
|
2904
|
+
if (!Array.isArray(value))
|
|
2905
|
+
return undefined;
|
|
2906
|
+
const strings = value.filter((item) => typeof item === 'string' && item.length > 0);
|
|
2907
|
+
return strings.length > 0 ? strings : undefined;
|
|
2908
|
+
}
|
|
2909
|
+
function readNumberArrayField(record, key) {
|
|
2910
|
+
const value = record[key];
|
|
2911
|
+
if (!Array.isArray(value))
|
|
2912
|
+
return undefined;
|
|
2913
|
+
const numbers = value.filter((item) => typeof item === 'number' && Number.isFinite(item));
|
|
2914
|
+
return numbers.length > 0 ? numbers : undefined;
|
|
2915
|
+
}
|
|
2916
|
+
function readMaterialSlotBoundsField(record, key) {
|
|
2917
|
+
const value = record[key];
|
|
2918
|
+
if (!isRecord(value))
|
|
2919
|
+
return undefined;
|
|
2920
|
+
const min = readMaterialSlotVec3Tuple(value.min);
|
|
2921
|
+
const max = readMaterialSlotVec3Tuple(value.max);
|
|
2922
|
+
if (!min && !max)
|
|
2923
|
+
return undefined;
|
|
2924
|
+
return {
|
|
2925
|
+
...(min ? { min } : {}),
|
|
2926
|
+
...(max ? { max } : {}),
|
|
2927
|
+
};
|
|
2928
|
+
}
|
|
2929
|
+
function readMaterialSlotVec3Tuple(value) {
|
|
2930
|
+
if (!Array.isArray(value) || value.length < 3)
|
|
2931
|
+
return null;
|
|
2932
|
+
const [x, y, z] = value;
|
|
2933
|
+
return typeof x === 'number' && Number.isFinite(x)
|
|
2934
|
+
&& typeof y === 'number' && Number.isFinite(y)
|
|
2935
|
+
&& typeof z === 'number' && Number.isFinite(z)
|
|
2936
|
+
? [x, y, z]
|
|
2937
|
+
: null;
|
|
2938
|
+
}
|
|
2939
|
+
function formatMaterialSlotPrimitiveDetail(item) {
|
|
2940
|
+
const parts = [
|
|
2941
|
+
item.nodeIndex == null ? '' : `node #${item.nodeIndex}`,
|
|
2942
|
+
item.meshIndex == null ? '' : `mesh #${item.meshIndex}`,
|
|
2943
|
+
item.primitiveIndex == null ? '' : `primitive #${item.primitiveIndex}`,
|
|
2944
|
+
].filter(Boolean);
|
|
2945
|
+
if (item.nodeIndexPath && item.nodeIndexPath.length > 0)
|
|
2946
|
+
parts.push(`path ${item.nodeIndexPath.join('/')}`);
|
|
2947
|
+
return parts.join(' / ');
|
|
2948
|
+
}
|
|
2949
|
+
function formatMaterialSlotBounds(bounds) {
|
|
2950
|
+
if (!bounds)
|
|
2951
|
+
return '';
|
|
2952
|
+
const min = bounds.min ? bounds.min.join(', ') : '';
|
|
2953
|
+
const max = bounds.max ? bounds.max.join(', ') : '';
|
|
2954
|
+
if (min && max)
|
|
2955
|
+
return `min ${min}; max ${max}`;
|
|
2956
|
+
if (min)
|
|
2957
|
+
return `min ${min}`;
|
|
2958
|
+
if (max)
|
|
2959
|
+
return `max ${max}`;
|
|
2960
|
+
return '';
|
|
2961
|
+
}
|
|
2880
2962
|
const inspectorGroundDecalLayoutImageCache = new Map();
|
|
2881
2963
|
const INSPECTOR_GROUND_DECAL_LAYOUT_MIN_SIZE = 0.02;
|
|
2882
2964
|
const INSPECTOR_GROUND_DECAL_LAYOUT_MAX_SIZE = 1.5;
|
|
2883
2965
|
function createInspectorGroundDecalLayoutControl(doc, _target, property, bindInput) {
|
|
2884
2966
|
const editable = isInspectorPropertyEditable(property);
|
|
2885
2967
|
const layers = readInspectorGroundDecalLayoutLayers(property);
|
|
2968
|
+
const previewLayers = readInspectorGroundDecalLayoutPreviewLayers(property, layers);
|
|
2886
2969
|
const composite = isInspectorGroundDecalLayoutCompositeValue(property.value);
|
|
2887
2970
|
const textureSize = readInspectorGroundDecalLayoutTextureSize(property.value);
|
|
2888
2971
|
const mask = readInspectorGroundDecalLayoutMask(property.value);
|
|
@@ -2959,10 +3042,13 @@ function createInspectorGroundDecalLayoutControl(doc, _target, property, bindInp
|
|
|
2959
3042
|
let previewRenderVersion = 0;
|
|
2960
3043
|
const renderPreview = () => {
|
|
2961
3044
|
const version = ++previewRenderVersion;
|
|
2962
|
-
void renderInspectorGroundDecalLayoutPreview(previewCanvas,
|
|
3045
|
+
void renderInspectorGroundDecalLayoutPreview(previewCanvas, previewLayers, textureSize, mask, () => version === previewRenderVersion);
|
|
2963
3046
|
};
|
|
2964
3047
|
const updateLayerRect = (layer, rect) => {
|
|
2965
3048
|
layer.rect = normalizeInspectorGroundDecalLayoutRect(rect);
|
|
3049
|
+
const previewLayer = findInspectorGroundDecalLayoutMatchingLayer(previewLayers, layer);
|
|
3050
|
+
if (previewLayer && previewLayer !== layer)
|
|
3051
|
+
previewLayer.rect = layer.rect;
|
|
2966
3052
|
const layerFieldInputs = fieldInputsByLayer.get(layer);
|
|
2967
3053
|
if (layerFieldInputs)
|
|
2968
3054
|
updateInspectorGroundDecalLayoutFieldInputs(layerFieldInputs, layer.rect);
|
|
@@ -3107,6 +3193,20 @@ function readInspectorGroundDecalLayoutLayers(property) {
|
|
|
3107
3193
|
zOrder: 0,
|
|
3108
3194
|
}];
|
|
3109
3195
|
}
|
|
3196
|
+
function readInspectorGroundDecalLayoutPreviewLayers(property, editableLayers) {
|
|
3197
|
+
if (isInspectorGroundDecalLayoutCompositeValue(property.value) && Array.isArray(property.value.previewLayers)) {
|
|
3198
|
+
const previewLayers = property.value.previewLayers
|
|
3199
|
+
.map((layer, fallbackIndex) => readInspectorGroundDecalLayoutLayer(layer, fallbackIndex))
|
|
3200
|
+
.filter((layer) => !!layer);
|
|
3201
|
+
if (previewLayers.length > 0) {
|
|
3202
|
+
return previewLayers.map(layer => findInspectorGroundDecalLayoutMatchingLayer(editableLayers, layer) ?? layer);
|
|
3203
|
+
}
|
|
3204
|
+
}
|
|
3205
|
+
return [...editableLayers];
|
|
3206
|
+
}
|
|
3207
|
+
function findInspectorGroundDecalLayoutMatchingLayer(layers, target) {
|
|
3208
|
+
return layers.find(layer => layer.id === target.id) ?? layers.find(layer => layer.index === target.index) ?? null;
|
|
3209
|
+
}
|
|
3110
3210
|
function isInspectorGroundDecalLayoutCompositeValue(value) {
|
|
3111
3211
|
return isRecord(value) && Array.isArray(value.layers);
|
|
3112
3212
|
}
|