@operato/property-panel 9.2.7 → 10.0.0-beta.10
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/CHANGELOG.md +53 -6
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +1 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/ox-property-panel.d.ts +8 -0
- package/dist/src/ox-property-panel.js +46 -18
- package/dist/src/ox-property-panel.js.map +1 -1
- package/dist/src/property-panel/abstract-property.js +1 -0
- package/dist/src/property-panel/abstract-property.js.map +1 -1
- package/dist/src/property-panel/data-binding/data-binding-mapper.js +1 -1
- package/dist/src/property-panel/data-binding/data-binding-mapper.js.map +1 -1
- package/dist/src/property-panel/data-binding/data-binding.js.map +1 -1
- package/dist/src/property-panel/effects/property-animation.js +1 -1
- package/dist/src/property-panel/effects/property-animation.js.map +1 -1
- package/dist/src/property-panel/effects/property-event-hover.js +3 -3
- package/dist/src/property-panel/effects/property-event-hover.js.map +1 -1
- package/dist/src/property-panel/effects/property-event-tap.js +4 -4
- package/dist/src/property-panel/effects/property-event-tap.js.map +1 -1
- package/dist/src/property-panel/inspector/inspector.js +6 -6
- package/dist/src/property-panel/inspector/inspector.js.map +1 -1
- package/dist/src/property-panel/shapes/shapes.d.ts +0 -2
- package/dist/src/property-panel/shapes/shapes.js +5 -44
- package/dist/src/property-panel/shapes/shapes.js.map +1 -1
- package/dist/src/property-panel/specifics/specifics.js +1 -1
- package/dist/src/property-panel/specifics/specifics.js.map +1 -1
- package/dist/src/property-panel/styles/styles.js +2 -0
- package/dist/src/property-panel/styles/styles.js.map +1 -1
- package/dist/src/property-panel/threed/property-material3d.d.ts +27 -0
- package/dist/src/property-panel/threed/property-material3d.js +189 -0
- package/dist/src/property-panel/threed/property-material3d.js.map +1 -0
- package/dist/src/property-panel/threed/property-scene3d.d.ts +32 -0
- package/dist/src/property-panel/threed/property-scene3d.js +422 -0
- package/dist/src/property-panel/threed/property-scene3d.js.map +1 -0
- package/dist/src/property-panel/threed/threed.d.ts +17 -0
- package/dist/src/property-panel/threed/threed.js +98 -0
- package/dist/src/property-panel/threed/threed.js.map +1 -0
- package/dist/src/types.d.ts +1 -1
- package/dist/src/types.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +13 -9
- package/translations/en.json +2 -0
- package/translations/ja.json +2 -0
- package/translations/ko.json +2 -0
- package/translations/ms.json +3 -1
- package/translations/zh.json +2 -0
- package/.editorconfig +0 -29
- package/.storybook/main.js +0 -5
- package/.storybook/preview.js +0 -52
- package/.storybook/server.mjs +0 -8
- package/demo/index.html +0 -30
- package/dist/stories/index.stories.d.ts +0 -22
- package/dist/stories/index.stories.js +0 -121
- package/dist/stories/index.stories.js.map +0 -1
- package/src/graphql/board.ts +0 -144
- package/src/graphql/data-subscription.ts +0 -30
- package/src/graphql/favorite-board.ts +0 -25
- package/src/graphql/group.ts +0 -138
- package/src/graphql/index.ts +0 -4
- package/src/graphql/play-group.ts +0 -225
- package/src/graphql/scenario.ts +0 -79
- package/src/index.ts +0 -8
- package/src/ox-property-panel.ts +0 -347
- package/src/property-panel/abstract-property.ts +0 -65
- package/src/property-panel/data-binding/data-binding-mapper.ts +0 -408
- package/src/property-panel/data-binding/data-binding-value-map.ts +0 -19
- package/src/property-panel/data-binding/data-binding-value-range.ts +0 -19
- package/src/property-panel/data-binding/data-binding.ts +0 -470
- package/src/property-panel/effects/effects.ts +0 -77
- package/src/property-panel/effects/property-animation.ts +0 -155
- package/src/property-panel/effects/property-animations.ts +0 -73
- package/src/property-panel/effects/property-event-hover-emphasize.ts +0 -74
- package/src/property-panel/effects/property-event-hover.ts +0 -255
- package/src/property-panel/effects/property-event-tap.ts +0 -269
- package/src/property-panel/effects/property-event.ts +0 -73
- package/src/property-panel/effects/property-shadow.ts +0 -77
- package/src/property-panel/effects/value-converter.ts +0 -17
- package/src/property-panel/inspector/inspector.ts +0 -376
- package/src/property-panel/shapes/shapes.ts +0 -379
- package/src/property-panel/specifics/specific-properties-builder.ts +0 -160
- package/src/property-panel/specifics/specifics.ts +0 -81
- package/src/property-panel/styles/styles.ts +0 -285
- package/src/types.ts +0 -63
- package/stories/index.stories.ts +0 -134
- package/tsconfig.json +0 -26
- package/web-dev-server.config.mjs +0 -27
- package/web-test-runner.config.mjs +0 -41
|
@@ -0,0 +1,422 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright © HatioLab Inc. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
import { __decorate } from "tslib";
|
|
5
|
+
import '@operato/input/ox-input-color.js';
|
|
6
|
+
import './property-material3d.js';
|
|
7
|
+
import { css, html } from 'lit';
|
|
8
|
+
import { property } from 'lit/decorators.js';
|
|
9
|
+
import { PropertyGridStyles } from '@operato/styles/property-grid-styles.js';
|
|
10
|
+
import { AbstractProperty } from '../abstract-property.js';
|
|
11
|
+
const LIGHTING_PRESETS = {
|
|
12
|
+
Neutral: {
|
|
13
|
+
hemiIntensity: 0.6,
|
|
14
|
+
dirLightEnabled: true,
|
|
15
|
+
dirLightColor: '#ffffff',
|
|
16
|
+
dirLightIntensity: 0.5
|
|
17
|
+
},
|
|
18
|
+
Studio: {
|
|
19
|
+
hemiIntensity: 0.5,
|
|
20
|
+
dirLightEnabled: true,
|
|
21
|
+
dirLightColor: '#ffffff',
|
|
22
|
+
dirLightIntensity: 0.6
|
|
23
|
+
},
|
|
24
|
+
Bright: {
|
|
25
|
+
hemiIntensity: 0.8,
|
|
26
|
+
dirLightEnabled: true,
|
|
27
|
+
dirLightColor: '#ffffff',
|
|
28
|
+
dirLightIntensity: 0.7
|
|
29
|
+
},
|
|
30
|
+
Warm: {
|
|
31
|
+
hemiIntensity: 0.5,
|
|
32
|
+
dirLightEnabled: true,
|
|
33
|
+
dirLightColor: '#ffcc88',
|
|
34
|
+
dirLightIntensity: 0.4
|
|
35
|
+
},
|
|
36
|
+
Cool: {
|
|
37
|
+
hemiIntensity: 0.5,
|
|
38
|
+
dirLightEnabled: true,
|
|
39
|
+
dirLightColor: '#cce0ff',
|
|
40
|
+
dirLightIntensity: 0.4
|
|
41
|
+
},
|
|
42
|
+
Flat: {
|
|
43
|
+
hemiIntensity: 0.8,
|
|
44
|
+
dirLightEnabled: false,
|
|
45
|
+
dirLightColor: '#ffffff',
|
|
46
|
+
dirLightIntensity: 0
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Scene-level 3D settings for model-layer.
|
|
51
|
+
* Includes 3D mode, camera, renderer, lighting, presets, and floor configuration.
|
|
52
|
+
*/
|
|
53
|
+
export class PropertyScene3D extends AbstractProperty {
|
|
54
|
+
constructor() {
|
|
55
|
+
super(...arguments);
|
|
56
|
+
this.scene = null;
|
|
57
|
+
}
|
|
58
|
+
render() {
|
|
59
|
+
const value = this.value || {};
|
|
60
|
+
return html `
|
|
61
|
+
${this._renderMode(value)} ${this._renderBookmarks(value)} ${this._renderRenderer(value)}
|
|
62
|
+
${this._renderSky(value)}
|
|
63
|
+
${this._renderHemisphereLight(value)} ${this._renderKeyLight(value)} ${this._renderLightingPresets()}
|
|
64
|
+
${this._renderFloor(value)}
|
|
65
|
+
`;
|
|
66
|
+
}
|
|
67
|
+
_renderMode(value) {
|
|
68
|
+
return html `
|
|
69
|
+
<fieldset>
|
|
70
|
+
<legend>3D Mode</legend>
|
|
71
|
+
<div class="property-grid">
|
|
72
|
+
<input id="cb-threed" type="checkbox" value-key="threed" .checked=${!!value.threed} />
|
|
73
|
+
<label for="cb-threed">Enable 3D</label>
|
|
74
|
+
|
|
75
|
+
<label>Viewer Auto</label>
|
|
76
|
+
<select value-key="cameraAutoPlay">
|
|
77
|
+
${[
|
|
78
|
+
{ value: '', label: 'None' },
|
|
79
|
+
{ value: 'orbit', label: 'Orbit' },
|
|
80
|
+
{ value: 'play', label: 'Play Bookmarks' }
|
|
81
|
+
].map(o => html `<option value=${o.value} ?selected=${(value.cameraAutoPlay || '') === o.value}>
|
|
82
|
+
${o.label}
|
|
83
|
+
</option>`)}
|
|
84
|
+
</select>
|
|
85
|
+
</div>
|
|
86
|
+
</fieldset>
|
|
87
|
+
`;
|
|
88
|
+
}
|
|
89
|
+
_renderBookmarks(value) {
|
|
90
|
+
const bookmarks = value.cameraBookmarks || [];
|
|
91
|
+
return html `
|
|
92
|
+
<fieldset>
|
|
93
|
+
<legend>Bookmarks</legend>
|
|
94
|
+
<div class="property-grid">
|
|
95
|
+
<div class="bookmark-slots">
|
|
96
|
+
${[1, 2, 3, 4, 5, 6, 7, 8, 9].map(i => {
|
|
97
|
+
const filled = !!bookmarks[i];
|
|
98
|
+
return html `
|
|
99
|
+
<div
|
|
100
|
+
class="bookmark-slot ${filled ? 'filled' : ''}"
|
|
101
|
+
title=${filled ? 'Click: Go / Long-click: Overwrite / Right-click: Delete' : 'Long-click: Save current camera'}
|
|
102
|
+
@click=${(e) => { if (filled) {
|
|
103
|
+
this._bookmarkAction('navigate', i);
|
|
104
|
+
const t = e.currentTarget;
|
|
105
|
+
t.classList.add('saved');
|
|
106
|
+
setTimeout(() => t.classList.remove('saved'), 300);
|
|
107
|
+
} }}
|
|
108
|
+
@contextmenu=${(e) => { e.preventDefault(); if (filled)
|
|
109
|
+
this._bookmarkAction('clear', i); }}
|
|
110
|
+
@mousedown=${(e) => this._onBookmarkMouseDown(e, i)}
|
|
111
|
+
@mouseup=${() => this._onBookmarkMouseUp()}
|
|
112
|
+
@mouseleave=${() => this._onBookmarkMouseUp()}
|
|
113
|
+
>${i}</div>
|
|
114
|
+
`;
|
|
115
|
+
})}
|
|
116
|
+
</div>
|
|
117
|
+
</div>
|
|
118
|
+
</fieldset>
|
|
119
|
+
`;
|
|
120
|
+
}
|
|
121
|
+
_onBookmarkMouseDown(e, index) {
|
|
122
|
+
if (e.button !== 0)
|
|
123
|
+
return;
|
|
124
|
+
const target = e.currentTarget;
|
|
125
|
+
this._pressTarget = target;
|
|
126
|
+
// 롱클릭 시작: filling 애니메이션
|
|
127
|
+
target.classList.add('saving');
|
|
128
|
+
this._longPressTimer = setTimeout(() => {
|
|
129
|
+
this._longPressTimer = undefined;
|
|
130
|
+
target.classList.remove('saving');
|
|
131
|
+
this._bookmarkAction('save', index);
|
|
132
|
+
// 저장 완료 피드백
|
|
133
|
+
target.classList.add('saved');
|
|
134
|
+
setTimeout(() => target.classList.remove('saved'), 300);
|
|
135
|
+
}, 600);
|
|
136
|
+
}
|
|
137
|
+
_onBookmarkMouseUp() {
|
|
138
|
+
if (this._longPressTimer) {
|
|
139
|
+
clearTimeout(this._longPressTimer);
|
|
140
|
+
this._longPressTimer = undefined;
|
|
141
|
+
}
|
|
142
|
+
if (this._pressTarget) {
|
|
143
|
+
this._pressTarget.classList.remove('saving');
|
|
144
|
+
this._pressTarget = undefined;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
_bookmarkAction(action, index) {
|
|
148
|
+
var _a;
|
|
149
|
+
const root = (_a = this.scene) === null || _a === void 0 ? void 0 : _a.root;
|
|
150
|
+
const cap = root === null || root === void 0 ? void 0 : root._threeCapability;
|
|
151
|
+
if (!cap)
|
|
152
|
+
return;
|
|
153
|
+
if (action === 'save') {
|
|
154
|
+
cap.saveCameraToSlot(index);
|
|
155
|
+
}
|
|
156
|
+
else if (action === 'navigate') {
|
|
157
|
+
cap.animateToSlot(index);
|
|
158
|
+
}
|
|
159
|
+
else if (action === 'clear') {
|
|
160
|
+
cap.bookmarkManager.clearSlot(index);
|
|
161
|
+
root.set('cameraBookmarks', cap.bookmarkManager.exportSlots());
|
|
162
|
+
}
|
|
163
|
+
this.requestUpdate();
|
|
164
|
+
}
|
|
165
|
+
_renderRenderer(value) {
|
|
166
|
+
return html `
|
|
167
|
+
<fieldset>
|
|
168
|
+
<legend>Renderer</legend>
|
|
169
|
+
<div class="property-grid">
|
|
170
|
+
<input id="cb-antialias" type="checkbox" value-key="antialias" .checked=${value.antialias !== false} />
|
|
171
|
+
<label for="cb-antialias">Anti-alias</label>
|
|
172
|
+
|
|
173
|
+
<label>Precision</label>
|
|
174
|
+
<select value-key="precision">
|
|
175
|
+
${[
|
|
176
|
+
{ value: 'highp', label: 'High' },
|
|
177
|
+
{ value: 'mediump', label: 'Medium' },
|
|
178
|
+
{ value: 'lowp', label: 'Low' }
|
|
179
|
+
].map(o => html `<option value=${o.value} ?selected=${(value.precision || 'highp') === o.value}>
|
|
180
|
+
${o.label}
|
|
181
|
+
</option>`)}
|
|
182
|
+
</select>
|
|
183
|
+
</div>
|
|
184
|
+
</fieldset>
|
|
185
|
+
`;
|
|
186
|
+
}
|
|
187
|
+
_renderSky(value) {
|
|
188
|
+
const skyOptions = [
|
|
189
|
+
{ value: '', label: 'None' },
|
|
190
|
+
{ value: 'color', label: 'Color' },
|
|
191
|
+
{ value: 'studio', label: 'Studio' },
|
|
192
|
+
{ value: 'warehouse', label: 'Warehouse' },
|
|
193
|
+
{ value: 'factory', label: 'Factory' },
|
|
194
|
+
{ value: 'office', label: 'Office' },
|
|
195
|
+
{ value: 'home', label: 'Home' },
|
|
196
|
+
];
|
|
197
|
+
return html `
|
|
198
|
+
<fieldset>
|
|
199
|
+
<legend>Sky</legend>
|
|
200
|
+
<div class="property-grid">
|
|
201
|
+
<label>Preset</label>
|
|
202
|
+
<select value-key="sky">
|
|
203
|
+
${skyOptions.map(o => html `<option value=${o.value} ?selected=${(value.sky || '') === o.value}>${o.label}</option>`)}
|
|
204
|
+
</select>
|
|
205
|
+
|
|
206
|
+
${value.sky === 'color'
|
|
207
|
+
? html `
|
|
208
|
+
<label>Color</label>
|
|
209
|
+
<ox-input-color value-key="skyColor" .value=${value.skyColor || '#87ceeb'}> </ox-input-color>
|
|
210
|
+
`
|
|
211
|
+
: ''}
|
|
212
|
+
</div>
|
|
213
|
+
</fieldset>
|
|
214
|
+
`;
|
|
215
|
+
}
|
|
216
|
+
_renderHemisphereLight(value) {
|
|
217
|
+
var _a, _b;
|
|
218
|
+
return html `
|
|
219
|
+
<fieldset>
|
|
220
|
+
<legend>Hemisphere Light</legend>
|
|
221
|
+
<div class="property-grid">
|
|
222
|
+
<label>Intensity</label>
|
|
223
|
+
<div class="range-with-value">
|
|
224
|
+
<input
|
|
225
|
+
type="range"
|
|
226
|
+
min="0"
|
|
227
|
+
max="3"
|
|
228
|
+
step="0.1"
|
|
229
|
+
value-key="hemiIntensity"
|
|
230
|
+
.value=${String((_a = value.hemiIntensity) !== null && _a !== void 0 ? _a : 0.6)}
|
|
231
|
+
/>
|
|
232
|
+
<span>${((_b = value.hemiIntensity) !== null && _b !== void 0 ? _b : 0.6).toFixed(1)}</span>
|
|
233
|
+
</div>
|
|
234
|
+
</div>
|
|
235
|
+
</fieldset>
|
|
236
|
+
`;
|
|
237
|
+
}
|
|
238
|
+
_renderKeyLight(value) {
|
|
239
|
+
var _a, _b;
|
|
240
|
+
return html `
|
|
241
|
+
<fieldset>
|
|
242
|
+
<legend>Key Light</legend>
|
|
243
|
+
<div class="property-grid">
|
|
244
|
+
<input
|
|
245
|
+
id="cb-dirlight"
|
|
246
|
+
type="checkbox"
|
|
247
|
+
value-key="dirLightEnabled"
|
|
248
|
+
.checked=${value.dirLightEnabled !== false}
|
|
249
|
+
/>
|
|
250
|
+
<label for="cb-dirlight">Enabled</label>
|
|
251
|
+
|
|
252
|
+
<label>Color</label>
|
|
253
|
+
<ox-input-color value-key="dirLightColor" .value=${value.dirLightColor || '#ffffff'}> </ox-input-color>
|
|
254
|
+
|
|
255
|
+
<label>Intensity</label>
|
|
256
|
+
<div class="range-with-value">
|
|
257
|
+
<input
|
|
258
|
+
type="range"
|
|
259
|
+
min="0"
|
|
260
|
+
max="3"
|
|
261
|
+
step="0.1"
|
|
262
|
+
value-key="dirLightIntensity"
|
|
263
|
+
.value=${String((_a = value.dirLightIntensity) !== null && _a !== void 0 ? _a : 0.5)}
|
|
264
|
+
/>
|
|
265
|
+
<span>${((_b = value.dirLightIntensity) !== null && _b !== void 0 ? _b : 0.5).toFixed(1)}</span>
|
|
266
|
+
</div>
|
|
267
|
+
</div>
|
|
268
|
+
</fieldset>
|
|
269
|
+
`;
|
|
270
|
+
}
|
|
271
|
+
_renderLightingPresets() {
|
|
272
|
+
return html `
|
|
273
|
+
<fieldset>
|
|
274
|
+
<legend>Lighting Presets</legend>
|
|
275
|
+
<div class="property-grid">
|
|
276
|
+
<div class="preset-buttons">
|
|
277
|
+
${Object.entries(LIGHTING_PRESETS).map(([name, values]) => html `<button @click=${() => this._applyLightingPreset(values)}>${name}</button>`)}
|
|
278
|
+
</div>
|
|
279
|
+
</div>
|
|
280
|
+
</fieldset>
|
|
281
|
+
`;
|
|
282
|
+
}
|
|
283
|
+
_renderFloor(value) {
|
|
284
|
+
return html `
|
|
285
|
+
<property-material3d
|
|
286
|
+
legend="Floor Material"
|
|
287
|
+
.value=${value.floorMaterial3d || { receiveShadow: true }}
|
|
288
|
+
@property-change=${this._onFloorMaterialChange}
|
|
289
|
+
>
|
|
290
|
+
</property-material3d>
|
|
291
|
+
`;
|
|
292
|
+
}
|
|
293
|
+
_applyLightingPreset(values) {
|
|
294
|
+
this.dispatchEvent(new CustomEvent('property-change', {
|
|
295
|
+
bubbles: true,
|
|
296
|
+
composed: true,
|
|
297
|
+
detail: values
|
|
298
|
+
}));
|
|
299
|
+
}
|
|
300
|
+
_onFloorMaterialChange(e) {
|
|
301
|
+
e.stopPropagation();
|
|
302
|
+
this.dispatchEvent(new CustomEvent('property-change', {
|
|
303
|
+
bubbles: true,
|
|
304
|
+
composed: true,
|
|
305
|
+
detail: { floorMaterial3d: e.detail.material3d }
|
|
306
|
+
}));
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
PropertyScene3D.styles = [
|
|
310
|
+
PropertyGridStyles,
|
|
311
|
+
css `
|
|
312
|
+
.preset-buttons {
|
|
313
|
+
grid-column: 1 / -1;
|
|
314
|
+
display: flex;
|
|
315
|
+
flex-wrap: wrap;
|
|
316
|
+
gap: 4px;
|
|
317
|
+
padding: 2px 0;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
.preset-buttons button {
|
|
321
|
+
flex: 1;
|
|
322
|
+
min-width: 60px;
|
|
323
|
+
padding: 4px 6px;
|
|
324
|
+
border: 1px solid var(--md-sys-color-outline, #ccc);
|
|
325
|
+
border-radius: 4px;
|
|
326
|
+
background: var(--md-sys-color-surface, #fff);
|
|
327
|
+
color: var(--md-sys-color-on-surface, #333);
|
|
328
|
+
font-size: 11px;
|
|
329
|
+
cursor: pointer;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
.preset-buttons button:hover {
|
|
333
|
+
background: var(--md-sys-color-primary-container, #e0e0e0);
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
.range-with-value {
|
|
337
|
+
grid-column: 9 / -1;
|
|
338
|
+
display: flex;
|
|
339
|
+
align-items: center;
|
|
340
|
+
gap: 4px;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
.range-with-value input[type='range'] {
|
|
344
|
+
flex: 1;
|
|
345
|
+
border: none;
|
|
346
|
+
background: transparent;
|
|
347
|
+
padding: 0;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
.range-with-value span {
|
|
351
|
+
min-width: 2.5em;
|
|
352
|
+
text-align: right;
|
|
353
|
+
font-size: 11px;
|
|
354
|
+
color: var(--md-sys-color-on-secondary-container);
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
.bookmark-slots {
|
|
358
|
+
grid-column: 1 / -1;
|
|
359
|
+
display: grid;
|
|
360
|
+
grid-template-columns: repeat(9, 1fr);
|
|
361
|
+
gap: 2px;
|
|
362
|
+
padding: 4px 0 0;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
.bookmark-slot {
|
|
366
|
+
display: flex;
|
|
367
|
+
align-items: center;
|
|
368
|
+
justify-content: center;
|
|
369
|
+
height: 24px;
|
|
370
|
+
border-radius: 3px;
|
|
371
|
+
font-size: 11px;
|
|
372
|
+
font-weight: 600;
|
|
373
|
+
cursor: pointer;
|
|
374
|
+
color: var(--md-sys-color-outline, #999);
|
|
375
|
+
background: var(--md-sys-color-surface-variant, #f0f0f0);
|
|
376
|
+
border: 1px solid transparent;
|
|
377
|
+
user-select: none;
|
|
378
|
+
transition: all 0.12s ease;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
.bookmark-slot:hover {
|
|
382
|
+
background: var(--md-sys-color-secondary-container, #e0e0e0);
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
.bookmark-slot.filled {
|
|
386
|
+
color: var(--md-sys-color-primary, #6750A4);
|
|
387
|
+
background: var(--md-sys-color-primary-container, #EADDFF);
|
|
388
|
+
border-color: var(--md-sys-color-primary, #6750A4);
|
|
389
|
+
font-weight: 700;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
.bookmark-slot:active {
|
|
393
|
+
transform: scale(0.9);
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
.bookmark-slot.saving {
|
|
397
|
+
animation: bookmark-fill 0.6s linear forwards;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
@keyframes bookmark-fill {
|
|
401
|
+
from { box-shadow: inset 24px 0 0 0 transparent; }
|
|
402
|
+
to { box-shadow: inset 24px 0 0 0 var(--md-sys-color-primary-container, #EADDFF); }
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
.bookmark-slot.saved {
|
|
406
|
+
animation: bookmark-saved 0.3s ease;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
@keyframes bookmark-saved {
|
|
410
|
+
0% { transform: scale(1); }
|
|
411
|
+
50% { transform: scale(1.2); }
|
|
412
|
+
100% { transform: scale(1); }
|
|
413
|
+
}
|
|
414
|
+
`
|
|
415
|
+
];
|
|
416
|
+
__decorate([
|
|
417
|
+
property({ type: Object })
|
|
418
|
+
], PropertyScene3D.prototype, "value", void 0);
|
|
419
|
+
__decorate([
|
|
420
|
+
property({ type: Object })
|
|
421
|
+
], PropertyScene3D.prototype, "scene", void 0);
|
|
422
|
+
//# sourceMappingURL=property-scene3d.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"property-scene3d.js","sourceRoot":"","sources":["../../../../src/property-panel/threed/property-scene3d.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,OAAO,kCAAkC,CAAA;AAEzC,OAAO,0BAA0B,CAAA;AAEjC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC/B,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAG5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAA;AAE5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAE1D,MAAM,gBAAgB,GAA4C;IAChE,OAAO,EAAE;QACP,aAAa,EAAE,GAAG;QAClB,eAAe,EAAE,IAAI;QACrB,aAAa,EAAE,SAAS;QACxB,iBAAiB,EAAE,GAAG;KACvB;IACD,MAAM,EAAE;QACN,aAAa,EAAE,GAAG;QAClB,eAAe,EAAE,IAAI;QACrB,aAAa,EAAE,SAAS;QACxB,iBAAiB,EAAE,GAAG;KACvB;IACD,MAAM,EAAE;QACN,aAAa,EAAE,GAAG;QAClB,eAAe,EAAE,IAAI;QACrB,aAAa,EAAE,SAAS;QACxB,iBAAiB,EAAE,GAAG;KACvB;IACD,IAAI,EAAE;QACJ,aAAa,EAAE,GAAG;QAClB,eAAe,EAAE,IAAI;QACrB,aAAa,EAAE,SAAS;QACxB,iBAAiB,EAAE,GAAG;KACvB;IACD,IAAI,EAAE;QACJ,aAAa,EAAE,GAAG;QAClB,eAAe,EAAE,IAAI;QACrB,aAAa,EAAE,SAAS;QACxB,iBAAiB,EAAE,GAAG;KACvB;IACD,IAAI,EAAE;QACJ,aAAa,EAAE,GAAG;QAClB,eAAe,EAAE,KAAK;QACtB,aAAa,EAAE,SAAS;QACxB,iBAAiB,EAAE,CAAC;KACrB;CACF,CAAA;AAED;;;GAGG;AACH,MAAM,OAAO,eAAgB,SAAQ,gBAAgB;IAArD;;QA8G8B,UAA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AAA,kBAAkB,GAAG,EAAE,CAAC,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,IAAI,IAAI,WAAW,CACnF;;;;KAIR,CAAA;IACH,CAAC;IAEO,YAAY,CAAC,KAAiB;QACpC,OAAO,IAAI,CAAA;;;iBAGE,KAAK,CAAC,eAAe,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE;2BACtC,IAAI,CAAC,sBAAsB;;;KAGjD,CAAA;IACH,CAAC;IAEO,oBAAoB,CAAC,MAA+B;QAC1D,IAAI,CAAC,aAAa,CAChB,IAAI,WAAW,CAAC,iBAAiB,EAAE;YACjC,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI;YACd,MAAM,EAAE,MAAM;SACf,CAAC,CACH,CAAA;IACH,CAAC;IAEO,sBAAsB,CAAC,CAAc;QAC3C,CAAC,CAAC,eAAe,EAAE,CAAA;QACnB,IAAI,CAAC,aAAa,CAChB,IAAI,WAAW,CAAC,iBAAiB,EAAE;YACjC,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI;YACd,MAAM,EAAE,EAAE,eAAe,EAAE,CAAC,CAAC,MAAM,CAAC,UAAU,EAAE;SACjD,CAAC,CACH,CAAA;IACH,CAAC;;AAlYM,sBAAM,GAAG;IACd,kBAAkB;IAClB,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAuGF;CACF,AA1GY,CA0GZ;AAE2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;8CAAmB;AAClB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;8CAA2B","sourcesContent":["/**\n * @license Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport '@operato/input/ox-input-color.js'\n\nimport './property-material3d.js'\n\nimport { css, html } from 'lit'\nimport { property } from 'lit/decorators.js'\n\nimport { Properties, Scene } from '@hatiolab/things-scene'\nimport { PropertyGridStyles } from '@operato/styles/property-grid-styles.js'\n\nimport { AbstractProperty } from '../abstract-property.js'\n\nconst LIGHTING_PRESETS: Record<string, Record<string, unknown>> = {\n Neutral: {\n hemiIntensity: 0.6,\n dirLightEnabled: true,\n dirLightColor: '#ffffff',\n dirLightIntensity: 0.5\n },\n Studio: {\n hemiIntensity: 0.5,\n dirLightEnabled: true,\n dirLightColor: '#ffffff',\n dirLightIntensity: 0.6\n },\n Bright: {\n hemiIntensity: 0.8,\n dirLightEnabled: true,\n dirLightColor: '#ffffff',\n dirLightIntensity: 0.7\n },\n Warm: {\n hemiIntensity: 0.5,\n dirLightEnabled: true,\n dirLightColor: '#ffcc88',\n dirLightIntensity: 0.4\n },\n Cool: {\n hemiIntensity: 0.5,\n dirLightEnabled: true,\n dirLightColor: '#cce0ff',\n dirLightIntensity: 0.4\n },\n Flat: {\n hemiIntensity: 0.8,\n dirLightEnabled: false,\n dirLightColor: '#ffffff',\n dirLightIntensity: 0\n }\n}\n\n/**\n * Scene-level 3D settings for model-layer.\n * Includes 3D mode, camera, renderer, lighting, presets, and floor configuration.\n */\nexport class PropertyScene3D extends AbstractProperty {\n static styles = [\n PropertyGridStyles,\n css`\n .preset-buttons {\n grid-column: 1 / -1;\n display: flex;\n flex-wrap: wrap;\n gap: 4px;\n padding: 2px 0;\n }\n\n .preset-buttons button {\n flex: 1;\n min-width: 60px;\n padding: 4px 6px;\n border: 1px solid var(--md-sys-color-outline, #ccc);\n border-radius: 4px;\n background: var(--md-sys-color-surface, #fff);\n color: var(--md-sys-color-on-surface, #333);\n font-size: 11px;\n cursor: pointer;\n }\n\n .preset-buttons button:hover {\n background: var(--md-sys-color-primary-container, #e0e0e0);\n }\n\n .range-with-value {\n grid-column: 9 / -1;\n display: flex;\n align-items: center;\n gap: 4px;\n }\n\n .range-with-value input[type='range'] {\n flex: 1;\n border: none;\n background: transparent;\n padding: 0;\n }\n\n .range-with-value span {\n min-width: 2.5em;\n text-align: right;\n font-size: 11px;\n color: var(--md-sys-color-on-secondary-container);\n }\n\n .bookmark-slots {\n grid-column: 1 / -1;\n display: grid;\n grid-template-columns: repeat(9, 1fr);\n gap: 2px;\n padding: 4px 0 0;\n }\n\n .bookmark-slot {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 24px;\n border-radius: 3px;\n font-size: 11px;\n font-weight: 600;\n cursor: pointer;\n color: var(--md-sys-color-outline, #999);\n background: var(--md-sys-color-surface-variant, #f0f0f0);\n border: 1px solid transparent;\n user-select: none;\n transition: all 0.12s ease;\n }\n\n .bookmark-slot:hover {\n background: var(--md-sys-color-secondary-container, #e0e0e0);\n }\n\n .bookmark-slot.filled {\n color: var(--md-sys-color-primary, #6750A4);\n background: var(--md-sys-color-primary-container, #EADDFF);\n border-color: var(--md-sys-color-primary, #6750A4);\n font-weight: 700;\n }\n\n .bookmark-slot:active {\n transform: scale(0.9);\n }\n\n .bookmark-slot.saving {\n animation: bookmark-fill 0.6s linear forwards;\n }\n\n @keyframes bookmark-fill {\n from { box-shadow: inset 24px 0 0 0 transparent; }\n to { box-shadow: inset 24px 0 0 0 var(--md-sys-color-primary-container, #EADDFF); }\n }\n\n .bookmark-slot.saved {\n animation: bookmark-saved 0.3s ease;\n }\n\n @keyframes bookmark-saved {\n 0% { transform: scale(1); }\n 50% { transform: scale(1.2); }\n 100% { transform: scale(1); }\n }\n `\n ]\n\n @property({ type: Object }) value?: Properties\n @property({ type: Object }) scene: Scene | null = null\n\n render() {\n const value = this.value || {}\n\n return html`\n ${this._renderMode(value)} ${this._renderBookmarks(value)} ${this._renderRenderer(value)}\n ${this._renderSky(value)}\n ${this._renderHemisphereLight(value)} ${this._renderKeyLight(value)} ${this._renderLightingPresets()}\n ${this._renderFloor(value)}\n `\n }\n\n private _renderMode(value: Properties) {\n return html`\n <fieldset>\n <legend>3D Mode</legend>\n <div class=\"property-grid\">\n <input id=\"cb-threed\" type=\"checkbox\" value-key=\"threed\" .checked=${!!value.threed} />\n <label for=\"cb-threed\">Enable 3D</label>\n\n <label>Viewer Auto</label>\n <select value-key=\"cameraAutoPlay\">\n ${[\n { value: '', label: 'None' },\n { value: 'orbit', label: 'Orbit' },\n { value: 'play', label: 'Play Bookmarks' }\n ].map(\n o =>\n html`<option value=${o.value} ?selected=${(value.cameraAutoPlay || '') === o.value}>\n ${o.label}\n </option>`\n )}\n </select>\n </div>\n </fieldset>\n `\n }\n\n private _renderBookmarks(value: Properties) {\n const bookmarks: (any | null)[] = value.cameraBookmarks || []\n\n return html`\n <fieldset>\n <legend>Bookmarks</legend>\n <div class=\"property-grid\">\n <div class=\"bookmark-slots\">\n ${[1, 2, 3, 4, 5, 6, 7, 8, 9].map(i => {\n const filled = !!bookmarks[i]\n return html`\n <div\n class=\"bookmark-slot ${filled ? 'filled' : ''}\"\n title=${filled ? 'Click: Go / Long-click: Overwrite / Right-click: Delete' : 'Long-click: Save current camera'}\n @click=${(e: MouseEvent) => { if (filled) { this._bookmarkAction('navigate', i); const t = e.currentTarget as HTMLElement; t.classList.add('saved'); setTimeout(() => t.classList.remove('saved'), 300) } }}\n @contextmenu=${(e: Event) => { e.preventDefault(); if (filled) this._bookmarkAction('clear', i) }}\n @mousedown=${(e: MouseEvent) => this._onBookmarkMouseDown(e, i)}\n @mouseup=${() => this._onBookmarkMouseUp()}\n @mouseleave=${() => this._onBookmarkMouseUp()}\n >${i}</div>\n `\n })}\n </div>\n </div>\n </fieldset>\n `\n }\n\n private _longPressTimer?: ReturnType<typeof setTimeout>\n private _pressTarget?: HTMLElement\n\n private _onBookmarkMouseDown(e: MouseEvent, index: number) {\n if (e.button !== 0) return\n const target = e.currentTarget as HTMLElement\n this._pressTarget = target\n\n // 롱클릭 시작: filling 애니메이션\n target.classList.add('saving')\n\n this._longPressTimer = setTimeout(() => {\n this._longPressTimer = undefined\n target.classList.remove('saving')\n this._bookmarkAction('save', index)\n\n // 저장 완료 피드백\n target.classList.add('saved')\n setTimeout(() => target.classList.remove('saved'), 300)\n }, 600)\n }\n\n private _onBookmarkMouseUp() {\n if (this._longPressTimer) {\n clearTimeout(this._longPressTimer)\n this._longPressTimer = undefined\n }\n if (this._pressTarget) {\n this._pressTarget.classList.remove('saving')\n this._pressTarget = undefined\n }\n }\n\n private _bookmarkAction(action: 'save' | 'navigate' | 'clear', index: number) {\n const root = this.scene?.root as any\n const cap = root?._threeCapability\n if (!cap) return\n\n if (action === 'save') {\n cap.saveCameraToSlot(index)\n } else if (action === 'navigate') {\n cap.animateToSlot(index)\n } else if (action === 'clear') {\n cap.bookmarkManager.clearSlot(index)\n root.set('cameraBookmarks', cap.bookmarkManager.exportSlots())\n }\n\n this.requestUpdate()\n }\n\n private _renderRenderer(value: Properties) {\n return html`\n <fieldset>\n <legend>Renderer</legend>\n <div class=\"property-grid\">\n <input id=\"cb-antialias\" type=\"checkbox\" value-key=\"antialias\" .checked=${value.antialias !== false} />\n <label for=\"cb-antialias\">Anti-alias</label>\n\n <label>Precision</label>\n <select value-key=\"precision\">\n ${[\n { value: 'highp', label: 'High' },\n { value: 'mediump', label: 'Medium' },\n { value: 'lowp', label: 'Low' }\n ].map(\n o =>\n html`<option value=${o.value} ?selected=${(value.precision || 'highp') === o.value}>\n ${o.label}\n </option>`\n )}\n </select>\n </div>\n </fieldset>\n `\n }\n\n private _renderSky(value: Properties) {\n const skyOptions = [\n { value: '', label: 'None' },\n { value: 'color', label: 'Color' },\n { value: 'studio', label: 'Studio' },\n { value: 'warehouse', label: 'Warehouse' },\n { value: 'factory', label: 'Factory' },\n { value: 'office', label: 'Office' },\n { value: 'home', label: 'Home' },\n ]\n\n return html`\n <fieldset>\n <legend>Sky</legend>\n <div class=\"property-grid\">\n <label>Preset</label>\n <select value-key=\"sky\">\n ${skyOptions.map(\n o => html`<option value=${o.value} ?selected=${(value.sky || '') === o.value}>${o.label}</option>`\n )}\n </select>\n\n ${value.sky === 'color'\n ? html`\n <label>Color</label>\n <ox-input-color value-key=\"skyColor\" .value=${value.skyColor || '#87ceeb'}> </ox-input-color>\n `\n : ''}\n </div>\n </fieldset>\n `\n }\n\n private _renderHemisphereLight(value: Properties) {\n return html`\n <fieldset>\n <legend>Hemisphere Light</legend>\n <div class=\"property-grid\">\n <label>Intensity</label>\n <div class=\"range-with-value\">\n <input\n type=\"range\"\n min=\"0\"\n max=\"3\"\n step=\"0.1\"\n value-key=\"hemiIntensity\"\n .value=${String(value.hemiIntensity ?? 0.6)}\n />\n <span>${(value.hemiIntensity ?? 0.6).toFixed(1)}</span>\n </div>\n </div>\n </fieldset>\n `\n }\n\n private _renderKeyLight(value: Properties) {\n return html`\n <fieldset>\n <legend>Key Light</legend>\n <div class=\"property-grid\">\n <input\n id=\"cb-dirlight\"\n type=\"checkbox\"\n value-key=\"dirLightEnabled\"\n .checked=${value.dirLightEnabled !== false}\n />\n <label for=\"cb-dirlight\">Enabled</label>\n\n <label>Color</label>\n <ox-input-color value-key=\"dirLightColor\" .value=${value.dirLightColor || '#ffffff'}> </ox-input-color>\n\n <label>Intensity</label>\n <div class=\"range-with-value\">\n <input\n type=\"range\"\n min=\"0\"\n max=\"3\"\n step=\"0.1\"\n value-key=\"dirLightIntensity\"\n .value=${String(value.dirLightIntensity ?? 0.5)}\n />\n <span>${(value.dirLightIntensity ?? 0.5).toFixed(1)}</span>\n </div>\n </div>\n </fieldset>\n `\n }\n\n private _renderLightingPresets() {\n return html`\n <fieldset>\n <legend>Lighting Presets</legend>\n <div class=\"property-grid\">\n <div class=\"preset-buttons\">\n ${Object.entries(LIGHTING_PRESETS).map(\n ([name, values]) =>\n html`<button @click=${() => this._applyLightingPreset(values)}>${name}</button>`\n )}\n </div>\n </div>\n </fieldset>\n `\n }\n\n private _renderFloor(value: Properties) {\n return html`\n <property-material3d\n legend=\"Floor Material\"\n .value=${value.floorMaterial3d || { receiveShadow: true }}\n @property-change=${this._onFloorMaterialChange}\n >\n </property-material3d>\n `\n }\n\n private _applyLightingPreset(values: Record<string, unknown>) {\n this.dispatchEvent(\n new CustomEvent('property-change', {\n bubbles: true,\n composed: true,\n detail: values\n })\n )\n }\n\n private _onFloorMaterialChange(e: CustomEvent) {\n e.stopPropagation()\n this.dispatchEvent(\n new CustomEvent('property-change', {\n bubbles: true,\n composed: true,\n detail: { floorMaterial3d: e.detail.material3d }\n })\n )\n }\n\n}\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright © HatioLab Inc. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
import '@operato/input/ox-input-angle.js';
|
|
5
|
+
import '@operato/i18n/ox-i18n.js';
|
|
6
|
+
import './property-material3d.js';
|
|
7
|
+
import { BOUNDS, Component, Properties } from '@hatiolab/things-scene';
|
|
8
|
+
import { AbstractProperty } from '../abstract-property.js';
|
|
9
|
+
export declare class Property3D extends AbstractProperty {
|
|
10
|
+
static styles: import("lit").CSSResult[];
|
|
11
|
+
value?: Properties;
|
|
12
|
+
bounds: BOUNDS | null;
|
|
13
|
+
selected: Component[];
|
|
14
|
+
firstUpdated(): void;
|
|
15
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
16
|
+
onValueChange(e: Event): void;
|
|
17
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright © HatioLab Inc. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
import { __decorate } from "tslib";
|
|
5
|
+
import '@operato/input/ox-input-angle.js';
|
|
6
|
+
import '@operato/i18n/ox-i18n.js';
|
|
7
|
+
import './property-material3d.js';
|
|
8
|
+
import { html } from 'lit';
|
|
9
|
+
import { property } from 'lit/decorators.js';
|
|
10
|
+
import { PropertyGridStyles } from '@operato/styles/property-grid-styles.js';
|
|
11
|
+
import { AbstractProperty } from '../abstract-property.js';
|
|
12
|
+
export class Property3D extends AbstractProperty {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments);
|
|
15
|
+
this.bounds = null;
|
|
16
|
+
this.selected = [];
|
|
17
|
+
}
|
|
18
|
+
firstUpdated() {
|
|
19
|
+
this.renderRoot.addEventListener('change', this.onValueChange.bind(this));
|
|
20
|
+
}
|
|
21
|
+
render() {
|
|
22
|
+
var _a, _b, _c, _d, _e;
|
|
23
|
+
const value = this.value || {};
|
|
24
|
+
const { left = 0, top = 0, width = '', height = '' } = this.bounds || {};
|
|
25
|
+
return html `
|
|
26
|
+
<fieldset>
|
|
27
|
+
<legend>Size</legend>
|
|
28
|
+
<div class="property-grid">
|
|
29
|
+
<label class="onethird-label">W</label>
|
|
30
|
+
<input class="onethird-editor" type="number" value-key="bounds.width" .value=${String(width)} />
|
|
31
|
+
<label class="onethird-label">H</label>
|
|
32
|
+
<input class="onethird-editor" type="number" value-key="bounds.height" .value=${String(height)} />
|
|
33
|
+
<label class="onethird-label">D</label>
|
|
34
|
+
<input class="onethird-editor" type="number" value-key="depth" .value=${(_a = value.depth) !== null && _a !== void 0 ? _a : 0} />
|
|
35
|
+
</div>
|
|
36
|
+
</fieldset>
|
|
37
|
+
|
|
38
|
+
<fieldset>
|
|
39
|
+
<legend>Position</legend>
|
|
40
|
+
<div class="property-grid">
|
|
41
|
+
<label class="onethird-label">X</label>
|
|
42
|
+
<input class="onethird-editor" type="number" value-key="bounds.left" .value=${String(left)} />
|
|
43
|
+
<label class="onethird-label">Y</label>
|
|
44
|
+
<input class="onethird-editor" type="number" value-key="bounds.top" .value=${String(top)} />
|
|
45
|
+
<label class="onethird-label">Z</label>
|
|
46
|
+
<input class="onethird-editor" type="number" value-key="zPos" .value=${(_b = value.zPos) !== null && _b !== void 0 ? _b : 0} />
|
|
47
|
+
</div>
|
|
48
|
+
</fieldset>
|
|
49
|
+
|
|
50
|
+
<fieldset>
|
|
51
|
+
<legend>Rotation</legend>
|
|
52
|
+
<div class="property-grid">
|
|
53
|
+
<label class="onethird-label">RX</label>
|
|
54
|
+
<ox-input-angle class="onethird-editor" value-key="rotationX" .value=${(_c = value.rotationX) !== null && _c !== void 0 ? _c : 0}></ox-input-angle>
|
|
55
|
+
<label class="onethird-label">RY</label>
|
|
56
|
+
<ox-input-angle class="onethird-editor" value-key="rotationY" .value=${(_d = value.rotationY) !== null && _d !== void 0 ? _d : 0}></ox-input-angle>
|
|
57
|
+
<label class="onethird-label">RZ</label>
|
|
58
|
+
<ox-input-angle class="onethird-editor" value-key="rotation" .value=${(_e = value.rotation) !== null && _e !== void 0 ? _e : 0}></ox-input-angle>
|
|
59
|
+
</div>
|
|
60
|
+
</fieldset>
|
|
61
|
+
|
|
62
|
+
<property-material3d .value=${value.material3d}></property-material3d>
|
|
63
|
+
`;
|
|
64
|
+
}
|
|
65
|
+
onValueChange(e) {
|
|
66
|
+
var element = e.target;
|
|
67
|
+
var key = element.getAttribute('value-key');
|
|
68
|
+
if (!key) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
var value = this.getValueFromEventTarget(element);
|
|
72
|
+
if (key.indexOf('bounds.') == 0) {
|
|
73
|
+
if (isNaN(value))
|
|
74
|
+
return;
|
|
75
|
+
this.dispatchEvent(new CustomEvent('bounds-change', {
|
|
76
|
+
bubbles: true,
|
|
77
|
+
composed: true,
|
|
78
|
+
detail: {
|
|
79
|
+
[key.substr(7)]: value
|
|
80
|
+
}
|
|
81
|
+
}));
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
this.onAfterValueChange(key, value);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
Property3D.styles = [PropertyGridStyles];
|
|
89
|
+
__decorate([
|
|
90
|
+
property({ type: Object })
|
|
91
|
+
], Property3D.prototype, "value", void 0);
|
|
92
|
+
__decorate([
|
|
93
|
+
property({ type: Object })
|
|
94
|
+
], Property3D.prototype, "bounds", void 0);
|
|
95
|
+
__decorate([
|
|
96
|
+
property({ type: Array })
|
|
97
|
+
], Property3D.prototype, "selected", void 0);
|
|
98
|
+
//# sourceMappingURL=threed.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"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,CAAC;;gFAErB,MAAA,KAAK,CAAC,QAAQ,mCAAI,CAAC;;;;oCAI/D,KAAK,CAAC,UAAU;KAC/C,CAAA;IACH,CAAC;IAED,aAAa,CAAC,CAAQ;QACpB,IAAI,OAAO,GAAG,CAAC,CAAC,MAAqB,CAAA;QACrC,IAAI,GAAG,GAAG,OAAO,CAAC,YAAY,CAAC,WAAW,CAAC,CAAA;QAE3C,IAAI,CAAC,GAAG,EAAE,CAAC;YACT,OAAM;QACR,CAAC;QAED,IAAI,KAAK,GAAG,IAAI,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAA;QAEjD,IAAI,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC;YAChC,IAAI,KAAK,CAAC,KAAK,CAAC;gBAAE,OAAM;YACxB,IAAI,CAAC,aAAa,CAChB,IAAI,WAAW,CAAC,eAAe,EAAE;gBAC/B,OAAO,EAAE,IAAI;gBACb,QAAQ,EAAE,IAAI;gBACd,MAAM,EAAE;oBACN,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK;iBACvB;aACF,CAAC,CACH,CAAA;QACH,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,kBAAkB,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;QACrC,CAAC;IACH,CAAC;;AA/EM,iBAAM,GAAG,CAAC,kBAAkB,CAAC,AAAvB,CAAuB;AAER;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yCAAmB;AAClB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;0CAA6B;AAC7B;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;4CAA2B","sourcesContent":["/**\n * @license Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport '@operato/input/ox-input-angle.js'\nimport '@operato/i18n/ox-i18n.js'\n\nimport './property-material3d.js'\n\nimport { html } from 'lit'\nimport { property } from 'lit/decorators.js'\n\nimport { BOUNDS, Component, Properties } from '@hatiolab/things-scene'\nimport { PropertyGridStyles } from '@operato/styles/property-grid-styles.js'\n\nimport { AbstractProperty } from '../abstract-property.js'\n\nexport class Property3D extends AbstractProperty {\n static styles = [PropertyGridStyles]\n\n @property({ type: Object }) value?: Properties\n @property({ type: Object }) bounds: BOUNDS | null = null\n @property({ type: Array }) selected: Component[] = []\n\n firstUpdated() {\n this.renderRoot.addEventListener('change', this.onValueChange.bind(this))\n }\n\n render() {\n const value = this.value || {}\n const { left = 0, top = 0, width = '', height = '' } = this.bounds || {}\n\n return html`\n <fieldset>\n <legend>Size</legend>\n <div class=\"property-grid\">\n <label class=\"onethird-label\">W</label>\n <input class=\"onethird-editor\" type=\"number\" value-key=\"bounds.width\" .value=${String(width)} />\n <label class=\"onethird-label\">H</label>\n <input class=\"onethird-editor\" type=\"number\" value-key=\"bounds.height\" .value=${String(height)} />\n <label class=\"onethird-label\">D</label>\n <input class=\"onethird-editor\" type=\"number\" value-key=\"depth\" .value=${value.depth ?? 0} />\n </div>\n </fieldset>\n\n <fieldset>\n <legend>Position</legend>\n <div class=\"property-grid\">\n <label class=\"onethird-label\">X</label>\n <input class=\"onethird-editor\" type=\"number\" value-key=\"bounds.left\" .value=${String(left)} />\n <label class=\"onethird-label\">Y</label>\n <input class=\"onethird-editor\" type=\"number\" value-key=\"bounds.top\" .value=${String(top)} />\n <label class=\"onethird-label\">Z</label>\n <input class=\"onethird-editor\" type=\"number\" value-key=\"zPos\" .value=${value.zPos ?? 0} />\n </div>\n </fieldset>\n\n <fieldset>\n <legend>Rotation</legend>\n <div class=\"property-grid\">\n <label class=\"onethird-label\">RX</label>\n <ox-input-angle class=\"onethird-editor\" value-key=\"rotationX\" .value=${value.rotationX ?? 0}></ox-input-angle>\n <label class=\"onethird-label\">RY</label>\n <ox-input-angle class=\"onethird-editor\" value-key=\"rotationY\" .value=${value.rotationY ?? 0}></ox-input-angle>\n <label class=\"onethird-label\">RZ</label>\n <ox-input-angle class=\"onethird-editor\" value-key=\"rotation\" .value=${value.rotation ?? 0}></ox-input-angle>\n </div>\n </fieldset>\n\n <property-material3d .value=${value.material3d}></property-material3d>\n `\n }\n\n onValueChange(e: Event) {\n var element = e.target as HTMLElement\n var key = element.getAttribute('value-key')\n\n if (!key) {\n return\n }\n\n var value = this.getValueFromEventTarget(element)\n\n if (key.indexOf('bounds.') == 0) {\n if (isNaN(value)) return\n this.dispatchEvent(\n new CustomEvent('bounds-change', {\n bubbles: true,\n composed: true,\n detail: {\n [key.substr(7)]: value\n }\n })\n )\n } else {\n this.onAfterValueChange(key, value)\n }\n }\n}\n"]}
|
package/dist/src/types.d.ts
CHANGED
package/dist/src/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"","sourcesContent":["import { Model } from '@hatiolab/things-scene'\n\nexport interface PalletItem {\n type: string\n description: string\n icon: HTMLImageElement\n group: string | string[]\n model: Model\n}\n\nexport interface Pallet {\n name: string\n templates: PalletItem[]\n}\n\nexport type ComponentTemplate = {\n type: string\n description: string\n group:\n | 'line'\n | 'shape'\n | 'textAndMedia'\n | 'chartAndGauge'\n | 'table'\n | 'container'\n | 'dataSource'\n | 'IoT'\n | '3D'\n | 'warehouse'\n | 'form'\n | 'etc'\n | string\n icon: any\n model: Model\n}\n\nexport type ComponentGroup = {\n name: string\n description: string\n icon: string\n templates: ComponentTemplate[]\n}\n\nexport type Board = {\n id?: string\n name?: string\n description?: string\n model?: any\n groupId?: string\n thumbnail?: string\n}\n\nexport type BoardGroup = {\n id?: string\n name?: string\n description?: string\n}\n\nexport type PlayGroup = {\n id?: string\n name?: string\n description?: string\n}\n"]}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { Model } from '@hatiolab/things-scene'\n\nexport interface PalletItem {\n type: string\n description: string\n icon: HTMLImageElement\n group: string | string[]\n model: Model\n}\n\nexport interface Pallet {\n name: string\n templates: PalletItem[]\n}\n\nexport type ComponentTemplate = {\n type: string\n description: string\n group:\n | 'line'\n | 'shape'\n | 'textAndMedia'\n | 'chartAndGauge'\n | 'table'\n | 'container'\n | 'dataSource'\n | 'IoT'\n | '3D'\n | 'warehouse'\n | 'form'\n | 'etc'\n | string\n icon: any\n model: Model\n}\n\nexport type ComponentGroup = {\n name: string\n description: string\n icon: string\n templates: ComponentTemplate[]\n}\n\nexport type Board = {\n id?: string\n name?: string\n description?: string\n model?: any\n groupId?: string\n thumbnail?: string\n}\n\nexport type BoardGroup = {\n id?: string\n name?: string\n description?: string\n}\n\nexport type PlayGroup = {\n id?: string\n name?: string\n description?: string\n}\n"]}
|