@tresjs/leches 0.2.0 → 0.3.1
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/components/BooleanControl.vue.d.ts +1 -1
- package/dist/components/ColorControl.vue.d.ts +1 -1
- package/dist/components/ControlInput.vue.d.ts +1 -1
- package/dist/components/FPSGraph.vue.d.ts +22 -0
- package/dist/components/Folder.vue.d.ts +1 -1
- package/dist/components/NumberControl.vue.d.ts +1 -1
- package/dist/components/SliderControl.vue.d.ts +1 -1
- package/dist/components/TextControl.vue.d.ts +1 -1
- package/dist/components/TresLeches.vue.d.ts +1 -1
- package/dist/components/VectorControl.vue.d.ts +1 -1
- package/dist/composables/useControls.d.ts +21 -2
- package/dist/style.css +2 -2
- package/dist/tresleches.js +525 -464
- package/dist/tresleches.umd.cjs +3 -3
- package/package.json +34 -30
package/dist/tresleches.js
CHANGED
|
@@ -1,65 +1,65 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* name: @tresjs/leches
|
|
3
|
-
* version: v0.
|
|
3
|
+
* version: v0.3.1
|
|
4
4
|
* (c) 2023
|
|
5
5
|
* description: Tasty GUI for Vue controls 🍰
|
|
6
6
|
* author: Alvaro Saburido <hola@alvarosaburido.dev> (https://github.com/alvarosabu/)
|
|
7
7
|
*/
|
|
8
|
-
import { unref as
|
|
9
|
-
import { useStorage as
|
|
10
|
-
function
|
|
11
|
-
return
|
|
8
|
+
import { unref as T, getCurrentScope as ct, onScopeDispose as yt, toRef as _t, readonly as xt, customRef as pt, ref as g, defineComponent as v, computed as E, reactive as tt, h as dt, watch as I, isReactive as ft, toRefs as gt, onUnmounted as mt, isRef as V, openBlock as d, createElementBlock as b, createElementVNode as p, toDisplayString as C, normalizeClass as k, withDirectives as et, vShow as st, createTextVNode as bt, normalizeStyle as zt, Fragment as D, renderList as R, createCommentVNode as nt, createVNode as Mt, Transition as wt, withCtx as it, createBlock as w } from "vue";
|
|
9
|
+
import { useStorage as vt, isClient as Ct, useDraggable as St, useMouse as Y, useFps as kt, useRafFn as $t, useWindowSize as Et } from "@vueuse/core";
|
|
10
|
+
function rt(r) {
|
|
11
|
+
return ct() ? (yt(r), !0) : !1;
|
|
12
12
|
}
|
|
13
|
-
function
|
|
14
|
-
return typeof
|
|
13
|
+
function q(r) {
|
|
14
|
+
return typeof r == "function" ? r() : T(r);
|
|
15
15
|
}
|
|
16
|
-
const
|
|
17
|
-
},
|
|
18
|
-
function
|
|
19
|
-
var
|
|
20
|
-
return
|
|
16
|
+
const ot = typeof window < "u", ht = () => {
|
|
17
|
+
}, Z = /* @__PURE__ */ It();
|
|
18
|
+
function It() {
|
|
19
|
+
var r;
|
|
20
|
+
return ot && ((r = window == null ? void 0 : window.navigator) == null ? void 0 : r.userAgent) && /* @__PURE__ */ /iP(ad|hone|od)/.test(window.navigator.userAgent);
|
|
21
21
|
}
|
|
22
|
-
function
|
|
23
|
-
if (
|
|
24
|
-
return
|
|
25
|
-
const t =
|
|
26
|
-
return typeof t == "function" ?
|
|
22
|
+
function At(...r) {
|
|
23
|
+
if (r.length !== 1)
|
|
24
|
+
return _t(...r);
|
|
25
|
+
const t = r[0];
|
|
26
|
+
return typeof t == "function" ? xt(pt(() => ({ get: t, set: ht }))) : g(t);
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function Tt(r) {
|
|
29
29
|
var t;
|
|
30
|
-
const e =
|
|
30
|
+
const e = q(r);
|
|
31
31
|
return (t = e == null ? void 0 : e.$el) != null ? t : e;
|
|
32
32
|
}
|
|
33
|
-
const
|
|
34
|
-
function
|
|
35
|
-
let t, e, s,
|
|
36
|
-
if (typeof
|
|
37
|
-
return
|
|
33
|
+
const jt = ot ? window : void 0;
|
|
34
|
+
function qt(...r) {
|
|
35
|
+
let t, e, s, n;
|
|
36
|
+
if (typeof r[0] == "string" || Array.isArray(r[0]) ? ([e, s, n] = r, t = jt) : [t, e, s, n] = r, !t)
|
|
37
|
+
return ht;
|
|
38
38
|
Array.isArray(e) || (e = [e]), Array.isArray(s) || (s = [s]);
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
},
|
|
42
|
-
() => [
|
|
43
|
-
([
|
|
44
|
-
|
|
45
|
-
...e.flatMap((
|
|
39
|
+
const i = [], a = () => {
|
|
40
|
+
i.forEach((h) => h()), i.length = 0;
|
|
41
|
+
}, l = (h, o, _, u) => (h.addEventListener(o, _, u), () => h.removeEventListener(o, _, u)), y = I(
|
|
42
|
+
() => [Tt(t), q(n)],
|
|
43
|
+
([h, o]) => {
|
|
44
|
+
a(), h && i.push(
|
|
45
|
+
...e.flatMap((_) => s.map((u) => l(h, _, u, o)))
|
|
46
46
|
);
|
|
47
47
|
},
|
|
48
48
|
{ immediate: !0, flush: "post" }
|
|
49
|
-
),
|
|
50
|
-
y(),
|
|
49
|
+
), c = () => {
|
|
50
|
+
y(), a();
|
|
51
51
|
};
|
|
52
|
-
return
|
|
52
|
+
return rt(c), c;
|
|
53
53
|
}
|
|
54
|
-
var
|
|
54
|
+
var Pt = Object.defineProperty, Dt = Object.defineProperties, Vt = Object.getOwnPropertyDescriptors, B = Object.getOwnPropertySymbols, Lt = Object.prototype.hasOwnProperty, Xt = Object.prototype.propertyIsEnumerable, U = (r, t, e) => t in r ? Pt(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e, Ft = (r, t) => {
|
|
55
55
|
for (var e in t || (t = {}))
|
|
56
|
-
|
|
57
|
-
if (
|
|
58
|
-
for (var e of
|
|
59
|
-
|
|
60
|
-
return
|
|
61
|
-
},
|
|
62
|
-
const
|
|
56
|
+
Lt.call(t, e) && U(r, e, t[e]);
|
|
57
|
+
if (B)
|
|
58
|
+
for (var e of B(t))
|
|
59
|
+
Xt.call(t, e) && U(r, e, t[e]);
|
|
60
|
+
return r;
|
|
61
|
+
}, Rt = (r, t) => Dt(r, Vt(t));
|
|
62
|
+
const Yt = /* @__PURE__ */ v({
|
|
63
63
|
name: "UseDraggable",
|
|
64
64
|
props: [
|
|
65
65
|
"storageKey",
|
|
@@ -71,137 +71,104 @@ const Dt = /* @__PURE__ */ C({
|
|
|
71
71
|
"pointerTypes",
|
|
72
72
|
"as",
|
|
73
73
|
"handle",
|
|
74
|
-
"axis"
|
|
74
|
+
"axis",
|
|
75
|
+
"onStart",
|
|
76
|
+
"onMove",
|
|
77
|
+
"onEnd"
|
|
75
78
|
],
|
|
76
|
-
setup(
|
|
77
|
-
const e =
|
|
79
|
+
setup(r, { slots: t }) {
|
|
80
|
+
const e = g(), s = E(() => {
|
|
78
81
|
var y;
|
|
79
|
-
return (y =
|
|
80
|
-
}),
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
),
|
|
85
|
-
|
|
86
|
-
|
|
82
|
+
return (y = r.handle) != null ? y : e.value;
|
|
83
|
+
}), n = r.storageKey && vt(
|
|
84
|
+
r.storageKey,
|
|
85
|
+
q(r.initialValue) || { x: 0, y: 0 },
|
|
86
|
+
Ct ? r.storageType === "session" ? sessionStorage : localStorage : void 0
|
|
87
|
+
), i = n || r.initialValue || { x: 0, y: 0 }, a = (y, c) => {
|
|
88
|
+
var h;
|
|
89
|
+
(h = r.onEnd) == null || h.call(r, y, c), n && (n.value.x = y.x, n.value.y = y.y);
|
|
90
|
+
}, l = tt(St(e, Rt(Ft({}, r), {
|
|
87
91
|
handle: s,
|
|
88
|
-
initialValue:
|
|
89
|
-
onEnd:
|
|
92
|
+
initialValue: i,
|
|
93
|
+
onEnd: a
|
|
90
94
|
})));
|
|
91
95
|
return () => {
|
|
92
96
|
if (t.default)
|
|
93
|
-
return
|
|
97
|
+
return dt(r.as || "div", { ref: e, style: `touch-action:none;${l.style}` }, t.default(l));
|
|
94
98
|
};
|
|
95
99
|
}
|
|
96
100
|
});
|
|
97
|
-
function
|
|
98
|
-
const t = window.getComputedStyle(
|
|
99
|
-
if (t.overflowX === "scroll" || t.overflowY === "scroll" || t.overflowX === "auto" &&
|
|
101
|
+
function at(r) {
|
|
102
|
+
const t = window.getComputedStyle(r);
|
|
103
|
+
if (t.overflowX === "scroll" || t.overflowY === "scroll" || t.overflowX === "auto" && r.clientWidth < r.scrollWidth || t.overflowY === "auto" && r.clientHeight < r.scrollHeight)
|
|
100
104
|
return !0;
|
|
101
105
|
{
|
|
102
|
-
const e =
|
|
103
|
-
return !e || e.tagName === "BODY" ? !1 :
|
|
106
|
+
const e = r.parentNode;
|
|
107
|
+
return !e || e.tagName === "BODY" ? !1 : at(e);
|
|
104
108
|
}
|
|
105
109
|
}
|
|
106
|
-
function
|
|
107
|
-
const t =
|
|
108
|
-
return
|
|
110
|
+
function Nt(r) {
|
|
111
|
+
const t = r || window.event, e = t.target;
|
|
112
|
+
return at(e) ? !1 : t.touches.length > 1 ? !0 : (t.preventDefault && t.preventDefault(), !1);
|
|
109
113
|
}
|
|
110
|
-
function
|
|
111
|
-
const e =
|
|
112
|
-
let s = null,
|
|
113
|
-
|
|
114
|
-
if (
|
|
115
|
-
const y =
|
|
116
|
-
|
|
114
|
+
function Ht(r, t = !1) {
|
|
115
|
+
const e = g(t);
|
|
116
|
+
let s = null, n;
|
|
117
|
+
I(At(r), (l) => {
|
|
118
|
+
if (l) {
|
|
119
|
+
const y = l;
|
|
120
|
+
n = y.style.overflow, e.value && (y.style.overflow = "hidden");
|
|
117
121
|
}
|
|
118
122
|
}, {
|
|
119
123
|
immediate: !0
|
|
120
124
|
});
|
|
121
|
-
const
|
|
122
|
-
const
|
|
123
|
-
!
|
|
124
|
-
|
|
125
|
+
const i = () => {
|
|
126
|
+
const l = q(r);
|
|
127
|
+
!l || e.value || (Z && (s = qt(
|
|
128
|
+
l,
|
|
125
129
|
"touchmove",
|
|
126
130
|
(y) => {
|
|
127
|
-
|
|
131
|
+
Nt(y);
|
|
128
132
|
},
|
|
129
133
|
{ passive: !1 }
|
|
130
|
-
)),
|
|
131
|
-
},
|
|
132
|
-
const
|
|
133
|
-
!
|
|
134
|
+
)), l.style.overflow = "hidden", e.value = !0);
|
|
135
|
+
}, a = () => {
|
|
136
|
+
const l = q(r);
|
|
137
|
+
!l || !e.value || (Z && (s == null || s()), l.style.overflow = n, e.value = !1);
|
|
134
138
|
};
|
|
135
|
-
return
|
|
139
|
+
return rt(a), E({
|
|
136
140
|
get() {
|
|
137
141
|
return e.value;
|
|
138
142
|
},
|
|
139
|
-
set(
|
|
140
|
-
|
|
143
|
+
set(l) {
|
|
144
|
+
l ? i() : a();
|
|
141
145
|
}
|
|
142
146
|
});
|
|
143
147
|
}
|
|
144
|
-
function
|
|
145
|
-
let
|
|
146
|
-
const t =
|
|
148
|
+
function Qt() {
|
|
149
|
+
let r = !1;
|
|
150
|
+
const t = g(!1);
|
|
147
151
|
return (e, s) => {
|
|
148
|
-
if (t.value = s.value,
|
|
152
|
+
if (t.value = s.value, r)
|
|
149
153
|
return;
|
|
150
|
-
|
|
151
|
-
const
|
|
152
|
-
|
|
154
|
+
r = !0;
|
|
155
|
+
const n = Ht(e, s.value);
|
|
156
|
+
I(t, (i) => n.value = i);
|
|
153
157
|
};
|
|
154
158
|
}
|
|
155
|
-
|
|
156
|
-
const Vt = Symbol("CONTROLS_CONTEXT_KEY"), V = B({
|
|
157
|
-
controls: []
|
|
158
|
-
});
|
|
159
|
-
function Xt() {
|
|
160
|
-
return V;
|
|
161
|
-
}
|
|
162
|
-
function P(n) {
|
|
163
|
-
return Object.entries(n).map(([t, e]) => !O(e) && e.value ? {
|
|
164
|
-
...e,
|
|
165
|
-
label: e.label || t,
|
|
166
|
-
value: e.value,
|
|
167
|
-
type: typeof e.value.value,
|
|
168
|
-
visible: !0
|
|
169
|
-
} : {
|
|
170
|
-
label: e.label || t,
|
|
171
|
-
value: e,
|
|
172
|
-
type: O(e) ? typeof e.value : typeof e,
|
|
173
|
-
visible: !0
|
|
174
|
-
});
|
|
175
|
-
}
|
|
176
|
-
function Ee(n, t) {
|
|
177
|
-
const e = yt(Vt, {});
|
|
178
|
-
let s = [];
|
|
179
|
-
if (typeof n == "string")
|
|
180
|
-
s.push({
|
|
181
|
-
label: n,
|
|
182
|
-
visible: !0,
|
|
183
|
-
type: "folder",
|
|
184
|
-
controls: P(t)
|
|
185
|
-
});
|
|
186
|
-
else if (xt(n)) {
|
|
187
|
-
const i = _t(n);
|
|
188
|
-
s = P(i);
|
|
189
|
-
} else
|
|
190
|
-
s = P(n);
|
|
191
|
-
return V.controls = [...V.controls, ...s], e;
|
|
192
|
-
}
|
|
159
|
+
Qt();
|
|
193
160
|
/**
|
|
194
161
|
* @license
|
|
195
162
|
* Copyright 2010-2023 Three.js Authors
|
|
196
163
|
* SPDX-License-Identifier: MIT
|
|
197
164
|
*/
|
|
198
|
-
const
|
|
199
|
-
function
|
|
200
|
-
return Math.max(t, Math.min(e,
|
|
165
|
+
const lt = "153";
|
|
166
|
+
function N(r, t, e) {
|
|
167
|
+
return Math.max(t, Math.min(e, r));
|
|
201
168
|
}
|
|
202
|
-
class
|
|
169
|
+
class H {
|
|
203
170
|
constructor(t = 0, e = 0) {
|
|
204
|
-
|
|
171
|
+
H.prototype.isVector2 = !0, this.x = t, this.y = e;
|
|
205
172
|
}
|
|
206
173
|
get width() {
|
|
207
174
|
return this.x;
|
|
@@ -290,8 +257,8 @@ class j {
|
|
|
290
257
|
return this.multiplyScalar(1 / t);
|
|
291
258
|
}
|
|
292
259
|
applyMatrix3(t) {
|
|
293
|
-
const e = this.x, s = this.y,
|
|
294
|
-
return this.x =
|
|
260
|
+
const e = this.x, s = this.y, n = t.elements;
|
|
261
|
+
return this.x = n[0] * e + n[3] * s + n[6], this.y = n[1] * e + n[4] * s + n[7], this;
|
|
295
262
|
}
|
|
296
263
|
min(t) {
|
|
297
264
|
return this.x = Math.min(this.x, t.x), this.y = Math.min(this.y, t.y), this;
|
|
@@ -350,7 +317,7 @@ class j {
|
|
|
350
317
|
if (e === 0)
|
|
351
318
|
return Math.PI / 2;
|
|
352
319
|
const s = this.dot(t) / e;
|
|
353
|
-
return Math.acos(
|
|
320
|
+
return Math.acos(N(s, -1, 1));
|
|
354
321
|
}
|
|
355
322
|
distanceTo(t) {
|
|
356
323
|
return Math.sqrt(this.distanceToSquared(t));
|
|
@@ -384,8 +351,8 @@ class j {
|
|
|
384
351
|
return this.x = t.getX(e), this.y = t.getY(e), this;
|
|
385
352
|
}
|
|
386
353
|
rotateAround(t, e) {
|
|
387
|
-
const s = Math.cos(e),
|
|
388
|
-
return this.x =
|
|
354
|
+
const s = Math.cos(e), n = Math.sin(e), i = this.x - t.x, a = this.y - t.y;
|
|
355
|
+
return this.x = i * s - a * n + t.x, this.y = i * n + a * s + t.y, this;
|
|
389
356
|
}
|
|
390
357
|
random() {
|
|
391
358
|
return this.x = Math.random(), this.y = Math.random(), this;
|
|
@@ -394,39 +361,39 @@ class j {
|
|
|
394
361
|
yield this.x, yield this.y;
|
|
395
362
|
}
|
|
396
363
|
}
|
|
397
|
-
class
|
|
398
|
-
constructor(t = 0, e = 0, s = 0,
|
|
399
|
-
this.isQuaternion = !0, this._x = t, this._y = e, this._z = s, this._w =
|
|
400
|
-
}
|
|
401
|
-
static slerpFlat(t, e, s,
|
|
402
|
-
let y = s[
|
|
403
|
-
const
|
|
404
|
-
if (
|
|
405
|
-
t[e + 0] = y, t[e + 1] =
|
|
364
|
+
class Wt {
|
|
365
|
+
constructor(t = 0, e = 0, s = 0, n = 1) {
|
|
366
|
+
this.isQuaternion = !0, this._x = t, this._y = e, this._z = s, this._w = n;
|
|
367
|
+
}
|
|
368
|
+
static slerpFlat(t, e, s, n, i, a, l) {
|
|
369
|
+
let y = s[n + 0], c = s[n + 1], h = s[n + 2], o = s[n + 3];
|
|
370
|
+
const _ = i[a + 0], u = i[a + 1], x = i[a + 2], m = i[a + 3];
|
|
371
|
+
if (l === 0) {
|
|
372
|
+
t[e + 0] = y, t[e + 1] = c, t[e + 2] = h, t[e + 3] = o;
|
|
406
373
|
return;
|
|
407
374
|
}
|
|
408
|
-
if (
|
|
409
|
-
t[e + 0] =
|
|
375
|
+
if (l === 1) {
|
|
376
|
+
t[e + 0] = _, t[e + 1] = u, t[e + 2] = x, t[e + 3] = m;
|
|
410
377
|
return;
|
|
411
378
|
}
|
|
412
|
-
if (
|
|
413
|
-
let
|
|
414
|
-
const
|
|
415
|
-
if (
|
|
416
|
-
const
|
|
417
|
-
|
|
379
|
+
if (o !== m || y !== _ || c !== u || h !== x) {
|
|
380
|
+
let z = 1 - l;
|
|
381
|
+
const f = y * _ + c * u + h * x + o * m, M = f >= 0 ? 1 : -1, Q = 1 - f * f;
|
|
382
|
+
if (Q > Number.EPSILON) {
|
|
383
|
+
const S = Math.sqrt(Q), W = Math.atan2(S, f * M);
|
|
384
|
+
z = Math.sin(z * W) / S, l = Math.sin(l * W) / S;
|
|
418
385
|
}
|
|
419
|
-
const
|
|
420
|
-
if (y = y *
|
|
421
|
-
const
|
|
422
|
-
y *=
|
|
386
|
+
const P = l * M;
|
|
387
|
+
if (y = y * z + _ * P, c = c * z + u * P, h = h * z + x * P, o = o * z + m * P, z === 1 - l) {
|
|
388
|
+
const S = 1 / Math.sqrt(y * y + c * c + h * h + o * o);
|
|
389
|
+
y *= S, c *= S, h *= S, o *= S;
|
|
423
390
|
}
|
|
424
391
|
}
|
|
425
|
-
t[e] = y, t[e + 1] =
|
|
392
|
+
t[e] = y, t[e + 1] = c, t[e + 2] = h, t[e + 3] = o;
|
|
426
393
|
}
|
|
427
|
-
static multiplyQuaternionsFlat(t, e, s,
|
|
428
|
-
const
|
|
429
|
-
return t[e] =
|
|
394
|
+
static multiplyQuaternionsFlat(t, e, s, n, i, a) {
|
|
395
|
+
const l = s[n], y = s[n + 1], c = s[n + 2], h = s[n + 3], o = i[a], _ = i[a + 1], u = i[a + 2], x = i[a + 3];
|
|
396
|
+
return t[e] = l * x + h * o + y * u - c * _, t[e + 1] = y * x + h * _ + c * o - l * u, t[e + 2] = c * x + h * u + l * _ - y * o, t[e + 3] = h * x - l * o - y * _ - c * u, t;
|
|
430
397
|
}
|
|
431
398
|
get x() {
|
|
432
399
|
return this._x;
|
|
@@ -452,8 +419,8 @@ class Nt {
|
|
|
452
419
|
set w(t) {
|
|
453
420
|
this._w = t, this._onChangeCallback();
|
|
454
421
|
}
|
|
455
|
-
set(t, e, s,
|
|
456
|
-
return this._x = t, this._y = e, this._z = s, this._w =
|
|
422
|
+
set(t, e, s, n) {
|
|
423
|
+
return this._x = t, this._y = e, this._z = s, this._w = n, this._onChangeCallback(), this;
|
|
457
424
|
}
|
|
458
425
|
clone() {
|
|
459
426
|
return new this.constructor(this._x, this._y, this._z, this._w);
|
|
@@ -462,49 +429,49 @@ class Nt {
|
|
|
462
429
|
return this._x = t.x, this._y = t.y, this._z = t.z, this._w = t.w, this._onChangeCallback(), this;
|
|
463
430
|
}
|
|
464
431
|
setFromEuler(t, e) {
|
|
465
|
-
const s = t._x,
|
|
466
|
-
switch (
|
|
432
|
+
const s = t._x, n = t._y, i = t._z, a = t._order, l = Math.cos, y = Math.sin, c = l(s / 2), h = l(n / 2), o = l(i / 2), _ = y(s / 2), u = y(n / 2), x = y(i / 2);
|
|
433
|
+
switch (a) {
|
|
467
434
|
case "XYZ":
|
|
468
|
-
this._x =
|
|
435
|
+
this._x = _ * h * o + c * u * x, this._y = c * u * o - _ * h * x, this._z = c * h * x + _ * u * o, this._w = c * h * o - _ * u * x;
|
|
469
436
|
break;
|
|
470
437
|
case "YXZ":
|
|
471
|
-
this._x =
|
|
438
|
+
this._x = _ * h * o + c * u * x, this._y = c * u * o - _ * h * x, this._z = c * h * x - _ * u * o, this._w = c * h * o + _ * u * x;
|
|
472
439
|
break;
|
|
473
440
|
case "ZXY":
|
|
474
|
-
this._x =
|
|
441
|
+
this._x = _ * h * o - c * u * x, this._y = c * u * o + _ * h * x, this._z = c * h * x + _ * u * o, this._w = c * h * o - _ * u * x;
|
|
475
442
|
break;
|
|
476
443
|
case "ZYX":
|
|
477
|
-
this._x =
|
|
444
|
+
this._x = _ * h * o - c * u * x, this._y = c * u * o + _ * h * x, this._z = c * h * x - _ * u * o, this._w = c * h * o + _ * u * x;
|
|
478
445
|
break;
|
|
479
446
|
case "YZX":
|
|
480
|
-
this._x =
|
|
447
|
+
this._x = _ * h * o + c * u * x, this._y = c * u * o + _ * h * x, this._z = c * h * x - _ * u * o, this._w = c * h * o - _ * u * x;
|
|
481
448
|
break;
|
|
482
449
|
case "XZY":
|
|
483
|
-
this._x =
|
|
450
|
+
this._x = _ * h * o - c * u * x, this._y = c * u * o - _ * h * x, this._z = c * h * x + _ * u * o, this._w = c * h * o + _ * u * x;
|
|
484
451
|
break;
|
|
485
452
|
default:
|
|
486
|
-
console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: " +
|
|
453
|
+
console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: " + a);
|
|
487
454
|
}
|
|
488
455
|
return e !== !1 && this._onChangeCallback(), this;
|
|
489
456
|
}
|
|
490
457
|
setFromAxisAngle(t, e) {
|
|
491
|
-
const s = e / 2,
|
|
492
|
-
return this._x = t.x *
|
|
458
|
+
const s = e / 2, n = Math.sin(s);
|
|
459
|
+
return this._x = t.x * n, this._y = t.y * n, this._z = t.z * n, this._w = Math.cos(s), this._onChangeCallback(), this;
|
|
493
460
|
}
|
|
494
461
|
setFromRotationMatrix(t) {
|
|
495
|
-
const e = t.elements, s = e[0],
|
|
496
|
-
if (
|
|
497
|
-
const
|
|
498
|
-
this._w = 0.25 /
|
|
499
|
-
} else if (s >
|
|
500
|
-
const
|
|
501
|
-
this._w = (
|
|
502
|
-
} else if (
|
|
503
|
-
const
|
|
504
|
-
this._w = (
|
|
462
|
+
const e = t.elements, s = e[0], n = e[4], i = e[8], a = e[1], l = e[5], y = e[9], c = e[2], h = e[6], o = e[10], _ = s + l + o;
|
|
463
|
+
if (_ > 0) {
|
|
464
|
+
const u = 0.5 / Math.sqrt(_ + 1);
|
|
465
|
+
this._w = 0.25 / u, this._x = (h - y) * u, this._y = (i - c) * u, this._z = (a - n) * u;
|
|
466
|
+
} else if (s > l && s > o) {
|
|
467
|
+
const u = 2 * Math.sqrt(1 + s - l - o);
|
|
468
|
+
this._w = (h - y) / u, this._x = 0.25 * u, this._y = (n + a) / u, this._z = (i + c) / u;
|
|
469
|
+
} else if (l > o) {
|
|
470
|
+
const u = 2 * Math.sqrt(1 + l - s - o);
|
|
471
|
+
this._w = (i - c) / u, this._x = (n + a) / u, this._y = 0.25 * u, this._z = (y + h) / u;
|
|
505
472
|
} else {
|
|
506
|
-
const
|
|
507
|
-
this._w = (
|
|
473
|
+
const u = 2 * Math.sqrt(1 + o - s - l);
|
|
474
|
+
this._w = (a - n) / u, this._x = (i + c) / u, this._y = (y + h) / u, this._z = 0.25 * u;
|
|
508
475
|
}
|
|
509
476
|
return this._onChangeCallback(), this;
|
|
510
477
|
}
|
|
@@ -513,14 +480,14 @@ class Nt {
|
|
|
513
480
|
return s < Number.EPSILON ? (s = 0, Math.abs(t.x) > Math.abs(t.z) ? (this._x = -t.y, this._y = t.x, this._z = 0, this._w = s) : (this._x = 0, this._y = -t.z, this._z = t.y, this._w = s)) : (this._x = t.y * e.z - t.z * e.y, this._y = t.z * e.x - t.x * e.z, this._z = t.x * e.y - t.y * e.x, this._w = s), this.normalize();
|
|
514
481
|
}
|
|
515
482
|
angleTo(t) {
|
|
516
|
-
return 2 * Math.acos(Math.abs(
|
|
483
|
+
return 2 * Math.acos(Math.abs(N(this.dot(t), -1, 1)));
|
|
517
484
|
}
|
|
518
485
|
rotateTowards(t, e) {
|
|
519
486
|
const s = this.angleTo(t);
|
|
520
487
|
if (s === 0)
|
|
521
488
|
return this;
|
|
522
|
-
const
|
|
523
|
-
return this.slerp(t,
|
|
489
|
+
const n = Math.min(1, e / s);
|
|
490
|
+
return this.slerp(t, n), this;
|
|
524
491
|
}
|
|
525
492
|
identity() {
|
|
526
493
|
return this.set(0, 0, 0, 1);
|
|
@@ -551,36 +518,36 @@ class Nt {
|
|
|
551
518
|
return this.multiplyQuaternions(t, this);
|
|
552
519
|
}
|
|
553
520
|
multiplyQuaternions(t, e) {
|
|
554
|
-
const s = t._x,
|
|
555
|
-
return this._x = s *
|
|
521
|
+
const s = t._x, n = t._y, i = t._z, a = t._w, l = e._x, y = e._y, c = e._z, h = e._w;
|
|
522
|
+
return this._x = s * h + a * l + n * c - i * y, this._y = n * h + a * y + i * l - s * c, this._z = i * h + a * c + s * y - n * l, this._w = a * h - s * l - n * y - i * c, this._onChangeCallback(), this;
|
|
556
523
|
}
|
|
557
524
|
slerp(t, e) {
|
|
558
525
|
if (e === 0)
|
|
559
526
|
return this;
|
|
560
527
|
if (e === 1)
|
|
561
528
|
return this.copy(t);
|
|
562
|
-
const s = this._x,
|
|
563
|
-
let
|
|
564
|
-
if (
|
|
565
|
-
return this._w =
|
|
566
|
-
const y = 1 -
|
|
529
|
+
const s = this._x, n = this._y, i = this._z, a = this._w;
|
|
530
|
+
let l = a * t._w + s * t._x + n * t._y + i * t._z;
|
|
531
|
+
if (l < 0 ? (this._w = -t._w, this._x = -t._x, this._y = -t._y, this._z = -t._z, l = -l) : this.copy(t), l >= 1)
|
|
532
|
+
return this._w = a, this._x = s, this._y = n, this._z = i, this;
|
|
533
|
+
const y = 1 - l * l;
|
|
567
534
|
if (y <= Number.EPSILON) {
|
|
568
|
-
const
|
|
569
|
-
return this._w =
|
|
535
|
+
const u = 1 - e;
|
|
536
|
+
return this._w = u * a + e * this._w, this._x = u * s + e * this._x, this._y = u * n + e * this._y, this._z = u * i + e * this._z, this.normalize(), this._onChangeCallback(), this;
|
|
570
537
|
}
|
|
571
|
-
const
|
|
572
|
-
return this._w =
|
|
538
|
+
const c = Math.sqrt(y), h = Math.atan2(c, l), o = Math.sin((1 - e) * h) / c, _ = Math.sin(e * h) / c;
|
|
539
|
+
return this._w = a * o + this._w * _, this._x = s * o + this._x * _, this._y = n * o + this._y * _, this._z = i * o + this._z * _, this._onChangeCallback(), this;
|
|
573
540
|
}
|
|
574
541
|
slerpQuaternions(t, e, s) {
|
|
575
542
|
return this.copy(t).slerp(e, s);
|
|
576
543
|
}
|
|
577
544
|
random() {
|
|
578
|
-
const t = Math.random(), e = Math.sqrt(1 - t), s = Math.sqrt(t),
|
|
545
|
+
const t = Math.random(), e = Math.sqrt(1 - t), s = Math.sqrt(t), n = 2 * Math.PI * Math.random(), i = 2 * Math.PI * Math.random();
|
|
579
546
|
return this.set(
|
|
580
|
-
e * Math.cos(
|
|
581
|
-
s * Math.sin(
|
|
582
|
-
s * Math.cos(
|
|
583
|
-
e * Math.sin(
|
|
547
|
+
e * Math.cos(n),
|
|
548
|
+
s * Math.sin(i),
|
|
549
|
+
s * Math.cos(i),
|
|
550
|
+
e * Math.sin(n)
|
|
584
551
|
);
|
|
585
552
|
}
|
|
586
553
|
equals(t) {
|
|
@@ -607,9 +574,9 @@ class Nt {
|
|
|
607
574
|
yield this._x, yield this._y, yield this._z, yield this._w;
|
|
608
575
|
}
|
|
609
576
|
}
|
|
610
|
-
class
|
|
577
|
+
class $ {
|
|
611
578
|
constructor(t = 0, e = 0, s = 0) {
|
|
612
|
-
|
|
579
|
+
$.prototype.isVector3 = !0, this.x = t, this.y = e, this.z = s;
|
|
613
580
|
}
|
|
614
581
|
set(t, e, s) {
|
|
615
582
|
return s === void 0 && (s = this.z), this.x = t, this.y = e, this.z = s, this;
|
|
@@ -691,25 +658,25 @@ class I {
|
|
|
691
658
|
return this.x = t.x * e.x, this.y = t.y * e.y, this.z = t.z * e.z, this;
|
|
692
659
|
}
|
|
693
660
|
applyEuler(t) {
|
|
694
|
-
return this.applyQuaternion(
|
|
661
|
+
return this.applyQuaternion(K.setFromEuler(t));
|
|
695
662
|
}
|
|
696
663
|
applyAxisAngle(t, e) {
|
|
697
|
-
return this.applyQuaternion(
|
|
664
|
+
return this.applyQuaternion(K.setFromAxisAngle(t, e));
|
|
698
665
|
}
|
|
699
666
|
applyMatrix3(t) {
|
|
700
|
-
const e = this.x, s = this.y,
|
|
701
|
-
return this.x =
|
|
667
|
+
const e = this.x, s = this.y, n = this.z, i = t.elements;
|
|
668
|
+
return this.x = i[0] * e + i[3] * s + i[6] * n, this.y = i[1] * e + i[4] * s + i[7] * n, this.z = i[2] * e + i[5] * s + i[8] * n, this;
|
|
702
669
|
}
|
|
703
670
|
applyNormalMatrix(t) {
|
|
704
671
|
return this.applyMatrix3(t).normalize();
|
|
705
672
|
}
|
|
706
673
|
applyMatrix4(t) {
|
|
707
|
-
const e = this.x, s = this.y,
|
|
708
|
-
return this.x = (
|
|
674
|
+
const e = this.x, s = this.y, n = this.z, i = t.elements, a = 1 / (i[3] * e + i[7] * s + i[11] * n + i[15]);
|
|
675
|
+
return this.x = (i[0] * e + i[4] * s + i[8] * n + i[12]) * a, this.y = (i[1] * e + i[5] * s + i[9] * n + i[13]) * a, this.z = (i[2] * e + i[6] * s + i[10] * n + i[14]) * a, this;
|
|
709
676
|
}
|
|
710
677
|
applyQuaternion(t) {
|
|
711
|
-
const e = this.x, s = this.y,
|
|
712
|
-
return this.x =
|
|
678
|
+
const e = this.x, s = this.y, n = this.z, i = t.x, a = t.y, l = t.z, y = t.w, c = y * e + a * n - l * s, h = y * s + l * e - i * n, o = y * n + i * s - a * e, _ = -i * e - a * s - l * n;
|
|
679
|
+
return this.x = c * y + _ * -i + h * -l - o * -a, this.y = h * y + _ * -a + o * -i - c * -l, this.z = o * y + _ * -l + c * -a - h * -i, this;
|
|
713
680
|
}
|
|
714
681
|
project(t) {
|
|
715
682
|
return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix);
|
|
@@ -718,8 +685,8 @@ class I {
|
|
|
718
685
|
return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld);
|
|
719
686
|
}
|
|
720
687
|
transformDirection(t) {
|
|
721
|
-
const e = this.x, s = this.y,
|
|
722
|
-
return this.x =
|
|
688
|
+
const e = this.x, s = this.y, n = this.z, i = t.elements;
|
|
689
|
+
return this.x = i[0] * e + i[4] * s + i[8] * n, this.y = i[1] * e + i[5] * s + i[9] * n, this.z = i[2] * e + i[6] * s + i[10] * n, this.normalize();
|
|
723
690
|
}
|
|
724
691
|
divide(t) {
|
|
725
692
|
return this.x /= t.x, this.y /= t.y, this.z /= t.z, this;
|
|
@@ -787,8 +754,8 @@ class I {
|
|
|
787
754
|
return this.crossVectors(this, t);
|
|
788
755
|
}
|
|
789
756
|
crossVectors(t, e) {
|
|
790
|
-
const s = t.x,
|
|
791
|
-
return this.x =
|
|
757
|
+
const s = t.x, n = t.y, i = t.z, a = e.x, l = e.y, y = e.z;
|
|
758
|
+
return this.x = n * y - i * l, this.y = i * a - s * y, this.z = s * l - n * a, this;
|
|
792
759
|
}
|
|
793
760
|
projectOnVector(t) {
|
|
794
761
|
const e = t.lengthSq();
|
|
@@ -808,14 +775,14 @@ class I {
|
|
|
808
775
|
if (e === 0)
|
|
809
776
|
return Math.PI / 2;
|
|
810
777
|
const s = this.dot(t) / e;
|
|
811
|
-
return Math.acos(
|
|
778
|
+
return Math.acos(N(s, -1, 1));
|
|
812
779
|
}
|
|
813
780
|
distanceTo(t) {
|
|
814
781
|
return Math.sqrt(this.distanceToSquared(t));
|
|
815
782
|
}
|
|
816
783
|
distanceToSquared(t) {
|
|
817
|
-
const e = this.x - t.x, s = this.y - t.y,
|
|
818
|
-
return e * e + s * s +
|
|
784
|
+
const e = this.x - t.x, s = this.y - t.y, n = this.z - t.z;
|
|
785
|
+
return e * e + s * s + n * n;
|
|
819
786
|
}
|
|
820
787
|
manhattanDistanceTo(t) {
|
|
821
788
|
return Math.abs(this.x - t.x) + Math.abs(this.y - t.y) + Math.abs(this.z - t.z);
|
|
@@ -824,8 +791,8 @@ class I {
|
|
|
824
791
|
return this.setFromSphericalCoords(t.radius, t.phi, t.theta);
|
|
825
792
|
}
|
|
826
793
|
setFromSphericalCoords(t, e, s) {
|
|
827
|
-
const
|
|
828
|
-
return this.x =
|
|
794
|
+
const n = Math.sin(e) * t;
|
|
795
|
+
return this.x = n * Math.sin(s), this.y = Math.cos(e) * t, this.z = n * Math.cos(s), this;
|
|
829
796
|
}
|
|
830
797
|
setFromCylindrical(t) {
|
|
831
798
|
return this.setFromCylindricalCoords(t.radius, t.theta, t.y);
|
|
@@ -838,8 +805,8 @@ class I {
|
|
|
838
805
|
return this.x = e[12], this.y = e[13], this.z = e[14], this;
|
|
839
806
|
}
|
|
840
807
|
setFromMatrixScale(t) {
|
|
841
|
-
const e = this.setFromMatrixColumn(t, 0).length(), s = this.setFromMatrixColumn(t, 1).length(),
|
|
842
|
-
return this.x = e, this.y = s, this.z =
|
|
808
|
+
const e = this.setFromMatrixColumn(t, 0).length(), s = this.setFromMatrixColumn(t, 1).length(), n = this.setFromMatrixColumn(t, 2).length();
|
|
809
|
+
return this.x = e, this.y = s, this.z = n, this;
|
|
843
810
|
}
|
|
844
811
|
setFromMatrixColumn(t, e) {
|
|
845
812
|
return this.fromArray(t.elements, e * 4);
|
|
@@ -876,366 +843,460 @@ class I {
|
|
|
876
843
|
yield this.x, yield this.y, yield this.z;
|
|
877
844
|
}
|
|
878
845
|
}
|
|
879
|
-
const L = /* @__PURE__ */ new
|
|
846
|
+
const L = /* @__PURE__ */ new $(), K = /* @__PURE__ */ new Wt();
|
|
880
847
|
typeof __THREE_DEVTOOLS__ < "u" && __THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register", { detail: {
|
|
881
|
-
revision:
|
|
848
|
+
revision: lt
|
|
882
849
|
} }));
|
|
883
|
-
typeof window < "u" && (window.__THREE__ ? console.warn("WARNING: Multiple instances of Three.js being imported.") : window.__THREE__ =
|
|
884
|
-
const
|
|
850
|
+
typeof window < "u" && (window.__THREE__ ? console.warn("WARNING: Multiple instances of Three.js being imported.") : window.__THREE__ = lt);
|
|
851
|
+
const j = tt({
|
|
852
|
+
controls: []
|
|
853
|
+
});
|
|
854
|
+
function Zt() {
|
|
855
|
+
return j;
|
|
856
|
+
}
|
|
857
|
+
function X(r) {
|
|
858
|
+
return Object.entries(r).map(([t, e]) => {
|
|
859
|
+
let s = "string", n;
|
|
860
|
+
const i = /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$|^0x([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/;
|
|
861
|
+
return !V(e) && e.value || V(e) ? (s = typeof e.value, n = e.value) : (s = typeof e, n = e), s === "number" && (e.step || e.max || e.min) && (s = "range"), s === "string" && i.test(n) && (s = "color"), (n instanceof $ || n instanceof $ || n instanceof Array) && (s = "vector"), !V(e) && e.value ? {
|
|
862
|
+
...e,
|
|
863
|
+
label: e.label || t,
|
|
864
|
+
value: e.value,
|
|
865
|
+
type: s,
|
|
866
|
+
visible: !0
|
|
867
|
+
} : {
|
|
868
|
+
label: e.label || t,
|
|
869
|
+
value: e,
|
|
870
|
+
type: s,
|
|
871
|
+
visible: !0
|
|
872
|
+
};
|
|
873
|
+
});
|
|
874
|
+
}
|
|
875
|
+
function Bt() {
|
|
876
|
+
j.controls = [];
|
|
877
|
+
}
|
|
878
|
+
function He(r, t, e) {
|
|
879
|
+
let s = [];
|
|
880
|
+
if (typeof r == "string")
|
|
881
|
+
r === "fpsgraph" ? s.push({
|
|
882
|
+
label: "fpsgraph",
|
|
883
|
+
visible: !0,
|
|
884
|
+
type: "fpsgraph"
|
|
885
|
+
}) : s.push({
|
|
886
|
+
label: r,
|
|
887
|
+
visible: !0,
|
|
888
|
+
type: "folder",
|
|
889
|
+
controls: X(t)
|
|
890
|
+
});
|
|
891
|
+
else if (typeof r == "object" && typeof t == "string")
|
|
892
|
+
s.push({
|
|
893
|
+
...e,
|
|
894
|
+
label: t,
|
|
895
|
+
visible: !0,
|
|
896
|
+
value: r[t],
|
|
897
|
+
type: typeof r[t],
|
|
898
|
+
ref: r
|
|
899
|
+
});
|
|
900
|
+
else if (ft(r)) {
|
|
901
|
+
const n = gt(r);
|
|
902
|
+
s = X(n);
|
|
903
|
+
} else
|
|
904
|
+
s = X(r);
|
|
905
|
+
return j.controls = [...j.controls, ...s], mt(Bt), { state: j, controls: s };
|
|
906
|
+
}
|
|
907
|
+
const Ut = { class: "flex px-4 justify-between gap-4 items-center mb-2" }, Kt = { class: "text-gray-500 w-1/3" }, Gt = ["value", "min", "max", "step"], Jt = /* @__PURE__ */ v({
|
|
885
908
|
__name: "NumberControl",
|
|
886
909
|
props: {
|
|
887
|
-
label:
|
|
888
|
-
control:
|
|
910
|
+
label: {},
|
|
911
|
+
control: {}
|
|
889
912
|
},
|
|
890
913
|
emits: ["change"],
|
|
891
|
-
setup(
|
|
892
|
-
const e =
|
|
893
|
-
function s(
|
|
894
|
-
const { target:
|
|
895
|
-
t("change",
|
|
914
|
+
setup(r, { emit: t }) {
|
|
915
|
+
const e = r;
|
|
916
|
+
function s(h) {
|
|
917
|
+
const { target: o } = h;
|
|
918
|
+
t("change", o.valueAsNumber);
|
|
896
919
|
}
|
|
897
|
-
const
|
|
898
|
-
|
|
920
|
+
const n = Y(), i = g(0), a = g(!1), l = (h) => {
|
|
921
|
+
i.value = h.clientX, a.value = !0;
|
|
899
922
|
}, y = () => {
|
|
900
|
-
|
|
901
|
-
},
|
|
902
|
-
return
|
|
903
|
-
if (
|
|
904
|
-
const
|
|
905
|
-
|
|
923
|
+
a.value = !1;
|
|
924
|
+
}, c = (h) => Math.floor(Math.abs(h) / 10);
|
|
925
|
+
return I(n.x, (h) => {
|
|
926
|
+
if (a.value) {
|
|
927
|
+
const o = h - i.value, _ = c(o);
|
|
928
|
+
o > 0 ? t("change", e.control.value + 1 + _) : o < 0 && t("change", e.control.value - 1 + _), e.control.min !== void 0 && e.control.value < e.control.min && t("change", e.control.min), e.control.max !== void 0 && e.control.value > e.control.max && t("change", e.control.max), i.value = h;
|
|
906
929
|
}
|
|
907
|
-
}), (
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
value:
|
|
911
|
-
class:
|
|
930
|
+
}), (h, o) => (d(), b("div", Ut, [
|
|
931
|
+
p("label", Kt, C(h.label), 1),
|
|
932
|
+
p("input", {
|
|
933
|
+
value: h.control.value,
|
|
934
|
+
class: k(["p-2 w-1/3 rounded text-right text-xs text-gray-400 bg-gray-100 focus:border-gray-200 outline-none border-none font-sans", { "cursor-ew-resize": a.value }]),
|
|
912
935
|
type: "number",
|
|
913
|
-
min:
|
|
914
|
-
max:
|
|
915
|
-
step:
|
|
936
|
+
min: h.control.min,
|
|
937
|
+
max: h.control.max,
|
|
938
|
+
step: h.control.step,
|
|
916
939
|
onInput: s,
|
|
917
|
-
onMousedown:
|
|
940
|
+
onMousedown: l,
|
|
918
941
|
onMouseup: y
|
|
919
|
-
}, null, 42,
|
|
942
|
+
}, null, 42, Gt)
|
|
920
943
|
]));
|
|
921
944
|
}
|
|
922
|
-
}),
|
|
945
|
+
}), Ot = { class: "flex px-4 justify-between gap-4 items-center mb-2 min-h-32px" }, te = { class: "text-gray-500 w-1/3" }, ee = ["value"], se = /* @__PURE__ */ v({
|
|
923
946
|
__name: "TextControl",
|
|
924
947
|
props: {
|
|
925
|
-
label:
|
|
926
|
-
control:
|
|
948
|
+
label: {},
|
|
949
|
+
control: {}
|
|
927
950
|
},
|
|
928
951
|
emits: ["change"],
|
|
929
|
-
setup(
|
|
952
|
+
setup(r, { emit: t }) {
|
|
930
953
|
function e(s) {
|
|
931
954
|
t("change", s);
|
|
932
955
|
}
|
|
933
|
-
return (s,
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
value:
|
|
956
|
+
return (s, n) => (d(), b("div", Ot, [
|
|
957
|
+
p("label", te, C(s.label), 1),
|
|
958
|
+
p("input", {
|
|
959
|
+
value: s.control.value,
|
|
937
960
|
type: "string",
|
|
938
961
|
class: "p-2 w-2/3 rounded text-right text-xs text-gray-400 bg-gray-100 focus:border-gray-200 outline-none border-none font-sans",
|
|
939
962
|
onChange: e
|
|
940
|
-
}, null, 40,
|
|
963
|
+
}, null, 40, ee)
|
|
941
964
|
]));
|
|
942
965
|
}
|
|
943
|
-
}),
|
|
966
|
+
}), ne = { class: "flex px-4 justify-start gap-2 items-center mb-2 min-h-32px" }, ie = { class: "text-gray-500 w-1/3" }, re = ["id", "checked"], oe = ["for"], he = { class: "i-ic:baseline-check text-light" }, ae = /* @__PURE__ */ v({
|
|
944
967
|
__name: "BooleanControl",
|
|
945
968
|
props: {
|
|
946
|
-
label:
|
|
947
|
-
control:
|
|
969
|
+
label: {},
|
|
970
|
+
control: {}
|
|
948
971
|
},
|
|
949
972
|
emits: ["change"],
|
|
950
|
-
setup(
|
|
973
|
+
setup(r, { emit: t }) {
|
|
951
974
|
function e(s) {
|
|
952
|
-
const { target:
|
|
953
|
-
t("change",
|
|
975
|
+
const { target: n } = s;
|
|
976
|
+
t("change", n.checked);
|
|
954
977
|
}
|
|
955
|
-
return (s,
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
id:
|
|
959
|
-
checked:
|
|
978
|
+
return (s, n) => (d(), b("div", ne, [
|
|
979
|
+
p("label", ie, C(s.label), 1),
|
|
980
|
+
p("input", {
|
|
981
|
+
id: s.control.label,
|
|
982
|
+
checked: s.control.value,
|
|
960
983
|
class: "hidden",
|
|
961
984
|
type: "checkbox",
|
|
962
985
|
onInput: e
|
|
963
|
-
}, null, 40,
|
|
964
|
-
|
|
965
|
-
for:
|
|
986
|
+
}, null, 40, re),
|
|
987
|
+
p("label", {
|
|
988
|
+
for: s.control.label,
|
|
966
989
|
class: "inline-flex items-center cursor-pointer"
|
|
967
990
|
}, [
|
|
968
|
-
|
|
969
|
-
class:
|
|
991
|
+
p("span", {
|
|
992
|
+
class: k([{ "bg-dark-500": s.control.value, "bg-gray-200": !s.control.value }, "w-4 h-4 flex justify-center items-center rounded border border-gray-300 mr-2 transition-colors duration-200"])
|
|
970
993
|
}, [
|
|
971
|
-
|
|
972
|
-
[
|
|
994
|
+
et(p("i", he, null, 512), [
|
|
995
|
+
[st, s.control.value]
|
|
973
996
|
])
|
|
974
997
|
], 2)
|
|
975
|
-
], 8,
|
|
998
|
+
], 8, oe)
|
|
976
999
|
]));
|
|
977
1000
|
}
|
|
978
|
-
}),
|
|
1001
|
+
}), le = { class: "px-4 relative flex justify-between gap-4 items-center mb-2" }, ue = ["value", "min", "max", "step"], ce = ["value", "min", "max", "step"], ye = /* @__PURE__ */ v({
|
|
979
1002
|
__name: "SliderControl",
|
|
980
1003
|
props: {
|
|
981
|
-
label:
|
|
982
|
-
control:
|
|
1004
|
+
label: {},
|
|
1005
|
+
control: {}
|
|
983
1006
|
},
|
|
984
1007
|
emits: ["change"],
|
|
985
|
-
setup(
|
|
986
|
-
const e =
|
|
987
|
-
function s(
|
|
988
|
-
const { target:
|
|
989
|
-
t("change",
|
|
1008
|
+
setup(r, { emit: t }) {
|
|
1009
|
+
const e = r;
|
|
1010
|
+
function s(o) {
|
|
1011
|
+
const { target: _ } = o;
|
|
1012
|
+
t("change", _.valueAsNumber);
|
|
990
1013
|
}
|
|
991
|
-
const
|
|
1014
|
+
const n = E(() => ({
|
|
992
1015
|
backgroundImage: `linear-gradient(to right, #333 0% ${100 * (e.control.value - (e.control.min || 0)) / ((e.control.max || 100) - (e.control.min || 0))}%, #e2e2e2 0%)`
|
|
993
|
-
})),
|
|
994
|
-
|
|
995
|
-
},
|
|
996
|
-
|
|
997
|
-
},
|
|
998
|
-
return
|
|
999
|
-
if (
|
|
1000
|
-
const
|
|
1001
|
-
|
|
1016
|
+
})), i = Y(), a = g(0), l = g(!1), y = (o) => {
|
|
1017
|
+
a.value = o.clientX, l.value = !0;
|
|
1018
|
+
}, c = () => {
|
|
1019
|
+
l.value = !1;
|
|
1020
|
+
}, h = (o) => Math.floor(Math.abs(o) / 10);
|
|
1021
|
+
return I(i.x, (o) => {
|
|
1022
|
+
if (l.value) {
|
|
1023
|
+
const _ = o - a.value, u = h(_);
|
|
1024
|
+
_ > 0 ? t("change", e.control.value + 1 + u) : _ < 0 && t("change", e.control.value - 1 + u), e.control.min !== void 0 && e.control.value < e.control.min && t("change", e.control.min), e.control.max !== void 0 && e.control.value > e.control.max && t("change", e.control.max), a.value = o;
|
|
1002
1025
|
}
|
|
1003
|
-
}), (
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1026
|
+
}), (o, _) => (d(), b("div", le, [
|
|
1027
|
+
p("label", {
|
|
1028
|
+
class: k(["text-gray-500 w-1/3", { "flex justify-between items-center": o.control.icon }])
|
|
1029
|
+
}, [
|
|
1030
|
+
bt(C(o.label) + " ", 1),
|
|
1031
|
+
p("i", {
|
|
1032
|
+
class: k(`i-${o.control.icon}`)
|
|
1033
|
+
}, null, 2)
|
|
1034
|
+
], 2),
|
|
1035
|
+
p("input", {
|
|
1036
|
+
value: o.control.value,
|
|
1007
1037
|
class: "w-1/2 h-0.75 bg-dark-200 rounded-full appearance-none",
|
|
1008
|
-
style:
|
|
1038
|
+
style: zt(n.value),
|
|
1009
1039
|
type: "range",
|
|
1010
|
-
min:
|
|
1011
|
-
max:
|
|
1012
|
-
step:
|
|
1040
|
+
min: o.control.min,
|
|
1041
|
+
max: o.control.max,
|
|
1042
|
+
step: o.control.step,
|
|
1013
1043
|
onInput: s
|
|
1014
|
-
}, null, 44,
|
|
1015
|
-
|
|
1016
|
-
value:
|
|
1017
|
-
class:
|
|
1044
|
+
}, null, 44, ue),
|
|
1045
|
+
p("input", {
|
|
1046
|
+
value: o.control.value,
|
|
1047
|
+
class: k(["p-2 w-1/4 rounded text-right text-xs text-gray-400 bg-gray-100 focus:border-gray-200 outline-none border-none font-sans", { "cursor-ew-resize": l.value }]),
|
|
1018
1048
|
type: "number",
|
|
1019
|
-
min:
|
|
1020
|
-
max:
|
|
1021
|
-
step:
|
|
1049
|
+
min: o.control.min,
|
|
1050
|
+
max: o.control.max,
|
|
1051
|
+
step: o.control.step,
|
|
1022
1052
|
onInput: s,
|
|
1023
1053
|
onMousedown: y,
|
|
1024
|
-
onMouseup:
|
|
1025
|
-
}, null, 42,
|
|
1054
|
+
onMouseup: c
|
|
1055
|
+
}, null, 42, ce)
|
|
1026
1056
|
]));
|
|
1027
1057
|
}
|
|
1028
1058
|
});
|
|
1029
|
-
const
|
|
1030
|
-
const e =
|
|
1031
|
-
for (const [s,
|
|
1032
|
-
e[s] =
|
|
1059
|
+
const _e = (r, t) => {
|
|
1060
|
+
const e = r.__vccOpts || r;
|
|
1061
|
+
for (const [s, n] of t)
|
|
1062
|
+
e[s] = n;
|
|
1033
1063
|
return e;
|
|
1034
|
-
},
|
|
1064
|
+
}, xe = /* @__PURE__ */ _e(ye, [["__scopeId", "data-v-743fd350"]]), pe = { class: "flex px-4 justify-between gap-4 items-center mb-2" }, de = { class: "text-gray-500 w-1/3" }, fe = ["value"], ge = ["value"], me = /* @__PURE__ */ v({
|
|
1035
1065
|
__name: "ColorControl",
|
|
1036
1066
|
props: {
|
|
1037
|
-
label:
|
|
1038
|
-
control:
|
|
1067
|
+
label: {},
|
|
1068
|
+
control: {}
|
|
1039
1069
|
},
|
|
1040
1070
|
emits: ["change"],
|
|
1041
|
-
setup(
|
|
1071
|
+
setup(r, { emit: t }) {
|
|
1042
1072
|
function e(s) {
|
|
1043
|
-
const { target:
|
|
1044
|
-
t("change",
|
|
1073
|
+
const { target: n } = s;
|
|
1074
|
+
t("change", n.value);
|
|
1045
1075
|
}
|
|
1046
|
-
return (s,
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
value:
|
|
1076
|
+
return (s, n) => (d(), b("div", pe, [
|
|
1077
|
+
p("label", de, C(s.label), 1),
|
|
1078
|
+
p("input", {
|
|
1079
|
+
value: s.control.value,
|
|
1050
1080
|
type: "color",
|
|
1051
1081
|
onInput: e
|
|
1052
|
-
}, null, 40,
|
|
1053
|
-
|
|
1054
|
-
value:
|
|
1082
|
+
}, null, 40, fe),
|
|
1083
|
+
p("input", {
|
|
1084
|
+
value: s.control.value,
|
|
1055
1085
|
class: "p-2 w-2/3 rounded text-right text-xs text-gray-400 bg-gray-100 focus:border-gray-200 outline-none border-none font-sans",
|
|
1056
1086
|
type: "text",
|
|
1057
1087
|
onInput: e
|
|
1058
|
-
}, null, 40,
|
|
1088
|
+
}, null, 40, ge)
|
|
1059
1089
|
]));
|
|
1060
1090
|
}
|
|
1061
1091
|
});
|
|
1062
|
-
function
|
|
1063
|
-
return typeof
|
|
1092
|
+
function be(r) {
|
|
1093
|
+
return typeof r == "number" ? [r, r, r] : r instanceof $ ? [r.x, r.y, r.z] : r;
|
|
1064
1094
|
}
|
|
1065
|
-
const
|
|
1095
|
+
const ze = { class: "flex px-4 justify-between gap-2 items-center mb-2" }, Me = { class: "text-gray-500 w-1/3" }, we = { class: "w-2/3 flex justify-between gap-1" }, ve = {
|
|
1066
1096
|
key: 0,
|
|
1067
1097
|
class: "font-bold px-0.5 py-1 text-0.65rem text-gray-300"
|
|
1068
|
-
},
|
|
1098
|
+
}, Ce = ["value", "onInput", "onMousedown", "onMouseup"], Se = /* @__PURE__ */ v({
|
|
1069
1099
|
__name: "VectorControl",
|
|
1070
1100
|
props: {
|
|
1071
|
-
label:
|
|
1072
|
-
control:
|
|
1101
|
+
label: {},
|
|
1102
|
+
control: {}
|
|
1073
1103
|
},
|
|
1074
1104
|
emits: ["change"],
|
|
1075
|
-
setup(
|
|
1076
|
-
const e =
|
|
1077
|
-
|
|
1078
|
-
}, y = (
|
|
1079
|
-
|
|
1080
|
-
},
|
|
1081
|
-
function
|
|
1082
|
-
const { value:
|
|
1083
|
-
|
|
1105
|
+
setup(r, { emit: t }) {
|
|
1106
|
+
const e = r, s = Y(), n = g(0), i = g(!1), a = g(0), l = (x, m) => {
|
|
1107
|
+
a.value = m, n.value = x.clientX, i.value = !0;
|
|
1108
|
+
}, y = (x, m) => {
|
|
1109
|
+
a.value = m, i.value = !1;
|
|
1110
|
+
}, c = (x) => Math.floor(Math.abs(x) / 10), h = E(() => be(e.control.value)), o = E(() => Object.keys(e.control.value)), _ = E(() => e.control.value instanceof H || e.control.value instanceof $);
|
|
1111
|
+
function u(x, m) {
|
|
1112
|
+
const { value: z } = e.control, { target: f } = x;
|
|
1113
|
+
a.value = m, z[_.value ? o.value[a.value] : a.value] = parseInt(f.value, 10), t("change", z);
|
|
1084
1114
|
}
|
|
1085
|
-
return
|
|
1086
|
-
if (
|
|
1087
|
-
const
|
|
1088
|
-
|
|
1115
|
+
return I(s.x, (x) => {
|
|
1116
|
+
if (i.value) {
|
|
1117
|
+
const m = x - n.value, z = c(m), { value: f } = e.control, M = _.value ? o.value[a.value] : a.value;
|
|
1118
|
+
m > 0 ? f[M] += 1 + z : m < 0 && (f[M] -= 1 + z), e.control.min !== void 0 && f < e.control.min && (f[M] = e.control.min), e.control.max !== void 0 && f > e.control.max && (f[M] = e.control.max), t("change", f), n.value = x;
|
|
1089
1119
|
}
|
|
1090
|
-
}), (
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
(
|
|
1094
|
-
key:
|
|
1120
|
+
}), (x, m) => (d(), b("div", ze, [
|
|
1121
|
+
p("label", Me, C(x.label), 1),
|
|
1122
|
+
p("div", we, [
|
|
1123
|
+
(d(!0), b(D, null, R(h.value, (z, f) => (d(), b("div", {
|
|
1124
|
+
key: x.label + f,
|
|
1095
1125
|
class: "flex items-center w-1/3 bg-gray-100 rounded"
|
|
1096
1126
|
}, [
|
|
1097
|
-
|
|
1098
|
-
|
|
1127
|
+
o.value[f] && _.value ? (d(), b("span", ve, C(o.value[f]), 1)) : nt("", !0),
|
|
1128
|
+
p("input", {
|
|
1099
1129
|
type: "text",
|
|
1100
|
-
class:
|
|
1101
|
-
value:
|
|
1102
|
-
onInput: (M) =>
|
|
1103
|
-
onMousedown: (M) =>
|
|
1104
|
-
onMouseup: (M) => y(M,
|
|
1105
|
-
}, null, 42,
|
|
1130
|
+
class: k(["w-full pl-0 p-1 text-right text-0.65rem text-gray-400 bg-transparent focus:border-gray-200 outline-none border-none font-sans", { "cursor-ew-resize": i.value }]),
|
|
1131
|
+
value: h.value[f].toFixed(2),
|
|
1132
|
+
onInput: (M) => u(M, f),
|
|
1133
|
+
onMousedown: (M) => l(M, f),
|
|
1134
|
+
onMouseup: (M) => y(M, f)
|
|
1135
|
+
}, null, 42, Ce)
|
|
1106
1136
|
]))), 128))
|
|
1107
1137
|
])
|
|
1108
1138
|
]));
|
|
1109
1139
|
}
|
|
1110
|
-
}),
|
|
1140
|
+
}), ke = { class: "mb-4" }, $e = { class: "bg-white rounded-b pt-4" }, Ee = /* @__PURE__ */ v({
|
|
1111
1141
|
__name: "Folder",
|
|
1112
1142
|
props: {
|
|
1113
|
-
control:
|
|
1143
|
+
control: {}
|
|
1114
1144
|
},
|
|
1115
|
-
setup(
|
|
1116
|
-
function t(
|
|
1117
|
-
|
|
1145
|
+
setup(r) {
|
|
1146
|
+
function t(n, i) {
|
|
1147
|
+
i.value = n;
|
|
1118
1148
|
}
|
|
1119
|
-
const e =
|
|
1149
|
+
const e = g(!1), s = () => {
|
|
1120
1150
|
e.value = !e.value;
|
|
1121
1151
|
};
|
|
1122
|
-
return (
|
|
1123
|
-
|
|
1152
|
+
return (n, i) => (d(), b("div", ke, [
|
|
1153
|
+
p("button", {
|
|
1124
1154
|
class: "flex items-center justify-between w-full p-4 bg-gray-100 border-none text-gray-400 font-bold text-xs focus:outline-none font-sans cursor-pointer",
|
|
1125
1155
|
onClick: s
|
|
1126
1156
|
}, [
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
class:
|
|
1157
|
+
p("span", null, C(n.control.label), 1),
|
|
1158
|
+
p("i", {
|
|
1159
|
+
class: k(e.value ? "i-ic:baseline-keyboard-arrow-up" : "i-ic:baseline-keyboard-arrow-down")
|
|
1130
1160
|
}, null, 2)
|
|
1131
1161
|
]),
|
|
1132
|
-
|
|
1133
|
-
name: "
|
|
1134
|
-
"enter-active-class": "
|
|
1135
|
-
"leave-active-class": "
|
|
1162
|
+
Mt(wt, {
|
|
1163
|
+
name: "slide",
|
|
1164
|
+
"enter-active-class": " animate-fade-in animate-duration-200 animate-ease-in-out",
|
|
1165
|
+
"leave-active-class": " animate-fade-out animate-duration-200 animate-ease-in-out"
|
|
1136
1166
|
}, {
|
|
1137
|
-
default:
|
|
1138
|
-
|
|
1139
|
-
(
|
|
1140
|
-
key:
|
|
1141
|
-
control:
|
|
1142
|
-
onChange:
|
|
1143
|
-
}, null, 8, ["control"]))), 128))
|
|
1167
|
+
default: it(() => [
|
|
1168
|
+
et(p("div", $e, [
|
|
1169
|
+
(d(!0), b(D, null, R(n.control.controls, (a) => (d(), w(ut, {
|
|
1170
|
+
key: a.label,
|
|
1171
|
+
control: a,
|
|
1172
|
+
onChange: (l) => t(l, a)
|
|
1173
|
+
}, null, 8, ["control", "onChange"]))), 128))
|
|
1144
1174
|
], 512), [
|
|
1145
|
-
[
|
|
1175
|
+
[st, e.value]
|
|
1146
1176
|
])
|
|
1147
1177
|
]),
|
|
1148
1178
|
_: 1
|
|
1149
1179
|
})
|
|
1150
1180
|
]));
|
|
1151
1181
|
}
|
|
1152
|
-
}),
|
|
1182
|
+
}), Ie = { class: "flex px-4 justify-between gap-4 items-center mb-2" }, Ae = { class: "text-gray-500 w-1/3" }, Te = { class: "relative w-2/3 p-1 rounded text-right text-xs text-gray-400 bg-gray-100 focus:border-gray-200 outline-none border-none font-sans" }, je = { class: "absolute bottom-0.5 right-0.5 font-sans text-xs" }, qe = ["points"], G = 160, F = 40, A = 2, J = 100, O = 20, Pe = /* @__PURE__ */ v({
|
|
1183
|
+
__name: "FPSGraph",
|
|
1184
|
+
props: {
|
|
1185
|
+
label: {},
|
|
1186
|
+
control: {}
|
|
1187
|
+
},
|
|
1188
|
+
setup(r) {
|
|
1189
|
+
const t = kt({ every: J }), e = g(""), s = g([]), n = g(G / A);
|
|
1190
|
+
let i = performance.now();
|
|
1191
|
+
return $t(({ timestamp: a }) => {
|
|
1192
|
+
a - i >= J && (i = a, s.value.push(t.value), s.value.length > n.value && s.value.shift(), e.value = s.value.map(
|
|
1193
|
+
(l, y) => `${y * A},${F + O - A / 2 - l * (F + O - A) / 120}`
|
|
1194
|
+
).join(" "));
|
|
1195
|
+
}), (a, l) => (d(), b("div", Ie, [
|
|
1196
|
+
p("label", Ae, C(a.label), 1),
|
|
1197
|
+
p("div", Te, [
|
|
1198
|
+
p("div", je, C(Math.round(T(t))) + " FPS", 1),
|
|
1199
|
+
(d(), b("svg", {
|
|
1200
|
+
width: G,
|
|
1201
|
+
height: F,
|
|
1202
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1203
|
+
class: "bg-gray-100"
|
|
1204
|
+
}, [
|
|
1205
|
+
p("polyline", {
|
|
1206
|
+
points: e.value,
|
|
1207
|
+
fill: "none",
|
|
1208
|
+
stroke: "lightgray",
|
|
1209
|
+
"stroke-width": A,
|
|
1210
|
+
"stroke-linecap": "round",
|
|
1211
|
+
"stroke-linejoin": "round"
|
|
1212
|
+
}, null, 8, qe)
|
|
1213
|
+
]))
|
|
1214
|
+
])
|
|
1215
|
+
]));
|
|
1216
|
+
}
|
|
1217
|
+
}), ut = /* @__PURE__ */ v({
|
|
1153
1218
|
__name: "ControlInput",
|
|
1154
1219
|
props: {
|
|
1155
|
-
control:
|
|
1220
|
+
control: {}
|
|
1156
1221
|
},
|
|
1157
1222
|
emits: ["change"],
|
|
1158
|
-
setup(
|
|
1159
|
-
|
|
1160
|
-
(
|
|
1161
|
-
), i = S(() => {
|
|
1162
|
-
const h = /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$|^0x([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/;
|
|
1163
|
-
return e.control.type === "color" || h.test(e.control.value);
|
|
1164
|
-
}), r = S(
|
|
1165
|
-
() => e.control.value instanceof Array || e.control.value instanceof j || e.control.value instanceof I
|
|
1166
|
-
);
|
|
1167
|
-
function o(h) {
|
|
1168
|
-
t("change", h);
|
|
1223
|
+
setup(r, { emit: t }) {
|
|
1224
|
+
function e(s) {
|
|
1225
|
+
t("change", s);
|
|
1169
1226
|
}
|
|
1170
|
-
return (
|
|
1171
|
-
|
|
1227
|
+
return (s, n) => s.control.visible ? (d(), b(D, { key: 0 }, [
|
|
1228
|
+
s.control.type === "color" ? (d(), w(me, {
|
|
1172
1229
|
key: 0,
|
|
1173
|
-
label:
|
|
1174
|
-
control:
|
|
1175
|
-
onChange:
|
|
1176
|
-
}, null, 8, ["label", "control"])) :
|
|
1230
|
+
label: s.control.label,
|
|
1231
|
+
control: s.control,
|
|
1232
|
+
onChange: e
|
|
1233
|
+
}, null, 8, ["label", "control"])) : s.control.type === "vector" ? (d(), w(Se, {
|
|
1177
1234
|
key: 1,
|
|
1178
|
-
label:
|
|
1179
|
-
control:
|
|
1180
|
-
onChange:
|
|
1181
|
-
}, null, 8, ["label", "control"])) :
|
|
1235
|
+
label: s.control.label,
|
|
1236
|
+
control: s.control,
|
|
1237
|
+
onChange: e
|
|
1238
|
+
}, null, 8, ["label", "control"])) : s.control.type === "boolean" ? (d(), w(ae, {
|
|
1182
1239
|
key: 2,
|
|
1183
|
-
label:
|
|
1184
|
-
control:
|
|
1185
|
-
onChange:
|
|
1186
|
-
}, null, 8, ["label", "control"])) :
|
|
1240
|
+
label: s.control.label,
|
|
1241
|
+
control: s.control,
|
|
1242
|
+
onChange: e
|
|
1243
|
+
}, null, 8, ["label", "control"])) : s.control.type === "fpsgraph" ? (d(), w(Pe, {
|
|
1187
1244
|
key: 3,
|
|
1188
|
-
label:
|
|
1189
|
-
control:
|
|
1190
|
-
}, null, 8, ["label", "control"])) :
|
|
1245
|
+
label: s.control.label,
|
|
1246
|
+
control: s.control
|
|
1247
|
+
}, null, 8, ["label", "control"])) : s.control.type === "folder" ? (d(), w(Ee, {
|
|
1248
|
+
key: 4,
|
|
1249
|
+
label: s.control.label,
|
|
1250
|
+
control: s.control
|
|
1251
|
+
}, null, 8, ["label", "control"])) : s.control.type === "number" ? (d(), w(Jt, {
|
|
1191
1252
|
key: 5,
|
|
1192
|
-
label:
|
|
1193
|
-
control:
|
|
1194
|
-
onChange:
|
|
1195
|
-
}, null, 8, ["label", "control"])) : (
|
|
1253
|
+
label: s.control.label,
|
|
1254
|
+
control: s.control,
|
|
1255
|
+
onChange: e
|
|
1256
|
+
}, null, 8, ["label", "control"])) : s.control.type === "range" ? (d(), w(xe, {
|
|
1196
1257
|
key: 6,
|
|
1197
|
-
label:
|
|
1198
|
-
control:
|
|
1199
|
-
onChange:
|
|
1200
|
-
}, null, 8, ["label", "control"])) : (
|
|
1201
|
-
key:
|
|
1202
|
-
label:
|
|
1203
|
-
control:
|
|
1204
|
-
onChange:
|
|
1258
|
+
label: s.control.label,
|
|
1259
|
+
control: s.control,
|
|
1260
|
+
onChange: e
|
|
1261
|
+
}, null, 8, ["label", "control"])) : (d(), w(se, {
|
|
1262
|
+
key: 7,
|
|
1263
|
+
label: s.control.label,
|
|
1264
|
+
control: s.control,
|
|
1265
|
+
onChange: e
|
|
1205
1266
|
}, null, 8, ["label", "control"]))
|
|
1206
|
-
], 64)) :
|
|
1207
|
-
}
|
|
1208
|
-
}),
|
|
1209
|
-
/* @__PURE__ */
|
|
1210
|
-
/* @__PURE__ */
|
|
1211
|
-
/* @__PURE__ */
|
|
1212
|
-
], -1),
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
],
|
|
1267
|
+
], 64)) : nt("", !0);
|
|
1268
|
+
}
|
|
1269
|
+
}), De = { class: "bg-white shadow-xl rounded border-4 border-solid border-black" }, Ve = /* @__PURE__ */ p("i", { class: "h-4 w-4 p-1.5 flex items-center line-height-0 rounded-full bg-gray-100 text-xs" }, "🍰", -1), Le = /* @__PURE__ */ p("div", null, [
|
|
1270
|
+
/* @__PURE__ */ p("i", { class: "i-ic-baseline-drag-indicator" }),
|
|
1271
|
+
/* @__PURE__ */ p("i", { class: "i-ic-baseline-drag-indicator" }),
|
|
1272
|
+
/* @__PURE__ */ p("i", { class: "i-ic-baseline-drag-indicator" })
|
|
1273
|
+
], -1), Xe = /* @__PURE__ */ p("div", null, null, -1), Fe = [
|
|
1274
|
+
Ve,
|
|
1275
|
+
Le,
|
|
1276
|
+
Xe
|
|
1277
|
+
], Re = 280, Qe = /* @__PURE__ */ v({
|
|
1217
1278
|
__name: "TresLeches",
|
|
1218
|
-
setup(
|
|
1219
|
-
const { width: t } =
|
|
1220
|
-
function
|
|
1221
|
-
|
|
1279
|
+
setup(r) {
|
|
1280
|
+
const { width: t } = Et(), e = g(null), s = Zt();
|
|
1281
|
+
function n(i, a) {
|
|
1282
|
+
a.ref && (a.ref[a.label] = i), a.value = i;
|
|
1222
1283
|
}
|
|
1223
|
-
return (
|
|
1224
|
-
"initial-value": { x:
|
|
1284
|
+
return (i, a) => (d(), w(T(Yt), {
|
|
1285
|
+
"initial-value": { x: T(t) - Re - 20, y: 10 },
|
|
1225
1286
|
class: "fixed select-none z-24 w-280px font-sans text-xs",
|
|
1226
|
-
handle:
|
|
1287
|
+
handle: e.value
|
|
1227
1288
|
}, {
|
|
1228
|
-
default:
|
|
1229
|
-
|
|
1230
|
-
|
|
1289
|
+
default: it(() => [
|
|
1290
|
+
p("div", De, [
|
|
1291
|
+
p("header", {
|
|
1231
1292
|
ref_key: "handle",
|
|
1232
|
-
ref:
|
|
1293
|
+
ref: e,
|
|
1233
1294
|
class: "relative cursor-grabbing p-4 flex justify-between text-gray-200 relative"
|
|
1234
|
-
},
|
|
1235
|
-
(
|
|
1236
|
-
key:
|
|
1237
|
-
control:
|
|
1238
|
-
onChange: (
|
|
1295
|
+
}, Fe, 512),
|
|
1296
|
+
(d(!0), b(D, null, R(T(s).controls, (l) => (d(), w(ut, {
|
|
1297
|
+
key: l.label,
|
|
1298
|
+
control: l,
|
|
1299
|
+
onChange: (y) => n(y, l)
|
|
1239
1300
|
}, null, 8, ["control", "onChange"]))), 128))
|
|
1240
1301
|
])
|
|
1241
1302
|
]),
|
|
@@ -1244,6 +1305,6 @@ const _e = { class: "flex px-4 justify-between gap-2 items-center mb-2" }, de =
|
|
|
1244
1305
|
}
|
|
1245
1306
|
});
|
|
1246
1307
|
export {
|
|
1247
|
-
|
|
1248
|
-
|
|
1308
|
+
Qe as TresLeches,
|
|
1309
|
+
He as useControls
|
|
1249
1310
|
};
|