@openmockup-studio/player 0.1.0 → 0.2.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/README.md +9 -5
- package/dist/{device-laptop-abUqnCPB.js → device-laptop-DlKLhrO9.js} +1 -1
- package/dist/{device-monitor-DRfsMb1A.js → device-monitor-BkXp8a-n.js} +1 -1
- package/dist/{device-phone-D__ngcPt.js → device-phone-DxWL5LkW.js} +337 -328
- package/dist/{device-tablet-C89f1GUw.js → device-tablet-B1JOR7Rf.js} +1 -1
- package/dist/{device-watch-PwEcwA3q.js → device-watch-9Y7wuyPn.js} +1 -1
- package/dist/embed.iife.js +56 -56
- package/dist/embed.js +7 -4
- package/dist/{runtime-D-Di0bkW.js → runtime-RiyRiexX.js} +224 -215
- package/package.json +1 -1
|
@@ -31,7 +31,7 @@ function C(e) {
|
|
|
31
31
|
return t.translate(-i.x, -i.y, 0), t.scale(a, -a, 1), t.computeVertexNormals(), t;
|
|
32
32
|
}
|
|
33
33
|
// ../core/src/fit.ts
|
|
34
|
-
function
|
|
34
|
+
function w(e, t, n = "cover", r = [.5, .5]) {
|
|
35
35
|
if (n === "stretch") return {
|
|
36
36
|
repeat: [1, 1],
|
|
37
37
|
offset: [0, 0]
|
|
@@ -50,31 +50,31 @@ function ee(e, t, n = "cover", r = [.5, .5]) {
|
|
|
50
50
|
offset: [0, (1 - a) * r[1]]
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function ee(e) {
|
|
54
54
|
if (!e) return [.5, .5];
|
|
55
55
|
let t = (e) => Number.isFinite(e) ? Math.min(1, Math.max(0, e)) : .5;
|
|
56
56
|
return [t(e[0]), t(e[1])];
|
|
57
57
|
}
|
|
58
58
|
// ../core/src/ids.ts
|
|
59
|
-
function
|
|
59
|
+
function te(e = "") {
|
|
60
60
|
let t = typeof crypto < "u" && "randomUUID" in crypto ? crypto.randomUUID() : `${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 10)}`;
|
|
61
61
|
return e ? `${e}_${t.slice(0, 8)}` : t;
|
|
62
62
|
}
|
|
63
63
|
// ../core/src/easing.ts
|
|
64
|
-
var
|
|
64
|
+
var ne = 1.70158, re = 2.70158, ie = {
|
|
65
65
|
linear: (e) => e,
|
|
66
66
|
easeInQuad: (e) => e * e,
|
|
67
67
|
easeOutQuad: (e) => 1 - (1 - e) * (1 - e),
|
|
68
68
|
easeInOutQuad: (e) => e < .5 ? 2 * e * e : 1 - (-2 * e + 2) ** 2 / 2,
|
|
69
69
|
easeInOutCubic: (e) => e < .5 ? 4 * e * e * e : 1 - (-2 * e + 2) ** 3 / 2,
|
|
70
70
|
easeOutExpo: (e) => e >= 1 ? 1 : 1 - 2 ** (-10 * e),
|
|
71
|
-
easeOutBack: (e) => 1 +
|
|
71
|
+
easeOutBack: (e) => 1 + re * (e - 1) ** 3 + ne * (e - 1) ** 2,
|
|
72
72
|
easeInOutSine: (e) => -(Math.cos(Math.PI * e) - 1) / 2
|
|
73
73
|
};
|
|
74
|
-
Object.keys(
|
|
74
|
+
Object.keys(ie);
|
|
75
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
76
|
function de(e, t, n, r) {
|
|
77
|
-
if (e === t && n === r) return
|
|
77
|
+
if (e === t && n === r) return ie.linear;
|
|
78
78
|
let i = new Float64Array(ae);
|
|
79
79
|
for (let t = 0; t < ae; t++) i[t] = le(t * T, e, n);
|
|
80
80
|
let a = (t) => {
|
|
@@ -104,7 +104,7 @@ function de(e, t, n, r) {
|
|
|
104
104
|
}
|
|
105
105
|
var fe = /* @__PURE__ */ new Map();
|
|
106
106
|
function pe(e) {
|
|
107
|
-
if (typeof e == "string") return
|
|
107
|
+
if (typeof e == "string") return ie[e] ?? ie.linear;
|
|
108
108
|
let t = e.bezier.join(","), n = fe.get(t);
|
|
109
109
|
return n || (n = de(...e.bezier), fe.set(t, n)), n;
|
|
110
110
|
}
|
|
@@ -181,16 +181,16 @@ function Se(e) {
|
|
|
181
181
|
];
|
|
182
182
|
}
|
|
183
183
|
// ../core/src/state.ts
|
|
184
|
-
var
|
|
184
|
+
var E = (e) => [
|
|
185
185
|
e[0],
|
|
186
186
|
e[1],
|
|
187
187
|
e[2]
|
|
188
188
|
];
|
|
189
|
-
function
|
|
189
|
+
function Ce(e, t) {
|
|
190
190
|
let { scene: n } = e, r = {};
|
|
191
191
|
for (let e of n.devices) r[e.id] = {
|
|
192
|
-
position:
|
|
193
|
-
rotation:
|
|
192
|
+
position: E(e.transform.position),
|
|
193
|
+
rotation: E(e.transform.rotation),
|
|
194
194
|
scale: e.transform.scale,
|
|
195
195
|
params: { ...e.params },
|
|
196
196
|
screenFinish: e.screenFinish,
|
|
@@ -213,8 +213,8 @@ function we(e, t) {
|
|
|
213
213
|
return {
|
|
214
214
|
time: t,
|
|
215
215
|
camera: {
|
|
216
|
-
position:
|
|
217
|
-
target:
|
|
216
|
+
position: E(n.camera.position),
|
|
217
|
+
target: E(n.camera.target),
|
|
218
218
|
fov: n.camera.fov,
|
|
219
219
|
roll: n.camera.roll,
|
|
220
220
|
lens: { ...n.camera.lens }
|
|
@@ -235,21 +235,21 @@ function we(e, t) {
|
|
|
235
235
|
set: { ...n.set }
|
|
236
236
|
};
|
|
237
237
|
}
|
|
238
|
-
function
|
|
238
|
+
function we(e, t) {
|
|
239
239
|
for (let [n, r] of t) {
|
|
240
240
|
let t = n.split("."), [i] = t;
|
|
241
|
-
if (i === "camera")
|
|
242
|
-
else if (i === "environment")
|
|
243
|
-
else if (i === "backdrop")
|
|
244
|
-
else if (i === "set")
|
|
241
|
+
if (i === "camera") D(e.camera, t.slice(1), r.value, r.add);
|
|
242
|
+
else if (i === "environment") D(e.environment, t.slice(1), r.value, r.add);
|
|
243
|
+
else if (i === "backdrop") D(e.backdrop, t.slice(1), r.value, r.add);
|
|
244
|
+
else if (i === "set") D(e.set, t.slice(1), r.value, r.add);
|
|
245
245
|
else if (i === "devices" || i === "screens") {
|
|
246
246
|
let n = t[1], a = i === "devices" ? e.devices : e.screens, o = n ? a[n] : void 0;
|
|
247
|
-
o &&
|
|
247
|
+
o && D(o, t.slice(2), r.value, r.add);
|
|
248
248
|
}
|
|
249
249
|
}
|
|
250
250
|
return e;
|
|
251
251
|
}
|
|
252
|
-
function
|
|
252
|
+
function D(e, t, n, r) {
|
|
253
253
|
let i = e;
|
|
254
254
|
for (let e = 0; e < t.length - 1; e++) {
|
|
255
255
|
let n = t[e];
|
|
@@ -262,14 +262,14 @@ function E(e, t, n, r) {
|
|
|
262
262
|
let o = i[a];
|
|
263
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
264
|
}
|
|
265
|
-
function
|
|
266
|
-
let i =
|
|
267
|
-
|
|
268
|
-
for (let e of n)
|
|
265
|
+
function Te(e, t, n = [], r = me(e.timeline)) {
|
|
266
|
+
let i = Ce(e, t);
|
|
267
|
+
we(i, ve(r, t));
|
|
268
|
+
for (let e of n) we(i, e);
|
|
269
269
|
return i;
|
|
270
270
|
}
|
|
271
271
|
// ../core/src/idle.ts
|
|
272
|
-
function
|
|
272
|
+
function Ee(e, t, n) {
|
|
273
273
|
let r = /* @__PURE__ */ new Map();
|
|
274
274
|
if (t <= 0) return r;
|
|
275
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;
|
|
@@ -291,22 +291,22 @@ function De(e, t, n) {
|
|
|
291
291
|
return r;
|
|
292
292
|
}
|
|
293
293
|
// ../core/src/presets.ts
|
|
294
|
-
var
|
|
295
|
-
function
|
|
294
|
+
var De = /^devices\.\$(\d+)\./;
|
|
295
|
+
function Oe(e, t, n) {
|
|
296
296
|
let r = new Set(n), i = e.timeline.tracks.filter((e) => {
|
|
297
297
|
let t = e.target.split(".")[1];
|
|
298
298
|
return !(e.target.startsWith("devices.") && t && r.has(t)) && !e.target.startsWith("camera.");
|
|
299
299
|
}), a = [];
|
|
300
300
|
for (let e of t.timeline.tracks) {
|
|
301
|
-
let t =
|
|
301
|
+
let t = De.exec(e.target), r = e.target;
|
|
302
302
|
if (t && t[1] !== void 0) {
|
|
303
303
|
let i = n[Number(t[1])];
|
|
304
304
|
if (!i) continue;
|
|
305
|
-
r = e.target.replace(
|
|
305
|
+
r = e.target.replace(De, `devices.${i}.`);
|
|
306
306
|
}
|
|
307
307
|
a.push({
|
|
308
308
|
...e,
|
|
309
|
-
id:
|
|
309
|
+
id: te("trk"),
|
|
310
310
|
target: r,
|
|
311
311
|
keys: e.keys.map((e) => ({ ...e }))
|
|
312
312
|
});
|
|
@@ -332,28 +332,28 @@ function ke(e, t, n) {
|
|
|
332
332
|
};
|
|
333
333
|
}
|
|
334
334
|
// ../../node_modules/.pnpm/valibot@1.5.0_typescript@5.9.3/node_modules/valibot/dist/index.mjs
|
|
335
|
-
var
|
|
335
|
+
var ke = {
|
|
336
336
|
lang: void 0,
|
|
337
337
|
message: void 0,
|
|
338
338
|
abortEarly: void 0,
|
|
339
339
|
abortPipeEarly: void 0
|
|
340
340
|
};
|
|
341
341
|
/* @__NO_SIDE_EFFECTS__ */
|
|
342
|
-
function
|
|
342
|
+
function Ae(e) {
|
|
343
343
|
return e ? {
|
|
344
344
|
lang: e?.lang ?? void 0,
|
|
345
345
|
message: e?.message,
|
|
346
346
|
abortEarly: e?.abortEarly ?? void 0,
|
|
347
347
|
abortPipeEarly: e?.abortPipeEarly ?? void 0
|
|
348
|
-
} :
|
|
348
|
+
} : ke;
|
|
349
349
|
}
|
|
350
350
|
/* @__NO_SIDE_EFFECTS__ */
|
|
351
|
-
function
|
|
351
|
+
function O(e) {
|
|
352
352
|
let t = typeof e;
|
|
353
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
354
|
}
|
|
355
|
-
function
|
|
356
|
-
let a = i && "input" in i ? i.input : n.value, o = i?.expected ?? e.expects ?? null, s = i?.received ?? /* @__PURE__ */
|
|
355
|
+
function k(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__ */ O(a), c = {
|
|
357
357
|
kind: e.kind,
|
|
358
358
|
type: e.type,
|
|
359
359
|
input: a,
|
|
@@ -370,72 +370,72 @@ function O(e, t, n, r, i) {
|
|
|
370
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
371
|
}
|
|
372
372
|
/* @__NO_SIDE_EFFECTS__ */
|
|
373
|
-
function
|
|
373
|
+
function je(e, t) {
|
|
374
374
|
return e === t || Number.isNaN(e) && Number.isNaN(t);
|
|
375
375
|
}
|
|
376
376
|
/* @__NO_SIDE_EFFECTS__ */
|
|
377
|
-
function
|
|
377
|
+
function Me(e, t) {
|
|
378
378
|
return Object.prototype.hasOwnProperty.call(e, t) && t !== "__proto__" && t !== "prototype" && t !== "constructor";
|
|
379
379
|
}
|
|
380
380
|
/* @__NO_SIDE_EFFECTS__ */
|
|
381
|
-
function
|
|
381
|
+
function Ne(e, t) {
|
|
382
382
|
let n = [...new Set(e)];
|
|
383
383
|
return n.length > 1 ? `(${n.join(` ${t} `)})` : n[0] ?? "never";
|
|
384
384
|
}
|
|
385
|
-
function
|
|
385
|
+
function A(e) {
|
|
386
386
|
return e["~standard"] = {
|
|
387
387
|
version: 1,
|
|
388
388
|
vendor: "valibot",
|
|
389
|
-
validate: (t) => e["~run"]({ value: t }, /* @__PURE__ */
|
|
389
|
+
validate: (t) => e["~run"]({ value: t }, /* @__PURE__ */ Ae())
|
|
390
390
|
}, e;
|
|
391
391
|
}
|
|
392
|
-
var
|
|
392
|
+
var Pe = class extends Error {
|
|
393
393
|
constructor(e) {
|
|
394
394
|
super(e[0].message), this.name = "ValiError", this.issues = e;
|
|
395
395
|
}
|
|
396
396
|
};
|
|
397
397
|
/* @__NO_SIDE_EFFECTS__ */
|
|
398
|
-
function
|
|
398
|
+
function Fe(e, t) {
|
|
399
399
|
return {
|
|
400
400
|
kind: "validation",
|
|
401
401
|
type: "max_value",
|
|
402
|
-
reference:
|
|
402
|
+
reference: Fe,
|
|
403
403
|
async: !1,
|
|
404
|
-
expects: `<=${e instanceof Date ? e.toJSON() : /* @__PURE__ */
|
|
404
|
+
expects: `<=${e instanceof Date ? e.toJSON() : /* @__PURE__ */ O(e)}`,
|
|
405
405
|
requirement: e,
|
|
406
406
|
message: t,
|
|
407
407
|
"~run"(e, t) {
|
|
408
|
-
return e.typed && !(e.value <= this.requirement) &&
|
|
408
|
+
return e.typed && !(e.value <= this.requirement) && k(this, "value", e, t, { received: e.value instanceof Date ? e.value.toJSON() : /* @__PURE__ */ O(e.value) }), e;
|
|
409
409
|
}
|
|
410
410
|
};
|
|
411
411
|
}
|
|
412
412
|
/* @__NO_SIDE_EFFECTS__ */
|
|
413
|
-
function
|
|
413
|
+
function Ie(e, t) {
|
|
414
414
|
return {
|
|
415
415
|
kind: "validation",
|
|
416
416
|
type: "min_value",
|
|
417
|
-
reference:
|
|
417
|
+
reference: Ie,
|
|
418
418
|
async: !1,
|
|
419
|
-
expects: `>=${e instanceof Date ? e.toJSON() : /* @__PURE__ */
|
|
419
|
+
expects: `>=${e instanceof Date ? e.toJSON() : /* @__PURE__ */ O(e)}`,
|
|
420
420
|
requirement: e,
|
|
421
421
|
message: t,
|
|
422
422
|
"~run"(e, t) {
|
|
423
|
-
return e.typed && !(e.value >= this.requirement) &&
|
|
423
|
+
return e.typed && !(e.value >= this.requirement) && k(this, "value", e, t, { received: e.value instanceof Date ? e.value.toJSON() : /* @__PURE__ */ O(e.value) }), e;
|
|
424
424
|
}
|
|
425
425
|
};
|
|
426
426
|
}
|
|
427
|
-
var
|
|
427
|
+
var Le = { abortEarly: !0 };
|
|
428
428
|
/* @__NO_SIDE_EFFECTS__ */
|
|
429
|
-
function
|
|
429
|
+
function Re(e, t, n) {
|
|
430
430
|
return typeof e.fallback == "function" ? e.fallback(t, n) : e.fallback;
|
|
431
431
|
}
|
|
432
432
|
/* @__NO_SIDE_EFFECTS__ */
|
|
433
|
-
function
|
|
433
|
+
function ze(e, t, n) {
|
|
434
434
|
return typeof e.default == "function" ? e.default(t, n) : e.default;
|
|
435
435
|
}
|
|
436
436
|
/* @__NO_SIDE_EFFECTS__ */
|
|
437
437
|
function j(e, t) {
|
|
438
|
-
return
|
|
438
|
+
return A({
|
|
439
439
|
kind: "schema",
|
|
440
440
|
type: "array",
|
|
441
441
|
reference: j,
|
|
@@ -465,14 +465,14 @@ function j(e, t) {
|
|
|
465
465
|
}
|
|
466
466
|
a.typed || (e.typed = !1), e.value.push(a.value);
|
|
467
467
|
}
|
|
468
|
-
} else
|
|
468
|
+
} else k(this, "type", e, t);
|
|
469
469
|
return e;
|
|
470
470
|
}
|
|
471
471
|
});
|
|
472
472
|
}
|
|
473
473
|
/* @__NO_SIDE_EFFECTS__ */
|
|
474
474
|
function M(e) {
|
|
475
|
-
return
|
|
475
|
+
return A({
|
|
476
476
|
kind: "schema",
|
|
477
477
|
type: "boolean",
|
|
478
478
|
reference: M,
|
|
@@ -480,28 +480,28 @@ function M(e) {
|
|
|
480
480
|
async: !1,
|
|
481
481
|
message: e,
|
|
482
482
|
"~run"(e, t) {
|
|
483
|
-
return typeof e.value == "boolean" ? e.typed = !0 :
|
|
483
|
+
return typeof e.value == "boolean" ? e.typed = !0 : k(this, "type", e, t), e;
|
|
484
484
|
}
|
|
485
485
|
});
|
|
486
486
|
}
|
|
487
487
|
/* @__NO_SIDE_EFFECTS__ */
|
|
488
488
|
function N(e, t) {
|
|
489
|
-
return
|
|
489
|
+
return A({
|
|
490
490
|
kind: "schema",
|
|
491
491
|
type: "literal",
|
|
492
492
|
reference: N,
|
|
493
|
-
expects: /* @__PURE__ */
|
|
493
|
+
expects: /* @__PURE__ */ O(e),
|
|
494
494
|
async: !1,
|
|
495
495
|
literal: e,
|
|
496
496
|
message: t,
|
|
497
497
|
"~run"(e, t) {
|
|
498
|
-
return /* @__PURE__ */
|
|
498
|
+
return /* @__PURE__ */ je(e.value, this.literal) ? e.typed = !0 : k(this, "type", e, t), e;
|
|
499
499
|
}
|
|
500
500
|
});
|
|
501
501
|
}
|
|
502
502
|
/* @__NO_SIDE_EFFECTS__ */
|
|
503
503
|
function P(e, t) {
|
|
504
|
-
return
|
|
504
|
+
return A({
|
|
505
505
|
kind: "schema",
|
|
506
506
|
type: "loose_object",
|
|
507
507
|
reference: P,
|
|
@@ -516,7 +516,7 @@ function P(e, t) {
|
|
|
516
516
|
for (let r in this.entries) {
|
|
517
517
|
let i = this.entries[r];
|
|
518
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__ */
|
|
519
|
+
let a = r in n ? n[r] : /* @__PURE__ */ ze(i), o = i["~run"]({ value: a }, t);
|
|
520
520
|
if (o.issues) {
|
|
521
521
|
let i = {
|
|
522
522
|
type: "object",
|
|
@@ -532,8 +532,8 @@ function P(e, t) {
|
|
|
532
532
|
}
|
|
533
533
|
}
|
|
534
534
|
o.typed || (e.typed = !1), e.value[r] = o.value;
|
|
535
|
-
} else if (i.fallback !== void 0) e.value[r] = /* @__PURE__ */
|
|
536
|
-
else if (i.type !== "exact_optional" && i.type !== "optional" && i.type !== "nullish" && (
|
|
535
|
+
} else if (i.fallback !== void 0) e.value[r] = /* @__PURE__ */ Re(i);
|
|
536
|
+
else if (i.type !== "exact_optional" && i.type !== "optional" && i.type !== "nullish" && (k(this, "key", e, t, {
|
|
537
537
|
input: void 0,
|
|
538
538
|
expected: `"${r}"`,
|
|
539
539
|
path: [{
|
|
@@ -545,15 +545,15 @@ function P(e, t) {
|
|
|
545
545
|
}]
|
|
546
546
|
}), t.abortEarly)) break;
|
|
547
547
|
}
|
|
548
|
-
if (!e.issues || !t.abortEarly) for (let t in n) /* @__PURE__ */
|
|
549
|
-
} else
|
|
548
|
+
if (!e.issues || !t.abortEarly) for (let t in n) /* @__PURE__ */ Me(n, t) && !Object.prototype.hasOwnProperty.call(this.entries, t) && (e.value[t] = n[t]);
|
|
549
|
+
} else k(this, "type", e, t);
|
|
550
550
|
return e;
|
|
551
551
|
}
|
|
552
552
|
});
|
|
553
553
|
}
|
|
554
554
|
/* @__NO_SIDE_EFFECTS__ */
|
|
555
555
|
function Be(e, t) {
|
|
556
|
-
return
|
|
556
|
+
return A({
|
|
557
557
|
kind: "schema",
|
|
558
558
|
type: "nullable",
|
|
559
559
|
reference: Be,
|
|
@@ -562,13 +562,13 @@ function Be(e, t) {
|
|
|
562
562
|
wrapped: e,
|
|
563
563
|
default: t,
|
|
564
564
|
"~run"(e, t) {
|
|
565
|
-
return e.value === null && (this.default !== void 0 && (e.value = /* @__PURE__ */
|
|
565
|
+
return e.value === null && (this.default !== void 0 && (e.value = /* @__PURE__ */ ze(this, e, t)), e.value === null) ? (e.typed = !0, e) : this.wrapped["~run"](e, t);
|
|
566
566
|
}
|
|
567
567
|
});
|
|
568
568
|
}
|
|
569
569
|
/* @__NO_SIDE_EFFECTS__ */
|
|
570
570
|
function F(e) {
|
|
571
|
-
return
|
|
571
|
+
return A({
|
|
572
572
|
kind: "schema",
|
|
573
573
|
type: "number",
|
|
574
574
|
reference: F,
|
|
@@ -576,13 +576,13 @@ function F(e) {
|
|
|
576
576
|
async: !1,
|
|
577
577
|
message: e,
|
|
578
578
|
"~run"(e, t) {
|
|
579
|
-
return typeof e.value == "number" && !isNaN(e.value) ? e.typed = !0 :
|
|
579
|
+
return typeof e.value == "number" && !isNaN(e.value) ? e.typed = !0 : k(this, "type", e, t), e;
|
|
580
580
|
}
|
|
581
581
|
});
|
|
582
582
|
}
|
|
583
583
|
/* @__NO_SIDE_EFFECTS__ */
|
|
584
584
|
function I(e, t) {
|
|
585
|
-
return
|
|
585
|
+
return A({
|
|
586
586
|
kind: "schema",
|
|
587
587
|
type: "object",
|
|
588
588
|
reference: I,
|
|
@@ -597,7 +597,7 @@ function I(e, t) {
|
|
|
597
597
|
for (let r in this.entries) {
|
|
598
598
|
let i = this.entries[r];
|
|
599
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__ */
|
|
600
|
+
let a = r in n ? n[r] : /* @__PURE__ */ ze(i), o = i["~run"]({ value: a }, t);
|
|
601
601
|
if (o.issues) {
|
|
602
602
|
let i = {
|
|
603
603
|
type: "object",
|
|
@@ -613,8 +613,8 @@ function I(e, t) {
|
|
|
613
613
|
}
|
|
614
614
|
}
|
|
615
615
|
o.typed || (e.typed = !1), e.value[r] = o.value;
|
|
616
|
-
} else if (i.fallback !== void 0) e.value[r] = /* @__PURE__ */
|
|
617
|
-
else if (i.type !== "exact_optional" && i.type !== "optional" && i.type !== "nullish" && (
|
|
616
|
+
} else if (i.fallback !== void 0) e.value[r] = /* @__PURE__ */ Re(i);
|
|
617
|
+
else if (i.type !== "exact_optional" && i.type !== "optional" && i.type !== "nullish" && (k(this, "key", e, t, {
|
|
618
618
|
input: void 0,
|
|
619
619
|
expected: `"${r}"`,
|
|
620
620
|
path: [{
|
|
@@ -626,14 +626,14 @@ function I(e, t) {
|
|
|
626
626
|
}]
|
|
627
627
|
}), t.abortEarly)) break;
|
|
628
628
|
}
|
|
629
|
-
} else
|
|
629
|
+
} else k(this, "type", e, t);
|
|
630
630
|
return e;
|
|
631
631
|
}
|
|
632
632
|
});
|
|
633
633
|
}
|
|
634
634
|
/* @__NO_SIDE_EFFECTS__ */
|
|
635
635
|
function L(e, t) {
|
|
636
|
-
return
|
|
636
|
+
return A({
|
|
637
637
|
kind: "schema",
|
|
638
638
|
type: "optional",
|
|
639
639
|
reference: L,
|
|
@@ -642,28 +642,28 @@ function L(e, t) {
|
|
|
642
642
|
wrapped: e,
|
|
643
643
|
default: t,
|
|
644
644
|
"~run"(e, t) {
|
|
645
|
-
return e.value === void 0 && (this.default !== void 0 && (e.value = /* @__PURE__ */
|
|
645
|
+
return e.value === void 0 && (this.default !== void 0 && (e.value = /* @__PURE__ */ ze(this, e, t)), e.value === void 0) ? (e.typed = !0, e) : this.wrapped["~run"](e, t);
|
|
646
646
|
}
|
|
647
647
|
});
|
|
648
648
|
}
|
|
649
649
|
/* @__NO_SIDE_EFFECTS__ */
|
|
650
650
|
function R(e, t) {
|
|
651
|
-
return
|
|
651
|
+
return A({
|
|
652
652
|
kind: "schema",
|
|
653
653
|
type: "picklist",
|
|
654
654
|
reference: R,
|
|
655
|
-
expects: /* @__PURE__ */
|
|
655
|
+
expects: /* @__PURE__ */ Ne(e.map(O), "|"),
|
|
656
656
|
async: !1,
|
|
657
657
|
options: e,
|
|
658
658
|
message: t,
|
|
659
659
|
"~run"(e, t) {
|
|
660
|
-
return this.options.includes(e.value) ? e.typed = !0 :
|
|
660
|
+
return this.options.includes(e.value) ? e.typed = !0 : k(this, "type", e, t), e;
|
|
661
661
|
}
|
|
662
662
|
});
|
|
663
663
|
}
|
|
664
664
|
/* @__NO_SIDE_EFFECTS__ */
|
|
665
665
|
function Ve(e, t, n) {
|
|
666
|
-
return
|
|
666
|
+
return A({
|
|
667
667
|
kind: "schema",
|
|
668
668
|
type: "record",
|
|
669
669
|
reference: Ve,
|
|
@@ -676,7 +676,7 @@ function Ve(e, t, n) {
|
|
|
676
676
|
let n = e.value;
|
|
677
677
|
if (n && typeof n == "object") {
|
|
678
678
|
e.typed = !0, e.value = {};
|
|
679
|
-
for (let r in n) if (/* @__PURE__ */
|
|
679
|
+
for (let r in n) if (/* @__PURE__ */ Me(n, r)) {
|
|
680
680
|
let i = n[r], a = this.key["~run"]({ value: r }, t);
|
|
681
681
|
if (a.issues) {
|
|
682
682
|
let o = {
|
|
@@ -709,14 +709,14 @@ function Ve(e, t, n) {
|
|
|
709
709
|
}
|
|
710
710
|
a.typed && o.typed || (e.typed = !1), a.typed && (e.value[a.value] = o.value);
|
|
711
711
|
}
|
|
712
|
-
} else
|
|
712
|
+
} else k(this, "type", e, t);
|
|
713
713
|
return e;
|
|
714
714
|
}
|
|
715
715
|
});
|
|
716
716
|
}
|
|
717
717
|
/* @__NO_SIDE_EFFECTS__ */
|
|
718
718
|
function z(e) {
|
|
719
|
-
return
|
|
719
|
+
return A({
|
|
720
720
|
kind: "schema",
|
|
721
721
|
type: "string",
|
|
722
722
|
reference: z,
|
|
@@ -724,13 +724,13 @@ function z(e) {
|
|
|
724
724
|
async: !1,
|
|
725
725
|
message: e,
|
|
726
726
|
"~run"(e, t) {
|
|
727
|
-
return typeof e.value == "string" ? e.typed = !0 :
|
|
727
|
+
return typeof e.value == "string" ? e.typed = !0 : k(this, "type", e, t), e;
|
|
728
728
|
}
|
|
729
729
|
});
|
|
730
730
|
}
|
|
731
731
|
/* @__NO_SIDE_EFFECTS__ */
|
|
732
732
|
function B(e, t) {
|
|
733
|
-
return
|
|
733
|
+
return A({
|
|
734
734
|
kind: "schema",
|
|
735
735
|
type: "tuple",
|
|
736
736
|
reference: B,
|
|
@@ -760,7 +760,7 @@ function B(e, t) {
|
|
|
760
760
|
}
|
|
761
761
|
a.typed || (e.typed = !1), e.value.push(a.value);
|
|
762
762
|
}
|
|
763
|
-
} else
|
|
763
|
+
} else k(this, "type", e, t);
|
|
764
764
|
return e;
|
|
765
765
|
}
|
|
766
766
|
});
|
|
@@ -773,12 +773,12 @@ function He(e) {
|
|
|
773
773
|
return t;
|
|
774
774
|
}
|
|
775
775
|
/* @__NO_SIDE_EFFECTS__ */
|
|
776
|
-
function
|
|
777
|
-
return
|
|
776
|
+
function Ue(e, t) {
|
|
777
|
+
return A({
|
|
778
778
|
kind: "schema",
|
|
779
779
|
type: "union",
|
|
780
|
-
reference:
|
|
781
|
-
expects: /* @__PURE__ */
|
|
780
|
+
reference: Ue,
|
|
781
|
+
expects: /* @__PURE__ */ Ne(e.map((e) => e.expects), "|"),
|
|
782
782
|
async: !1,
|
|
783
783
|
options: e,
|
|
784
784
|
message: t,
|
|
@@ -797,19 +797,19 @@ function V(e, t) {
|
|
|
797
797
|
if (n) return n;
|
|
798
798
|
if (r) {
|
|
799
799
|
if (r.length === 1) return r[0];
|
|
800
|
-
|
|
800
|
+
k(this, "type", e, t, { issues: /* @__PURE__ */ He(r) }), e.typed = !0;
|
|
801
801
|
} else if (i?.length === 1) return i[0];
|
|
802
|
-
else
|
|
802
|
+
else k(this, "type", e, t, { issues: /* @__PURE__ */ He(i) });
|
|
803
803
|
return e;
|
|
804
804
|
}
|
|
805
805
|
});
|
|
806
806
|
}
|
|
807
807
|
/* @__NO_SIDE_EFFECTS__ */
|
|
808
|
-
function
|
|
809
|
-
return
|
|
808
|
+
function We() {
|
|
809
|
+
return A({
|
|
810
810
|
kind: "schema",
|
|
811
811
|
type: "unknown",
|
|
812
|
-
reference:
|
|
812
|
+
reference: We,
|
|
813
813
|
expects: "unknown",
|
|
814
814
|
async: !1,
|
|
815
815
|
"~run"(e) {
|
|
@@ -818,11 +818,11 @@ function Ue() {
|
|
|
818
818
|
});
|
|
819
819
|
}
|
|
820
820
|
/* @__NO_SIDE_EFFECTS__ */
|
|
821
|
-
function
|
|
822
|
-
return
|
|
821
|
+
function Ge(e, t, n) {
|
|
822
|
+
return A({
|
|
823
823
|
kind: "schema",
|
|
824
824
|
type: "variant",
|
|
825
|
-
reference:
|
|
825
|
+
reference: Ge,
|
|
826
826
|
expects: "Object",
|
|
827
827
|
async: !1,
|
|
828
828
|
key: e,
|
|
@@ -841,7 +841,7 @@ function We(e, t, n) {
|
|
|
841
841
|
if (t in n ? r["~run"]({
|
|
842
842
|
typed: !1,
|
|
843
843
|
value: n[t]
|
|
844
|
-
},
|
|
844
|
+
}, Le).issues : r.type !== "exact_optional" && r.type !== "optional" && r.type !== "nullish") {
|
|
845
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
846
|
break;
|
|
847
847
|
}
|
|
@@ -856,9 +856,9 @@ function We(e, t, n) {
|
|
|
856
856
|
}
|
|
857
857
|
};
|
|
858
858
|
if (s(this, /* @__PURE__ */ new Set([this.key])), r) return r;
|
|
859
|
-
|
|
859
|
+
k(this, "type", e, t, {
|
|
860
860
|
input: n[a],
|
|
861
|
-
expected: /* @__PURE__ */
|
|
861
|
+
expected: /* @__PURE__ */ Ne(o, "|"),
|
|
862
862
|
path: [{
|
|
863
863
|
type: "object",
|
|
864
864
|
origin: "value",
|
|
@@ -867,19 +867,19 @@ function We(e, t, n) {
|
|
|
867
867
|
value: n[a]
|
|
868
868
|
}]
|
|
869
869
|
});
|
|
870
|
-
} else
|
|
870
|
+
} else k(this, "type", e, t);
|
|
871
871
|
return e;
|
|
872
872
|
}
|
|
873
873
|
});
|
|
874
874
|
}
|
|
875
|
-
function
|
|
876
|
-
let r = e["~run"]({ value: t }, /* @__PURE__ */
|
|
877
|
-
if (r.issues) throw new
|
|
875
|
+
function V(e, t, n) {
|
|
876
|
+
let r = e["~run"]({ value: t }, /* @__PURE__ */ Ae(n));
|
|
877
|
+
if (r.issues) throw new Pe(r.issues);
|
|
878
878
|
return r.value;
|
|
879
879
|
}
|
|
880
880
|
/* @__NO_SIDE_EFFECTS__ */
|
|
881
|
-
function
|
|
882
|
-
return
|
|
881
|
+
function Ke(...e) {
|
|
882
|
+
return A({
|
|
883
883
|
...e[0],
|
|
884
884
|
pipe: e,
|
|
885
885
|
"~run"(t, n) {
|
|
@@ -895,22 +895,22 @@ function Ge(...e) {
|
|
|
895
895
|
});
|
|
896
896
|
}
|
|
897
897
|
// ../core/src/schema.ts
|
|
898
|
-
var
|
|
898
|
+
var qe = /* @__PURE__ */ B([/* @__PURE__ */ F(), /* @__PURE__ */ F()]), H = /* @__PURE__ */ B([
|
|
899
899
|
/* @__PURE__ */ F(),
|
|
900
900
|
/* @__PURE__ */ F(),
|
|
901
901
|
/* @__PURE__ */ F()
|
|
902
|
-
]),
|
|
902
|
+
]), Je = /* @__PURE__ */ Ke(/* @__PURE__ */ F(), /* @__PURE__ */ Ie(0), /* @__PURE__ */ Fe(1)), Ye = /* @__PURE__ */ I({
|
|
903
903
|
label: /* @__PURE__ */ z(),
|
|
904
904
|
frame: /* @__PURE__ */ z(),
|
|
905
905
|
back: /* @__PURE__ */ z(),
|
|
906
|
-
frameRoughness:
|
|
906
|
+
frameRoughness: Je,
|
|
907
907
|
backMaterial: /* @__PURE__ */ L(/* @__PURE__ */ R([
|
|
908
908
|
"glass",
|
|
909
909
|
"metal",
|
|
910
910
|
"ceramic"
|
|
911
911
|
])),
|
|
912
912
|
accent: /* @__PURE__ */ L(/* @__PURE__ */ z())
|
|
913
|
-
}),
|
|
913
|
+
}), Xe = /* @__PURE__ */ Ge("source", [
|
|
914
914
|
/* @__PURE__ */ I({
|
|
915
915
|
kind: /* @__PURE__ */ R(["image", "video"]),
|
|
916
916
|
source: /* @__PURE__ */ N("idb"),
|
|
@@ -936,7 +936,7 @@ var Ke = /* @__PURE__ */ B([/* @__PURE__ */ F(), /* @__PURE__ */ F()]), U = /* @
|
|
|
936
936
|
width: /* @__PURE__ */ F(),
|
|
937
937
|
height: /* @__PURE__ */ F()
|
|
938
938
|
})
|
|
939
|
-
]),
|
|
939
|
+
]), Ze = /* @__PURE__ */ P({
|
|
940
940
|
id: /* @__PURE__ */ z(),
|
|
941
941
|
type: /* @__PURE__ */ R([
|
|
942
942
|
"phone",
|
|
@@ -946,15 +946,15 @@ var Ke = /* @__PURE__ */ B([/* @__PURE__ */ F(), /* @__PURE__ */ F()]), U = /* @
|
|
|
946
946
|
"watch"
|
|
947
947
|
]),
|
|
948
948
|
spec: /* @__PURE__ */ z(),
|
|
949
|
-
finish: /* @__PURE__ */
|
|
949
|
+
finish: /* @__PURE__ */ Ue([/* @__PURE__ */ z(), Ye]),
|
|
950
950
|
params: /* @__PURE__ */ L(/* @__PURE__ */ Ve(/* @__PURE__ */ z(), /* @__PURE__ */ F()), () => ({})),
|
|
951
951
|
transform: /* @__PURE__ */ L(/* @__PURE__ */ I({
|
|
952
|
-
position: /* @__PURE__ */ L(
|
|
952
|
+
position: /* @__PURE__ */ L(H, () => [
|
|
953
953
|
0,
|
|
954
954
|
0,
|
|
955
955
|
0
|
|
956
956
|
]),
|
|
957
|
-
rotation: /* @__PURE__ */ L(
|
|
957
|
+
rotation: /* @__PURE__ */ L(H, () => [
|
|
958
958
|
0,
|
|
959
959
|
0,
|
|
960
960
|
0
|
|
@@ -978,17 +978,17 @@ var Ke = /* @__PURE__ */ B([/* @__PURE__ */ F(), /* @__PURE__ */ F()]), U = /* @
|
|
|
978
978
|
"glossy",
|
|
979
979
|
"matte"
|
|
980
980
|
]), "matte"),
|
|
981
|
-
glare: /* @__PURE__ */ L(
|
|
981
|
+
glare: /* @__PURE__ */ L(Je, 1),
|
|
982
982
|
screens: /* @__PURE__ */ L(/* @__PURE__ */ j(/* @__PURE__ */ z()), () => [])
|
|
983
|
-
}),
|
|
983
|
+
}), Qe = /* @__PURE__ */ P({
|
|
984
984
|
id: /* @__PURE__ */ z(),
|
|
985
|
-
media: /* @__PURE__ */ L(/* @__PURE__ */ Be(
|
|
985
|
+
media: /* @__PURE__ */ L(/* @__PURE__ */ Be(Xe), null),
|
|
986
986
|
fit: /* @__PURE__ */ L(/* @__PURE__ */ R([
|
|
987
987
|
"cover",
|
|
988
988
|
"contain",
|
|
989
989
|
"stretch"
|
|
990
990
|
]), "cover"),
|
|
991
|
-
offset: /* @__PURE__ */ L(
|
|
991
|
+
offset: /* @__PURE__ */ L(qe),
|
|
992
992
|
video: /* @__PURE__ */ L(/* @__PURE__ */ I({
|
|
993
993
|
start: /* @__PURE__ */ L(/* @__PURE__ */ F(), 0),
|
|
994
994
|
loop: /* @__PURE__ */ L(/* @__PURE__ */ M(), !0),
|
|
@@ -996,7 +996,7 @@ var Ke = /* @__PURE__ */ B([/* @__PURE__ */ F(), /* @__PURE__ */ F()]), U = /* @
|
|
|
996
996
|
playbackRate: /* @__PURE__ */ L(/* @__PURE__ */ F(), 1)
|
|
997
997
|
})),
|
|
998
998
|
poster: /* @__PURE__ */ L(/* @__PURE__ */ z())
|
|
999
|
-
}),
|
|
999
|
+
}), $e = /* @__PURE__ */ I({
|
|
1000
1000
|
fisheye: /* @__PURE__ */ L(/* @__PURE__ */ F(), 0),
|
|
1001
1001
|
chromatic: /* @__PURE__ */ L(/* @__PURE__ */ F(), 0),
|
|
1002
1002
|
vignette: /* @__PURE__ */ L(/* @__PURE__ */ F(), 0),
|
|
@@ -1005,21 +1005,21 @@ var Ke = /* @__PURE__ */ B([/* @__PURE__ */ F(), /* @__PURE__ */ F()]), U = /* @
|
|
|
1005
1005
|
blur: /* @__PURE__ */ L(/* @__PURE__ */ F(), 0),
|
|
1006
1006
|
focus: /* @__PURE__ */ L(/* @__PURE__ */ F(), 0),
|
|
1007
1007
|
fade: /* @__PURE__ */ L(/* @__PURE__ */ F(), 0)
|
|
1008
|
-
}),
|
|
1009
|
-
position: /* @__PURE__ */ L(
|
|
1008
|
+
}), et = /* @__PURE__ */ P({
|
|
1009
|
+
position: /* @__PURE__ */ L(H, () => [
|
|
1010
1010
|
0,
|
|
1011
1011
|
1.5,
|
|
1012
1012
|
48
|
|
1013
1013
|
]),
|
|
1014
|
-
target: /* @__PURE__ */ L(
|
|
1014
|
+
target: /* @__PURE__ */ L(H, () => [
|
|
1015
1015
|
0,
|
|
1016
1016
|
0,
|
|
1017
1017
|
0
|
|
1018
1018
|
]),
|
|
1019
1019
|
fov: /* @__PURE__ */ L(/* @__PURE__ */ F(), 28),
|
|
1020
1020
|
roll: /* @__PURE__ */ L(/* @__PURE__ */ F(), 0),
|
|
1021
|
-
lens: /* @__PURE__ */ L(
|
|
1022
|
-
}),
|
|
1021
|
+
lens: /* @__PURE__ */ L($e, () => V($e, {}))
|
|
1022
|
+
}), tt = /* @__PURE__ */ P({
|
|
1023
1023
|
preset: /* @__PURE__ */ L(/* @__PURE__ */ R([
|
|
1024
1024
|
"studio",
|
|
1025
1025
|
"soft",
|
|
@@ -1029,7 +1029,7 @@ var Ke = /* @__PURE__ */ B([/* @__PURE__ */ F(), /* @__PURE__ */ F()]), U = /* @
|
|
|
1029
1029
|
intensity: /* @__PURE__ */ L(/* @__PURE__ */ F(), 1),
|
|
1030
1030
|
rotation: /* @__PURE__ */ L(/* @__PURE__ */ F(), 0),
|
|
1031
1031
|
glow: /* @__PURE__ */ L(/* @__PURE__ */ F(), 0)
|
|
1032
|
-
}),
|
|
1032
|
+
}), nt = /* @__PURE__ */ P({
|
|
1033
1033
|
kind: /* @__PURE__ */ L(/* @__PURE__ */ R([
|
|
1034
1034
|
"none",
|
|
1035
1035
|
"crevice",
|
|
@@ -1037,7 +1037,7 @@ var Ke = /* @__PURE__ */ B([/* @__PURE__ */ F(), /* @__PURE__ */ F()]), U = /* @
|
|
|
1037
1037
|
]), "none"),
|
|
1038
1038
|
seed: /* @__PURE__ */ L(/* @__PURE__ */ F(), 1),
|
|
1039
1039
|
color: /* @__PURE__ */ L(/* @__PURE__ */ z(), "#3a3b40")
|
|
1040
|
-
}),
|
|
1040
|
+
}), rt = /* @__PURE__ */ P({
|
|
1041
1041
|
kind: /* @__PURE__ */ L(/* @__PURE__ */ R([
|
|
1042
1042
|
"transparent",
|
|
1043
1043
|
"solid",
|
|
@@ -1048,14 +1048,14 @@ var Ke = /* @__PURE__ */ B([/* @__PURE__ */ F(), /* @__PURE__ */ F()]), U = /* @
|
|
|
1048
1048
|
inner: /* @__PURE__ */ L(/* @__PURE__ */ z()),
|
|
1049
1049
|
outer: /* @__PURE__ */ L(/* @__PURE__ */ z()),
|
|
1050
1050
|
angle: /* @__PURE__ */ L(/* @__PURE__ */ F()),
|
|
1051
|
-
image: /* @__PURE__ */ L(
|
|
1051
|
+
image: /* @__PURE__ */ L(Xe),
|
|
1052
1052
|
tone: /* @__PURE__ */ L(/* @__PURE__ */ R(["light", "dark"]), "light")
|
|
1053
|
-
}),
|
|
1053
|
+
}), it = /* @__PURE__ */ P({
|
|
1054
1054
|
mode: /* @__PURE__ */ L(/* @__PURE__ */ R(["auto", "fixed"]), "auto"),
|
|
1055
1055
|
y: /* @__PURE__ */ L(/* @__PURE__ */ F()),
|
|
1056
|
-
shadow: /* @__PURE__ */ L(
|
|
1057
|
-
}),
|
|
1058
|
-
duration: /* @__PURE__ */ L(/* @__PURE__ */
|
|
1056
|
+
shadow: /* @__PURE__ */ L(Je, .22)
|
|
1057
|
+
}), at = /* @__PURE__ */ P({
|
|
1058
|
+
duration: /* @__PURE__ */ L(/* @__PURE__ */ Ke(/* @__PURE__ */ F(), /* @__PURE__ */ Ie(.1)), 4),
|
|
1059
1059
|
fps: /* @__PURE__ */ L(/* @__PURE__ */ F(), 30),
|
|
1060
1060
|
tracks: /* @__PURE__ */ L(/* @__PURE__ */ j(/* @__PURE__ */ P({
|
|
1061
1061
|
id: /* @__PURE__ */ z(),
|
|
@@ -1068,12 +1068,12 @@ var Ke = /* @__PURE__ */ B([/* @__PURE__ */ F(), /* @__PURE__ */ F()]), U = /* @
|
|
|
1068
1068
|
keys: /* @__PURE__ */ L(/* @__PURE__ */ j(/* @__PURE__ */ I({
|
|
1069
1069
|
id: /* @__PURE__ */ L(/* @__PURE__ */ z()),
|
|
1070
1070
|
t: /* @__PURE__ */ F(),
|
|
1071
|
-
value: /* @__PURE__ */
|
|
1071
|
+
value: /* @__PURE__ */ Ue([
|
|
1072
1072
|
/* @__PURE__ */ F(),
|
|
1073
|
-
|
|
1073
|
+
H,
|
|
1074
1074
|
/* @__PURE__ */ z()
|
|
1075
1075
|
]),
|
|
1076
|
-
easing: /* @__PURE__ */ L(/* @__PURE__ */
|
|
1076
|
+
easing: /* @__PURE__ */ L(/* @__PURE__ */ Ue([/* @__PURE__ */ R([
|
|
1077
1077
|
"linear",
|
|
1078
1078
|
"easeInQuad",
|
|
1079
1079
|
"easeOutQuad",
|
|
@@ -1095,7 +1095,7 @@ var Ke = /* @__PURE__ */ B([/* @__PURE__ */ F(), /* @__PURE__ */ F()]), U = /* @
|
|
|
1095
1095
|
t: /* @__PURE__ */ F(),
|
|
1096
1096
|
label: /* @__PURE__ */ z()
|
|
1097
1097
|
})))
|
|
1098
|
-
}),
|
|
1098
|
+
}), ot = /* @__PURE__ */ P({
|
|
1099
1099
|
trigger: /* @__PURE__ */ L(/* @__PURE__ */ R([
|
|
1100
1100
|
"none",
|
|
1101
1101
|
"load",
|
|
@@ -1134,7 +1134,7 @@ var Ke = /* @__PURE__ */ B([/* @__PURE__ */ F(), /* @__PURE__ */ F()]), U = /* @
|
|
|
1134
1134
|
smoothing: 5
|
|
1135
1135
|
})),
|
|
1136
1136
|
idle: /* @__PURE__ */ L(/* @__PURE__ */ I({ float: /* @__PURE__ */ L(/* @__PURE__ */ F(), 1) }), () => ({ float: 1 }))
|
|
1137
|
-
}),
|
|
1137
|
+
}), st = /* @__PURE__ */ P({
|
|
1138
1138
|
width: /* @__PURE__ */ L(/* @__PURE__ */ F(), 1920),
|
|
1139
1139
|
height: /* @__PURE__ */ L(/* @__PURE__ */ F(), 1080),
|
|
1140
1140
|
fps: /* @__PURE__ */ L(/* @__PURE__ */ R([
|
|
@@ -1164,44 +1164,44 @@ var Ke = /* @__PURE__ */ B([/* @__PURE__ */ F(), /* @__PURE__ */ F()]), U = /* @
|
|
|
1164
1164
|
]), "standard"),
|
|
1165
1165
|
transparent: /* @__PURE__ */ L(/* @__PURE__ */ M(), !1),
|
|
1166
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
1167
|
}), ct = /* @__PURE__ */ P({
|
|
1168
|
+
devices: /* @__PURE__ */ L(/* @__PURE__ */ j(Ze), () => []),
|
|
1169
|
+
screens: /* @__PURE__ */ L(/* @__PURE__ */ j(Qe), () => []),
|
|
1170
|
+
camera: /* @__PURE__ */ L(et, () => V(et, {})),
|
|
1171
|
+
environment: /* @__PURE__ */ L(tt, () => V(tt, {})),
|
|
1172
|
+
backdrop: /* @__PURE__ */ L(rt, () => V(rt, {})),
|
|
1173
|
+
floor: /* @__PURE__ */ L(it, () => V(it, {})),
|
|
1174
|
+
set: /* @__PURE__ */ L(nt, () => V(nt, {}))
|
|
1175
|
+
}), lt = /* @__PURE__ */ P({
|
|
1176
1176
|
schemaVersion: /* @__PURE__ */ L(/* @__PURE__ */ N(1), 1),
|
|
1177
|
-
id: /* @__PURE__ */ L(/* @__PURE__ */ z(), () =>
|
|
1177
|
+
id: /* @__PURE__ */ L(/* @__PURE__ */ z(), () => te()),
|
|
1178
1178
|
name: /* @__PURE__ */ L(/* @__PURE__ */ z(), "Untitled"),
|
|
1179
1179
|
createdAt: /* @__PURE__ */ L(/* @__PURE__ */ z(), () => (/* @__PURE__ */ new Date()).toISOString()),
|
|
1180
1180
|
updatedAt: /* @__PURE__ */ L(/* @__PURE__ */ z(), () => (/* @__PURE__ */ new Date()).toISOString()),
|
|
1181
|
-
scene: /* @__PURE__ */ L(
|
|
1182
|
-
timeline: /* @__PURE__ */ L(
|
|
1183
|
-
interaction: /* @__PURE__ */ L(
|
|
1184
|
-
export: /* @__PURE__ */ L(
|
|
1185
|
-
meta: /* @__PURE__ */ L(/* @__PURE__ */ Ve(/* @__PURE__ */ z(), /* @__PURE__ */
|
|
1181
|
+
scene: /* @__PURE__ */ L(ct, () => V(ct, {})),
|
|
1182
|
+
timeline: /* @__PURE__ */ L(at, () => V(at, {})),
|
|
1183
|
+
interaction: /* @__PURE__ */ L(ot, () => V(ot, {})),
|
|
1184
|
+
export: /* @__PURE__ */ L(st, () => V(st, {})),
|
|
1185
|
+
meta: /* @__PURE__ */ L(/* @__PURE__ */ Ve(/* @__PURE__ */ z(), /* @__PURE__ */ We()))
|
|
1186
1186
|
});
|
|
1187
|
-
function
|
|
1188
|
-
return
|
|
1187
|
+
function ut(e) {
|
|
1188
|
+
return V(lt, e);
|
|
1189
1189
|
}
|
|
1190
1190
|
// ../core/src/project.ts
|
|
1191
|
-
var
|
|
1191
|
+
var dt = {
|
|
1192
1192
|
screenFinish: "glossy",
|
|
1193
1193
|
glare: .5
|
|
1194
|
-
},
|
|
1194
|
+
}, ft = [
|
|
1195
1195
|
3.4,
|
|
1196
1196
|
-24.1,
|
|
1197
1197
|
2.3
|
|
1198
1198
|
];
|
|
1199
|
-
function
|
|
1199
|
+
function pt({ name: e = "Untitled", device: t } = {}) {
|
|
1200
1200
|
let n = [], r = [];
|
|
1201
1201
|
if (t) {
|
|
1202
|
-
let e =
|
|
1202
|
+
let e = te("scr");
|
|
1203
1203
|
r.push({ id: e }), n.push({
|
|
1204
|
-
id:
|
|
1204
|
+
id: te("dev"),
|
|
1205
1205
|
type: t.type,
|
|
1206
1206
|
spec: t.spec,
|
|
1207
1207
|
finish: t.finish,
|
|
@@ -1211,14 +1211,14 @@ function ft({ name: e = "Untitled", device: t } = {}) {
|
|
|
1211
1211
|
0,
|
|
1212
1212
|
0
|
|
1213
1213
|
],
|
|
1214
|
-
rotation: [...
|
|
1214
|
+
rotation: [...ft],
|
|
1215
1215
|
scale: 1
|
|
1216
1216
|
},
|
|
1217
|
-
...
|
|
1217
|
+
...dt,
|
|
1218
1218
|
screens: [e]
|
|
1219
1219
|
});
|
|
1220
1220
|
}
|
|
1221
|
-
return
|
|
1221
|
+
return ut({
|
|
1222
1222
|
name: e,
|
|
1223
1223
|
scene: {
|
|
1224
1224
|
devices: n,
|
|
@@ -1227,16 +1227,16 @@ function ft({ name: e = "Untitled", device: t } = {}) {
|
|
|
1227
1227
|
});
|
|
1228
1228
|
}
|
|
1229
1229
|
// ../core/src/presets-bundled.ts
|
|
1230
|
-
var
|
|
1230
|
+
var U = (e, t, n = "easeInOutCubic") => ({
|
|
1231
1231
|
t: e,
|
|
1232
1232
|
value: t,
|
|
1233
1233
|
easing: n
|
|
1234
|
-
}),
|
|
1234
|
+
}), W = { bezier: [
|
|
1235
1235
|
.4,
|
|
1236
1236
|
0,
|
|
1237
1237
|
.2,
|
|
1238
1238
|
1
|
|
1239
|
-
] },
|
|
1239
|
+
] }, mt = [
|
|
1240
1240
|
{
|
|
1241
1241
|
id: "preset.turn",
|
|
1242
1242
|
name: "Turn",
|
|
@@ -1247,17 +1247,17 @@ var W = (e, t, n = "easeInOutCubic") => ({
|
|
|
1247
1247
|
],
|
|
1248
1248
|
duration: 4,
|
|
1249
1249
|
rotation: [
|
|
1250
|
-
|
|
1250
|
+
U(0, [
|
|
1251
1251
|
3.4,
|
|
1252
1252
|
-24.1,
|
|
1253
1253
|
2.3
|
|
1254
1254
|
]),
|
|
1255
|
-
|
|
1255
|
+
U(2, [
|
|
1256
1256
|
-8,
|
|
1257
1257
|
28,
|
|
1258
1258
|
-4
|
|
1259
1259
|
]),
|
|
1260
|
-
|
|
1260
|
+
U(4, [
|
|
1261
1261
|
3.4,
|
|
1262
1262
|
-24.1,
|
|
1263
1263
|
2.3
|
|
@@ -1276,9 +1276,9 @@ var W = (e, t, n = "easeInOutCubic") => ({
|
|
|
1276
1276
|
],
|
|
1277
1277
|
duration: 4,
|
|
1278
1278
|
fov: [
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1279
|
+
U(0, 28, W),
|
|
1280
|
+
U(2.4, 20, W),
|
|
1281
|
+
U(4, 28, "linear")
|
|
1282
1282
|
]
|
|
1283
1283
|
},
|
|
1284
1284
|
{
|
|
@@ -1291,30 +1291,30 @@ var W = (e, t, n = "easeInOutCubic") => ({
|
|
|
1291
1291
|
],
|
|
1292
1292
|
duration: 3,
|
|
1293
1293
|
position: [
|
|
1294
|
-
|
|
1294
|
+
U(0, [
|
|
1295
1295
|
0,
|
|
1296
1296
|
-6,
|
|
1297
1297
|
0
|
|
1298
1298
|
], "easeOutExpo"),
|
|
1299
|
-
|
|
1299
|
+
U(1.4, [
|
|
1300
1300
|
0,
|
|
1301
1301
|
0,
|
|
1302
1302
|
0
|
|
1303
|
-
],
|
|
1304
|
-
|
|
1303
|
+
], W),
|
|
1304
|
+
U(3, [
|
|
1305
1305
|
0,
|
|
1306
1306
|
0,
|
|
1307
1307
|
0
|
|
1308
1308
|
], "linear")
|
|
1309
1309
|
],
|
|
1310
1310
|
rotation: [
|
|
1311
|
-
|
|
1311
|
+
U(0, [
|
|
1312
1312
|
-30,
|
|
1313
1313
|
-40,
|
|
1314
1314
|
0
|
|
1315
1315
|
], "easeOutExpo"),
|
|
1316
|
-
|
|
1317
|
-
|
|
1316
|
+
U(1.4, ft, W),
|
|
1317
|
+
U(3, ft, "linear")
|
|
1318
1318
|
]
|
|
1319
1319
|
},
|
|
1320
1320
|
{
|
|
@@ -1327,17 +1327,17 @@ var W = (e, t, n = "easeInOutCubic") => ({
|
|
|
1327
1327
|
],
|
|
1328
1328
|
duration: 4,
|
|
1329
1329
|
rotation: [
|
|
1330
|
-
|
|
1330
|
+
U(0, [
|
|
1331
1331
|
0,
|
|
1332
1332
|
-20,
|
|
1333
1333
|
0
|
|
1334
1334
|
]),
|
|
1335
|
-
|
|
1335
|
+
U(2, [
|
|
1336
1336
|
0,
|
|
1337
1337
|
160,
|
|
1338
1338
|
0
|
|
1339
1339
|
]),
|
|
1340
|
-
|
|
1340
|
+
U(4, [
|
|
1341
1341
|
0,
|
|
1342
1342
|
340,
|
|
1343
1343
|
0
|
|
@@ -1354,34 +1354,34 @@ var W = (e, t, n = "easeInOutCubic") => ({
|
|
|
1354
1354
|
],
|
|
1355
1355
|
duration: 5,
|
|
1356
1356
|
rotation: [
|
|
1357
|
-
|
|
1357
|
+
U(0, [
|
|
1358
1358
|
2,
|
|
1359
1359
|
-18,
|
|
1360
1360
|
1
|
|
1361
1361
|
], "easeInOutSine"),
|
|
1362
|
-
|
|
1362
|
+
U(2.5, [
|
|
1363
1363
|
-2,
|
|
1364
1364
|
18,
|
|
1365
1365
|
-1
|
|
1366
1366
|
], "easeInOutSine"),
|
|
1367
|
-
|
|
1367
|
+
U(5, [
|
|
1368
1368
|
2,
|
|
1369
1369
|
-18,
|
|
1370
1370
|
1
|
|
1371
1371
|
], "linear")
|
|
1372
1372
|
],
|
|
1373
1373
|
position: [
|
|
1374
|
-
|
|
1374
|
+
U(0, [
|
|
1375
1375
|
-.6,
|
|
1376
1376
|
0,
|
|
1377
1377
|
0
|
|
1378
1378
|
], "easeInOutSine"),
|
|
1379
|
-
|
|
1379
|
+
U(2.5, [
|
|
1380
1380
|
.6,
|
|
1381
1381
|
0,
|
|
1382
1382
|
0
|
|
1383
1383
|
], "easeInOutSine"),
|
|
1384
|
-
|
|
1384
|
+
U(5, [
|
|
1385
1385
|
-.6,
|
|
1386
1386
|
0,
|
|
1387
1387
|
0
|
|
@@ -1400,14 +1400,14 @@ var W = (e, t, n = "easeInOutCubic") => ({
|
|
|
1400
1400
|
],
|
|
1401
1401
|
duration: 3,
|
|
1402
1402
|
scale: [
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1403
|
+
U(0, 1.35, "easeOutExpo"),
|
|
1404
|
+
U(1.6, 1, W),
|
|
1405
|
+
U(3, 1, "linear")
|
|
1406
1406
|
],
|
|
1407
1407
|
fov: [
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1408
|
+
U(0, 22, "easeOutExpo"),
|
|
1409
|
+
U(1.6, 28, W),
|
|
1410
|
+
U(3, 28, "linear")
|
|
1411
1411
|
]
|
|
1412
1412
|
},
|
|
1413
1413
|
{
|
|
@@ -1415,7 +1415,7 @@ var W = (e, t, n = "easeInOutCubic") => ({
|
|
|
1415
1415
|
name: "Lid opens",
|
|
1416
1416
|
tags: ["laptop"],
|
|
1417
1417
|
duration: 3.5,
|
|
1418
|
-
position: [
|
|
1418
|
+
position: [U(0, [
|
|
1419
1419
|
0,
|
|
1420
1420
|
0,
|
|
1421
1421
|
0
|
|
@@ -1427,17 +1427,17 @@ var W = (e, t, n = "easeInOutCubic") => ({
|
|
|
1427
1427
|
tags: ["laptop", "monitor"],
|
|
1428
1428
|
duration: 5,
|
|
1429
1429
|
rotation: [
|
|
1430
|
-
|
|
1430
|
+
U(0, [
|
|
1431
1431
|
0,
|
|
1432
1432
|
-28,
|
|
1433
1433
|
0
|
|
1434
1434
|
], "easeInOutSine"),
|
|
1435
|
-
|
|
1435
|
+
U(2.5, [
|
|
1436
1436
|
0,
|
|
1437
1437
|
28,
|
|
1438
1438
|
0
|
|
1439
1439
|
], "easeInOutSine"),
|
|
1440
|
-
|
|
1440
|
+
U(5, [
|
|
1441
1441
|
0,
|
|
1442
1442
|
-28,
|
|
1443
1443
|
0
|
|
@@ -1445,7 +1445,7 @@ var W = (e, t, n = "easeInOutCubic") => ({
|
|
|
1445
1445
|
]
|
|
1446
1446
|
}
|
|
1447
1447
|
];
|
|
1448
|
-
function
|
|
1448
|
+
function ht(e) {
|
|
1449
1449
|
let t = [];
|
|
1450
1450
|
return e.rotation && t.push({
|
|
1451
1451
|
id: `${e.id}.rotation`,
|
|
@@ -1472,9 +1472,9 @@ function mt(e) {
|
|
|
1472
1472
|
target: "devices.$0.params.lidAngle",
|
|
1473
1473
|
type: "number",
|
|
1474
1474
|
keys: [
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1475
|
+
U(0, 2, "easeInOutCubic"),
|
|
1476
|
+
U(2.2, 110, W),
|
|
1477
|
+
U(3.5, 110, "linear")
|
|
1478
1478
|
]
|
|
1479
1479
|
}), {
|
|
1480
1480
|
id: e.id,
|
|
@@ -1488,18 +1488,18 @@ function mt(e) {
|
|
|
1488
1488
|
}
|
|
1489
1489
|
};
|
|
1490
1490
|
}
|
|
1491
|
-
var
|
|
1491
|
+
var gt = mt.map(ht), _t = {
|
|
1492
1492
|
x: 0,
|
|
1493
1493
|
y: 0,
|
|
1494
1494
|
speed: 0
|
|
1495
1495
|
};
|
|
1496
|
-
function
|
|
1496
|
+
function G(e, t) {
|
|
1497
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
1498
|
}
|
|
1499
|
-
function
|
|
1499
|
+
function vt(e, t, n, r, i) {
|
|
1500
1500
|
let a = /* @__PURE__ */ new Map(), { follow: o, zoom: s, dolly: c, shake: l, mode: u } = t;
|
|
1501
1501
|
if (o <= 0 && s <= 0 && c <= 0 && l <= 0) return a;
|
|
1502
|
-
let d = St(
|
|
1502
|
+
let d = St(K(i.target, i.position)), f = St(Ct(d, [
|
|
1503
1503
|
0,
|
|
1504
1504
|
1,
|
|
1505
1505
|
0
|
|
@@ -1518,8 +1518,8 @@ function _t(e, t, n, r, i) {
|
|
|
1518
1518
|
add: !0
|
|
1519
1519
|
});
|
|
1520
1520
|
else {
|
|
1521
|
-
let t = xt(
|
|
1522
|
-
|
|
1521
|
+
let t = xt(K(i.target, i.position)) * .12 * o;
|
|
1522
|
+
wt(m, q(f, e.x * t)), wt(m, q(p, e.y * t * .6));
|
|
1523
1523
|
}
|
|
1524
1524
|
}
|
|
1525
1525
|
if (s > 0) {
|
|
@@ -1527,25 +1527,25 @@ function _t(e, t, n, r, i) {
|
|
|
1527
1527
|
h -= s * 10 * t;
|
|
1528
1528
|
}
|
|
1529
1529
|
if (c > 0) {
|
|
1530
|
-
let t = xt(
|
|
1531
|
-
|
|
1530
|
+
let t = xt(K(i.target, i.position));
|
|
1531
|
+
wt(m, q(d, e.y * c * t * .15));
|
|
1532
1532
|
}
|
|
1533
1533
|
if (l > 0) {
|
|
1534
1534
|
let t = l * Math.min(1, e.speed);
|
|
1535
1535
|
for (let e of r) {
|
|
1536
1536
|
let r = a.get(`devices.${e}.rotation`)?.value, i = [
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1537
|
+
G(n, 1) * 2 * t,
|
|
1538
|
+
G(n, 2) * 2 * t,
|
|
1539
|
+
G(n, 3) * 1 * t
|
|
1540
1540
|
];
|
|
1541
1541
|
a.set(`devices.${e}.rotation`, {
|
|
1542
|
-
value: r ?
|
|
1542
|
+
value: r ? bt(r, i) : i,
|
|
1543
1543
|
add: !0
|
|
1544
1544
|
});
|
|
1545
1545
|
}
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1546
|
+
wt(m, [
|
|
1547
|
+
G(n, 4) * .2 * t,
|
|
1548
|
+
G(n, 5) * .2 * t,
|
|
1549
1549
|
0
|
|
1550
1550
|
]);
|
|
1551
1551
|
}
|
|
@@ -1557,15 +1557,24 @@ function _t(e, t, n, r, i) {
|
|
|
1557
1557
|
add: !0
|
|
1558
1558
|
}), a;
|
|
1559
1559
|
}
|
|
1560
|
-
|
|
1560
|
+
function yt(e, t) {
|
|
1561
|
+
let n = /* @__PURE__ */ new Map();
|
|
1562
|
+
if (!e) return n;
|
|
1563
|
+
let r = K(t.target, t.position);
|
|
1564
|
+
return n.set("camera.position", {
|
|
1565
|
+
value: q(r, 1 - 2 ** (-e / 100)),
|
|
1566
|
+
add: !0
|
|
1567
|
+
}), n;
|
|
1568
|
+
}
|
|
1569
|
+
var K = (e, t) => [
|
|
1561
1570
|
e[0] - t[0],
|
|
1562
1571
|
e[1] - t[1],
|
|
1563
1572
|
e[2] - t[2]
|
|
1564
|
-
],
|
|
1573
|
+
], bt = (e, t) => [
|
|
1565
1574
|
e[0] + t[0],
|
|
1566
1575
|
e[1] + t[1],
|
|
1567
1576
|
e[2] + t[2]
|
|
1568
|
-
],
|
|
1577
|
+
], q = (e, t) => [
|
|
1569
1578
|
e[0] * t,
|
|
1570
1579
|
e[1] * t,
|
|
1571
1580
|
e[2] * t
|
|
@@ -1581,10 +1590,10 @@ var vt = (e, t) => [
|
|
|
1581
1590
|
e[2] * t[0] - e[0] * t[2],
|
|
1582
1591
|
e[0] * t[1] - e[1] * t[0]
|
|
1583
1592
|
];
|
|
1584
|
-
function
|
|
1593
|
+
function wt(e, t) {
|
|
1585
1594
|
e[0] += t[0], e[1] += t[1], e[2] += t[2];
|
|
1586
1595
|
}
|
|
1587
|
-
function
|
|
1596
|
+
function Tt(e, t, n, r) {
|
|
1588
1597
|
let i = 1 - Math.exp(-n * r);
|
|
1589
1598
|
return {
|
|
1590
1599
|
x: e.x + (t.x - e.x) * i,
|
|
@@ -1597,7 +1606,7 @@ var J = (e, t, n = "easeInOutCubic") => ({
|
|
|
1597
1606
|
t: e,
|
|
1598
1607
|
value: t,
|
|
1599
1608
|
easing: n
|
|
1600
|
-
}),
|
|
1609
|
+
}), Et = { bezier: [
|
|
1601
1610
|
.45,
|
|
1602
1611
|
0,
|
|
1603
1612
|
.85,
|
|
@@ -1612,7 +1621,7 @@ var J = (e, t, n = "easeInOutCubic") => ({
|
|
|
1612
1621
|
0,
|
|
1613
1622
|
.2,
|
|
1614
1623
|
1
|
|
1615
|
-
] },
|
|
1624
|
+
] }, Dt = {
|
|
1616
1625
|
duration: 10,
|
|
1617
1626
|
tracks: [
|
|
1618
1627
|
{
|
|
@@ -1629,7 +1638,7 @@ var J = (e, t, n = "easeInOutCubic") => ({
|
|
|
1629
1638
|
1,
|
|
1630
1639
|
1.5,
|
|
1631
1640
|
46
|
|
1632
|
-
],
|
|
1641
|
+
], Et),
|
|
1633
1642
|
J(2.5, [
|
|
1634
1643
|
5.5,
|
|
1635
1644
|
-4.5,
|
|
@@ -1676,7 +1685,7 @@ var J = (e, t, n = "easeInOutCubic") => ({
|
|
|
1676
1685
|
0,
|
|
1677
1686
|
1,
|
|
1678
1687
|
0
|
|
1679
|
-
],
|
|
1688
|
+
], Et),
|
|
1680
1689
|
J(2.5, [
|
|
1681
1690
|
0,
|
|
1682
1691
|
5,
|
|
@@ -1715,7 +1724,7 @@ var J = (e, t, n = "easeInOutCubic") => ({
|
|
|
1715
1724
|
type: "number",
|
|
1716
1725
|
keys: [
|
|
1717
1726
|
J(0, 26, X),
|
|
1718
|
-
J(1.6, 28,
|
|
1727
|
+
J(1.6, 28, Et),
|
|
1719
1728
|
J(2.5, 36, Y),
|
|
1720
1729
|
J(5.4, 35, X),
|
|
1721
1730
|
J(6.5, 32, "linear"),
|
|
@@ -1730,7 +1739,7 @@ var J = (e, t, n = "easeInOutCubic") => ({
|
|
|
1730
1739
|
type: "number",
|
|
1731
1740
|
keys: [
|
|
1732
1741
|
J(0, 3, X),
|
|
1733
|
-
J(1.6, 0,
|
|
1742
|
+
J(1.6, 0, Et),
|
|
1734
1743
|
J(2.5, -7, Y),
|
|
1735
1744
|
J(5.4, -5, X),
|
|
1736
1745
|
J(6.5, 2, "linear"),
|
|
@@ -1751,12 +1760,12 @@ var J = (e, t, n = "easeInOutCubic") => ({
|
|
|
1751
1760
|
]
|
|
1752
1761
|
}
|
|
1753
1762
|
]
|
|
1754
|
-
},
|
|
1763
|
+
}, Ot = { bezier: [
|
|
1755
1764
|
.3,
|
|
1756
1765
|
0,
|
|
1757
1766
|
.12,
|
|
1758
1767
|
1
|
|
1759
|
-
] },
|
|
1768
|
+
] }, kt = {
|
|
1760
1769
|
duration: 6,
|
|
1761
1770
|
tracks: [
|
|
1762
1771
|
{
|
|
@@ -1768,7 +1777,7 @@ var J = (e, t, n = "easeInOutCubic") => ({
|
|
|
1768
1777
|
-11,
|
|
1769
1778
|
-.6,
|
|
1770
1779
|
30
|
|
1771
|
-
],
|
|
1780
|
+
], Ot),
|
|
1772
1781
|
J(3.2, [
|
|
1773
1782
|
-31,
|
|
1774
1783
|
-7.3,
|
|
@@ -1790,7 +1799,7 @@ var J = (e, t, n = "easeInOutCubic") => ({
|
|
|
1790
1799
|
3,
|
|
1791
1800
|
.8,
|
|
1792
1801
|
4
|
|
1793
|
-
],
|
|
1802
|
+
], Ot),
|
|
1794
1803
|
J(3.2, [
|
|
1795
1804
|
3,
|
|
1796
1805
|
7.8,
|
|
@@ -1815,7 +1824,7 @@ var J = (e, t, n = "easeInOutCubic") => ({
|
|
|
1815
1824
|
]
|
|
1816
1825
|
}
|
|
1817
1826
|
]
|
|
1818
|
-
},
|
|
1827
|
+
}, At = {
|
|
1819
1828
|
duration: 7,
|
|
1820
1829
|
tracks: [
|
|
1821
1830
|
{
|
|
@@ -1917,7 +1926,7 @@ var J = (e, t, n = "easeInOutCubic") => ({
|
|
|
1917
1926
|
]
|
|
1918
1927
|
}
|
|
1919
1928
|
]
|
|
1920
|
-
},
|
|
1929
|
+
}, jt = {
|
|
1921
1930
|
duration: 10,
|
|
1922
1931
|
tracks: [
|
|
1923
1932
|
{
|
|
@@ -2026,12 +2035,12 @@ var J = (e, t, n = "easeInOutCubic") => ({
|
|
|
2026
2035
|
]
|
|
2027
2036
|
}
|
|
2028
2037
|
]
|
|
2029
|
-
},
|
|
2038
|
+
}, Mt = {
|
|
2030
2039
|
"16:9": [1920, 1080],
|
|
2031
2040
|
"9:16": [1080, 1920],
|
|
2032
2041
|
"1:1": [1080, 1080],
|
|
2033
2042
|
"4:3": [1440, 1080]
|
|
2034
|
-
},
|
|
2043
|
+
}, Nt = [
|
|
2035
2044
|
{
|
|
2036
2045
|
id: "tpl.iphone-crevice",
|
|
2037
2046
|
name: "Stone crevice",
|
|
@@ -2074,7 +2083,7 @@ var J = (e, t, n = "easeInOutCubic") => ({
|
|
|
2074
2083
|
seed: 3,
|
|
2075
2084
|
color: "#3d3d40"
|
|
2076
2085
|
},
|
|
2077
|
-
timeline:
|
|
2086
|
+
timeline: Dt
|
|
2078
2087
|
},
|
|
2079
2088
|
{
|
|
2080
2089
|
id: "tpl.iphone-push",
|
|
@@ -2106,7 +2115,7 @@ var J = (e, t, n = "easeInOutCubic") => ({
|
|
|
2106
2115
|
preset: "studio",
|
|
2107
2116
|
intensity: 1
|
|
2108
2117
|
},
|
|
2109
|
-
timeline:
|
|
2118
|
+
timeline: At
|
|
2110
2119
|
},
|
|
2111
2120
|
{
|
|
2112
2121
|
id: "tpl.iphone-night-sweep",
|
|
@@ -2143,7 +2152,7 @@ var J = (e, t, n = "easeInOutCubic") => ({
|
|
|
2143
2152
|
vignette: .3,
|
|
2144
2153
|
grain: .1
|
|
2145
2154
|
},
|
|
2146
|
-
timeline:
|
|
2155
|
+
timeline: jt
|
|
2147
2156
|
},
|
|
2148
2157
|
{
|
|
2149
2158
|
id: "tpl.iphone-turn",
|
|
@@ -2260,7 +2269,7 @@ var J = (e, t, n = "easeInOutCubic") => ({
|
|
|
2260
2269
|
seed: 1,
|
|
2261
2270
|
color: "#8a8a88"
|
|
2262
2271
|
},
|
|
2263
|
-
timeline:
|
|
2272
|
+
timeline: kt
|
|
2264
2273
|
},
|
|
2265
2274
|
{
|
|
2266
2275
|
id: "tpl.macbook-open",
|
|
@@ -2418,8 +2427,8 @@ var J = (e, t, n = "easeInOutCubic") => ({
|
|
|
2418
2427
|
}
|
|
2419
2428
|
}
|
|
2420
2429
|
];
|
|
2421
|
-
function
|
|
2422
|
-
let t =
|
|
2430
|
+
function Pt(e) {
|
|
2431
|
+
let t = pt({
|
|
2423
2432
|
name: e.name,
|
|
2424
2433
|
device: e.device
|
|
2425
2434
|
}), n = t.scene.devices[0];
|
|
@@ -2431,7 +2440,7 @@ function Nt(e) {
|
|
|
2431
2440
|
...t.scene.camera,
|
|
2432
2441
|
...e.camera
|
|
2433
2442
|
});
|
|
2434
|
-
let [r, i] =
|
|
2443
|
+
let [r, i] = Mt[e.aspect];
|
|
2435
2444
|
t.export.width = r, t.export.height = i, e.environment && (t.scene.environment = {
|
|
2436
2445
|
...t.scene.environment,
|
|
2437
2446
|
...e.environment
|
|
@@ -2450,10 +2459,10 @@ function Nt(e) {
|
|
|
2450
2459
|
...t.interaction.cursor,
|
|
2451
2460
|
...e.cursor
|
|
2452
2461
|
}), e.trigger && (t.interaction.trigger = e.trigger);
|
|
2453
|
-
let a = e.preset ?
|
|
2462
|
+
let a = e.preset ? gt.find((t) => t.id === e.preset) : void 0;
|
|
2454
2463
|
if (a && n) {
|
|
2455
2464
|
let e = t.scene.camera;
|
|
2456
|
-
t =
|
|
2465
|
+
t = Oe(t, a, [n.id]), t.scene.camera = {
|
|
2457
2466
|
...e,
|
|
2458
2467
|
lens: e.lens
|
|
2459
2468
|
};
|
|
@@ -2467,27 +2476,27 @@ function Nt(e) {
|
|
|
2467
2476
|
doc: t
|
|
2468
2477
|
};
|
|
2469
2478
|
}
|
|
2470
|
-
|
|
2479
|
+
Nt.map(Pt);
|
|
2471
2480
|
// ../core/src/migrations.ts
|
|
2472
|
-
var
|
|
2481
|
+
var Ft = {}, It = class extends Error {
|
|
2473
2482
|
found;
|
|
2474
2483
|
constructor(e) {
|
|
2475
2484
|
super(`Project schema version ${e} is newer than this build supports (1). Update the app.`), this.found = e, this.name = "UnsupportedSchemaError";
|
|
2476
2485
|
}
|
|
2477
2486
|
};
|
|
2478
|
-
function
|
|
2487
|
+
function Lt(e) {
|
|
2479
2488
|
if (typeof e != "object" || !e) throw TypeError("Project must be an object");
|
|
2480
2489
|
let t = { ...e }, n = typeof t.schemaVersion == "number" ? t.schemaVersion : 1;
|
|
2481
|
-
if (n > 1) throw new
|
|
2490
|
+
if (n > 1) throw new It(n);
|
|
2482
2491
|
for (; n < 1;) {
|
|
2483
|
-
let e =
|
|
2492
|
+
let e = Ft[n];
|
|
2484
2493
|
if (!e) throw Error(`No migration from schema version ${n}`);
|
|
2485
2494
|
t = e(t), n++, t.schemaVersion = n;
|
|
2486
2495
|
}
|
|
2487
|
-
return
|
|
2496
|
+
return ut(t);
|
|
2488
2497
|
}
|
|
2489
2498
|
// ../devices/src/primitives/noise.ts
|
|
2490
|
-
var
|
|
2499
|
+
var Rt = {
|
|
2491
2500
|
noise: {
|
|
2492
2501
|
min: 0,
|
|
2493
2502
|
max: 1,
|
|
@@ -2503,19 +2512,19 @@ var Lt = {
|
|
|
2503
2512
|
label: "Noise size"
|
|
2504
2513
|
}
|
|
2505
2514
|
};
|
|
2506
|
-
function
|
|
2515
|
+
function zt() {
|
|
2507
2516
|
return {
|
|
2508
|
-
amount: { value:
|
|
2509
|
-
grain: { value:
|
|
2517
|
+
amount: { value: Rt.noise.default },
|
|
2518
|
+
grain: { value: Rt.noiseScale.default / 10 }
|
|
2510
2519
|
};
|
|
2511
2520
|
}
|
|
2512
|
-
var
|
|
2513
|
-
function
|
|
2521
|
+
var Bt = "\nvarying vec3 vSurfaceNoisePos;\nvarying vec3 vSurfaceNoiseX;\nvarying vec3 vSurfaceNoiseY;\nvarying vec3 vSurfaceNoiseZ;\n", Vt = "\nvSurfaceNoisePos = position;\nvSurfaceNoiseX = normalMatrix[0];\nvSurfaceNoiseY = normalMatrix[1];\nvSurfaceNoiseZ = normalMatrix[2];\n", Ht = "\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", Ut = "\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", Wt = "\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";
|
|
2522
|
+
function Gt(e, t) {
|
|
2514
2523
|
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${
|
|
2524
|
+
e.uniforms.uSurfaceNoiseAmount = t.amount, e.uniforms.uSurfaceNoiseGrain = t.grain, e.vertexShader = e.vertexShader.replace("#include <common>", `#include <common>\n${Bt}`).replace("#include <begin_vertex>", `#include <begin_vertex>\n${Vt}`), e.fragmentShader = e.fragmentShader.replace("#include <common>", `#include <common>\n${Ht}`).replace("#include <roughnessmap_fragment>", Ut).replace("#include <normal_fragment_maps>", Wt);
|
|
2516
2525
|
}, e.customProgramCacheKey = () => "surface-noise";
|
|
2517
2526
|
}
|
|
2518
|
-
function
|
|
2527
|
+
function Kt(e) {
|
|
2519
2528
|
let t = /* @__PURE__ */ new Set();
|
|
2520
2529
|
e.group.traverse((e) => {
|
|
2521
2530
|
let n = e.material;
|
|
@@ -2529,7 +2538,7 @@ function Gt(e) {
|
|
|
2529
2538
|
...e,
|
|
2530
2539
|
params: {
|
|
2531
2540
|
...e.params,
|
|
2532
|
-
...
|
|
2541
|
+
...Rt
|
|
2533
2542
|
},
|
|
2534
2543
|
setParam(e, r) {
|
|
2535
2544
|
if (e === "noise") for (let e of t) e.amount.value = r;
|
|
@@ -2539,7 +2548,7 @@ function Gt(e) {
|
|
|
2539
2548
|
};
|
|
2540
2549
|
}
|
|
2541
2550
|
// ../devices/src/primitives/materials.ts
|
|
2542
|
-
function
|
|
2551
|
+
function qt(e) {
|
|
2543
2552
|
let n = {
|
|
2544
2553
|
frame: new d({
|
|
2545
2554
|
metalness: 1,
|
|
@@ -2618,15 +2627,15 @@ function Kt(e) {
|
|
|
2618
2627
|
sheen: .4,
|
|
2619
2628
|
sheenRoughness: .8
|
|
2620
2629
|
})
|
|
2621
|
-
}, r =
|
|
2630
|
+
}, r = zt();
|
|
2622
2631
|
for (let e of [
|
|
2623
2632
|
n.frame,
|
|
2624
2633
|
n.back,
|
|
2625
2634
|
n.island
|
|
2626
|
-
])
|
|
2627
|
-
return
|
|
2635
|
+
]) Gt(e, r);
|
|
2636
|
+
return Jt(n, e), n;
|
|
2628
2637
|
}
|
|
2629
|
-
function
|
|
2638
|
+
function Jt(e, t) {
|
|
2630
2639
|
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
2640
|
case "metal":
|
|
2632
2641
|
e.back.metalness = 1, e.back.roughness = t.frameRoughness + .05, e.back.clearcoat = 0;
|
|
@@ -2638,13 +2647,13 @@ function qt(e, t) {
|
|
|
2638
2647
|
}
|
|
2639
2648
|
e.logo.color.set(t.frame).lerp(new p(16777215), .25), t.accent && e.accent.color.set(t.accent);
|
|
2640
2649
|
}
|
|
2641
|
-
function
|
|
2650
|
+
function Yt(e, t, n) {
|
|
2642
2651
|
return {
|
|
2643
2652
|
mesh: e,
|
|
2644
2653
|
aspect: t,
|
|
2645
2654
|
setTexture(e, r, i = "cover", a) {
|
|
2646
2655
|
if (e) {
|
|
2647
|
-
let { repeat: n, offset: o } =
|
|
2656
|
+
let { repeat: n, offset: o } = w(r, t, i, a);
|
|
2648
2657
|
e.wrapS = e.wrapT = h, e.repeat.set(n[0], n[1]), e.offset.set(o[0], o[1]);
|
|
2649
2658
|
}
|
|
2650
2659
|
n.display.emissiveMap = e, n.display.needsUpdate = !0;
|
|
@@ -2656,10 +2665,10 @@ function Jt(e, t, n) {
|
|
|
2656
2665
|
};
|
|
2657
2666
|
}
|
|
2658
2667
|
// ../devices/src/primitives/squircle.ts
|
|
2659
|
-
function
|
|
2660
|
-
return new i(
|
|
2668
|
+
function Xt(e, t, n, r = 2, a = 32) {
|
|
2669
|
+
return new i(Zt(e, t, n, r, a));
|
|
2661
2670
|
}
|
|
2662
|
-
function
|
|
2671
|
+
function Zt(e, t, n, r = 2, i = 32) {
|
|
2663
2672
|
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
2673
|
[
|
|
2665
2674
|
s,
|
|
@@ -2690,7 +2699,7 @@ function Xt(e, t, n, r = 2, i = 32) {
|
|
|
2690
2699
|
return p && m && p !== m && p.distanceToSquared(m) < 1e-12 && f.pop(), f;
|
|
2691
2700
|
}
|
|
2692
2701
|
// ../devices/src/primitives/shapes.ts
|
|
2693
|
-
var
|
|
2702
|
+
var Qt = {
|
|
2694
2703
|
low: {
|
|
2695
2704
|
corner: 12,
|
|
2696
2705
|
bevel: 4,
|
|
@@ -2702,8 +2711,8 @@ var Zt = {
|
|
|
2702
2711
|
round: 64
|
|
2703
2712
|
}
|
|
2704
2713
|
}, Z = .002;
|
|
2705
|
-
function
|
|
2706
|
-
let s = Math.min(a, n / 2 - 1e-4), c = new _(
|
|
2714
|
+
function $t({ width: e, height: t, depth: n, radius: r, exponent: i = 2, edge: a, quality: o }) {
|
|
2715
|
+
let s = Math.min(a, n / 2 - 1e-4), c = new _(Xt(e - 2 * s, t - 2 * s, Math.max(r - s, .001), i, o.corner), {
|
|
2707
2716
|
depth: n - 2 * s,
|
|
2708
2717
|
bevelEnabled: !0,
|
|
2709
2718
|
bevelThickness: s,
|
|
@@ -2713,14 +2722,14 @@ function Qt({ width: e, height: t, depth: n, radius: r, exponent: i = 2, edge: a
|
|
|
2713
2722
|
return c.translate(0, 0, -(n - 2 * s) / 2), c;
|
|
2714
2723
|
}
|
|
2715
2724
|
function Q(e, t, n, r, i) {
|
|
2716
|
-
return new o(
|
|
2725
|
+
return new o(Xt(e, t, n, r, i.corner));
|
|
2717
2726
|
}
|
|
2718
2727
|
function $(e, t, n, i = {}) {
|
|
2719
2728
|
let a = new r(t, n);
|
|
2720
2729
|
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
2730
|
}
|
|
2722
|
-
function
|
|
2723
|
-
let a = r === "x" ? e : t, o = r === "x" ? t : e, s = Math.min(t, n) * .3, c = new _(
|
|
2731
|
+
function en(e, t, n, r, i) {
|
|
2732
|
+
let a = r === "x" ? e : t, o = r === "x" ? t : e, s = Math.min(t, n) * .3, c = new _(Xt(a - 2 * s, o - 2 * s, Math.min(a, o) / 2 - s, 2, Math.max(6, i.corner / 2)), {
|
|
2724
2733
|
depth: n - 2 * s,
|
|
2725
2734
|
bevelEnabled: !0,
|
|
2726
2735
|
bevelThickness: s,
|
|
@@ -2730,8 +2739,8 @@ function $t(e, t, n, r, i) {
|
|
|
2730
2739
|
return c.translate(0, 0, -(n - 2 * s) / 2), c;
|
|
2731
2740
|
}
|
|
2732
2741
|
// ../devices/src/primitives/sweep.ts
|
|
2733
|
-
function
|
|
2734
|
-
let o =
|
|
2742
|
+
function tn({ width: e, height: t, radius: n, exponent: r, segments: i, profile: a }) {
|
|
2743
|
+
let o = Zt(e, t, n, r, i), u = o.length, d = o.map((e, t) => {
|
|
2735
2744
|
let n = o[(t - 1 + u) % u], r = o[(t + 1) % u];
|
|
2736
2745
|
return new c(r.y - n.y, -(r.x - n.x)).normalize();
|
|
2737
2746
|
}), p = u + 1, m = a.length, h = new Float32Array(p * m * 3), g = new Float32Array(p * m * 2), _ = [0];
|
|
@@ -2762,7 +2771,7 @@ function en({ width: e, height: t, radius: n, exponent: r, segments: i, profile:
|
|
|
2762
2771
|
}
|
|
2763
2772
|
return b;
|
|
2764
2773
|
}
|
|
2765
|
-
function
|
|
2774
|
+
function nn(e, t, n = 8) {
|
|
2766
2775
|
let r = [];
|
|
2767
2776
|
for (let i = 0; i <= n; i++) {
|
|
2768
2777
|
let a = i / n * (Math.PI / 2);
|
|
@@ -2771,7 +2780,7 @@ function tn(e, t, n = 8) {
|
|
|
2771
2780
|
return r;
|
|
2772
2781
|
}
|
|
2773
2782
|
// ../devices/src/primitives/uv.ts
|
|
2774
|
-
function
|
|
2783
|
+
function rn(e) {
|
|
2775
2784
|
e.computeBoundingBox();
|
|
2776
2785
|
let t = e.boundingBox, n = e.attributes.position, r = e.attributes.uv;
|
|
2777
2786
|
if (!t || !n || !r) return e;
|
|
@@ -2779,8 +2788,8 @@ function nn(e) {
|
|
|
2779
2788
|
return r.needsUpdate = !0, e;
|
|
2780
2789
|
}
|
|
2781
2790
|
// ../devices/src/phone/build.ts
|
|
2782
|
-
var
|
|
2783
|
-
function
|
|
2791
|
+
var an = new p(16777215);
|
|
2792
|
+
function on() {
|
|
2784
2793
|
return {
|
|
2785
2794
|
logo: new d({
|
|
2786
2795
|
roughness: .35,
|
|
@@ -2815,14 +2824,14 @@ function an() {
|
|
|
2815
2824
|
})
|
|
2816
2825
|
};
|
|
2817
2826
|
}
|
|
2818
|
-
function
|
|
2819
|
-
|
|
2827
|
+
function sn(e, t, n) {
|
|
2828
|
+
Jt(e, n), e.frame.anisotropy = 0, e.lensRing.color.set(n.frame).lerp(an, .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
2829
|
}
|
|
2821
|
-
function
|
|
2822
|
-
let r =
|
|
2823
|
-
|
|
2830
|
+
function cn(e, t, n = "high") {
|
|
2831
|
+
let r = Qt[n], { width: i, height: a, depth: o, rimInset: s, bezel: c } = e, { radius: l, exponent: u } = e.corner, d = qt(t), f = on();
|
|
2832
|
+
sn(d, f, t);
|
|
2824
2833
|
let p = new v();
|
|
2825
|
-
$(p,
|
|
2834
|
+
$(p, tn({
|
|
2826
2835
|
width: i,
|
|
2827
2836
|
height: a,
|
|
2828
2837
|
radius: l,
|
|
@@ -2830,9 +2839,9 @@ function sn(e, t, n = "high") {
|
|
|
2830
2839
|
segments: r.corner,
|
|
2831
2840
|
profile: e.edgeProfile
|
|
2832
2841
|
}), d.frame);
|
|
2833
|
-
for (let t of e.buttons)
|
|
2842
|
+
for (let t of e.buttons) un(e, t, d, f, p, r);
|
|
2834
2843
|
let m = new v();
|
|
2835
|
-
m.position.z = o / 2, p.add(m), $(m,
|
|
2844
|
+
m.position.z = o / 2, p.add(m), $(m, $t({
|
|
2836
2845
|
width: i - 2 * s,
|
|
2837
2846
|
height: a - 2 * s,
|
|
2838
2847
|
radius: l - s,
|
|
@@ -2841,43 +2850,43 @@ function sn(e, t, n = "high") {
|
|
|
2841
2850
|
edge: .022,
|
|
2842
2851
|
quality: r
|
|
2843
2852
|
}), d.glass, { z: -.05 / 2 });
|
|
2844
|
-
let h = i - 2 * c, _ = a - 2 * c, b = $(m,
|
|
2853
|
+
let h = i - 2 * c, _ = a - 2 * c, b = $(m, rn(Q(h, _, l - c, u, r)), d.display, { z: Z * 2 });
|
|
2845
2854
|
$(m, Q(e.island.width, e.island.height, e.island.height / 2, 2, r), d.bezel, {
|
|
2846
2855
|
y: _ / 2 - e.island.fromTop - e.island.height / 2,
|
|
2847
2856
|
z: Z * 3
|
|
2848
2857
|
});
|
|
2849
2858
|
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),
|
|
2851
|
-
let
|
|
2859
|
+
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), dn(e, d, f, C, r), fn(e, d, f, C, r);
|
|
2860
|
+
let w = Yt(b, h / _, d);
|
|
2852
2861
|
return {
|
|
2853
2862
|
group: p,
|
|
2854
|
-
screens: [
|
|
2863
|
+
screens: [w],
|
|
2855
2864
|
bounds: new g().setFromObject(p),
|
|
2856
2865
|
params: {},
|
|
2857
2866
|
restsOnFloor: !1,
|
|
2858
2867
|
setParam() {},
|
|
2859
|
-
setFinish: (e) =>
|
|
2860
|
-
setGlare: (e, t) =>
|
|
2868
|
+
setFinish: (e) => sn(d, f, e),
|
|
2869
|
+
setGlare: (e, t) => w.setGlare(e, t),
|
|
2861
2870
|
dispose: () => {
|
|
2862
2871
|
y(p);
|
|
2863
2872
|
for (let e of Object.values(f)) e.dispose();
|
|
2864
2873
|
}
|
|
2865
2874
|
};
|
|
2866
2875
|
}
|
|
2867
|
-
function
|
|
2876
|
+
function ln(e, t, n) {
|
|
2868
2877
|
return {
|
|
2869
2878
|
x: -e.width / 2 + t,
|
|
2870
2879
|
y: e.height / 2 - n
|
|
2871
2880
|
};
|
|
2872
2881
|
}
|
|
2873
|
-
function
|
|
2882
|
+
function un(e, t, n, r, i, a) {
|
|
2874
2883
|
let o = e.height / 2 - t.fromTop, s = e.width / 2 * t.side;
|
|
2875
2884
|
if (t.kind === "camera") {
|
|
2876
|
-
$(i,
|
|
2885
|
+
$(i, en(t.length, .304, .03, "y", a), n.lensRing, {
|
|
2877
2886
|
x: s - t.side * .012,
|
|
2878
2887
|
y: o,
|
|
2879
2888
|
ry: Math.PI / 2
|
|
2880
|
-
}), $(i,
|
|
2889
|
+
}), $(i, en(t.length - .046, .259, .03, "y", a), r.control, {
|
|
2881
2890
|
x: s - t.side * .006,
|
|
2882
2891
|
y: o,
|
|
2883
2892
|
ry: Math.PI / 2
|
|
@@ -2885,13 +2894,13 @@ function ln(e, t, n, r, i, a) {
|
|
|
2885
2894
|
return;
|
|
2886
2895
|
}
|
|
2887
2896
|
let c = .146;
|
|
2888
|
-
$(i,
|
|
2897
|
+
$(i, en(t.length, .267, c, "y", a), n.frame, {
|
|
2889
2898
|
x: s + t.side * (.046 - c / 2),
|
|
2890
2899
|
y: o,
|
|
2891
2900
|
ry: Math.PI / 2
|
|
2892
2901
|
});
|
|
2893
2902
|
}
|
|
2894
|
-
function
|
|
2903
|
+
function dn(e, t, n, r, i) {
|
|
2895
2904
|
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
2905
|
$(r, Q(c + 2 * d, l + 2 * d, s + d, e.corner.exponent, i), n.seam, {
|
|
2897
2906
|
y: u,
|
|
@@ -2904,9 +2913,9 @@ function un(e, t, n, r, i) {
|
|
|
2904
2913
|
z: Z * 3
|
|
2905
2914
|
});
|
|
2906
2915
|
}
|
|
2907
|
-
function
|
|
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 = [...
|
|
2909
|
-
$(r,
|
|
2916
|
+
function fn(e, t, n, r, i) {
|
|
2917
|
+
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 = [...nn(d, c, i.bevel), [0, -.02]];
|
|
2918
|
+
$(r, tn({
|
|
2910
2919
|
width: f,
|
|
2911
2920
|
height: o,
|
|
2912
2921
|
radius: l,
|
|
@@ -2917,12 +2926,12 @@ function dn(e, t, n, r, i) {
|
|
|
2917
2926
|
y: p,
|
|
2918
2927
|
z: c
|
|
2919
2928
|
});
|
|
2920
|
-
let g =
|
|
2929
|
+
let g = pn(e.lens.radius, i.round);
|
|
2921
2930
|
for (let [i, a] of e.lens.centres) {
|
|
2922
|
-
let o =
|
|
2931
|
+
let o = ln(e, i, a), s = new v();
|
|
2923
2932
|
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
2933
|
}
|
|
2925
|
-
let _ =
|
|
2934
|
+
let _ = ln(e, e.flash.x, e.flash.y);
|
|
2926
2935
|
$(r, new a(e.flash.radius * .86, e.flash.radius, i.round), t.lensRing, {
|
|
2927
2936
|
..._,
|
|
2928
2937
|
z: c + Z
|
|
@@ -2930,18 +2939,18 @@ function dn(e, t, n, r, i) {
|
|
|
2930
2939
|
..._,
|
|
2931
2940
|
z: c + Z
|
|
2932
2941
|
});
|
|
2933
|
-
let y =
|
|
2942
|
+
let y = ln(e, e.lidar.x, e.lidar.y);
|
|
2934
2943
|
$(r, new u(e.lidar.radius, i.round), t.pupil, {
|
|
2935
2944
|
...y,
|
|
2936
2945
|
z: c + Z
|
|
2937
2946
|
});
|
|
2938
|
-
let b =
|
|
2947
|
+
let b = ln(e, e.mic.x, e.mic.y);
|
|
2939
2948
|
$(r, new u(e.mic.radius, 16), t.bezel, {
|
|
2940
2949
|
...b,
|
|
2941
2950
|
z: c + Z
|
|
2942
2951
|
});
|
|
2943
2952
|
}
|
|
2944
|
-
function
|
|
2953
|
+
function pn(e, t) {
|
|
2945
2954
|
let r = e / .833, i = (e) => new n(e.map(([e, t]) => new c(e * r, t * r)), t);
|
|
2946
2955
|
return {
|
|
2947
2956
|
housing: i([
|
|
@@ -2989,7 +2998,7 @@ function fn(e, t) {
|
|
|
2989
2998
|
};
|
|
2990
2999
|
}
|
|
2991
3000
|
// ../devices/src/phone/finishes.ts
|
|
2992
|
-
var
|
|
3001
|
+
var mn = {
|
|
2993
3002
|
black: {
|
|
2994
3003
|
label: "Black",
|
|
2995
3004
|
frame: "#2e2f33",
|
|
@@ -3018,7 +3027,7 @@ var pn = {
|
|
|
3018
3027
|
frameRoughness: .38,
|
|
3019
3028
|
backMaterial: "glass"
|
|
3020
3029
|
}
|
|
3021
|
-
},
|
|
3030
|
+
}, hn = {
|
|
3022
3031
|
depth: .875,
|
|
3023
3032
|
corner: {
|
|
3024
3033
|
radius: 1.4,
|
|
@@ -3083,7 +3092,7 @@ var pn = {
|
|
|
3083
3092
|
"burgundy"
|
|
3084
3093
|
]
|
|
3085
3094
|
};
|
|
3086
|
-
function
|
|
3095
|
+
function gn(e) {
|
|
3087
3096
|
return {
|
|
3088
3097
|
flash: {
|
|
3089
3098
|
radius: .3365,
|
|
@@ -3102,8 +3111,8 @@ function hn(e) {
|
|
|
3102
3111
|
}
|
|
3103
3112
|
};
|
|
3104
3113
|
}
|
|
3105
|
-
var
|
|
3106
|
-
...
|
|
3114
|
+
var _n = {
|
|
3115
|
+
...hn,
|
|
3107
3116
|
id: "phone.iphone-18-pro-max",
|
|
3108
3117
|
label: "iPhone 18 Pro Max",
|
|
3109
3118
|
width: 7.8,
|
|
@@ -3112,7 +3121,7 @@ var gn = {
|
|
|
3112
3121
|
px: [1320, 2868],
|
|
3113
3122
|
ppi: 460
|
|
3114
3123
|
},
|
|
3115
|
-
...
|
|
3124
|
+
...gn(7.8),
|
|
3116
3125
|
backPanel: {
|
|
3117
3126
|
fromTop: 4.878,
|
|
3118
3127
|
margin: .381,
|
|
@@ -3154,8 +3163,8 @@ var gn = {
|
|
|
3154
3163
|
height: 2.004,
|
|
3155
3164
|
fromTop: 9.753
|
|
3156
3165
|
}
|
|
3157
|
-
},
|
|
3158
|
-
...
|
|
3166
|
+
}, vn = {
|
|
3167
|
+
...hn,
|
|
3159
3168
|
id: "phone.iphone-18-pro",
|
|
3160
3169
|
label: "iPhone 18 Pro",
|
|
3161
3170
|
width: 7.19,
|
|
@@ -3164,7 +3173,7 @@ var gn = {
|
|
|
3164
3173
|
px: [1206, 2622],
|
|
3165
3174
|
ppi: 460
|
|
3166
3175
|
},
|
|
3167
|
-
...
|
|
3176
|
+
...gn(7.19),
|
|
3168
3177
|
backPanel: {
|
|
3169
3178
|
fromTop: 4.878,
|
|
3170
3179
|
margin: .381,
|
|
@@ -3206,13 +3215,13 @@ var gn = {
|
|
|
3206
3215
|
height: 2.004,
|
|
3207
3216
|
fromTop: 9.079
|
|
3208
3217
|
}
|
|
3209
|
-
},
|
|
3210
|
-
[
|
|
3211
|
-
[
|
|
3212
|
-
},
|
|
3218
|
+
}, yn = {
|
|
3219
|
+
[vn.id]: vn,
|
|
3220
|
+
[_n.id]: _n
|
|
3221
|
+
}, bn = /* @__PURE__ */ e({ phone: () => xn }), xn = {
|
|
3213
3222
|
type: "phone",
|
|
3214
|
-
specs:
|
|
3215
|
-
finishes:
|
|
3216
|
-
build:
|
|
3223
|
+
specs: yn,
|
|
3224
|
+
finishes: mn,
|
|
3225
|
+
build: cn
|
|
3217
3226
|
};
|
|
3218
|
-
export {
|
|
3227
|
+
export { me as C, y as D, C as E, Te as S, ee as T, _t as _, Qt as a, Tt as b, en as c, Xt as d, Jt as f, Lt as g, Kt as h, Z as i, $t as l, Yt as m, rn as n, $ as o, qt as p, tn as r, Q as s, bn as t, Zt as u, yt as v, w, Ee as x, vt as y };
|