@openmockup-studio/player 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +43 -2
- package/dist/device-laptop-abUqnCPB.js +900 -0
- package/dist/device-monitor-DRfsMb1A.js +366 -0
- package/dist/device-phone-D__ngcPt.js +3218 -0
- package/dist/device-tablet-C89f1GUw.js +255 -0
- package/dist/device-watch-PwEcwA3q.js +274 -0
- package/dist/embed.iife.js +4759 -0
- package/dist/embed.js +103 -0
- package/dist/rolldown-runtime-CGnMp29N.js +10 -0
- package/dist/runtime-D-Di0bkW.js +1947 -0
- package/dist/three-o_76Nw0r.js +13763 -0
- package/package.json +70 -3
|
@@ -0,0 +1,3218 @@
|
|
|
1
|
+
import { t as e } from "./rolldown-runtime-CGnMp29N.js";
|
|
2
|
+
import { A as t, C as n, D as r, H as i, L as a, U as o, X as s, Y as c, c as l, f as u, k as d, l as f, m as p, n as m, p as h, s as g, v as _, x as v } from "./three-o_76Nw0r.js";
|
|
3
|
+
// ../devices/src/primitives/dispose.ts
|
|
4
|
+
function y(e) {
|
|
5
|
+
e.traverse((e) => {
|
|
6
|
+
if (!(e instanceof r)) return;
|
|
7
|
+
e.geometry.dispose();
|
|
8
|
+
let t = Array.isArray(e.material) ? e.material : [e.material];
|
|
9
|
+
for (let e of t) e.dispose();
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
// ../devices/src/primitives/logo.ts
|
|
13
|
+
var b = "M12.152 6.896c-.948 0-2.415-1.078-3.96-1.04-2.04.027-3.91 1.183-4.961 3.014-2.117 3.675-.546 9.103 1.519 12.09 1.013 1.454 2.208 3.09 3.792 3.039 1.52-.065 2.09-.987 3.935-.987 1.831 0 2.35.987 3.96.948 1.637-.026 2.676-1.48 3.676-2.948 1.156-1.688 1.636-3.325 1.662-3.415-.039-.013-3.182-1.221-3.22-4.857-.026-3.04 2.48-4.494 2.597-4.559-1.429-2.09-3.623-2.324-4.39-2.376-2-.156-3.675 1.09-4.61 1.09zM15.53 3.83c.843-1.012 1.4-2.427 1.245-3.83-1.207.052-2.662.805-3.532 1.818-.78.896-1.454 2.338-1.273 3.714 1.338.104 2.715-.688 3.559-1.701", x = null;
|
|
14
|
+
function S() {
|
|
15
|
+
if (!x) {
|
|
16
|
+
let e = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="${b}"/></svg>`, { paths: t } = new m().parse(e);
|
|
17
|
+
x = t.flatMap((e) => m.createShapes(e));
|
|
18
|
+
}
|
|
19
|
+
return x;
|
|
20
|
+
}
|
|
21
|
+
function C(e) {
|
|
22
|
+
let t = new o(S(), 12);
|
|
23
|
+
t.computeBoundingBox();
|
|
24
|
+
let n = t.boundingBox;
|
|
25
|
+
if (!n) return t;
|
|
26
|
+
let r = new s();
|
|
27
|
+
n.getSize(r);
|
|
28
|
+
let i = new s();
|
|
29
|
+
n.getCenter(i);
|
|
30
|
+
let a = e / r.y;
|
|
31
|
+
return t.translate(-i.x, -i.y, 0), t.scale(a, -a, 1), t.computeVertexNormals(), t;
|
|
32
|
+
}
|
|
33
|
+
// ../core/src/fit.ts
|
|
34
|
+
function ee(e, t, n = "cover", r = [.5, .5]) {
|
|
35
|
+
if (n === "stretch") return {
|
|
36
|
+
repeat: [1, 1],
|
|
37
|
+
offset: [0, 0]
|
|
38
|
+
};
|
|
39
|
+
let i = e > t;
|
|
40
|
+
if (n === "cover" ? i : !i) {
|
|
41
|
+
let n = t / e;
|
|
42
|
+
return {
|
|
43
|
+
repeat: [n, 1],
|
|
44
|
+
offset: [(1 - n) * r[0], 0]
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
let a = e / t;
|
|
48
|
+
return {
|
|
49
|
+
repeat: [1, a],
|
|
50
|
+
offset: [0, (1 - a) * r[1]]
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
function te(e) {
|
|
54
|
+
if (!e) return [.5, .5];
|
|
55
|
+
let t = (e) => Number.isFinite(e) ? Math.min(1, Math.max(0, e)) : .5;
|
|
56
|
+
return [t(e[0]), t(e[1])];
|
|
57
|
+
}
|
|
58
|
+
// ../core/src/ids.ts
|
|
59
|
+
function ne(e = "") {
|
|
60
|
+
let t = typeof crypto < "u" && "randomUUID" in crypto ? crypto.randomUUID() : `${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 10)}`;
|
|
61
|
+
return e ? `${e}_${t.slice(0, 8)}` : t;
|
|
62
|
+
}
|
|
63
|
+
// ../core/src/easing.ts
|
|
64
|
+
var re = 1.70158, ie = 2.70158, w = {
|
|
65
|
+
linear: (e) => e,
|
|
66
|
+
easeInQuad: (e) => e * e,
|
|
67
|
+
easeOutQuad: (e) => 1 - (1 - e) * (1 - e),
|
|
68
|
+
easeInOutQuad: (e) => e < .5 ? 2 * e * e : 1 - (-2 * e + 2) ** 2 / 2,
|
|
69
|
+
easeInOutCubic: (e) => e < .5 ? 4 * e * e * e : 1 - (-2 * e + 2) ** 3 / 2,
|
|
70
|
+
easeOutExpo: (e) => e >= 1 ? 1 : 1 - 2 ** (-10 * e),
|
|
71
|
+
easeOutBack: (e) => 1 + ie * (e - 1) ** 3 + re * (e - 1) ** 2,
|
|
72
|
+
easeInOutSine: (e) => -(Math.cos(Math.PI * e) - 1) / 2
|
|
73
|
+
};
|
|
74
|
+
Object.keys(w);
|
|
75
|
+
var ae = 11, T = 1 / 10, oe = (e, t) => 1 - 3 * t + 3 * e, se = (e, t) => 3 * t - 6 * e, ce = (e) => 3 * e, le = (e, t, n) => ((oe(t, n) * e + se(t, n)) * e + ce(t)) * e, ue = (e, t, n) => 3 * oe(t, n) * e * e + 2 * se(t, n) * e + ce(t);
|
|
76
|
+
function de(e, t, n, r) {
|
|
77
|
+
if (e === t && n === r) return w.linear;
|
|
78
|
+
let i = new Float64Array(ae);
|
|
79
|
+
for (let t = 0; t < ae; t++) i[t] = le(t * T, e, n);
|
|
80
|
+
let a = (t) => {
|
|
81
|
+
let r = 0, a = 1;
|
|
82
|
+
for (; a < 10 && (i[a] ?? 1) <= t; a++) r += T;
|
|
83
|
+
a--;
|
|
84
|
+
let o = i[a] ?? 0, s = i[a + 1] ?? 1, c = (t - o) / (s - o || 1), l = r + c * T, u = ue(l, e, n);
|
|
85
|
+
if (u >= .001) {
|
|
86
|
+
for (let r = 0; r < 4; r++) {
|
|
87
|
+
let r = ue(l, e, n);
|
|
88
|
+
if (r === 0) return l;
|
|
89
|
+
l -= (le(l, e, n) - t) / r;
|
|
90
|
+
}
|
|
91
|
+
return l;
|
|
92
|
+
}
|
|
93
|
+
if (u === 0) return l;
|
|
94
|
+
let d = r, f = r + T;
|
|
95
|
+
for (let r = 0; r < 10; r++) {
|
|
96
|
+
l = d + (f - d) / 2;
|
|
97
|
+
let r = le(l, e, n) - t;
|
|
98
|
+
if (Math.abs(r) < 1e-7) break;
|
|
99
|
+
r > 0 ? f = l : d = l;
|
|
100
|
+
}
|
|
101
|
+
return l;
|
|
102
|
+
};
|
|
103
|
+
return (e) => e <= 0 ? 0 : e >= 1 ? 1 : le(a(e), t, r);
|
|
104
|
+
}
|
|
105
|
+
var fe = /* @__PURE__ */ new Map();
|
|
106
|
+
function pe(e) {
|
|
107
|
+
if (typeof e == "string") return w[e] ?? w.linear;
|
|
108
|
+
let t = e.bezier.join(","), n = fe.get(t);
|
|
109
|
+
return n || (n = de(...e.bezier), fe.set(t, n)), n;
|
|
110
|
+
}
|
|
111
|
+
// ../core/src/timeline.ts
|
|
112
|
+
function me(e) {
|
|
113
|
+
return {
|
|
114
|
+
duration: e.duration,
|
|
115
|
+
fps: e.fps,
|
|
116
|
+
tracks: e.tracks.filter((e) => e.keys.length > 0).map(he)
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
function he(e) {
|
|
120
|
+
let t = [...e.keys].sort((e, t) => e.t - t.t);
|
|
121
|
+
return {
|
|
122
|
+
target: e.target,
|
|
123
|
+
type: e.type,
|
|
124
|
+
times: Float64Array.from(t, (e) => e.t),
|
|
125
|
+
values: t.map((e) => e.value),
|
|
126
|
+
easings: t.map((e) => pe(e.easing)),
|
|
127
|
+
holds: t.map((e) => e.interpolation === "hold")
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
function ge(e, t) {
|
|
131
|
+
let n = 0, r = e.length - 1;
|
|
132
|
+
if (t < (e[0] ?? 0)) return -1;
|
|
133
|
+
for (; n < r;) {
|
|
134
|
+
let i = n + r + 1 >> 1;
|
|
135
|
+
(e[i] ?? Infinity) <= t ? n = i : r = i - 1;
|
|
136
|
+
}
|
|
137
|
+
return n;
|
|
138
|
+
}
|
|
139
|
+
function _e(e, t) {
|
|
140
|
+
let { times: n, values: r } = e, i = n.length - 1, a = ge(n, t);
|
|
141
|
+
if (a < 0) return r[0];
|
|
142
|
+
if (a >= i) return r[i];
|
|
143
|
+
let o = r[a];
|
|
144
|
+
if (e.holds[a]) return o;
|
|
145
|
+
let s = r[a + 1], c = n[a] ?? 0, l = (n[a + 1] ?? c) - c;
|
|
146
|
+
return ye(o, s, l > 0 ? (e.easings[a] ?? ((e) => e))((t - c) / l) : 1, e.type);
|
|
147
|
+
}
|
|
148
|
+
function ve(e, t) {
|
|
149
|
+
let n = /* @__PURE__ */ new Map();
|
|
150
|
+
for (let r of e.tracks) n.set(r.target, { value: _e(r, t) });
|
|
151
|
+
return n;
|
|
152
|
+
}
|
|
153
|
+
function ye(e, t, n, r) {
|
|
154
|
+
return r === "number" && typeof e == "number" && typeof t == "number" ? e + (t - e) * n : r === "vec3" && Array.isArray(e) && Array.isArray(t) ? be(e, t, n) : r === "color" && typeof e == "string" && typeof t == "string" ? xe(e, t, n) : n < 1 ? e : t;
|
|
155
|
+
}
|
|
156
|
+
function be(e, t, n) {
|
|
157
|
+
return [
|
|
158
|
+
e[0] + (t[0] - e[0]) * n,
|
|
159
|
+
e[1] + (t[1] - e[1]) * n,
|
|
160
|
+
e[2] + (t[2] - e[2]) * n
|
|
161
|
+
];
|
|
162
|
+
}
|
|
163
|
+
function xe(e, t, n) {
|
|
164
|
+
let r = Se(e), i = Se(t);
|
|
165
|
+
if (!r || !i) return n < 1 ? e : t;
|
|
166
|
+
let a = (e) => Math.round((r[e] ?? 0) + ((i[e] ?? 0) - (r[e] ?? 0)) * n);
|
|
167
|
+
return `#${[
|
|
168
|
+
a(0),
|
|
169
|
+
a(1),
|
|
170
|
+
a(2)
|
|
171
|
+
].map((e) => e.toString(16).padStart(2, "0")).join("")}`;
|
|
172
|
+
}
|
|
173
|
+
function Se(e) {
|
|
174
|
+
let t = /^#?([0-9a-f]{6})$/i.exec(e.trim());
|
|
175
|
+
if (!t || !t[1]) return null;
|
|
176
|
+
let n = parseInt(t[1], 16);
|
|
177
|
+
return [
|
|
178
|
+
n >> 16 & 255,
|
|
179
|
+
n >> 8 & 255,
|
|
180
|
+
n & 255
|
|
181
|
+
];
|
|
182
|
+
}
|
|
183
|
+
// ../core/src/state.ts
|
|
184
|
+
var Ce = (e) => [
|
|
185
|
+
e[0],
|
|
186
|
+
e[1],
|
|
187
|
+
e[2]
|
|
188
|
+
];
|
|
189
|
+
function we(e, t) {
|
|
190
|
+
let { scene: n } = e, r = {};
|
|
191
|
+
for (let e of n.devices) r[e.id] = {
|
|
192
|
+
position: Ce(e.transform.position),
|
|
193
|
+
rotation: Ce(e.transform.rotation),
|
|
194
|
+
scale: e.transform.scale,
|
|
195
|
+
params: { ...e.params },
|
|
196
|
+
screenFinish: e.screenFinish,
|
|
197
|
+
glare: e.glare,
|
|
198
|
+
visible: !0
|
|
199
|
+
};
|
|
200
|
+
let i = {};
|
|
201
|
+
for (let e of n.screens) {
|
|
202
|
+
let n = e.video, r = 0;
|
|
203
|
+
if (n) {
|
|
204
|
+
r = Math.max(0, (t - n.start) * n.playbackRate);
|
|
205
|
+
let i = e.media && "duration" in e.media ? e.media.duration : void 0;
|
|
206
|
+
n.loop && i && i > 0 && (r %= i);
|
|
207
|
+
}
|
|
208
|
+
i[e.id] = {
|
|
209
|
+
mediaTime: r,
|
|
210
|
+
opacity: 1
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
return {
|
|
214
|
+
time: t,
|
|
215
|
+
camera: {
|
|
216
|
+
position: Ce(n.camera.position),
|
|
217
|
+
target: Ce(n.camera.target),
|
|
218
|
+
fov: n.camera.fov,
|
|
219
|
+
roll: n.camera.roll,
|
|
220
|
+
lens: { ...n.camera.lens }
|
|
221
|
+
},
|
|
222
|
+
devices: r,
|
|
223
|
+
screens: i,
|
|
224
|
+
environment: {
|
|
225
|
+
preset: n.environment.preset,
|
|
226
|
+
intensity: n.environment.intensity,
|
|
227
|
+
rotation: n.environment.rotation,
|
|
228
|
+
glow: n.environment.glow
|
|
229
|
+
},
|
|
230
|
+
backdrop: { ...n.backdrop },
|
|
231
|
+
floor: {
|
|
232
|
+
y: n.floor.mode === "fixed" ? n.floor.y ?? 0 : null,
|
|
233
|
+
shadow: n.floor.shadow
|
|
234
|
+
},
|
|
235
|
+
set: { ...n.set }
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
function Te(e, t) {
|
|
239
|
+
for (let [n, r] of t) {
|
|
240
|
+
let t = n.split("."), [i] = t;
|
|
241
|
+
if (i === "camera") E(e.camera, t.slice(1), r.value, r.add);
|
|
242
|
+
else if (i === "environment") E(e.environment, t.slice(1), r.value, r.add);
|
|
243
|
+
else if (i === "backdrop") E(e.backdrop, t.slice(1), r.value, r.add);
|
|
244
|
+
else if (i === "set") E(e.set, t.slice(1), r.value, r.add);
|
|
245
|
+
else if (i === "devices" || i === "screens") {
|
|
246
|
+
let n = t[1], a = i === "devices" ? e.devices : e.screens, o = n ? a[n] : void 0;
|
|
247
|
+
o && E(o, t.slice(2), r.value, r.add);
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
return e;
|
|
251
|
+
}
|
|
252
|
+
function E(e, t, n, r) {
|
|
253
|
+
let i = e;
|
|
254
|
+
for (let e = 0; e < t.length - 1; e++) {
|
|
255
|
+
let n = t[e];
|
|
256
|
+
if (!n) return;
|
|
257
|
+
let r = i[n];
|
|
258
|
+
typeof r == "object" && r || (r = {}, i[n] = r), i = r;
|
|
259
|
+
}
|
|
260
|
+
let a = t[t.length - 1];
|
|
261
|
+
if (!a) return;
|
|
262
|
+
let o = i[a];
|
|
263
|
+
r ? typeof o == "number" && typeof n == "number" ? i[a] = o + n : Array.isArray(o) && Array.isArray(n) && (i[a] = o.map((e, t) => typeof e == "number" ? e + (n[t] ?? 0) : e)) : i[a] = Array.isArray(n) ? [...n] : n;
|
|
264
|
+
}
|
|
265
|
+
function Ee(e, t, n = [], r = me(e.timeline)) {
|
|
266
|
+
let i = we(e, t);
|
|
267
|
+
Te(i, ve(r, t));
|
|
268
|
+
for (let e of n) Te(i, e);
|
|
269
|
+
return i;
|
|
270
|
+
}
|
|
271
|
+
// ../core/src/idle.ts
|
|
272
|
+
function De(e, t, n) {
|
|
273
|
+
let r = /* @__PURE__ */ new Map();
|
|
274
|
+
if (t <= 0) return r;
|
|
275
|
+
let i = Math.sin(e * .9) * .3 * t, a = Math.sin(e * .6) * 1.7 * t, o = Math.sin(e * .45 + 1) * 2.9 * t;
|
|
276
|
+
for (let e of n) r.set(`devices.${e}.position`, {
|
|
277
|
+
value: [
|
|
278
|
+
0,
|
|
279
|
+
i,
|
|
280
|
+
0
|
|
281
|
+
],
|
|
282
|
+
add: !0
|
|
283
|
+
}), r.set(`devices.${e}.rotation`, {
|
|
284
|
+
value: [
|
|
285
|
+
a,
|
|
286
|
+
o,
|
|
287
|
+
0
|
|
288
|
+
],
|
|
289
|
+
add: !0
|
|
290
|
+
});
|
|
291
|
+
return r;
|
|
292
|
+
}
|
|
293
|
+
// ../core/src/presets.ts
|
|
294
|
+
var Oe = /^devices\.\$(\d+)\./;
|
|
295
|
+
function ke(e, t, n) {
|
|
296
|
+
let r = new Set(n), i = e.timeline.tracks.filter((e) => {
|
|
297
|
+
let t = e.target.split(".")[1];
|
|
298
|
+
return !(e.target.startsWith("devices.") && t && r.has(t)) && !e.target.startsWith("camera.");
|
|
299
|
+
}), a = [];
|
|
300
|
+
for (let e of t.timeline.tracks) {
|
|
301
|
+
let t = Oe.exec(e.target), r = e.target;
|
|
302
|
+
if (t && t[1] !== void 0) {
|
|
303
|
+
let i = n[Number(t[1])];
|
|
304
|
+
if (!i) continue;
|
|
305
|
+
r = e.target.replace(Oe, `devices.${i}.`);
|
|
306
|
+
}
|
|
307
|
+
a.push({
|
|
308
|
+
...e,
|
|
309
|
+
id: ne("trk"),
|
|
310
|
+
target: r,
|
|
311
|
+
keys: e.keys.map((e) => ({ ...e }))
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
return {
|
|
315
|
+
...e,
|
|
316
|
+
scene: {
|
|
317
|
+
...e.scene,
|
|
318
|
+
camera: t.camera ? {
|
|
319
|
+
...e.scene.camera,
|
|
320
|
+
...t.camera
|
|
321
|
+
} : e.scene.camera
|
|
322
|
+
},
|
|
323
|
+
timeline: {
|
|
324
|
+
...e.timeline,
|
|
325
|
+
duration: t.timeline.duration,
|
|
326
|
+
tracks: [...i, ...a]
|
|
327
|
+
},
|
|
328
|
+
interaction: t.interaction ? {
|
|
329
|
+
...e.interaction,
|
|
330
|
+
...t.interaction
|
|
331
|
+
} : e.interaction
|
|
332
|
+
};
|
|
333
|
+
}
|
|
334
|
+
// ../../node_modules/.pnpm/valibot@1.5.0_typescript@5.9.3/node_modules/valibot/dist/index.mjs
|
|
335
|
+
var Ae = {
|
|
336
|
+
lang: void 0,
|
|
337
|
+
message: void 0,
|
|
338
|
+
abortEarly: void 0,
|
|
339
|
+
abortPipeEarly: void 0
|
|
340
|
+
};
|
|
341
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
342
|
+
function je(e) {
|
|
343
|
+
return e ? {
|
|
344
|
+
lang: e?.lang ?? void 0,
|
|
345
|
+
message: e?.message,
|
|
346
|
+
abortEarly: e?.abortEarly ?? void 0,
|
|
347
|
+
abortPipeEarly: e?.abortPipeEarly ?? void 0
|
|
348
|
+
} : Ae;
|
|
349
|
+
}
|
|
350
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
351
|
+
function D(e) {
|
|
352
|
+
let t = typeof e;
|
|
353
|
+
return t === "string" ? `"${e}"` : t === "number" || t === "bigint" || t === "boolean" ? `${e}` : t === "object" || t === "function" ? (e && Object.getPrototypeOf(e)?.constructor?.name) ?? "null" : t;
|
|
354
|
+
}
|
|
355
|
+
function O(e, t, n, r, i) {
|
|
356
|
+
let a = i && "input" in i ? i.input : n.value, o = i?.expected ?? e.expects ?? null, s = i?.received ?? /* @__PURE__ */ D(a), c = {
|
|
357
|
+
kind: e.kind,
|
|
358
|
+
type: e.type,
|
|
359
|
+
input: a,
|
|
360
|
+
expected: o,
|
|
361
|
+
received: s,
|
|
362
|
+
message: `Invalid ${t}: ${o ? `Expected ${o} but r` : "R"}eceived ${s}`,
|
|
363
|
+
requirement: e.requirement,
|
|
364
|
+
path: i?.path,
|
|
365
|
+
issues: i?.issues,
|
|
366
|
+
lang: r.lang,
|
|
367
|
+
abortEarly: r.abortEarly,
|
|
368
|
+
abortPipeEarly: r.abortPipeEarly
|
|
369
|
+
}, l = e.kind === "schema", u = i?.message ?? e.message ?? (e.reference, c.lang, void 0) ?? (l ? (c.lang, void 0) : null) ?? r.message ?? (c.lang, void 0);
|
|
370
|
+
u !== void 0 && (c.message = typeof u == "function" ? u(c) : u), l && (n.typed = !1), n.issues ? n.issues.push(c) : n.issues = [c];
|
|
371
|
+
}
|
|
372
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
373
|
+
function Me(e, t) {
|
|
374
|
+
return e === t || Number.isNaN(e) && Number.isNaN(t);
|
|
375
|
+
}
|
|
376
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
377
|
+
function Ne(e, t) {
|
|
378
|
+
return Object.prototype.hasOwnProperty.call(e, t) && t !== "__proto__" && t !== "prototype" && t !== "constructor";
|
|
379
|
+
}
|
|
380
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
381
|
+
function Pe(e, t) {
|
|
382
|
+
let n = [...new Set(e)];
|
|
383
|
+
return n.length > 1 ? `(${n.join(` ${t} `)})` : n[0] ?? "never";
|
|
384
|
+
}
|
|
385
|
+
function k(e) {
|
|
386
|
+
return e["~standard"] = {
|
|
387
|
+
version: 1,
|
|
388
|
+
vendor: "valibot",
|
|
389
|
+
validate: (t) => e["~run"]({ value: t }, /* @__PURE__ */ je())
|
|
390
|
+
}, e;
|
|
391
|
+
}
|
|
392
|
+
var Fe = class extends Error {
|
|
393
|
+
constructor(e) {
|
|
394
|
+
super(e[0].message), this.name = "ValiError", this.issues = e;
|
|
395
|
+
}
|
|
396
|
+
};
|
|
397
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
398
|
+
function Ie(e, t) {
|
|
399
|
+
return {
|
|
400
|
+
kind: "validation",
|
|
401
|
+
type: "max_value",
|
|
402
|
+
reference: Ie,
|
|
403
|
+
async: !1,
|
|
404
|
+
expects: `<=${e instanceof Date ? e.toJSON() : /* @__PURE__ */ D(e)}`,
|
|
405
|
+
requirement: e,
|
|
406
|
+
message: t,
|
|
407
|
+
"~run"(e, t) {
|
|
408
|
+
return e.typed && !(e.value <= this.requirement) && O(this, "value", e, t, { received: e.value instanceof Date ? e.value.toJSON() : /* @__PURE__ */ D(e.value) }), e;
|
|
409
|
+
}
|
|
410
|
+
};
|
|
411
|
+
}
|
|
412
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
413
|
+
function Le(e, t) {
|
|
414
|
+
return {
|
|
415
|
+
kind: "validation",
|
|
416
|
+
type: "min_value",
|
|
417
|
+
reference: Le,
|
|
418
|
+
async: !1,
|
|
419
|
+
expects: `>=${e instanceof Date ? e.toJSON() : /* @__PURE__ */ D(e)}`,
|
|
420
|
+
requirement: e,
|
|
421
|
+
message: t,
|
|
422
|
+
"~run"(e, t) {
|
|
423
|
+
return e.typed && !(e.value >= this.requirement) && O(this, "value", e, t, { received: e.value instanceof Date ? e.value.toJSON() : /* @__PURE__ */ D(e.value) }), e;
|
|
424
|
+
}
|
|
425
|
+
};
|
|
426
|
+
}
|
|
427
|
+
var Re = { abortEarly: !0 };
|
|
428
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
429
|
+
function ze(e, t, n) {
|
|
430
|
+
return typeof e.fallback == "function" ? e.fallback(t, n) : e.fallback;
|
|
431
|
+
}
|
|
432
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
433
|
+
function A(e, t, n) {
|
|
434
|
+
return typeof e.default == "function" ? e.default(t, n) : e.default;
|
|
435
|
+
}
|
|
436
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
437
|
+
function j(e, t) {
|
|
438
|
+
return k({
|
|
439
|
+
kind: "schema",
|
|
440
|
+
type: "array",
|
|
441
|
+
reference: j,
|
|
442
|
+
expects: "Array",
|
|
443
|
+
async: !1,
|
|
444
|
+
item: e,
|
|
445
|
+
message: t,
|
|
446
|
+
"~run"(e, t) {
|
|
447
|
+
let n = e.value;
|
|
448
|
+
if (Array.isArray(n)) {
|
|
449
|
+
e.typed = !0, e.value = [];
|
|
450
|
+
for (let r = 0; r < n.length; r++) {
|
|
451
|
+
let i = n[r], a = this.item["~run"]({ value: i }, t);
|
|
452
|
+
if (a.issues) {
|
|
453
|
+
let o = {
|
|
454
|
+
type: "array",
|
|
455
|
+
origin: "value",
|
|
456
|
+
input: n,
|
|
457
|
+
key: r,
|
|
458
|
+
value: i
|
|
459
|
+
};
|
|
460
|
+
for (let t of a.issues) t.path ? t.path.unshift(o) : t.path = [o], e.issues?.push(t);
|
|
461
|
+
if (e.issues ||= a.issues, t.abortEarly) {
|
|
462
|
+
e.typed = !1;
|
|
463
|
+
break;
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
a.typed || (e.typed = !1), e.value.push(a.value);
|
|
467
|
+
}
|
|
468
|
+
} else O(this, "type", e, t);
|
|
469
|
+
return e;
|
|
470
|
+
}
|
|
471
|
+
});
|
|
472
|
+
}
|
|
473
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
474
|
+
function M(e) {
|
|
475
|
+
return k({
|
|
476
|
+
kind: "schema",
|
|
477
|
+
type: "boolean",
|
|
478
|
+
reference: M,
|
|
479
|
+
expects: "boolean",
|
|
480
|
+
async: !1,
|
|
481
|
+
message: e,
|
|
482
|
+
"~run"(e, t) {
|
|
483
|
+
return typeof e.value == "boolean" ? e.typed = !0 : O(this, "type", e, t), e;
|
|
484
|
+
}
|
|
485
|
+
});
|
|
486
|
+
}
|
|
487
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
488
|
+
function N(e, t) {
|
|
489
|
+
return k({
|
|
490
|
+
kind: "schema",
|
|
491
|
+
type: "literal",
|
|
492
|
+
reference: N,
|
|
493
|
+
expects: /* @__PURE__ */ D(e),
|
|
494
|
+
async: !1,
|
|
495
|
+
literal: e,
|
|
496
|
+
message: t,
|
|
497
|
+
"~run"(e, t) {
|
|
498
|
+
return /* @__PURE__ */ Me(e.value, this.literal) ? e.typed = !0 : O(this, "type", e, t), e;
|
|
499
|
+
}
|
|
500
|
+
});
|
|
501
|
+
}
|
|
502
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
503
|
+
function P(e, t) {
|
|
504
|
+
return k({
|
|
505
|
+
kind: "schema",
|
|
506
|
+
type: "loose_object",
|
|
507
|
+
reference: P,
|
|
508
|
+
expects: "Object",
|
|
509
|
+
async: !1,
|
|
510
|
+
entries: e,
|
|
511
|
+
message: t,
|
|
512
|
+
"~run"(e, t) {
|
|
513
|
+
let n = e.value;
|
|
514
|
+
if (n && typeof n == "object") {
|
|
515
|
+
e.typed = !0, e.value = {};
|
|
516
|
+
for (let r in this.entries) {
|
|
517
|
+
let i = this.entries[r];
|
|
518
|
+
if (r in n || (i.type === "exact_optional" || i.type === "optional" || i.type === "nullish") && i.default !== void 0) {
|
|
519
|
+
let a = r in n ? n[r] : /* @__PURE__ */ A(i), o = i["~run"]({ value: a }, t);
|
|
520
|
+
if (o.issues) {
|
|
521
|
+
let i = {
|
|
522
|
+
type: "object",
|
|
523
|
+
origin: "value",
|
|
524
|
+
input: n,
|
|
525
|
+
key: r,
|
|
526
|
+
value: a
|
|
527
|
+
};
|
|
528
|
+
for (let t of o.issues) t.path ? t.path.unshift(i) : t.path = [i], e.issues?.push(t);
|
|
529
|
+
if (e.issues ||= o.issues, t.abortEarly) {
|
|
530
|
+
e.typed = !1;
|
|
531
|
+
break;
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
o.typed || (e.typed = !1), e.value[r] = o.value;
|
|
535
|
+
} else if (i.fallback !== void 0) e.value[r] = /* @__PURE__ */ ze(i);
|
|
536
|
+
else if (i.type !== "exact_optional" && i.type !== "optional" && i.type !== "nullish" && (O(this, "key", e, t, {
|
|
537
|
+
input: void 0,
|
|
538
|
+
expected: `"${r}"`,
|
|
539
|
+
path: [{
|
|
540
|
+
type: "object",
|
|
541
|
+
origin: "key",
|
|
542
|
+
input: n,
|
|
543
|
+
key: r,
|
|
544
|
+
value: n[r]
|
|
545
|
+
}]
|
|
546
|
+
}), t.abortEarly)) break;
|
|
547
|
+
}
|
|
548
|
+
if (!e.issues || !t.abortEarly) for (let t in n) /* @__PURE__ */ Ne(n, t) && !Object.prototype.hasOwnProperty.call(this.entries, t) && (e.value[t] = n[t]);
|
|
549
|
+
} else O(this, "type", e, t);
|
|
550
|
+
return e;
|
|
551
|
+
}
|
|
552
|
+
});
|
|
553
|
+
}
|
|
554
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
555
|
+
function Be(e, t) {
|
|
556
|
+
return k({
|
|
557
|
+
kind: "schema",
|
|
558
|
+
type: "nullable",
|
|
559
|
+
reference: Be,
|
|
560
|
+
expects: `(${e.expects} | null)`,
|
|
561
|
+
async: !1,
|
|
562
|
+
wrapped: e,
|
|
563
|
+
default: t,
|
|
564
|
+
"~run"(e, t) {
|
|
565
|
+
return e.value === null && (this.default !== void 0 && (e.value = /* @__PURE__ */ A(this, e, t)), e.value === null) ? (e.typed = !0, e) : this.wrapped["~run"](e, t);
|
|
566
|
+
}
|
|
567
|
+
});
|
|
568
|
+
}
|
|
569
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
570
|
+
function F(e) {
|
|
571
|
+
return k({
|
|
572
|
+
kind: "schema",
|
|
573
|
+
type: "number",
|
|
574
|
+
reference: F,
|
|
575
|
+
expects: "number",
|
|
576
|
+
async: !1,
|
|
577
|
+
message: e,
|
|
578
|
+
"~run"(e, t) {
|
|
579
|
+
return typeof e.value == "number" && !isNaN(e.value) ? e.typed = !0 : O(this, "type", e, t), e;
|
|
580
|
+
}
|
|
581
|
+
});
|
|
582
|
+
}
|
|
583
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
584
|
+
function I(e, t) {
|
|
585
|
+
return k({
|
|
586
|
+
kind: "schema",
|
|
587
|
+
type: "object",
|
|
588
|
+
reference: I,
|
|
589
|
+
expects: "Object",
|
|
590
|
+
async: !1,
|
|
591
|
+
entries: e,
|
|
592
|
+
message: t,
|
|
593
|
+
"~run"(e, t) {
|
|
594
|
+
let n = e.value;
|
|
595
|
+
if (n && typeof n == "object") {
|
|
596
|
+
e.typed = !0, e.value = {};
|
|
597
|
+
for (let r in this.entries) {
|
|
598
|
+
let i = this.entries[r];
|
|
599
|
+
if (r in n || (i.type === "exact_optional" || i.type === "optional" || i.type === "nullish") && i.default !== void 0) {
|
|
600
|
+
let a = r in n ? n[r] : /* @__PURE__ */ A(i), o = i["~run"]({ value: a }, t);
|
|
601
|
+
if (o.issues) {
|
|
602
|
+
let i = {
|
|
603
|
+
type: "object",
|
|
604
|
+
origin: "value",
|
|
605
|
+
input: n,
|
|
606
|
+
key: r,
|
|
607
|
+
value: a
|
|
608
|
+
};
|
|
609
|
+
for (let t of o.issues) t.path ? t.path.unshift(i) : t.path = [i], e.issues?.push(t);
|
|
610
|
+
if (e.issues ||= o.issues, t.abortEarly) {
|
|
611
|
+
e.typed = !1;
|
|
612
|
+
break;
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
o.typed || (e.typed = !1), e.value[r] = o.value;
|
|
616
|
+
} else if (i.fallback !== void 0) e.value[r] = /* @__PURE__ */ ze(i);
|
|
617
|
+
else if (i.type !== "exact_optional" && i.type !== "optional" && i.type !== "nullish" && (O(this, "key", e, t, {
|
|
618
|
+
input: void 0,
|
|
619
|
+
expected: `"${r}"`,
|
|
620
|
+
path: [{
|
|
621
|
+
type: "object",
|
|
622
|
+
origin: "key",
|
|
623
|
+
input: n,
|
|
624
|
+
key: r,
|
|
625
|
+
value: n[r]
|
|
626
|
+
}]
|
|
627
|
+
}), t.abortEarly)) break;
|
|
628
|
+
}
|
|
629
|
+
} else O(this, "type", e, t);
|
|
630
|
+
return e;
|
|
631
|
+
}
|
|
632
|
+
});
|
|
633
|
+
}
|
|
634
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
635
|
+
function L(e, t) {
|
|
636
|
+
return k({
|
|
637
|
+
kind: "schema",
|
|
638
|
+
type: "optional",
|
|
639
|
+
reference: L,
|
|
640
|
+
expects: `(${e.expects} | undefined)`,
|
|
641
|
+
async: !1,
|
|
642
|
+
wrapped: e,
|
|
643
|
+
default: t,
|
|
644
|
+
"~run"(e, t) {
|
|
645
|
+
return e.value === void 0 && (this.default !== void 0 && (e.value = /* @__PURE__ */ A(this, e, t)), e.value === void 0) ? (e.typed = !0, e) : this.wrapped["~run"](e, t);
|
|
646
|
+
}
|
|
647
|
+
});
|
|
648
|
+
}
|
|
649
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
650
|
+
function R(e, t) {
|
|
651
|
+
return k({
|
|
652
|
+
kind: "schema",
|
|
653
|
+
type: "picklist",
|
|
654
|
+
reference: R,
|
|
655
|
+
expects: /* @__PURE__ */ Pe(e.map(D), "|"),
|
|
656
|
+
async: !1,
|
|
657
|
+
options: e,
|
|
658
|
+
message: t,
|
|
659
|
+
"~run"(e, t) {
|
|
660
|
+
return this.options.includes(e.value) ? e.typed = !0 : O(this, "type", e, t), e;
|
|
661
|
+
}
|
|
662
|
+
});
|
|
663
|
+
}
|
|
664
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
665
|
+
function Ve(e, t, n) {
|
|
666
|
+
return k({
|
|
667
|
+
kind: "schema",
|
|
668
|
+
type: "record",
|
|
669
|
+
reference: Ve,
|
|
670
|
+
expects: "Object",
|
|
671
|
+
async: !1,
|
|
672
|
+
key: e,
|
|
673
|
+
value: t,
|
|
674
|
+
message: n,
|
|
675
|
+
"~run"(e, t) {
|
|
676
|
+
let n = e.value;
|
|
677
|
+
if (n && typeof n == "object") {
|
|
678
|
+
e.typed = !0, e.value = {};
|
|
679
|
+
for (let r in n) if (/* @__PURE__ */ Ne(n, r)) {
|
|
680
|
+
let i = n[r], a = this.key["~run"]({ value: r }, t);
|
|
681
|
+
if (a.issues) {
|
|
682
|
+
let o = {
|
|
683
|
+
type: "object",
|
|
684
|
+
origin: "key",
|
|
685
|
+
input: n,
|
|
686
|
+
key: r,
|
|
687
|
+
value: i
|
|
688
|
+
};
|
|
689
|
+
for (let t of a.issues) t.path = [o], e.issues?.push(t);
|
|
690
|
+
if (e.issues ||= a.issues, t.abortEarly) {
|
|
691
|
+
e.typed = !1;
|
|
692
|
+
break;
|
|
693
|
+
}
|
|
694
|
+
}
|
|
695
|
+
let o = this.value["~run"]({ value: i }, t);
|
|
696
|
+
if (o.issues) {
|
|
697
|
+
let a = {
|
|
698
|
+
type: "object",
|
|
699
|
+
origin: "value",
|
|
700
|
+
input: n,
|
|
701
|
+
key: r,
|
|
702
|
+
value: i
|
|
703
|
+
};
|
|
704
|
+
for (let t of o.issues) t.path ? t.path.unshift(a) : t.path = [a], e.issues?.push(t);
|
|
705
|
+
if (e.issues ||= o.issues, t.abortEarly) {
|
|
706
|
+
e.typed = !1;
|
|
707
|
+
break;
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
a.typed && o.typed || (e.typed = !1), a.typed && (e.value[a.value] = o.value);
|
|
711
|
+
}
|
|
712
|
+
} else O(this, "type", e, t);
|
|
713
|
+
return e;
|
|
714
|
+
}
|
|
715
|
+
});
|
|
716
|
+
}
|
|
717
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
718
|
+
function z(e) {
|
|
719
|
+
return k({
|
|
720
|
+
kind: "schema",
|
|
721
|
+
type: "string",
|
|
722
|
+
reference: z,
|
|
723
|
+
expects: "string",
|
|
724
|
+
async: !1,
|
|
725
|
+
message: e,
|
|
726
|
+
"~run"(e, t) {
|
|
727
|
+
return typeof e.value == "string" ? e.typed = !0 : O(this, "type", e, t), e;
|
|
728
|
+
}
|
|
729
|
+
});
|
|
730
|
+
}
|
|
731
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
732
|
+
function B(e, t) {
|
|
733
|
+
return k({
|
|
734
|
+
kind: "schema",
|
|
735
|
+
type: "tuple",
|
|
736
|
+
reference: B,
|
|
737
|
+
expects: "Array",
|
|
738
|
+
async: !1,
|
|
739
|
+
items: e,
|
|
740
|
+
message: t,
|
|
741
|
+
"~run"(e, t) {
|
|
742
|
+
let n = e.value;
|
|
743
|
+
if (Array.isArray(n)) {
|
|
744
|
+
e.typed = !0, e.value = [];
|
|
745
|
+
for (let r = 0; r < this.items.length; r++) {
|
|
746
|
+
let i = n[r], a = this.items[r]["~run"]({ value: i }, t);
|
|
747
|
+
if (a.issues) {
|
|
748
|
+
let o = {
|
|
749
|
+
type: "array",
|
|
750
|
+
origin: "value",
|
|
751
|
+
input: n,
|
|
752
|
+
key: r,
|
|
753
|
+
value: i
|
|
754
|
+
};
|
|
755
|
+
for (let t of a.issues) t.path ? t.path.unshift(o) : t.path = [o], e.issues?.push(t);
|
|
756
|
+
if (e.issues ||= a.issues, t.abortEarly) {
|
|
757
|
+
e.typed = !1;
|
|
758
|
+
break;
|
|
759
|
+
}
|
|
760
|
+
}
|
|
761
|
+
a.typed || (e.typed = !1), e.value.push(a.value);
|
|
762
|
+
}
|
|
763
|
+
} else O(this, "type", e, t);
|
|
764
|
+
return e;
|
|
765
|
+
}
|
|
766
|
+
});
|
|
767
|
+
}
|
|
768
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
769
|
+
function He(e) {
|
|
770
|
+
let t;
|
|
771
|
+
if (e) for (let n of e) if (t) for (let e of n.issues) t.push(e);
|
|
772
|
+
else t = n.issues;
|
|
773
|
+
return t;
|
|
774
|
+
}
|
|
775
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
776
|
+
function V(e, t) {
|
|
777
|
+
return k({
|
|
778
|
+
kind: "schema",
|
|
779
|
+
type: "union",
|
|
780
|
+
reference: V,
|
|
781
|
+
expects: /* @__PURE__ */ Pe(e.map((e) => e.expects), "|"),
|
|
782
|
+
async: !1,
|
|
783
|
+
options: e,
|
|
784
|
+
message: t,
|
|
785
|
+
"~run"(e, t) {
|
|
786
|
+
let n, r, i;
|
|
787
|
+
for (let a of this.options) {
|
|
788
|
+
let o = a["~run"]({ value: e.value }, t);
|
|
789
|
+
if (o.typed) {
|
|
790
|
+
if (o.issues) r ? r.push(o) : r = [o];
|
|
791
|
+
else {
|
|
792
|
+
n = o;
|
|
793
|
+
break;
|
|
794
|
+
}
|
|
795
|
+
} else i ? i.push(o) : i = [o];
|
|
796
|
+
}
|
|
797
|
+
if (n) return n;
|
|
798
|
+
if (r) {
|
|
799
|
+
if (r.length === 1) return r[0];
|
|
800
|
+
O(this, "type", e, t, { issues: /* @__PURE__ */ He(r) }), e.typed = !0;
|
|
801
|
+
} else if (i?.length === 1) return i[0];
|
|
802
|
+
else O(this, "type", e, t, { issues: /* @__PURE__ */ He(i) });
|
|
803
|
+
return e;
|
|
804
|
+
}
|
|
805
|
+
});
|
|
806
|
+
}
|
|
807
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
808
|
+
function Ue() {
|
|
809
|
+
return k({
|
|
810
|
+
kind: "schema",
|
|
811
|
+
type: "unknown",
|
|
812
|
+
reference: Ue,
|
|
813
|
+
expects: "unknown",
|
|
814
|
+
async: !1,
|
|
815
|
+
"~run"(e) {
|
|
816
|
+
return e.typed = !0, e;
|
|
817
|
+
}
|
|
818
|
+
});
|
|
819
|
+
}
|
|
820
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
821
|
+
function We(e, t, n) {
|
|
822
|
+
return k({
|
|
823
|
+
kind: "schema",
|
|
824
|
+
type: "variant",
|
|
825
|
+
reference: We,
|
|
826
|
+
expects: "Object",
|
|
827
|
+
async: !1,
|
|
828
|
+
key: e,
|
|
829
|
+
options: t,
|
|
830
|
+
message: n,
|
|
831
|
+
"~run"(e, t) {
|
|
832
|
+
let n = e.value;
|
|
833
|
+
if (n && typeof n == "object") {
|
|
834
|
+
let r, i = 0, a = this.key, o = [], s = (e, c) => {
|
|
835
|
+
for (let l of e.options) {
|
|
836
|
+
if (l.type === "variant") s(l, new Set(c).add(l.key));
|
|
837
|
+
else {
|
|
838
|
+
let e = !0, s = 0;
|
|
839
|
+
for (let t of c) {
|
|
840
|
+
let r = l.entries[t];
|
|
841
|
+
if (t in n ? r["~run"]({
|
|
842
|
+
typed: !1,
|
|
843
|
+
value: n[t]
|
|
844
|
+
}, Re).issues : r.type !== "exact_optional" && r.type !== "optional" && r.type !== "nullish") {
|
|
845
|
+
e = !1, a !== t && (i < s || i === s && t in n && !(a in n)) && (i = s, a = t, o = []), a === t && o.push(l.entries[t].expects);
|
|
846
|
+
break;
|
|
847
|
+
}
|
|
848
|
+
s++;
|
|
849
|
+
}
|
|
850
|
+
if (e) {
|
|
851
|
+
let e = l["~run"]({ value: n }, t);
|
|
852
|
+
(!r || !r.typed && e.typed) && (r = e);
|
|
853
|
+
}
|
|
854
|
+
}
|
|
855
|
+
if (r && !r.issues) break;
|
|
856
|
+
}
|
|
857
|
+
};
|
|
858
|
+
if (s(this, /* @__PURE__ */ new Set([this.key])), r) return r;
|
|
859
|
+
O(this, "type", e, t, {
|
|
860
|
+
input: n[a],
|
|
861
|
+
expected: /* @__PURE__ */ Pe(o, "|"),
|
|
862
|
+
path: [{
|
|
863
|
+
type: "object",
|
|
864
|
+
origin: "value",
|
|
865
|
+
input: n,
|
|
866
|
+
key: a,
|
|
867
|
+
value: n[a]
|
|
868
|
+
}]
|
|
869
|
+
});
|
|
870
|
+
} else O(this, "type", e, t);
|
|
871
|
+
return e;
|
|
872
|
+
}
|
|
873
|
+
});
|
|
874
|
+
}
|
|
875
|
+
function H(e, t, n) {
|
|
876
|
+
let r = e["~run"]({ value: t }, /* @__PURE__ */ je(n));
|
|
877
|
+
if (r.issues) throw new Fe(r.issues);
|
|
878
|
+
return r.value;
|
|
879
|
+
}
|
|
880
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
881
|
+
function Ge(...e) {
|
|
882
|
+
return k({
|
|
883
|
+
...e[0],
|
|
884
|
+
pipe: e,
|
|
885
|
+
"~run"(t, n) {
|
|
886
|
+
for (let r of e) if (r.kind !== "metadata") {
|
|
887
|
+
if (t.issues && (r.kind === "schema" || r.kind === "transformation")) {
|
|
888
|
+
t.typed = !1;
|
|
889
|
+
break;
|
|
890
|
+
}
|
|
891
|
+
t.issues && (n.abortEarly || n.abortPipeEarly) || (t = r["~run"](t, n));
|
|
892
|
+
}
|
|
893
|
+
return t;
|
|
894
|
+
}
|
|
895
|
+
});
|
|
896
|
+
}
|
|
897
|
+
// ../core/src/schema.ts
|
|
898
|
+
var Ke = /* @__PURE__ */ B([/* @__PURE__ */ F(), /* @__PURE__ */ F()]), U = /* @__PURE__ */ B([
|
|
899
|
+
/* @__PURE__ */ F(),
|
|
900
|
+
/* @__PURE__ */ F(),
|
|
901
|
+
/* @__PURE__ */ F()
|
|
902
|
+
]), qe = /* @__PURE__ */ Ge(/* @__PURE__ */ F(), /* @__PURE__ */ Le(0), /* @__PURE__ */ Ie(1)), Je = /* @__PURE__ */ I({
|
|
903
|
+
label: /* @__PURE__ */ z(),
|
|
904
|
+
frame: /* @__PURE__ */ z(),
|
|
905
|
+
back: /* @__PURE__ */ z(),
|
|
906
|
+
frameRoughness: qe,
|
|
907
|
+
backMaterial: /* @__PURE__ */ L(/* @__PURE__ */ R([
|
|
908
|
+
"glass",
|
|
909
|
+
"metal",
|
|
910
|
+
"ceramic"
|
|
911
|
+
])),
|
|
912
|
+
accent: /* @__PURE__ */ L(/* @__PURE__ */ z())
|
|
913
|
+
}), Ye = /* @__PURE__ */ We("source", [
|
|
914
|
+
/* @__PURE__ */ I({
|
|
915
|
+
kind: /* @__PURE__ */ R(["image", "video"]),
|
|
916
|
+
source: /* @__PURE__ */ N("idb"),
|
|
917
|
+
id: /* @__PURE__ */ z(),
|
|
918
|
+
hash: /* @__PURE__ */ z(),
|
|
919
|
+
mime: /* @__PURE__ */ z(),
|
|
920
|
+
width: /* @__PURE__ */ F(),
|
|
921
|
+
height: /* @__PURE__ */ F(),
|
|
922
|
+
duration: /* @__PURE__ */ L(/* @__PURE__ */ F())
|
|
923
|
+
}),
|
|
924
|
+
/* @__PURE__ */ I({
|
|
925
|
+
kind: /* @__PURE__ */ R(["image", "video"]),
|
|
926
|
+
source: /* @__PURE__ */ N("url"),
|
|
927
|
+
url: /* @__PURE__ */ z(),
|
|
928
|
+
width: /* @__PURE__ */ L(/* @__PURE__ */ F()),
|
|
929
|
+
height: /* @__PURE__ */ L(/* @__PURE__ */ F()),
|
|
930
|
+
duration: /* @__PURE__ */ L(/* @__PURE__ */ F())
|
|
931
|
+
}),
|
|
932
|
+
/* @__PURE__ */ I({
|
|
933
|
+
kind: /* @__PURE__ */ N("image"),
|
|
934
|
+
source: /* @__PURE__ */ N("data"),
|
|
935
|
+
dataUrl: /* @__PURE__ */ z(),
|
|
936
|
+
width: /* @__PURE__ */ F(),
|
|
937
|
+
height: /* @__PURE__ */ F()
|
|
938
|
+
})
|
|
939
|
+
]), Xe = /* @__PURE__ */ P({
|
|
940
|
+
id: /* @__PURE__ */ z(),
|
|
941
|
+
type: /* @__PURE__ */ R([
|
|
942
|
+
"phone",
|
|
943
|
+
"tablet",
|
|
944
|
+
"laptop",
|
|
945
|
+
"monitor",
|
|
946
|
+
"watch"
|
|
947
|
+
]),
|
|
948
|
+
spec: /* @__PURE__ */ z(),
|
|
949
|
+
finish: /* @__PURE__ */ V([/* @__PURE__ */ z(), Je]),
|
|
950
|
+
params: /* @__PURE__ */ L(/* @__PURE__ */ Ve(/* @__PURE__ */ z(), /* @__PURE__ */ F()), () => ({})),
|
|
951
|
+
transform: /* @__PURE__ */ L(/* @__PURE__ */ I({
|
|
952
|
+
position: /* @__PURE__ */ L(U, () => [
|
|
953
|
+
0,
|
|
954
|
+
0,
|
|
955
|
+
0
|
|
956
|
+
]),
|
|
957
|
+
rotation: /* @__PURE__ */ L(U, () => [
|
|
958
|
+
0,
|
|
959
|
+
0,
|
|
960
|
+
0
|
|
961
|
+
]),
|
|
962
|
+
scale: /* @__PURE__ */ L(/* @__PURE__ */ F(), 1)
|
|
963
|
+
}), () => ({
|
|
964
|
+
position: [
|
|
965
|
+
0,
|
|
966
|
+
0,
|
|
967
|
+
0
|
|
968
|
+
],
|
|
969
|
+
rotation: [
|
|
970
|
+
0,
|
|
971
|
+
0,
|
|
972
|
+
0
|
|
973
|
+
],
|
|
974
|
+
scale: 1
|
|
975
|
+
})),
|
|
976
|
+
screenFinish: /* @__PURE__ */ L(/* @__PURE__ */ R([
|
|
977
|
+
"clean",
|
|
978
|
+
"glossy",
|
|
979
|
+
"matte"
|
|
980
|
+
]), "matte"),
|
|
981
|
+
glare: /* @__PURE__ */ L(qe, 1),
|
|
982
|
+
screens: /* @__PURE__ */ L(/* @__PURE__ */ j(/* @__PURE__ */ z()), () => [])
|
|
983
|
+
}), Ze = /* @__PURE__ */ P({
|
|
984
|
+
id: /* @__PURE__ */ z(),
|
|
985
|
+
media: /* @__PURE__ */ L(/* @__PURE__ */ Be(Ye), null),
|
|
986
|
+
fit: /* @__PURE__ */ L(/* @__PURE__ */ R([
|
|
987
|
+
"cover",
|
|
988
|
+
"contain",
|
|
989
|
+
"stretch"
|
|
990
|
+
]), "cover"),
|
|
991
|
+
offset: /* @__PURE__ */ L(Ke),
|
|
992
|
+
video: /* @__PURE__ */ L(/* @__PURE__ */ I({
|
|
993
|
+
start: /* @__PURE__ */ L(/* @__PURE__ */ F(), 0),
|
|
994
|
+
loop: /* @__PURE__ */ L(/* @__PURE__ */ M(), !0),
|
|
995
|
+
muted: /* @__PURE__ */ L(/* @__PURE__ */ N(!0), !0),
|
|
996
|
+
playbackRate: /* @__PURE__ */ L(/* @__PURE__ */ F(), 1)
|
|
997
|
+
})),
|
|
998
|
+
poster: /* @__PURE__ */ L(/* @__PURE__ */ z())
|
|
999
|
+
}), Qe = /* @__PURE__ */ I({
|
|
1000
|
+
fisheye: /* @__PURE__ */ L(/* @__PURE__ */ F(), 0),
|
|
1001
|
+
chromatic: /* @__PURE__ */ L(/* @__PURE__ */ F(), 0),
|
|
1002
|
+
vignette: /* @__PURE__ */ L(/* @__PURE__ */ F(), 0),
|
|
1003
|
+
bloom: /* @__PURE__ */ L(/* @__PURE__ */ F(), 0),
|
|
1004
|
+
grain: /* @__PURE__ */ L(/* @__PURE__ */ F(), 0),
|
|
1005
|
+
blur: /* @__PURE__ */ L(/* @__PURE__ */ F(), 0),
|
|
1006
|
+
focus: /* @__PURE__ */ L(/* @__PURE__ */ F(), 0),
|
|
1007
|
+
fade: /* @__PURE__ */ L(/* @__PURE__ */ F(), 0)
|
|
1008
|
+
}), $e = /* @__PURE__ */ P({
|
|
1009
|
+
position: /* @__PURE__ */ L(U, () => [
|
|
1010
|
+
0,
|
|
1011
|
+
1.5,
|
|
1012
|
+
48
|
|
1013
|
+
]),
|
|
1014
|
+
target: /* @__PURE__ */ L(U, () => [
|
|
1015
|
+
0,
|
|
1016
|
+
0,
|
|
1017
|
+
0
|
|
1018
|
+
]),
|
|
1019
|
+
fov: /* @__PURE__ */ L(/* @__PURE__ */ F(), 28),
|
|
1020
|
+
roll: /* @__PURE__ */ L(/* @__PURE__ */ F(), 0),
|
|
1021
|
+
lens: /* @__PURE__ */ L(Qe, () => H(Qe, {}))
|
|
1022
|
+
}), et = /* @__PURE__ */ P({
|
|
1023
|
+
preset: /* @__PURE__ */ L(/* @__PURE__ */ R([
|
|
1024
|
+
"studio",
|
|
1025
|
+
"soft",
|
|
1026
|
+
"contrast",
|
|
1027
|
+
"night"
|
|
1028
|
+
]), "studio"),
|
|
1029
|
+
intensity: /* @__PURE__ */ L(/* @__PURE__ */ F(), 1),
|
|
1030
|
+
rotation: /* @__PURE__ */ L(/* @__PURE__ */ F(), 0),
|
|
1031
|
+
glow: /* @__PURE__ */ L(/* @__PURE__ */ F(), 0)
|
|
1032
|
+
}), tt = /* @__PURE__ */ P({
|
|
1033
|
+
kind: /* @__PURE__ */ L(/* @__PURE__ */ R([
|
|
1034
|
+
"none",
|
|
1035
|
+
"crevice",
|
|
1036
|
+
"block"
|
|
1037
|
+
]), "none"),
|
|
1038
|
+
seed: /* @__PURE__ */ L(/* @__PURE__ */ F(), 1),
|
|
1039
|
+
color: /* @__PURE__ */ L(/* @__PURE__ */ z(), "#3a3b40")
|
|
1040
|
+
}), nt = /* @__PURE__ */ P({
|
|
1041
|
+
kind: /* @__PURE__ */ L(/* @__PURE__ */ R([
|
|
1042
|
+
"transparent",
|
|
1043
|
+
"solid",
|
|
1044
|
+
"gradient",
|
|
1045
|
+
"image"
|
|
1046
|
+
]), "gradient"),
|
|
1047
|
+
color: /* @__PURE__ */ L(/* @__PURE__ */ z()),
|
|
1048
|
+
inner: /* @__PURE__ */ L(/* @__PURE__ */ z()),
|
|
1049
|
+
outer: /* @__PURE__ */ L(/* @__PURE__ */ z()),
|
|
1050
|
+
angle: /* @__PURE__ */ L(/* @__PURE__ */ F()),
|
|
1051
|
+
image: /* @__PURE__ */ L(Ye),
|
|
1052
|
+
tone: /* @__PURE__ */ L(/* @__PURE__ */ R(["light", "dark"]), "light")
|
|
1053
|
+
}), rt = /* @__PURE__ */ P({
|
|
1054
|
+
mode: /* @__PURE__ */ L(/* @__PURE__ */ R(["auto", "fixed"]), "auto"),
|
|
1055
|
+
y: /* @__PURE__ */ L(/* @__PURE__ */ F()),
|
|
1056
|
+
shadow: /* @__PURE__ */ L(qe, .22)
|
|
1057
|
+
}), it = /* @__PURE__ */ P({
|
|
1058
|
+
duration: /* @__PURE__ */ L(/* @__PURE__ */ Ge(/* @__PURE__ */ F(), /* @__PURE__ */ Le(.1)), 4),
|
|
1059
|
+
fps: /* @__PURE__ */ L(/* @__PURE__ */ F(), 30),
|
|
1060
|
+
tracks: /* @__PURE__ */ L(/* @__PURE__ */ j(/* @__PURE__ */ P({
|
|
1061
|
+
id: /* @__PURE__ */ z(),
|
|
1062
|
+
target: /* @__PURE__ */ z(),
|
|
1063
|
+
type: /* @__PURE__ */ R([
|
|
1064
|
+
"number",
|
|
1065
|
+
"vec3",
|
|
1066
|
+
"color"
|
|
1067
|
+
]),
|
|
1068
|
+
keys: /* @__PURE__ */ L(/* @__PURE__ */ j(/* @__PURE__ */ I({
|
|
1069
|
+
id: /* @__PURE__ */ L(/* @__PURE__ */ z()),
|
|
1070
|
+
t: /* @__PURE__ */ F(),
|
|
1071
|
+
value: /* @__PURE__ */ V([
|
|
1072
|
+
/* @__PURE__ */ F(),
|
|
1073
|
+
U,
|
|
1074
|
+
/* @__PURE__ */ z()
|
|
1075
|
+
]),
|
|
1076
|
+
easing: /* @__PURE__ */ L(/* @__PURE__ */ V([/* @__PURE__ */ R([
|
|
1077
|
+
"linear",
|
|
1078
|
+
"easeInQuad",
|
|
1079
|
+
"easeOutQuad",
|
|
1080
|
+
"easeInOutQuad",
|
|
1081
|
+
"easeInOutCubic",
|
|
1082
|
+
"easeOutExpo",
|
|
1083
|
+
"easeOutBack",
|
|
1084
|
+
"easeInOutSine"
|
|
1085
|
+
]), /* @__PURE__ */ I({ bezier: /* @__PURE__ */ B([
|
|
1086
|
+
/* @__PURE__ */ F(),
|
|
1087
|
+
/* @__PURE__ */ F(),
|
|
1088
|
+
/* @__PURE__ */ F(),
|
|
1089
|
+
/* @__PURE__ */ F()
|
|
1090
|
+
]) })]), "easeInOutCubic"),
|
|
1091
|
+
interpolation: /* @__PURE__ */ L(/* @__PURE__ */ R(["smooth", "hold"]))
|
|
1092
|
+
})), () => [])
|
|
1093
|
+
})), () => []),
|
|
1094
|
+
markers: /* @__PURE__ */ L(/* @__PURE__ */ j(/* @__PURE__ */ I({
|
|
1095
|
+
t: /* @__PURE__ */ F(),
|
|
1096
|
+
label: /* @__PURE__ */ z()
|
|
1097
|
+
})))
|
|
1098
|
+
}), at = /* @__PURE__ */ P({
|
|
1099
|
+
trigger: /* @__PURE__ */ L(/* @__PURE__ */ R([
|
|
1100
|
+
"none",
|
|
1101
|
+
"load",
|
|
1102
|
+
"click",
|
|
1103
|
+
"hover",
|
|
1104
|
+
"scroll",
|
|
1105
|
+
"in-view",
|
|
1106
|
+
"cursor-move"
|
|
1107
|
+
]), "load"),
|
|
1108
|
+
loop: /* @__PURE__ */ L(/* @__PURE__ */ R([
|
|
1109
|
+
"none",
|
|
1110
|
+
"loop",
|
|
1111
|
+
"pingpong"
|
|
1112
|
+
]), "loop"),
|
|
1113
|
+
delay: /* @__PURE__ */ L(/* @__PURE__ */ F(), 0),
|
|
1114
|
+
speed: /* @__PURE__ */ L(/* @__PURE__ */ F(), 1),
|
|
1115
|
+
scroll: /* @__PURE__ */ L(/* @__PURE__ */ I({
|
|
1116
|
+
start: /* @__PURE__ */ L(/* @__PURE__ */ R(["enter", "top"]), "enter"),
|
|
1117
|
+
end: /* @__PURE__ */ L(/* @__PURE__ */ R(["leave", "bottom"]), "leave"),
|
|
1118
|
+
smoothing: /* @__PURE__ */ L(/* @__PURE__ */ F(), 6)
|
|
1119
|
+
})),
|
|
1120
|
+
hover: /* @__PURE__ */ L(/* @__PURE__ */ I({ reverseOnLeave: /* @__PURE__ */ L(/* @__PURE__ */ M(), !0) })),
|
|
1121
|
+
cursor: /* @__PURE__ */ L(/* @__PURE__ */ I({
|
|
1122
|
+
mode: /* @__PURE__ */ L(/* @__PURE__ */ R(["device", "camera"]), "device"),
|
|
1123
|
+
follow: /* @__PURE__ */ L(/* @__PURE__ */ F(), 0),
|
|
1124
|
+
zoom: /* @__PURE__ */ L(/* @__PURE__ */ F(), 0),
|
|
1125
|
+
dolly: /* @__PURE__ */ L(/* @__PURE__ */ F(), 0),
|
|
1126
|
+
shake: /* @__PURE__ */ L(/* @__PURE__ */ F(), 0),
|
|
1127
|
+
smoothing: /* @__PURE__ */ L(/* @__PURE__ */ F(), 5)
|
|
1128
|
+
}), () => ({
|
|
1129
|
+
mode: "device",
|
|
1130
|
+
follow: 0,
|
|
1131
|
+
zoom: 0,
|
|
1132
|
+
dolly: 0,
|
|
1133
|
+
shake: 0,
|
|
1134
|
+
smoothing: 5
|
|
1135
|
+
})),
|
|
1136
|
+
idle: /* @__PURE__ */ L(/* @__PURE__ */ I({ float: /* @__PURE__ */ L(/* @__PURE__ */ F(), 1) }), () => ({ float: 1 }))
|
|
1137
|
+
}), ot = /* @__PURE__ */ P({
|
|
1138
|
+
width: /* @__PURE__ */ L(/* @__PURE__ */ F(), 1920),
|
|
1139
|
+
height: /* @__PURE__ */ L(/* @__PURE__ */ F(), 1080),
|
|
1140
|
+
fps: /* @__PURE__ */ L(/* @__PURE__ */ R([
|
|
1141
|
+
24,
|
|
1142
|
+
30,
|
|
1143
|
+
60
|
|
1144
|
+
]), 30),
|
|
1145
|
+
range: /* @__PURE__ */ L(/* @__PURE__ */ B([/* @__PURE__ */ F(), /* @__PURE__ */ F()]), () => [0, 4]),
|
|
1146
|
+
format: /* @__PURE__ */ L(/* @__PURE__ */ R([
|
|
1147
|
+
"png",
|
|
1148
|
+
"mp4",
|
|
1149
|
+
"webm",
|
|
1150
|
+
"webm-alpha",
|
|
1151
|
+
"png-sequence"
|
|
1152
|
+
]), "mp4"),
|
|
1153
|
+
codec: /* @__PURE__ */ L(/* @__PURE__ */ R([
|
|
1154
|
+
"auto",
|
|
1155
|
+
"avc",
|
|
1156
|
+
"hevc",
|
|
1157
|
+
"vp9",
|
|
1158
|
+
"av1"
|
|
1159
|
+
]), "auto"),
|
|
1160
|
+
quality: /* @__PURE__ */ L(/* @__PURE__ */ R([
|
|
1161
|
+
"draft",
|
|
1162
|
+
"standard",
|
|
1163
|
+
"high"
|
|
1164
|
+
]), "standard"),
|
|
1165
|
+
transparent: /* @__PURE__ */ L(/* @__PURE__ */ M(), !1),
|
|
1166
|
+
includeIdleMotion: /* @__PURE__ */ L(/* @__PURE__ */ M(), !0)
|
|
1167
|
+
}), st = /* @__PURE__ */ P({
|
|
1168
|
+
devices: /* @__PURE__ */ L(/* @__PURE__ */ j(Xe), () => []),
|
|
1169
|
+
screens: /* @__PURE__ */ L(/* @__PURE__ */ j(Ze), () => []),
|
|
1170
|
+
camera: /* @__PURE__ */ L($e, () => H($e, {})),
|
|
1171
|
+
environment: /* @__PURE__ */ L(et, () => H(et, {})),
|
|
1172
|
+
backdrop: /* @__PURE__ */ L(nt, () => H(nt, {})),
|
|
1173
|
+
floor: /* @__PURE__ */ L(rt, () => H(rt, {})),
|
|
1174
|
+
set: /* @__PURE__ */ L(tt, () => H(tt, {}))
|
|
1175
|
+
}), ct = /* @__PURE__ */ P({
|
|
1176
|
+
schemaVersion: /* @__PURE__ */ L(/* @__PURE__ */ N(1), 1),
|
|
1177
|
+
id: /* @__PURE__ */ L(/* @__PURE__ */ z(), () => ne()),
|
|
1178
|
+
name: /* @__PURE__ */ L(/* @__PURE__ */ z(), "Untitled"),
|
|
1179
|
+
createdAt: /* @__PURE__ */ L(/* @__PURE__ */ z(), () => (/* @__PURE__ */ new Date()).toISOString()),
|
|
1180
|
+
updatedAt: /* @__PURE__ */ L(/* @__PURE__ */ z(), () => (/* @__PURE__ */ new Date()).toISOString()),
|
|
1181
|
+
scene: /* @__PURE__ */ L(st, () => H(st, {})),
|
|
1182
|
+
timeline: /* @__PURE__ */ L(it, () => H(it, {})),
|
|
1183
|
+
interaction: /* @__PURE__ */ L(at, () => H(at, {})),
|
|
1184
|
+
export: /* @__PURE__ */ L(ot, () => H(ot, {})),
|
|
1185
|
+
meta: /* @__PURE__ */ L(/* @__PURE__ */ Ve(/* @__PURE__ */ z(), /* @__PURE__ */ Ue()))
|
|
1186
|
+
});
|
|
1187
|
+
function lt(e) {
|
|
1188
|
+
return H(ct, e);
|
|
1189
|
+
}
|
|
1190
|
+
// ../core/src/project.ts
|
|
1191
|
+
var ut = {
|
|
1192
|
+
screenFinish: "glossy",
|
|
1193
|
+
glare: .5
|
|
1194
|
+
}, dt = [
|
|
1195
|
+
3.4,
|
|
1196
|
+
-24.1,
|
|
1197
|
+
2.3
|
|
1198
|
+
];
|
|
1199
|
+
function ft({ name: e = "Untitled", device: t } = {}) {
|
|
1200
|
+
let n = [], r = [];
|
|
1201
|
+
if (t) {
|
|
1202
|
+
let e = ne("scr");
|
|
1203
|
+
r.push({ id: e }), n.push({
|
|
1204
|
+
id: ne("dev"),
|
|
1205
|
+
type: t.type,
|
|
1206
|
+
spec: t.spec,
|
|
1207
|
+
finish: t.finish,
|
|
1208
|
+
transform: {
|
|
1209
|
+
position: [
|
|
1210
|
+
0,
|
|
1211
|
+
0,
|
|
1212
|
+
0
|
|
1213
|
+
],
|
|
1214
|
+
rotation: [...dt],
|
|
1215
|
+
scale: 1
|
|
1216
|
+
},
|
|
1217
|
+
...ut,
|
|
1218
|
+
screens: [e]
|
|
1219
|
+
});
|
|
1220
|
+
}
|
|
1221
|
+
return lt({
|
|
1222
|
+
name: e,
|
|
1223
|
+
scene: {
|
|
1224
|
+
devices: n,
|
|
1225
|
+
screens: r
|
|
1226
|
+
}
|
|
1227
|
+
});
|
|
1228
|
+
}
|
|
1229
|
+
// ../core/src/presets-bundled.ts
|
|
1230
|
+
var W = (e, t, n = "easeInOutCubic") => ({
|
|
1231
|
+
t: e,
|
|
1232
|
+
value: t,
|
|
1233
|
+
easing: n
|
|
1234
|
+
}), G = { bezier: [
|
|
1235
|
+
.4,
|
|
1236
|
+
0,
|
|
1237
|
+
.2,
|
|
1238
|
+
1
|
|
1239
|
+
] }, pt = [
|
|
1240
|
+
{
|
|
1241
|
+
id: "preset.turn",
|
|
1242
|
+
name: "Turn",
|
|
1243
|
+
tags: [
|
|
1244
|
+
"phone",
|
|
1245
|
+
"tablet",
|
|
1246
|
+
"watch"
|
|
1247
|
+
],
|
|
1248
|
+
duration: 4,
|
|
1249
|
+
rotation: [
|
|
1250
|
+
W(0, [
|
|
1251
|
+
3.4,
|
|
1252
|
+
-24.1,
|
|
1253
|
+
2.3
|
|
1254
|
+
]),
|
|
1255
|
+
W(2, [
|
|
1256
|
+
-8,
|
|
1257
|
+
28,
|
|
1258
|
+
-4
|
|
1259
|
+
]),
|
|
1260
|
+
W(4, [
|
|
1261
|
+
3.4,
|
|
1262
|
+
-24.1,
|
|
1263
|
+
2.3
|
|
1264
|
+
], "linear")
|
|
1265
|
+
]
|
|
1266
|
+
},
|
|
1267
|
+
{
|
|
1268
|
+
id: "preset.push-in",
|
|
1269
|
+
name: "Camera push-in",
|
|
1270
|
+
tags: [
|
|
1271
|
+
"phone",
|
|
1272
|
+
"tablet",
|
|
1273
|
+
"watch",
|
|
1274
|
+
"laptop",
|
|
1275
|
+
"monitor"
|
|
1276
|
+
],
|
|
1277
|
+
duration: 4,
|
|
1278
|
+
fov: [
|
|
1279
|
+
W(0, 28, G),
|
|
1280
|
+
W(2.4, 20, G),
|
|
1281
|
+
W(4, 28, "linear")
|
|
1282
|
+
]
|
|
1283
|
+
},
|
|
1284
|
+
{
|
|
1285
|
+
id: "preset.rise",
|
|
1286
|
+
name: "Rise",
|
|
1287
|
+
tags: [
|
|
1288
|
+
"phone",
|
|
1289
|
+
"tablet",
|
|
1290
|
+
"watch"
|
|
1291
|
+
],
|
|
1292
|
+
duration: 3,
|
|
1293
|
+
position: [
|
|
1294
|
+
W(0, [
|
|
1295
|
+
0,
|
|
1296
|
+
-6,
|
|
1297
|
+
0
|
|
1298
|
+
], "easeOutExpo"),
|
|
1299
|
+
W(1.4, [
|
|
1300
|
+
0,
|
|
1301
|
+
0,
|
|
1302
|
+
0
|
|
1303
|
+
], G),
|
|
1304
|
+
W(3, [
|
|
1305
|
+
0,
|
|
1306
|
+
0,
|
|
1307
|
+
0
|
|
1308
|
+
], "linear")
|
|
1309
|
+
],
|
|
1310
|
+
rotation: [
|
|
1311
|
+
W(0, [
|
|
1312
|
+
-30,
|
|
1313
|
+
-40,
|
|
1314
|
+
0
|
|
1315
|
+
], "easeOutExpo"),
|
|
1316
|
+
W(1.4, dt, G),
|
|
1317
|
+
W(3, dt, "linear")
|
|
1318
|
+
]
|
|
1319
|
+
},
|
|
1320
|
+
{
|
|
1321
|
+
id: "preset.flip",
|
|
1322
|
+
name: "Spin",
|
|
1323
|
+
tags: [
|
|
1324
|
+
"phone",
|
|
1325
|
+
"tablet",
|
|
1326
|
+
"watch"
|
|
1327
|
+
],
|
|
1328
|
+
duration: 4,
|
|
1329
|
+
rotation: [
|
|
1330
|
+
W(0, [
|
|
1331
|
+
0,
|
|
1332
|
+
-20,
|
|
1333
|
+
0
|
|
1334
|
+
]),
|
|
1335
|
+
W(2, [
|
|
1336
|
+
0,
|
|
1337
|
+
160,
|
|
1338
|
+
0
|
|
1339
|
+
]),
|
|
1340
|
+
W(4, [
|
|
1341
|
+
0,
|
|
1342
|
+
340,
|
|
1343
|
+
0
|
|
1344
|
+
], "linear")
|
|
1345
|
+
]
|
|
1346
|
+
},
|
|
1347
|
+
{
|
|
1348
|
+
id: "preset.sway",
|
|
1349
|
+
name: "Sway",
|
|
1350
|
+
tags: [
|
|
1351
|
+
"phone",
|
|
1352
|
+
"tablet",
|
|
1353
|
+
"watch"
|
|
1354
|
+
],
|
|
1355
|
+
duration: 5,
|
|
1356
|
+
rotation: [
|
|
1357
|
+
W(0, [
|
|
1358
|
+
2,
|
|
1359
|
+
-18,
|
|
1360
|
+
1
|
|
1361
|
+
], "easeInOutSine"),
|
|
1362
|
+
W(2.5, [
|
|
1363
|
+
-2,
|
|
1364
|
+
18,
|
|
1365
|
+
-1
|
|
1366
|
+
], "easeInOutSine"),
|
|
1367
|
+
W(5, [
|
|
1368
|
+
2,
|
|
1369
|
+
-18,
|
|
1370
|
+
1
|
|
1371
|
+
], "linear")
|
|
1372
|
+
],
|
|
1373
|
+
position: [
|
|
1374
|
+
W(0, [
|
|
1375
|
+
-.6,
|
|
1376
|
+
0,
|
|
1377
|
+
0
|
|
1378
|
+
], "easeInOutSine"),
|
|
1379
|
+
W(2.5, [
|
|
1380
|
+
.6,
|
|
1381
|
+
0,
|
|
1382
|
+
0
|
|
1383
|
+
], "easeInOutSine"),
|
|
1384
|
+
W(5, [
|
|
1385
|
+
-.6,
|
|
1386
|
+
0,
|
|
1387
|
+
0
|
|
1388
|
+
], "linear")
|
|
1389
|
+
]
|
|
1390
|
+
},
|
|
1391
|
+
{
|
|
1392
|
+
id: "preset.zoom-out",
|
|
1393
|
+
name: "Reveal",
|
|
1394
|
+
tags: [
|
|
1395
|
+
"phone",
|
|
1396
|
+
"tablet",
|
|
1397
|
+
"watch",
|
|
1398
|
+
"laptop",
|
|
1399
|
+
"monitor"
|
|
1400
|
+
],
|
|
1401
|
+
duration: 3,
|
|
1402
|
+
scale: [
|
|
1403
|
+
W(0, 1.35, "easeOutExpo"),
|
|
1404
|
+
W(1.6, 1, G),
|
|
1405
|
+
W(3, 1, "linear")
|
|
1406
|
+
],
|
|
1407
|
+
fov: [
|
|
1408
|
+
W(0, 22, "easeOutExpo"),
|
|
1409
|
+
W(1.6, 28, G),
|
|
1410
|
+
W(3, 28, "linear")
|
|
1411
|
+
]
|
|
1412
|
+
},
|
|
1413
|
+
{
|
|
1414
|
+
id: "preset.lid-open",
|
|
1415
|
+
name: "Lid opens",
|
|
1416
|
+
tags: ["laptop"],
|
|
1417
|
+
duration: 3.5,
|
|
1418
|
+
position: [W(0, [
|
|
1419
|
+
0,
|
|
1420
|
+
0,
|
|
1421
|
+
0
|
|
1422
|
+
])]
|
|
1423
|
+
},
|
|
1424
|
+
{
|
|
1425
|
+
id: "preset.orbit",
|
|
1426
|
+
name: "Swing",
|
|
1427
|
+
tags: ["laptop", "monitor"],
|
|
1428
|
+
duration: 5,
|
|
1429
|
+
rotation: [
|
|
1430
|
+
W(0, [
|
|
1431
|
+
0,
|
|
1432
|
+
-28,
|
|
1433
|
+
0
|
|
1434
|
+
], "easeInOutSine"),
|
|
1435
|
+
W(2.5, [
|
|
1436
|
+
0,
|
|
1437
|
+
28,
|
|
1438
|
+
0
|
|
1439
|
+
], "easeInOutSine"),
|
|
1440
|
+
W(5, [
|
|
1441
|
+
0,
|
|
1442
|
+
-28,
|
|
1443
|
+
0
|
|
1444
|
+
], "linear")
|
|
1445
|
+
]
|
|
1446
|
+
}
|
|
1447
|
+
];
|
|
1448
|
+
function mt(e) {
|
|
1449
|
+
let t = [];
|
|
1450
|
+
return e.rotation && t.push({
|
|
1451
|
+
id: `${e.id}.rotation`,
|
|
1452
|
+
target: "devices.$0.rotation",
|
|
1453
|
+
type: "vec3",
|
|
1454
|
+
keys: e.rotation
|
|
1455
|
+
}), e.position && t.push({
|
|
1456
|
+
id: `${e.id}.position`,
|
|
1457
|
+
target: "devices.$0.position",
|
|
1458
|
+
type: "vec3",
|
|
1459
|
+
keys: e.position
|
|
1460
|
+
}), e.scale && t.push({
|
|
1461
|
+
id: `${e.id}.scale`,
|
|
1462
|
+
target: "devices.$0.scale",
|
|
1463
|
+
type: "number",
|
|
1464
|
+
keys: e.scale
|
|
1465
|
+
}), e.fov && t.push({
|
|
1466
|
+
id: `${e.id}.fov`,
|
|
1467
|
+
target: "camera.fov",
|
|
1468
|
+
type: "number",
|
|
1469
|
+
keys: e.fov
|
|
1470
|
+
}), e.id === "preset.lid-open" && t.push({
|
|
1471
|
+
id: `${e.id}.lid`,
|
|
1472
|
+
target: "devices.$0.params.lidAngle",
|
|
1473
|
+
type: "number",
|
|
1474
|
+
keys: [
|
|
1475
|
+
W(0, 2, "easeInOutCubic"),
|
|
1476
|
+
W(2.2, 110, G),
|
|
1477
|
+
W(3.5, 110, "linear")
|
|
1478
|
+
]
|
|
1479
|
+
}), {
|
|
1480
|
+
id: e.id,
|
|
1481
|
+
name: e.name,
|
|
1482
|
+
tags: e.tags,
|
|
1483
|
+
slots: 1,
|
|
1484
|
+
timeline: {
|
|
1485
|
+
duration: e.duration,
|
|
1486
|
+
fps: 30,
|
|
1487
|
+
tracks: t
|
|
1488
|
+
}
|
|
1489
|
+
};
|
|
1490
|
+
}
|
|
1491
|
+
var ht = pt.map(mt), gt = {
|
|
1492
|
+
x: 0,
|
|
1493
|
+
y: 0,
|
|
1494
|
+
speed: 0
|
|
1495
|
+
};
|
|
1496
|
+
function K(e, t) {
|
|
1497
|
+
return Math.sin(e * 13.1 + t) * .5 + Math.sin(e * 7.3 + t * 1.7) * .3 + Math.sin(e * 23.7 + t * .4) * .2;
|
|
1498
|
+
}
|
|
1499
|
+
function _t(e, t, n, r, i) {
|
|
1500
|
+
let a = /* @__PURE__ */ new Map(), { follow: o, zoom: s, dolly: c, shake: l, mode: u } = t;
|
|
1501
|
+
if (o <= 0 && s <= 0 && c <= 0 && l <= 0) return a;
|
|
1502
|
+
let d = St(vt(i.target, i.position)), f = St(Ct(d, [
|
|
1503
|
+
0,
|
|
1504
|
+
1,
|
|
1505
|
+
0
|
|
1506
|
+
])), p = Ct(f, d), m = [
|
|
1507
|
+
0,
|
|
1508
|
+
0,
|
|
1509
|
+
0
|
|
1510
|
+
], h = 0;
|
|
1511
|
+
if (o > 0) {
|
|
1512
|
+
if (u === "device") for (let t of r) a.set(`devices.${t}.rotation`, {
|
|
1513
|
+
value: [
|
|
1514
|
+
-e.y * o * 10,
|
|
1515
|
+
e.x * o * 16,
|
|
1516
|
+
0
|
|
1517
|
+
],
|
|
1518
|
+
add: !0
|
|
1519
|
+
});
|
|
1520
|
+
else {
|
|
1521
|
+
let t = xt(vt(i.target, i.position)) * .12 * o;
|
|
1522
|
+
q(m, bt(f, e.x * t)), q(m, bt(p, e.y * t * .6));
|
|
1523
|
+
}
|
|
1524
|
+
}
|
|
1525
|
+
if (s > 0) {
|
|
1526
|
+
let t = 1 - Math.min(1, Math.hypot(e.x, e.y));
|
|
1527
|
+
h -= s * 10 * t;
|
|
1528
|
+
}
|
|
1529
|
+
if (c > 0) {
|
|
1530
|
+
let t = xt(vt(i.target, i.position));
|
|
1531
|
+
q(m, bt(d, e.y * c * t * .15));
|
|
1532
|
+
}
|
|
1533
|
+
if (l > 0) {
|
|
1534
|
+
let t = l * Math.min(1, e.speed);
|
|
1535
|
+
for (let e of r) {
|
|
1536
|
+
let r = a.get(`devices.${e}.rotation`)?.value, i = [
|
|
1537
|
+
K(n, 1) * 2 * t,
|
|
1538
|
+
K(n, 2) * 2 * t,
|
|
1539
|
+
K(n, 3) * 1 * t
|
|
1540
|
+
];
|
|
1541
|
+
a.set(`devices.${e}.rotation`, {
|
|
1542
|
+
value: r ? yt(r, i) : i,
|
|
1543
|
+
add: !0
|
|
1544
|
+
});
|
|
1545
|
+
}
|
|
1546
|
+
q(m, [
|
|
1547
|
+
K(n, 4) * .2 * t,
|
|
1548
|
+
K(n, 5) * .2 * t,
|
|
1549
|
+
0
|
|
1550
|
+
]);
|
|
1551
|
+
}
|
|
1552
|
+
return (m[0] || m[1] || m[2]) && a.set("camera.position", {
|
|
1553
|
+
value: m,
|
|
1554
|
+
add: !0
|
|
1555
|
+
}), h && a.set("camera.fov", {
|
|
1556
|
+
value: h,
|
|
1557
|
+
add: !0
|
|
1558
|
+
}), a;
|
|
1559
|
+
}
|
|
1560
|
+
var vt = (e, t) => [
|
|
1561
|
+
e[0] - t[0],
|
|
1562
|
+
e[1] - t[1],
|
|
1563
|
+
e[2] - t[2]
|
|
1564
|
+
], yt = (e, t) => [
|
|
1565
|
+
e[0] + t[0],
|
|
1566
|
+
e[1] + t[1],
|
|
1567
|
+
e[2] + t[2]
|
|
1568
|
+
], bt = (e, t) => [
|
|
1569
|
+
e[0] * t,
|
|
1570
|
+
e[1] * t,
|
|
1571
|
+
e[2] * t
|
|
1572
|
+
], xt = (e) => Math.hypot(e[0], e[1], e[2]), St = (e) => {
|
|
1573
|
+
let t = xt(e) || 1;
|
|
1574
|
+
return [
|
|
1575
|
+
e[0] / t,
|
|
1576
|
+
e[1] / t,
|
|
1577
|
+
e[2] / t
|
|
1578
|
+
];
|
|
1579
|
+
}, Ct = (e, t) => [
|
|
1580
|
+
e[1] * t[2] - e[2] * t[1],
|
|
1581
|
+
e[2] * t[0] - e[0] * t[2],
|
|
1582
|
+
e[0] * t[1] - e[1] * t[0]
|
|
1583
|
+
];
|
|
1584
|
+
function q(e, t) {
|
|
1585
|
+
e[0] += t[0], e[1] += t[1], e[2] += t[2];
|
|
1586
|
+
}
|
|
1587
|
+
function wt(e, t, n, r) {
|
|
1588
|
+
let i = 1 - Math.exp(-n * r);
|
|
1589
|
+
return {
|
|
1590
|
+
x: e.x + (t.x - e.x) * i,
|
|
1591
|
+
y: e.y + (t.y - e.y) * i,
|
|
1592
|
+
speed: e.speed + (t.speed - e.speed) * Math.min(1, i * 2)
|
|
1593
|
+
};
|
|
1594
|
+
}
|
|
1595
|
+
// ../core/src/templates.ts
|
|
1596
|
+
var J = (e, t, n = "easeInOutCubic") => ({
|
|
1597
|
+
t: e,
|
|
1598
|
+
value: t,
|
|
1599
|
+
easing: n
|
|
1600
|
+
}), Tt = { bezier: [
|
|
1601
|
+
.45,
|
|
1602
|
+
0,
|
|
1603
|
+
.85,
|
|
1604
|
+
.6
|
|
1605
|
+
] }, Y = { bezier: [
|
|
1606
|
+
.15,
|
|
1607
|
+
.4,
|
|
1608
|
+
.3,
|
|
1609
|
+
1
|
|
1610
|
+
] }, X = { bezier: [
|
|
1611
|
+
.4,
|
|
1612
|
+
0,
|
|
1613
|
+
.2,
|
|
1614
|
+
1
|
|
1615
|
+
] }, Et = {
|
|
1616
|
+
duration: 10,
|
|
1617
|
+
tracks: [
|
|
1618
|
+
{
|
|
1619
|
+
id: "crevice.camera.position",
|
|
1620
|
+
target: "camera.position",
|
|
1621
|
+
type: "vec3",
|
|
1622
|
+
keys: [
|
|
1623
|
+
J(0, [
|
|
1624
|
+
-26,
|
|
1625
|
+
8,
|
|
1626
|
+
74
|
|
1627
|
+
], X),
|
|
1628
|
+
J(1.6, [
|
|
1629
|
+
1,
|
|
1630
|
+
1.5,
|
|
1631
|
+
46
|
|
1632
|
+
], Tt),
|
|
1633
|
+
J(2.5, [
|
|
1634
|
+
5.5,
|
|
1635
|
+
-4.5,
|
|
1636
|
+
21
|
|
1637
|
+
], Y),
|
|
1638
|
+
J(5.4, [
|
|
1639
|
+
3,
|
|
1640
|
+
-2.5,
|
|
1641
|
+
18.5
|
|
1642
|
+
], X),
|
|
1643
|
+
J(6.5, [
|
|
1644
|
+
-4.5,
|
|
1645
|
+
3.5,
|
|
1646
|
+
24
|
|
1647
|
+
], "linear"),
|
|
1648
|
+
J(8.3, [
|
|
1649
|
+
-4.5,
|
|
1650
|
+
-3.5,
|
|
1651
|
+
24
|
|
1652
|
+
], X),
|
|
1653
|
+
J(9.5, [
|
|
1654
|
+
0,
|
|
1655
|
+
.5,
|
|
1656
|
+
46
|
|
1657
|
+
], "linear"),
|
|
1658
|
+
J(10, [
|
|
1659
|
+
0,
|
|
1660
|
+
.5,
|
|
1661
|
+
47
|
|
1662
|
+
], "linear")
|
|
1663
|
+
]
|
|
1664
|
+
},
|
|
1665
|
+
{
|
|
1666
|
+
id: "crevice.camera.target",
|
|
1667
|
+
target: "camera.target",
|
|
1668
|
+
type: "vec3",
|
|
1669
|
+
keys: [
|
|
1670
|
+
J(0, [
|
|
1671
|
+
0,
|
|
1672
|
+
1.5,
|
|
1673
|
+
0
|
|
1674
|
+
], X),
|
|
1675
|
+
J(1.6, [
|
|
1676
|
+
0,
|
|
1677
|
+
1,
|
|
1678
|
+
0
|
|
1679
|
+
], Tt),
|
|
1680
|
+
J(2.5, [
|
|
1681
|
+
0,
|
|
1682
|
+
5,
|
|
1683
|
+
0
|
|
1684
|
+
], Y),
|
|
1685
|
+
J(5.4, [
|
|
1686
|
+
0,
|
|
1687
|
+
4.5,
|
|
1688
|
+
0
|
|
1689
|
+
], X),
|
|
1690
|
+
J(6.5, [
|
|
1691
|
+
0,
|
|
1692
|
+
2.5,
|
|
1693
|
+
0
|
|
1694
|
+
], "linear"),
|
|
1695
|
+
J(8.3, [
|
|
1696
|
+
0,
|
|
1697
|
+
-3.5,
|
|
1698
|
+
0
|
|
1699
|
+
], X),
|
|
1700
|
+
J(9.5, [
|
|
1701
|
+
0,
|
|
1702
|
+
.5,
|
|
1703
|
+
0
|
|
1704
|
+
], "linear"),
|
|
1705
|
+
J(10, [
|
|
1706
|
+
0,
|
|
1707
|
+
.5,
|
|
1708
|
+
0
|
|
1709
|
+
], "linear")
|
|
1710
|
+
]
|
|
1711
|
+
},
|
|
1712
|
+
{
|
|
1713
|
+
id: "crevice.camera.fov",
|
|
1714
|
+
target: "camera.fov",
|
|
1715
|
+
type: "number",
|
|
1716
|
+
keys: [
|
|
1717
|
+
J(0, 26, X),
|
|
1718
|
+
J(1.6, 28, Tt),
|
|
1719
|
+
J(2.5, 36, Y),
|
|
1720
|
+
J(5.4, 35, X),
|
|
1721
|
+
J(6.5, 32, "linear"),
|
|
1722
|
+
J(8.3, 32, X),
|
|
1723
|
+
J(9.5, 28, "linear"),
|
|
1724
|
+
J(10, 28, "linear")
|
|
1725
|
+
]
|
|
1726
|
+
},
|
|
1727
|
+
{
|
|
1728
|
+
id: "crevice.camera.roll",
|
|
1729
|
+
target: "camera.roll",
|
|
1730
|
+
type: "number",
|
|
1731
|
+
keys: [
|
|
1732
|
+
J(0, 3, X),
|
|
1733
|
+
J(1.6, 0, Tt),
|
|
1734
|
+
J(2.5, -7, Y),
|
|
1735
|
+
J(5.4, -5, X),
|
|
1736
|
+
J(6.5, 2, "linear"),
|
|
1737
|
+
J(8.3, 2, X),
|
|
1738
|
+
J(9.5, 0, "linear"),
|
|
1739
|
+
J(10, 0, "linear")
|
|
1740
|
+
]
|
|
1741
|
+
},
|
|
1742
|
+
{
|
|
1743
|
+
id: "crevice.camera.fade",
|
|
1744
|
+
target: "camera.lens.fade",
|
|
1745
|
+
type: "number",
|
|
1746
|
+
keys: [
|
|
1747
|
+
J(0, 1, "easeOutQuad"),
|
|
1748
|
+
J(.8, 0, "linear"),
|
|
1749
|
+
J(9.6, 0, "easeInQuad"),
|
|
1750
|
+
J(10, 1, "linear")
|
|
1751
|
+
]
|
|
1752
|
+
}
|
|
1753
|
+
]
|
|
1754
|
+
}, Dt = { bezier: [
|
|
1755
|
+
.3,
|
|
1756
|
+
0,
|
|
1757
|
+
.12,
|
|
1758
|
+
1
|
|
1759
|
+
] }, Ot = {
|
|
1760
|
+
duration: 6,
|
|
1761
|
+
tracks: [
|
|
1762
|
+
{
|
|
1763
|
+
id: "block.camera.position",
|
|
1764
|
+
target: "camera.position",
|
|
1765
|
+
type: "vec3",
|
|
1766
|
+
keys: [
|
|
1767
|
+
J(0, [
|
|
1768
|
+
-11,
|
|
1769
|
+
-.6,
|
|
1770
|
+
30
|
|
1771
|
+
], Dt),
|
|
1772
|
+
J(3.2, [
|
|
1773
|
+
-31,
|
|
1774
|
+
-7.3,
|
|
1775
|
+
62
|
|
1776
|
+
], "easeInOutSine"),
|
|
1777
|
+
J(6, [
|
|
1778
|
+
-30,
|
|
1779
|
+
-7,
|
|
1780
|
+
60
|
|
1781
|
+
], "linear")
|
|
1782
|
+
]
|
|
1783
|
+
},
|
|
1784
|
+
{
|
|
1785
|
+
id: "block.camera.target",
|
|
1786
|
+
target: "camera.target",
|
|
1787
|
+
type: "vec3",
|
|
1788
|
+
keys: [
|
|
1789
|
+
J(0, [
|
|
1790
|
+
3,
|
|
1791
|
+
.8,
|
|
1792
|
+
4
|
|
1793
|
+
], Dt),
|
|
1794
|
+
J(3.2, [
|
|
1795
|
+
3,
|
|
1796
|
+
7.8,
|
|
1797
|
+
2
|
|
1798
|
+
], "easeInOutSine"),
|
|
1799
|
+
J(6, [
|
|
1800
|
+
3,
|
|
1801
|
+
8,
|
|
1802
|
+
2
|
|
1803
|
+
], "linear")
|
|
1804
|
+
]
|
|
1805
|
+
},
|
|
1806
|
+
{
|
|
1807
|
+
id: "block.lid",
|
|
1808
|
+
target: "devices.$0.params.lidAngle",
|
|
1809
|
+
type: "number",
|
|
1810
|
+
keys: [
|
|
1811
|
+
J(0, 2, "linear"),
|
|
1812
|
+
J(.35, 2, X),
|
|
1813
|
+
J(2.7, 100, "linear"),
|
|
1814
|
+
J(6, 100, "linear")
|
|
1815
|
+
]
|
|
1816
|
+
}
|
|
1817
|
+
]
|
|
1818
|
+
}, kt = {
|
|
1819
|
+
duration: 7,
|
|
1820
|
+
tracks: [
|
|
1821
|
+
{
|
|
1822
|
+
id: "push.camera.position",
|
|
1823
|
+
target: "camera.position",
|
|
1824
|
+
type: "vec3",
|
|
1825
|
+
keys: [
|
|
1826
|
+
J(0, [
|
|
1827
|
+
-4,
|
|
1828
|
+
2,
|
|
1829
|
+
41
|
|
1830
|
+
], "linear"),
|
|
1831
|
+
J(.4, [
|
|
1832
|
+
-4,
|
|
1833
|
+
2,
|
|
1834
|
+
41
|
|
1835
|
+
], X),
|
|
1836
|
+
J(2.8, [
|
|
1837
|
+
9.4,
|
|
1838
|
+
-9.6,
|
|
1839
|
+
13.3
|
|
1840
|
+
], Y),
|
|
1841
|
+
J(6.4, [
|
|
1842
|
+
8.8,
|
|
1843
|
+
-9.8,
|
|
1844
|
+
12.4
|
|
1845
|
+
], "linear"),
|
|
1846
|
+
J(7, [
|
|
1847
|
+
8.8,
|
|
1848
|
+
-9.8,
|
|
1849
|
+
12.4
|
|
1850
|
+
], "linear")
|
|
1851
|
+
]
|
|
1852
|
+
},
|
|
1853
|
+
{
|
|
1854
|
+
id: "push.camera.target",
|
|
1855
|
+
target: "camera.target",
|
|
1856
|
+
type: "vec3",
|
|
1857
|
+
keys: [
|
|
1858
|
+
J(0, [
|
|
1859
|
+
0,
|
|
1860
|
+
0,
|
|
1861
|
+
0
|
|
1862
|
+
], "linear"),
|
|
1863
|
+
J(.4, [
|
|
1864
|
+
0,
|
|
1865
|
+
0,
|
|
1866
|
+
0
|
|
1867
|
+
], X),
|
|
1868
|
+
J(2.8, [
|
|
1869
|
+
0,
|
|
1870
|
+
-3,
|
|
1871
|
+
0
|
|
1872
|
+
], Y),
|
|
1873
|
+
J(6.4, [
|
|
1874
|
+
0,
|
|
1875
|
+
-3.4,
|
|
1876
|
+
0
|
|
1877
|
+
], "linear"),
|
|
1878
|
+
J(7, [
|
|
1879
|
+
0,
|
|
1880
|
+
-3.4,
|
|
1881
|
+
0
|
|
1882
|
+
], "linear")
|
|
1883
|
+
]
|
|
1884
|
+
},
|
|
1885
|
+
{
|
|
1886
|
+
id: "push.camera.fov",
|
|
1887
|
+
target: "camera.fov",
|
|
1888
|
+
type: "number",
|
|
1889
|
+
keys: [
|
|
1890
|
+
J(0, 28, "linear"),
|
|
1891
|
+
J(.4, 28, X),
|
|
1892
|
+
J(2.8, 34, Y),
|
|
1893
|
+
J(7, 34, "linear")
|
|
1894
|
+
]
|
|
1895
|
+
},
|
|
1896
|
+
{
|
|
1897
|
+
id: "push.camera.roll",
|
|
1898
|
+
target: "camera.roll",
|
|
1899
|
+
type: "number",
|
|
1900
|
+
keys: [
|
|
1901
|
+
J(0, 0, "linear"),
|
|
1902
|
+
J(.4, 0, X),
|
|
1903
|
+
J(2.8, -9, Y),
|
|
1904
|
+
J(6.4, -10, "linear"),
|
|
1905
|
+
J(7, -10, "linear")
|
|
1906
|
+
]
|
|
1907
|
+
},
|
|
1908
|
+
{
|
|
1909
|
+
id: "push.camera.fade",
|
|
1910
|
+
target: "camera.lens.fade",
|
|
1911
|
+
type: "number",
|
|
1912
|
+
keys: [
|
|
1913
|
+
J(0, 0, "linear"),
|
|
1914
|
+
J(6.4, 0, "easeInQuad"),
|
|
1915
|
+
J(6.95, 1, "linear"),
|
|
1916
|
+
J(7, 1, "linear")
|
|
1917
|
+
]
|
|
1918
|
+
}
|
|
1919
|
+
]
|
|
1920
|
+
}, At = {
|
|
1921
|
+
duration: 10,
|
|
1922
|
+
tracks: [
|
|
1923
|
+
{
|
|
1924
|
+
id: "sweep.camera.position",
|
|
1925
|
+
target: "camera.position",
|
|
1926
|
+
type: "vec3",
|
|
1927
|
+
keys: [
|
|
1928
|
+
J(0, [
|
|
1929
|
+
4.5,
|
|
1930
|
+
.5,
|
|
1931
|
+
11
|
|
1932
|
+
], "linear"),
|
|
1933
|
+
J(.6, [
|
|
1934
|
+
4.5,
|
|
1935
|
+
.5,
|
|
1936
|
+
11
|
|
1937
|
+
], X),
|
|
1938
|
+
J(4, [
|
|
1939
|
+
3,
|
|
1940
|
+
1.5,
|
|
1941
|
+
10.5
|
|
1942
|
+
], X),
|
|
1943
|
+
J(5.4, [
|
|
1944
|
+
-1.5,
|
|
1945
|
+
-7.5,
|
|
1946
|
+
12.5
|
|
1947
|
+
], Y),
|
|
1948
|
+
J(7.4, [
|
|
1949
|
+
-2,
|
|
1950
|
+
-8,
|
|
1951
|
+
12
|
|
1952
|
+
], "linear"),
|
|
1953
|
+
J(10, [
|
|
1954
|
+
-2,
|
|
1955
|
+
-8,
|
|
1956
|
+
12
|
|
1957
|
+
], "linear")
|
|
1958
|
+
]
|
|
1959
|
+
},
|
|
1960
|
+
{
|
|
1961
|
+
id: "sweep.camera.target",
|
|
1962
|
+
target: "camera.target",
|
|
1963
|
+
type: "vec3",
|
|
1964
|
+
keys: [
|
|
1965
|
+
J(0, [
|
|
1966
|
+
0,
|
|
1967
|
+
5.2,
|
|
1968
|
+
0
|
|
1969
|
+
], "linear"),
|
|
1970
|
+
J(.6, [
|
|
1971
|
+
0,
|
|
1972
|
+
5.2,
|
|
1973
|
+
0
|
|
1974
|
+
], X),
|
|
1975
|
+
J(4, [
|
|
1976
|
+
.3,
|
|
1977
|
+
4.6,
|
|
1978
|
+
0
|
|
1979
|
+
], X),
|
|
1980
|
+
J(5.4, [
|
|
1981
|
+
0,
|
|
1982
|
+
-3.8,
|
|
1983
|
+
0
|
|
1984
|
+
], Y),
|
|
1985
|
+
J(7.4, [
|
|
1986
|
+
0,
|
|
1987
|
+
-4.2,
|
|
1988
|
+
0
|
|
1989
|
+
], "linear"),
|
|
1990
|
+
J(10, [
|
|
1991
|
+
0,
|
|
1992
|
+
-4.2,
|
|
1993
|
+
0
|
|
1994
|
+
], "linear")
|
|
1995
|
+
]
|
|
1996
|
+
},
|
|
1997
|
+
{
|
|
1998
|
+
id: "sweep.camera.fov",
|
|
1999
|
+
target: "camera.fov",
|
|
2000
|
+
type: "number",
|
|
2001
|
+
keys: [J(0, 36, "linear"), J(10, 36, "linear")]
|
|
2002
|
+
},
|
|
2003
|
+
{
|
|
2004
|
+
id: "sweep.camera.roll",
|
|
2005
|
+
target: "camera.roll",
|
|
2006
|
+
type: "number",
|
|
2007
|
+
keys: [
|
|
2008
|
+
J(0, 14, "linear"),
|
|
2009
|
+
J(.6, 14, X),
|
|
2010
|
+
J(4, 10, X),
|
|
2011
|
+
J(5.4, -6, Y),
|
|
2012
|
+
J(7.4, -8, "linear"),
|
|
2013
|
+
J(10, -8, "linear")
|
|
2014
|
+
]
|
|
2015
|
+
},
|
|
2016
|
+
{
|
|
2017
|
+
id: "sweep.camera.fade",
|
|
2018
|
+
target: "camera.lens.fade",
|
|
2019
|
+
type: "number",
|
|
2020
|
+
keys: [
|
|
2021
|
+
J(0, 1, "easeOutQuad"),
|
|
2022
|
+
J(.9, 0, "linear"),
|
|
2023
|
+
J(7.4, 0, "easeInQuad"),
|
|
2024
|
+
J(8.2, 1, "linear"),
|
|
2025
|
+
J(10, 1, "linear")
|
|
2026
|
+
]
|
|
2027
|
+
}
|
|
2028
|
+
]
|
|
2029
|
+
}, jt = {
|
|
2030
|
+
"16:9": [1920, 1080],
|
|
2031
|
+
"9:16": [1080, 1920],
|
|
2032
|
+
"1:1": [1080, 1080],
|
|
2033
|
+
"4:3": [1440, 1080]
|
|
2034
|
+
}, Mt = [
|
|
2035
|
+
{
|
|
2036
|
+
id: "tpl.iphone-crevice",
|
|
2037
|
+
name: "Stone crevice",
|
|
2038
|
+
description: "An iPhone wedged between dark rocks, lit by its own screen. Push-in, close pass, pull back.",
|
|
2039
|
+
device: {
|
|
2040
|
+
type: "phone",
|
|
2041
|
+
spec: "phone.iphone-18-pro",
|
|
2042
|
+
finish: "black"
|
|
2043
|
+
},
|
|
2044
|
+
backdrop: {
|
|
2045
|
+
kind: "solid",
|
|
2046
|
+
color: "#030304",
|
|
2047
|
+
tone: "dark"
|
|
2048
|
+
},
|
|
2049
|
+
shadow: 0,
|
|
2050
|
+
aspect: "16:9",
|
|
2051
|
+
rotation: [
|
|
2052
|
+
0,
|
|
2053
|
+
-6,
|
|
2054
|
+
0
|
|
2055
|
+
],
|
|
2056
|
+
float: 0,
|
|
2057
|
+
cursor: {
|
|
2058
|
+
mode: "camera",
|
|
2059
|
+
follow: .25
|
|
2060
|
+
},
|
|
2061
|
+
environment: {
|
|
2062
|
+
preset: "night",
|
|
2063
|
+
intensity: 1,
|
|
2064
|
+
glow: 1.6
|
|
2065
|
+
},
|
|
2066
|
+
lens: {
|
|
2067
|
+
vignette: .45,
|
|
2068
|
+
bloom: .3,
|
|
2069
|
+
grain: .2,
|
|
2070
|
+
blur: .08
|
|
2071
|
+
},
|
|
2072
|
+
set: {
|
|
2073
|
+
kind: "crevice",
|
|
2074
|
+
seed: 3,
|
|
2075
|
+
color: "#3d3d40"
|
|
2076
|
+
},
|
|
2077
|
+
timeline: Et
|
|
2078
|
+
},
|
|
2079
|
+
{
|
|
2080
|
+
id: "tpl.iphone-push",
|
|
2081
|
+
name: "Grey push-in",
|
|
2082
|
+
description: "An iPhone standing on grey. The camera swings round and closes in on the lower screen, then fades through black.",
|
|
2083
|
+
device: {
|
|
2084
|
+
type: "phone",
|
|
2085
|
+
spec: "phone.iphone-18-pro",
|
|
2086
|
+
finish: "black"
|
|
2087
|
+
},
|
|
2088
|
+
backdrop: {
|
|
2089
|
+
kind: "solid",
|
|
2090
|
+
color: "#cccccc",
|
|
2091
|
+
tone: "light"
|
|
2092
|
+
},
|
|
2093
|
+
shadow: 0,
|
|
2094
|
+
aspect: "4:3",
|
|
2095
|
+
rotation: [
|
|
2096
|
+
0,
|
|
2097
|
+
0,
|
|
2098
|
+
0
|
|
2099
|
+
],
|
|
2100
|
+
float: 0,
|
|
2101
|
+
cursor: {
|
|
2102
|
+
mode: "camera",
|
|
2103
|
+
follow: .25
|
|
2104
|
+
},
|
|
2105
|
+
environment: {
|
|
2106
|
+
preset: "studio",
|
|
2107
|
+
intensity: 1
|
|
2108
|
+
},
|
|
2109
|
+
timeline: kt
|
|
2110
|
+
},
|
|
2111
|
+
{
|
|
2112
|
+
id: "tpl.iphone-night-sweep",
|
|
2113
|
+
name: "Night sweep",
|
|
2114
|
+
description: "An iPhone in the dark, lit along its rim. The camera rises out of black, sweeps down the screen and fades away.",
|
|
2115
|
+
device: {
|
|
2116
|
+
type: "phone",
|
|
2117
|
+
spec: "phone.iphone-18-pro",
|
|
2118
|
+
finish: "black"
|
|
2119
|
+
},
|
|
2120
|
+
backdrop: {
|
|
2121
|
+
kind: "solid",
|
|
2122
|
+
color: "#000000",
|
|
2123
|
+
tone: "dark"
|
|
2124
|
+
},
|
|
2125
|
+
shadow: 0,
|
|
2126
|
+
aspect: "4:3",
|
|
2127
|
+
rotation: [
|
|
2128
|
+
0,
|
|
2129
|
+
0,
|
|
2130
|
+
0
|
|
2131
|
+
],
|
|
2132
|
+
float: 0,
|
|
2133
|
+
cursor: {
|
|
2134
|
+
mode: "camera",
|
|
2135
|
+
follow: .25
|
|
2136
|
+
},
|
|
2137
|
+
environment: {
|
|
2138
|
+
preset: "night",
|
|
2139
|
+
intensity: 1,
|
|
2140
|
+
glow: 1.2
|
|
2141
|
+
},
|
|
2142
|
+
lens: {
|
|
2143
|
+
vignette: .3,
|
|
2144
|
+
grain: .1
|
|
2145
|
+
},
|
|
2146
|
+
timeline: At
|
|
2147
|
+
},
|
|
2148
|
+
{
|
|
2149
|
+
id: "tpl.iphone-turn",
|
|
2150
|
+
name: "iPhone turn",
|
|
2151
|
+
description: "A slow turn with a camera push-in. The classic hero shot.",
|
|
2152
|
+
device: {
|
|
2153
|
+
type: "phone",
|
|
2154
|
+
spec: "phone.iphone-18-pro",
|
|
2155
|
+
finish: "black"
|
|
2156
|
+
},
|
|
2157
|
+
preset: "preset.turn",
|
|
2158
|
+
backdrop: {
|
|
2159
|
+
kind: "gradient",
|
|
2160
|
+
inner: "#f6f6f4",
|
|
2161
|
+
outer: "#d5d5d1",
|
|
2162
|
+
tone: "light"
|
|
2163
|
+
},
|
|
2164
|
+
aspect: "16:9",
|
|
2165
|
+
cursor: { follow: .6 }
|
|
2166
|
+
},
|
|
2167
|
+
{
|
|
2168
|
+
id: "tpl.iphone-reel",
|
|
2169
|
+
name: "iPhone reel",
|
|
2170
|
+
description: "Vertical, dark, rises into frame. Made for Reels and Shorts.",
|
|
2171
|
+
device: {
|
|
2172
|
+
type: "phone",
|
|
2173
|
+
spec: "phone.iphone-18-pro-max",
|
|
2174
|
+
finish: "burgundy"
|
|
2175
|
+
},
|
|
2176
|
+
preset: "preset.rise",
|
|
2177
|
+
backdrop: {
|
|
2178
|
+
kind: "gradient",
|
|
2179
|
+
inner: "#2c2f39",
|
|
2180
|
+
outer: "#0b0c10",
|
|
2181
|
+
tone: "dark"
|
|
2182
|
+
},
|
|
2183
|
+
shadow: .5,
|
|
2184
|
+
aspect: "9:16",
|
|
2185
|
+
camera: {
|
|
2186
|
+
position: [
|
|
2187
|
+
0,
|
|
2188
|
+
1.5,
|
|
2189
|
+
62
|
|
2190
|
+
],
|
|
2191
|
+
fov: 26
|
|
2192
|
+
}
|
|
2193
|
+
},
|
|
2194
|
+
{
|
|
2195
|
+
id: "tpl.ipad-sway",
|
|
2196
|
+
name: "iPad sway",
|
|
2197
|
+
description: "A gentle sway on a warm backdrop for app showcases.",
|
|
2198
|
+
device: {
|
|
2199
|
+
type: "tablet",
|
|
2200
|
+
spec: "tablet.ipad-pro-13",
|
|
2201
|
+
finish: "silver"
|
|
2202
|
+
},
|
|
2203
|
+
preset: "preset.sway",
|
|
2204
|
+
backdrop: {
|
|
2205
|
+
kind: "gradient",
|
|
2206
|
+
inner: "#fbf0e6",
|
|
2207
|
+
outer: "#dfc2a8",
|
|
2208
|
+
tone: "light"
|
|
2209
|
+
},
|
|
2210
|
+
aspect: "16:9",
|
|
2211
|
+
camera: {
|
|
2212
|
+
position: [
|
|
2213
|
+
0,
|
|
2214
|
+
2,
|
|
2215
|
+
78
|
|
2216
|
+
],
|
|
2217
|
+
fov: 28
|
|
2218
|
+
}
|
|
2219
|
+
},
|
|
2220
|
+
{
|
|
2221
|
+
id: "tpl.macbook-block",
|
|
2222
|
+
name: "Concrete block",
|
|
2223
|
+
description: "A MacBook on the corner of a concrete block. The lid opens as the camera cranes down, then holds.",
|
|
2224
|
+
device: {
|
|
2225
|
+
type: "laptop",
|
|
2226
|
+
spec: "laptop.macbook-pro-14",
|
|
2227
|
+
finish: "space-black"
|
|
2228
|
+
},
|
|
2229
|
+
backdrop: {
|
|
2230
|
+
kind: "solid",
|
|
2231
|
+
color: "#d1d1d1",
|
|
2232
|
+
tone: "light"
|
|
2233
|
+
},
|
|
2234
|
+
shadow: 0,
|
|
2235
|
+
aspect: "4:3",
|
|
2236
|
+
camera: {
|
|
2237
|
+
position: [
|
|
2238
|
+
-30,
|
|
2239
|
+
-7,
|
|
2240
|
+
60
|
|
2241
|
+
],
|
|
2242
|
+
target: [
|
|
2243
|
+
3,
|
|
2244
|
+
8,
|
|
2245
|
+
2
|
|
2246
|
+
],
|
|
2247
|
+
fov: 30
|
|
2248
|
+
},
|
|
2249
|
+
cursor: {
|
|
2250
|
+
mode: "camera",
|
|
2251
|
+
follow: .2
|
|
2252
|
+
},
|
|
2253
|
+
environment: {
|
|
2254
|
+
preset: "studio",
|
|
2255
|
+
intensity: 1
|
|
2256
|
+
},
|
|
2257
|
+
lens: { grain: .08 },
|
|
2258
|
+
set: {
|
|
2259
|
+
kind: "block",
|
|
2260
|
+
seed: 1,
|
|
2261
|
+
color: "#8a8a88"
|
|
2262
|
+
},
|
|
2263
|
+
timeline: Ot
|
|
2264
|
+
},
|
|
2265
|
+
{
|
|
2266
|
+
id: "tpl.macbook-open",
|
|
2267
|
+
name: "MacBook lid opens",
|
|
2268
|
+
description: "The lid lifts to reveal your site. Ends on a resting shot.",
|
|
2269
|
+
device: {
|
|
2270
|
+
type: "laptop",
|
|
2271
|
+
spec: "laptop.macbook-pro-14",
|
|
2272
|
+
finish: "space-black"
|
|
2273
|
+
},
|
|
2274
|
+
preset: "preset.lid-open",
|
|
2275
|
+
backdrop: {
|
|
2276
|
+
kind: "gradient",
|
|
2277
|
+
inner: "#e4ecf3",
|
|
2278
|
+
outer: "#b7c6d6",
|
|
2279
|
+
tone: "light"
|
|
2280
|
+
},
|
|
2281
|
+
aspect: "16:9",
|
|
2282
|
+
camera: {
|
|
2283
|
+
position: [
|
|
2284
|
+
0,
|
|
2285
|
+
14,
|
|
2286
|
+
70
|
|
2287
|
+
],
|
|
2288
|
+
target: [
|
|
2289
|
+
0,
|
|
2290
|
+
9,
|
|
2291
|
+
0
|
|
2292
|
+
],
|
|
2293
|
+
fov: 30
|
|
2294
|
+
},
|
|
2295
|
+
rotation: [
|
|
2296
|
+
0,
|
|
2297
|
+
-14,
|
|
2298
|
+
0
|
|
2299
|
+
],
|
|
2300
|
+
cursor: {
|
|
2301
|
+
follow: .3,
|
|
2302
|
+
mode: "camera"
|
|
2303
|
+
}
|
|
2304
|
+
},
|
|
2305
|
+
{
|
|
2306
|
+
id: "tpl.macbook-orbit",
|
|
2307
|
+
name: "MacBook orbit",
|
|
2308
|
+
description: "A slow orbit around an open laptop on a dark set.",
|
|
2309
|
+
device: {
|
|
2310
|
+
type: "laptop",
|
|
2311
|
+
spec: "laptop.macbook-pro-16",
|
|
2312
|
+
finish: "silver"
|
|
2313
|
+
},
|
|
2314
|
+
preset: "preset.orbit",
|
|
2315
|
+
backdrop: {
|
|
2316
|
+
kind: "solid",
|
|
2317
|
+
color: "#101114",
|
|
2318
|
+
tone: "dark"
|
|
2319
|
+
},
|
|
2320
|
+
shadow: .55,
|
|
2321
|
+
aspect: "16:9",
|
|
2322
|
+
camera: {
|
|
2323
|
+
position: [
|
|
2324
|
+
0,
|
|
2325
|
+
16,
|
|
2326
|
+
82
|
|
2327
|
+
],
|
|
2328
|
+
target: [
|
|
2329
|
+
0,
|
|
2330
|
+
10,
|
|
2331
|
+
0
|
|
2332
|
+
],
|
|
2333
|
+
fov: 30
|
|
2334
|
+
}
|
|
2335
|
+
},
|
|
2336
|
+
{
|
|
2337
|
+
id: "tpl.studio-display",
|
|
2338
|
+
name: "Studio Display push-in",
|
|
2339
|
+
description: "Desktop software on a 27-inch display, slow push-in.",
|
|
2340
|
+
device: {
|
|
2341
|
+
type: "monitor",
|
|
2342
|
+
spec: "monitor.studio-display",
|
|
2343
|
+
finish: "silver"
|
|
2344
|
+
},
|
|
2345
|
+
preset: "preset.push-in",
|
|
2346
|
+
backdrop: {
|
|
2347
|
+
kind: "gradient",
|
|
2348
|
+
inner: "#f6f6f4",
|
|
2349
|
+
outer: "#d5d5d1",
|
|
2350
|
+
tone: "light"
|
|
2351
|
+
},
|
|
2352
|
+
aspect: "16:9",
|
|
2353
|
+
camera: {
|
|
2354
|
+
position: [
|
|
2355
|
+
0,
|
|
2356
|
+
32,
|
|
2357
|
+
150
|
|
2358
|
+
],
|
|
2359
|
+
target: [
|
|
2360
|
+
0,
|
|
2361
|
+
29,
|
|
2362
|
+
0
|
|
2363
|
+
],
|
|
2364
|
+
fov: 28
|
|
2365
|
+
}
|
|
2366
|
+
},
|
|
2367
|
+
{
|
|
2368
|
+
id: "tpl.watch-square",
|
|
2369
|
+
name: "Watch square",
|
|
2370
|
+
description: "Square crop of a floating Apple Watch, turning. For feeds.",
|
|
2371
|
+
device: {
|
|
2372
|
+
type: "watch",
|
|
2373
|
+
spec: "watch.series-12-46",
|
|
2374
|
+
finish: "jet-black"
|
|
2375
|
+
},
|
|
2376
|
+
preset: "preset.turn",
|
|
2377
|
+
backdrop: {
|
|
2378
|
+
kind: "gradient",
|
|
2379
|
+
inner: "#e4ecf3",
|
|
2380
|
+
outer: "#b7c6d6",
|
|
2381
|
+
tone: "light"
|
|
2382
|
+
},
|
|
2383
|
+
aspect: "1:1",
|
|
2384
|
+
camera: {
|
|
2385
|
+
position: [
|
|
2386
|
+
0,
|
|
2387
|
+
.5,
|
|
2388
|
+
16
|
|
2389
|
+
],
|
|
2390
|
+
fov: 26
|
|
2391
|
+
}
|
|
2392
|
+
},
|
|
2393
|
+
{
|
|
2394
|
+
id: "tpl.ultra-reveal",
|
|
2395
|
+
name: "Ultra reveal",
|
|
2396
|
+
description: "Apple Watch Ultra scales down into frame on a dark set.",
|
|
2397
|
+
device: {
|
|
2398
|
+
type: "watch",
|
|
2399
|
+
spec: "watch.ultra-4",
|
|
2400
|
+
finish: "natural-titanium"
|
|
2401
|
+
},
|
|
2402
|
+
preset: "preset.zoom-out",
|
|
2403
|
+
backdrop: {
|
|
2404
|
+
kind: "gradient",
|
|
2405
|
+
inner: "#2c2f39",
|
|
2406
|
+
outer: "#0b0c10",
|
|
2407
|
+
tone: "dark"
|
|
2408
|
+
},
|
|
2409
|
+
shadow: .5,
|
|
2410
|
+
aspect: "9:16",
|
|
2411
|
+
camera: {
|
|
2412
|
+
position: [
|
|
2413
|
+
0,
|
|
2414
|
+
.5,
|
|
2415
|
+
18
|
|
2416
|
+
],
|
|
2417
|
+
fov: 26
|
|
2418
|
+
}
|
|
2419
|
+
}
|
|
2420
|
+
];
|
|
2421
|
+
function Nt(e) {
|
|
2422
|
+
let t = ft({
|
|
2423
|
+
name: e.name,
|
|
2424
|
+
device: e.device
|
|
2425
|
+
}), n = t.scene.devices[0];
|
|
2426
|
+
n && (e.device.type === "laptop" || e.device.type === "monitor" ? (n.transform.rotation = e.rotation ?? [
|
|
2427
|
+
0,
|
|
2428
|
+
0,
|
|
2429
|
+
0
|
|
2430
|
+
], t.interaction.idle.float = 0) : e.rotation && (n.transform.rotation = e.rotation)), t.scene.backdrop = { ...e.backdrop }, e.shadow !== void 0 && (t.scene.floor.shadow = e.shadow), e.camera && (t.scene.camera = {
|
|
2431
|
+
...t.scene.camera,
|
|
2432
|
+
...e.camera
|
|
2433
|
+
});
|
|
2434
|
+
let [r, i] = jt[e.aspect];
|
|
2435
|
+
t.export.width = r, t.export.height = i, e.environment && (t.scene.environment = {
|
|
2436
|
+
...t.scene.environment,
|
|
2437
|
+
...e.environment
|
|
2438
|
+
}), e.lens && (t.scene.camera.lens = {
|
|
2439
|
+
...t.scene.camera.lens,
|
|
2440
|
+
...e.lens
|
|
2441
|
+
}), e.set && (t.scene.set = { ...e.set }), e.float !== void 0 && (t.interaction.idle.float = e.float), e.timeline && n && (t.timeline = {
|
|
2442
|
+
...t.timeline,
|
|
2443
|
+
duration: e.timeline.duration,
|
|
2444
|
+
tracks: e.timeline.tracks.map((e) => ({
|
|
2445
|
+
...e,
|
|
2446
|
+
target: e.target.replace("$0", n.id),
|
|
2447
|
+
keys: e.keys.map((e) => ({ ...e }))
|
|
2448
|
+
}))
|
|
2449
|
+
}), e.cursor && (t.interaction.cursor = {
|
|
2450
|
+
...t.interaction.cursor,
|
|
2451
|
+
...e.cursor
|
|
2452
|
+
}), e.trigger && (t.interaction.trigger = e.trigger);
|
|
2453
|
+
let a = e.preset ? ht.find((t) => t.id === e.preset) : void 0;
|
|
2454
|
+
if (a && n) {
|
|
2455
|
+
let e = t.scene.camera;
|
|
2456
|
+
t = ke(t, a, [n.id]), t.scene.camera = {
|
|
2457
|
+
...e,
|
|
2458
|
+
lens: e.lens
|
|
2459
|
+
};
|
|
2460
|
+
}
|
|
2461
|
+
return t.export.range = [0, t.timeline.duration], {
|
|
2462
|
+
id: e.id,
|
|
2463
|
+
name: e.name,
|
|
2464
|
+
description: e.description,
|
|
2465
|
+
tags: [e.device.type],
|
|
2466
|
+
aspect: e.aspect,
|
|
2467
|
+
doc: t
|
|
2468
|
+
};
|
|
2469
|
+
}
|
|
2470
|
+
Mt.map(Nt);
|
|
2471
|
+
// ../core/src/migrations.ts
|
|
2472
|
+
var Pt = {}, Ft = class extends Error {
|
|
2473
|
+
found;
|
|
2474
|
+
constructor(e) {
|
|
2475
|
+
super(`Project schema version ${e} is newer than this build supports (1). Update the app.`), this.found = e, this.name = "UnsupportedSchemaError";
|
|
2476
|
+
}
|
|
2477
|
+
};
|
|
2478
|
+
function It(e) {
|
|
2479
|
+
if (typeof e != "object" || !e) throw TypeError("Project must be an object");
|
|
2480
|
+
let t = { ...e }, n = typeof t.schemaVersion == "number" ? t.schemaVersion : 1;
|
|
2481
|
+
if (n > 1) throw new Ft(n);
|
|
2482
|
+
for (; n < 1;) {
|
|
2483
|
+
let e = Pt[n];
|
|
2484
|
+
if (!e) throw Error(`No migration from schema version ${n}`);
|
|
2485
|
+
t = e(t), n++, t.schemaVersion = n;
|
|
2486
|
+
}
|
|
2487
|
+
return lt(t);
|
|
2488
|
+
}
|
|
2489
|
+
// ../devices/src/primitives/noise.ts
|
|
2490
|
+
var Lt = {
|
|
2491
|
+
noise: {
|
|
2492
|
+
min: 0,
|
|
2493
|
+
max: 1,
|
|
2494
|
+
default: .3,
|
|
2495
|
+
unit: "",
|
|
2496
|
+
label: "Surface noise"
|
|
2497
|
+
},
|
|
2498
|
+
noiseScale: {
|
|
2499
|
+
min: .1,
|
|
2500
|
+
max: 5,
|
|
2501
|
+
default: .4,
|
|
2502
|
+
unit: "mm",
|
|
2503
|
+
label: "Noise size"
|
|
2504
|
+
}
|
|
2505
|
+
};
|
|
2506
|
+
function Rt() {
|
|
2507
|
+
return {
|
|
2508
|
+
amount: { value: Lt.noise.default },
|
|
2509
|
+
grain: { value: Lt.noiseScale.default / 10 }
|
|
2510
|
+
};
|
|
2511
|
+
}
|
|
2512
|
+
var zt = "\nvarying vec3 vSurfaceNoisePos;\nvarying vec3 vSurfaceNoiseX;\nvarying vec3 vSurfaceNoiseY;\nvarying vec3 vSurfaceNoiseZ;\n", Bt = "\nvSurfaceNoisePos = position;\nvSurfaceNoiseX = normalMatrix[0];\nvSurfaceNoiseY = normalMatrix[1];\nvSurfaceNoiseZ = normalMatrix[2];\n", Vt = "\nuniform float uSurfaceNoiseAmount;\nuniform float uSurfaceNoiseGrain;\nvarying vec3 vSurfaceNoisePos;\nvarying vec3 vSurfaceNoiseX;\nvarying vec3 vSurfaceNoiseY;\nvarying vec3 vSurfaceNoiseZ;\n\nfloat surfaceNoiseHash( vec3 p ) {\n p = fract( p * 0.3183099 + 0.1 );\n p *= 17.0;\n return fract( p.x * p.y * p.z * ( p.x + p.y + p.z ) );\n}\n\n// Value noise with its analytic gradient (Inigo Quilez): x = value 0..1, yzw = d/dp.\nvec4 surfaceNoiseD( vec3 x ) {\n vec3 i = floor( x );\n vec3 w = fract( x );\n vec3 u = w * w * w * ( w * ( w * 6.0 - 15.0 ) + 10.0 );\n vec3 du = 30.0 * w * w * ( w * ( w - 2.0 ) + 1.0 );\n float a = surfaceNoiseHash( i );\n float b = surfaceNoiseHash( i + vec3( 1.0, 0.0, 0.0 ) );\n float c = surfaceNoiseHash( i + vec3( 0.0, 1.0, 0.0 ) );\n float d = surfaceNoiseHash( i + vec3( 1.0, 1.0, 0.0 ) );\n float e = surfaceNoiseHash( i + vec3( 0.0, 0.0, 1.0 ) );\n float f = surfaceNoiseHash( i + vec3( 1.0, 0.0, 1.0 ) );\n float g = surfaceNoiseHash( i + vec3( 0.0, 1.0, 1.0 ) );\n float h = surfaceNoiseHash( i + vec3( 1.0, 1.0, 1.0 ) );\n float k1 = b - a;\n float k2 = c - a;\n float k3 = e - a;\n float k4 = a - b - c + d;\n float k5 = a - c - e + g;\n float k6 = a - b - e + f;\n float k7 = - a + b + c - d + e - f - g + h;\n return vec4(\n a + k1 * u.x + k2 * u.y + k3 * u.z + k4 * u.x * u.y + k5 * u.y * u.z + k6 * u.z * u.x + k7 * u.x * u.y * u.z,\n du * vec3(\n k1 + k4 * u.y + k6 * u.z + k7 * u.y * u.z,\n k2 + k5 * u.z + k4 * u.x + k7 * u.z * u.x,\n k3 + k6 * u.x + k5 * u.y + k7 * u.x * u.y\n )\n );\n}\n", Ht = "\n#include <roughnessmap_fragment>\nfloat surfaceNoiseFootprint = length( fwidth( vSurfaceNoisePos ) ) / max( uSurfaceNoiseGrain, 1e-4 );\nfloat surfaceNoiseFade1 = 1.0 - smoothstep( 0.6, 1.6, surfaceNoiseFootprint );\nfloat surfaceNoiseFade2 = 1.0 - smoothstep( 0.6, 1.6, surfaceNoiseFootprint * 2.13 );\n// Each octave samples a rotated lattice so the cells don't line up with the device's\n// flat faces; gradients come back through the transposed rotation.\nmat3 surfaceNoiseR = mat3( 0.00, 0.80, 0.60, -0.80, 0.36, -0.48, -0.60, -0.48, 0.64 );\nvec3 surfaceNoiseP = surfaceNoiseR * vSurfaceNoisePos / max( uSurfaceNoiseGrain, 1e-4 );\nvec4 surfaceNoise1 = surfaceNoiseD( surfaceNoiseP );\nvec4 surfaceNoise2 = surfaceNoiseD( surfaceNoiseR * surfaceNoiseP * 2.13 + 17.0 );\nfloat surfaceNoiseValue = ( surfaceNoise1.x - 0.5 ) * surfaceNoiseFade1 + ( surfaceNoise2.x - 0.5 ) * 0.5 * surfaceNoiseFade2;\n// Slope per unit amount, in object space (gradients are per cell; cells are one grain).\nmat3 surfaceNoiseRt = transpose( surfaceNoiseR );\nvec3 surfaceNoiseGrad = surfaceNoiseRt * ( surfaceNoise1.yzw * surfaceNoiseFade1 + surfaceNoiseRt * surfaceNoise2.yzw * 2.13 * 0.5 * surfaceNoiseFade2 ) * 0.11;\nroughnessFactor = clamp(\n roughnessFactor + uSurfaceNoiseAmount * ( 0.12 * surfaceNoiseValue + 0.05 * ( 1.0 - surfaceNoiseFade1 ) ),\n 0.03,\n 1.0\n);\n", Ut = "\n#include <normal_fragment_maps>\n{\n vec3 g = mat3( vSurfaceNoiseX, vSurfaceNoiseY, vSurfaceNoiseZ ) * surfaceNoiseGrad * uSurfaceNoiseAmount;\n normal = normalize( normal - ( g - dot( g, normal ) * normal ) );\n}\n";
|
|
2513
|
+
function Wt(e, t) {
|
|
2514
|
+
e.userData.surfaceNoise = t, e.onBeforeCompile = (e) => {
|
|
2515
|
+
e.uniforms.uSurfaceNoiseAmount = t.amount, e.uniforms.uSurfaceNoiseGrain = t.grain, e.vertexShader = e.vertexShader.replace("#include <common>", `#include <common>\n${zt}`).replace("#include <begin_vertex>", `#include <begin_vertex>\n${Bt}`), e.fragmentShader = e.fragmentShader.replace("#include <common>", `#include <common>\n${Vt}`).replace("#include <roughnessmap_fragment>", Ht).replace("#include <normal_fragment_maps>", Ut);
|
|
2516
|
+
}, e.customProgramCacheKey = () => "surface-noise";
|
|
2517
|
+
}
|
|
2518
|
+
function Gt(e) {
|
|
2519
|
+
let t = /* @__PURE__ */ new Set();
|
|
2520
|
+
e.group.traverse((e) => {
|
|
2521
|
+
let n = e.material;
|
|
2522
|
+
for (let e of Array.isArray(n) ? n : n ? [n] : []) {
|
|
2523
|
+
let n = e.userData.surfaceNoise;
|
|
2524
|
+
n && t.add(n);
|
|
2525
|
+
}
|
|
2526
|
+
});
|
|
2527
|
+
let n = e.setParam;
|
|
2528
|
+
return {
|
|
2529
|
+
...e,
|
|
2530
|
+
params: {
|
|
2531
|
+
...e.params,
|
|
2532
|
+
...Lt
|
|
2533
|
+
},
|
|
2534
|
+
setParam(e, r) {
|
|
2535
|
+
if (e === "noise") for (let e of t) e.amount.value = r;
|
|
2536
|
+
else if (e === "noiseScale") for (let e of t) e.grain.value = r / 10;
|
|
2537
|
+
else n(e, r);
|
|
2538
|
+
}
|
|
2539
|
+
};
|
|
2540
|
+
}
|
|
2541
|
+
// ../devices/src/primitives/materials.ts
|
|
2542
|
+
function Kt(e) {
|
|
2543
|
+
let n = {
|
|
2544
|
+
frame: new d({
|
|
2545
|
+
metalness: 1,
|
|
2546
|
+
anisotropy: .4
|
|
2547
|
+
}),
|
|
2548
|
+
back: new d({
|
|
2549
|
+
roughness: .45,
|
|
2550
|
+
clearcoat: .8,
|
|
2551
|
+
clearcoatRoughness: .28
|
|
2552
|
+
}),
|
|
2553
|
+
island: new d({
|
|
2554
|
+
metalness: 1,
|
|
2555
|
+
roughness: .3
|
|
2556
|
+
}),
|
|
2557
|
+
glass: new d({
|
|
2558
|
+
color: 131587,
|
|
2559
|
+
roughness: .6,
|
|
2560
|
+
specularIntensity: 0,
|
|
2561
|
+
clearcoat: 1,
|
|
2562
|
+
clearcoatRoughness: .02
|
|
2563
|
+
}),
|
|
2564
|
+
display: new d({
|
|
2565
|
+
color: 0,
|
|
2566
|
+
emissive: 16777215,
|
|
2567
|
+
roughness: 1,
|
|
2568
|
+
specularIntensity: 0,
|
|
2569
|
+
clearcoat: 1,
|
|
2570
|
+
clearcoatRoughness: .02,
|
|
2571
|
+
toneMapped: !1
|
|
2572
|
+
}),
|
|
2573
|
+
bezel: new t({
|
|
2574
|
+
color: 328966,
|
|
2575
|
+
roughness: .55
|
|
2576
|
+
}),
|
|
2577
|
+
dark: new t({
|
|
2578
|
+
color: 1710620,
|
|
2579
|
+
roughness: .65
|
|
2580
|
+
}),
|
|
2581
|
+
lens: new d({
|
|
2582
|
+
color: 329224,
|
|
2583
|
+
roughness: .08,
|
|
2584
|
+
clearcoat: 1,
|
|
2585
|
+
clearcoatRoughness: .02,
|
|
2586
|
+
iridescence: 1,
|
|
2587
|
+
iridescenceIOR: 1.8,
|
|
2588
|
+
iridescenceThicknessRange: [220, 480]
|
|
2589
|
+
}),
|
|
2590
|
+
lensRing: new d({
|
|
2591
|
+
metalness: 1,
|
|
2592
|
+
roughness: .12
|
|
2593
|
+
}),
|
|
2594
|
+
pupil: new d({
|
|
2595
|
+
color: 0,
|
|
2596
|
+
roughness: .3,
|
|
2597
|
+
clearcoat: 1,
|
|
2598
|
+
clearcoatRoughness: .05
|
|
2599
|
+
}),
|
|
2600
|
+
flash: new d({
|
|
2601
|
+
color: 15261640,
|
|
2602
|
+
roughness: .45,
|
|
2603
|
+
clearcoat: 1,
|
|
2604
|
+
clearcoatRoughness: .1
|
|
2605
|
+
}),
|
|
2606
|
+
logo: new d({
|
|
2607
|
+
metalness: 1,
|
|
2608
|
+
roughness: .08,
|
|
2609
|
+
side: 2
|
|
2610
|
+
}),
|
|
2611
|
+
accent: new d({
|
|
2612
|
+
color: 16738816,
|
|
2613
|
+
roughness: .5
|
|
2614
|
+
}),
|
|
2615
|
+
band: new d({
|
|
2616
|
+
color: 1776413,
|
|
2617
|
+
roughness: .75,
|
|
2618
|
+
sheen: .4,
|
|
2619
|
+
sheenRoughness: .8
|
|
2620
|
+
})
|
|
2621
|
+
}, r = Rt();
|
|
2622
|
+
for (let e of [
|
|
2623
|
+
n.frame,
|
|
2624
|
+
n.back,
|
|
2625
|
+
n.island
|
|
2626
|
+
]) Wt(e, r);
|
|
2627
|
+
return qt(n, e), n;
|
|
2628
|
+
}
|
|
2629
|
+
function qt(e, t) {
|
|
2630
|
+
switch (e.frame.color.set(t.frame), e.frame.roughness = t.frameRoughness, e.lensRing.color.set(t.frame).lerp(new p(16777215), .35), e.island.color.set(t.frame), e.back.color.set(t.back), t.backMaterial ?? "glass") {
|
|
2631
|
+
case "metal":
|
|
2632
|
+
e.back.metalness = 1, e.back.roughness = t.frameRoughness + .05, e.back.clearcoat = 0;
|
|
2633
|
+
break;
|
|
2634
|
+
case "ceramic":
|
|
2635
|
+
e.back.metalness = 0, e.back.roughness = .2, e.back.clearcoat = 1, e.back.clearcoatRoughness = .05;
|
|
2636
|
+
break;
|
|
2637
|
+
default: e.back.metalness = 0, e.back.roughness = .45, e.back.clearcoat = .8, e.back.clearcoatRoughness = .28;
|
|
2638
|
+
}
|
|
2639
|
+
e.logo.color.set(t.frame).lerp(new p(16777215), .25), t.accent && e.accent.color.set(t.accent);
|
|
2640
|
+
}
|
|
2641
|
+
function Jt(e, t, n) {
|
|
2642
|
+
return {
|
|
2643
|
+
mesh: e,
|
|
2644
|
+
aspect: t,
|
|
2645
|
+
setTexture(e, r, i = "cover", a) {
|
|
2646
|
+
if (e) {
|
|
2647
|
+
let { repeat: n, offset: o } = ee(r, t, i, a);
|
|
2648
|
+
e.wrapS = e.wrapT = h, e.repeat.set(n[0], n[1]), e.offset.set(o[0], o[1]);
|
|
2649
|
+
}
|
|
2650
|
+
n.display.emissiveMap = e, n.display.needsUpdate = !0;
|
|
2651
|
+
},
|
|
2652
|
+
setGlare(e, t = "matte") {
|
|
2653
|
+
let r = n.display;
|
|
2654
|
+
t === "glossy" ? (r.clearcoat = 0, r.roughness = .04, r.specularIntensity = e, r.ior = 1.2) : (r.clearcoat = t === "matte" ? e : 0, r.roughness = 1, r.specularIntensity = 0, r.ior = 1.5), n.glass.clearcoat = .25 + (t === "clean" ? 0 : e * .75);
|
|
2655
|
+
}
|
|
2656
|
+
};
|
|
2657
|
+
}
|
|
2658
|
+
// ../devices/src/primitives/squircle.ts
|
|
2659
|
+
function Yt(e, t, n, r = 2, a = 32) {
|
|
2660
|
+
return new i(Xt(e, t, n, r, a));
|
|
2661
|
+
}
|
|
2662
|
+
function Xt(e, t, n, r = 2, i = 32) {
|
|
2663
|
+
let a = Math.min(n, e / 2, t / 2), o = -e / 2 + a, s = e / 2 - a, l = -t / 2 + a, u = t / 2 - a, d = [
|
|
2664
|
+
[
|
|
2665
|
+
s,
|
|
2666
|
+
l,
|
|
2667
|
+
-Math.PI / 2
|
|
2668
|
+
],
|
|
2669
|
+
[
|
|
2670
|
+
s,
|
|
2671
|
+
u,
|
|
2672
|
+
0
|
|
2673
|
+
],
|
|
2674
|
+
[
|
|
2675
|
+
o,
|
|
2676
|
+
u,
|
|
2677
|
+
Math.PI / 2
|
|
2678
|
+
],
|
|
2679
|
+
[
|
|
2680
|
+
o,
|
|
2681
|
+
l,
|
|
2682
|
+
Math.PI
|
|
2683
|
+
]
|
|
2684
|
+
], f = [];
|
|
2685
|
+
for (let [e, t, n] of d) for (let o = 0; o <= i; o++) {
|
|
2686
|
+
let s = n + o / i * (Math.PI / 2), l = Math.cos(s), u = Math.sin(s), d = new c(e + a * Math.sign(l) * Math.abs(l) ** (2 / r), t + a * Math.sign(u) * Math.abs(u) ** (2 / r)), p = f[f.length - 1];
|
|
2687
|
+
(!p || p.distanceToSquared(d) > 1e-12) && f.push(d);
|
|
2688
|
+
}
|
|
2689
|
+
let p = f[0], m = f[f.length - 1];
|
|
2690
|
+
return p && m && p !== m && p.distanceToSquared(m) < 1e-12 && f.pop(), f;
|
|
2691
|
+
}
|
|
2692
|
+
// ../devices/src/primitives/shapes.ts
|
|
2693
|
+
var Zt = {
|
|
2694
|
+
low: {
|
|
2695
|
+
corner: 12,
|
|
2696
|
+
bevel: 4,
|
|
2697
|
+
round: 24
|
|
2698
|
+
},
|
|
2699
|
+
high: {
|
|
2700
|
+
corner: 32,
|
|
2701
|
+
bevel: 10,
|
|
2702
|
+
round: 64
|
|
2703
|
+
}
|
|
2704
|
+
}, Z = .002;
|
|
2705
|
+
function Qt({ width: e, height: t, depth: n, radius: r, exponent: i = 2, edge: a, quality: o }) {
|
|
2706
|
+
let s = Math.min(a, n / 2 - 1e-4), c = new _(Yt(e - 2 * s, t - 2 * s, Math.max(r - s, .001), i, o.corner), {
|
|
2707
|
+
depth: n - 2 * s,
|
|
2708
|
+
bevelEnabled: !0,
|
|
2709
|
+
bevelThickness: s,
|
|
2710
|
+
bevelSize: s,
|
|
2711
|
+
bevelSegments: o.bevel
|
|
2712
|
+
});
|
|
2713
|
+
return c.translate(0, 0, -(n - 2 * s) / 2), c;
|
|
2714
|
+
}
|
|
2715
|
+
function Q(e, t, n, r, i) {
|
|
2716
|
+
return new o(Yt(e, t, n, r, i.corner));
|
|
2717
|
+
}
|
|
2718
|
+
function $(e, t, n, i = {}) {
|
|
2719
|
+
let a = new r(t, n);
|
|
2720
|
+
return a.castShadow = !0, a.position.set(i.x ?? 0, i.y ?? 0, i.z ?? 0), a.rotation.set(i.rx ?? 0, i.ry ?? 0, i.rz ?? 0), e.add(a), a;
|
|
2721
|
+
}
|
|
2722
|
+
function $t(e, t, n, r, i) {
|
|
2723
|
+
let a = r === "x" ? e : t, o = r === "x" ? t : e, s = Math.min(t, n) * .3, c = new _(Yt(a - 2 * s, o - 2 * s, Math.min(a, o) / 2 - s, 2, Math.max(6, i.corner / 2)), {
|
|
2724
|
+
depth: n - 2 * s,
|
|
2725
|
+
bevelEnabled: !0,
|
|
2726
|
+
bevelThickness: s,
|
|
2727
|
+
bevelSize: s,
|
|
2728
|
+
bevelSegments: 4
|
|
2729
|
+
});
|
|
2730
|
+
return c.translate(0, 0, -(n - 2 * s) / 2), c;
|
|
2731
|
+
}
|
|
2732
|
+
// ../devices/src/primitives/sweep.ts
|
|
2733
|
+
function en({ width: e, height: t, radius: n, exponent: r, segments: i, profile: a }) {
|
|
2734
|
+
let o = Xt(e, t, n, r, i), u = o.length, d = o.map((e, t) => {
|
|
2735
|
+
let n = o[(t - 1 + u) % u], r = o[(t + 1) % u];
|
|
2736
|
+
return new c(r.y - n.y, -(r.x - n.x)).normalize();
|
|
2737
|
+
}), p = u + 1, m = a.length, h = new Float32Array(p * m * 3), g = new Float32Array(p * m * 2), _ = [0];
|
|
2738
|
+
for (let e = 1; e < p; e++) _.push(_[e - 1] + o[e % u].distanceTo(o[(e - 1) % u]));
|
|
2739
|
+
let v = [0];
|
|
2740
|
+
for (let e = 1; e < m; e++) {
|
|
2741
|
+
let [t, n] = a[e - 1], [r, i] = a[e];
|
|
2742
|
+
v.push(v[e - 1] + Math.hypot(r - t, i - n));
|
|
2743
|
+
}
|
|
2744
|
+
for (let e = 0; e < m; e++) {
|
|
2745
|
+
let [t, n] = a[e];
|
|
2746
|
+
for (let r = 0; r < p; r++) {
|
|
2747
|
+
let i = o[r % u], a = d[r % u], s = e * p + r;
|
|
2748
|
+
h[s * 3] = i.x - a.x * t, h[s * 3 + 1] = i.y - a.y * t, h[s * 3 + 2] = n, g[s * 2] = _[r], g[s * 2 + 1] = v[e];
|
|
2749
|
+
}
|
|
2750
|
+
}
|
|
2751
|
+
let y = [];
|
|
2752
|
+
for (let e = 0; e < m - 1; e++) for (let t = 0; t < p - 1; t++) {
|
|
2753
|
+
let n = e * p + t, r = n + 1, i = n + p, a = i + 1;
|
|
2754
|
+
y.push(n, i, r, r, i, a);
|
|
2755
|
+
}
|
|
2756
|
+
let b = new f();
|
|
2757
|
+
b.setAttribute("position", new l(h, 3)), b.setAttribute("uv", new l(g, 2)), b.setIndex(y), b.computeVertexNormals();
|
|
2758
|
+
let x = b.attributes.normal, S = new s();
|
|
2759
|
+
for (let e = 0; e < m; e++) {
|
|
2760
|
+
let t = e * p, n = t + p - 1;
|
|
2761
|
+
S.set(x.getX(t) + x.getX(n), x.getY(t) + x.getY(n), x.getZ(t) + x.getZ(n)).normalize(), x.setXYZ(t, S.x, S.y, S.z), x.setXYZ(n, S.x, S.y, S.z);
|
|
2762
|
+
}
|
|
2763
|
+
return b;
|
|
2764
|
+
}
|
|
2765
|
+
function tn(e, t, n = 8) {
|
|
2766
|
+
let r = [];
|
|
2767
|
+
for (let i = 0; i <= n; i++) {
|
|
2768
|
+
let a = i / n * (Math.PI / 2);
|
|
2769
|
+
r.push([e - e * Math.sin(a), t - e + e * Math.cos(a)]);
|
|
2770
|
+
}
|
|
2771
|
+
return r;
|
|
2772
|
+
}
|
|
2773
|
+
// ../devices/src/primitives/uv.ts
|
|
2774
|
+
function nn(e) {
|
|
2775
|
+
e.computeBoundingBox();
|
|
2776
|
+
let t = e.boundingBox, n = e.attributes.position, r = e.attributes.uv;
|
|
2777
|
+
if (!t || !n || !r) return e;
|
|
2778
|
+
for (let e = 0; e < n.count; e++) r.setXY(e, (n.getX(e) - t.min.x) / (t.max.x - t.min.x), (n.getY(e) - t.min.y) / (t.max.y - t.min.y));
|
|
2779
|
+
return r.needsUpdate = !0, e;
|
|
2780
|
+
}
|
|
2781
|
+
// ../devices/src/phone/build.ts
|
|
2782
|
+
var rn = new p(16777215);
|
|
2783
|
+
function an() {
|
|
2784
|
+
return {
|
|
2785
|
+
logo: new d({
|
|
2786
|
+
roughness: .35,
|
|
2787
|
+
specularIntensity: .4,
|
|
2788
|
+
clearcoat: .3,
|
|
2789
|
+
clearcoatRoughness: .15,
|
|
2790
|
+
side: 2
|
|
2791
|
+
}),
|
|
2792
|
+
seam: new t({ roughness: .9 }),
|
|
2793
|
+
cover: new d({
|
|
2794
|
+
color: 0,
|
|
2795
|
+
roughness: .02,
|
|
2796
|
+
ior: 1.77,
|
|
2797
|
+
specularIntensity: .45,
|
|
2798
|
+
iridescence: 1,
|
|
2799
|
+
iridescenceIOR: 1.38,
|
|
2800
|
+
iridescenceThicknessRange: [95, 130],
|
|
2801
|
+
transparent: !0,
|
|
2802
|
+
blending: 2,
|
|
2803
|
+
depthWrite: !1
|
|
2804
|
+
}),
|
|
2805
|
+
well: new d({
|
|
2806
|
+
color: 131587,
|
|
2807
|
+
roughness: .55,
|
|
2808
|
+
specularIntensity: .4
|
|
2809
|
+
}),
|
|
2810
|
+
control: new d({
|
|
2811
|
+
color: 921104,
|
|
2812
|
+
roughness: .1,
|
|
2813
|
+
clearcoat: 1,
|
|
2814
|
+
clearcoatRoughness: .03
|
|
2815
|
+
})
|
|
2816
|
+
};
|
|
2817
|
+
}
|
|
2818
|
+
function on(e, t, n) {
|
|
2819
|
+
qt(e, n), e.frame.anisotropy = 0, e.lensRing.color.set(n.frame).lerp(rn, .06), e.lensRing.roughness = .24, e.back.roughness = .55, e.back.specularIntensity = .6, e.back.clearcoat = .2, e.back.clearcoatRoughness = .4, t.logo.color.set(n.back).multiplyScalar(.78), t.seam.color.set(n.back).multiplyScalar(.3);
|
|
2820
|
+
}
|
|
2821
|
+
function sn(e, t, n = "high") {
|
|
2822
|
+
let r = Zt[n], { width: i, height: a, depth: o, rimInset: s, bezel: c } = e, { radius: l, exponent: u } = e.corner, d = Kt(t), f = an();
|
|
2823
|
+
on(d, f, t);
|
|
2824
|
+
let p = new v();
|
|
2825
|
+
$(p, en({
|
|
2826
|
+
width: i,
|
|
2827
|
+
height: a,
|
|
2828
|
+
radius: l,
|
|
2829
|
+
exponent: u,
|
|
2830
|
+
segments: r.corner,
|
|
2831
|
+
profile: e.edgeProfile
|
|
2832
|
+
}), d.frame);
|
|
2833
|
+
for (let t of e.buttons) ln(e, t, d, f, p, r);
|
|
2834
|
+
let m = new v();
|
|
2835
|
+
m.position.z = o / 2, p.add(m), $(m, Qt({
|
|
2836
|
+
width: i - 2 * s,
|
|
2837
|
+
height: a - 2 * s,
|
|
2838
|
+
radius: l - s,
|
|
2839
|
+
exponent: u,
|
|
2840
|
+
depth: .05,
|
|
2841
|
+
edge: .022,
|
|
2842
|
+
quality: r
|
|
2843
|
+
}), d.glass, { z: -.05 / 2 });
|
|
2844
|
+
let h = i - 2 * c, _ = a - 2 * c, b = $(m, nn(Q(h, _, l - c, u, r)), d.display, { z: Z * 2 });
|
|
2845
|
+
$(m, Q(e.island.width, e.island.height, e.island.height / 2, 2, r), d.bezel, {
|
|
2846
|
+
y: _ / 2 - e.island.fromTop - e.island.height / 2,
|
|
2847
|
+
z: Z * 3
|
|
2848
|
+
});
|
|
2849
|
+
let [x, S] = e.edgeProfile[e.edgeProfile.length - 1], C = new v();
|
|
2850
|
+
C.position.z = S, C.rotation.y = Math.PI, p.add(C), $(C, Q(i - 2 * x, a - 2 * x, l - x, u, r), d.frame), un(e, d, f, C, r), dn(e, d, f, C, r);
|
|
2851
|
+
let ee = Jt(b, h / _, d);
|
|
2852
|
+
return {
|
|
2853
|
+
group: p,
|
|
2854
|
+
screens: [ee],
|
|
2855
|
+
bounds: new g().setFromObject(p),
|
|
2856
|
+
params: {},
|
|
2857
|
+
restsOnFloor: !1,
|
|
2858
|
+
setParam() {},
|
|
2859
|
+
setFinish: (e) => on(d, f, e),
|
|
2860
|
+
setGlare: (e, t) => ee.setGlare(e, t),
|
|
2861
|
+
dispose: () => {
|
|
2862
|
+
y(p);
|
|
2863
|
+
for (let e of Object.values(f)) e.dispose();
|
|
2864
|
+
}
|
|
2865
|
+
};
|
|
2866
|
+
}
|
|
2867
|
+
function cn(e, t, n) {
|
|
2868
|
+
return {
|
|
2869
|
+
x: -e.width / 2 + t,
|
|
2870
|
+
y: e.height / 2 - n
|
|
2871
|
+
};
|
|
2872
|
+
}
|
|
2873
|
+
function ln(e, t, n, r, i, a) {
|
|
2874
|
+
let o = e.height / 2 - t.fromTop, s = e.width / 2 * t.side;
|
|
2875
|
+
if (t.kind === "camera") {
|
|
2876
|
+
$(i, $t(t.length, .304, .03, "y", a), n.lensRing, {
|
|
2877
|
+
x: s - t.side * .012,
|
|
2878
|
+
y: o,
|
|
2879
|
+
ry: Math.PI / 2
|
|
2880
|
+
}), $(i, $t(t.length - .046, .259, .03, "y", a), r.control, {
|
|
2881
|
+
x: s - t.side * .006,
|
|
2882
|
+
y: o,
|
|
2883
|
+
ry: Math.PI / 2
|
|
2884
|
+
});
|
|
2885
|
+
return;
|
|
2886
|
+
}
|
|
2887
|
+
let c = .146;
|
|
2888
|
+
$(i, $t(t.length, .267, c, "y", a), n.frame, {
|
|
2889
|
+
x: s + t.side * (.046 - c / 2),
|
|
2890
|
+
y: o,
|
|
2891
|
+
ry: Math.PI / 2
|
|
2892
|
+
});
|
|
2893
|
+
}
|
|
2894
|
+
function un(e, t, n, r, i) {
|
|
2895
|
+
let { fromTop: a, margin: o, radius: s } = e.backPanel, c = e.width - 2 * o, l = e.height - a - o, u = e.height / 2 - a - l / 2, d = .012;
|
|
2896
|
+
$(r, Q(c + 2 * d, l + 2 * d, s + d, e.corner.exponent, i), n.seam, {
|
|
2897
|
+
y: u,
|
|
2898
|
+
z: Z
|
|
2899
|
+
}), $(r, Q(c, l, s, e.corner.exponent, i), t.back, {
|
|
2900
|
+
y: u,
|
|
2901
|
+
z: Z * 2
|
|
2902
|
+
}), e.branding !== !1 && $(r, C(e.logo.height), n.logo, {
|
|
2903
|
+
y: e.height / 2 - e.logo.fromTop,
|
|
2904
|
+
z: Z * 3
|
|
2905
|
+
});
|
|
2906
|
+
}
|
|
2907
|
+
function dn(e, t, n, r, i) {
|
|
2908
|
+
let { height: o, margin: s, raise: c, radius: l, lip: d } = e.plateau, f = e.width - 2 * s, p = e.height / 2 - s - o / 2, m = e.corner.exponent, h = [...tn(d, c, i.bevel), [0, -.02]];
|
|
2909
|
+
$(r, en({
|
|
2910
|
+
width: f,
|
|
2911
|
+
height: o,
|
|
2912
|
+
radius: l,
|
|
2913
|
+
exponent: m,
|
|
2914
|
+
segments: i.corner,
|
|
2915
|
+
profile: h
|
|
2916
|
+
}), t.frame, { y: p }), $(r, Q(f - 2 * d, o - 2 * d, l - d, m, i), t.frame, {
|
|
2917
|
+
y: p,
|
|
2918
|
+
z: c
|
|
2919
|
+
});
|
|
2920
|
+
let g = fn(e.lens.radius, i.round);
|
|
2921
|
+
for (let [i, a] of e.lens.centres) {
|
|
2922
|
+
let o = cn(e, i, a), s = new v();
|
|
2923
|
+
s.position.set(o.x, o.y, c), s.rotation.x = Math.PI / 2, r.add(s), $(s, g.housing, t.lensRing), $(s, g.well, n.well), $(s, g.element, t.lens), $(s, g.cover, n.cover).renderOrder = 1;
|
|
2924
|
+
}
|
|
2925
|
+
let _ = cn(e, e.flash.x, e.flash.y);
|
|
2926
|
+
$(r, new a(e.flash.radius * .86, e.flash.radius, i.round), t.lensRing, {
|
|
2927
|
+
..._,
|
|
2928
|
+
z: c + Z
|
|
2929
|
+
}), $(r, new u(e.flash.radius * .86, i.round), t.flash, {
|
|
2930
|
+
..._,
|
|
2931
|
+
z: c + Z
|
|
2932
|
+
});
|
|
2933
|
+
let y = cn(e, e.lidar.x, e.lidar.y);
|
|
2934
|
+
$(r, new u(e.lidar.radius, i.round), t.pupil, {
|
|
2935
|
+
...y,
|
|
2936
|
+
z: c + Z
|
|
2937
|
+
});
|
|
2938
|
+
let b = cn(e, e.mic.x, e.mic.y);
|
|
2939
|
+
$(r, new u(e.mic.radius, 16), t.bezel, {
|
|
2940
|
+
...b,
|
|
2941
|
+
z: c + Z
|
|
2942
|
+
});
|
|
2943
|
+
}
|
|
2944
|
+
function fn(e, t) {
|
|
2945
|
+
let r = e / .833, i = (e) => new n(e.map(([e, t]) => new c(e * r, t * r)), t);
|
|
2946
|
+
return {
|
|
2947
|
+
housing: i([
|
|
2948
|
+
[.833, -.02],
|
|
2949
|
+
[.833, .137],
|
|
2950
|
+
[.83, .152],
|
|
2951
|
+
[.822, .165],
|
|
2952
|
+
[.81, .176],
|
|
2953
|
+
[.795, .185],
|
|
2954
|
+
[.775, .189],
|
|
2955
|
+
[.75, .19],
|
|
2956
|
+
[.711, .19],
|
|
2957
|
+
[.711, .03],
|
|
2958
|
+
[.67, .03]
|
|
2959
|
+
]),
|
|
2960
|
+
well: i([
|
|
2961
|
+
[.712, .035],
|
|
2962
|
+
[.646, .035],
|
|
2963
|
+
[.646, .183],
|
|
2964
|
+
[.482, .183],
|
|
2965
|
+
[.47, .17],
|
|
2966
|
+
[.42, .11],
|
|
2967
|
+
[.325, .105],
|
|
2968
|
+
[.3, .075],
|
|
2969
|
+
[.275, .056],
|
|
2970
|
+
[.256, -.035]
|
|
2971
|
+
]),
|
|
2972
|
+
element: i([
|
|
2973
|
+
[.256, -.035],
|
|
2974
|
+
[.24, -.02],
|
|
2975
|
+
[.2, .01],
|
|
2976
|
+
[.15, .035],
|
|
2977
|
+
[.1, .05],
|
|
2978
|
+
[.05, .058],
|
|
2979
|
+
[0, .06]
|
|
2980
|
+
]),
|
|
2981
|
+
cover: i([
|
|
2982
|
+
[.711, .056],
|
|
2983
|
+
[.717, .2],
|
|
2984
|
+
[.712, .205],
|
|
2985
|
+
[.705, .209],
|
|
2986
|
+
[.69, .212],
|
|
2987
|
+
[0, .212]
|
|
2988
|
+
])
|
|
2989
|
+
};
|
|
2990
|
+
}
|
|
2991
|
+
// ../devices/src/phone/finishes.ts
|
|
2992
|
+
var pn = {
|
|
2993
|
+
black: {
|
|
2994
|
+
label: "Black",
|
|
2995
|
+
frame: "#2e2f33",
|
|
2996
|
+
back: "#1b1c20",
|
|
2997
|
+
frameRoughness: .4,
|
|
2998
|
+
backMaterial: "glass"
|
|
2999
|
+
},
|
|
3000
|
+
silver: {
|
|
3001
|
+
label: "Silver",
|
|
3002
|
+
frame: "#cfd0d2",
|
|
3003
|
+
back: "#d2d2d0",
|
|
3004
|
+
frameRoughness: .42,
|
|
3005
|
+
backMaterial: "glass"
|
|
3006
|
+
},
|
|
3007
|
+
glacier: {
|
|
3008
|
+
label: "Glacier",
|
|
3009
|
+
frame: "#bccddb",
|
|
3010
|
+
back: "#ccdae6",
|
|
3011
|
+
frameRoughness: .42,
|
|
3012
|
+
backMaterial: "glass"
|
|
3013
|
+
},
|
|
3014
|
+
burgundy: {
|
|
3015
|
+
label: "Burgundy",
|
|
3016
|
+
frame: "#553a3e",
|
|
3017
|
+
back: "#3d2226",
|
|
3018
|
+
frameRoughness: .38,
|
|
3019
|
+
backMaterial: "glass"
|
|
3020
|
+
}
|
|
3021
|
+
}, mn = {
|
|
3022
|
+
depth: .875,
|
|
3023
|
+
corner: {
|
|
3024
|
+
radius: 1.4,
|
|
3025
|
+
exponent: 2.2
|
|
3026
|
+
},
|
|
3027
|
+
edgeProfile: [
|
|
3028
|
+
[1.22, 4.7],
|
|
3029
|
+
[1.16, 4.81],
|
|
3030
|
+
[.92, 4.78],
|
|
3031
|
+
[.77, 4.69],
|
|
3032
|
+
[.56, 4.47],
|
|
3033
|
+
[.38, 4.21],
|
|
3034
|
+
[.25, 3.92],
|
|
3035
|
+
[.16, 3.62],
|
|
3036
|
+
[.1, 3.28],
|
|
3037
|
+
[.05, 2.9],
|
|
3038
|
+
[.02, 2.3],
|
|
3039
|
+
[0, 1.6],
|
|
3040
|
+
[0, -.4],
|
|
3041
|
+
[.01, -1],
|
|
3042
|
+
[.03, -1.36],
|
|
3043
|
+
[.05, -1.6],
|
|
3044
|
+
[.07, -1.75],
|
|
3045
|
+
[.1, -1.97],
|
|
3046
|
+
[.17, -2.33],
|
|
3047
|
+
[.27, -2.63],
|
|
3048
|
+
[.41, -2.91],
|
|
3049
|
+
[.59, -3.16],
|
|
3050
|
+
[.82, -3.37],
|
|
3051
|
+
[1.09, -3.53],
|
|
3052
|
+
[1.36, -3.64],
|
|
3053
|
+
[1.72, -3.73],
|
|
3054
|
+
[2.22, -3.8],
|
|
3055
|
+
[2.86, -3.83]
|
|
3056
|
+
].map(([e, t]) => [e / 10, t / 10 - .0555]),
|
|
3057
|
+
rimInset: .12,
|
|
3058
|
+
bezel: .256,
|
|
3059
|
+
island: {
|
|
3060
|
+
width: 1.575,
|
|
3061
|
+
height: .607,
|
|
3062
|
+
fromTop: .232
|
|
3063
|
+
},
|
|
3064
|
+
plateau: {
|
|
3065
|
+
height: 4.012,
|
|
3066
|
+
margin: .387,
|
|
3067
|
+
raise: .279,
|
|
3068
|
+
radius: 1.11,
|
|
3069
|
+
lip: .11
|
|
3070
|
+
},
|
|
3071
|
+
lens: {
|
|
3072
|
+
radius: .833,
|
|
3073
|
+
centres: [
|
|
3074
|
+
[1.442, 1.437],
|
|
3075
|
+
[1.442, 3.361],
|
|
3076
|
+
[3.262, 2.399]
|
|
3077
|
+
]
|
|
3078
|
+
},
|
|
3079
|
+
finishes: [
|
|
3080
|
+
"black",
|
|
3081
|
+
"silver",
|
|
3082
|
+
"glacier",
|
|
3083
|
+
"burgundy"
|
|
3084
|
+
]
|
|
3085
|
+
};
|
|
3086
|
+
function hn(e) {
|
|
3087
|
+
return {
|
|
3088
|
+
flash: {
|
|
3089
|
+
radius: .3365,
|
|
3090
|
+
x: e - 1.388,
|
|
3091
|
+
y: 1.382
|
|
3092
|
+
},
|
|
3093
|
+
lidar: {
|
|
3094
|
+
radius: .336,
|
|
3095
|
+
x: e - 1.388,
|
|
3096
|
+
y: 3.416
|
|
3097
|
+
},
|
|
3098
|
+
mic: {
|
|
3099
|
+
radius: .038,
|
|
3100
|
+
x: e - 1.695,
|
|
3101
|
+
y: 3.07
|
|
3102
|
+
}
|
|
3103
|
+
};
|
|
3104
|
+
}
|
|
3105
|
+
var gn = {
|
|
3106
|
+
...mn,
|
|
3107
|
+
id: "phone.iphone-18-pro-max",
|
|
3108
|
+
label: "iPhone 18 Pro Max",
|
|
3109
|
+
width: 7.8,
|
|
3110
|
+
height: 16.34,
|
|
3111
|
+
display: {
|
|
3112
|
+
px: [1320, 2868],
|
|
3113
|
+
ppi: 460
|
|
3114
|
+
},
|
|
3115
|
+
...hn(7.8),
|
|
3116
|
+
backPanel: {
|
|
3117
|
+
fromTop: 4.878,
|
|
3118
|
+
margin: .381,
|
|
3119
|
+
radius: 1.035
|
|
3120
|
+
},
|
|
3121
|
+
buttons: [
|
|
3122
|
+
{
|
|
3123
|
+
side: -1,
|
|
3124
|
+
fromTop: 3.429,
|
|
3125
|
+
length: .692,
|
|
3126
|
+
kind: "action"
|
|
3127
|
+
},
|
|
3128
|
+
{
|
|
3129
|
+
side: -1,
|
|
3130
|
+
fromTop: 4.844,
|
|
3131
|
+
length: 1.122,
|
|
3132
|
+
kind: "volume"
|
|
3133
|
+
},
|
|
3134
|
+
{
|
|
3135
|
+
side: -1,
|
|
3136
|
+
fromTop: 6.264,
|
|
3137
|
+
length: 1.122,
|
|
3138
|
+
kind: "volume"
|
|
3139
|
+
},
|
|
3140
|
+
{
|
|
3141
|
+
side: 1,
|
|
3142
|
+
fromTop: 5.554,
|
|
3143
|
+
length: 1.772,
|
|
3144
|
+
kind: "side"
|
|
3145
|
+
},
|
|
3146
|
+
{
|
|
3147
|
+
side: 1,
|
|
3148
|
+
fromTop: 11.184,
|
|
3149
|
+
length: 1.712,
|
|
3150
|
+
kind: "camera"
|
|
3151
|
+
}
|
|
3152
|
+
],
|
|
3153
|
+
logo: {
|
|
3154
|
+
height: 2.004,
|
|
3155
|
+
fromTop: 9.753
|
|
3156
|
+
}
|
|
3157
|
+
}, _n = {
|
|
3158
|
+
...mn,
|
|
3159
|
+
id: "phone.iphone-18-pro",
|
|
3160
|
+
label: "iPhone 18 Pro",
|
|
3161
|
+
width: 7.19,
|
|
3162
|
+
height: 15,
|
|
3163
|
+
display: {
|
|
3164
|
+
px: [1206, 2622],
|
|
3165
|
+
ppi: 460
|
|
3166
|
+
},
|
|
3167
|
+
...hn(7.19),
|
|
3168
|
+
backPanel: {
|
|
3169
|
+
fromTop: 4.878,
|
|
3170
|
+
margin: .381,
|
|
3171
|
+
radius: 1.035
|
|
3172
|
+
},
|
|
3173
|
+
buttons: [
|
|
3174
|
+
{
|
|
3175
|
+
side: -1,
|
|
3176
|
+
fromTop: 3.429,
|
|
3177
|
+
length: .692,
|
|
3178
|
+
kind: "action"
|
|
3179
|
+
},
|
|
3180
|
+
{
|
|
3181
|
+
side: -1,
|
|
3182
|
+
fromTop: 4.844,
|
|
3183
|
+
length: 1.122,
|
|
3184
|
+
kind: "volume"
|
|
3185
|
+
},
|
|
3186
|
+
{
|
|
3187
|
+
side: -1,
|
|
3188
|
+
fromTop: 6.264,
|
|
3189
|
+
length: 1.122,
|
|
3190
|
+
kind: "volume"
|
|
3191
|
+
},
|
|
3192
|
+
{
|
|
3193
|
+
side: 1,
|
|
3194
|
+
fromTop: 5.554,
|
|
3195
|
+
length: 1.772,
|
|
3196
|
+
kind: "side"
|
|
3197
|
+
},
|
|
3198
|
+
{
|
|
3199
|
+
side: 1,
|
|
3200
|
+
fromTop: 10.264,
|
|
3201
|
+
length: 1.712,
|
|
3202
|
+
kind: "camera"
|
|
3203
|
+
}
|
|
3204
|
+
],
|
|
3205
|
+
logo: {
|
|
3206
|
+
height: 2.004,
|
|
3207
|
+
fromTop: 9.079
|
|
3208
|
+
}
|
|
3209
|
+
}, vn = {
|
|
3210
|
+
[_n.id]: _n,
|
|
3211
|
+
[gn.id]: gn
|
|
3212
|
+
}, yn = /* @__PURE__ */ e({ phone: () => bn }), bn = {
|
|
3213
|
+
type: "phone",
|
|
3214
|
+
specs: vn,
|
|
3215
|
+
finishes: pn,
|
|
3216
|
+
build: sn
|
|
3217
|
+
};
|
|
3218
|
+
export { ee as C, y as E, me as S, C as T, gt as _, Zt as a, De as b, $t as c, Yt as d, qt as f, It as g, Gt as h, Z as i, Qt as l, Jt as m, nn as n, $ as o, Kt as p, en as r, Q as s, yn as t, Xt as u, _t as v, te as w, Ee as x, wt as y };
|