@kolkrabbi/design-editor 0.33.0 → 0.35.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/dist/{core-DCTuJ1dz.js → core-DJet1D7E.js} +2248 -2246
- package/dist/core.js +2 -2
- package/dist/design-editor.css +1 -1
- package/dist/design-editor.js +3 -3
- package/dist/{generators-XBzHN_kX.js → generators-Bf08F0NV.js} +873 -872
- package/dist/generators.js +1 -1
- package/dist/{host-B4QQewPr.js → host-CRRiwlrB.js} +1 -1
- package/dist/{store-CF9s1Pb2.js → store-DZUWPE2s.js} +212 -211
- package/package.json +7 -7
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { $ as e, An as t, B as n, Bn as r, C as i, D as a, F as o, Fn as s, I as c, J as l, L as u, Mn as d, Mt as f, Nn as p, Q as m, Rn as h, Rt as g, S as _, St as v, Vn as y, X as b, Y as x, Z as S, a as C, at as w, c as T, d as E, dn as D, et as ee, f as O, gt as te, it as k, l as ne, m as re, mt as ie, n as ae, nt as oe, o as se, ot as ce, p as le, pn as
|
|
2
|
-
import { c as
|
|
3
|
-
import { C as
|
|
4
|
-
import { n as
|
|
5
|
-
import { I as
|
|
6
|
-
import { h as
|
|
7
|
-
import { BezierPathEditor as
|
|
8
|
-
import { useCallback as Qt, useEffect as $t, useId as en, useMemo as tn, useRef as nn, useState as
|
|
9
|
-
import { Fragment as
|
|
1
|
+
import { $ as e, An as t, B as n, Bn as r, C as i, D as a, F as o, Fn as s, I as c, J as l, L as u, Mn as d, Mt as f, Nn as p, Q as m, Rn as h, Rt as g, S as _, St as v, Vn as y, X as b, Y as x, Z as S, a as C, at as w, c as T, d as E, dn as D, et as ee, f as O, gt as te, it as k, l as ne, m as re, mt as ie, n as ae, nt as oe, o as se, ot as ce, p as le, pn as A, q as ue, rt as de, s as fe, t as pe, tt as me, u as he, un as ge, x as _e } from "./rolls-CEQmdcp3.js";
|
|
2
|
+
import { c as ve, n as ye, t as be } from "./useLayerEdit-Cmtx3V3O.js";
|
|
3
|
+
import { C as xe, D as Se, E as Ce, O as we, S as Te, T as Ee, _ as De, at as Oe, b as ke, ct as Ae, d as je, dt as Me, f as Ne, ft as Pe, h as Fe, ht as Ie, it as Le, l as Re, lt as ze, m as Be, mt as Ve, n as He, nt as Ue, ot as We, pt as Ge, r as Ke, rt as qe, st as Je, t as Ye, tt as Xe, v as Ze, w as Qe, x as $e, y as et } from "./effectCategories-DV7i_AgK.js";
|
|
4
|
+
import { n as tt, t as nt } from "./TreePicker-1_NZG8GB.js";
|
|
5
|
+
import { I as rt, N as it, a as at, c as ot, i as st, m as ct, n as lt, o as ut, r as dt } from "./store-DZUWPE2s.js";
|
|
6
|
+
import { h as ft, r as pt, s as mt, t as ht, u as gt } from "./morphStore-B5081ohW.js";
|
|
7
|
+
import { BezierPathEditor as _t, Button as j, ButtonGroup as vt, CurveEditor as yt, Dialog as bt, Divider as xt, Dropdown as M, FullscreenOverlay as St, Input as Ct, KeyframeEditor as wt, LabeledControl as Tt, LabeledControlSection as Et, ModalShell as Dt, SettingsCell as Ot, SettingsDisclosure as kt, SettingsFieldMap as At, SettingsGrid as jt, SettingsGroup as Mt, SettingsLights as Nt, SettingsPoint as Pt, SettingsRamp as Ft, SettingsRampHead as It, SettingsRange as Lt, SettingsRow as Rt, SettingsSegmented as zt, SettingsSelect as Bt, SettingsSlider as Vt, SettingsText as Ht, SettingsToggle as Ut, ShellSearchOverlay as Wt, Slider as Gt, StepList as Kt, TabsRow as qt, ToggleSwitch as Jt, Tooltip as Yt, ViewToggle as Xt, XYPad as Zt } from "@kolkrabbi/kol-component";
|
|
8
|
+
import { useCallback as Qt, useEffect as $t, useId as en, useMemo as tn, useRef as nn, useState as N } from "react";
|
|
9
|
+
import { Fragment as P, jsx as F, jsxs as I } from "react/jsx-runtime";
|
|
10
10
|
import { PropertyRail as rn } from "@kolkrabbi/kol-shell";
|
|
11
11
|
//#region src/loops/taxonomy.js
|
|
12
12
|
var an = [
|
|
@@ -78,7 +78,7 @@ var an = [
|
|
|
78
78
|
paratype: "Para Type · Misc",
|
|
79
79
|
distress: "Distressor · Vector",
|
|
80
80
|
modulator: "Modulator · Vector"
|
|
81
|
-
}, ln = Object.fromEntries(
|
|
81
|
+
}, ln = Object.fromEntries(Xe.params.map((e) => [e.key, e.default]));
|
|
82
82
|
function un(e) {
|
|
83
83
|
let t = { ...ln };
|
|
84
84
|
for (let n of Object.keys(ln)) {
|
|
@@ -94,7 +94,7 @@ function dn(e, t) {
|
|
|
94
94
|
var fn = (e) => Number(e.toFixed(2));
|
|
95
95
|
function pn(e, t, n) {
|
|
96
96
|
if (!e || e.loopId !== "paratype-glyph") return null;
|
|
97
|
-
let r = Math.max(1, e.w ?? 480), i = Math.max(1, e.h ?? 480), a = un(e), o =
|
|
97
|
+
let r = Math.max(1, e.w ?? 480), i = Math.max(1, e.h ?? 480), a = un(e), o = Ue(a, r, i);
|
|
98
98
|
if (!o.length) return null;
|
|
99
99
|
let s = [];
|
|
100
100
|
t.bg && s.push({
|
|
@@ -152,12 +152,12 @@ function mn(e, t) {
|
|
|
152
152
|
_framePreset: "custom",
|
|
153
153
|
_formPreset: "custom",
|
|
154
154
|
_lookPreset: "custom",
|
|
155
|
-
...
|
|
155
|
+
...Ee(e)
|
|
156
156
|
};
|
|
157
157
|
}
|
|
158
158
|
function hn(e, t, n = "preset") {
|
|
159
159
|
if (!e?.loopGroup) return null;
|
|
160
|
-
let r = e.loopGroup, i =
|
|
160
|
+
let r = e.loopGroup, i = Ce(r);
|
|
161
161
|
if (!i.length) return null;
|
|
162
162
|
let a = i.find((t) => t.id === e.presetId) ?? i[0], o = (e, t) => (e % t + t) % t;
|
|
163
163
|
if (n === "category") {
|
|
@@ -182,13 +182,13 @@ var gn = {
|
|
|
182
182
|
function _n(e, t, n) {
|
|
183
183
|
let r = e?.loopGroup;
|
|
184
184
|
if (!r) return !1;
|
|
185
|
-
let i =
|
|
186
|
-
return t === "type" ? n.some((e) => e !== r &&
|
|
185
|
+
let i = Ce(r).filter((e) => !et(e)), a = i.find((t) => t.id === e.presetId) ?? i[0];
|
|
186
|
+
return t === "type" ? n.some((e) => e !== r && Ce(e).some((e) => !et(e))) : t === "category" ? new Set(i.map((e) => e.sub).filter((e) => e && e !== a?.sub)).size > 0 : i.some((e) => e.id !== a?.id && (!a?.sub || e.sub === a.sub));
|
|
187
187
|
}
|
|
188
188
|
function vn(e, t, n, r) {
|
|
189
189
|
let i = e?.loopGroup;
|
|
190
190
|
if (!i) return null;
|
|
191
|
-
let a = (e) => e[Math.floor(n() * e.length)], o = (e) =>
|
|
191
|
+
let a = (e) => e[Math.floor(n() * e.length)], o = (e) => Ce(e).filter((e) => !et(e));
|
|
192
192
|
if (t === "type") {
|
|
193
193
|
let e = r.filter((e) => e !== i && o(e).length);
|
|
194
194
|
if (!e.length) return null;
|
|
@@ -216,15 +216,15 @@ function yn(e, t, n) {
|
|
|
216
216
|
}
|
|
217
217
|
return r;
|
|
218
218
|
}
|
|
219
|
-
var bn = null, xn = () => bn ??= [...
|
|
219
|
+
var bn = null, xn = () => bn ??= [...Ke(Ne).filter((e) => !e.rack).map((e) => ({
|
|
220
220
|
id: e.id,
|
|
221
221
|
filters: e.filters
|
|
222
|
-
})), ...
|
|
222
|
+
})), ...Ye.map((e) => ({
|
|
223
223
|
id: e.id,
|
|
224
|
-
filters:
|
|
224
|
+
filters: je(e, Ne)
|
|
225
225
|
}))].filter((e) => e.filters.length);
|
|
226
226
|
function Sn(e, t, n) {
|
|
227
|
-
let r = (e) => e[Math.floor(n() * e.length)], i =
|
|
227
|
+
let r = (e) => e[Math.floor(n() * e.length)], i = He(e);
|
|
228
228
|
if (t === "type") {
|
|
229
229
|
let e = xn().filter((e) => e.id !== i);
|
|
230
230
|
return e.length ? r(r(e).filters).id : null;
|
|
@@ -233,16 +233,16 @@ function Sn(e, t, n) {
|
|
|
233
233
|
return a.length ? r(a).id : null;
|
|
234
234
|
}
|
|
235
235
|
function Cn(e, t, n) {
|
|
236
|
-
let r =
|
|
236
|
+
let r = Re(e?.id), i = (e?.params.find((e) => e.key === r)?.options ?? []).map((e) => typeof e == "object" ? e.value : e).filter((e) => e !== t[r]);
|
|
237
237
|
return i.length ? i[Math.floor(n() * i.length)] : null;
|
|
238
238
|
}
|
|
239
239
|
function wn(e, t) {
|
|
240
|
-
return e ? t === "type" ? xn().length > 1 : t === "category" ? (xn().find((t) => t.id ===
|
|
240
|
+
return e ? t === "type" ? xn().length > 1 : t === "category" ? (xn().find((t) => t.id === He(e.id))?.filters.length ?? 0) > 1 : t === "preset" ? !!Re(e.id) : !0 : !1;
|
|
241
241
|
}
|
|
242
242
|
//#endregion
|
|
243
243
|
//#region src/editor/compose/inspectors/LoopPicker.jsx
|
|
244
244
|
function Tn({ layer: e, tree: t = sn, inline: n = !0, about: r = null }) {
|
|
245
|
-
let { updateLayer: i } = l(), a = u(), o = e.loopGroup ?? "shape", s = t.find((e) => e.groups.includes(o)) ?? null, c =
|
|
245
|
+
let { updateLayer: i } = l(), a = u(), o = e.loopGroup ?? "shape", s = t.find((e) => e.groups.includes(o)) ?? null, c = Ce(o), d = c.find((t) => t.id === e.presetId), f = [...new Set(c.map((e) => e.sub).filter(Boolean))], p = d?.sub ?? f[0], m = f.length ? c.filter((e) => e.sub === p) : c, h = (t, n = o) => {
|
|
246
246
|
t && i(e.id, {
|
|
247
247
|
loopGroup: n,
|
|
248
248
|
presetId: t.id,
|
|
@@ -251,16 +251,16 @@ function Tn({ layer: e, tree: t = sn, inline: n = !0, about: r = null }) {
|
|
|
251
251
|
_framePreset: "custom",
|
|
252
252
|
_formPreset: "custom",
|
|
253
253
|
_lookPreset: "custom",
|
|
254
|
-
...
|
|
254
|
+
...Ee(t)
|
|
255
255
|
});
|
|
256
256
|
};
|
|
257
|
-
return /* @__PURE__ */
|
|
258
|
-
t.length > 1 || !s ? /* @__PURE__ */
|
|
257
|
+
return /* @__PURE__ */ I(P, { children: [
|
|
258
|
+
t.length > 1 || !s ? /* @__PURE__ */ F(tt, {
|
|
259
259
|
label: "Type",
|
|
260
260
|
inline: n,
|
|
261
|
-
children: /* @__PURE__ */
|
|
261
|
+
children: /* @__PURE__ */ I("div", {
|
|
262
262
|
className: "flex flex-col gap-1 w-full",
|
|
263
|
-
children: [s ? /* @__PURE__ */
|
|
263
|
+
children: [s ? /* @__PURE__ */ F(nt, {
|
|
264
264
|
options: t.map((e) => ({
|
|
265
265
|
value: e.label,
|
|
266
266
|
label: e.label
|
|
@@ -268,22 +268,22 @@ function Tn({ layer: e, tree: t = sn, inline: n = !0, about: r = null }) {
|
|
|
268
268
|
value: s.label,
|
|
269
269
|
onChange: (e) => {
|
|
270
270
|
let n = t.find((t) => t.label === e);
|
|
271
|
-
n && h(
|
|
271
|
+
n && h(Ce(n.groups[0])[0], n.groups[0]);
|
|
272
272
|
}
|
|
273
|
-
}) : /* @__PURE__ */
|
|
273
|
+
}) : /* @__PURE__ */ F("span", {
|
|
274
274
|
className: "kol-helper-12 text-meta px-1",
|
|
275
|
-
children: cn[o] ??
|
|
276
|
-
}), s && s.groups.length > 1 && /* @__PURE__ */
|
|
275
|
+
children: cn[o] ?? De(o).label
|
|
276
|
+
}), s && s.groups.length > 1 && /* @__PURE__ */ F(nt, {
|
|
277
277
|
options: s.groups.map((e) => ({
|
|
278
278
|
value: e,
|
|
279
|
-
label: s.labels?.[e] ??
|
|
279
|
+
label: s.labels?.[e] ?? De(e).label
|
|
280
280
|
})),
|
|
281
281
|
value: o,
|
|
282
|
-
onChange: (e) => h(
|
|
282
|
+
onChange: (e) => h(Ce(e)[0], e)
|
|
283
283
|
})]
|
|
284
284
|
})
|
|
285
285
|
}) : null,
|
|
286
|
-
f.length > 1 && /* @__PURE__ */
|
|
286
|
+
f.length > 1 && /* @__PURE__ */ F(tt, {
|
|
287
287
|
inline: n,
|
|
288
288
|
label: "Category",
|
|
289
289
|
options: f.map((e) => ({
|
|
@@ -293,13 +293,13 @@ function Tn({ layer: e, tree: t = sn, inline: n = !0, about: r = null }) {
|
|
|
293
293
|
value: p,
|
|
294
294
|
onChange: (e) => h(c.find((t) => t.sub === e))
|
|
295
295
|
}),
|
|
296
|
-
/* @__PURE__ */
|
|
296
|
+
/* @__PURE__ */ F(tt, {
|
|
297
297
|
inline: n,
|
|
298
298
|
label: "Preset",
|
|
299
|
-
children: /* @__PURE__ */
|
|
299
|
+
children: /* @__PURE__ */ I("div", {
|
|
300
300
|
className: "flex w-full gap-1",
|
|
301
301
|
children: [
|
|
302
|
-
m.length > 1 && /* @__PURE__ */
|
|
302
|
+
m.length > 1 && /* @__PURE__ */ F(j, {
|
|
303
303
|
size: a,
|
|
304
304
|
iconOnly: "chevron-left",
|
|
305
305
|
"aria-label": "Previous preset (H)",
|
|
@@ -308,7 +308,7 @@ function Tn({ layer: e, tree: t = sn, inline: n = !0, about: r = null }) {
|
|
|
308
308
|
t && i(e.id, t);
|
|
309
309
|
}
|
|
310
310
|
}),
|
|
311
|
-
/* @__PURE__ */
|
|
311
|
+
/* @__PURE__ */ F(nt, {
|
|
312
312
|
className: "flex-1 min-w-0",
|
|
313
313
|
options: m.map((e) => ({
|
|
314
314
|
value: e.id,
|
|
@@ -317,7 +317,7 @@ function Tn({ layer: e, tree: t = sn, inline: n = !0, about: r = null }) {
|
|
|
317
317
|
value: e.presetId,
|
|
318
318
|
onChange: (e) => h(c.find((t) => t.id === e))
|
|
319
319
|
}),
|
|
320
|
-
m.length > 1 && /* @__PURE__ */
|
|
320
|
+
m.length > 1 && /* @__PURE__ */ F(j, {
|
|
321
321
|
size: a,
|
|
322
322
|
iconOnly: "chevron-right",
|
|
323
323
|
"aria-label": "Next preset (L)",
|
|
@@ -337,41 +337,42 @@ function Tn({ layer: e, tree: t = sn, inline: n = !0, about: r = null }) {
|
|
|
337
337
|
function En({ open: e, onClose: n, schema: r, layer: i, size: a = "md" }) {
|
|
338
338
|
if (d(), !e) return null;
|
|
339
339
|
let o = se(r ?? [], i);
|
|
340
|
-
return /* @__PURE__ */
|
|
340
|
+
return /* @__PURE__ */ F(St, {
|
|
341
341
|
open: !0,
|
|
342
342
|
scrim: !0,
|
|
343
343
|
onClose: n,
|
|
344
|
-
children: /* @__PURE__ */
|
|
345
|
-
|
|
344
|
+
children: /* @__PURE__ */ I(Dt, {
|
|
345
|
+
variant: "bordered",
|
|
346
|
+
className: "kol-roll-scopes gap-4 p-5",
|
|
346
347
|
style: { width: "min(420px, calc(100vw - 32px))" },
|
|
347
348
|
children: [
|
|
348
|
-
/* @__PURE__ */
|
|
349
|
+
/* @__PURE__ */ F("p", {
|
|
349
350
|
className: "kol-eyebrow text-fg-96",
|
|
350
351
|
children: "Randomize all rolls"
|
|
351
352
|
}),
|
|
352
|
-
/* @__PURE__ */
|
|
353
|
+
/* @__PURE__ */ I(Et, {
|
|
353
354
|
divided: !0,
|
|
354
|
-
children: [o.map((e) => /* @__PURE__ */
|
|
355
|
+
children: [o.map((e) => /* @__PURE__ */ F(Rt, {
|
|
355
356
|
label: e.label,
|
|
356
|
-
children: /* @__PURE__ */
|
|
357
|
+
children: /* @__PURE__ */ F(Jt, {
|
|
357
358
|
checked: T(e.id),
|
|
358
359
|
onChange: (t) => ne(e.id, t),
|
|
359
360
|
"aria-label": e.label
|
|
360
361
|
})
|
|
361
|
-
}, e.id)), /* @__PURE__ */
|
|
362
|
+
}, e.id)), /* @__PURE__ */ F(Rt, {
|
|
362
363
|
label: "Effects",
|
|
363
|
-
children: /* @__PURE__ */
|
|
364
|
-
checked:
|
|
364
|
+
children: /* @__PURE__ */ F(Jt, {
|
|
365
|
+
checked: fe(),
|
|
365
366
|
onChange: (e) => t("rollEffects", !!e),
|
|
366
367
|
"aria-label": "Effects"
|
|
367
368
|
})
|
|
368
369
|
})]
|
|
369
370
|
}),
|
|
370
|
-
/* @__PURE__ */
|
|
371
|
+
/* @__PURE__ */ F("p", {
|
|
371
372
|
className: "kol-mono-12 text-meta",
|
|
372
373
|
children: "A scope switched off still rolls from its own button."
|
|
373
374
|
}),
|
|
374
|
-
/* @__PURE__ */
|
|
375
|
+
/* @__PURE__ */ F(j, {
|
|
375
376
|
tone: "primary",
|
|
376
377
|
size: a,
|
|
377
378
|
className: "w-full",
|
|
@@ -1486,13 +1487,13 @@ function $n(e, t) {
|
|
|
1486
1487
|
//#endregion
|
|
1487
1488
|
//#region src/editor/compose/inspectors/KeyframeEditor.jsx
|
|
1488
1489
|
function er({ layer: e, patch: t, defaultDuration: n = 8 }) {
|
|
1489
|
-
let r = () => Qn(e.duration ?? n,
|
|
1490
|
-
return /* @__PURE__ */
|
|
1490
|
+
let r = () => Qn(e.duration ?? n, A.getLoopSeconds());
|
|
1491
|
+
return /* @__PURE__ */ F(wt, {
|
|
1491
1492
|
keyframes: e.keyframes,
|
|
1492
1493
|
onChange: (e) => t({ keyframes: e }),
|
|
1493
|
-
t: () =>
|
|
1494
|
-
onPause: () =>
|
|
1495
|
-
onSeek: (e) =>
|
|
1494
|
+
t: () => A.getT() * r() % 1,
|
|
1495
|
+
onPause: () => A.pause(),
|
|
1496
|
+
onSeek: (e) => A.seek(e / r()),
|
|
1496
1497
|
easeOptions: qn,
|
|
1497
1498
|
defaultKeyframes: Zn
|
|
1498
1499
|
});
|
|
@@ -1512,28 +1513,28 @@ function tr({ layer: e, patch: t, camParams: n, isEngine: r, showHeader: i = !1
|
|
|
1512
1513
|
}, l = (e) => {
|
|
1513
1514
|
s[e] && t({ ...s[e] });
|
|
1514
1515
|
};
|
|
1515
|
-
return /* @__PURE__ */
|
|
1516
|
+
return /* @__PURE__ */ I(P, { children: [i && /* @__PURE__ */ F("span", {
|
|
1516
1517
|
className: "kol-eyebrow text-fg-80",
|
|
1517
1518
|
children: "Camera"
|
|
1518
|
-
}), /* @__PURE__ */
|
|
1519
|
+
}), /* @__PURE__ */ I("div", {
|
|
1519
1520
|
className: "flex items-center gap-1",
|
|
1520
|
-
children: [n.length > 0 && s.map((e, t) => /* @__PURE__ */
|
|
1521
|
+
children: [n.length > 0 && s.map((e, t) => /* @__PURE__ */ F(Yt, {
|
|
1521
1522
|
label: e ? "Recall pose (shift-click = overwrite)" : "Save pose",
|
|
1522
|
-
children: /* @__PURE__ */
|
|
1523
|
+
children: /* @__PURE__ */ F(j, {
|
|
1523
1524
|
"aria-label": e ? "Recall pose (shift-click = overwrite)" : "Save pose",
|
|
1524
1525
|
tone: e ? "inverted" : "ghost",
|
|
1525
1526
|
size: a,
|
|
1526
1527
|
onClick: (n) => n.shiftKey || !e ? c(t) : l(t),
|
|
1527
1528
|
children: t + 1
|
|
1528
1529
|
})
|
|
1529
|
-
}, t)), /* @__PURE__ */
|
|
1530
|
+
}, t)), /* @__PURE__ */ F(j, {
|
|
1530
1531
|
tone: "primary",
|
|
1531
1532
|
size: a,
|
|
1532
1533
|
className: "ml-auto",
|
|
1533
1534
|
onClick: () => {
|
|
1534
1535
|
let i = {};
|
|
1535
1536
|
for (let e of n) i[e.key] = e.default;
|
|
1536
|
-
t(i), r && import("./host-
|
|
1537
|
+
t(i), r && import("./host-CRRiwlrB.js").then((t) => t.hostAction?.(e.id, "resetCamera")).catch(() => {});
|
|
1537
1538
|
},
|
|
1538
1539
|
children: "Reset"
|
|
1539
1540
|
})]
|
|
@@ -1545,36 +1546,36 @@ function nr({ layer: e, patch: t, seed: n }) {
|
|
|
1545
1546
|
let r = u(), i = e.rules ?? [], a = (e, n) => t({
|
|
1546
1547
|
rules: e,
|
|
1547
1548
|
...n
|
|
1548
|
-
}), o = () => a([...i,
|
|
1549
|
+
}), o = () => a([...i, Ve()]), s = (e, t) => a(i.map((n, r) => r === e ? t : n)), c = (e) => a(i.filter((t, n) => n !== e)), l = (e) => {
|
|
1549
1550
|
let t = n.take(), r = O(t >>> 0);
|
|
1550
1551
|
a(i.map((t, n) => n === e ? {
|
|
1551
|
-
...
|
|
1552
|
+
...Ie(r),
|
|
1552
1553
|
id: t.id
|
|
1553
1554
|
} : t), { _rollSeed: t });
|
|
1554
1555
|
};
|
|
1555
|
-
return /* @__PURE__ */
|
|
1556
|
+
return /* @__PURE__ */ F(Tt, {
|
|
1556
1557
|
label: `Rules · ${i.length}`,
|
|
1557
|
-
children: /* @__PURE__ */
|
|
1558
|
+
children: /* @__PURE__ */ I("div", {
|
|
1558
1559
|
className: "flex flex-col gap-2",
|
|
1559
|
-
children: [i.map((e, t) => /* @__PURE__ */
|
|
1560
|
+
children: [i.map((e, t) => /* @__PURE__ */ F(it, {
|
|
1560
1561
|
rule: e,
|
|
1561
1562
|
onChange: (e) => s(t, e),
|
|
1562
1563
|
onRemove: () => c(t),
|
|
1563
1564
|
onReroll: () => l(t)
|
|
1564
|
-
}, e.id ?? t)), /* @__PURE__ */
|
|
1565
|
+
}, e.id ?? t)), /* @__PURE__ */ I("div", {
|
|
1565
1566
|
className: "grid grid-cols-2 gap-2",
|
|
1566
|
-
children: [/* @__PURE__ */
|
|
1567
|
+
children: [/* @__PURE__ */ F(j, {
|
|
1567
1568
|
tone: "primary",
|
|
1568
1569
|
size: r,
|
|
1569
1570
|
iconLeft: "plus",
|
|
1570
1571
|
onClick: o,
|
|
1571
1572
|
children: "Add rule"
|
|
1572
|
-
}), /* @__PURE__ */
|
|
1573
|
+
}), /* @__PURE__ */ F(j, {
|
|
1573
1574
|
tone: "primary",
|
|
1574
1575
|
size: r,
|
|
1575
1576
|
onClick: () => {
|
|
1576
1577
|
let e = n.take(), t = O(e >>> 0), r = 1 + Math.floor(t() * 3);
|
|
1577
|
-
a(Array.from({ length: r }, () =>
|
|
1578
|
+
a(Array.from({ length: r }, () => Ie(t)), { _rollSeed: e });
|
|
1578
1579
|
},
|
|
1579
1580
|
children: "Randomize"
|
|
1580
1581
|
})]
|
|
@@ -1604,8 +1605,8 @@ var rr = (e) => e.map((e) => ({
|
|
|
1604
1605
|
hry: -2 * (e.hr?.y ?? 0)
|
|
1605
1606
|
}));
|
|
1606
1607
|
function ar({ value: e, onChange: t }) {
|
|
1607
|
-
let n = Array.isArray(e) && e.length > 1 ? e :
|
|
1608
|
-
return /* @__PURE__ */
|
|
1608
|
+
let n = Array.isArray(e) && e.length > 1 ? e : Ge, r = u();
|
|
1609
|
+
return /* @__PURE__ */ F(_t, {
|
|
1609
1610
|
value: rr(n),
|
|
1610
1611
|
onChange: (e) => {
|
|
1611
1612
|
let r = ir(e);
|
|
@@ -1623,10 +1624,10 @@ function ar({ value: e, onChange: t }) {
|
|
|
1623
1624
|
});
|
|
1624
1625
|
}
|
|
1625
1626
|
function or({ layer: e, patch: t }) {
|
|
1626
|
-
return e.render !== "field" || e.field !== "organic" || e.waveProfile !== "custom" ? null : /* @__PURE__ */
|
|
1627
|
+
return e.render !== "field" || e.field !== "organic" || e.waveProfile !== "custom" ? null : /* @__PURE__ */ F(Tt, {
|
|
1627
1628
|
label: "Profile curve",
|
|
1628
|
-
children: /* @__PURE__ */
|
|
1629
|
-
value: Array.isArray(e.waveCurve) && e.waveCurve.length > 1 ? e.waveCurve :
|
|
1629
|
+
children: /* @__PURE__ */ F(ar, {
|
|
1630
|
+
value: Array.isArray(e.waveCurve) && e.waveCurve.length > 1 ? e.waveCurve : Ge,
|
|
1630
1631
|
onChange: (e) => t({ waveCurve: e })
|
|
1631
1632
|
})
|
|
1632
1633
|
});
|
|
@@ -1634,30 +1635,30 @@ function or({ layer: e, patch: t }) {
|
|
|
1634
1635
|
//#endregion
|
|
1635
1636
|
//#region src/editor/compose/inspectors/CurveEditor.jsx
|
|
1636
1637
|
function sr({ layer: e, patch: t }) {
|
|
1637
|
-
let n = e.clip === "custom", r = n ? null :
|
|
1638
|
-
label: (
|
|
1638
|
+
let n = e.clip === "custom", r = n ? null : We(e.clip), i = n ? null : {
|
|
1639
|
+
label: (qe.find((t) => t.id === e.clip) || qe[0]).label,
|
|
1639
1640
|
copies: r.copies,
|
|
1640
1641
|
spiral: r.spiral,
|
|
1641
1642
|
layerCopies: e.copies,
|
|
1642
1643
|
layerSpiral: e.spiral
|
|
1643
1644
|
};
|
|
1644
|
-
return /* @__PURE__ */
|
|
1645
|
-
value: n ? e.custom ??
|
|
1645
|
+
return /* @__PURE__ */ F(yt, {
|
|
1646
|
+
value: n ? e.custom ?? Oe("polar") : r.def,
|
|
1646
1647
|
stock: i,
|
|
1647
1648
|
onChange: (e, { extras: n }) => t({
|
|
1648
1649
|
clip: "custom",
|
|
1649
1650
|
...n,
|
|
1650
1651
|
custom: e
|
|
1651
1652
|
}),
|
|
1652
|
-
validate:
|
|
1653
|
-
kinds:
|
|
1654
|
-
defaultFor:
|
|
1653
|
+
validate: Je,
|
|
1654
|
+
kinds: Le,
|
|
1655
|
+
defaultFor: Oe
|
|
1655
1656
|
});
|
|
1656
1657
|
}
|
|
1657
1658
|
//#endregion
|
|
1658
1659
|
//#region src/editor/compose/inspectors/ParatypeTools.jsx
|
|
1659
1660
|
function cr({ layer: e, patch: t, tab: n, renderAnimate: r }) {
|
|
1660
|
-
return e?.loopId === "paratype-glyph" ? n === "generate" ? /* @__PURE__ */
|
|
1661
|
+
return e?.loopId === "paratype-glyph" ? n === "generate" ? /* @__PURE__ */ F(lr, { layer: e }) : n === "style" ? /* @__PURE__ */ F(ur, {
|
|
1661
1662
|
layer: e,
|
|
1662
1663
|
patch: t,
|
|
1663
1664
|
renderAnimate: r
|
|
@@ -1665,9 +1666,9 @@ function cr({ layer: e, patch: t, tab: n, renderAnimate: r }) {
|
|
|
1665
1666
|
}
|
|
1666
1667
|
function lr({ layer: e }) {
|
|
1667
1668
|
let t = u(), { flattenParatype: n } = l();
|
|
1668
|
-
return n ? /* @__PURE__ */
|
|
1669
|
+
return n ? /* @__PURE__ */ F(Yt, {
|
|
1669
1670
|
label: "Flatten the glyph(s) to vector shape layers (one-way)",
|
|
1670
|
-
children: /* @__PURE__ */
|
|
1671
|
+
children: /* @__PURE__ */ F(j, {
|
|
1671
1672
|
"aria-label": "Flatten the glyph(s) to vector shape layers (one-way)",
|
|
1672
1673
|
tone: "primary",
|
|
1673
1674
|
size: t,
|
|
@@ -1678,7 +1679,7 @@ function lr({ layer: e }) {
|
|
|
1678
1679
|
}) : null;
|
|
1679
1680
|
}
|
|
1680
1681
|
function ur({ layer: e, patch: t, renderAnimate: n }) {
|
|
1681
|
-
let r = u(), i = te(
|
|
1682
|
+
let r = u(), i = te($e(e.loopId)?.params ?? [], e).filter((e) => e.type === "range");
|
|
1682
1683
|
if (i.length < 2) return null;
|
|
1683
1684
|
let o = (e, t) => i.some((t) => t.key === e) && e !== t ? e : i.find((e) => e.key !== t)?.key, s = o(e._xyX ?? "stemWidth", null), c = o(e._xyY ?? "oWidth", s), l = i.find((e) => e.key === s), d = i.find((e) => e.key === c);
|
|
1684
1685
|
if (!l || !d) return null;
|
|
@@ -1689,18 +1690,18 @@ function ur({ layer: e, patch: t, renderAnimate: n }) {
|
|
|
1689
1690
|
value: e.key,
|
|
1690
1691
|
label: e.label
|
|
1691
1692
|
}));
|
|
1692
|
-
return /* @__PURE__ */
|
|
1693
|
-
/* @__PURE__ */
|
|
1693
|
+
return /* @__PURE__ */ I(P, { children: [
|
|
1694
|
+
/* @__PURE__ */ F("span", {
|
|
1694
1695
|
className: "kol-eyebrow text-fg-80",
|
|
1695
1696
|
children: "Explore"
|
|
1696
1697
|
}),
|
|
1697
|
-
/* @__PURE__ */
|
|
1698
|
+
/* @__PURE__ */ I("div", {
|
|
1698
1699
|
className: "grid grid-cols-2 gap-2",
|
|
1699
|
-
children: [/* @__PURE__ */
|
|
1700
|
+
children: [/* @__PURE__ */ F(Tt, {
|
|
1700
1701
|
label: "X axis",
|
|
1701
|
-
children: /* @__PURE__ */
|
|
1702
|
+
children: /* @__PURE__ */ I("div", {
|
|
1702
1703
|
className: "flex items-center gap-2",
|
|
1703
|
-
children: [/* @__PURE__ */
|
|
1704
|
+
children: [/* @__PURE__ */ F(M, {
|
|
1704
1705
|
variant: "subtle",
|
|
1705
1706
|
size: r,
|
|
1706
1707
|
className: "w-full min-w-0",
|
|
@@ -1709,11 +1710,11 @@ function ur({ layer: e, patch: t, renderAnimate: n }) {
|
|
|
1709
1710
|
onChange: (e) => t({ _xyX: e })
|
|
1710
1711
|
}), n?.(l)]
|
|
1711
1712
|
})
|
|
1712
|
-
}), /* @__PURE__ */
|
|
1713
|
+
}), /* @__PURE__ */ F(Tt, {
|
|
1713
1714
|
label: "Y axis",
|
|
1714
|
-
children: /* @__PURE__ */
|
|
1715
|
+
children: /* @__PURE__ */ I("div", {
|
|
1715
1716
|
className: "flex items-center gap-2",
|
|
1716
|
-
children: [/* @__PURE__ */
|
|
1717
|
+
children: [/* @__PURE__ */ F(M, {
|
|
1717
1718
|
variant: "subtle",
|
|
1718
1719
|
size: r,
|
|
1719
1720
|
className: "w-full min-w-0",
|
|
@@ -1724,7 +1725,7 @@ function ur({ layer: e, patch: t, renderAnimate: n }) {
|
|
|
1724
1725
|
})
|
|
1725
1726
|
})]
|
|
1726
1727
|
}),
|
|
1727
|
-
/* @__PURE__ */
|
|
1728
|
+
/* @__PURE__ */ F(Zt, {
|
|
1728
1729
|
xValue: f(s, l),
|
|
1729
1730
|
yValue: f(c, d),
|
|
1730
1731
|
xMin: l.min ?? 0,
|
|
@@ -1897,7 +1898,7 @@ var dr = 5, fr = [
|
|
|
1897
1898
|
step: .01,
|
|
1898
1899
|
def: 0
|
|
1899
1900
|
}
|
|
1900
|
-
], gr = Math.PI * 2,
|
|
1901
|
+
], gr = Math.PI * 2, L = (e) => Math.round(e * 100) / 100, R = (e, t, n) => t + e() * (n - t), _r = (e, t) => {
|
|
1901
1902
|
let n = t * Math.sqrt(e()), r = e() * gr;
|
|
1902
1903
|
return [n * Math.cos(r), n * Math.sin(r)];
|
|
1903
1904
|
}, vr = (e, t) => {
|
|
@@ -1917,8 +1918,8 @@ var dr = 5, fr = [
|
|
|
1917
1918
|
});
|
|
1918
1919
|
return e.map((e) => ({
|
|
1919
1920
|
...e,
|
|
1920
|
-
x:
|
|
1921
|
-
y:
|
|
1921
|
+
x: L(e.x - n.x),
|
|
1922
|
+
y: L(e.y - n.y)
|
|
1922
1923
|
}));
|
|
1923
1924
|
}, br = (e) => {
|
|
1924
1925
|
let t = e.length || 1, n = e.reduce((e, n) => ({
|
|
@@ -1932,13 +1933,13 @@ var dr = 5, fr = [
|
|
|
1932
1933
|
});
|
|
1933
1934
|
return e.map((e) => ({
|
|
1934
1935
|
...e,
|
|
1935
|
-
x:
|
|
1936
|
-
y:
|
|
1937
|
-
z:
|
|
1936
|
+
x: L(e.x - n.x),
|
|
1937
|
+
y: L(e.y - n.y),
|
|
1938
|
+
z: L(e.z - n.z)
|
|
1938
1939
|
}));
|
|
1939
1940
|
}, xr = (e, t) => e.find((e) => e.value === t)?.label ?? t;
|
|
1940
1941
|
function Sr({ layer: e }) {
|
|
1941
|
-
let t = u(), { updateLayer: n } = l(), r =
|
|
1942
|
+
let t = u(), { updateLayer: n } = l(), r = be(e.id, { history: "coalesce" }), i = e.loopId === "softforms3d", a = i && !!e.metaball, o = i ? pr : fr, c = i ? hr : mr, d = a ? 2 : 1, f = Array.isArray(e.forms) ? e.forms : [], [p, m] = N(-1), h = p >= 0 && p < f.length ? f[p] : null, g = (t) => {
|
|
1942
1943
|
m(t), window.dispatchEvent(new CustomEvent("kol:softform-select", { detail: {
|
|
1943
1944
|
id: e.id,
|
|
1944
1945
|
index: t,
|
|
@@ -1965,7 +1966,7 @@ function Sr({ layer: e }) {
|
|
|
1965
1966
|
sy: .7,
|
|
1966
1967
|
sz: .7,
|
|
1967
1968
|
rot: 0,
|
|
1968
|
-
hue:
|
|
1969
|
+
hue: L(Math.random())
|
|
1969
1970
|
} : {
|
|
1970
1971
|
t: "dome",
|
|
1971
1972
|
x: 0,
|
|
@@ -1973,7 +1974,7 @@ function Sr({ layer: e }) {
|
|
|
1973
1974
|
sx: .6,
|
|
1974
1975
|
sy: .6,
|
|
1975
1976
|
rot: 0,
|
|
1976
|
-
hue:
|
|
1977
|
+
hue: L(Math.random())
|
|
1977
1978
|
};
|
|
1978
1979
|
_([...f, e]), g(f.length);
|
|
1979
1980
|
}, b = (e) => {
|
|
@@ -1995,14 +1996,14 @@ function Sr({ layer: e }) {
|
|
|
1995
1996
|
let n = [...f];
|
|
1996
1997
|
[n[e], n[t]] = [n[t], n[e]], _(n), g(t);
|
|
1997
1998
|
};
|
|
1998
|
-
return /* @__PURE__ */
|
|
1999
|
+
return /* @__PURE__ */ I("div", {
|
|
1999
2000
|
className: "flex flex-col gap-2",
|
|
2000
2001
|
children: [
|
|
2001
|
-
/* @__PURE__ */
|
|
2002
|
+
/* @__PURE__ */ F("span", {
|
|
2002
2003
|
className: "kol-eyebrow text-fg-80",
|
|
2003
2004
|
children: "Forms"
|
|
2004
2005
|
}),
|
|
2005
|
-
/* @__PURE__ */
|
|
2006
|
+
/* @__PURE__ */ F(Kt, {
|
|
2006
2007
|
size: t,
|
|
2007
2008
|
reorder: "grab",
|
|
2008
2009
|
activeIndex: p >= 0 ? f.length - 1 - p : null,
|
|
@@ -2027,7 +2028,7 @@ function Sr({ layer: e }) {
|
|
|
2027
2028
|
onSelect: (e) => g(f.length - 1 - e),
|
|
2028
2029
|
onMove: (e, t) => S(f.length - 1 - e, f.length - 1 - t)
|
|
2029
2030
|
}),
|
|
2030
|
-
f.length < dr && /* @__PURE__ */
|
|
2031
|
+
f.length < dr && /* @__PURE__ */ F(j, {
|
|
2031
2032
|
tone: "primary",
|
|
2032
2033
|
size: t,
|
|
2033
2034
|
className: "w-full",
|
|
@@ -2036,9 +2037,9 @@ function Sr({ layer: e }) {
|
|
|
2036
2037
|
onClick: y,
|
|
2037
2038
|
children: "Add form"
|
|
2038
2039
|
}),
|
|
2039
|
-
!i && /* @__PURE__ */
|
|
2040
|
+
!i && /* @__PURE__ */ F(Yt, {
|
|
2040
2041
|
label: "Edit forms on the canvas (click to select, drag to move, corners to scale, knob to rotate)",
|
|
2041
|
-
children: /* @__PURE__ */
|
|
2042
|
+
children: /* @__PURE__ */ F(j, {
|
|
2042
2043
|
"aria-label": "Edit forms on the canvas (click to select, drag to move, corners to scale, knob to rotate)",
|
|
2043
2044
|
tone: "primary",
|
|
2044
2045
|
size: t,
|
|
@@ -2050,16 +2051,16 @@ function Sr({ layer: e }) {
|
|
|
2050
2051
|
children: "Edit forms on canvas"
|
|
2051
2052
|
})
|
|
2052
2053
|
}),
|
|
2053
|
-
h && /* @__PURE__ */
|
|
2054
|
+
h && /* @__PURE__ */ I("div", {
|
|
2054
2055
|
className: "flex flex-col gap-2 pt-1",
|
|
2055
2056
|
children: [
|
|
2056
|
-
/* @__PURE__ */
|
|
2057
|
+
/* @__PURE__ */ F("span", {
|
|
2057
2058
|
className: "kol-eyebrow text-fg-80",
|
|
2058
2059
|
children: "Selected form"
|
|
2059
2060
|
}),
|
|
2060
|
-
/* @__PURE__ */
|
|
2061
|
+
/* @__PURE__ */ F(Tt, {
|
|
2061
2062
|
label: "Type",
|
|
2062
|
-
children: /* @__PURE__ */
|
|
2063
|
+
children: /* @__PURE__ */ F(M, {
|
|
2063
2064
|
variant: "subtle",
|
|
2064
2065
|
size: t,
|
|
2065
2066
|
className: "w-full",
|
|
@@ -2073,9 +2074,9 @@ function Sr({ layer: e }) {
|
|
|
2073
2074
|
}),
|
|
2074
2075
|
c.map((e) => {
|
|
2075
2076
|
let t = h[e.k] ?? (e.fallback ? h[e.fallback] : void 0), n = typeof t == "number" ? t : e.def;
|
|
2076
|
-
return /* @__PURE__ */
|
|
2077
|
+
return /* @__PURE__ */ F(Tt, {
|
|
2077
2078
|
label: e.label,
|
|
2078
|
-
children: /* @__PURE__ */
|
|
2079
|
+
children: /* @__PURE__ */ F(Gt, {
|
|
2079
2080
|
min: e.min,
|
|
2080
2081
|
max: e.max,
|
|
2081
2082
|
step: e.step,
|
|
@@ -2086,57 +2087,57 @@ function Sr({ layer: e }) {
|
|
|
2086
2087
|
})
|
|
2087
2088
|
]
|
|
2088
2089
|
}),
|
|
2089
|
-
/* @__PURE__ */
|
|
2090
|
+
/* @__PURE__ */ F("span", {
|
|
2090
2091
|
className: "kol-helper-10 text-meta pt-1",
|
|
2091
2092
|
children: "Randomize forms"
|
|
2092
2093
|
}),
|
|
2093
|
-
/* @__PURE__ */
|
|
2094
|
+
/* @__PURE__ */ I("div", {
|
|
2094
2095
|
className: "grid grid-cols-2 gap-2",
|
|
2095
2096
|
children: [
|
|
2096
|
-
/* @__PURE__ */
|
|
2097
|
+
/* @__PURE__ */ F(j, {
|
|
2097
2098
|
tone: "primary",
|
|
2098
2099
|
size: t,
|
|
2099
2100
|
onClick: () => {
|
|
2100
2101
|
let e = O(le());
|
|
2101
2102
|
_(f.map((t) => ({
|
|
2102
2103
|
...t,
|
|
2103
|
-
hue:
|
|
2104
|
+
hue: L(e())
|
|
2104
2105
|
})));
|
|
2105
2106
|
},
|
|
2106
2107
|
children: "Color"
|
|
2107
2108
|
}),
|
|
2108
|
-
/* @__PURE__ */
|
|
2109
|
+
/* @__PURE__ */ F(j, {
|
|
2109
2110
|
tone: "primary",
|
|
2110
2111
|
size: t,
|
|
2111
2112
|
onClick: () => {
|
|
2112
2113
|
let e = O(le());
|
|
2113
2114
|
_(f.map((t) => i ? {
|
|
2114
2115
|
...t,
|
|
2115
|
-
x:
|
|
2116
|
-
y:
|
|
2117
|
-
z:
|
|
2118
|
-
rot: Math.round(
|
|
2116
|
+
x: L(R(e, -.7, .7)),
|
|
2117
|
+
y: L(R(e, -.7, .7)),
|
|
2118
|
+
z: L(R(e, -.5, .5)),
|
|
2119
|
+
rot: Math.round(R(e, 0, 360))
|
|
2119
2120
|
} : {
|
|
2120
2121
|
...t,
|
|
2121
|
-
x:
|
|
2122
|
-
y:
|
|
2123
|
-
rot: Math.round(
|
|
2122
|
+
x: L(R(e, -.55, .55)),
|
|
2123
|
+
y: L(R(e, -.75, .75)),
|
|
2124
|
+
rot: Math.round(R(e, 0, 360))
|
|
2124
2125
|
}));
|
|
2125
2126
|
},
|
|
2126
2127
|
children: "Transform"
|
|
2127
2128
|
}),
|
|
2128
|
-
/* @__PURE__ */
|
|
2129
|
+
/* @__PURE__ */ F(j, {
|
|
2129
2130
|
tone: "primary",
|
|
2130
2131
|
size: t,
|
|
2131
2132
|
onClick: () => {
|
|
2132
2133
|
let e = O(le());
|
|
2133
2134
|
_(f.map((t) => {
|
|
2134
|
-
let n =
|
|
2135
|
+
let n = L(R(e, .35, .95)), r = L(R(e, .35, .95));
|
|
2135
2136
|
return i ? {
|
|
2136
2137
|
...t,
|
|
2137
2138
|
sx: n,
|
|
2138
2139
|
sy: r,
|
|
2139
|
-
sz:
|
|
2140
|
+
sz: L(R(e, .35, .95))
|
|
2140
2141
|
} : {
|
|
2141
2142
|
...t,
|
|
2142
2143
|
sx: n,
|
|
@@ -2146,21 +2147,21 @@ function Sr({ layer: e }) {
|
|
|
2146
2147
|
},
|
|
2147
2148
|
children: "Scale"
|
|
2148
2149
|
}),
|
|
2149
|
-
/* @__PURE__ */
|
|
2150
|
+
/* @__PURE__ */ F(j, {
|
|
2150
2151
|
tone: "primary",
|
|
2151
2152
|
size: t,
|
|
2152
2153
|
onClick: () => {
|
|
2153
2154
|
let t = O(le());
|
|
2154
2155
|
n(e.id, {
|
|
2155
|
-
motion:
|
|
2156
|
-
sweep: Math.round(
|
|
2156
|
+
motion: L(R(t, 0, 1.1)),
|
|
2157
|
+
sweep: Math.round(R(t, 0, 360))
|
|
2157
2158
|
});
|
|
2158
2159
|
},
|
|
2159
2160
|
children: "Animation"
|
|
2160
2161
|
})
|
|
2161
2162
|
]
|
|
2162
2163
|
}),
|
|
2163
|
-
/* @__PURE__ */
|
|
2164
|
+
/* @__PURE__ */ F(j, {
|
|
2164
2165
|
tone: "primary",
|
|
2165
2166
|
size: t,
|
|
2166
2167
|
className: "w-full",
|
|
@@ -2168,47 +2169,47 @@ function Sr({ layer: e }) {
|
|
|
2168
2169
|
let e = O(le());
|
|
2169
2170
|
if (i) {
|
|
2170
2171
|
if (a) {
|
|
2171
|
-
let t = 2 + Math.floor(e() * 4), n =
|
|
2172
|
+
let t = 2 + Math.floor(e() * 4), n = R(e, .45, .9);
|
|
2172
2173
|
_(br(Array.from({ length: t }, (r, i) => {
|
|
2173
|
-
let [a, o, s] = vr(e, n), c =
|
|
2174
|
+
let [a, o, s] = vr(e, n), c = L(R(e, .5, .92));
|
|
2174
2175
|
return {
|
|
2175
2176
|
t: "sphere",
|
|
2176
|
-
x:
|
|
2177
|
-
y:
|
|
2178
|
-
z:
|
|
2177
|
+
x: L(a),
|
|
2178
|
+
y: L(o),
|
|
2179
|
+
z: L(s),
|
|
2179
2180
|
sx: c,
|
|
2180
2181
|
sy: c,
|
|
2181
2182
|
sz: c,
|
|
2182
2183
|
rot: 0,
|
|
2183
|
-
hue:
|
|
2184
|
+
hue: L(i / t)
|
|
2184
2185
|
};
|
|
2185
2186
|
})));
|
|
2186
2187
|
} else {
|
|
2187
|
-
let t =
|
|
2188
|
+
let t = R(e, .6, 1.15);
|
|
2188
2189
|
_(br(f.map((n) => {
|
|
2189
2190
|
let [r, i, a] = vr(e, t);
|
|
2190
2191
|
return {
|
|
2191
2192
|
...n,
|
|
2192
|
-
x:
|
|
2193
|
-
y:
|
|
2194
|
-
z:
|
|
2195
|
-
rot: Math.round(
|
|
2193
|
+
x: L(r),
|
|
2194
|
+
y: L(i),
|
|
2195
|
+
z: L(a),
|
|
2196
|
+
rot: Math.round(R(e, 0, 360))
|
|
2196
2197
|
};
|
|
2197
2198
|
})));
|
|
2198
2199
|
}
|
|
2199
2200
|
return;
|
|
2200
2201
|
}
|
|
2201
|
-
let t = 2 + Math.floor(e() * 4), n =
|
|
2202
|
+
let t = 2 + Math.floor(e() * 4), n = R(e, .45, .85);
|
|
2202
2203
|
_(yr(Array.from({ length: t }, (r, i) => {
|
|
2203
2204
|
let [a, o] = _r(e, n);
|
|
2204
2205
|
return {
|
|
2205
2206
|
t: fr[Math.floor(e() * fr.length)].value,
|
|
2206
|
-
x:
|
|
2207
|
-
y:
|
|
2208
|
-
sx:
|
|
2209
|
-
sy:
|
|
2210
|
-
rot: Math.round(
|
|
2211
|
-
hue:
|
|
2207
|
+
x: L(a),
|
|
2208
|
+
y: L(o),
|
|
2209
|
+
sx: L(R(e, .4, .85)),
|
|
2210
|
+
sy: L(R(e, .4, .85)),
|
|
2211
|
+
rot: Math.round(R(e, 0, 360)),
|
|
2212
|
+
hue: L(i / t)
|
|
2212
2213
|
};
|
|
2213
2214
|
})));
|
|
2214
2215
|
},
|
|
@@ -2244,14 +2245,14 @@ var Cr = [
|
|
|
2244
2245
|
};
|
|
2245
2246
|
function Tr({ layer: e, setProp: t, patch: n }) {
|
|
2246
2247
|
let r = u();
|
|
2247
|
-
|
|
2248
|
-
let i =
|
|
2248
|
+
Pe();
|
|
2249
|
+
let i = Me(e.loopId), a = Cr.filter((e) => i?.has(e.role));
|
|
2249
2250
|
if (!a.length) return null;
|
|
2250
2251
|
let o = e._layerPrev ?? {};
|
|
2251
|
-
return /* @__PURE__ */
|
|
2252
|
+
return /* @__PURE__ */ F(Et, {
|
|
2252
2253
|
label: "Layers",
|
|
2253
2254
|
divided: !0,
|
|
2254
|
-
children: /* @__PURE__ */
|
|
2255
|
+
children: /* @__PURE__ */ F(Kt, {
|
|
2255
2256
|
size: r,
|
|
2256
2257
|
items: a.map(({ role: n, label: r }) => {
|
|
2257
2258
|
let i = `${n}Opacity`, a = Number(e[i] ?? wr[n]);
|
|
@@ -2260,7 +2261,7 @@ function Tr({ layer: e, setProp: t, patch: n }) {
|
|
|
2260
2261
|
label: r,
|
|
2261
2262
|
swatch: e[n] ?? null,
|
|
2262
2263
|
shown: a > 0,
|
|
2263
|
-
control: /* @__PURE__ */
|
|
2264
|
+
control: /* @__PURE__ */ F(Gt, {
|
|
2264
2265
|
min: 0,
|
|
2265
2266
|
max: 5,
|
|
2266
2267
|
step: .1,
|
|
@@ -2455,16 +2456,16 @@ function Ar(e, t = !1) {
|
|
|
2455
2456
|
//#region src/editor/compose/inspectors/AboutLine.jsx
|
|
2456
2457
|
function jr({ def: e, isFilter: t = !1 }) {
|
|
2457
2458
|
let n = en(), r = u(), i = Ar(e, t);
|
|
2458
|
-
return i ? /* @__PURE__ */
|
|
2459
|
+
return i ? /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F(j, {
|
|
2459
2460
|
size: r,
|
|
2460
2461
|
iconOnly: "info",
|
|
2461
2462
|
"aria-label": "About this preset",
|
|
2462
2463
|
popoverTarget: n
|
|
2463
|
-
}), /* @__PURE__ */
|
|
2464
|
+
}), /* @__PURE__ */ I("div", {
|
|
2464
2465
|
id: n,
|
|
2465
2466
|
popover: "auto",
|
|
2466
2467
|
className: "m-auto w-[min(320px,calc(100vw-32px))] rounded-[var(--kol-radius-sm)] border-0 bg-surface-primary p-4 text-body shadow-[var(--kol-shadow-rail-up)]",
|
|
2467
|
-
children: [/* @__PURE__ */
|
|
2468
|
+
children: [/* @__PURE__ */ I("p", {
|
|
2468
2469
|
className: "kol-eyebrow text-meta",
|
|
2469
2470
|
children: [
|
|
2470
2471
|
i.kind,
|
|
@@ -2473,7 +2474,7 @@ function jr({ def: e, isFilter: t = !1 }) {
|
|
|
2473
2474
|
" · ",
|
|
2474
2475
|
i.dimension
|
|
2475
2476
|
]
|
|
2476
|
-
}), i.basis && /* @__PURE__ */
|
|
2477
|
+
}), i.basis && /* @__PURE__ */ F("p", {
|
|
2477
2478
|
className: "kol-sans-body-03 mt-2",
|
|
2478
2479
|
children: i.basis
|
|
2479
2480
|
})]
|
|
@@ -2482,7 +2483,7 @@ function jr({ def: e, isFilter: t = !1 }) {
|
|
|
2482
2483
|
//#endregion
|
|
2483
2484
|
//#region src/loops/theme.js
|
|
2484
2485
|
function Mr(e, t, n, r) {
|
|
2485
|
-
return
|
|
2486
|
+
return _e(e, t, i(D(n, r)));
|
|
2486
2487
|
}
|
|
2487
2488
|
//#endregion
|
|
2488
2489
|
//#region src/editor/compose/inspectors/LoopFields.jsx
|
|
@@ -2496,13 +2497,13 @@ var Nr = an.flatMap((e) => e.groups), Pr = (e, t) => {
|
|
|
2496
2497
|
label: "Custom"
|
|
2497
2498
|
}, ...n] : n;
|
|
2498
2499
|
};
|
|
2499
|
-
function
|
|
2500
|
-
return e ? /* @__PURE__ */
|
|
2500
|
+
function z({ inline: e, label: t, align: n = "fill", children: r }) {
|
|
2501
|
+
return e ? /* @__PURE__ */ F(Rt, {
|
|
2501
2502
|
label: t,
|
|
2502
2503
|
align: n,
|
|
2503
2504
|
labelWidth: o,
|
|
2504
2505
|
children: r
|
|
2505
|
-
}) : /* @__PURE__ */
|
|
2506
|
+
}) : /* @__PURE__ */ F(Tt, {
|
|
2506
2507
|
label: t,
|
|
2507
2508
|
children: r
|
|
2508
2509
|
});
|
|
@@ -2515,7 +2516,7 @@ var Fr = [{
|
|
|
2515
2516
|
label: "On"
|
|
2516
2517
|
}];
|
|
2517
2518
|
function Ir({ inline: e, cs: t, on: n, onChange: r }) {
|
|
2518
|
-
return e ? /* @__PURE__ */
|
|
2519
|
+
return e ? /* @__PURE__ */ F(vt, {
|
|
2519
2520
|
layout: "joined",
|
|
2520
2521
|
tone: "sunken",
|
|
2521
2522
|
size: t,
|
|
@@ -2523,7 +2524,7 @@ function Ir({ inline: e, cs: t, on: n, onChange: r }) {
|
|
|
2523
2524
|
options: Fr,
|
|
2524
2525
|
value: n ? "on" : "off",
|
|
2525
2526
|
onChange: (e) => r(e === "on")
|
|
2526
|
-
}) : /* @__PURE__ */
|
|
2527
|
+
}) : /* @__PURE__ */ F(Xt, {
|
|
2527
2528
|
size: t,
|
|
2528
2529
|
options: Fr,
|
|
2529
2530
|
viewMode: n ? "on" : "off",
|
|
@@ -2531,8 +2532,8 @@ function Ir({ inline: e, cs: t, on: n, onChange: r }) {
|
|
|
2531
2532
|
});
|
|
2532
2533
|
}
|
|
2533
2534
|
function Lr({ layer: e, setProp: n, patch: r, updateLayer: i, palette: a, renderAnimate: o, tab: s, tabStrip: c, tree: l, picker: f = !0, inline: p = !1, showSeed: m = !p, onReset: h }) {
|
|
2534
|
-
let g = u(), v =
|
|
2535
|
-
|
|
2535
|
+
let g = u(), v = $e(e.loopId), y = d(), b = (v?.params ?? []).some((e) => e.key === "orbit"), x = (e) => {
|
|
2536
|
+
Oe("orbit", e), e && !y.grab && t("grab", !0);
|
|
2536
2537
|
}, S = v?.params ?? [], w = e.themeId ?? "kol", T = !!e.themeInvert, D = (t) => i(e.id, {
|
|
2537
2538
|
themeId: t,
|
|
2538
2539
|
...Mr(e, v?.params, t, T)
|
|
@@ -2540,125 +2541,125 @@ function Lr({ layer: e, setProp: n, patch: r, updateLayer: i, palette: a, render
|
|
|
2540
2541
|
themeInvert: t,
|
|
2541
2542
|
...Mr(e, v?.params, w, t)
|
|
2542
2543
|
}), te = e._paletteRelation ?? "analogous", k = (v?.params ?? []).filter((e) => e.type === "color"), ne = new Set(e._rollKeep ?? []), oe = (t = te, n = {}) => {
|
|
2543
|
-
let r = _(O(le()), t), a =
|
|
2544
|
+
let r = _(O(le()), t), a = _e(e, v?.params, r, { rotate: !0 });
|
|
2544
2545
|
i(e.id, {
|
|
2545
2546
|
...n,
|
|
2546
2547
|
...Object.fromEntries(k.filter((e) => !ne.has(e.key)).map((e) => [e.key, a[e.key]]))
|
|
2547
2548
|
});
|
|
2548
|
-
}, ce = (e) => n("_rollKeep", ne.has(e) ? [...ne].filter((t) => t !== e) : [...ne, e]),
|
|
2549
|
+
}, ce = (e) => n("_rollKeep", ne.has(e) ? [...ne].filter((t) => t !== e) : [...ne, e]), A = Un(e.loopId), ue = A ? Object.keys(A).map((e) => ({
|
|
2549
2550
|
id: e,
|
|
2550
2551
|
label: e
|
|
2551
|
-
})) : null,
|
|
2552
|
-
let a = C(e, t,
|
|
2552
|
+
})) : null, de = A ? new Set(Object.values(A).flatMap((e) => Object.keys(e))) : null, fe = E(e), me = he(se(S, e), ae(S, e)), ve = Bn(e.loopId, e), [be, xe] = N(!1), Se = (t, n, r) => {
|
|
2553
|
+
let a = C(e, t, fe.take(), {
|
|
2553
2554
|
stripNoRandom: !!n?.motion,
|
|
2554
2555
|
...r
|
|
2555
2556
|
});
|
|
2556
|
-
|
|
2557
|
-
},
|
|
2558
|
-
let n =
|
|
2557
|
+
ve && n?.motion && (n.id !== "Form" && (a._framePreset = "custom"), n.id !== "Frame" && (a._formPreset = "custom")), de && Object.keys(a).some((e) => de.has(e)) && (a._lookPreset = "custom"), i(e.id, a);
|
|
2558
|
+
}, Te = (t) => {
|
|
2559
|
+
let n = Ce(e.loopGroup).find((t) => t.id === e.presetId)?.params ?? {}, r = {};
|
|
2559
2560
|
for (let e of t) {
|
|
2560
2561
|
let t = n[e.key] === void 0 ? e.default : n[e.key];
|
|
2561
2562
|
t !== void 0 && (r[e.key] = t);
|
|
2562
2563
|
}
|
|
2563
2564
|
i(e.id, r);
|
|
2564
|
-
},
|
|
2565
|
+
}, Ee = ve ? Vn(ve.frame) : null, De = ve ? Vn(ve.form) : null, Oe = (e, t) => {
|
|
2565
2566
|
let n = {};
|
|
2566
|
-
|
|
2567
|
+
Ee?.has(e) && (n._framePreset = "custom"), De?.has(e) && (n._formPreset = "custom"), de?.has(e) && (n._lookPreset = "custom"), r({
|
|
2567
2568
|
[e]: t,
|
|
2568
2569
|
...n
|
|
2569
2570
|
});
|
|
2570
|
-
},
|
|
2571
|
+
}, je = (e, t) => (n) => {
|
|
2571
2572
|
let i = t.find((e) => e.id === n);
|
|
2572
2573
|
r({
|
|
2573
2574
|
[e]: n,
|
|
2574
2575
|
...i?.params ?? {}
|
|
2575
2576
|
});
|
|
2576
|
-
},
|
|
2577
|
+
}, Me = (e) => r({
|
|
2577
2578
|
_lookPreset: e,
|
|
2578
|
-
...
|
|
2579
|
-
}),
|
|
2579
|
+
...A?.[e] ?? {}
|
|
2580
|
+
}), Ne = v?.camera ? v.camera.map((e) => ({
|
|
2580
2581
|
...e,
|
|
2581
2582
|
section: "Camera"
|
|
2582
|
-
})) : null,
|
|
2583
|
+
})) : null, Pe = [...v?.camera ?? [], ...S.filter((e) => ie(e) === "Camera")], Fe = v?.kind === "engine", Ie = Pe.length > 0 || Fe && v?.orbit, Le = v?.engine === "scene" && (e.animMode === "keyframes" || e.animMode === "keyframe"), Re = v?.orbit ? {
|
|
2583
2584
|
yaw: 1,
|
|
2584
2585
|
dist: 1
|
|
2585
|
-
} :
|
|
2586
|
+
} : we(v), Be = Re ? /* @__PURE__ */ F("p", {
|
|
2586
2587
|
className: `kol-mono-10 text-meta${p ? "" : " col-span-2"}`,
|
|
2587
|
-
children: v?.orbit ? "Press C, then drag to orbit the camera and scroll to zoom." :
|
|
2588
|
+
children: v?.orbit ? "Press C, then drag to orbit the camera and scroll to zoom." : Re.yaw ? "Press C, then drag to rotate and scroll to zoom." : "Press C, then scroll to zoom."
|
|
2588
2589
|
}) : null;
|
|
2589
|
-
return /* @__PURE__ */
|
|
2590
|
+
return /* @__PURE__ */ I(P, { children: [
|
|
2590
2591
|
c,
|
|
2591
|
-
f && (p ? s === "generate" && /* @__PURE__ */
|
|
2592
|
+
f && (p ? s === "generate" && /* @__PURE__ */ F(Et, {
|
|
2592
2593
|
divided: !0,
|
|
2593
|
-
children: /* @__PURE__ */
|
|
2594
|
+
children: /* @__PURE__ */ F(Tn, {
|
|
2594
2595
|
layer: e,
|
|
2595
2596
|
tree: l,
|
|
2596
2597
|
inline: !0,
|
|
2597
|
-
about: /* @__PURE__ */
|
|
2598
|
+
about: /* @__PURE__ */ F(jr, { def: v })
|
|
2598
2599
|
})
|
|
2599
|
-
}) : /* @__PURE__ */
|
|
2600
|
+
}) : /* @__PURE__ */ F(Tn, {
|
|
2600
2601
|
layer: e,
|
|
2601
2602
|
tree: l,
|
|
2602
|
-
about: /* @__PURE__ */
|
|
2603
|
+
about: /* @__PURE__ */ F(jr, { def: v })
|
|
2603
2604
|
})),
|
|
2604
|
-
(s === "generate" || s === "labs-effect") && /* @__PURE__ */
|
|
2605
|
-
(e.loopId === "softforms" || e.loopId === "softforms3d") && /* @__PURE__ */
|
|
2606
|
-
|
|
2605
|
+
(s === "generate" || s === "labs-effect") && /* @__PURE__ */ I(P, { children: [
|
|
2606
|
+
(e.loopId === "softforms" || e.loopId === "softforms3d") && /* @__PURE__ */ F(Sr, { layer: e }),
|
|
2607
|
+
A && !p && /* @__PURE__ */ F(z, {
|
|
2607
2608
|
inline: p,
|
|
2608
2609
|
label: "Look",
|
|
2609
|
-
children: /* @__PURE__ */
|
|
2610
|
+
children: /* @__PURE__ */ F(M, {
|
|
2610
2611
|
variant: "subtle",
|
|
2611
2612
|
size: g,
|
|
2612
2613
|
className: "w-full",
|
|
2613
|
-
options: Pr(
|
|
2614
|
+
options: Pr(ue, e._lookPreset),
|
|
2614
2615
|
value: e._lookPreset ?? "custom",
|
|
2615
|
-
onChange:
|
|
2616
|
+
onChange: Me
|
|
2616
2617
|
})
|
|
2617
2618
|
}),
|
|
2618
|
-
p && /* @__PURE__ */
|
|
2619
|
+
p && /* @__PURE__ */ I(Et, {
|
|
2619
2620
|
divided: !0,
|
|
2620
2621
|
children: [
|
|
2621
|
-
|
|
2622
|
+
A && /* @__PURE__ */ F(z, {
|
|
2622
2623
|
inline: !0,
|
|
2623
2624
|
label: "Look",
|
|
2624
|
-
children: /* @__PURE__ */
|
|
2625
|
+
children: /* @__PURE__ */ F(M, {
|
|
2625
2626
|
variant: "subtle",
|
|
2626
2627
|
size: g,
|
|
2627
2628
|
className: "w-full",
|
|
2628
|
-
options: Pr(
|
|
2629
|
+
options: Pr(ue, e._lookPreset),
|
|
2629
2630
|
value: e._lookPreset ?? "custom",
|
|
2630
|
-
onChange:
|
|
2631
|
+
onChange: Me
|
|
2631
2632
|
})
|
|
2632
2633
|
}),
|
|
2633
|
-
/* @__PURE__ */
|
|
2634
|
+
/* @__PURE__ */ F(z, {
|
|
2634
2635
|
inline: !0,
|
|
2635
2636
|
label: "Theme",
|
|
2636
|
-
children: /* @__PURE__ */
|
|
2637
|
+
children: /* @__PURE__ */ F(M, {
|
|
2637
2638
|
variant: "subtle",
|
|
2638
2639
|
size: g,
|
|
2639
2640
|
className: "w-full",
|
|
2640
|
-
options:
|
|
2641
|
+
options: ge,
|
|
2641
2642
|
value: w,
|
|
2642
2643
|
onChange: D
|
|
2643
2644
|
})
|
|
2644
2645
|
}),
|
|
2645
|
-
/* @__PURE__ */
|
|
2646
|
+
/* @__PURE__ */ F(z, {
|
|
2646
2647
|
inline: !0,
|
|
2647
2648
|
label: "Invert",
|
|
2648
|
-
children: /* @__PURE__ */
|
|
2649
|
+
children: /* @__PURE__ */ F(Ir, {
|
|
2649
2650
|
inline: !0,
|
|
2650
2651
|
cs: g,
|
|
2651
2652
|
on: T,
|
|
2652
2653
|
onChange: ee
|
|
2653
2654
|
})
|
|
2654
2655
|
}),
|
|
2655
|
-
k.length > 0 && /* @__PURE__ */
|
|
2656
|
+
k.length > 0 && /* @__PURE__ */ F(z, {
|
|
2656
2657
|
inline: !0,
|
|
2657
2658
|
label: "Palette",
|
|
2658
|
-
children: /* @__PURE__ */
|
|
2659
|
+
children: /* @__PURE__ */ I("div", {
|
|
2659
2660
|
className: "flex w-full gap-2",
|
|
2660
2661
|
children: [
|
|
2661
|
-
/* @__PURE__ */
|
|
2662
|
+
/* @__PURE__ */ F(M, {
|
|
2662
2663
|
variant: "subtle",
|
|
2663
2664
|
size: g,
|
|
2664
2665
|
className: "flex-1 min-w-0",
|
|
@@ -2669,31 +2670,31 @@ function Lr({ layer: e, setProp: n, patch: r, updateLayer: i, palette: a, render
|
|
|
2669
2670
|
value: te,
|
|
2670
2671
|
onChange: (e) => oe(e, { _paletteRelation: e })
|
|
2671
2672
|
}),
|
|
2672
|
-
/* @__PURE__ */
|
|
2673
|
+
/* @__PURE__ */ F(j, {
|
|
2673
2674
|
tone: "primary",
|
|
2674
2675
|
size: g,
|
|
2675
2676
|
onClick: () => oe(),
|
|
2676
2677
|
children: "Roll"
|
|
2677
2678
|
}),
|
|
2678
|
-
/* @__PURE__ */
|
|
2679
|
+
/* @__PURE__ */ F(Yt, {
|
|
2679
2680
|
label: "Edit in Color Modes",
|
|
2680
|
-
children: /* @__PURE__ */
|
|
2681
|
+
children: /* @__PURE__ */ F(j, {
|
|
2681
2682
|
tone: "primary",
|
|
2682
2683
|
size: g,
|
|
2683
2684
|
iconOnly: "clr-tri",
|
|
2684
2685
|
"aria-label": "Edit in Color Modes",
|
|
2685
|
-
onClick:
|
|
2686
|
+
onClick: ot
|
|
2686
2687
|
})
|
|
2687
2688
|
})
|
|
2688
2689
|
]
|
|
2689
2690
|
})
|
|
2690
2691
|
}),
|
|
2691
|
-
k.length > 1 && /* @__PURE__ */
|
|
2692
|
+
k.length > 1 && /* @__PURE__ */ F(z, {
|
|
2692
2693
|
inline: !0,
|
|
2693
2694
|
label: "Rolls",
|
|
2694
|
-
children: /* @__PURE__ */
|
|
2695
|
+
children: /* @__PURE__ */ F("div", {
|
|
2695
2696
|
className: "flex w-full flex-wrap gap-1",
|
|
2696
|
-
children: k.map((e) => /* @__PURE__ */
|
|
2697
|
+
children: k.map((e) => /* @__PURE__ */ F(j, {
|
|
2697
2698
|
size: g,
|
|
2698
2699
|
tone: ne.has(e.key) ? "ghost" : "primary",
|
|
2699
2700
|
pressed: !ne.has(e.key),
|
|
@@ -2703,81 +2704,81 @@ function Lr({ layer: e, setProp: n, patch: r, updateLayer: i, palette: a, render
|
|
|
2703
2704
|
}, e.key))
|
|
2704
2705
|
})
|
|
2705
2706
|
}),
|
|
2706
|
-
|
|
2707
|
+
ke(v) && /* @__PURE__ */ F(z, {
|
|
2707
2708
|
inline: !0,
|
|
2708
2709
|
label: "Background",
|
|
2709
|
-
children: /* @__PURE__ */
|
|
2710
|
+
children: /* @__PURE__ */ F(Ir, {
|
|
2710
2711
|
inline: !0,
|
|
2711
2712
|
cs: g,
|
|
2712
2713
|
on: e.bgOn !== !1,
|
|
2713
2714
|
onChange: (e) => n("bgOn", e)
|
|
2714
2715
|
})
|
|
2715
2716
|
}),
|
|
2716
|
-
|
|
2717
|
+
Be
|
|
2717
2718
|
]
|
|
2718
2719
|
}),
|
|
2719
|
-
!p && /* @__PURE__ */
|
|
2720
|
+
!p && /* @__PURE__ */ I("div", {
|
|
2720
2721
|
className: "grid grid-cols-2 gap-2",
|
|
2721
2722
|
children: [
|
|
2722
|
-
/* @__PURE__ */
|
|
2723
|
+
/* @__PURE__ */ F(z, {
|
|
2723
2724
|
inline: !1,
|
|
2724
2725
|
label: "Theme",
|
|
2725
|
-
children: /* @__PURE__ */
|
|
2726
|
+
children: /* @__PURE__ */ F(M, {
|
|
2726
2727
|
variant: "subtle",
|
|
2727
2728
|
size: g,
|
|
2728
2729
|
className: "w-full",
|
|
2729
|
-
options:
|
|
2730
|
+
options: ge,
|
|
2730
2731
|
value: w,
|
|
2731
2732
|
onChange: D
|
|
2732
2733
|
})
|
|
2733
2734
|
}),
|
|
2734
|
-
/* @__PURE__ */
|
|
2735
|
+
/* @__PURE__ */ F(z, {
|
|
2735
2736
|
inline: !1,
|
|
2736
2737
|
label: "Invert",
|
|
2737
|
-
children: /* @__PURE__ */
|
|
2738
|
+
children: /* @__PURE__ */ F(Ir, {
|
|
2738
2739
|
inline: !1,
|
|
2739
2740
|
cs: g,
|
|
2740
2741
|
on: T,
|
|
2741
2742
|
onChange: ee
|
|
2742
2743
|
})
|
|
2743
2744
|
}),
|
|
2744
|
-
|
|
2745
|
+
ke(v) && /* @__PURE__ */ F(z, {
|
|
2745
2746
|
inline: !1,
|
|
2746
2747
|
label: "Background",
|
|
2747
|
-
children: /* @__PURE__ */
|
|
2748
|
+
children: /* @__PURE__ */ F(Ir, {
|
|
2748
2749
|
inline: !1,
|
|
2749
2750
|
cs: g,
|
|
2750
2751
|
on: e.bgOn !== !1,
|
|
2751
2752
|
onChange: (e) => n("bgOn", e)
|
|
2752
2753
|
})
|
|
2753
2754
|
}),
|
|
2754
|
-
|
|
2755
|
+
Be
|
|
2755
2756
|
]
|
|
2756
2757
|
}),
|
|
2757
|
-
/* @__PURE__ */
|
|
2758
|
+
/* @__PURE__ */ F(ye, {
|
|
2758
2759
|
schema: S,
|
|
2759
2760
|
layer: e,
|
|
2760
|
-
setProp:
|
|
2761
|
+
setProp: Oe,
|
|
2761
2762
|
palette: a,
|
|
2762
2763
|
renderAnimate: o,
|
|
2763
2764
|
tab: "generate",
|
|
2764
2765
|
inline: p
|
|
2765
2766
|
}),
|
|
2766
|
-
p && /* @__PURE__ */
|
|
2767
|
-
/* @__PURE__ */
|
|
2767
|
+
p && /* @__PURE__ */ F(xt, {}),
|
|
2768
|
+
/* @__PURE__ */ I("div", {
|
|
2768
2769
|
className: "flex gap-2",
|
|
2769
2770
|
children: [
|
|
2770
2771
|
[
|
|
2771
2772
|
["type", "Type"],
|
|
2772
2773
|
["category", "Category"],
|
|
2773
2774
|
["preset", "Preset"]
|
|
2774
|
-
].filter(([t]) => _n(e, t, Nr)).map(([t, n]) => /* @__PURE__ */
|
|
2775
|
+
].filter(([t]) => _n(e, t, Nr)).map(([t, n]) => /* @__PURE__ */ F(j, {
|
|
2775
2776
|
tone: "primary",
|
|
2776
2777
|
size: g,
|
|
2777
2778
|
className: "flex-1 min-w-0",
|
|
2778
2779
|
"aria-label": `Randomize ${n.toLowerCase()}`,
|
|
2779
2780
|
onClick: () => {
|
|
2780
|
-
let n =
|
|
2781
|
+
let n = fe.take(), r = vn(e, t, O(n >>> 0), Nr);
|
|
2781
2782
|
r && i(e.id, {
|
|
2782
2783
|
...r,
|
|
2783
2784
|
_rollSeed: n
|
|
@@ -2785,14 +2786,14 @@ function Lr({ layer: e, setProp: n, patch: r, updateLayer: i, palette: a, render
|
|
|
2785
2786
|
},
|
|
2786
2787
|
children: n
|
|
2787
2788
|
}, t)),
|
|
2788
|
-
/* @__PURE__ */
|
|
2789
|
+
/* @__PURE__ */ F(j, {
|
|
2789
2790
|
tone: "primary",
|
|
2790
2791
|
size: g,
|
|
2791
2792
|
className: "flex-1 min-w-0",
|
|
2792
2793
|
"aria-label": "Randomize settings",
|
|
2793
2794
|
onClick: (t) => {
|
|
2794
|
-
if (t.altKey) return
|
|
2795
|
-
let n =
|
|
2795
|
+
if (t.altKey) return Te(ae(S, e));
|
|
2796
|
+
let n = fe.take();
|
|
2796
2797
|
i(e.id, {
|
|
2797
2798
|
...yn(e, ae(S, e), O(n >>> 0)),
|
|
2798
2799
|
_rollSeed: n
|
|
@@ -2800,144 +2801,144 @@ function Lr({ layer: e, setProp: n, patch: r, updateLayer: i, palette: a, render
|
|
|
2800
2801
|
},
|
|
2801
2802
|
children: "Settings"
|
|
2802
2803
|
}),
|
|
2803
|
-
/* @__PURE__ */
|
|
2804
|
+
/* @__PURE__ */ F(j, {
|
|
2804
2805
|
tone: "primary",
|
|
2805
2806
|
size: g,
|
|
2806
2807
|
iconOnly: "nav-settings",
|
|
2807
2808
|
"aria-label": "What Settings rolls",
|
|
2808
|
-
onClick: () =>
|
|
2809
|
+
onClick: () => xe(!0),
|
|
2809
2810
|
className: "shrink-0"
|
|
2810
2811
|
}),
|
|
2811
|
-
/* @__PURE__ */
|
|
2812
|
+
/* @__PURE__ */ F(Yt, {
|
|
2812
2813
|
label: "Reset to defaults",
|
|
2813
2814
|
shortcut: "R",
|
|
2814
|
-
children: /* @__PURE__ */
|
|
2815
|
+
children: /* @__PURE__ */ F(j, {
|
|
2815
2816
|
tone: "primary",
|
|
2816
2817
|
size: g,
|
|
2817
2818
|
iconOnly: "refresh",
|
|
2818
2819
|
"aria-label": "Reset to defaults",
|
|
2819
|
-
onClick: h ?? (() =>
|
|
2820
|
+
onClick: h ?? (() => Te(ae(S, e))),
|
|
2820
2821
|
className: "shrink-0"
|
|
2821
2822
|
})
|
|
2822
2823
|
})
|
|
2823
2824
|
]
|
|
2824
2825
|
}),
|
|
2825
|
-
/* @__PURE__ */
|
|
2826
|
-
open:
|
|
2827
|
-
onClose: () =>
|
|
2826
|
+
/* @__PURE__ */ F(En, {
|
|
2827
|
+
open: be,
|
|
2828
|
+
onClose: () => xe(!1),
|
|
2828
2829
|
schema: S,
|
|
2829
2830
|
layer: e,
|
|
2830
2831
|
size: g
|
|
2831
2832
|
}),
|
|
2832
|
-
|
|
2833
|
+
me.length > 0 && /* @__PURE__ */ I("div", {
|
|
2833
2834
|
className: `grid ${p ? "grid-cols-3" : "grid-cols-2"} gap-2`,
|
|
2834
|
-
children: [
|
|
2835
|
+
children: [me.map((e) => /* @__PURE__ */ F(j, {
|
|
2835
2836
|
tone: "primary",
|
|
2836
2837
|
size: g,
|
|
2837
|
-
onClick: (t) => t.altKey ?
|
|
2838
|
+
onClick: (t) => t.altKey ? Te(e.params) : Se(e.params, e),
|
|
2838
2839
|
children: e.label
|
|
2839
|
-
}, e.id)), e.loopId === "math-expression" && /* @__PURE__ */
|
|
2840
|
+
}, e.id)), e.loopId === "math-expression" && /* @__PURE__ */ F(j, {
|
|
2840
2841
|
tone: "primary",
|
|
2841
2842
|
size: g,
|
|
2842
2843
|
onClick: (t) => {
|
|
2843
|
-
if (t.altKey) return
|
|
2844
|
-
let n =
|
|
2844
|
+
if (t.altKey) return Te(me.find((e) => e.id === "Expression")?.params ?? []);
|
|
2845
|
+
let n = fe.take();
|
|
2845
2846
|
i(e.id, {
|
|
2846
|
-
expr:
|
|
2847
|
+
expr: ze(O(n >>> 0)),
|
|
2847
2848
|
_rollSeed: n
|
|
2848
2849
|
});
|
|
2849
2850
|
},
|
|
2850
2851
|
children: "Wild"
|
|
2851
2852
|
})]
|
|
2852
2853
|
}),
|
|
2853
|
-
m && ae(S, e).length >= 5 && /* @__PURE__ */
|
|
2854
|
-
seed:
|
|
2854
|
+
m && ae(S, e).length >= 5 && /* @__PURE__ */ F(pe, {
|
|
2855
|
+
seed: fe,
|
|
2855
2856
|
inline: p
|
|
2856
2857
|
}),
|
|
2857
|
-
e.loopId === "pattern-rules" && (e.render ?? "tiles") === "tiles" && /* @__PURE__ */
|
|
2858
|
+
e.loopId === "pattern-rules" && (e.render ?? "tiles") === "tiles" && /* @__PURE__ */ F(nr, {
|
|
2858
2859
|
layer: e,
|
|
2859
2860
|
patch: r,
|
|
2860
|
-
seed:
|
|
2861
|
+
seed: fe
|
|
2861
2862
|
})
|
|
2862
2863
|
] }),
|
|
2863
|
-
(s === "style" || s === "labs-effect") && /* @__PURE__ */
|
|
2864
|
-
/* @__PURE__ */
|
|
2864
|
+
(s === "style" || s === "labs-effect") && /* @__PURE__ */ I(P, { children: [
|
|
2865
|
+
/* @__PURE__ */ F(ye, {
|
|
2865
2866
|
schema: S,
|
|
2866
2867
|
layer: e,
|
|
2867
|
-
setProp:
|
|
2868
|
+
setProp: Oe,
|
|
2868
2869
|
palette: a,
|
|
2869
2870
|
renderAnimate: o,
|
|
2870
2871
|
tab: "style",
|
|
2871
2872
|
inline: p
|
|
2872
2873
|
}),
|
|
2873
|
-
v?.group === "penrose" && e.loopId?.startsWith("penrose-") && /* @__PURE__ */
|
|
2874
|
+
v?.group === "penrose" && e.loopId?.startsWith("penrose-") && /* @__PURE__ */ F(Tr, {
|
|
2874
2875
|
layer: e,
|
|
2875
|
-
setProp:
|
|
2876
|
+
setProp: Oe,
|
|
2876
2877
|
patch: r
|
|
2877
2878
|
}),
|
|
2878
|
-
e.loopId === "pattern-rules" && /* @__PURE__ */
|
|
2879
|
+
e.loopId === "pattern-rules" && /* @__PURE__ */ F(or, {
|
|
2879
2880
|
layer: e,
|
|
2880
2881
|
patch: r
|
|
2881
2882
|
}),
|
|
2882
|
-
e.loopId === "math-curves" && /* @__PURE__ */
|
|
2883
|
+
e.loopId === "math-curves" && /* @__PURE__ */ F(sr, {
|
|
2883
2884
|
layer: e,
|
|
2884
2885
|
patch: r
|
|
2885
2886
|
}),
|
|
2886
|
-
e.loopId === "math-expression" && /* @__PURE__ */
|
|
2887
|
+
e.loopId === "math-expression" && /* @__PURE__ */ I("div", {
|
|
2887
2888
|
className: "grid grid-cols-2 gap-2",
|
|
2888
|
-
children: [/* @__PURE__ */
|
|
2889
|
+
children: [/* @__PURE__ */ F(j, {
|
|
2889
2890
|
tone: "primary",
|
|
2890
2891
|
size: g,
|
|
2891
|
-
onClick: () => i(e.id,
|
|
2892
|
+
onClick: () => i(e.id, Ae(e)),
|
|
2892
2893
|
children: "Fit"
|
|
2893
|
-
}), /* @__PURE__ */
|
|
2894
|
+
}), /* @__PURE__ */ F(j, {
|
|
2894
2895
|
tone: "primary",
|
|
2895
2896
|
size: g,
|
|
2896
|
-
onClick: () =>
|
|
2897
|
+
onClick: () => Te(me.find((e) => e.id === "View")?.params ?? []),
|
|
2897
2898
|
children: "Reset"
|
|
2898
2899
|
})]
|
|
2899
2900
|
})
|
|
2900
2901
|
] }),
|
|
2901
|
-
s === "anim" && /* @__PURE__ */
|
|
2902
|
-
|
|
2902
|
+
s === "anim" && /* @__PURE__ */ I(P, { children: [
|
|
2903
|
+
ve && /* @__PURE__ */ I(Et, {
|
|
2903
2904
|
label: "Motion",
|
|
2904
2905
|
divided: !0,
|
|
2905
|
-
children: [/* @__PURE__ */
|
|
2906
|
+
children: [/* @__PURE__ */ F(z, {
|
|
2906
2907
|
inline: p,
|
|
2907
2908
|
label: "Frame",
|
|
2908
|
-
children: /* @__PURE__ */
|
|
2909
|
+
children: /* @__PURE__ */ F(M, {
|
|
2909
2910
|
variant: "subtle",
|
|
2910
2911
|
size: g,
|
|
2911
2912
|
className: "w-full",
|
|
2912
|
-
options: Pr(
|
|
2913
|
+
options: Pr(ve.frame, e._framePreset),
|
|
2913
2914
|
value: e._framePreset ?? "custom",
|
|
2914
|
-
onChange:
|
|
2915
|
+
onChange: je("_framePreset", ve.frame)
|
|
2915
2916
|
})
|
|
2916
|
-
}), /* @__PURE__ */
|
|
2917
|
+
}), /* @__PURE__ */ F(z, {
|
|
2917
2918
|
inline: p,
|
|
2918
2919
|
label: "Form",
|
|
2919
|
-
children: /* @__PURE__ */
|
|
2920
|
+
children: /* @__PURE__ */ F(M, {
|
|
2920
2921
|
variant: "subtle",
|
|
2921
2922
|
size: g,
|
|
2922
2923
|
className: "w-full",
|
|
2923
|
-
options: Pr(
|
|
2924
|
+
options: Pr(ve.form, e._formPreset),
|
|
2924
2925
|
value: e._formPreset ?? "custom",
|
|
2925
|
-
onChange:
|
|
2926
|
+
onChange: je("_formPreset", ve.form)
|
|
2926
2927
|
})
|
|
2927
2928
|
})]
|
|
2928
2929
|
}),
|
|
2929
|
-
/* @__PURE__ */
|
|
2930
|
+
/* @__PURE__ */ F(rt, {
|
|
2930
2931
|
layer: e,
|
|
2931
2932
|
schema: S,
|
|
2932
|
-
setProp:
|
|
2933
|
+
setProp: Oe
|
|
2933
2934
|
}),
|
|
2934
|
-
b && !v?.is3D && /* @__PURE__ */
|
|
2935
|
+
b && !v?.is3D && /* @__PURE__ */ F(Et, {
|
|
2935
2936
|
label: "Interaction",
|
|
2936
2937
|
divided: !0,
|
|
2937
|
-
children: /* @__PURE__ */
|
|
2938
|
+
children: /* @__PURE__ */ F(z, {
|
|
2938
2939
|
inline: p,
|
|
2939
2940
|
label: "Drag (C)",
|
|
2940
|
-
children: /* @__PURE__ */
|
|
2941
|
+
children: /* @__PURE__ */ F(Ir, {
|
|
2941
2942
|
inline: p,
|
|
2942
2943
|
cs: g,
|
|
2943
2944
|
on: !!y.grab && e.orbit !== !1,
|
|
@@ -2945,59 +2946,59 @@ function Lr({ layer: e, setProp: n, patch: r, updateLayer: i, palette: a, render
|
|
|
2945
2946
|
})
|
|
2946
2947
|
})
|
|
2947
2948
|
}),
|
|
2948
|
-
v?.is3D && /* @__PURE__ */
|
|
2949
|
+
v?.is3D && /* @__PURE__ */ I(Et, {
|
|
2949
2950
|
label: "3D",
|
|
2950
2951
|
divided: !0,
|
|
2951
|
-
children: [/* @__PURE__ */
|
|
2952
|
+
children: [/* @__PURE__ */ F(z, {
|
|
2952
2953
|
inline: p,
|
|
2953
2954
|
label: "Orbit (C)",
|
|
2954
|
-
children: /* @__PURE__ */
|
|
2955
|
+
children: /* @__PURE__ */ F(Ir, {
|
|
2955
2956
|
inline: p,
|
|
2956
2957
|
cs: g,
|
|
2957
2958
|
on: !!y.grab && e.orbit !== !1,
|
|
2958
2959
|
onChange: x
|
|
2959
2960
|
})
|
|
2960
|
-
}), v.zoom3dKey && /* @__PURE__ */
|
|
2961
|
+
}), v.zoom3dKey && /* @__PURE__ */ F(ye, {
|
|
2961
2962
|
schema: S.filter((e) => e.key === v.zoom3dKey).map(({ section: e, ...t }) => t),
|
|
2962
2963
|
layer: e,
|
|
2963
|
-
setProp:
|
|
2964
|
+
setProp: Oe,
|
|
2964
2965
|
palette: a,
|
|
2965
2966
|
renderAnimate: o,
|
|
2966
2967
|
tab: "anim",
|
|
2967
2968
|
inline: p
|
|
2968
2969
|
})]
|
|
2969
2970
|
}),
|
|
2970
|
-
/* @__PURE__ */
|
|
2971
|
+
/* @__PURE__ */ F(ye, {
|
|
2971
2972
|
schema: v?.is3D && v.zoom3dKey ? S.filter((e) => e.key !== v.zoom3dKey) : S,
|
|
2972
2973
|
layer: e,
|
|
2973
|
-
setProp:
|
|
2974
|
+
setProp: Oe,
|
|
2974
2975
|
palette: a,
|
|
2975
2976
|
renderAnimate: o,
|
|
2976
2977
|
tab: "anim",
|
|
2977
2978
|
inline: p
|
|
2978
2979
|
}),
|
|
2979
|
-
|
|
2980
|
+
Le && /* @__PURE__ */ F(er, {
|
|
2980
2981
|
layer: e,
|
|
2981
2982
|
patch: r,
|
|
2982
2983
|
defaultDuration: v?.duration ?? 8
|
|
2983
2984
|
}),
|
|
2984
|
-
|
|
2985
|
-
schema:
|
|
2985
|
+
Ne && /* @__PURE__ */ F(ye, {
|
|
2986
|
+
schema: Ne,
|
|
2986
2987
|
layer: e,
|
|
2987
2988
|
setProp: n,
|
|
2988
2989
|
palette: a,
|
|
2989
2990
|
renderAnimate: o,
|
|
2990
2991
|
inline: p
|
|
2991
2992
|
}),
|
|
2992
|
-
|
|
2993
|
+
Ie && /* @__PURE__ */ F(tr, {
|
|
2993
2994
|
layer: e,
|
|
2994
2995
|
patch: r,
|
|
2995
|
-
camParams:
|
|
2996
|
-
isEngine:
|
|
2997
|
-
showHeader: !
|
|
2996
|
+
camParams: Pe,
|
|
2997
|
+
isEngine: Fe,
|
|
2998
|
+
showHeader: !Ne
|
|
2998
2999
|
})
|
|
2999
3000
|
] }),
|
|
3000
|
-
/* @__PURE__ */
|
|
3001
|
+
/* @__PURE__ */ F(cr, {
|
|
3001
3002
|
layer: e,
|
|
3002
3003
|
patch: r,
|
|
3003
3004
|
renderAnimate: o,
|
|
@@ -3031,13 +3032,13 @@ function Rr() {
|
|
|
3031
3032
|
//#endregion
|
|
3032
3033
|
//#region src/editor/morph/StepPicker.jsx
|
|
3033
3034
|
function zr(e) {
|
|
3034
|
-
let t =
|
|
3035
|
+
let t = Ze(e.id), n = $e(e.loop)?.params ?? [];
|
|
3035
3036
|
return {
|
|
3036
3037
|
loopId: e.loop,
|
|
3037
3038
|
loopGroup: t,
|
|
3038
3039
|
presetId: e.id,
|
|
3039
3040
|
presetLabel: e.label,
|
|
3040
|
-
params:
|
|
3041
|
+
params: pt(Ee(e), n),
|
|
3041
3042
|
source: {
|
|
3042
3043
|
kind: "preset",
|
|
3043
3044
|
id: e.id,
|
|
@@ -3046,15 +3047,15 @@ function zr(e) {
|
|
|
3046
3047
|
};
|
|
3047
3048
|
}
|
|
3048
3049
|
function Br(e, t) {
|
|
3049
|
-
let n = t ?
|
|
3050
|
+
let n = t ? ft(e, t) : (e.layers ?? []).find((e) => e?.type === "loop");
|
|
3050
3051
|
if (!n) return null;
|
|
3051
|
-
let r =
|
|
3052
|
+
let r = $e(n.loopId)?.params ?? [];
|
|
3052
3053
|
return {
|
|
3053
3054
|
loopId: n.loopId,
|
|
3054
3055
|
loopGroup: n.loopGroup,
|
|
3055
3056
|
presetId: n.presetId,
|
|
3056
3057
|
presetLabel: n.presetLabel,
|
|
3057
|
-
params:
|
|
3058
|
+
params: pt(n, r),
|
|
3058
3059
|
source: {
|
|
3059
3060
|
kind: "file",
|
|
3060
3061
|
id: e.id,
|
|
@@ -3063,13 +3064,13 @@ function Br(e, t) {
|
|
|
3063
3064
|
};
|
|
3064
3065
|
}
|
|
3065
3066
|
function Vr(e) {
|
|
3066
|
-
let t =
|
|
3067
|
+
let t = $e(e.loopId)?.params ?? [];
|
|
3067
3068
|
return {
|
|
3068
3069
|
loopId: e.loopId,
|
|
3069
3070
|
loopGroup: e.loopGroup,
|
|
3070
3071
|
presetId: e.presetId,
|
|
3071
3072
|
presetLabel: e.presetLabel,
|
|
3072
|
-
params:
|
|
3073
|
+
params: pt(e, t),
|
|
3073
3074
|
source: {
|
|
3074
3075
|
kind: "stage",
|
|
3075
3076
|
label: e.presetLabel || "Stage"
|
|
@@ -3077,7 +3078,7 @@ function Vr(e) {
|
|
|
3077
3078
|
};
|
|
3078
3079
|
}
|
|
3079
3080
|
function Hr() {
|
|
3080
|
-
let e =
|
|
3081
|
+
let e = gt(), { layer: t, setOnly: n } = Rr(), r = !!e.picker, i = e.mode === "blend" ? e.loopId : null, [a, o] = N(""), s = t?.type === "loop" && (e.steps.length < 2 || e.editing != null), { rows: c, make: l } = tn(() => {
|
|
3081
3082
|
let e = [], n = /* @__PURE__ */ new Map();
|
|
3082
3083
|
if (!r) return {
|
|
3083
3084
|
rows: e,
|
|
@@ -3087,10 +3088,10 @@ function Hr() {
|
|
|
3087
3088
|
id: "stage",
|
|
3088
3089
|
label: t.presetLabel || "Current stage",
|
|
3089
3090
|
group: "Current stage",
|
|
3090
|
-
hint:
|
|
3091
|
+
hint: De(t.loopGroup)?.label
|
|
3091
3092
|
}), n.set("stage", () => Vr(t)));
|
|
3092
|
-
for (let t of (
|
|
3093
|
-
if (t.mode === "morph" || !(i ?
|
|
3093
|
+
for (let t of (ct().preset ?? []).filter((e) => !e.shipped)) {
|
|
3094
|
+
if (t.mode === "morph" || !(i ? ft(t, i) : (t.layers ?? []).some((e) => e?.type === "loop"))) continue;
|
|
3094
3095
|
let r = `file:${t.id}`;
|
|
3095
3096
|
e.push({
|
|
3096
3097
|
id: r,
|
|
@@ -3098,13 +3099,13 @@ function Hr() {
|
|
|
3098
3099
|
group: "My files"
|
|
3099
3100
|
}), n.set(r, () => Br(t, i));
|
|
3100
3101
|
}
|
|
3101
|
-
for (let t of
|
|
3102
|
-
if (
|
|
3102
|
+
for (let t of Fe) {
|
|
3103
|
+
if (et(t) || i && t.loop !== i) continue;
|
|
3103
3104
|
let r = `preset:${t.id}`;
|
|
3104
3105
|
e.push({
|
|
3105
3106
|
id: r,
|
|
3106
3107
|
label: t.label,
|
|
3107
|
-
group:
|
|
3108
|
+
group: De(Ze(t.id))?.label ?? t.loop,
|
|
3108
3109
|
hint: t.sub
|
|
3109
3110
|
}), n.set(r, () => zr(t));
|
|
3110
3111
|
}
|
|
@@ -3117,7 +3118,7 @@ function Hr() {
|
|
|
3117
3118
|
i,
|
|
3118
3119
|
s,
|
|
3119
3120
|
t
|
|
3120
|
-
]), [u, d] =
|
|
3121
|
+
]), [u, d] = N(null), f = tn(() => {
|
|
3121
3122
|
if (u) return [{
|
|
3122
3123
|
id: "back",
|
|
3123
3124
|
label: "All categories",
|
|
@@ -3140,10 +3141,10 @@ function Hr() {
|
|
|
3140
3141
|
}, [c, u]);
|
|
3141
3142
|
if (!r) return null;
|
|
3142
3143
|
let p = a.trim().toLowerCase();
|
|
3143
|
-
return /* @__PURE__ */
|
|
3144
|
+
return /* @__PURE__ */ F(Wt, {
|
|
3144
3145
|
open: !0,
|
|
3145
3146
|
onClose: () => {
|
|
3146
|
-
|
|
3147
|
+
mt({ picker: null }), o(""), d(null);
|
|
3147
3148
|
},
|
|
3148
3149
|
suggestions: f,
|
|
3149
3150
|
results: p ? c.filter((e) => [
|
|
@@ -3165,7 +3166,7 @@ function Hr() {
|
|
|
3165
3166
|
presetLabel: r.presetLabel,
|
|
3166
3167
|
loopId: r.loopId,
|
|
3167
3168
|
...r.params
|
|
3168
|
-
}),
|
|
3169
|
+
}), ht(r));
|
|
3169
3170
|
},
|
|
3170
3171
|
placeholder: "Search presets and files",
|
|
3171
3172
|
selectLabel: "Add step"
|
|
@@ -3173,7 +3174,7 @@ function Hr() {
|
|
|
3173
3174
|
}
|
|
3174
3175
|
//#endregion
|
|
3175
3176
|
//#region src/generate/field.js
|
|
3176
|
-
var
|
|
3177
|
+
var B = (e) => e < 0 ? 0 : e > 1 ? 1 : e, Ur = (e) => e * e * (3 - 2 * e);
|
|
3177
3178
|
function Wr(e, t, n) {
|
|
3178
3179
|
let r = e * 374761393 + t * 668265263 + n * 2147483647 | 0;
|
|
3179
3180
|
return r = Math.imul(r ^ r >>> 13, 1274126177), ((r ^ r >>> 16) >>> 0) / 4294967295;
|
|
@@ -3192,16 +3193,16 @@ function qr(e, t, n, r = null) {
|
|
|
3192
3193
|
switch (i) {
|
|
3193
3194
|
case "linear": return (n, r) => {
|
|
3194
3195
|
let i = (n - .5) * f + (r - .5) * p, a = -(n - .5) * p + (r - .5) * f;
|
|
3195
|
-
return
|
|
3196
|
+
return B((i + (e[`${t}Bend`] ?? 0) * a * a * 4) * (e[`${t}Span`] ?? 1) + .5 + (e[`${t}Offset`] ?? 0));
|
|
3196
3197
|
};
|
|
3197
|
-
case "diamond": return (e, t) =>
|
|
3198
|
+
case "diamond": return (e, t) => B(1 - Math.abs(e - a) / u - Math.abs(t - o) / d);
|
|
3198
3199
|
case "radial": return (e, t) => {
|
|
3199
3200
|
let r = (e - a) * n, i = t - o;
|
|
3200
|
-
return
|
|
3201
|
+
return B(1 - Math.hypot(r, i) / (u * Math.min(n, 1)));
|
|
3201
3202
|
};
|
|
3202
3203
|
case "ellipse": return (n, r) => {
|
|
3203
3204
|
let i = n - a, s = r - o, c = i * f + s * p, l = -i * p + s * f, m = e[`${t}Sq`] ?? 2;
|
|
3204
|
-
return
|
|
3205
|
+
return B(1 - (m === 2 ? Math.hypot(c / u, l / d) : (Math.abs(c / u) ** m + Math.abs(l / d) ** m) ** (1 / m)));
|
|
3205
3206
|
};
|
|
3206
3207
|
case "blob": return (e, t) => {
|
|
3207
3208
|
let n = (e - a) / u, r = (t - o) / d;
|
|
@@ -3213,7 +3214,7 @@ function qr(e, t, n, r = null) {
|
|
|
3213
3214
|
case "noise": return (r, i) => Kr(r * c * n, i * (e[`${t}Freq2`] ?? c), e[`${t}Seed`] ?? 1, 3);
|
|
3214
3215
|
case "ribbon": return (n, r) => {
|
|
3215
3216
|
let i = e[`${t}Amp`] ?? .25, a = (n - .5) * f + (r - .5) * p, o = -(n - .5) * p + (r - .5) * f, s = i * Math.sin(a * c * 2 * Math.PI + l), d = u * Math.max(.05, 1 + Math.abs(a) * 2 * (e[`${t}Flare`] ?? 0));
|
|
3216
|
-
return
|
|
3217
|
+
return B(1 - Math.abs(o - s) / d);
|
|
3217
3218
|
};
|
|
3218
3219
|
case "conic": return (e, t) => ((Math.atan2(t - o, (e - a) * n) - s) / (2 * Math.PI) % 1 + 1) % 1;
|
|
3219
3220
|
case "lights": {
|
|
@@ -3247,7 +3248,7 @@ function qr(e, t, n, r = null) {
|
|
|
3247
3248
|
let t = Math.hypot((r - e.x) * n, (a - e.y) / s) / e.r;
|
|
3248
3249
|
o += e.w * Math.exp(-t * t * 2);
|
|
3249
3250
|
}
|
|
3250
|
-
return
|
|
3251
|
+
return B(o);
|
|
3251
3252
|
};
|
|
3252
3253
|
}
|
|
3253
3254
|
case "interfere": return (r, i) => {
|
|
@@ -3256,7 +3257,7 @@ function qr(e, t, n, r = null) {
|
|
|
3256
3257
|
};
|
|
3257
3258
|
case "surface": {
|
|
3258
3259
|
let n = Jr(e[`${t}Surface`]);
|
|
3259
|
-
return (e, t) =>
|
|
3260
|
+
return (e, t) => B(n(e, t));
|
|
3260
3261
|
}
|
|
3261
3262
|
case "poly": {
|
|
3262
3263
|
let n = String(e[`${t}Poly`] ?? "").split(";").map((e) => {
|
|
@@ -3274,9 +3275,9 @@ function qr(e, t, n, r = null) {
|
|
|
3274
3275
|
}
|
|
3275
3276
|
case "mesh": {
|
|
3276
3277
|
let n = Yr(e[`${t}Mesh`]);
|
|
3277
|
-
return (e, t) =>
|
|
3278
|
+
return (e, t) => B(n(e, t));
|
|
3278
3279
|
}
|
|
3279
|
-
case "image": return r ? (e, t) =>
|
|
3280
|
+
case "image": return r ? (e, t) => B(r(e, t)) : () => 0;
|
|
3280
3281
|
default: return () => e[`${t}Value`] ?? 1;
|
|
3281
3282
|
}
|
|
3282
3283
|
}
|
|
@@ -3304,7 +3305,7 @@ function Qr(e, t = 1, n = null) {
|
|
|
3304
3305
|
let r = Zr(e, "f", t, n), i = e.gKind && e.gKind !== "none" ? Zr(e, "g", t, n) : null, a = Xr[e.fOp ?? "max"] ?? Xr.max, o = e.gWeight ?? 1, s = e.fLo ?? 0, c = e.fHi ?? 1, l = e.fContrast ?? 1, u = e.fGamma ?? 1, d = e.fFrom ?? 0, f = e.fTo ?? 1, p = Math.round(e.fSteps ?? 0), m = !!e.fInvert, h = e.fSplit ?? 0;
|
|
3305
3306
|
return (e, t) => {
|
|
3306
3307
|
let n = r(e, t);
|
|
3307
|
-
return i && (n = a(n, i(e, t) * o)), h > 0 && t > h && (n = 1 - n), (d !== 0 || f !== 1) && (n =
|
|
3308
|
+
return i && (n = a(n, i(e, t) * o)), h > 0 && t > h && (n = 1 - n), (d !== 0 || f !== 1) && (n = B((n - d) / (f - d || 1e-6))), n = B((n - .5) * l + .5), u !== 1 && (n **= +u), m && (n = 1 - n), p >= 2 && (n = Math.min(p - 1, Math.floor(n * p)) / (p - 1)), s + (c - s) * B(n);
|
|
3308
3309
|
};
|
|
3309
3310
|
}
|
|
3310
3311
|
function $r(e, t, n) {
|
|
@@ -3315,10 +3316,10 @@ function $r(e, t, n) {
|
|
|
3315
3316
|
}
|
|
3316
3317
|
return r;
|
|
3317
3318
|
}
|
|
3318
|
-
var
|
|
3319
|
+
var V = 512, ei = /* @__PURE__ */ new WeakMap();
|
|
3319
3320
|
function ti(e) {
|
|
3320
3321
|
if (ei.has(e)) return ei.get(e);
|
|
3321
|
-
let t = new Uint8Array(
|
|
3322
|
+
let t = new Uint8Array(V * V), n = [];
|
|
3322
3323
|
for (let t of e) for (let e = 0, r = t.length - 1; e < t.length; r = e++) {
|
|
3323
3324
|
let [i, a] = t[e], [o, s] = t[r];
|
|
3324
3325
|
if (a === s) continue;
|
|
@@ -3332,14 +3333,14 @@ function ti(e) {
|
|
|
3332
3333
|
}
|
|
3333
3334
|
n.sort((e, t) => e.y0 - t.y0);
|
|
3334
3335
|
let r = 0, i = [];
|
|
3335
|
-
for (let e = 0; e <
|
|
3336
|
-
let a = (e + .5) /
|
|
3336
|
+
for (let e = 0; e < V; e++) {
|
|
3337
|
+
let a = (e + .5) / V;
|
|
3337
3338
|
for (; r < n.length && n[r].y0 <= a;) i.push(n[r++]);
|
|
3338
3339
|
if (i = i.filter((e) => e.y1 > a), !i.length) continue;
|
|
3339
3340
|
let o = i.map((e) => e.x0 + (a - e.y0) * e.k).sort((e, t) => e - t);
|
|
3340
|
-
for (let n = 0; n + 1 < o.length; n += 2) for (let r = Math.max(0, Math.ceil(o[n] *
|
|
3341
|
+
for (let n = 0; n + 1 < o.length; n += 2) for (let r = Math.max(0, Math.ceil(o[n] * V - .5)); r <= Math.min(V - 1, Math.floor(o[n + 1] * V - .5)); r++) t[e * V + r] = 1;
|
|
3341
3342
|
}
|
|
3342
|
-
let a = (e, n) => e >= 0 && e < 1 && n >= 0 && n < 1 && t[Math.floor(n *
|
|
3343
|
+
let a = (e, n) => e >= 0 && e < 1 && n >= 0 && n < 1 && t[Math.floor(n * V) * V + Math.floor(e * V)] === 1;
|
|
3343
3344
|
return ei.set(e, a), a;
|
|
3344
3345
|
}
|
|
3345
3346
|
function ni(e, t = 1, n = null) {
|
|
@@ -5211,8 +5212,8 @@ var ai = [
|
|
|
5211
5212
|
let s = e / 24 * 2 * Math.PI;
|
|
5212
5213
|
a.push([t + Math.cos(s) * r, n + Math.sin(s) * r]), o.push([t + Math.cos(s) * (r - i), n + Math.sin(s) * (r - i)]);
|
|
5213
5214
|
}
|
|
5214
|
-
|
|
5215
|
-
}, Di = (e, t, n, r, i, a) =>
|
|
5215
|
+
me(e, [a, o]);
|
|
5216
|
+
}, Di = (e, t, n, r, i, a) => me(e, [[
|
|
5216
5217
|
[t - r, n - i],
|
|
5217
5218
|
[t + r, n - i],
|
|
5218
5219
|
[t + r, n + i],
|
|
@@ -5822,7 +5823,7 @@ var Ni = {
|
|
|
5822
5823
|
],
|
|
5823
5824
|
draw(e, t, n) {
|
|
5824
5825
|
let r = Math.max(1, Math.round(t.cols ?? 4)), i = Math.max(1, Math.round(t.rows ?? 6)), a = t.seed ?? 1, o = t.tex ?? 8, s = t.texSize ?? .45, c = (e, n, r) => (t.alt === "row" ? n % 2 : t.alt === "col" ? e % 2 : t.alt === "random" ? Ai(r, a) < .5 : (e + n) % 2) ? t.fillB ?? "dots" : t.fillA ?? "solid", l = n, u = (t.frame ?? 0) * Math.min(n.w, n.h);
|
|
5825
|
-
u > 0 && (
|
|
5826
|
+
u > 0 && (me(e, [[
|
|
5826
5827
|
[n.x, n.y],
|
|
5827
5828
|
[n.x + n.w, n.y],
|
|
5828
5829
|
[n.x + n.w, n.y + n.h],
|
|
@@ -5842,7 +5843,7 @@ var Ni = {
|
|
|
5842
5843
|
if (m === "maze") {
|
|
5843
5844
|
let t = Math.max(1, o * s * .4), n = l.x, r = l.y, c = l.x + l.w, u = l.y + l.h;
|
|
5844
5845
|
for (let o = 0; o < i && c - n > 4 * t && u - r > 4 * t; o++) {
|
|
5845
|
-
|
|
5846
|
+
me(e, [[
|
|
5846
5847
|
[n, r],
|
|
5847
5848
|
[c, r],
|
|
5848
5849
|
[c, u],
|
|
@@ -6424,7 +6425,7 @@ function zi(e) {
|
|
|
6424
6425
|
}
|
|
6425
6426
|
}), n;
|
|
6426
6427
|
}
|
|
6427
|
-
var Bi = Object.fromEntries(
|
|
6428
|
+
var Bi = Object.fromEntries(Xe.params.map((e) => [e.key, e.default])), Vi = /* @__PURE__ */ new Map(), Hi = /* @__PURE__ */ new Map();
|
|
6428
6429
|
function Ui(e, t) {
|
|
6429
6430
|
Vi.set(e, t);
|
|
6430
6431
|
for (let t of [...Hi.keys()]) t.startsWith(`${e}|`) && Hi.delete(t);
|
|
@@ -6662,7 +6663,7 @@ var Ki = (e, t) => {
|
|
|
6662
6663
|
let D = Gi(f, E);
|
|
6663
6664
|
if (!D.rings.length) continue;
|
|
6664
6665
|
let ee = (t.sizeBy ? (t.sizeMin ?? .2) + (1 - (t.sizeMin ?? .2)) * T : 1) * v, O = c * ee, te = t.fitCell ? s * ee : D.advance * O, k = t.fitCell ? te / Math.max(1e-6, D.advance) : O, ne = n.x + x * n.w - te / 2, re = n.y + S * n.h - O / 2;
|
|
6665
|
-
|
|
6666
|
+
me(e, D.rings.map((e) => e.map(([e, t]) => [ne + e * k, re + t * O])));
|
|
6666
6667
|
}
|
|
6667
6668
|
}
|
|
6668
6669
|
}, Xi = (e) => {
|
|
@@ -6845,19 +6846,19 @@ var Qi = {
|
|
|
6845
6846
|
]);
|
|
6846
6847
|
}
|
|
6847
6848
|
}
|
|
6848
|
-
},
|
|
6849
|
+
}, H = {
|
|
6849
6850
|
inset: 128,
|
|
6850
6851
|
color: "#FFFFFF",
|
|
6851
6852
|
bg: "#000000"
|
|
6852
|
-
},
|
|
6853
|
+
}, U = [1056, 1056], ea = [1456, 1056], W = [1056, 1456], ta = [
|
|
6853
6854
|
{
|
|
6854
6855
|
id: "eclipse",
|
|
6855
6856
|
style: "lineScreen",
|
|
6856
6857
|
label: "Eclipse",
|
|
6857
6858
|
ref: "lines/eclipse",
|
|
6858
|
-
size:
|
|
6859
|
+
size: U,
|
|
6859
6860
|
params: {
|
|
6860
|
-
...
|
|
6861
|
+
...H,
|
|
6861
6862
|
orient: "h",
|
|
6862
6863
|
count: 43,
|
|
6863
6864
|
fill: .932,
|
|
@@ -6880,9 +6881,9 @@ var Qi = {
|
|
|
6880
6881
|
style: "lineScreen",
|
|
6881
6882
|
label: "Confluence",
|
|
6882
6883
|
ref: "lines/confluence",
|
|
6883
|
-
size:
|
|
6884
|
+
size: ea,
|
|
6884
6885
|
params: {
|
|
6885
|
-
...
|
|
6886
|
+
...H,
|
|
6886
6887
|
justify: !0,
|
|
6887
6888
|
orient: "v",
|
|
6888
6889
|
count: 55,
|
|
@@ -6912,7 +6913,7 @@ var Qi = {
|
|
|
6912
6913
|
ref: "lines/counterform",
|
|
6913
6914
|
size: W,
|
|
6914
6915
|
params: {
|
|
6915
|
-
...
|
|
6916
|
+
...H,
|
|
6916
6917
|
orient: "v",
|
|
6917
6918
|
count: 33,
|
|
6918
6919
|
fill: .9,
|
|
@@ -6938,9 +6939,9 @@ var Qi = {
|
|
|
6938
6939
|
style: "lineScreen",
|
|
6939
6940
|
label: "Cusp",
|
|
6940
6941
|
ref: "lines/cusp",
|
|
6941
|
-
size:
|
|
6942
|
+
size: ea,
|
|
6942
6943
|
params: {
|
|
6943
|
-
...
|
|
6944
|
+
...H,
|
|
6944
6945
|
orient: "v",
|
|
6945
6946
|
count: 49,
|
|
6946
6947
|
fill: .95,
|
|
@@ -6963,7 +6964,7 @@ var Qi = {
|
|
|
6963
6964
|
ref: "lines/fulcrum",
|
|
6964
6965
|
size: W,
|
|
6965
6966
|
params: {
|
|
6966
|
-
...
|
|
6967
|
+
...H,
|
|
6967
6968
|
orient: "h",
|
|
6968
6969
|
count: 31,
|
|
6969
6970
|
fill: .9,
|
|
@@ -6988,7 +6989,7 @@ var Qi = {
|
|
|
6988
6989
|
ref: "lines/inflection",
|
|
6989
6990
|
size: W,
|
|
6990
6991
|
params: {
|
|
6991
|
-
...
|
|
6992
|
+
...H,
|
|
6992
6993
|
justify: !0,
|
|
6993
6994
|
orient: "v",
|
|
6994
6995
|
count: 43,
|
|
@@ -7010,9 +7011,9 @@ var Qi = {
|
|
|
7010
7011
|
style: "lineScreen",
|
|
7011
7012
|
label: "Relay",
|
|
7012
7013
|
ref: "lines/relay",
|
|
7013
|
-
size:
|
|
7014
|
+
size: ea,
|
|
7014
7015
|
params: {
|
|
7015
|
-
...
|
|
7016
|
+
...H,
|
|
7016
7017
|
justify: !0,
|
|
7017
7018
|
orient: "h",
|
|
7018
7019
|
count: 25,
|
|
@@ -7042,9 +7043,9 @@ var Qi = {
|
|
|
7042
7043
|
style: "lineScreen",
|
|
7043
7044
|
label: "Spooky",
|
|
7044
7045
|
ref: "lines/spooky",
|
|
7045
|
-
size:
|
|
7046
|
+
size: U,
|
|
7046
7047
|
params: {
|
|
7047
|
-
...
|
|
7048
|
+
...H,
|
|
7048
7049
|
orient: "v",
|
|
7049
7050
|
count: 30,
|
|
7050
7051
|
fill: .95,
|
|
@@ -7068,7 +7069,7 @@ var Qi = {
|
|
|
7068
7069
|
ref: "lines/summer",
|
|
7069
7070
|
size: W,
|
|
7070
7071
|
params: {
|
|
7071
|
-
...
|
|
7072
|
+
...H,
|
|
7072
7073
|
orient: "v",
|
|
7073
7074
|
count: 25,
|
|
7074
7075
|
fill: .95,
|
|
@@ -7089,9 +7090,9 @@ var Qi = {
|
|
|
7089
7090
|
style: "lineScreen",
|
|
7090
7091
|
label: "Steps",
|
|
7091
7092
|
ref: "dot/steps",
|
|
7092
|
-
size:
|
|
7093
|
+
size: U,
|
|
7093
7094
|
params: {
|
|
7094
|
-
...
|
|
7095
|
+
...H,
|
|
7095
7096
|
orient: "h",
|
|
7096
7097
|
count: 8,
|
|
7097
7098
|
shift: -.159,
|
|
@@ -7114,7 +7115,7 @@ var Qi = {
|
|
|
7114
7115
|
ref: "dots/compression",
|
|
7115
7116
|
size: W,
|
|
7116
7117
|
params: {
|
|
7117
|
-
...
|
|
7118
|
+
...H,
|
|
7118
7119
|
cols: 43,
|
|
7119
7120
|
rows: 81,
|
|
7120
7121
|
size: .56,
|
|
@@ -7139,7 +7140,7 @@ var Qi = {
|
|
|
7139
7140
|
ref: "dots/counterweight",
|
|
7140
7141
|
size: W,
|
|
7141
7142
|
params: {
|
|
7142
|
-
...
|
|
7143
|
+
...H,
|
|
7143
7144
|
cols: 51,
|
|
7144
7145
|
size: 1.04,
|
|
7145
7146
|
min: .35,
|
|
@@ -7162,7 +7163,7 @@ var Qi = {
|
|
|
7162
7163
|
ref: "dots/interference",
|
|
7163
7164
|
size: W,
|
|
7164
7165
|
params: {
|
|
7165
|
-
...
|
|
7166
|
+
...H,
|
|
7166
7167
|
cols: 60,
|
|
7167
7168
|
rows: 78,
|
|
7168
7169
|
size: .7,
|
|
@@ -7192,7 +7193,7 @@ var Qi = {
|
|
|
7192
7193
|
ref: "dots/slipstream",
|
|
7193
7194
|
size: W,
|
|
7194
7195
|
params: {
|
|
7195
|
-
...
|
|
7196
|
+
...H,
|
|
7196
7197
|
justify: !0,
|
|
7197
7198
|
cols: 48,
|
|
7198
7199
|
rows: 68,
|
|
@@ -7213,9 +7214,9 @@ var Qi = {
|
|
|
7213
7214
|
style: "dotScreen",
|
|
7214
7215
|
label: "Terraces",
|
|
7215
7216
|
ref: "dots/terraces",
|
|
7216
|
-
size:
|
|
7217
|
+
size: U,
|
|
7217
7218
|
params: {
|
|
7218
|
-
...
|
|
7219
|
+
...H,
|
|
7219
7220
|
cols: 44,
|
|
7220
7221
|
rows: 48,
|
|
7221
7222
|
size: .9,
|
|
@@ -7233,7 +7234,7 @@ var Qi = {
|
|
|
7233
7234
|
ref: "dots/umbra",
|
|
7234
7235
|
size: W,
|
|
7235
7236
|
params: {
|
|
7236
|
-
...
|
|
7237
|
+
...H,
|
|
7237
7238
|
cols: 45,
|
|
7238
7239
|
size: 1.4,
|
|
7239
7240
|
min: .48,
|
|
@@ -7252,9 +7253,9 @@ var Qi = {
|
|
|
7252
7253
|
style: "dotScreen",
|
|
7253
7254
|
label: "Warp",
|
|
7254
7255
|
ref: "dots/warp",
|
|
7255
|
-
size:
|
|
7256
|
+
size: U,
|
|
7256
7257
|
params: {
|
|
7257
|
-
...
|
|
7258
|
+
...H,
|
|
7258
7259
|
cols: 61,
|
|
7259
7260
|
size: 1.66,
|
|
7260
7261
|
min: .38,
|
|
@@ -7281,7 +7282,7 @@ var Qi = {
|
|
|
7281
7282
|
ref: "fields/helix",
|
|
7282
7283
|
size: W,
|
|
7283
7284
|
params: {
|
|
7284
|
-
...
|
|
7285
|
+
...H,
|
|
7285
7286
|
cols: 100,
|
|
7286
7287
|
font: "pixel",
|
|
7287
7288
|
ramp: " ·•█",
|
|
@@ -7311,7 +7312,7 @@ var Qi = {
|
|
|
7311
7312
|
ref: "fields/spires",
|
|
7312
7313
|
size: W,
|
|
7313
7314
|
params: {
|
|
7314
|
-
...
|
|
7315
|
+
...H,
|
|
7315
7316
|
cols: 26,
|
|
7316
7317
|
font: "pixel",
|
|
7317
7318
|
ramp: " ·▒█",
|
|
@@ -7343,9 +7344,9 @@ var Qi = {
|
|
|
7343
7344
|
style: "ascii",
|
|
7344
7345
|
label: "Streaks",
|
|
7345
7346
|
ref: "fields/streaks",
|
|
7346
|
-
size:
|
|
7347
|
+
size: U,
|
|
7347
7348
|
params: {
|
|
7348
|
-
...
|
|
7349
|
+
...H,
|
|
7349
7350
|
cols: 125,
|
|
7350
7351
|
font: "pixel",
|
|
7351
7352
|
ramp: " -=█",
|
|
@@ -7364,9 +7365,9 @@ var Qi = {
|
|
|
7364
7365
|
style: "ascii",
|
|
7365
7366
|
label: "Clouds",
|
|
7366
7367
|
ref: "fields/clouds",
|
|
7367
|
-
size:
|
|
7368
|
+
size: U,
|
|
7368
7369
|
params: {
|
|
7369
|
-
...
|
|
7370
|
+
...H,
|
|
7370
7371
|
scale: 1.15,
|
|
7371
7372
|
cols: 100,
|
|
7372
7373
|
font: "pixel",
|
|
@@ -7386,9 +7387,9 @@ var Qi = {
|
|
|
7386
7387
|
style: "ascii",
|
|
7387
7388
|
label: "Swirl",
|
|
7388
7389
|
ref: "fields/swirl",
|
|
7389
|
-
size:
|
|
7390
|
+
size: U,
|
|
7390
7391
|
params: {
|
|
7391
|
-
...
|
|
7392
|
+
...H,
|
|
7392
7393
|
cols: 90,
|
|
7393
7394
|
font: "pixel",
|
|
7394
7395
|
ramp: " ·=█",
|
|
@@ -7417,9 +7418,9 @@ var Qi = {
|
|
|
7417
7418
|
style: "ascii",
|
|
7418
7419
|
label: "Lattice",
|
|
7419
7420
|
ref: "fields/lattice",
|
|
7420
|
-
size:
|
|
7421
|
+
size: U,
|
|
7421
7422
|
params: {
|
|
7422
|
-
...
|
|
7423
|
+
...H,
|
|
7423
7424
|
cols: 100,
|
|
7424
7425
|
font: "pixel",
|
|
7425
7426
|
ramp: " ·•█",
|
|
@@ -7445,7 +7446,7 @@ var Qi = {
|
|
|
7445
7446
|
ref: "fields/beacons",
|
|
7446
7447
|
size: W,
|
|
7447
7448
|
params: {
|
|
7448
|
-
...
|
|
7449
|
+
...H,
|
|
7449
7450
|
cols: 60,
|
|
7450
7451
|
font: "pixel",
|
|
7451
7452
|
ramp: " ░▒█",
|
|
@@ -7465,7 +7466,7 @@ var Qi = {
|
|
|
7465
7466
|
ref: "patterns/text",
|
|
7466
7467
|
size: W,
|
|
7467
7468
|
params: {
|
|
7468
|
-
...
|
|
7469
|
+
...H,
|
|
7469
7470
|
font: "pixel",
|
|
7470
7471
|
cols: 52,
|
|
7471
7472
|
cell: 1.9,
|
|
@@ -7485,7 +7486,7 @@ var Qi = {
|
|
|
7485
7486
|
ref: "patterns/type",
|
|
7486
7487
|
size: W,
|
|
7487
7488
|
params: {
|
|
7488
|
-
...
|
|
7489
|
+
...H,
|
|
7489
7490
|
font: "rg-base-900",
|
|
7490
7491
|
ramp: "a",
|
|
7491
7492
|
sizeBy: !0,
|
|
@@ -7505,9 +7506,9 @@ var Qi = {
|
|
|
7505
7506
|
style: "stripeArray",
|
|
7506
7507
|
label: "Air",
|
|
7507
7508
|
ref: "bands/air",
|
|
7508
|
-
size:
|
|
7509
|
+
size: ea,
|
|
7509
7510
|
params: {
|
|
7510
|
-
...
|
|
7511
|
+
...H,
|
|
7511
7512
|
orient: "h",
|
|
7512
7513
|
count: 11,
|
|
7513
7514
|
spread: "packed",
|
|
@@ -7527,7 +7528,7 @@ var Qi = {
|
|
|
7527
7528
|
ref: "bands/bars",
|
|
7528
7529
|
size: W,
|
|
7529
7530
|
params: {
|
|
7530
|
-
...
|
|
7531
|
+
...H,
|
|
7531
7532
|
orient: "v",
|
|
7532
7533
|
count: 21,
|
|
7533
7534
|
wA: .49,
|
|
@@ -7541,9 +7542,9 @@ var Qi = {
|
|
|
7541
7542
|
style: "radialArray",
|
|
7542
7543
|
label: "Beam",
|
|
7543
7544
|
ref: "bands/beam",
|
|
7544
|
-
size:
|
|
7545
|
+
size: ea,
|
|
7545
7546
|
params: {
|
|
7546
|
-
...
|
|
7547
|
+
...H,
|
|
7547
7548
|
mode: "rings",
|
|
7548
7549
|
count: 11,
|
|
7549
7550
|
cx: 1.85,
|
|
@@ -7561,9 +7562,9 @@ var Qi = {
|
|
|
7561
7562
|
style: "stripeArray",
|
|
7562
7563
|
label: "Drift",
|
|
7563
7564
|
ref: "bands/drift",
|
|
7564
|
-
size:
|
|
7565
|
+
size: ea,
|
|
7565
7566
|
params: {
|
|
7566
|
-
...
|
|
7567
|
+
...H,
|
|
7567
7568
|
orient: "h",
|
|
7568
7569
|
count: 17,
|
|
7569
7570
|
wA: .646,
|
|
@@ -7581,9 +7582,9 @@ var Qi = {
|
|
|
7581
7582
|
style: "stripeArray",
|
|
7582
7583
|
label: "Noise",
|
|
7583
7584
|
ref: "bands/noise",
|
|
7584
|
-
size:
|
|
7585
|
+
size: ea,
|
|
7585
7586
|
params: {
|
|
7586
|
-
...
|
|
7587
|
+
...H,
|
|
7587
7588
|
orient: "h",
|
|
7588
7589
|
count: 15,
|
|
7589
7590
|
wA: .092,
|
|
@@ -7601,9 +7602,9 @@ var Qi = {
|
|
|
7601
7602
|
style: "stripeArray",
|
|
7602
7603
|
label: "Rake",
|
|
7603
7604
|
ref: "bands/rake",
|
|
7604
|
-
size:
|
|
7605
|
+
size: U,
|
|
7605
7606
|
params: {
|
|
7606
|
-
...
|
|
7607
|
+
...H,
|
|
7607
7608
|
orient: "v",
|
|
7608
7609
|
count: 14,
|
|
7609
7610
|
wA: .543,
|
|
@@ -7623,9 +7624,9 @@ var Qi = {
|
|
|
7623
7624
|
style: "stripeArray",
|
|
7624
7625
|
label: "Substances",
|
|
7625
7626
|
ref: "bands/substances",
|
|
7626
|
-
size:
|
|
7627
|
+
size: ea,
|
|
7627
7628
|
params: {
|
|
7628
|
-
...
|
|
7629
|
+
...H,
|
|
7629
7630
|
orient: "v",
|
|
7630
7631
|
count: 20,
|
|
7631
7632
|
angle: 33.94,
|
|
@@ -7645,9 +7646,9 @@ var Qi = {
|
|
|
7645
7646
|
style: "stripeArray",
|
|
7646
7647
|
label: "Transfer",
|
|
7647
7648
|
ref: "bands/transfer",
|
|
7648
|
-
size:
|
|
7649
|
+
size: ea,
|
|
7649
7650
|
params: {
|
|
7650
|
-
...
|
|
7651
|
+
...H,
|
|
7651
7652
|
orient: "v",
|
|
7652
7653
|
count: 21,
|
|
7653
7654
|
wA: .061,
|
|
@@ -7660,9 +7661,9 @@ var Qi = {
|
|
|
7660
7661
|
style: "stripeArray",
|
|
7661
7662
|
label: "Undulation",
|
|
7662
7663
|
ref: "bands/undulation",
|
|
7663
|
-
size:
|
|
7664
|
+
size: ea,
|
|
7664
7665
|
params: {
|
|
7665
|
-
...
|
|
7666
|
+
...H,
|
|
7666
7667
|
orient: "h",
|
|
7667
7668
|
count: 19,
|
|
7668
7669
|
wA: .06,
|
|
@@ -7682,7 +7683,7 @@ var Qi = {
|
|
|
7682
7683
|
ref: "circles/counterturn",
|
|
7683
7684
|
size: W,
|
|
7684
7685
|
params: {
|
|
7685
|
-
...
|
|
7686
|
+
...H,
|
|
7686
7687
|
mode: "rings",
|
|
7687
7688
|
count: 1,
|
|
7688
7689
|
cx: .625,
|
|
@@ -7707,9 +7708,9 @@ var Qi = {
|
|
|
7707
7708
|
style: "radialArray",
|
|
7708
7709
|
label: "Emblem",
|
|
7709
7710
|
ref: "circles/emblem",
|
|
7710
|
-
size:
|
|
7711
|
+
size: U,
|
|
7711
7712
|
params: {
|
|
7712
|
-
...
|
|
7713
|
+
...H,
|
|
7713
7714
|
mode: "rings",
|
|
7714
7715
|
count: 1,
|
|
7715
7716
|
r1A: .84,
|
|
@@ -7730,9 +7731,9 @@ var Qi = {
|
|
|
7730
7731
|
style: "radialArray",
|
|
7731
7732
|
label: "Fan",
|
|
7732
7733
|
ref: "circles/fan",
|
|
7733
|
-
size:
|
|
7734
|
+
size: U,
|
|
7734
7735
|
params: {
|
|
7735
|
-
...
|
|
7736
|
+
...H,
|
|
7736
7737
|
mode: "rays",
|
|
7737
7738
|
count: 28,
|
|
7738
7739
|
shape: "wedge",
|
|
@@ -7752,9 +7753,9 @@ var Qi = {
|
|
|
7752
7753
|
style: "radialArray",
|
|
7753
7754
|
label: "Method",
|
|
7754
7755
|
ref: "circles/method",
|
|
7755
|
-
size:
|
|
7756
|
+
size: U,
|
|
7756
7757
|
params: {
|
|
7757
|
-
...
|
|
7758
|
+
...H,
|
|
7758
7759
|
mode: "rays",
|
|
7759
7760
|
count: 2,
|
|
7760
7761
|
shape: "bar",
|
|
@@ -7779,9 +7780,9 @@ var Qi = {
|
|
|
7779
7780
|
style: "radialArray",
|
|
7780
7781
|
label: "Orbit",
|
|
7781
7782
|
ref: "circles/orbit",
|
|
7782
|
-
size:
|
|
7783
|
+
size: U,
|
|
7783
7784
|
params: {
|
|
7784
|
-
...
|
|
7785
|
+
...H,
|
|
7785
7786
|
mode: "rings",
|
|
7786
7787
|
count: 1,
|
|
7787
7788
|
r1A: .8,
|
|
@@ -7800,9 +7801,9 @@ var Qi = {
|
|
|
7800
7801
|
style: "radialArray",
|
|
7801
7802
|
label: "Radial",
|
|
7802
7803
|
ref: "circles/radial",
|
|
7803
|
-
size:
|
|
7804
|
+
size: U,
|
|
7804
7805
|
params: {
|
|
7805
|
-
...
|
|
7806
|
+
...H,
|
|
7806
7807
|
mode: "rays",
|
|
7807
7808
|
count: 6,
|
|
7808
7809
|
shape: "bar",
|
|
@@ -7822,9 +7823,9 @@ var Qi = {
|
|
|
7822
7823
|
style: "radialArray",
|
|
7823
7824
|
label: "Radiation",
|
|
7824
7825
|
ref: "circles/radiation",
|
|
7825
|
-
size:
|
|
7826
|
+
size: ea,
|
|
7826
7827
|
params: {
|
|
7827
|
-
...
|
|
7828
|
+
...H,
|
|
7828
7829
|
mode: "rings",
|
|
7829
7830
|
count: 8,
|
|
7830
7831
|
cx: 1.887,
|
|
@@ -7842,9 +7843,9 @@ var Qi = {
|
|
|
7842
7843
|
style: "radialArray",
|
|
7843
7844
|
label: "Ring",
|
|
7844
7845
|
ref: "circles/ring",
|
|
7845
|
-
size:
|
|
7846
|
+
size: U,
|
|
7846
7847
|
params: {
|
|
7847
|
-
...
|
|
7848
|
+
...H,
|
|
7848
7849
|
mode: "rays",
|
|
7849
7850
|
count: 80,
|
|
7850
7851
|
shape: "spike",
|
|
@@ -7864,9 +7865,9 @@ var Qi = {
|
|
|
7864
7865
|
style: "radialArray",
|
|
7865
7866
|
label: "Sunburst",
|
|
7866
7867
|
ref: "circles/sunburst",
|
|
7867
|
-
size:
|
|
7868
|
+
size: U,
|
|
7868
7869
|
params: {
|
|
7869
|
-
...
|
|
7870
|
+
...H,
|
|
7870
7871
|
mode: "rays",
|
|
7871
7872
|
count: 80,
|
|
7872
7873
|
shape: "spike",
|
|
@@ -7888,7 +7889,7 @@ var Qi = {
|
|
|
7888
7889
|
ref: "data/afterimage",
|
|
7889
7890
|
size: W,
|
|
7890
7891
|
params: {
|
|
7891
|
-
...
|
|
7892
|
+
...H,
|
|
7892
7893
|
set: "|",
|
|
7893
7894
|
pick: "field",
|
|
7894
7895
|
cols: 90,
|
|
@@ -7917,7 +7918,7 @@ var Qi = {
|
|
|
7917
7918
|
ref: "data/carrier",
|
|
7918
7919
|
size: W,
|
|
7919
7920
|
params: {
|
|
7920
|
-
...
|
|
7921
|
+
...H,
|
|
7921
7922
|
set: ".|",
|
|
7922
7923
|
pick: "field",
|
|
7923
7924
|
cols: 83,
|
|
@@ -7954,7 +7955,7 @@ var Qi = {
|
|
|
7954
7955
|
ref: "data/dropout",
|
|
7955
7956
|
size: W,
|
|
7956
7957
|
params: {
|
|
7957
|
-
...
|
|
7958
|
+
...H,
|
|
7958
7959
|
set: "|#",
|
|
7959
7960
|
pick: "field",
|
|
7960
7961
|
cols: 60,
|
|
@@ -7975,7 +7976,7 @@ var Qi = {
|
|
|
7975
7976
|
ref: "data/handshake",
|
|
7976
7977
|
size: W,
|
|
7977
7978
|
params: {
|
|
7978
|
-
...
|
|
7979
|
+
...H,
|
|
7979
7980
|
set: "|",
|
|
7980
7981
|
pick: "row",
|
|
7981
7982
|
cols: 40,
|
|
@@ -7994,7 +7995,7 @@ var Qi = {
|
|
|
7994
7995
|
ref: "data/switchboard",
|
|
7995
7996
|
size: W,
|
|
7996
7997
|
params: {
|
|
7997
|
-
...
|
|
7998
|
+
...H,
|
|
7998
7999
|
set: "#/^.o-x[|",
|
|
7999
8000
|
pick: "row",
|
|
8000
8001
|
cols: 26,
|
|
@@ -8012,7 +8013,7 @@ var Qi = {
|
|
|
8012
8013
|
ref: "data/syncopation",
|
|
8013
8014
|
size: W,
|
|
8014
8015
|
params: {
|
|
8015
|
-
...
|
|
8016
|
+
...H,
|
|
8016
8017
|
set: "|.-xo",
|
|
8017
8018
|
pick: "random",
|
|
8018
8019
|
cols: 26,
|
|
@@ -8030,9 +8031,9 @@ var Qi = {
|
|
|
8030
8031
|
style: "symbolGrid",
|
|
8031
8032
|
label: "Test",
|
|
8032
8033
|
ref: "data/test",
|
|
8033
|
-
size:
|
|
8034
|
+
size: U,
|
|
8034
8035
|
params: {
|
|
8035
|
-
...
|
|
8036
|
+
...H,
|
|
8036
8037
|
plot: !0,
|
|
8037
8038
|
cols: 55,
|
|
8038
8039
|
rows: 47,
|
|
@@ -8064,9 +8065,9 @@ var Qi = {
|
|
|
8064
8065
|
style: "tiling",
|
|
8065
8066
|
label: "Bricks",
|
|
8066
8067
|
ref: "patterns/bricks",
|
|
8067
|
-
size:
|
|
8068
|
+
size: U,
|
|
8068
8069
|
params: {
|
|
8069
|
-
...
|
|
8070
|
+
...H,
|
|
8070
8071
|
layout: "bricks",
|
|
8071
8072
|
cols: 4,
|
|
8072
8073
|
rows: 6,
|
|
@@ -8084,9 +8085,9 @@ var Qi = {
|
|
|
8084
8085
|
style: "tiling",
|
|
8085
8086
|
label: "Chessboard",
|
|
8086
8087
|
ref: "patterns/chessboard",
|
|
8087
|
-
size:
|
|
8088
|
+
size: U,
|
|
8088
8089
|
params: {
|
|
8089
|
-
...
|
|
8090
|
+
...H,
|
|
8090
8091
|
layout: "checker",
|
|
8091
8092
|
cols: 8,
|
|
8092
8093
|
rows: 8,
|
|
@@ -8106,7 +8107,7 @@ var Qi = {
|
|
|
8106
8107
|
ref: "patterns/columns",
|
|
8107
8108
|
size: W,
|
|
8108
8109
|
params: {
|
|
8109
|
-
...
|
|
8110
|
+
...H,
|
|
8110
8111
|
layout: "columns",
|
|
8111
8112
|
shift: .24,
|
|
8112
8113
|
cols: 3,
|
|
@@ -8126,7 +8127,7 @@ var Qi = {
|
|
|
8126
8127
|
ref: "patterns/maze",
|
|
8127
8128
|
size: W,
|
|
8128
8129
|
params: {
|
|
8129
|
-
...
|
|
8130
|
+
...H,
|
|
8130
8131
|
layout: "maze",
|
|
8131
8132
|
cols: 1,
|
|
8132
8133
|
rows: 10,
|
|
@@ -8135,13 +8136,13 @@ var Qi = {
|
|
|
8135
8136
|
seed: 30
|
|
8136
8137
|
}
|
|
8137
8138
|
}
|
|
8138
|
-
],
|
|
8139
|
-
|
|
8139
|
+
], na = (e) => ta.find((t) => t.id === e).params;
|
|
8140
|
+
ta.push({
|
|
8140
8141
|
id: "eclipse-o",
|
|
8141
8142
|
style: "lineScreen",
|
|
8142
8143
|
label: "Eclipse on O",
|
|
8143
8144
|
params: {
|
|
8144
|
-
...
|
|
8145
|
+
...na("eclipse"),
|
|
8145
8146
|
mKind: "letter",
|
|
8146
8147
|
mChar: "O",
|
|
8147
8148
|
mCut: "base",
|
|
@@ -8153,7 +8154,7 @@ ea.push({
|
|
|
8153
8154
|
style: "dotScreen",
|
|
8154
8155
|
label: "Warp on S",
|
|
8155
8156
|
params: {
|
|
8156
|
-
...
|
|
8157
|
+
...na("warp"),
|
|
8157
8158
|
mKind: "letter",
|
|
8158
8159
|
mChar: "S",
|
|
8159
8160
|
mCut: "base",
|
|
@@ -8165,19 +8166,19 @@ ea.push({
|
|
|
8165
8166
|
style: "lineScreen",
|
|
8166
8167
|
label: "Confluence on A",
|
|
8167
8168
|
params: {
|
|
8168
|
-
...
|
|
8169
|
+
...na("confluence"),
|
|
8169
8170
|
mKind: "letter",
|
|
8170
8171
|
mChar: "A",
|
|
8171
8172
|
mCut: "Wide",
|
|
8172
8173
|
mWeight: 900,
|
|
8173
8174
|
mFit: .95
|
|
8174
8175
|
}
|
|
8175
|
-
}),
|
|
8176
|
+
}), ta.push({
|
|
8176
8177
|
id: "stipple-glow",
|
|
8177
8178
|
style: "stipple",
|
|
8178
8179
|
label: "Glow",
|
|
8179
8180
|
params: {
|
|
8180
|
-
...
|
|
8181
|
+
...H,
|
|
8181
8182
|
spacing: 7,
|
|
8182
8183
|
dot: .35,
|
|
8183
8184
|
fKind: "radial",
|
|
@@ -8190,7 +8191,7 @@ ea.push({
|
|
|
8190
8191
|
style: "mosaic",
|
|
8191
8192
|
label: "Hex",
|
|
8192
8193
|
params: {
|
|
8193
|
-
...
|
|
8194
|
+
...H,
|
|
8194
8195
|
tile: "hex",
|
|
8195
8196
|
cols: 36,
|
|
8196
8197
|
gap: .08,
|
|
@@ -8200,7 +8201,7 @@ ea.push({
|
|
|
8200
8201
|
});
|
|
8201
8202
|
//#endregion
|
|
8202
8203
|
//#region src/generate/index.js
|
|
8203
|
-
var
|
|
8204
|
+
var ra = [
|
|
8204
8205
|
di,
|
|
8205
8206
|
fi,
|
|
8206
8207
|
Yi,
|
|
@@ -8210,7 +8211,7 @@ var na = [
|
|
|
8210
8211
|
Ni,
|
|
8211
8212
|
Qi,
|
|
8212
8213
|
$i
|
|
8213
|
-
],
|
|
8214
|
+
], ia = (e) => ra.find((t) => t.id === e) ?? ra[0], aa = [
|
|
8214
8215
|
{
|
|
8215
8216
|
key: "jPos",
|
|
8216
8217
|
label: "Jitter position",
|
|
@@ -8254,14 +8255,14 @@ var na = [
|
|
|
8254
8255
|
default: 1,
|
|
8255
8256
|
section: "Randomness"
|
|
8256
8257
|
}
|
|
8257
|
-
],
|
|
8258
|
+
], oa = (e, t) => {
|
|
8258
8259
|
let n = Math.imul(e + 1, 2654435761) ^ Math.imul(t + 11, 374761393);
|
|
8259
8260
|
return n = Math.imul(n ^ n >>> 15, 2246822519), n ^= n >>> 13, (n >>> 0) / 4294967296;
|
|
8260
8261
|
};
|
|
8261
|
-
function
|
|
8262
|
+
function sa(e, t) {
|
|
8262
8263
|
let n = t.jPos ?? 0, r = t.jSize ?? 0, i = t.jDrop ?? 0, a = t.jSeed ?? 1;
|
|
8263
8264
|
if (!n && !r && !i) return e;
|
|
8264
|
-
let o = 0, s = (e) => [(
|
|
8265
|
+
let o = 0, s = (e) => [(oa(e * 3, a) * 2 - 1) * n, (oa(e * 3 + 1, a) * 2 - 1) * n], c = (e) => 1 + (oa(e * 3 + 2, a) * 2 - 1) * r, l = (e) => oa(e * 7 + 5, a) >= i, u = (e, t) => {
|
|
8265
8266
|
let [n, r] = s(t), i = c(t), a = 0, o = 0;
|
|
8266
8267
|
for (let t of e) a += t[0], o += t[1];
|
|
8267
8268
|
return a /= e.length, o /= e.length, e.map(([e, t]) => [a + (e - a) * i + n, o + (t - o) * i + r]);
|
|
@@ -8283,7 +8284,7 @@ function oa(e, t) {
|
|
|
8283
8284
|
];
|
|
8284
8285
|
}), e;
|
|
8285
8286
|
}
|
|
8286
|
-
function
|
|
8287
|
+
function ca(e, t, n, r) {
|
|
8287
8288
|
if (!t.repOn) return e;
|
|
8288
8289
|
let i = m(t, {
|
|
8289
8290
|
x: 0,
|
|
@@ -8315,7 +8316,7 @@ function sa(e, t, n, r) {
|
|
|
8315
8316
|
}
|
|
8316
8317
|
return a;
|
|
8317
8318
|
}
|
|
8318
|
-
var
|
|
8319
|
+
var la = [
|
|
8319
8320
|
{
|
|
8320
8321
|
key: "inset",
|
|
8321
8322
|
label: "Inset",
|
|
@@ -8341,21 +8342,21 @@ var ca = [
|
|
|
8341
8342
|
default: "#000000",
|
|
8342
8343
|
section: "Frame"
|
|
8343
8344
|
}
|
|
8344
|
-
],
|
|
8345
|
+
], ua = (e) => e.map((e) => ({
|
|
8345
8346
|
...e,
|
|
8346
8347
|
collapsed: !0
|
|
8347
8348
|
}));
|
|
8348
|
-
function
|
|
8349
|
-
let t =
|
|
8349
|
+
function da(e) {
|
|
8350
|
+
let t = ia(e);
|
|
8350
8351
|
return [
|
|
8351
8352
|
...t.schema,
|
|
8352
8353
|
...t.sampled ? [
|
|
8353
8354
|
...ci,
|
|
8354
8355
|
...li,
|
|
8355
|
-
...t.warp === !1 ? [] :
|
|
8356
|
+
...t.warp === !1 ? [] : ua(ui)
|
|
8356
8357
|
] : [],
|
|
8357
|
-
...
|
|
8358
|
-
...
|
|
8358
|
+
...ua(aa),
|
|
8359
|
+
...ua([
|
|
8359
8360
|
{
|
|
8360
8361
|
key: "repOn",
|
|
8361
8362
|
label: "Repeat",
|
|
@@ -8390,21 +8391,21 @@ function ua(e) {
|
|
|
8390
8391
|
...e,
|
|
8391
8392
|
section: "Repeat"
|
|
8392
8393
|
}))),
|
|
8393
|
-
...la
|
|
8394
|
+
...ua(la)
|
|
8394
8395
|
];
|
|
8395
8396
|
}
|
|
8396
|
-
function
|
|
8397
|
-
let n = Object.fromEntries(
|
|
8397
|
+
function fa(e, t) {
|
|
8398
|
+
let n = Object.fromEntries(da(e).filter((e) => e.default !== void 0).map((e) => [e.key, e.default])), r = t ? ta.find((e) => e.id === t) : null;
|
|
8398
8399
|
return {
|
|
8399
8400
|
...n,
|
|
8400
8401
|
...r?.params ?? {},
|
|
8401
8402
|
genStyle: e,
|
|
8402
8403
|
genPreset: r?.id ?? null,
|
|
8403
|
-
genLabel: r?.label ??
|
|
8404
|
+
genLabel: r?.label ?? ia(e).label
|
|
8404
8405
|
};
|
|
8405
8406
|
}
|
|
8406
|
-
var
|
|
8407
|
-
function
|
|
8407
|
+
var pa = (e) => ta.filter((t) => t.style === e);
|
|
8408
|
+
function ma(e, t, n) {
|
|
8408
8409
|
let r = Math.max(0, Math.min(e.inset ?? 0, Math.min(t, n) / 2 - 1));
|
|
8409
8410
|
return {
|
|
8410
8411
|
x: r,
|
|
@@ -8413,17 +8414,17 @@ function pa(e, t, n) {
|
|
|
8413
8414
|
h: n - 2 * r
|
|
8414
8415
|
};
|
|
8415
8416
|
}
|
|
8416
|
-
function
|
|
8417
|
-
let a =
|
|
8417
|
+
function ha(e, t, n, { rings: r = null, image: i = null } = {}) {
|
|
8418
|
+
let a = ia(e.genStyle), o = oe(), s = ma(e, t, n);
|
|
8418
8419
|
if (s.w <= 1 || s.h <= 1) return o;
|
|
8419
8420
|
let c = s.w / s.h, l = { aspect: c };
|
|
8420
|
-
return a.sampled && (l.field = Qr(e, c, i), l.mask = ni(e, c, r), l.warp = a.warp === !1 ? null : ri(e, c, l.field)), a.draw(o, e, s, l), sa(
|
|
8421
|
+
return a.sampled && (l.field = Qr(e, c, i), l.mask = ni(e, c, r), l.warp = a.warp === !1 ? null : ri(e, c, l.field)), a.draw(o, e, s, l), ca(sa(o, e), e, t, n);
|
|
8421
8422
|
}
|
|
8422
8423
|
//#endregion
|
|
8423
8424
|
//#region src/editor/generate/generateCore.js
|
|
8424
|
-
var
|
|
8425
|
-
function
|
|
8426
|
-
let t =
|
|
8425
|
+
var ga = /* @__PURE__ */ new Map(), _a = /* @__PURE__ */ new Map();
|
|
8426
|
+
function va(e) {
|
|
8427
|
+
let t = da(e.genStyle).map((e) => e.key);
|
|
8427
8428
|
return JSON.stringify([
|
|
8428
8429
|
e.genStyle,
|
|
8429
8430
|
Math.round(e.w ?? 0),
|
|
@@ -8431,19 +8432,19 @@ function _a(e) {
|
|
|
8431
8432
|
t.map((t) => e[t])
|
|
8432
8433
|
]);
|
|
8433
8434
|
}
|
|
8434
|
-
function
|
|
8435
|
-
return
|
|
8435
|
+
function ya(e, t = ga.get(e.id) ?? null, n = _a.get(e.id) ?? null) {
|
|
8436
|
+
return ha(e, e.w ?? 0, e.h ?? 0, {
|
|
8436
8437
|
rings: t,
|
|
8437
8438
|
image: n
|
|
8438
8439
|
});
|
|
8439
8440
|
}
|
|
8440
|
-
function
|
|
8441
|
-
let r = e.w ?? 0, i = e.h ?? 0, a = t.bg ? `<rect width="${r}" height="${i}" fill="${t.bg}"/>` : "", o =
|
|
8441
|
+
function ba(e, t, n = ya(e)) {
|
|
8442
|
+
let r = e.w ?? 0, i = e.h ?? 0, a = t.bg ? `<rect width="${r}" height="${i}" fill="${t.bg}"/>` : "", o = de(n);
|
|
8442
8443
|
return a + (o ? `<path d="${o}" fill="${t.ink ?? "#FFFFFF"}"/>` : "");
|
|
8443
8444
|
}
|
|
8444
8445
|
//#endregion
|
|
8445
8446
|
//#region src/editor/generate/rings.js
|
|
8446
|
-
function
|
|
8447
|
+
function xa(e) {
|
|
8447
8448
|
if (!e) return null;
|
|
8448
8449
|
let t = e.x ?? 0, n = e.y ?? 0, r = (e) => e.map((e) => e.map(([e, r]) => [e + t, r + n]));
|
|
8449
8450
|
if (e.type === "shape") return r(Ii(v(e) || "", 8));
|
|
@@ -8452,30 +8453,30 @@ function ba(e) {
|
|
|
8452
8453
|
let r = { ...Bi };
|
|
8453
8454
|
for (let t of Object.keys(Bi)) e[t] != null && typeof e[t] != "object" && (r[t] = e[t]);
|
|
8454
8455
|
let i = [];
|
|
8455
|
-
for (let a of
|
|
8456
|
+
for (let a of Ue(r, Math.max(1, e.w ?? 480), Math.max(1, e.h ?? 480))) for (let e of a.g.paths) for (let r of Ii(e.d, 6)) i.push(r.map(([e, r]) => [t + a.tx + e * a.s, n + a.ty - r * a.s]));
|
|
8456
8457
|
return i;
|
|
8457
8458
|
}
|
|
8458
8459
|
return null;
|
|
8459
8460
|
}
|
|
8460
|
-
function
|
|
8461
|
+
function Sa(e, t) {
|
|
8461
8462
|
if (!e?.length) return null;
|
|
8462
|
-
let n =
|
|
8463
|
+
let n = ma(t, t.w ?? 0, t.h ?? 0), r = (t.x ?? 0) + n.x, i = (t.y ?? 0) + n.y;
|
|
8463
8464
|
return e.map((e) => e.map(([e, t]) => [(e - r) / n.w, (t - i) / n.h]));
|
|
8464
8465
|
}
|
|
8465
|
-
function
|
|
8466
|
+
function Ca(e, t, n = .9) {
|
|
8466
8467
|
if (!e?.length) return null;
|
|
8467
|
-
let r =
|
|
8468
|
+
let r = ma(t, t.w ?? 0, t.h ?? 0), i = Li(e), a = Math.min(r.w * n / (i.w || 1), r.h * n / (i.h || 1));
|
|
8468
8469
|
return e.map((e) => e.map(([e, t]) => [(r.w / 2 + (e - i.x - i.w / 2) * a) / r.w, (r.h / 2 + (t - i.y - i.h / 2) * a) / r.h]));
|
|
8469
8470
|
}
|
|
8470
|
-
async function
|
|
8471
|
+
async function wa(e, t = "base", n = 700) {
|
|
8471
8472
|
return Ii((await p(t, n, !1)).getPath(e || "A", 0, 0, 1e3).toPathData(2), 8);
|
|
8472
8473
|
}
|
|
8473
|
-
function
|
|
8474
|
-
let { layers: t } = l(), n = e.mKind, [r, i] =
|
|
8474
|
+
function Ta(e) {
|
|
8475
|
+
let { layers: t } = l(), n = e.mKind, [r, i] = N(null), a = e.mChar, o = e.mCut, s = e.mWeight;
|
|
8475
8476
|
$t(() => {
|
|
8476
8477
|
if (n !== "letter") return;
|
|
8477
8478
|
let e = !0;
|
|
8478
|
-
return
|
|
8479
|
+
return wa(a, o, s).then((t) => {
|
|
8479
8480
|
e && i(t);
|
|
8480
8481
|
}).catch(() => {
|
|
8481
8482
|
e && i(null);
|
|
@@ -8495,7 +8496,7 @@ function wa(e) {
|
|
|
8495
8496
|
e.h,
|
|
8496
8497
|
e.inset
|
|
8497
8498
|
], d = e.mFit ?? .9;
|
|
8498
|
-
return tn(() => n === "letter" ?
|
|
8499
|
+
return tn(() => n === "letter" ? Ca(r, e, d) : n === "layer" ? Sa(xa(c), e) : null, [
|
|
8499
8500
|
n,
|
|
8500
8501
|
r,
|
|
8501
8502
|
c,
|
|
@@ -8505,8 +8506,8 @@ function wa(e) {
|
|
|
8505
8506
|
}
|
|
8506
8507
|
//#endregion
|
|
8507
8508
|
//#region src/editor/generate/useGenerateFont.js
|
|
8508
|
-
function
|
|
8509
|
-
let t = e.genStyle === "ascii" ? e.font ?? "pixel" : null, [n, r] =
|
|
8509
|
+
function Ea(e) {
|
|
8510
|
+
let t = e.genStyle === "ascii" ? e.font ?? "pixel" : null, [n, r] = N(0);
|
|
8510
8511
|
return $t(() => {
|
|
8511
8512
|
if (!t || t === "pixel" || Wi(t)) return;
|
|
8512
8513
|
let [, e, n] = t.split("-"), i = !0;
|
|
@@ -8519,9 +8520,9 @@ function Ta(e) {
|
|
|
8519
8520
|
}
|
|
8520
8521
|
//#endregion
|
|
8521
8522
|
//#region src/editor/generate/useGenerateImage.js
|
|
8522
|
-
var
|
|
8523
|
-
function
|
|
8524
|
-
return
|
|
8523
|
+
var Da = /* @__PURE__ */ new Map();
|
|
8524
|
+
function Oa(e) {
|
|
8525
|
+
return Da.has(e) ? Promise.resolve(Da.get(e)) : new Promise((t, n) => {
|
|
8525
8526
|
let r = new Image();
|
|
8526
8527
|
r.crossOrigin = "anonymous", r.onload = () => {
|
|
8527
8528
|
let n = Math.min(1, 512 / Math.max(r.naturalWidth, r.naturalHeight)), i = Math.max(1, Math.round(r.naturalWidth * n)), a = Math.max(1, Math.round(r.naturalHeight * n)), o = document.createElement("canvas");
|
|
@@ -8537,12 +8538,12 @@ function Da(e) {
|
|
|
8537
8538
|
nw: r.naturalWidth,
|
|
8538
8539
|
nh: r.naturalHeight
|
|
8539
8540
|
};
|
|
8540
|
-
|
|
8541
|
+
Da.set(e, u), t(u);
|
|
8541
8542
|
}, r.onerror = n, r.src = e;
|
|
8542
8543
|
});
|
|
8543
8544
|
}
|
|
8544
|
-
function
|
|
8545
|
-
let r =
|
|
8545
|
+
function ka(e, t, n) {
|
|
8546
|
+
let r = ma(e, e.w ?? 0, e.h ?? 0), i = (e.x ?? 0) + r.x, a = (e.y ?? 0) + r.y, o, s, c, l;
|
|
8546
8547
|
if (t.imgW != null) o = t.imgX ?? 0, s = t.imgY ?? 0, c = t.imgW, l = t.imgH;
|
|
8547
8548
|
else {
|
|
8548
8549
|
let e = Math.max(t.w / n.nw, t.h / n.nh);
|
|
@@ -8553,22 +8554,22 @@ function Oa(e, t, n) {
|
|
|
8553
8554
|
return d < 0 || d >= 1 || f < 0 || f >= 1 ? 0 : n.data[Math.floor(f * n.h) * n.w + Math.floor(d * n.w)];
|
|
8554
8555
|
};
|
|
8555
8556
|
}
|
|
8556
|
-
function
|
|
8557
|
-
let { layers: t } = l(), n = (e.fKind === "image" || e.gKind === "image") && e.fImgLayer ? g(t, e.fImgLayer) : null, r = n?.type === "photo" ? n.src : null, [i, a] =
|
|
8557
|
+
function Aa(e) {
|
|
8558
|
+
let { layers: t } = l(), n = (e.fKind === "image" || e.gKind === "image") && e.fImgLayer ? g(t, e.fImgLayer) : null, r = n?.type === "photo" ? n.src : null, [i, a] = N(null);
|
|
8558
8559
|
return $t(() => {
|
|
8559
8560
|
if (!r) {
|
|
8560
8561
|
a(null);
|
|
8561
8562
|
return;
|
|
8562
8563
|
}
|
|
8563
8564
|
let e = !0;
|
|
8564
|
-
return
|
|
8565
|
+
return Oa(r).then((t) => {
|
|
8565
8566
|
e && a(t);
|
|
8566
8567
|
}).catch(() => {
|
|
8567
8568
|
e && a(null);
|
|
8568
8569
|
}), () => {
|
|
8569
8570
|
e = !1;
|
|
8570
8571
|
};
|
|
8571
|
-
}, [r]), tn(() => n && i ?
|
|
8572
|
+
}, [r]), tn(() => n && i ? ka(e, n, i) : null, [
|
|
8572
8573
|
n,
|
|
8573
8574
|
i,
|
|
8574
8575
|
e.x,
|
|
@@ -8580,14 +8581,14 @@ function ka(e) {
|
|
|
8580
8581
|
}
|
|
8581
8582
|
//#endregion
|
|
8582
8583
|
//#region src/editor/generate/GenerateLayer.jsx
|
|
8583
|
-
function
|
|
8584
|
-
let r =
|
|
8585
|
-
|
|
8584
|
+
function ja({ layer: e, palette: t, layerStyle: n }) {
|
|
8585
|
+
let r = Ta(e), i = Ea(e), a = Aa(e), o = tn(() => (ga.set(e.id, r), _a.set(e.id, a), de(ya(e, r, a))), [
|
|
8586
|
+
va(e),
|
|
8586
8587
|
r,
|
|
8587
8588
|
i,
|
|
8588
8589
|
a
|
|
8589
|
-
]), s =
|
|
8590
|
-
return /* @__PURE__ */
|
|
8590
|
+
]), s = ue(e.color, t) ?? "#FFFFFF", c = e.bg == null ? null : ue(e.bg, t), l = Math.max(1, e.w ?? 1), u = Math.max(1, e.h ?? 1);
|
|
8591
|
+
return /* @__PURE__ */ I("svg", {
|
|
8591
8592
|
"data-layer-id": e.id,
|
|
8592
8593
|
width: l,
|
|
8593
8594
|
height: u,
|
|
@@ -8600,11 +8601,11 @@ function Aa({ layer: e, palette: t, layerStyle: n }) {
|
|
|
8600
8601
|
cursor: "move",
|
|
8601
8602
|
...n
|
|
8602
8603
|
},
|
|
8603
|
-
children: [c && /* @__PURE__ */
|
|
8604
|
+
children: [c && /* @__PURE__ */ F("rect", {
|
|
8604
8605
|
width: l,
|
|
8605
8606
|
height: u,
|
|
8606
8607
|
fill: c
|
|
8607
|
-
}), o && /* @__PURE__ */
|
|
8608
|
+
}), o && /* @__PURE__ */ F("path", {
|
|
8608
8609
|
d: o,
|
|
8609
8610
|
fill: s
|
|
8610
8611
|
})]
|
|
@@ -8612,7 +8613,7 @@ function Aa({ layer: e, palette: t, layerStyle: n }) {
|
|
|
8612
8613
|
}
|
|
8613
8614
|
//#endregion
|
|
8614
8615
|
//#region src/editor/generate/windows.js
|
|
8615
|
-
var
|
|
8616
|
+
var Ma = (...e) => e.map((e) => typeof e == "string" ? {
|
|
8616
8617
|
value: e.toLowerCase(),
|
|
8617
8618
|
label: e
|
|
8618
8619
|
} : e), G = (e) => (t, n = {}, r = {}) => ({
|
|
@@ -8626,27 +8627,27 @@ var ja = (...e) => e.map((e) => typeof e == "string" ? {
|
|
|
8626
8627
|
max: n,
|
|
8627
8628
|
step: r.step ?? (n - t <= 4 ? .01 : 1),
|
|
8628
8629
|
def: r.def ?? t
|
|
8629
|
-
}, r),
|
|
8630
|
+
}, r), Na = (e, t, n, r = {}) => G("range")(e, {
|
|
8630
8631
|
min: t,
|
|
8631
8632
|
max: n,
|
|
8632
8633
|
step: r.step ?? .01,
|
|
8633
8634
|
def: r.def ?? [t, n]
|
|
8634
8635
|
}, r), q = (e, t, n = {}) => G("segmented")(e, {
|
|
8635
|
-
options:
|
|
8636
|
-
def: n.def ??
|
|
8636
|
+
options: Ma(...t),
|
|
8637
|
+
def: n.def ?? Ma(...t)[0].value
|
|
8637
8638
|
}, n), J = (e, t, n = {}) => G("select")(e, {
|
|
8638
|
-
options:
|
|
8639
|
-
def: n.def ??
|
|
8640
|
-
}, n),
|
|
8639
|
+
options: Ma(...t),
|
|
8640
|
+
def: n.def ?? Ma(...t)[0].value
|
|
8641
|
+
}, n), Pa = (e, t = {}) => G("toggle")(e, { def: t.def ?? !1 }, t), Fa = (e, t, n, r = {}) => G("point")(e, {
|
|
8641
8642
|
min: t,
|
|
8642
8643
|
max: n,
|
|
8643
8644
|
def: r.def ?? [.5, .5]
|
|
8644
|
-
}, r),
|
|
8645
|
+
}, r), Ia = (e, t = {}) => G("color")(e, { def: t.def ?? "#e8e4dc" }, t), La = (e, t = {}) => G("text")(e, { def: t.def ?? "" }, t), Ra = (e, t = {}) => G("button")(e, {}, t), za = (e, t = {}) => G("picker")(e, { def: null }, t), Ba = (e, t = {}) => G("lights")(e, { def: t.def ?? [{
|
|
8645
8646
|
x: .35,
|
|
8646
8647
|
y: .4,
|
|
8647
8648
|
radius: .3,
|
|
8648
8649
|
intensity: 1
|
|
8649
|
-
}] }, t),
|
|
8650
|
+
}] }, t), Va = Ma("Linear", "Ease", "In", "Out", "Hump", "Dip", "Wave", "Sine", "Bell", "Last"), Ha = Ma("Linear", "Ease", "In", "Out", "Hump", {
|
|
8650
8651
|
value: "alt",
|
|
8651
8652
|
label: "Alternate"
|
|
8652
8653
|
}), Y = (e, t, n, r = {}) => G("ramp")(e, {
|
|
@@ -8657,10 +8658,10 @@ var ja = (...e) => e.map((e) => typeof e == "string" ? {
|
|
|
8657
8658
|
b: n,
|
|
8658
8659
|
curve: "linear"
|
|
8659
8660
|
}
|
|
8660
|
-
}, r), X = (e) => `${Math.round(e * 100)}%`,
|
|
8661
|
+
}, r), X = (e) => `${Math.round(e * 100)}%`, Ua = (e) => (t) => Number(t).toFixed(e), Wa = (e) => `${Math.round(e)}°`, Z = (e) => `${Math.round(e)} px`, Q = (e, t = (e) => e, n = (e) => e) => ({
|
|
8661
8662
|
get: (t) => t[e] === void 0 ? void 0 : n(t[e], t),
|
|
8662
8663
|
set: (n, r) => ({ [e]: t(n, r) })
|
|
8663
|
-
}),
|
|
8664
|
+
}), Ga = (e, t) => ({
|
|
8664
8665
|
get: (n) => n[e] === void 0 ? void 0 : [n[e], n[t]],
|
|
8665
8666
|
set: (n) => ({
|
|
8666
8667
|
[e]: n[0],
|
|
@@ -8677,7 +8678,7 @@ var ja = (...e) => e.map((e) => typeof e == "string" ? {
|
|
|
8677
8678
|
[`${e}B`]: t.b,
|
|
8678
8679
|
[`${e}C`]: t.curve
|
|
8679
8680
|
})
|
|
8680
|
-
}),
|
|
8681
|
+
}), Ka = (e, t) => Q(e, (e) => (t.find(([t]) => t === e) ?? [e, e])[1], (e) => (t.find(([, t]) => t === e) ?? [e])[0]), qa = [
|
|
8681
8682
|
["line screen", "lineScreen"],
|
|
8682
8683
|
["dot screen", "dotScreen"],
|
|
8683
8684
|
["ascii", "ascii"],
|
|
@@ -8686,7 +8687,7 @@ var ja = (...e) => e.map((e) => typeof e == "string" ? {
|
|
|
8686
8687
|
["tiling", "tiling"],
|
|
8687
8688
|
["stipple", "stipple"],
|
|
8688
8689
|
["stipple", "mosaic"]
|
|
8689
|
-
],
|
|
8690
|
+
], Ja = (e) => (qa.find(([t]) => t === e) ?? qa[3])[1], Ya = (e) => (qa.find(([, t]) => t === e) ?? qa[3])[0], Xa = (e, t = pa(e)[0]?.id ?? null) => fa(e, t), Za = (e) => e.genStyle === "mosaic", Qa = 1080, $a = [
|
|
8690
8691
|
{
|
|
8691
8692
|
value: "line screen",
|
|
8692
8693
|
label: "Line Screen"
|
|
@@ -8715,20 +8716,20 @@ var ja = (...e) => e.map((e) => typeof e == "string" ? {
|
|
|
8715
8716
|
value: "stipple",
|
|
8716
8717
|
label: "Stipple / Mosaic"
|
|
8717
8718
|
}
|
|
8718
|
-
],
|
|
8719
|
+
], eo = Ma("Linear", "Radial", "Conic", "Diamond", "Ellipse", "Blob", "Lights", "Sine", "Ridge", "Waves", "Noise", "Ribbon", "Image"), to = {
|
|
8719
8720
|
key: "field",
|
|
8720
8721
|
label: "Field",
|
|
8721
|
-
state: (e) =>
|
|
8722
|
+
state: (e) => eo.find((t) => t.value === e.fKind)?.label ?? "—",
|
|
8722
8723
|
groups: [
|
|
8723
8724
|
{
|
|
8724
8725
|
title: "Source",
|
|
8725
8726
|
note: "The gradient the style reads",
|
|
8726
8727
|
controls: [
|
|
8727
|
-
J("Type",
|
|
8728
|
+
J("Type", eo, {
|
|
8728
8729
|
def: "radial",
|
|
8729
8730
|
bind: Q("fKind")
|
|
8730
8731
|
}),
|
|
8731
|
-
|
|
8732
|
+
Fa("Centre", -.5, 1.5, { bind: Ga("fX", "fY") }),
|
|
8732
8733
|
K("Radius X", .02, 2, {
|
|
8733
8734
|
def: .6,
|
|
8734
8735
|
bind: Q("fRx")
|
|
@@ -8739,7 +8740,7 @@ var ja = (...e) => e.map((e) => typeof e == "string" ? {
|
|
|
8739
8740
|
}),
|
|
8740
8741
|
K("Angle", -180, 180, {
|
|
8741
8742
|
def: 0,
|
|
8742
|
-
format:
|
|
8743
|
+
format: Wa,
|
|
8743
8744
|
id: "field-angle",
|
|
8744
8745
|
bind: Q("fAngle")
|
|
8745
8746
|
}),
|
|
@@ -8755,7 +8756,7 @@ var ja = (...e) => e.map((e) => typeof e == "string" ? {
|
|
|
8755
8756
|
}),
|
|
8756
8757
|
K("Phase", -180, 180, {
|
|
8757
8758
|
def: 0,
|
|
8758
|
-
format:
|
|
8759
|
+
format: Wa,
|
|
8759
8760
|
bind: Q("fPhase")
|
|
8760
8761
|
}),
|
|
8761
8762
|
K("Bend", -2, 2, {
|
|
@@ -8782,7 +8783,7 @@ var ja = (...e) => e.map((e) => typeof e == "string" ? {
|
|
|
8782
8783
|
{
|
|
8783
8784
|
title: "Lights",
|
|
8784
8785
|
note: "Points of light",
|
|
8785
|
-
controls: [
|
|
8786
|
+
controls: [Ba("Lights", { bind: {
|
|
8786
8787
|
get: (e) => e.fLightN === void 0 ? void 0 : Array.from({ length: Math.max(1, Math.min(8, e.fLightN)) }, (t, n) => ({
|
|
8787
8788
|
x: e[`fL${n + 1}x`] ?? .5,
|
|
8788
8789
|
y: e[`fL${n + 1}y`] ?? .5,
|
|
@@ -8800,12 +8801,12 @@ var ja = (...e) => e.map((e) => typeof e == "string" ? {
|
|
|
8800
8801
|
{
|
|
8801
8802
|
title: "Image",
|
|
8802
8803
|
note: "A photo layer as the field",
|
|
8803
|
-
controls: [
|
|
8804
|
+
controls: [za("Photo layer", {
|
|
8804
8805
|
bind: Q("fImgLayer", (e) => e || null),
|
|
8805
8806
|
kinds: ["photo"]
|
|
8806
|
-
}),
|
|
8807
|
+
}), Na("Levels", 0, 1, {
|
|
8807
8808
|
def: [0, 1],
|
|
8808
|
-
format:
|
|
8809
|
+
format: Ua(2),
|
|
8809
8810
|
bind: {
|
|
8810
8811
|
get: (e) => [e.fLo ?? 0, e.fHi ?? 1],
|
|
8811
8812
|
set: (e) => ({
|
|
@@ -8820,7 +8821,7 @@ var ja = (...e) => e.map((e) => typeof e == "string" ? {
|
|
|
8820
8821
|
title: "Second source",
|
|
8821
8822
|
note: "Combined with the first",
|
|
8822
8823
|
controls: [
|
|
8823
|
-
J("Type", ["None",
|
|
8824
|
+
J("Type", ["None", ...eo], {
|
|
8824
8825
|
id: "second-type",
|
|
8825
8826
|
def: "none",
|
|
8826
8827
|
bind: Q("gKind")
|
|
@@ -8832,7 +8833,7 @@ var ja = (...e) => e.map((e) => typeof e == "string" ? {
|
|
|
8832
8833
|
"Multiply",
|
|
8833
8834
|
"Screen",
|
|
8834
8835
|
"Difference"
|
|
8835
|
-
], { bind:
|
|
8836
|
+
], { bind: Ka("fOp", [["difference", "diff"]]) }),
|
|
8836
8837
|
K("Weight", 0, 1, {
|
|
8837
8838
|
def: .5,
|
|
8838
8839
|
format: X,
|
|
@@ -8844,7 +8845,7 @@ var ja = (...e) => e.map((e) => typeof e == "string" ? {
|
|
|
8844
8845
|
]
|
|
8845
8846
|
}
|
|
8846
8847
|
]
|
|
8847
|
-
},
|
|
8848
|
+
}, no = {
|
|
8848
8849
|
key: "ramp",
|
|
8849
8850
|
label: "Ramp",
|
|
8850
8851
|
state: (e) => e.fSteps > 1 ? `${e.fSteps} steps` : "Continuous",
|
|
@@ -8852,11 +8853,11 @@ var ja = (...e) => e.map((e) => typeof e == "string" ? {
|
|
|
8852
8853
|
title: "Ramp",
|
|
8853
8854
|
note: "Shapes the gradient",
|
|
8854
8855
|
controls: [
|
|
8855
|
-
|
|
8856
|
+
Na("From / To", 0, 1, {
|
|
8856
8857
|
def: [0, 1],
|
|
8857
|
-
format:
|
|
8858
|
+
format: Ua(2),
|
|
8858
8859
|
id: "from-to",
|
|
8859
|
-
bind:
|
|
8860
|
+
bind: Ga("fFrom", "fTo")
|
|
8860
8861
|
}),
|
|
8861
8862
|
K("Contrast", .2, 4, {
|
|
8862
8863
|
def: 1,
|
|
@@ -8872,7 +8873,7 @@ var ja = (...e) => e.map((e) => typeof e == "string" ? {
|
|
|
8872
8873
|
format: (e) => e > 1 ? String(e) : "Smooth",
|
|
8873
8874
|
bind: Q("fSteps", (e) => e > 1 ? e : 0, (e) => e > 1 ? e : 1)
|
|
8874
8875
|
}),
|
|
8875
|
-
|
|
8876
|
+
Pa("Invert", { bind: Q("fInvert") }),
|
|
8876
8877
|
K("Split at", 0, 1, {
|
|
8877
8878
|
def: 0,
|
|
8878
8879
|
format: (e) => e ? X(e) : "Off",
|
|
@@ -8880,7 +8881,7 @@ var ja = (...e) => e.map((e) => typeof e == "string" ? {
|
|
|
8880
8881
|
})
|
|
8881
8882
|
]
|
|
8882
8883
|
}]
|
|
8883
|
-
},
|
|
8884
|
+
}, ro = [
|
|
8884
8885
|
["compressed", "Tight"],
|
|
8885
8886
|
["condensed", "Compact"],
|
|
8886
8887
|
["narrow", "Narrow"],
|
|
@@ -8888,7 +8889,7 @@ var ja = (...e) => e.map((e) => typeof e == "string" ? {
|
|
|
8888
8889
|
["wide", "Wide"],
|
|
8889
8890
|
["extended", "Spatial"],
|
|
8890
8891
|
["expanded", "Tall"]
|
|
8891
|
-
],
|
|
8892
|
+
], io = [
|
|
8892
8893
|
["fine", 100],
|
|
8893
8894
|
["thin", 100],
|
|
8894
8895
|
["light", 300],
|
|
@@ -8896,27 +8897,27 @@ var ja = (...e) => e.map((e) => typeof e == "string" ? {
|
|
|
8896
8897
|
["medium", 500],
|
|
8897
8898
|
["bold", 700],
|
|
8898
8899
|
["black", 900]
|
|
8899
|
-
],
|
|
8900
|
+
], ao = {
|
|
8900
8901
|
key: "mask",
|
|
8901
8902
|
label: "Mask",
|
|
8902
|
-
state: (e) =>
|
|
8903
|
+
state: (e) => so.find((t) => t.value === (e.mKind === "layer" ? "linked" : e.mKind))?.label ?? "None",
|
|
8903
8904
|
groups: [
|
|
8904
8905
|
{
|
|
8905
8906
|
title: "Shape",
|
|
8906
8907
|
note: "Where the style draws",
|
|
8907
8908
|
controls: [
|
|
8908
|
-
J("Shape",
|
|
8909
|
+
J("Shape", oo(), {
|
|
8909
8910
|
def: "none",
|
|
8910
|
-
bind:
|
|
8911
|
+
bind: Ka("mKind", [["linked", "layer"]])
|
|
8911
8912
|
}),
|
|
8912
8913
|
K("Size", .2, 1.5, {
|
|
8913
8914
|
def: 1,
|
|
8914
8915
|
bind: Q("mSize")
|
|
8915
8916
|
}),
|
|
8916
|
-
|
|
8917
|
-
|
|
8917
|
+
Fa("Rect position", 0, 1, { bind: Ga("mX", "mY") }),
|
|
8918
|
+
Fa("Rect size", 0, 1, {
|
|
8918
8919
|
def: [1, 1],
|
|
8919
|
-
bind:
|
|
8920
|
+
bind: Ga("mW", "mH")
|
|
8920
8921
|
}),
|
|
8921
8922
|
K("Waist", 0, .5, {
|
|
8922
8923
|
def: .2,
|
|
@@ -8928,7 +8929,7 @@ var ja = (...e) => e.map((e) => typeof e == "string" ? {
|
|
|
8928
8929
|
title: "Letter",
|
|
8929
8930
|
note: "One character as the mask",
|
|
8930
8931
|
controls: [
|
|
8931
|
-
|
|
8932
|
+
La("Letter", {
|
|
8932
8933
|
def: "A",
|
|
8933
8934
|
bind: Q("mChar", (e) => [...String(e ?? "")].slice(-1).join("") || "A")
|
|
8934
8935
|
}),
|
|
@@ -8942,7 +8943,7 @@ var ja = (...e) => e.map((e) => typeof e == "string" ? {
|
|
|
8942
8943
|
"Expanded"
|
|
8943
8944
|
], {
|
|
8944
8945
|
def: "normal",
|
|
8945
|
-
bind:
|
|
8946
|
+
bind: Ka("mCut", ro)
|
|
8946
8947
|
}),
|
|
8947
8948
|
J("Weight", [
|
|
8948
8949
|
"Fine",
|
|
@@ -8956,8 +8957,8 @@ var ja = (...e) => e.map((e) => typeof e == "string" ? {
|
|
|
8956
8957
|
def: "regular",
|
|
8957
8958
|
id: "letter-weight",
|
|
8958
8959
|
bind: {
|
|
8959
|
-
get: (e) => e.mWeight === void 0 ? void 0 : (
|
|
8960
|
-
set: (e) => ({ mWeight: (
|
|
8960
|
+
get: (e) => e.mWeight === void 0 ? void 0 : (io.find(([, t]) => t === Number(e.mWeight)) ?? ["bold"])[0],
|
|
8961
|
+
set: (e) => ({ mWeight: (io.find(([t]) => t === e) ?? [0, 700])[1] })
|
|
8961
8962
|
}
|
|
8962
8963
|
}),
|
|
8963
8964
|
K("Fit", .2, 1.2, {
|
|
@@ -8969,21 +8970,21 @@ var ja = (...e) => e.map((e) => typeof e == "string" ? {
|
|
|
8969
8970
|
},
|
|
8970
8971
|
{
|
|
8971
8972
|
title: "Linked layer",
|
|
8972
|
-
controls: [
|
|
8973
|
+
controls: [za("Linked layer", {
|
|
8973
8974
|
bind: Q("mLayer", (e) => e || null),
|
|
8974
8975
|
kinds: [
|
|
8975
8976
|
"shape",
|
|
8976
8977
|
"path",
|
|
8977
8978
|
"misc"
|
|
8978
8979
|
]
|
|
8979
|
-
}),
|
|
8980
|
+
}), Ra("Letter…", {
|
|
8980
8981
|
id: "open-type-window",
|
|
8981
8982
|
act: "open-type"
|
|
8982
8983
|
})]
|
|
8983
8984
|
}
|
|
8984
8985
|
]
|
|
8985
8986
|
};
|
|
8986
|
-
function
|
|
8987
|
+
function oo() {
|
|
8987
8988
|
return [
|
|
8988
8989
|
"None",
|
|
8989
8990
|
"Rect",
|
|
@@ -9000,10 +9001,10 @@ function ao() {
|
|
|
9000
9001
|
}
|
|
9001
9002
|
];
|
|
9002
9003
|
}
|
|
9003
|
-
var
|
|
9004
|
+
var so = Ma(...oo()), co = Ma("None", "Pinch", "Bulge", "Wave", "Swirl", "Noise", "Flow"), lo = {
|
|
9004
9005
|
key: "warp",
|
|
9005
9006
|
label: "Warp",
|
|
9006
|
-
state: (e) => !e.wKind || e.wKind === "none" ? "Off" :
|
|
9007
|
+
state: (e) => !e.wKind || e.wKind === "none" ? "Off" : co.find((t) => t.value === e.wKind)?.label ?? e.wKind,
|
|
9007
9008
|
groups: [{
|
|
9008
9009
|
title: "Warp",
|
|
9009
9010
|
note: "Bends the grid or the field",
|
|
@@ -9021,7 +9022,7 @@ var oo = ja(...ao()), so = ja("None", "Pinch", "Bulge", "Wave", "Swirl", "Noise"
|
|
|
9021
9022
|
bind: Q("wKind")
|
|
9022
9023
|
}),
|
|
9023
9024
|
q("Bends", ["Grid", "Field"], { bind: Q("wTarget") }),
|
|
9024
|
-
|
|
9025
|
+
Pa("Pin edges", { bind: Q("wPin") }),
|
|
9025
9026
|
K("Amount", -1, 1, {
|
|
9026
9027
|
def: .2,
|
|
9027
9028
|
id: "warp-amount",
|
|
@@ -9033,7 +9034,7 @@ var oo = ja(...ao()), so = ja("None", "Pinch", "Bulge", "Wave", "Swirl", "Noise"
|
|
|
9033
9034
|
step: .05,
|
|
9034
9035
|
bind: Q("wFreq")
|
|
9035
9036
|
}),
|
|
9036
|
-
|
|
9037
|
+
Fa("Centre", 0, 1, {
|
|
9037
9038
|
id: "warp-centre",
|
|
9038
9039
|
bind: {
|
|
9039
9040
|
get: (e) => [e.wX ?? .5, e.wY ?? .5],
|
|
@@ -9045,7 +9046,7 @@ var oo = ja(...ao()), so = ja("None", "Pinch", "Bulge", "Wave", "Swirl", "Noise"
|
|
|
9045
9046
|
})
|
|
9046
9047
|
]
|
|
9047
9048
|
}]
|
|
9048
|
-
},
|
|
9049
|
+
}, uo = {
|
|
9049
9050
|
key: "random",
|
|
9050
9051
|
label: "Randomness",
|
|
9051
9052
|
state: (e) => e.jPos || e.jSize || e.jDrop ? "On" : "Off",
|
|
@@ -9076,7 +9077,7 @@ var oo = ja(...ao()), so = ja("None", "Pinch", "Bulge", "Wave", "Swirl", "Noise"
|
|
|
9076
9077
|
})
|
|
9077
9078
|
]
|
|
9078
9079
|
}]
|
|
9079
|
-
},
|
|
9080
|
+
}, fo = {
|
|
9080
9081
|
key: "frame",
|
|
9081
9082
|
label: "Frame",
|
|
9082
9083
|
state: (e) => e.inset ? `${e.inset} px inset` : "Full bleed",
|
|
@@ -9089,26 +9090,26 @@ var oo = ja(...ao()), so = ja("None", "Pinch", "Bulge", "Wave", "Swirl", "Noise"
|
|
|
9089
9090
|
format: Z,
|
|
9090
9091
|
bind: Q("inset")
|
|
9091
9092
|
}),
|
|
9092
|
-
|
|
9093
|
+
Ia("Ink", {
|
|
9093
9094
|
def: "#FFFFFF",
|
|
9094
9095
|
bind: Q("color")
|
|
9095
9096
|
}),
|
|
9096
|
-
|
|
9097
|
+
Ia("Ground", {
|
|
9097
9098
|
def: "#000000",
|
|
9098
9099
|
bind: Q("bg", (e) => e || null, (e) => e ?? "")
|
|
9099
9100
|
})
|
|
9100
9101
|
]
|
|
9101
9102
|
}]
|
|
9102
|
-
},
|
|
9103
|
+
}, po = {
|
|
9103
9104
|
to: (e) => .2 * 20 ** (1 - e),
|
|
9104
9105
|
from: (e) => 1 - Math.log((e ?? 1) / .2) / Math.log(20)
|
|
9105
|
-
},
|
|
9106
|
+
}, mo = [
|
|
9106
9107
|
K("Density", 0, 1, {
|
|
9107
9108
|
def: .5,
|
|
9108
9109
|
format: X,
|
|
9109
9110
|
bind: {
|
|
9110
|
-
get: (e) =>
|
|
9111
|
-
set: (e, t) =>
|
|
9111
|
+
get: (e) => Za(e) ? ((e.cols ?? 40) - 3) / 157 : po.from(e.gamma),
|
|
9112
|
+
set: (e, t) => Za(t) ? { cols: Math.round(3 + e * 157) } : { gamma: Math.max(.2, Math.min(4, po.to(e))) }
|
|
9112
9113
|
}
|
|
9113
9114
|
}),
|
|
9114
9115
|
K("Min spacing", 2, 60, {
|
|
@@ -9116,16 +9117,16 @@ var oo = ja(...ao()), so = ja("None", "Pinch", "Bulge", "Wave", "Swirl", "Noise"
|
|
|
9116
9117
|
step: .5,
|
|
9117
9118
|
format: Z,
|
|
9118
9119
|
bind: {
|
|
9119
|
-
get: (e) =>
|
|
9120
|
-
set: (e, t) =>
|
|
9120
|
+
get: (e) => Za(e) ? Math.max(2, (e.gap ?? .08) * 100) : e.spacing,
|
|
9121
|
+
set: (e, t) => Za(t) ? { gap: Math.min(.6, e / 100) } : { spacing: e }
|
|
9121
9122
|
}
|
|
9122
9123
|
}),
|
|
9123
|
-
|
|
9124
|
+
Na("Dot size range", .05, 1, {
|
|
9124
9125
|
def: [.35, .35],
|
|
9125
|
-
format:
|
|
9126
|
+
format: Ua(2),
|
|
9126
9127
|
bind: {
|
|
9127
|
-
get: (e) =>
|
|
9128
|
-
set: (e, t) =>
|
|
9128
|
+
get: (e) => Za(e) ? [e.min ?? .05, 1] : [e.sizeBy ? (e.dot ?? .35) * .3 : e.dot ?? .35, e.dot ?? .35],
|
|
9129
|
+
set: (e, t) => Za(t) ? { min: e[0] } : {
|
|
9129
9130
|
dot: e[1],
|
|
9130
9131
|
sizeBy: e[0] < e[1] - .01
|
|
9131
9132
|
}
|
|
@@ -9136,9 +9137,9 @@ var oo = ja(...ao()), so = ja("None", "Pinch", "Bulge", "Wave", "Swirl", "Noise"
|
|
|
9136
9137
|
"Hex",
|
|
9137
9138
|
"Square"
|
|
9138
9139
|
], { bind: {
|
|
9139
|
-
get: (e) =>
|
|
9140
|
-
set: (e, t) => e === "none" ?
|
|
9141
|
-
...
|
|
9140
|
+
get: (e) => Za(e) ? e.tile ?? "hex" : "none",
|
|
9141
|
+
set: (e, t) => e === "none" ? Za(t) ? Xa("stipple") : {} : {
|
|
9142
|
+
...Za(t) ? {} : Xa("mosaic"),
|
|
9142
9143
|
tile: e
|
|
9143
9144
|
}
|
|
9144
9145
|
} }),
|
|
@@ -9147,7 +9148,7 @@ var oo = ja(...ao()), so = ja("None", "Pinch", "Bulge", "Wave", "Swirl", "Noise"
|
|
|
9147
9148
|
id: "stipple-seed",
|
|
9148
9149
|
bind: Q("seed")
|
|
9149
9150
|
})
|
|
9150
|
-
],
|
|
9151
|
+
], ho = {
|
|
9151
9152
|
"line screen": {
|
|
9152
9153
|
label: "Line Screen",
|
|
9153
9154
|
state: (e) => `${e.count} ${e.orient === "v" ? "columns" : "rows"}`,
|
|
@@ -9157,7 +9158,7 @@ var oo = ja(...ao()), so = ja("None", "Pinch", "Bulge", "Wave", "Swirl", "Noise"
|
|
|
9157
9158
|
controls: [
|
|
9158
9159
|
q("Rows / Columns", ["Rows", "Columns"], {
|
|
9159
9160
|
id: "orientation",
|
|
9160
|
-
bind:
|
|
9161
|
+
bind: Ka("orient", [["rows", "h"], ["columns", "v"]])
|
|
9161
9162
|
}),
|
|
9162
9163
|
K("Count", 2, 200, {
|
|
9163
9164
|
def: 48,
|
|
@@ -9179,7 +9180,7 @@ var oo = ja(...ao()), so = ja("None", "Pinch", "Bulge", "Wave", "Swirl", "Noise"
|
|
|
9179
9180
|
def: 0,
|
|
9180
9181
|
bind: Q("cut")
|
|
9181
9182
|
}),
|
|
9182
|
-
q("Edge", ["Stepped", "Tapered"], { bind:
|
|
9183
|
+
q("Edge", ["Stepped", "Tapered"], { bind: Ka("edge", [["stepped", "step"], ["tapered", "taper"]]) }),
|
|
9183
9184
|
K("Sample", .5, 40, {
|
|
9184
9185
|
def: 4,
|
|
9185
9186
|
step: .5,
|
|
@@ -9188,14 +9189,14 @@ var oo = ja(...ao()), so = ja("None", "Pinch", "Bulge", "Wave", "Swirl", "Noise"
|
|
|
9188
9189
|
}),
|
|
9189
9190
|
K("Angle", -90, 90, {
|
|
9190
9191
|
def: 0,
|
|
9191
|
-
format:
|
|
9192
|
+
format: Wa,
|
|
9192
9193
|
id: "line-angle"
|
|
9193
9194
|
}),
|
|
9194
9195
|
K("Smoothing", 0, 12, {
|
|
9195
9196
|
def: 0,
|
|
9196
9197
|
bind: Q("smooth")
|
|
9197
9198
|
}),
|
|
9198
|
-
|
|
9199
|
+
Pa("Round ends", { bind: Q("round") }),
|
|
9199
9200
|
Y("Flare", 0, 2, { def: {
|
|
9200
9201
|
a: 1,
|
|
9201
9202
|
b: 1,
|
|
@@ -9251,7 +9252,7 @@ var oo = ja(...ao()), so = ja("None", "Pinch", "Bulge", "Wave", "Swirl", "Noise"
|
|
|
9251
9252
|
format: (e) => `${e}×`,
|
|
9252
9253
|
bind: Q("stretch")
|
|
9253
9254
|
}),
|
|
9254
|
-
|
|
9255
|
+
Pa("Stagger", { bind: Q("stagger") })
|
|
9255
9256
|
]
|
|
9256
9257
|
}]
|
|
9257
9258
|
},
|
|
@@ -9265,7 +9266,7 @@ var oo = ja(...ao()), so = ja("None", "Pinch", "Bulge", "Wave", "Swirl", "Noise"
|
|
|
9265
9266
|
K("Cell size", 4, 64, {
|
|
9266
9267
|
def: 12,
|
|
9267
9268
|
format: Z,
|
|
9268
|
-
bind: Q("cols", (e) => Math.max(4, Math.min(240, Math.round(
|
|
9269
|
+
bind: Q("cols", (e) => Math.max(4, Math.min(240, Math.round(Qa / e))), (e) => Math.round(Qa / Math.max(1, e)))
|
|
9269
9270
|
}),
|
|
9270
9271
|
K("Cell aspect", .3, 2, {
|
|
9271
9272
|
def: .6,
|
|
@@ -9278,7 +9279,7 @@ var oo = ja(...ao()), so = ja("None", "Pinch", "Bulge", "Wave", "Swirl", "Noise"
|
|
|
9278
9279
|
},
|
|
9279
9280
|
"Mono",
|
|
9280
9281
|
"Pixel"
|
|
9281
|
-
], { bind:
|
|
9282
|
+
], { bind: Ka("font", [["grotesk", "rg-base-900"], ["pixel", "pixel"]]) }),
|
|
9282
9283
|
K("Glyph scale", .2, 2, {
|
|
9283
9284
|
def: 1,
|
|
9284
9285
|
bind: Q("scale")
|
|
@@ -9288,7 +9289,7 @@ var oo = ja(...ao()), so = ja("None", "Pinch", "Bulge", "Wave", "Swirl", "Noise"
|
|
|
9288
9289
|
title: "Ramp",
|
|
9289
9290
|
note: "Dark to light",
|
|
9290
9291
|
controls: [
|
|
9291
|
-
|
|
9292
|
+
La("Ramp", {
|
|
9292
9293
|
def: " .:-=+*#%@",
|
|
9293
9294
|
id: "ramp-text",
|
|
9294
9295
|
bind: {
|
|
@@ -9304,13 +9305,13 @@ var oo = ja(...ao()), so = ja("None", "Pinch", "Bulge", "Wave", "Swirl", "Noise"
|
|
|
9304
9305
|
"Blocks",
|
|
9305
9306
|
"Dense",
|
|
9306
9307
|
"Minimal"
|
|
9307
|
-
], { bind:
|
|
9308
|
+
], { bind: Ka("rampPreset", [
|
|
9308
9309
|
["standard", "classic"],
|
|
9309
9310
|
["blocks", "blocks"],
|
|
9310
9311
|
["dense", "data"],
|
|
9311
9312
|
["minimal", "dots"]
|
|
9312
9313
|
]) }),
|
|
9313
|
-
|
|
9314
|
+
Pa("Reverse ramp", { bind: Q("reverse") })
|
|
9314
9315
|
]
|
|
9315
9316
|
}]
|
|
9316
9317
|
},
|
|
@@ -9322,14 +9323,14 @@ var oo = ja(...ao()), so = ja("None", "Pinch", "Bulge", "Wave", "Swirl", "Noise"
|
|
|
9322
9323
|
title: "Layout",
|
|
9323
9324
|
note: "Placement and rhythm",
|
|
9324
9325
|
controls: [
|
|
9325
|
-
q("Direction", ["Rows", "Columns"], { bind:
|
|
9326
|
+
q("Direction", ["Rows", "Columns"], { bind: Ka("orient", [["rows", "h"], ["columns", "v"]]) }),
|
|
9326
9327
|
K("Count", 1, 120, {
|
|
9327
9328
|
def: 48,
|
|
9328
9329
|
bind: Q("count")
|
|
9329
9330
|
}),
|
|
9330
9331
|
K("Angle", -90, 90, {
|
|
9331
9332
|
def: 0,
|
|
9332
|
-
format:
|
|
9333
|
+
format: Wa,
|
|
9333
9334
|
bind: Q("angle")
|
|
9334
9335
|
}),
|
|
9335
9336
|
J("Spacing", [
|
|
@@ -9345,7 +9346,7 @@ var oo = ja(...ao()), so = ja("None", "Pinch", "Bulge", "Wave", "Swirl", "Noise"
|
|
|
9345
9346
|
K("Lead", .2, 60, {
|
|
9346
9347
|
def: .5,
|
|
9347
9348
|
step: .01,
|
|
9348
|
-
format:
|
|
9349
|
+
format: Ua(2),
|
|
9349
9350
|
bind: Q("lead")
|
|
9350
9351
|
})
|
|
9351
9352
|
]
|
|
@@ -9471,19 +9472,19 @@ var oo = ja(...ao()), so = ja("None", "Pinch", "Bulge", "Wave", "Swirl", "Noise"
|
|
|
9471
9472
|
id: "radial-count",
|
|
9472
9473
|
bind: Q("count")
|
|
9473
9474
|
}),
|
|
9474
|
-
|
|
9475
|
+
Fa("Centre", -2, 3, {
|
|
9475
9476
|
id: "radial-centre",
|
|
9476
|
-
bind:
|
|
9477
|
+
bind: Ga("cx", "cy")
|
|
9477
9478
|
}),
|
|
9478
9479
|
K("Start", -180, 180, {
|
|
9479
9480
|
def: -90,
|
|
9480
|
-
format:
|
|
9481
|
+
format: Wa,
|
|
9481
9482
|
id: "radial-start",
|
|
9482
9483
|
bind: Q("start")
|
|
9483
9484
|
}),
|
|
9484
9485
|
K("Span", 1, 360, {
|
|
9485
9486
|
def: 360,
|
|
9486
|
-
format:
|
|
9487
|
+
format: Wa,
|
|
9487
9488
|
id: "radial-span",
|
|
9488
9489
|
bind: Q("span")
|
|
9489
9490
|
}),
|
|
@@ -9506,7 +9507,7 @@ var oo = ja(...ao()), so = ja("None", "Pinch", "Bulge", "Wave", "Swirl", "Noise"
|
|
|
9506
9507
|
curve: "linear"
|
|
9507
9508
|
},
|
|
9508
9509
|
bind: $("r0"),
|
|
9509
|
-
curves:
|
|
9510
|
+
curves: Ha
|
|
9510
9511
|
}),
|
|
9511
9512
|
Y("Outer radius", 0, 12, {
|
|
9512
9513
|
def: {
|
|
@@ -9515,7 +9516,7 @@ var oo = ja(...ao()), so = ja("None", "Pinch", "Bulge", "Wave", "Swirl", "Noise"
|
|
|
9515
9516
|
curve: "linear"
|
|
9516
9517
|
},
|
|
9517
9518
|
bind: $("r1"),
|
|
9518
|
-
curves:
|
|
9519
|
+
curves: Ha
|
|
9519
9520
|
}),
|
|
9520
9521
|
Y("Width", 0, 1, {
|
|
9521
9522
|
def: {
|
|
@@ -9525,7 +9526,7 @@ var oo = ja(...ao()), so = ja("None", "Pinch", "Bulge", "Wave", "Swirl", "Noise"
|
|
|
9525
9526
|
},
|
|
9526
9527
|
id: "radial-width",
|
|
9527
9528
|
bind: $("w"),
|
|
9528
|
-
curves:
|
|
9529
|
+
curves: Ha
|
|
9529
9530
|
}),
|
|
9530
9531
|
Y("Turn", -180, 180, {
|
|
9531
9532
|
def: {
|
|
@@ -9534,7 +9535,7 @@ var oo = ja(...ao()), so = ja("None", "Pinch", "Bulge", "Wave", "Swirl", "Noise"
|
|
|
9534
9535
|
curve: "linear"
|
|
9535
9536
|
},
|
|
9536
9537
|
bind: $("rot"),
|
|
9537
|
-
curves:
|
|
9538
|
+
curves: Ha
|
|
9538
9539
|
})
|
|
9539
9540
|
]
|
|
9540
9541
|
},
|
|
@@ -9602,7 +9603,7 @@ var oo = ja(...ao()), so = ja("None", "Pinch", "Bulge", "Wave", "Swirl", "Noise"
|
|
|
9602
9603
|
format: X,
|
|
9603
9604
|
bind: Q("vary")
|
|
9604
9605
|
}),
|
|
9605
|
-
|
|
9606
|
+
Pa("Shift odd columns", { bind: Q("shift", (e) => e ? .5 : 0, (e) => e > 0) }),
|
|
9606
9607
|
J("Fill A", [
|
|
9607
9608
|
"Solid",
|
|
9608
9609
|
"Dots",
|
|
@@ -9612,7 +9613,7 @@ var oo = ja(...ao()), so = ja("None", "Pinch", "Bulge", "Wave", "Swirl", "Noise"
|
|
|
9612
9613
|
label: "Rows of lines"
|
|
9613
9614
|
},
|
|
9614
9615
|
"None"
|
|
9615
|
-
], { bind:
|
|
9616
|
+
], { bind: Ka("fillA", [["rows", "hlines"]]) }),
|
|
9616
9617
|
J("Fill B", [
|
|
9617
9618
|
"Solid",
|
|
9618
9619
|
"Dots",
|
|
@@ -9624,14 +9625,14 @@ var oo = ja(...ao()), so = ja("None", "Pinch", "Bulge", "Wave", "Swirl", "Noise"
|
|
|
9624
9625
|
"None"
|
|
9625
9626
|
], {
|
|
9626
9627
|
def: "dots",
|
|
9627
|
-
bind:
|
|
9628
|
+
bind: Ka("fillB", [["rows", "hlines"]])
|
|
9628
9629
|
}),
|
|
9629
9630
|
J("Alternate", [
|
|
9630
9631
|
"Checker",
|
|
9631
9632
|
"Row",
|
|
9632
9633
|
"Column",
|
|
9633
9634
|
"Random"
|
|
9634
|
-
], { bind:
|
|
9635
|
+
], { bind: Ka("alt", [["column", "col"]]) }),
|
|
9635
9636
|
K("Texture pitch", 2, 40, {
|
|
9636
9637
|
def: 8,
|
|
9637
9638
|
format: Z,
|
|
@@ -9659,81 +9660,81 @@ var oo = ja(...ao()), so = ja("None", "Pinch", "Bulge", "Wave", "Swirl", "Noise"
|
|
|
9659
9660
|
},
|
|
9660
9661
|
stipple: {
|
|
9661
9662
|
label: "Stipple / Mosaic",
|
|
9662
|
-
state: (e) =>
|
|
9663
|
+
state: (e) => Za(e) ? `${e.cols} columns` : `${e.spacing} px spacing`,
|
|
9663
9664
|
groups: [{
|
|
9664
9665
|
title: "Stipple",
|
|
9665
9666
|
note: "Dots by the field",
|
|
9666
|
-
controls:
|
|
9667
|
+
controls: mo
|
|
9667
9668
|
}]
|
|
9668
9669
|
}
|
|
9669
|
-
},
|
|
9670
|
+
}, go = { stripeArray: "Rows of bands whose width, gap and ends ramp from A to B." }, _o = {
|
|
9670
9671
|
id: "generate",
|
|
9671
9672
|
kind: "Generate",
|
|
9672
|
-
title: (e) =>
|
|
9673
|
-
init: () =>
|
|
9673
|
+
title: (e) => $a.find((t) => t.value === Ya(e.genStyle))?.label,
|
|
9674
|
+
init: () => Xa("stripeArray"),
|
|
9674
9675
|
header: [
|
|
9675
|
-
J("Style",
|
|
9676
|
+
J("Style", $a, {
|
|
9676
9677
|
def: "stripe array",
|
|
9677
9678
|
bind: {
|
|
9678
|
-
get: (e) =>
|
|
9679
|
-
set: (e) =>
|
|
9679
|
+
get: (e) => Ya(e.genStyle),
|
|
9680
|
+
set: (e) => Xa(Ja(e))
|
|
9680
9681
|
}
|
|
9681
9682
|
}),
|
|
9682
9683
|
J("Preset", ["Custom"], { def: "custom" }),
|
|
9683
|
-
|
|
9684
|
-
def:
|
|
9684
|
+
La("Description", {
|
|
9685
|
+
def: go.stripeArray,
|
|
9685
9686
|
bind: {
|
|
9686
|
-
get: (e) =>
|
|
9687
|
+
get: (e) => go[e.genStyle] ?? ia(e.genStyle).about,
|
|
9687
9688
|
set: () => ({})
|
|
9688
9689
|
}
|
|
9689
9690
|
}),
|
|
9690
|
-
|
|
9691
|
+
Ra("Expand", { act: "expand" })
|
|
9691
9692
|
],
|
|
9692
9693
|
sections: (e) => [
|
|
9693
|
-
eo,
|
|
9694
9694
|
to,
|
|
9695
|
+
no,
|
|
9695
9696
|
{
|
|
9696
9697
|
key: "style",
|
|
9697
|
-
...
|
|
9698
|
+
...ho[Ya(e.genStyle)]
|
|
9698
9699
|
},
|
|
9699
|
-
|
|
9700
|
-
co,
|
|
9700
|
+
ao,
|
|
9701
9701
|
lo,
|
|
9702
|
-
uo
|
|
9702
|
+
uo,
|
|
9703
|
+
fo
|
|
9703
9704
|
],
|
|
9704
9705
|
allSections: () => [
|
|
9705
|
-
eo,
|
|
9706
9706
|
to,
|
|
9707
|
-
|
|
9707
|
+
no,
|
|
9708
|
+
...Object.entries(ho).map(([e, t]) => ({
|
|
9708
9709
|
key: `style:${e}`,
|
|
9709
9710
|
...t
|
|
9710
9711
|
})),
|
|
9711
|
-
|
|
9712
|
-
co,
|
|
9712
|
+
ao,
|
|
9713
9713
|
lo,
|
|
9714
|
-
uo
|
|
9714
|
+
uo,
|
|
9715
|
+
fo
|
|
9715
9716
|
],
|
|
9716
9717
|
fieldMap: (e) => {
|
|
9717
9718
|
let t = e.fX ?? .5, n = e.fY ?? .5, r = e.fKind, i = "var(--kol-oq-16), var(--kol-fg-96), var(--kol-oq-16)";
|
|
9718
9719
|
return {
|
|
9719
9720
|
background: r === "linear" ? `linear-gradient(${90 + (e.fAngle ?? 0)}deg, var(--kol-oq-16), var(--kol-fg-96))` : r === "conic" ? `conic-gradient(from ${e.fAngle ?? 0}deg, ${i})` : r === "sine" || r === "waves" || r === "ridge" ? `repeating-linear-gradient(90deg, ${i} ${Math.max(4, 100 / (e.fFreq || 1))}%)` : `linear-gradient(90deg, var(--kol-oq-16) 0%, var(--kol-fg-96) ${t * 100}%, var(--kol-oq-16) 100%)`,
|
|
9720
|
-
left:
|
|
9721
|
+
left: eo.find((e) => e.value === r)?.label,
|
|
9721
9722
|
right: `Centre ${Number(t).toFixed(2)} / ${Number(n).toFixed(2)}`
|
|
9722
9723
|
};
|
|
9723
9724
|
}
|
|
9724
|
-
},
|
|
9725
|
+
}, vo = {
|
|
9725
9726
|
radial: "Radial",
|
|
9726
9727
|
grid: "Grid",
|
|
9727
9728
|
mirror: "Mirror"
|
|
9728
|
-
},
|
|
9729
|
+
}, yo = () => [
|
|
9729
9730
|
q("Mode", [
|
|
9730
9731
|
"Radial",
|
|
9731
9732
|
"Grid",
|
|
9732
9733
|
"Mirror"
|
|
9733
9734
|
], { bind: Q("repMode") }),
|
|
9734
|
-
|
|
9735
|
-
|
|
9736
|
-
],
|
|
9735
|
+
za("Source", { bind: Q("sourceId", (e) => e || null) }),
|
|
9736
|
+
Pa("Reverse overlap", { bind: Q("repReverse") })
|
|
9737
|
+
], bo = {
|
|
9737
9738
|
id: "repeat",
|
|
9738
9739
|
kind: "Repeat",
|
|
9739
9740
|
title: () => "Repeat",
|
|
@@ -9741,29 +9742,29 @@ var oo = ja(...ao()), so = ja("None", "Pinch", "Bulge", "Wave", "Swirl", "Noise"
|
|
|
9741
9742
|
...x,
|
|
9742
9743
|
sourceId: null
|
|
9743
9744
|
}),
|
|
9744
|
-
header: [
|
|
9745
|
+
header: [Ra("Expand", { act: "expand" })],
|
|
9745
9746
|
sections: (e) => [{
|
|
9746
9747
|
key: "common",
|
|
9747
9748
|
label: "Common",
|
|
9748
|
-
state: () =>
|
|
9749
|
+
state: () => vo[e.repMode ?? "radial"],
|
|
9749
9750
|
groups: [{
|
|
9750
9751
|
title: "Repeat",
|
|
9751
9752
|
note: "Copies of a linked layer",
|
|
9752
|
-
controls:
|
|
9753
|
+
controls: yo()
|
|
9753
9754
|
}]
|
|
9754
9755
|
}, {
|
|
9755
9756
|
key: "mode",
|
|
9756
|
-
...
|
|
9757
|
+
...xo[e.repMode ?? "radial"]
|
|
9757
9758
|
}],
|
|
9758
9759
|
allSections: () => [{
|
|
9759
9760
|
key: "common",
|
|
9760
9761
|
label: "Common",
|
|
9761
|
-
groups: [{ controls:
|
|
9762
|
-
}, ...Object.entries(
|
|
9762
|
+
groups: [{ controls: yo() }]
|
|
9763
|
+
}, ...Object.entries(xo).map(([e, t]) => ({
|
|
9763
9764
|
key: `mode:${e}`,
|
|
9764
9765
|
...t
|
|
9765
9766
|
}))]
|
|
9766
|
-
},
|
|
9767
|
+
}, xo = {
|
|
9767
9768
|
radial: {
|
|
9768
9769
|
label: "Radial",
|
|
9769
9770
|
state: (e) => `${e.repCount} copies`,
|
|
@@ -9784,18 +9785,18 @@ var oo = ja(...ao()), so = ja("None", "Pinch", "Bulge", "Wave", "Swirl", "Noise"
|
|
|
9784
9785
|
}),
|
|
9785
9786
|
K("Start angle", -180, 180, {
|
|
9786
9787
|
def: 90,
|
|
9787
|
-
format:
|
|
9788
|
+
format: Wa,
|
|
9788
9789
|
bind: Q("repPivotAngle")
|
|
9789
9790
|
}),
|
|
9790
9791
|
K("Span", 1, 360, {
|
|
9791
9792
|
def: 360,
|
|
9792
|
-
format:
|
|
9793
|
+
format: Wa,
|
|
9793
9794
|
id: "repeat-span",
|
|
9794
9795
|
bind: Q("repSpan")
|
|
9795
9796
|
}),
|
|
9796
9797
|
K("Rotate per step", -180, 180, {
|
|
9797
9798
|
def: 0,
|
|
9798
|
-
format:
|
|
9799
|
+
format: Wa,
|
|
9799
9800
|
bind: Q("repRotate")
|
|
9800
9801
|
}),
|
|
9801
9802
|
K("Scale per step", .5, 1.5, {
|
|
@@ -9804,7 +9805,7 @@ var oo = ja(...ao()), so = ja("None", "Pinch", "Bulge", "Wave", "Swirl", "Noise"
|
|
|
9804
9805
|
format: X,
|
|
9805
9806
|
bind: Q("repScale")
|
|
9806
9807
|
}),
|
|
9807
|
-
|
|
9808
|
+
Pa("Align to path")
|
|
9808
9809
|
]
|
|
9809
9810
|
}]
|
|
9810
9811
|
},
|
|
@@ -9847,7 +9848,7 @@ var oo = ja(...ao()), so = ja("None", "Pinch", "Bulge", "Wave", "Swirl", "Noise"
|
|
|
9847
9848
|
}),
|
|
9848
9849
|
K("Rotate per step", -180, 180, {
|
|
9849
9850
|
def: 0,
|
|
9850
|
-
format:
|
|
9851
|
+
format: Wa,
|
|
9851
9852
|
id: "grid-rotate",
|
|
9852
9853
|
bind: Q("repRotate")
|
|
9853
9854
|
}),
|
|
@@ -9870,18 +9871,18 @@ var oo = ja(...ao()), so = ja("None", "Pinch", "Bulge", "Wave", "Swirl", "Noise"
|
|
|
9870
9871
|
controls: [
|
|
9871
9872
|
K("Axis angle", -180, 180, {
|
|
9872
9873
|
def: 90,
|
|
9873
|
-
format:
|
|
9874
|
+
format: Wa,
|
|
9874
9875
|
bind: Q("repAxisAngle")
|
|
9875
9876
|
}),
|
|
9876
|
-
|
|
9877
|
+
Fa("Axis offset", -2e3, 2e3, {
|
|
9877
9878
|
def: [0, 0],
|
|
9878
|
-
bind:
|
|
9879
|
+
bind: Ga("repAxisX", "repAxisY")
|
|
9879
9880
|
}),
|
|
9880
|
-
|
|
9881
|
+
Pa("Point mirror", { bind: Q("repPoint") })
|
|
9881
9882
|
]
|
|
9882
9883
|
}]
|
|
9883
9884
|
}
|
|
9884
|
-
},
|
|
9885
|
+
}, So = [
|
|
9885
9886
|
"o",
|
|
9886
9887
|
"c",
|
|
9887
9888
|
"e",
|
|
@@ -9895,15 +9896,15 @@ var oo = ja(...ao()), so = ja("None", "Pinch", "Bulge", "Wave", "Swirl", "Noise"
|
|
|
9895
9896
|
"p",
|
|
9896
9897
|
"q",
|
|
9897
9898
|
"t"
|
|
9898
|
-
],
|
|
9899
|
+
], Co = {
|
|
9899
9900
|
id: "type",
|
|
9900
9901
|
kind: "Type",
|
|
9901
9902
|
title: () => "Paratype letter",
|
|
9902
9903
|
loop: "paratype-glyph",
|
|
9903
|
-
header: [
|
|
9904
|
-
sections: () =>
|
|
9905
|
-
allSections: () =>
|
|
9906
|
-
},
|
|
9904
|
+
header: [Ra("Expand", { act: "expand" })],
|
|
9905
|
+
sections: () => wo,
|
|
9906
|
+
allSections: () => wo
|
|
9907
|
+
}, wo = [
|
|
9907
9908
|
{
|
|
9908
9909
|
key: "glyph",
|
|
9909
9910
|
label: "Glyph",
|
|
@@ -9912,7 +9913,7 @@ var oo = ja(...ao()), so = ja("None", "Pinch", "Bulge", "Wave", "Swirl", "Noise"
|
|
|
9912
9913
|
title: "Glyph",
|
|
9913
9914
|
note: "The letter and its engine",
|
|
9914
9915
|
controls: [
|
|
9915
|
-
J("Glyph",
|
|
9916
|
+
J("Glyph", So.map((e) => ({
|
|
9916
9917
|
value: e,
|
|
9917
9918
|
label: e
|
|
9918
9919
|
})), {
|
|
@@ -10019,31 +10020,31 @@ var oo = ja(...ao()), so = ja("None", "Pinch", "Bulge", "Wave", "Swirl", "Noise"
|
|
|
10019
10020
|
]
|
|
10020
10021
|
}]
|
|
10021
10022
|
}
|
|
10022
|
-
],
|
|
10023
|
-
generate:
|
|
10024
|
-
repeat:
|
|
10025
|
-
type:
|
|
10026
|
-
},
|
|
10023
|
+
], To = {
|
|
10024
|
+
generate: _o,
|
|
10025
|
+
repeat: bo,
|
|
10026
|
+
type: Co
|
|
10027
|
+
}, Eo = (e, t) => {
|
|
10027
10028
|
let n = e.bind?.get(t);
|
|
10028
10029
|
return n === void 0 ? e.def : n;
|
|
10029
|
-
},
|
|
10030
|
+
}, Do = (e, t, n, r) => ({
|
|
10030
10031
|
...t.bind.set(n, r),
|
|
10031
10032
|
...e.id === "generate" && t.id !== "style" ? { genPreset: null } : {}
|
|
10032
|
-
}),
|
|
10033
|
+
}), Oo = (e) => !!(e.bind || e.act), ko = (e) => e.flatMap((e) => [e, ...e.children ? ko(e.children) : []]), Ao = {
|
|
10033
10034
|
photo: (e) => e.type === "photo",
|
|
10034
10035
|
shape: (e) => e.type === "shape",
|
|
10035
10036
|
path: (e) => e.type === "path",
|
|
10036
10037
|
misc: (e) => e.type === "misc" && e.loopId === "paratype-glyph"
|
|
10037
10038
|
};
|
|
10038
|
-
function
|
|
10039
|
-
let t =
|
|
10039
|
+
function jo(e) {
|
|
10040
|
+
let t = To[e], n = r("generators"), i = l(), a = () => n ? n.presetParams({
|
|
10040
10041
|
id: "type",
|
|
10041
10042
|
loop: t.loop,
|
|
10042
10043
|
params: {}
|
|
10043
|
-
}) : {}, { params: o, layerId: s, live: c } =
|
|
10044
|
+
}) : {}, { params: o, layerId: s, live: c } = at(e, t.init ?? a), u = (t) => dt(e, (e) => ({ params: t(e.params) })), d = (e) => (n) => u((r) => ({
|
|
10044
10045
|
...r,
|
|
10045
|
-
...
|
|
10046
|
-
})), f = t.sections(o), p =
|
|
10046
|
+
...Do(t, e, n, r)
|
|
10047
|
+
})), f = t.sections(o), p = ko(i.layers ?? []), m = (e) => e.name || e.genLabel || e.presetLabel || e.kind || e.type, h = (e) => p.filter((t) => t.type !== "background" && t.id !== s && (e.kinds ? e.kinds.some((e) => Ao[e]?.(t)) : t.type !== "repeat" && t.w != null)).map((e) => ({
|
|
10047
10048
|
value: e.id,
|
|
10048
10049
|
label: m(e)
|
|
10049
10050
|
}));
|
|
@@ -10062,11 +10063,11 @@ function Ao(e) {
|
|
|
10062
10063
|
let _ = e === "generate" ? [...o.genPreset ? [] : [{
|
|
10063
10064
|
value: "custom",
|
|
10064
10065
|
label: "Custom"
|
|
10065
|
-
}], ...
|
|
10066
|
+
}], ...pa(o.genStyle).map((e) => ({
|
|
10066
10067
|
value: e.id,
|
|
10067
10068
|
label: e.label
|
|
10068
10069
|
}))] : null, v = (e) => {
|
|
10069
|
-
e !== "custom" && u(() =>
|
|
10070
|
+
e !== "custom" && u(() => Xa(o.genStyle, e));
|
|
10070
10071
|
}, y = s ? g(i.layers ?? [], s) : null, b = e === "repeat" ? !!o.sourceId : e === "type" ? !!n : !0, x = () => {
|
|
10071
10072
|
if (!b) return null;
|
|
10072
10073
|
if (e === "type") {
|
|
@@ -10078,7 +10079,7 @@ function Ao(e) {
|
|
|
10078
10079
|
loopId: t.loop,
|
|
10079
10080
|
...o
|
|
10080
10081
|
});
|
|
10081
|
-
return
|
|
10082
|
+
return dt(e, { layerId: n }), n;
|
|
10082
10083
|
}
|
|
10083
10084
|
let n = e === "generate" ? "generate" : "repeat";
|
|
10084
10085
|
if (y?.type === n) return i.updateLayer(y.id, o), y.id;
|
|
@@ -10086,11 +10087,11 @@ function Ao(e) {
|
|
|
10086
10087
|
...o,
|
|
10087
10088
|
...e === "repeat" ? { name: "Repeat" } : {}
|
|
10088
10089
|
});
|
|
10089
|
-
return
|
|
10090
|
+
return dt(e, { layerId: r }), r;
|
|
10090
10091
|
}, S = () => {
|
|
10091
10092
|
let t = x();
|
|
10092
10093
|
t && setTimeout(() => {
|
|
10093
|
-
e === "generate" ? i.flattenGenerate(t) : e === "repeat" ? i.flattenRepeat(t) : i.flattenParatype(t),
|
|
10094
|
+
e === "generate" ? i.flattenGenerate(t) : e === "repeat" ? i.flattenRepeat(t) : i.flattenParatype(t), dt(e, { layerId: null });
|
|
10094
10095
|
}, 0);
|
|
10095
10096
|
};
|
|
10096
10097
|
return {
|
|
@@ -10108,21 +10109,21 @@ function Ao(e) {
|
|
|
10108
10109
|
apply: x,
|
|
10109
10110
|
expand: S,
|
|
10110
10111
|
run: (e) => {
|
|
10111
|
-
e === "expand" ? S() : e === "open-type" &&
|
|
10112
|
+
e === "expand" ? S() : e === "open-type" && lt("type");
|
|
10112
10113
|
},
|
|
10113
|
-
reset: () =>
|
|
10114
|
+
reset: () => dt(e, {
|
|
10114
10115
|
params: (t.init ?? a)(),
|
|
10115
10116
|
layerId: null
|
|
10116
10117
|
}),
|
|
10117
10118
|
live: c,
|
|
10118
|
-
setLive: (t) =>
|
|
10119
|
+
setLive: (t) => dt(e, { live: t }),
|
|
10119
10120
|
canApply: b,
|
|
10120
10121
|
target: y,
|
|
10121
|
-
valueOf: (e) =>
|
|
10122
|
-
isLive:
|
|
10122
|
+
valueOf: (e) => Eo(e, o),
|
|
10123
|
+
isLive: Oo
|
|
10123
10124
|
};
|
|
10124
10125
|
}
|
|
10125
|
-
function
|
|
10126
|
+
function Mo({ t: e, className: t = "" }) {
|
|
10126
10127
|
let { params: r, state: i, live: a } = e, o = n, s = Math.round(n / (i.canvasRatio || 1)), c = tn(() => ({
|
|
10127
10128
|
...r,
|
|
10128
10129
|
id: "__generator-preview",
|
|
@@ -10134,10 +10135,10 @@ function jo({ t: e, className: t = "" }) {
|
|
|
10134
10135
|
r,
|
|
10135
10136
|
o,
|
|
10136
10137
|
s
|
|
10137
|
-
]), l =
|
|
10138
|
+
]), l = Ta(c), u = Ea(c), d = Aa(c), f = nn(""), p = tn(() => {
|
|
10138
10139
|
if (!a) return f.current;
|
|
10139
10140
|
try {
|
|
10140
|
-
f.current =
|
|
10141
|
+
f.current = de(ha(c, o, s, {
|
|
10141
10142
|
rings: l,
|
|
10142
10143
|
image: d
|
|
10143
10144
|
}));
|
|
@@ -10151,23 +10152,23 @@ function jo({ t: e, className: t = "" }) {
|
|
|
10151
10152
|
a,
|
|
10152
10153
|
o,
|
|
10153
10154
|
s
|
|
10154
|
-
]), m =
|
|
10155
|
-
return /* @__PURE__ */
|
|
10155
|
+
]), m = ue(r.color, i.palette) ?? "#FFFFFF", h = r.bg == null ? null : ue(r.bg, i.palette);
|
|
10156
|
+
return /* @__PURE__ */ I("svg", {
|
|
10156
10157
|
viewBox: `0 0 ${o} ${s}`,
|
|
10157
10158
|
preserveAspectRatio: "xMidYMid meet",
|
|
10158
10159
|
className: t,
|
|
10159
10160
|
"data-preview": !0,
|
|
10160
|
-
children: [h && /* @__PURE__ */
|
|
10161
|
+
children: [h && /* @__PURE__ */ F("rect", {
|
|
10161
10162
|
width: o,
|
|
10162
10163
|
height: s,
|
|
10163
10164
|
fill: h
|
|
10164
|
-
}), p && /* @__PURE__ */
|
|
10165
|
+
}), p && /* @__PURE__ */ F("path", {
|
|
10165
10166
|
d: p,
|
|
10166
10167
|
fill: m
|
|
10167
10168
|
})]
|
|
10168
10169
|
});
|
|
10169
10170
|
}
|
|
10170
|
-
function
|
|
10171
|
+
function No({ t: e, className: t = "" }) {
|
|
10171
10172
|
let { params: n, state: r } = e, i = n.sourceId ? g(r.layers ?? [], n.sourceId) : null, a = i && i.w != null ? {
|
|
10172
10173
|
x: i.x ?? 0,
|
|
10173
10174
|
y: i.y ?? 0,
|
|
@@ -10185,34 +10186,34 @@ function Mo({ t: e, className: t = "" }) {
|
|
|
10185
10186
|
[a.x, a.y + a.h],
|
|
10186
10187
|
[a.x + a.w, a.y + a.h]
|
|
10187
10188
|
]) s.push([e[0] * t + e[2] * n + e[4], e[1] * t + e[3] * n + e[5]]);
|
|
10188
|
-
let c = s.map((e) => e[0]), l = s.map((e) => e[1]), u = Math.min(...c) - 24, d = Math.min(...l) - 24, f = Math.max(...c) - u + 24, p = Math.max(...l) - d + 24, h = Math.max(f, p) / 200, _ = /* @__PURE__ */
|
|
10189
|
+
let c = s.map((e) => e[0]), l = s.map((e) => e[1]), u = Math.min(...c) - 24, d = Math.min(...l) - 24, f = Math.max(...c) - u + 24, p = Math.max(...l) - d + 24, h = Math.max(f, p) / 200, _ = /* @__PURE__ */ F("rect", {
|
|
10189
10190
|
x: a.x,
|
|
10190
10191
|
y: a.y,
|
|
10191
10192
|
width: a.w,
|
|
10192
10193
|
height: a.h,
|
|
10193
10194
|
rx: a.w / 12
|
|
10194
10195
|
});
|
|
10195
|
-
return /* @__PURE__ */
|
|
10196
|
+
return /* @__PURE__ */ I("svg", {
|
|
10196
10197
|
viewBox: `${u} ${d} ${f} ${p}`,
|
|
10197
10198
|
preserveAspectRatio: "xMidYMid meet",
|
|
10198
10199
|
className: t,
|
|
10199
10200
|
"data-preview": !0,
|
|
10200
10201
|
"data-copies": o.length,
|
|
10201
|
-
children: [/* @__PURE__ */
|
|
10202
|
+
children: [/* @__PURE__ */ F("g", {
|
|
10202
10203
|
fill: "var(--kol-oq-16)",
|
|
10203
10204
|
stroke: "var(--kol-fg-64)",
|
|
10204
10205
|
strokeWidth: h,
|
|
10205
|
-
children: o.map((e, t) => /* @__PURE__ */
|
|
10206
|
+
children: o.map((e, t) => /* @__PURE__ */ F("g", {
|
|
10206
10207
|
transform: `matrix(${e.join(" ")})`,
|
|
10207
10208
|
children: _
|
|
10208
10209
|
}, t))
|
|
10209
|
-
}), /* @__PURE__ */
|
|
10210
|
+
}), /* @__PURE__ */ F("g", {
|
|
10210
10211
|
fill: "var(--kol-fg-96)",
|
|
10211
10212
|
children: _
|
|
10212
10213
|
})]
|
|
10213
10214
|
});
|
|
10214
10215
|
}
|
|
10215
|
-
function
|
|
10216
|
+
function Po({ t: e, size: t = 512, className: n = "" }) {
|
|
10216
10217
|
let r = nn(null), { gen: i, win: a, params: o, live: s } = e;
|
|
10217
10218
|
return $t(() => {
|
|
10218
10219
|
if (!s || !r.current || !i) return;
|
|
@@ -10227,7 +10228,7 @@ function No({ t: e, size: t = 512, className: n = "" }) {
|
|
|
10227
10228
|
s,
|
|
10228
10229
|
i,
|
|
10229
10230
|
t
|
|
10230
|
-
]), /* @__PURE__ */
|
|
10231
|
+
]), /* @__PURE__ */ F("canvas", {
|
|
10231
10232
|
ref: r,
|
|
10232
10233
|
width: t,
|
|
10233
10234
|
height: t,
|
|
@@ -10235,28 +10236,28 @@ function No({ t: e, size: t = 512, className: n = "" }) {
|
|
|
10235
10236
|
"data-preview": !0
|
|
10236
10237
|
});
|
|
10237
10238
|
}
|
|
10238
|
-
var
|
|
10239
|
+
var Fo = ({ t: e, className: t }) => e.id === "generate" ? /* @__PURE__ */ F(Mo, {
|
|
10239
10240
|
t: e,
|
|
10240
10241
|
className: t
|
|
10241
|
-
}) : e.id === "repeat" ? /* @__PURE__ */
|
|
10242
|
+
}) : e.id === "repeat" ? /* @__PURE__ */ F(No, {
|
|
10242
10243
|
t: e,
|
|
10243
10244
|
className: t
|
|
10244
|
-
}) : /* @__PURE__ */
|
|
10245
|
+
}) : /* @__PURE__ */ F(Po, {
|
|
10245
10246
|
t: e,
|
|
10246
10247
|
className: t
|
|
10247
|
-
}),
|
|
10248
|
+
}), Io = 384, Lo = {
|
|
10248
10249
|
Lights: "Lights / Point editor",
|
|
10249
10250
|
Image: "Image / Layer source"
|
|
10250
|
-
},
|
|
10251
|
-
function
|
|
10252
|
-
let [i, a] =
|
|
10253
|
-
return /* @__PURE__ */
|
|
10251
|
+
}, Ro = "[--kol-slider-float-run:var(--kol-accent-primary)]", zo = "h-7 !rounded-md";
|
|
10252
|
+
function Bo({ x: e, value: t, set: n, disabled: r }) {
|
|
10253
|
+
let [i, a] = N(null);
|
|
10254
|
+
return /* @__PURE__ */ F(Ct, {
|
|
10254
10255
|
variant: "float",
|
|
10255
10256
|
size: "sm",
|
|
10256
10257
|
value: i ?? (e.format ? e.format(t) : String(t)),
|
|
10257
10258
|
disabled: r,
|
|
10258
10259
|
"aria-label": `${e.name} value`,
|
|
10259
|
-
className: `w-[66px] shrink-0 !px-2 [&_input]:text-[11px] ${
|
|
10260
|
+
className: `w-[66px] shrink-0 !px-2 [&_input]:text-[11px] ${zo}`,
|
|
10260
10261
|
onFocus: () => a(String(t)),
|
|
10261
10262
|
onChange: (e) => a(e.target.value),
|
|
10262
10263
|
onBlur: () => {
|
|
@@ -10266,7 +10267,7 @@ function zo({ x: e, value: t, set: n, disabled: r }) {
|
|
|
10266
10267
|
onKeyDown: (e) => e.key === "Enter" && e.currentTarget.blur()
|
|
10267
10268
|
});
|
|
10268
10269
|
}
|
|
10269
|
-
var
|
|
10270
|
+
var Vo = (e, t, n, r, i) => /* @__PURE__ */ F(M, {
|
|
10270
10271
|
variant: "float",
|
|
10271
10272
|
size: "sm",
|
|
10272
10273
|
options: e,
|
|
@@ -10276,10 +10277,10 @@ var Bo = (e, t, n, r, i) => /* @__PURE__ */ P(j, {
|
|
|
10276
10277
|
disabled: i,
|
|
10277
10278
|
className: "w-full [&_.kol-dd-trigger]:w-full [&_.kol-dd-trigger]:!h-7 [&_.kol-dd-trigger]:justify-between [&_.kol-dd-trigger]:!text-[11px] [&_.kol-dd-trigger]:!font-normal"
|
|
10278
10279
|
});
|
|
10279
|
-
function
|
|
10280
|
+
function Ho({ x: e, t }) {
|
|
10280
10281
|
let n = t.valueOf(e), r = e.bind ? t.set(e) : () => {}, i = !t.isLive(e);
|
|
10281
10282
|
switch (e.type) {
|
|
10282
|
-
case "slider": return /* @__PURE__ */
|
|
10283
|
+
case "slider": return /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F(Gt, {
|
|
10283
10284
|
variant: "float",
|
|
10284
10285
|
readout: "none",
|
|
10285
10286
|
value: Number(n),
|
|
@@ -10290,13 +10291,13 @@ function Vo({ x: e, t }) {
|
|
|
10290
10291
|
disabled: i,
|
|
10291
10292
|
"aria-label": e.name,
|
|
10292
10293
|
className: "flex-1 min-w-0"
|
|
10293
|
-
}), /* @__PURE__ */
|
|
10294
|
+
}), /* @__PURE__ */ F(Bo, {
|
|
10294
10295
|
x: e,
|
|
10295
10296
|
value: n,
|
|
10296
10297
|
set: r,
|
|
10297
10298
|
disabled: i
|
|
10298
10299
|
})] });
|
|
10299
|
-
case "range": return /* @__PURE__ */
|
|
10300
|
+
case "range": return /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F(Gt, {
|
|
10300
10301
|
variant: "dual",
|
|
10301
10302
|
value: n[0],
|
|
10302
10303
|
value2: n[1],
|
|
@@ -10310,7 +10311,7 @@ function Vo({ x: e, t }) {
|
|
|
10310
10311
|
onChange: (e) => r([Math.min(e, n[1]), n[1]]),
|
|
10311
10312
|
onChange2: (e) => r([n[0], Math.max(e, n[0])]),
|
|
10312
10313
|
className: "flex-1 min-w-0"
|
|
10313
|
-
}), /* @__PURE__ */
|
|
10314
|
+
}), /* @__PURE__ */ I("span", {
|
|
10314
10315
|
className: "kol-float-timecode text-fg-emphasis w-[66px] shrink-0 text-right text-[11px]",
|
|
10315
10316
|
children: [
|
|
10316
10317
|
(e.format ?? String)(n[0]),
|
|
@@ -10318,21 +10319,21 @@ function Vo({ x: e, t }) {
|
|
|
10318
10319
|
(e.format ?? String)(n[1])
|
|
10319
10320
|
]
|
|
10320
10321
|
})] });
|
|
10321
|
-
case "point": return ["X", "Y"].map((t, a) => /* @__PURE__ */
|
|
10322
|
+
case "point": return ["X", "Y"].map((t, a) => /* @__PURE__ */ F(Ct, {
|
|
10322
10323
|
variant: "float",
|
|
10323
10324
|
size: "sm",
|
|
10324
10325
|
prefix: t,
|
|
10325
10326
|
disabled: i,
|
|
10326
10327
|
"aria-label": `${e.name} ${t}`,
|
|
10327
|
-
className: `flex-1 min-w-0 ${
|
|
10328
|
+
className: `flex-1 min-w-0 ${zo}`,
|
|
10328
10329
|
value: Number(n[a]).toFixed(Math.abs(e.max) > 10 ? 0 : 2),
|
|
10329
10330
|
onChange: (e) => {
|
|
10330
10331
|
let t = parseFloat(e.target.value);
|
|
10331
10332
|
Number.isFinite(t) && r(a ? [n[0], t] : [t, n[1]]);
|
|
10332
10333
|
}
|
|
10333
10334
|
}, t));
|
|
10334
|
-
case "select": return
|
|
10335
|
-
case "segmented": return /* @__PURE__ */
|
|
10335
|
+
case "select": return Vo(e.options, n, r, e.name, i);
|
|
10336
|
+
case "segmented": return /* @__PURE__ */ F(qt, {
|
|
10336
10337
|
variant: "float",
|
|
10337
10338
|
size: "xs",
|
|
10338
10339
|
tabs: e.options,
|
|
@@ -10341,9 +10342,9 @@ function Vo({ x: e, t }) {
|
|
|
10341
10342
|
ariaLabel: e.name,
|
|
10342
10343
|
className: "w-full [&>*]:flex-1"
|
|
10343
10344
|
});
|
|
10344
|
-
case "toggle": return /* @__PURE__ */
|
|
10345
|
+
case "toggle": return /* @__PURE__ */ F("span", {
|
|
10345
10346
|
className: "flex-1 flex justify-end",
|
|
10346
|
-
children: /* @__PURE__ */
|
|
10347
|
+
children: /* @__PURE__ */ F(Jt, {
|
|
10347
10348
|
variant: "float",
|
|
10348
10349
|
checked: !!n,
|
|
10349
10350
|
onChange: r,
|
|
@@ -10352,20 +10353,20 @@ function Vo({ x: e, t }) {
|
|
|
10352
10353
|
})
|
|
10353
10354
|
});
|
|
10354
10355
|
case "text":
|
|
10355
|
-
case "color": return /* @__PURE__ */
|
|
10356
|
+
case "color": return /* @__PURE__ */ F(Ct, {
|
|
10356
10357
|
variant: "float",
|
|
10357
10358
|
size: "sm",
|
|
10358
10359
|
value: n ?? "",
|
|
10359
10360
|
disabled: i,
|
|
10360
10361
|
"aria-label": e.name,
|
|
10361
|
-
className: `w-full ${
|
|
10362
|
+
className: `w-full ${zo}`,
|
|
10362
10363
|
onChange: (e) => r(e.target.value)
|
|
10363
10364
|
});
|
|
10364
|
-
case "picker": return
|
|
10365
|
+
case "picker": return Vo([{
|
|
10365
10366
|
value: "",
|
|
10366
10367
|
label: e.kinds?.includes("photo") ? "Choose photo layer…" : "None"
|
|
10367
10368
|
}, ...t.layersFor(e)], n ?? "", r, e.name, i);
|
|
10368
|
-
case "button": return /* @__PURE__ */
|
|
10369
|
+
case "button": return /* @__PURE__ */ F(j, {
|
|
10369
10370
|
variant: "float",
|
|
10370
10371
|
tone: "secondary",
|
|
10371
10372
|
size: "sm",
|
|
@@ -10374,12 +10375,12 @@ function Vo({ x: e, t }) {
|
|
|
10374
10375
|
className: "w-full",
|
|
10375
10376
|
children: e.name
|
|
10376
10377
|
});
|
|
10377
|
-
case "ramp": return /* @__PURE__ */
|
|
10378
|
-
/* @__PURE__ */
|
|
10378
|
+
case "ramp": return /* @__PURE__ */ I(P, { children: [
|
|
10379
|
+
/* @__PURE__ */ F(Ct, {
|
|
10379
10380
|
variant: "float",
|
|
10380
10381
|
size: "sm",
|
|
10381
10382
|
"aria-label": `${e.name} A`,
|
|
10382
|
-
className: `flex-1 min-w-0 ${
|
|
10383
|
+
className: `flex-1 min-w-0 ${zo}`,
|
|
10383
10384
|
disabled: i,
|
|
10384
10385
|
value: String(+Number(n.a).toFixed(3)),
|
|
10385
10386
|
onChange: (e) => {
|
|
@@ -10390,18 +10391,18 @@ function Vo({ x: e, t }) {
|
|
|
10390
10391
|
});
|
|
10391
10392
|
}
|
|
10392
10393
|
}),
|
|
10393
|
-
/* @__PURE__ */
|
|
10394
|
+
/* @__PURE__ */ F("div", {
|
|
10394
10395
|
className: "w-[92px] shrink-0",
|
|
10395
|
-
children:
|
|
10396
|
+
children: Vo(e.curves ?? Va, n.curve, (e) => r({
|
|
10396
10397
|
...n,
|
|
10397
10398
|
curve: e
|
|
10398
10399
|
}), `${e.name} curve`, i)
|
|
10399
10400
|
}),
|
|
10400
|
-
/* @__PURE__ */
|
|
10401
|
+
/* @__PURE__ */ F(Ct, {
|
|
10401
10402
|
variant: "float",
|
|
10402
10403
|
size: "sm",
|
|
10403
10404
|
"aria-label": `${e.name} B`,
|
|
10404
|
-
className: `flex-1 min-w-0 ${
|
|
10405
|
+
className: `flex-1 min-w-0 ${zo}`,
|
|
10405
10406
|
disabled: i,
|
|
10406
10407
|
value: String(+Number(n.b).toFixed(3)),
|
|
10407
10408
|
onChange: (e) => {
|
|
@@ -10416,44 +10417,44 @@ function Vo({ x: e, t }) {
|
|
|
10416
10417
|
default: return null;
|
|
10417
10418
|
}
|
|
10418
10419
|
}
|
|
10419
|
-
function
|
|
10420
|
+
function Uo({ x: e, t }) {
|
|
10420
10421
|
let n = t.valueOf(e), r = t.set(e), i = (e, t, i) => r(n.map((n, r) => r === e ? {
|
|
10421
10422
|
...n,
|
|
10422
10423
|
[t]: i
|
|
10423
|
-
} : n)), a = (e, t, r) => /* @__PURE__ */
|
|
10424
|
+
} : n)), a = (e, t, r) => /* @__PURE__ */ F(Ct, {
|
|
10424
10425
|
variant: "float",
|
|
10425
10426
|
size: "sm",
|
|
10426
10427
|
prefix: r,
|
|
10427
10428
|
"aria-label": `Light ${e + 1} ${r ?? t}`,
|
|
10428
|
-
className: `${r ? "w-[64px]" : "w-[48px]"} shrink-0 !px-2 !gap-1 ${
|
|
10429
|
+
className: `${r ? "w-[64px]" : "w-[48px]"} shrink-0 !px-2 !gap-1 ${zo}`,
|
|
10429
10430
|
value: Number(n[e][t]).toFixed(2),
|
|
10430
10431
|
onChange: (n) => {
|
|
10431
10432
|
let r = parseFloat(n.target.value);
|
|
10432
10433
|
Number.isFinite(r) && i(e, t, r);
|
|
10433
10434
|
}
|
|
10434
10435
|
});
|
|
10435
|
-
return /* @__PURE__ */
|
|
10436
|
+
return /* @__PURE__ */ I("div", {
|
|
10436
10437
|
className: "flex flex-col gap-2",
|
|
10437
10438
|
"data-control": "Lights",
|
|
10438
10439
|
children: [
|
|
10439
|
-
/* @__PURE__ */
|
|
10440
|
+
/* @__PURE__ */ I("div", {
|
|
10440
10441
|
className: "flex items-center gap-1.5 pl-[18px] kol-float-label text-oq-64",
|
|
10441
10442
|
children: [
|
|
10442
|
-
/* @__PURE__ */
|
|
10443
|
+
/* @__PURE__ */ F("span", {
|
|
10443
10444
|
className: "w-[134px]",
|
|
10444
10445
|
children: "Position"
|
|
10445
10446
|
}),
|
|
10446
|
-
/* @__PURE__ */
|
|
10447
|
+
/* @__PURE__ */ F("span", {
|
|
10447
10448
|
className: "w-[54px]",
|
|
10448
10449
|
children: "Radius"
|
|
10449
10450
|
}),
|
|
10450
|
-
/* @__PURE__ */
|
|
10451
|
+
/* @__PURE__ */ F("span", { children: "Intensity" })
|
|
10451
10452
|
]
|
|
10452
10453
|
}),
|
|
10453
|
-
n.map((e, t) => /* @__PURE__ */
|
|
10454
|
+
n.map((e, t) => /* @__PURE__ */ I("div", {
|
|
10454
10455
|
className: "flex items-center gap-1.5",
|
|
10455
10456
|
children: [
|
|
10456
|
-
/* @__PURE__ */
|
|
10457
|
+
/* @__PURE__ */ F("span", {
|
|
10457
10458
|
className: "w-3 text-oq-48 select-none",
|
|
10458
10459
|
"aria-hidden": !0,
|
|
10459
10460
|
children: "⠿"
|
|
@@ -10461,7 +10462,7 @@ function Ho({ x: e, t }) {
|
|
|
10461
10462
|
a(t, "x", "X"),
|
|
10462
10463
|
a(t, "y", "Y"),
|
|
10463
10464
|
a(t, "radius"),
|
|
10464
|
-
/* @__PURE__ */
|
|
10465
|
+
/* @__PURE__ */ F(Gt, {
|
|
10465
10466
|
variant: "float",
|
|
10466
10467
|
readout: "none",
|
|
10467
10468
|
value: e.intensity,
|
|
@@ -10472,11 +10473,11 @@ function Ho({ x: e, t }) {
|
|
|
10472
10473
|
"aria-label": `Light ${t + 1} intensity`,
|
|
10473
10474
|
className: "flex-1 min-w-0"
|
|
10474
10475
|
}),
|
|
10475
|
-
/* @__PURE__ */
|
|
10476
|
+
/* @__PURE__ */ F("span", {
|
|
10476
10477
|
className: "kol-float-timecode text-fg-emphasis text-[11px] w-7 text-right",
|
|
10477
10478
|
children: e.intensity.toFixed(1)
|
|
10478
10479
|
}),
|
|
10479
|
-
/* @__PURE__ */
|
|
10480
|
+
/* @__PURE__ */ F(j, {
|
|
10480
10481
|
variant: "float",
|
|
10481
10482
|
tone: "ghost",
|
|
10482
10483
|
size: "sm",
|
|
@@ -10487,7 +10488,7 @@ function Ho({ x: e, t }) {
|
|
|
10487
10488
|
})
|
|
10488
10489
|
]
|
|
10489
10490
|
}, t)),
|
|
10490
|
-
/* @__PURE__ */
|
|
10491
|
+
/* @__PURE__ */ F(j, {
|
|
10491
10492
|
variant: "float",
|
|
10492
10493
|
tone: "ghost",
|
|
10493
10494
|
size: "sm",
|
|
@@ -10505,24 +10506,24 @@ function Ho({ x: e, t }) {
|
|
|
10505
10506
|
]
|
|
10506
10507
|
});
|
|
10507
10508
|
}
|
|
10508
|
-
function
|
|
10509
|
+
function Wo({ x: e, t }) {
|
|
10509
10510
|
let n = t.valueOf(e), r = n ? g(t.state.layers ?? [], n) : null;
|
|
10510
|
-
return /* @__PURE__ */
|
|
10511
|
+
return /* @__PURE__ */ I("div", {
|
|
10511
10512
|
className: "flex items-center gap-2",
|
|
10512
10513
|
"data-control": e.name,
|
|
10513
|
-
children: [/* @__PURE__ */
|
|
10514
|
+
children: [/* @__PURE__ */ F("span", {
|
|
10514
10515
|
className: "size-[38px] shrink-0 rounded-md bg-(--kol-float-well) bg-cover bg-center",
|
|
10515
10516
|
style: r?.src ? { backgroundImage: `url(${r.src})` } : void 0
|
|
10516
|
-
}), /* @__PURE__ */
|
|
10517
|
+
}), /* @__PURE__ */ F("div", {
|
|
10517
10518
|
className: "flex-1 min-w-0",
|
|
10518
|
-
children: /* @__PURE__ */
|
|
10519
|
+
children: /* @__PURE__ */ F(Ho, {
|
|
10519
10520
|
x: e,
|
|
10520
10521
|
t
|
|
10521
10522
|
})
|
|
10522
10523
|
})]
|
|
10523
10524
|
});
|
|
10524
10525
|
}
|
|
10525
|
-
function
|
|
10526
|
+
function Go({ t: e }) {
|
|
10526
10527
|
let t = nn(null);
|
|
10527
10528
|
return $t(() => {
|
|
10528
10529
|
let n = t.current;
|
|
@@ -10538,7 +10539,7 @@ function Wo({ t: e }) {
|
|
|
10538
10539
|
o.data[a] = o.data[a + 1] = o.data[a + 2] = n, o.data[a + 3] = 255;
|
|
10539
10540
|
}
|
|
10540
10541
|
a.putImageData(o, 0, 0);
|
|
10541
|
-
}, [e.params, e.live]), /* @__PURE__ */
|
|
10542
|
+
}, [e.params, e.live]), /* @__PURE__ */ F("canvas", {
|
|
10542
10543
|
ref: t,
|
|
10543
10544
|
width: 176,
|
|
10544
10545
|
height: 22,
|
|
@@ -10546,24 +10547,24 @@ function Wo({ t: e }) {
|
|
|
10546
10547
|
"data-field-map": !0
|
|
10547
10548
|
});
|
|
10548
10549
|
}
|
|
10549
|
-
var
|
|
10550
|
+
var Ko = (e, t) => e.type === "lights" ? {
|
|
10550
10551
|
id: e.id,
|
|
10551
|
-
render: () => /* @__PURE__ */
|
|
10552
|
+
render: () => /* @__PURE__ */ F(Uo, {
|
|
10552
10553
|
x: e,
|
|
10553
10554
|
t
|
|
10554
10555
|
}, e.id)
|
|
10555
10556
|
} : e.type === "button" ? {
|
|
10556
10557
|
id: e.id,
|
|
10557
|
-
render: () => /* @__PURE__ */
|
|
10558
|
+
render: () => /* @__PURE__ */ F("div", {
|
|
10558
10559
|
"data-control": e.name,
|
|
10559
|
-
children: /* @__PURE__ */
|
|
10560
|
+
children: /* @__PURE__ */ F(Ho, {
|
|
10560
10561
|
x: e,
|
|
10561
10562
|
t
|
|
10562
10563
|
})
|
|
10563
10564
|
}, e.id)
|
|
10564
10565
|
} : e.type === "picker" && e.kinds?.includes("photo") ? {
|
|
10565
10566
|
id: e.id,
|
|
10566
|
-
render: () => /* @__PURE__ */
|
|
10567
|
+
render: () => /* @__PURE__ */ F(Wo, {
|
|
10567
10568
|
x: e,
|
|
10568
10569
|
t
|
|
10569
10570
|
}, e.id)
|
|
@@ -10571,12 +10572,12 @@ var Go = (e, t) => e.type === "lights" ? {
|
|
|
10571
10572
|
type: "labeled",
|
|
10572
10573
|
id: e.id,
|
|
10573
10574
|
label: e.name,
|
|
10574
|
-
render: () => /* @__PURE__ */
|
|
10575
|
+
render: () => /* @__PURE__ */ F(Ho, {
|
|
10575
10576
|
x: e,
|
|
10576
10577
|
t
|
|
10577
10578
|
})
|
|
10578
10579
|
};
|
|
10579
|
-
function
|
|
10580
|
+
function qo(e, t) {
|
|
10580
10581
|
let n = [];
|
|
10581
10582
|
for (let r = 0; r < e.length; r++) {
|
|
10582
10583
|
let i = e[r], a = e[r + 1], o = i.name.match(/^(.*) X$/);
|
|
@@ -10584,24 +10585,24 @@ function Ko(e, t) {
|
|
|
10584
10585
|
type: "labeled",
|
|
10585
10586
|
id: i.id,
|
|
10586
10587
|
label: o[1],
|
|
10587
|
-
render: () => [i, a].map((e, n) => /* @__PURE__ */
|
|
10588
|
+
render: () => [i, a].map((e, n) => /* @__PURE__ */ F(Ct, {
|
|
10588
10589
|
variant: "float",
|
|
10589
10590
|
size: "sm",
|
|
10590
10591
|
prefix: n ? "Y" : "X",
|
|
10591
10592
|
"aria-label": e.name,
|
|
10592
|
-
className: `flex-1 min-w-0 ${
|
|
10593
|
+
className: `flex-1 min-w-0 ${zo}`,
|
|
10593
10594
|
value: Number(t.valueOf(e)).toFixed(2),
|
|
10594
10595
|
onChange: (n) => {
|
|
10595
10596
|
let r = parseFloat(n.target.value);
|
|
10596
10597
|
Number.isFinite(r) && t.set(e)(r);
|
|
10597
10598
|
}
|
|
10598
10599
|
}, e.id))
|
|
10599
|
-
}), r++) : n.push(
|
|
10600
|
+
}), r++) : n.push(Ko(i, t));
|
|
10600
10601
|
}
|
|
10601
10602
|
return n;
|
|
10602
10603
|
}
|
|
10603
|
-
function
|
|
10604
|
-
let r =
|
|
10604
|
+
function Jo({ id: e, onClose: t, className: n = "" }) {
|
|
10605
|
+
let r = jo(e), { win: i, params: a } = r, [o, s] = N({}), c = (e, t = !0) => o[e] ?? t, l = (e) => (t) => s((n) => ({
|
|
10605
10606
|
...n,
|
|
10606
10607
|
[e]: t
|
|
10607
10608
|
})), u = nn(a);
|
|
@@ -10619,35 +10620,35 @@ function qo({ id: e, onClose: t, className: n = "" }) {
|
|
|
10619
10620
|
...n > 0 && e.title ? [{
|
|
10620
10621
|
type: "subhead",
|
|
10621
10622
|
id: `${t}-${n}`,
|
|
10622
|
-
label: (
|
|
10623
|
+
label: (Lo[e.title] ?? e.title).toUpperCase()
|
|
10623
10624
|
}] : [],
|
|
10624
10625
|
...e.kind === "ramps" ? [{
|
|
10625
10626
|
type: "labeled",
|
|
10626
10627
|
id: `${t}-rampcols`,
|
|
10627
10628
|
label: "",
|
|
10628
|
-
render: () => /* @__PURE__ */
|
|
10629
|
+
render: () => /* @__PURE__ */ I("div", {
|
|
10629
10630
|
className: "flex w-full kol-float-label text-oq-64",
|
|
10630
10631
|
children: [
|
|
10631
|
-
/* @__PURE__ */
|
|
10632
|
+
/* @__PURE__ */ F("span", {
|
|
10632
10633
|
className: "flex-1",
|
|
10633
10634
|
children: "Value A"
|
|
10634
10635
|
}),
|
|
10635
|
-
/* @__PURE__ */
|
|
10636
|
+
/* @__PURE__ */ F("span", {
|
|
10636
10637
|
className: "w-[92px]",
|
|
10637
10638
|
children: "Curve"
|
|
10638
10639
|
}),
|
|
10639
|
-
/* @__PURE__ */
|
|
10640
|
+
/* @__PURE__ */ F("span", {
|
|
10640
10641
|
className: "flex-1 pl-1.5",
|
|
10641
10642
|
children: "Value B"
|
|
10642
10643
|
})
|
|
10643
10644
|
]
|
|
10644
10645
|
})
|
|
10645
10646
|
}] : [],
|
|
10646
|
-
...
|
|
10647
|
+
...qo(e.controls, r)
|
|
10647
10648
|
]), ...o]
|
|
10648
|
-
}), f, p, h = /* @__PURE__ */
|
|
10649
|
+
}), f, p, h = /* @__PURE__ */ I("span", {
|
|
10649
10650
|
className: "flex items-center gap-2 kol-float-label text-oq-64",
|
|
10650
|
-
children: [/* @__PURE__ */
|
|
10651
|
+
children: [/* @__PURE__ */ F(Jt, {
|
|
10651
10652
|
variant: "float",
|
|
10652
10653
|
checked: r.live,
|
|
10653
10654
|
onChange: r.setLive,
|
|
@@ -10663,17 +10664,17 @@ function qo({ id: e, onClose: t, className: n = "" }) {
|
|
|
10663
10664
|
type: "labeled",
|
|
10664
10665
|
id: "preset",
|
|
10665
10666
|
label: "Preset",
|
|
10666
|
-
render: () =>
|
|
10667
|
+
render: () => Vo(r.presets, a.genPreset ?? "custom", r.setPreset, "Preset")
|
|
10667
10668
|
} : e.id === "description" ? {
|
|
10668
10669
|
type: "labeled",
|
|
10669
10670
|
id: "description",
|
|
10670
10671
|
label: e.name,
|
|
10671
|
-
render: () => /* @__PURE__ */
|
|
10672
|
+
render: () => /* @__PURE__ */ F("span", {
|
|
10672
10673
|
className: "kol-float-hint text-fg-emphasis truncate",
|
|
10673
10674
|
title: r.valueOf(e),
|
|
10674
10675
|
children: r.valueOf(e)
|
|
10675
10676
|
})
|
|
10676
|
-
} :
|
|
10677
|
+
} : Ko(e, r))
|
|
10677
10678
|
},
|
|
10678
10679
|
d(t("field"), {
|
|
10679
10680
|
meta: "01 / SOURCE",
|
|
@@ -10684,7 +10685,7 @@ function qo({ id: e, onClose: t, className: n = "" }) {
|
|
|
10684
10685
|
meta: r.live ? "LIVE" : "PAUSED"
|
|
10685
10686
|
}, {
|
|
10686
10687
|
id: "field-map-strip",
|
|
10687
|
-
render: () => /* @__PURE__ */
|
|
10688
|
+
render: () => /* @__PURE__ */ F(Go, { t: r })
|
|
10688
10689
|
}]
|
|
10689
10690
|
}),
|
|
10690
10691
|
d(t("ramp")),
|
|
@@ -10699,15 +10700,15 @@ function qo({ id: e, onClose: t, className: n = "" }) {
|
|
|
10699
10700
|
meta: t("random").state(a).toUpperCase()
|
|
10700
10701
|
}),
|
|
10701
10702
|
d(t("frame"), { def: !1 })
|
|
10702
|
-
], p = /* @__PURE__ */
|
|
10703
|
+
], p = /* @__PURE__ */ I("div", {
|
|
10703
10704
|
className: "flex flex-col gap-3",
|
|
10704
|
-
children: [/* @__PURE__ */
|
|
10705
|
+
children: [/* @__PURE__ */ I("div", {
|
|
10705
10706
|
className: "flex items-center justify-between",
|
|
10706
|
-
children: [h, /* @__PURE__ */
|
|
10707
|
+
children: [h, /* @__PURE__ */ F("span", {
|
|
10707
10708
|
className: "kol-float-timecode text-oq-64 text-[11px]",
|
|
10708
10709
|
children: "512 × 512 px"
|
|
10709
10710
|
})]
|
|
10710
|
-
}), /* @__PURE__ */
|
|
10711
|
+
}), /* @__PURE__ */ F(j, {
|
|
10711
10712
|
variant: "float",
|
|
10712
10713
|
tone: "primary",
|
|
10713
10714
|
size: "md",
|
|
@@ -10726,14 +10727,14 @@ function qo({ id: e, onClose: t, className: n = "" }) {
|
|
|
10726
10727
|
}).length + 1, i = a.sourceId ? g(r.state.layers ?? [], a.sourceId) : null;
|
|
10727
10728
|
f = [{
|
|
10728
10729
|
id: "head",
|
|
10729
|
-
rows:
|
|
10730
|
+
rows: qo(e.groups[0].controls, r)
|
|
10730
10731
|
}, d(t, {
|
|
10731
10732
|
meta: `${n} COPIES`,
|
|
10732
10733
|
extra: [{
|
|
10733
10734
|
id: "copy-grid",
|
|
10734
|
-
render: () => /* @__PURE__ */
|
|
10735
|
+
render: () => /* @__PURE__ */ F("div", {
|
|
10735
10736
|
className: "h-[110px] rounded-md bg-(--kol-float-well) p-3 flex",
|
|
10736
|
-
children: /* @__PURE__ */
|
|
10737
|
+
children: /* @__PURE__ */ F(No, {
|
|
10737
10738
|
t: r,
|
|
10738
10739
|
className: "w-full h-full"
|
|
10739
10740
|
})
|
|
@@ -10741,12 +10742,12 @@ function qo({ id: e, onClose: t, className: n = "" }) {
|
|
|
10741
10742
|
}]
|
|
10742
10743
|
})];
|
|
10743
10744
|
let o = a.repMode === "grid" ? `${a.repCols} × ${a.repRows} grid` : a.repMode === "mirror" ? a.repPoint ? "point mirror" : "axis mirror" : `${a.repCount} around`;
|
|
10744
|
-
p = /* @__PURE__ */
|
|
10745
|
+
p = /* @__PURE__ */ I("div", {
|
|
10745
10746
|
className: "flex items-center justify-between kol-float-label",
|
|
10746
|
-
children: [/* @__PURE__ */
|
|
10747
|
+
children: [/* @__PURE__ */ I("span", {
|
|
10747
10748
|
className: "flex items-center gap-2 text-oq-64",
|
|
10748
|
-
children: [/* @__PURE__ */
|
|
10749
|
-
}), /* @__PURE__ */
|
|
10749
|
+
children: [/* @__PURE__ */ F("span", { className: `size-1.5 rounded-full ${i ? "bg-(--kol-accent-primary)" : "bg-(--kol-oq-24)"}` }), i ? "Source linked" : "No source"]
|
|
10750
|
+
}), /* @__PURE__ */ F("span", {
|
|
10750
10751
|
className: "text-oq-64",
|
|
10751
10752
|
children: o
|
|
10752
10753
|
})]
|
|
@@ -10755,56 +10756,56 @@ function qo({ id: e, onClose: t, className: n = "" }) {
|
|
|
10755
10756
|
let [e, ...t] = r.sections;
|
|
10756
10757
|
f = [d(e, { extra: [{
|
|
10757
10758
|
id: "glyph-preview",
|
|
10758
|
-
render: () => /* @__PURE__ */
|
|
10759
|
+
render: () => /* @__PURE__ */ I("div", {
|
|
10759
10760
|
className: "relative h-[132px] rounded-md bg-(--kol-float-well) overflow-hidden flex items-center justify-center",
|
|
10760
10761
|
children: [
|
|
10761
|
-
/* @__PURE__ */
|
|
10762
|
-
/* @__PURE__ */
|
|
10762
|
+
/* @__PURE__ */ F("span", { className: "absolute inset-x-3 top-[38%] border-t border-dashed border-(--kol-oq-24)" }),
|
|
10763
|
+
/* @__PURE__ */ F("span", {
|
|
10763
10764
|
className: "absolute right-3 top-[38%] -translate-y-full kol-float-label text-oq-48",
|
|
10764
10765
|
children: "x-height"
|
|
10765
10766
|
}),
|
|
10766
|
-
/* @__PURE__ */
|
|
10767
|
-
/* @__PURE__ */
|
|
10767
|
+
/* @__PURE__ */ F("span", { className: "absolute inset-x-3 top-[72%] border-t border-(--kol-oq-24)" }),
|
|
10768
|
+
/* @__PURE__ */ F("span", {
|
|
10768
10769
|
className: "absolute right-3 top-[72%] -translate-y-full kol-float-label text-oq-48",
|
|
10769
10770
|
children: "baseline"
|
|
10770
10771
|
}),
|
|
10771
|
-
/* @__PURE__ */
|
|
10772
|
+
/* @__PURE__ */ F(Po, {
|
|
10772
10773
|
t: r,
|
|
10773
10774
|
size: 256,
|
|
10774
10775
|
className: "h-full aspect-square"
|
|
10775
10776
|
})
|
|
10776
10777
|
]
|
|
10777
10778
|
})
|
|
10778
|
-
}] }), ...t.map((e) => d(e))], p = /* @__PURE__ */
|
|
10779
|
+
}] }), ...t.map((e) => d(e))], p = /* @__PURE__ */ I("div", {
|
|
10779
10780
|
className: "flex items-center justify-between kol-float-label",
|
|
10780
|
-
children: [/* @__PURE__ */
|
|
10781
|
+
children: [/* @__PURE__ */ I("span", {
|
|
10781
10782
|
className: "flex items-center gap-2 text-oq-64",
|
|
10782
|
-
children: [/* @__PURE__ */
|
|
10783
|
-
}), /* @__PURE__ */
|
|
10783
|
+
children: [/* @__PURE__ */ F("span", { className: `size-1.5 rounded-full ${r.target ? "bg-(--kol-accent-primary)" : "bg-(--kol-oq-24)"}` }), r.target ? "Linked to letter mask" : "Not placed"]
|
|
10784
|
+
}), /* @__PURE__ */ F("span", {
|
|
10784
10785
|
className: "text-oq-64",
|
|
10785
10786
|
children: "1 glyph"
|
|
10786
10787
|
})]
|
|
10787
10788
|
});
|
|
10788
10789
|
}
|
|
10789
|
-
return /* @__PURE__ */
|
|
10790
|
+
return /* @__PURE__ */ F(rn, {
|
|
10790
10791
|
title: i.id === "type" ? "Paratype Letter" : i.kind,
|
|
10791
|
-
width:
|
|
10792
|
+
width: Io,
|
|
10792
10793
|
density: "compact",
|
|
10793
10794
|
sections: f,
|
|
10794
10795
|
footer: p,
|
|
10795
10796
|
surface: "solid",
|
|
10796
|
-
onExpand: () =>
|
|
10797
|
+
onExpand: () => lt(e, "dialog"),
|
|
10797
10798
|
onCollapse: t,
|
|
10798
|
-
className: `kol-generator-rail ${
|
|
10799
|
+
className: `kol-generator-rail ${Ro} ${n}`.trim()
|
|
10799
10800
|
});
|
|
10800
10801
|
}
|
|
10801
10802
|
//#endregion
|
|
10802
10803
|
//#region src/editor/generate/GeneratorWindow.jsx
|
|
10803
|
-
var
|
|
10804
|
-
function
|
|
10804
|
+
var Yo = "!h-[30px] !px-0 justify-center !rounded-md !text-[11px] !font-medium !normal-case !tracking-normal font-(family-name:--kol-font-family-float)";
|
|
10805
|
+
function Xo({ x: e, t }) {
|
|
10805
10806
|
let n = t.valueOf(e), r = e.bind ? t.set(e) : () => {}, i = !t.isLive(e), a = e.name;
|
|
10806
10807
|
switch (e.type) {
|
|
10807
|
-
case "slider": return /* @__PURE__ */
|
|
10808
|
+
case "slider": return /* @__PURE__ */ F(Vt, {
|
|
10808
10809
|
value: n,
|
|
10809
10810
|
onChange: r,
|
|
10810
10811
|
min: e.min,
|
|
@@ -10814,7 +10815,7 @@ function Yo({ x: e, t }) {
|
|
|
10814
10815
|
disabled: i,
|
|
10815
10816
|
"aria-label": a
|
|
10816
10817
|
});
|
|
10817
|
-
case "range": return /* @__PURE__ */
|
|
10818
|
+
case "range": return /* @__PURE__ */ F(Lt, {
|
|
10818
10819
|
value: n,
|
|
10819
10820
|
onChange: r,
|
|
10820
10821
|
min: e.min,
|
|
@@ -10824,27 +10825,27 @@ function Yo({ x: e, t }) {
|
|
|
10824
10825
|
disabled: i,
|
|
10825
10826
|
"aria-label": a
|
|
10826
10827
|
});
|
|
10827
|
-
case "segmented": return /* @__PURE__ */
|
|
10828
|
+
case "segmented": return /* @__PURE__ */ F(zt, {
|
|
10828
10829
|
value: n,
|
|
10829
10830
|
onChange: r,
|
|
10830
10831
|
options: e.options,
|
|
10831
10832
|
disabled: i,
|
|
10832
10833
|
ariaLabel: a
|
|
10833
10834
|
});
|
|
10834
|
-
case "select": return /* @__PURE__ */
|
|
10835
|
+
case "select": return /* @__PURE__ */ F(Bt, {
|
|
10835
10836
|
value: n,
|
|
10836
10837
|
onChange: r,
|
|
10837
10838
|
options: e.options,
|
|
10838
10839
|
disabled: i,
|
|
10839
10840
|
ariaLabel: a
|
|
10840
10841
|
});
|
|
10841
|
-
case "toggle": return /* @__PURE__ */
|
|
10842
|
+
case "toggle": return /* @__PURE__ */ F(Ut, {
|
|
10842
10843
|
label: e.name,
|
|
10843
10844
|
checked: !!n,
|
|
10844
10845
|
onChange: r,
|
|
10845
10846
|
disabled: i
|
|
10846
10847
|
});
|
|
10847
|
-
case "point": return /* @__PURE__ */
|
|
10848
|
+
case "point": return /* @__PURE__ */ F(Pt, {
|
|
10848
10849
|
value: n,
|
|
10849
10850
|
onChange: r,
|
|
10850
10851
|
min: e.min,
|
|
@@ -10852,24 +10853,24 @@ function Yo({ x: e, t }) {
|
|
|
10852
10853
|
disabled: i,
|
|
10853
10854
|
"aria-label": a
|
|
10854
10855
|
});
|
|
10855
|
-
case "text": return /* @__PURE__ */
|
|
10856
|
+
case "text": return /* @__PURE__ */ F(Ht, {
|
|
10856
10857
|
value: n,
|
|
10857
10858
|
onChange: r,
|
|
10858
10859
|
disabled: i,
|
|
10859
10860
|
"aria-label": a
|
|
10860
10861
|
});
|
|
10861
|
-
case "color": return /* @__PURE__ */
|
|
10862
|
+
case "color": return /* @__PURE__ */ F(Ht, {
|
|
10862
10863
|
value: n,
|
|
10863
10864
|
onChange: r,
|
|
10864
10865
|
disabled: i,
|
|
10865
10866
|
"aria-label": a
|
|
10866
10867
|
});
|
|
10867
|
-
case "lights": return /* @__PURE__ */
|
|
10868
|
+
case "lights": return /* @__PURE__ */ F(Nt, {
|
|
10868
10869
|
value: n,
|
|
10869
10870
|
onChange: r,
|
|
10870
10871
|
disabled: i
|
|
10871
10872
|
});
|
|
10872
|
-
case "picker": return /* @__PURE__ */
|
|
10873
|
+
case "picker": return /* @__PURE__ */ F(Bt, {
|
|
10873
10874
|
value: n ?? "",
|
|
10874
10875
|
onChange: r,
|
|
10875
10876
|
options: [{
|
|
@@ -10879,7 +10880,7 @@ function Yo({ x: e, t }) {
|
|
|
10879
10880
|
disabled: i,
|
|
10880
10881
|
ariaLabel: a
|
|
10881
10882
|
});
|
|
10882
|
-
case "button": return /* @__PURE__ */
|
|
10883
|
+
case "button": return /* @__PURE__ */ F(j, {
|
|
10883
10884
|
size: "sm",
|
|
10884
10885
|
tone: "ghost",
|
|
10885
10886
|
disabled: i,
|
|
@@ -10890,28 +10891,28 @@ function Yo({ x: e, t }) {
|
|
|
10890
10891
|
default: return null;
|
|
10891
10892
|
}
|
|
10892
10893
|
}
|
|
10893
|
-
function
|
|
10894
|
-
let i = e.controls.filter((e) => e.type === "ramp"), a = e.controls.filter((e) => e.type !== "ramp"), o = i.length > 0 && /* @__PURE__ */
|
|
10894
|
+
function Zo({ g: e, t, more: n, setMore: r }) {
|
|
10895
|
+
let i = e.controls.filter((e) => e.type === "ramp"), a = e.controls.filter((e) => e.type !== "ramp"), o = i.length > 0 && /* @__PURE__ */ I("div", {
|
|
10895
10896
|
className: "flex flex-col gap-1",
|
|
10896
|
-
children: [/* @__PURE__ */
|
|
10897
|
+
children: [/* @__PURE__ */ F(It, {}), i.map((e) => /* @__PURE__ */ F(Ft, {
|
|
10897
10898
|
label: e.name,
|
|
10898
10899
|
value: t.valueOf(e),
|
|
10899
10900
|
onChange: e.bind ? t.set(e) : () => {},
|
|
10900
|
-
curves: e.curves ??
|
|
10901
|
+
curves: e.curves ?? Va,
|
|
10901
10902
|
disabled: !t.isLive(e),
|
|
10902
10903
|
"data-control": e.name
|
|
10903
10904
|
}, e.id))]
|
|
10904
|
-
}), s = a.length > 0 && /* @__PURE__ */
|
|
10905
|
+
}), s = a.length > 0 && /* @__PURE__ */ F(jt, { children: a.map((e) => /* @__PURE__ */ F(Ot, {
|
|
10905
10906
|
label: e.type === "toggle" ? null : e.name,
|
|
10906
10907
|
span: e.type === "lights" ? 2 : 1,
|
|
10907
10908
|
disabled: !t.isLive(e),
|
|
10908
10909
|
"data-control": e.name,
|
|
10909
|
-
children: /* @__PURE__ */
|
|
10910
|
+
children: /* @__PURE__ */ F(Xo, {
|
|
10910
10911
|
x: e,
|
|
10911
10912
|
t
|
|
10912
10913
|
})
|
|
10913
10914
|
}, e.id)) });
|
|
10914
|
-
return e.kind === "more" ? /* @__PURE__ */
|
|
10915
|
+
return e.kind === "more" ? /* @__PURE__ */ I(kt, {
|
|
10915
10916
|
label: e.title,
|
|
10916
10917
|
note: e.note,
|
|
10917
10918
|
open: !!n[e.title],
|
|
@@ -10919,46 +10920,46 @@ function Xo({ g: e, t, more: n, setMore: r }) {
|
|
|
10919
10920
|
...n,
|
|
10920
10921
|
[e.title]: t
|
|
10921
10922
|
})),
|
|
10922
|
-
children: [o, s && /* @__PURE__ */
|
|
10923
|
+
children: [o, s && /* @__PURE__ */ F("div", {
|
|
10923
10924
|
className: o ? "pt-3" : "",
|
|
10924
10925
|
children: s
|
|
10925
10926
|
})]
|
|
10926
|
-
}) : /* @__PURE__ */
|
|
10927
|
+
}) : /* @__PURE__ */ I(Mt, {
|
|
10927
10928
|
title: e.title,
|
|
10928
10929
|
note: e.note,
|
|
10929
|
-
children: [s, o && /* @__PURE__ */
|
|
10930
|
+
children: [s, o && /* @__PURE__ */ F("div", {
|
|
10930
10931
|
className: s ? "pt-3" : "",
|
|
10931
10932
|
children: o
|
|
10932
10933
|
})]
|
|
10933
10934
|
});
|
|
10934
10935
|
}
|
|
10935
|
-
function
|
|
10936
|
-
return /* @__PURE__ */
|
|
10936
|
+
function Qo({ t: e, caption: t }) {
|
|
10937
|
+
return /* @__PURE__ */ I("div", {
|
|
10937
10938
|
className: "flex flex-col",
|
|
10938
10939
|
children: [
|
|
10939
|
-
/* @__PURE__ */
|
|
10940
|
+
/* @__PURE__ */ I("div", {
|
|
10940
10941
|
className: "flex items-baseline justify-between pb-[15px]",
|
|
10941
|
-
children: [/* @__PURE__ */
|
|
10942
|
+
children: [/* @__PURE__ */ F("h3", {
|
|
10942
10943
|
className: "text-[12px] leading-[15px] font-semibold text-fg-96",
|
|
10943
10944
|
children: "Preview"
|
|
10944
|
-
}), /* @__PURE__ */
|
|
10945
|
+
}), /* @__PURE__ */ F("span", {
|
|
10945
10946
|
className: "text-[10px] leading-[12px] text-oq-64",
|
|
10946
10947
|
children: e.live ? "● Live" : "○ Paused"
|
|
10947
10948
|
})]
|
|
10948
10949
|
}),
|
|
10949
|
-
/* @__PURE__ */
|
|
10950
|
+
/* @__PURE__ */ F("div", {
|
|
10950
10951
|
className: "size-[248px] rounded-md border border-oq-16 bg-surface-primary overflow-hidden flex items-center justify-center",
|
|
10951
|
-
children: /* @__PURE__ */
|
|
10952
|
+
children: /* @__PURE__ */ F(Fo, {
|
|
10952
10953
|
t: e,
|
|
10953
10954
|
className: "size-full"
|
|
10954
10955
|
})
|
|
10955
10956
|
}),
|
|
10956
|
-
/* @__PURE__ */
|
|
10957
|
+
/* @__PURE__ */ I("div", {
|
|
10957
10958
|
className: "flex justify-between pt-3 pb-[19px] pr-[7px] border-b border-oq-16",
|
|
10958
|
-
children: [/* @__PURE__ */
|
|
10959
|
+
children: [/* @__PURE__ */ F("span", {
|
|
10959
10960
|
className: "text-[10px] leading-[12px] text-oq-64",
|
|
10960
10961
|
children: t
|
|
10961
|
-
}), /* @__PURE__ */
|
|
10962
|
+
}), /* @__PURE__ */ F("span", {
|
|
10962
10963
|
className: "font-(family-name:--kol-font-family-mono) text-[10px] leading-[13px] text-fg-64",
|
|
10963
10964
|
children: "512 × 512 px"
|
|
10964
10965
|
})]
|
|
@@ -10966,9 +10967,9 @@ function Zo({ t: e, caption: t }) {
|
|
|
10966
10967
|
]
|
|
10967
10968
|
});
|
|
10968
10969
|
}
|
|
10969
|
-
function
|
|
10970
|
-
let r =
|
|
10971
|
-
return /* @__PURE__ */
|
|
10970
|
+
function $o({ id: e, open: t, onClose: n }) {
|
|
10971
|
+
let r = jo(e), { win: i, params: a, sections: o } = r, [s, c] = N(o[0].key), [l, u] = N({}), d = o.find((e) => e.key === s) ?? o[0], f = i.header.find((e) => e.id === "style"), p = i.header.find((e) => e.id === "description"), m = i.header.find((e) => e.id === "expand"), h = i.fieldMap?.(a);
|
|
10972
|
+
return /* @__PURE__ */ F(bt, {
|
|
10972
10973
|
variant: "settings",
|
|
10973
10974
|
open: t,
|
|
10974
10975
|
onClose: n,
|
|
@@ -10976,12 +10977,12 @@ function Qo({ id: e, open: t, onClose: n }) {
|
|
|
10976
10977
|
kind: i.kind,
|
|
10977
10978
|
width: 880,
|
|
10978
10979
|
height: 656,
|
|
10979
|
-
headerEnd: /* @__PURE__ */
|
|
10980
|
+
headerEnd: /* @__PURE__ */ I("div", {
|
|
10980
10981
|
className: "flex items-center gap-2",
|
|
10981
10982
|
children: [
|
|
10982
|
-
m && /* @__PURE__ */
|
|
10983
|
+
m && /* @__PURE__ */ F(Yt, {
|
|
10983
10984
|
label: "Expand to editable paths",
|
|
10984
|
-
children: /* @__PURE__ */
|
|
10985
|
+
children: /* @__PURE__ */ F(j, {
|
|
10985
10986
|
tone: "ghost",
|
|
10986
10987
|
quiet: !0,
|
|
10987
10988
|
size: "sm",
|
|
@@ -10993,10 +10994,10 @@ function Qo({ id: e, open: t, onClose: n }) {
|
|
|
10993
10994
|
children: "Expand"
|
|
10994
10995
|
})
|
|
10995
10996
|
}),
|
|
10996
|
-
f && /* @__PURE__ */
|
|
10997
|
+
f && /* @__PURE__ */ F("div", {
|
|
10997
10998
|
className: "w-[140px]",
|
|
10998
10999
|
"data-control": "Style",
|
|
10999
|
-
children: /* @__PURE__ */
|
|
11000
|
+
children: /* @__PURE__ */ F(Bt, {
|
|
11000
11001
|
value: r.valueOf(f),
|
|
11001
11002
|
onChange: (e) => {
|
|
11002
11003
|
r.set(f)(e), c("style");
|
|
@@ -11005,10 +11006,10 @@ function Qo({ id: e, open: t, onClose: n }) {
|
|
|
11005
11006
|
ariaLabel: "Style"
|
|
11006
11007
|
})
|
|
11007
11008
|
}),
|
|
11008
|
-
r.presets && /* @__PURE__ */
|
|
11009
|
+
r.presets && /* @__PURE__ */ F("div", {
|
|
11009
11010
|
className: "w-[158px]",
|
|
11010
11011
|
"data-control": "Preset",
|
|
11011
|
-
children: /* @__PURE__ */
|
|
11012
|
+
children: /* @__PURE__ */ F(Bt, {
|
|
11012
11013
|
value: a.genPreset ?? "custom",
|
|
11013
11014
|
onChange: r.setPreset,
|
|
11014
11015
|
options: r.presets,
|
|
@@ -11024,71 +11025,71 @@ function Qo({ id: e, open: t, onClose: n }) {
|
|
|
11024
11025
|
})),
|
|
11025
11026
|
section: d.key,
|
|
11026
11027
|
onSection: c,
|
|
11027
|
-
aside: /* @__PURE__ */
|
|
11028
|
+
aside: /* @__PURE__ */ I("div", {
|
|
11028
11029
|
className: "flex flex-col",
|
|
11029
11030
|
children: [
|
|
11030
|
-
/* @__PURE__ */
|
|
11031
|
+
/* @__PURE__ */ F(Qo, {
|
|
11031
11032
|
t: r,
|
|
11032
11033
|
caption: d.state?.(a) ?? ""
|
|
11033
11034
|
}),
|
|
11034
|
-
h && /* @__PURE__ */
|
|
11035
|
+
h && /* @__PURE__ */ F("div", {
|
|
11035
11036
|
className: "pt-[18px]",
|
|
11036
|
-
children: /* @__PURE__ */
|
|
11037
|
+
children: /* @__PURE__ */ F(At, {
|
|
11037
11038
|
background: h.background,
|
|
11038
11039
|
left: h.left,
|
|
11039
11040
|
right: h.right
|
|
11040
11041
|
})
|
|
11041
11042
|
}),
|
|
11042
|
-
p && /* @__PURE__ */
|
|
11043
|
+
p && /* @__PURE__ */ F("p", {
|
|
11043
11044
|
className: "pt-6 text-[10px] leading-[14px] text-fg-64",
|
|
11044
11045
|
"data-control": "Description",
|
|
11045
11046
|
children: r.valueOf(p)
|
|
11046
11047
|
}),
|
|
11047
|
-
/* @__PURE__ */
|
|
11048
|
+
/* @__PURE__ */ F("p", {
|
|
11048
11049
|
className: "pt-2 text-[10px] leading-[12px] text-oq-64",
|
|
11049
11050
|
children: "Updates as you adjust settings."
|
|
11050
11051
|
})
|
|
11051
11052
|
]
|
|
11052
11053
|
}),
|
|
11053
|
-
footer: /* @__PURE__ */
|
|
11054
|
-
/* @__PURE__ */
|
|
11054
|
+
footer: /* @__PURE__ */ I(P, { children: [
|
|
11055
|
+
/* @__PURE__ */ F(Jt, {
|
|
11055
11056
|
checked: r.live,
|
|
11056
11057
|
onChange: r.setLive,
|
|
11057
11058
|
"aria-label": "Live preview"
|
|
11058
11059
|
}),
|
|
11059
|
-
/* @__PURE__ */
|
|
11060
|
+
/* @__PURE__ */ F("span", {
|
|
11060
11061
|
className: "text-[11px] text-fg-96 pr-[30px]",
|
|
11061
11062
|
children: "Live preview"
|
|
11062
11063
|
}),
|
|
11063
|
-
/* @__PURE__ */
|
|
11064
|
+
/* @__PURE__ */ F(j, {
|
|
11064
11065
|
size: "sm",
|
|
11065
11066
|
tone: "secondary",
|
|
11066
11067
|
onClick: r.reset,
|
|
11067
|
-
className: `${
|
|
11068
|
+
className: `${Yo} w-16 [--kol-tone-bg:var(--kol-oq-08)] [--kol-tone-border:var(--kol-oq-16)] [--kol-tone-fg:var(--kol-fg-96)]`,
|
|
11068
11069
|
children: "Reset"
|
|
11069
11070
|
}),
|
|
11070
|
-
/* @__PURE__ */
|
|
11071
|
-
/* @__PURE__ */
|
|
11071
|
+
/* @__PURE__ */ F("span", { className: "flex-1" }),
|
|
11072
|
+
/* @__PURE__ */ F(j, {
|
|
11072
11073
|
size: "sm",
|
|
11073
11074
|
tone: "secondary",
|
|
11074
11075
|
onClick: n,
|
|
11075
|
-
className: `${
|
|
11076
|
+
className: `${Yo} w-20 [--kol-tone-bg:var(--kol-oq-08)] [--kol-tone-border:var(--kol-oq-16)] [--kol-tone-fg:var(--kol-fg-96)]`,
|
|
11076
11077
|
children: "Cancel"
|
|
11077
11078
|
}),
|
|
11078
|
-
/* @__PURE__ */
|
|
11079
|
+
/* @__PURE__ */ F(j, {
|
|
11079
11080
|
size: "sm",
|
|
11080
11081
|
tone: "primary",
|
|
11081
11082
|
onClick: () => {
|
|
11082
11083
|
r.apply(), n();
|
|
11083
11084
|
},
|
|
11084
11085
|
disabled: !r.canApply,
|
|
11085
|
-
className: `${
|
|
11086
|
+
className: `${Yo} w-[106px] [--kol-tone-bg:var(--kol-fg-96)] [--kol-tone-fg:var(--kol-surface-primary)]`,
|
|
11086
11087
|
children: "Apply"
|
|
11087
11088
|
})
|
|
11088
11089
|
] }),
|
|
11089
|
-
children: /* @__PURE__ */
|
|
11090
|
+
children: /* @__PURE__ */ F("div", {
|
|
11090
11091
|
"data-section-body": d.key,
|
|
11091
|
-
children: d.groups.map((e, t) => /* @__PURE__ */
|
|
11092
|
+
children: d.groups.map((e, t) => /* @__PURE__ */ F(Zo, {
|
|
11092
11093
|
g: e,
|
|
11093
11094
|
t: r,
|
|
11094
11095
|
more: l,
|
|
@@ -11097,53 +11098,53 @@ function Qo({ id: e, open: t, onClose: n }) {
|
|
|
11097
11098
|
})
|
|
11098
11099
|
});
|
|
11099
11100
|
}
|
|
11100
|
-
function
|
|
11101
|
-
let { dialog: e } =
|
|
11101
|
+
function es() {
|
|
11102
|
+
let { dialog: e } = ut();
|
|
11102
11103
|
return $t(() => {
|
|
11103
|
-
let e = (e) =>
|
|
11104
|
+
let e = (e) => lt(e.detail?.window ?? "generate", e.detail?.form ?? "rail");
|
|
11104
11105
|
return window.addEventListener("kol:open-generator-window", e), () => window.removeEventListener("kol:open-generator-window", e);
|
|
11105
|
-
}, []), e ? /* @__PURE__ */
|
|
11106
|
+
}, []), e ? /* @__PURE__ */ F($o, {
|
|
11106
11107
|
id: e,
|
|
11107
11108
|
open: !0,
|
|
11108
|
-
onClose: () =>
|
|
11109
|
+
onClose: () => st({ dialog: null })
|
|
11109
11110
|
}, e) : null;
|
|
11110
11111
|
}
|
|
11111
11112
|
//#endregion
|
|
11112
11113
|
//#region src/packs/generators.js
|
|
11113
|
-
var
|
|
11114
|
+
var ts = {
|
|
11114
11115
|
layerTypes: [
|
|
11115
11116
|
"loop",
|
|
11116
11117
|
"misc",
|
|
11117
11118
|
"generate"
|
|
11118
11119
|
],
|
|
11119
|
-
GROUPS:
|
|
11120
|
-
loopById:
|
|
11121
|
-
loopDrawParams:
|
|
11122
|
-
resolveCameraKeys:
|
|
11123
|
-
loopBgToggleable:
|
|
11124
|
-
presetById:
|
|
11125
|
-
presetParams:
|
|
11126
|
-
presetsInGroup:
|
|
11127
|
-
presetsInSub:
|
|
11128
|
-
presetLayerPatch:
|
|
11129
|
-
isToolPreset:
|
|
11130
|
-
groupById:
|
|
11131
|
-
drawLoopFrame:
|
|
11120
|
+
GROUPS: Be,
|
|
11121
|
+
loopById: $e,
|
|
11122
|
+
loopDrawParams: Te,
|
|
11123
|
+
resolveCameraKeys: we,
|
|
11124
|
+
loopBgToggleable: ke,
|
|
11125
|
+
presetById: xe,
|
|
11126
|
+
presetParams: Ee,
|
|
11127
|
+
presetsInGroup: Ce,
|
|
11128
|
+
presetsInSub: Se,
|
|
11129
|
+
presetLayerPatch: Qe,
|
|
11130
|
+
isToolPreset: et,
|
|
11131
|
+
groupById: De,
|
|
11132
|
+
drawLoopFrame: ve,
|
|
11132
11133
|
GENERATIVE_TREE: an,
|
|
11133
11134
|
MISC_TREE: on,
|
|
11134
|
-
THEME_OPTIONS:
|
|
11135
|
+
THEME_OPTIONS: ge,
|
|
11135
11136
|
buildParatypeFlattenGroup: pn,
|
|
11136
11137
|
LoopPicker: Tn,
|
|
11137
11138
|
LoopFields: Lr,
|
|
11138
11139
|
stepFromPreset: zr,
|
|
11139
|
-
generateParamsFor:
|
|
11140
|
-
generateMarks:
|
|
11141
|
-
generateBody:
|
|
11142
|
-
GenerateLayer:
|
|
11143
|
-
GeneratorRail:
|
|
11144
|
-
GeneratorWindows:
|
|
11145
|
-
loadGlHost: () => import("./host-
|
|
11140
|
+
generateParamsFor: fa,
|
|
11141
|
+
generateMarks: ya,
|
|
11142
|
+
generateBody: ba,
|
|
11143
|
+
GenerateLayer: ja,
|
|
11144
|
+
GeneratorRail: Jo,
|
|
11145
|
+
GeneratorWindows: es,
|
|
11146
|
+
loadGlHost: () => import("./host-CRRiwlrB.js")
|
|
11146
11147
|
};
|
|
11147
|
-
y("generators",
|
|
11148
|
+
y("generators", ts);
|
|
11148
11149
|
//#endregion
|
|
11149
|
-
export { Cn as _, Rr as a, on as b, Qn as c, Xn as d, En as f, Sn as g, yn as h, zr as i, $n as l, wn as m, Hr as n, Lr as o, gn as p, Vr as r, jr as s,
|
|
11150
|
+
export { Cn as _, Rr as a, on as b, Qn as c, Xn as d, En as f, Sn as g, yn as h, zr as i, $n as l, wn as m, Hr as n, Lr as o, gn as p, Vr as r, jr as s, ts as t, Zn as u, hn as v, an as y };
|