@kolkrabbi/design-editor 0.46.0 → 0.48.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/{BindDot-B0VcuOag.js → BindDot-Cx-M0iQt.js} +9 -8
- package/dist/{BufferResource-BfLgK37S.js → BufferResource-Di5teicy.js} +2 -2
- package/dist/{CanvasPool-YNSF8hsR.js → CanvasPool-JdLj49b-.js} +1 -1
- package/dist/CanvasRenderer-fXDObOOi.js +2 -0
- package/dist/{FederatedEventTarget-BJgROaRQ.js → FederatedEventTarget-CH0bzxx1.js} +1 -1
- package/dist/{FilterSystem-BUrPNXx-.js → FilterSystem-C-ZoyuTO.js} +3 -3
- package/dist/{Geometry-C5s5KpWq.js → Geometry-D4tiuMOr.js} +1 -1
- package/dist/KolboxView-BjYfn_tl.js +21615 -0
- package/dist/{RenderTargetSystem-oFwWv5IW.js → RenderTargetSystem-Bom_vhlS.js} +1 -1
- package/dist/{Timeline-Ck1rBV8S.js → Timeline-CRr43b4B.js} +49 -53
- package/dist/TreePicker-DXsAlHK6.js +209 -0
- package/dist/WebGLRenderer-4hvrGmfW.js +2 -0
- package/dist/WebGPURenderer-BjzMV7Pg.js +2 -0
- package/dist/__vite-browser-external-y2xWjzgx.js +780 -0
- package/dist/browserAll-BFE0MRLW.js +6 -0
- package/dist/{canvasUtils-BoNfkAod.js → canvasUtils-DUNsu3ct.js} +1 -1
- package/dist/{core-BBb9Tk4Q.js → core-BbKj9Svq.js} +5877 -8206
- package/dist/core.js +6 -5
- package/dist/design-editor.css +2 -1
- package/dist/design-editor.js +7 -3644
- package/dist/{effectCategories-Ccye-8LP.js → effectCategories-wHY9ih8L.js} +8966 -4985
- package/dist/effects-D7J0e5xl.js +447 -0
- package/dist/effects.js +1 -1
- package/dist/{generators-BdVXv0jY.js → generators-BtRZ3Stj.js} +2473 -2538
- package/dist/generators.js +1 -1
- package/dist/{getTextureBatchBindGroup-CNWhZRbV.js → getTextureBatchBindGroup-ZMqkwiZS.js} +1 -1
- package/dist/{host-meUhieO9.js → host-0qv2SCjk.js} +1 -1
- package/dist/{host-9pJ7NvnR.js → host-II9SeVCH.js} +50 -50
- package/dist/init-DkGhdexn.js +4 -0
- package/dist/kolbox-sheet.js +0 -0
- package/dist/kolbox.css +3 -0
- package/dist/{morphStore-D6mkLJ-8.js → morphStore-s-rjCe-y.js} +1 -1
- package/dist/{motion-wsc6Qd7S.js → motion-CKtZAccJ.js} +765 -762
- package/dist/motion.js +1 -1
- package/dist/{pipeline-CMpuPUaX.js → pipeline-hZsOKbHd.js} +12 -12
- package/dist/{previewScale-SYKvfhUm.js → previewScale-C6EBx--U.js} +8 -8
- package/dist/{rolls-KpWCAeDv.js → rolls-Cnu6g8th.js} +10671 -4810
- package/dist/src-3UkpFoNW.js +3430 -0
- package/dist/{src-B5o6fGRJ.js → src-D-TQbBo2.js} +1 -2
- package/dist/{store-iBb0I6hk.js → store-YIW6P2zN.js} +289 -269
- package/dist/useLayerEdit-W_Tf3adq.js +455 -0
- package/dist/webworkerAll-0WBQ2FBr.js +2 -0
- package/package.json +16 -13
- package/dist/CanvasRenderer-Bl0rlqNq.js +0 -2
- package/dist/TreePicker-Dv0zpJwe.js +0 -166
- package/dist/WebGLRenderer-CXxpVIx3.js +0 -2
- package/dist/WebGPURenderer-BwLEUYBa.js +0 -2
- package/dist/browserAll-CAzdTUbR.js +0 -6
- package/dist/chunk-3b4jIN3o.js +0 -13
- package/dist/effects-B47bpwGh.js +0 -447
- package/dist/init-jApIMi04.js +0 -4
- package/dist/useLayerEdit-Ba7RA6qX.js +0 -454
- package/dist/webworkerAll-DEZhpG90.js +0 -2
package/dist/generators.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "./generators-
|
|
1
|
+
import { t as e } from "./generators-BtRZ3Stj.js";
|
|
2
2
|
export { e as generators };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as e, d as t } from "./Geometry-
|
|
1
|
+
import { E as e, d as t } from "./Geometry-D4tiuMOr.js";
|
|
2
2
|
//#region ../../node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/batcher/gpu/getTextureBatchBindGroup.mjs
|
|
3
3
|
var n = {};
|
|
4
4
|
function r(e, t, r) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as e } from "./previewScale-
|
|
1
|
+
import { n as e } from "./previewScale-C6EBx--U.js";
|
|
2
2
|
import { Dt as t, Et as n, G as r, Gt as i, Ht as a, Ut as o, Vt as s, W as c, _ as l, _t as u, a as d, et as f, f as p, gt as m, h, ht as g, m as _, p as v, t as y, v as b } from "./OrbitControls-DVpLgmKv.js";
|
|
3
3
|
//#region src/filters/gl/synthBase.js
|
|
4
4
|
var x = "\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = vec4(position.xy, 0.0, 1.0);\n }\n", S = class {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { n as x, r as re } from "./previewScale-
|
|
1
|
+
import { i as e, o as t } from "./__vite-browser-external-y2xWjzgx.js";
|
|
2
|
+
import { $ as n, B as r, G as i, H as a, J as o, K as s, Q as c, R as l, U as u, V as d, W as f, X as p, Y as m, Z as h, et as g, q as _, yt as v, z as y } from "./effectCategories-wHY9ih8L.js";
|
|
3
|
+
import { C as ee, E as te, T as b, w as ne } from "./generators-BtRZ3Stj.js";
|
|
4
|
+
import { n as x, r as re } from "./previewScale-C6EBx--U.js";
|
|
5
5
|
import { A as ie, At as ae, Bt as S, C as oe, D as se, Dt as C, E as ce, Et as w, F as le, Gt as T, Ht as E, Kt as ue, L as D, Lt as de, N as fe, Nt as pe, O, P as me, Pt as he, Rt as ge, S as k, T as A, Ut as _e, Vt as j, _t as M, a as N, at as ve, b as ye, bt as be, c as xe, d as P, et as F, f as I, g as Se, gt as L, h as Ce, ht as we, i as Te, it as Ee, jt as De, k as Oe, m as R, mt as ke, n as Ae, nt as je, o as Me, ot as Ne, p as z, pt as Pe, r as Fe, rt as Ie, st as Le, t as B, tt as Re, u as ze, v as V, vt as Be, x as Ve, yt as He, zt as Ue } from "./OrbitControls-DVpLgmKv.js";
|
|
6
6
|
import { n as We, t as Ge } from "./BufferGeometryUtils-Cc8LNd5v.js";
|
|
7
7
|
//#region src/loops/gl/DriftEngine.js
|
|
@@ -32,7 +32,7 @@ var Ke = {
|
|
|
32
32
|
antialias: !0,
|
|
33
33
|
preserveDrawingBuffer: !0
|
|
34
34
|
}), this.scene = new w(), this.cam = new R();
|
|
35
|
-
let t =
|
|
35
|
+
let t = n[this.family][0];
|
|
36
36
|
this.uniforms = {
|
|
37
37
|
uPhase: { value: 0 },
|
|
38
38
|
uAspect: { value: 1 },
|
|
@@ -82,7 +82,7 @@ var Ke = {
|
|
|
82
82
|
t.uLight.value.set(Math.cos(n), Math.sin(n));
|
|
83
83
|
}
|
|
84
84
|
if (e.period != null && (this.period = e.period), e.speed != null && (this.speed = e.speed), e.style != null && (t.uStyle.value = Ke[e.style] ?? 0), e.palette != null) {
|
|
85
|
-
let n =
|
|
85
|
+
let n = g(this.family, e.palette);
|
|
86
86
|
t.uColors.value = n.cols.map(H), t.uBase.value = H(n.base);
|
|
87
87
|
}
|
|
88
88
|
}
|
|
@@ -161,7 +161,7 @@ var Ke = {
|
|
|
161
161
|
uShape: { value: 0 },
|
|
162
162
|
uSides: { value: 6 },
|
|
163
163
|
uBg: { value: U("#000000") },
|
|
164
|
-
uColors: { value:
|
|
164
|
+
uColors: { value: m[0].cols.map(U) }
|
|
165
165
|
}, this.mat = new C({
|
|
166
166
|
vertexShader: Qe,
|
|
167
167
|
fragmentShader: $e,
|
|
@@ -178,18 +178,18 @@ var Ke = {
|
|
|
178
178
|
}
|
|
179
179
|
setParams(e) {
|
|
180
180
|
if (!this.uniforms) return;
|
|
181
|
-
let t = e.look ?
|
|
181
|
+
let t = e.look ? o.find((t) => t.value === e.look) : null;
|
|
182
182
|
t?.p && (e = {
|
|
183
183
|
...e,
|
|
184
184
|
...t.p
|
|
185
185
|
});
|
|
186
186
|
let n = this.uniforms;
|
|
187
|
-
if (e.cat != null && (n.uCat.value = Math.round(e.cat)), e.form != null && (n.uType.value = Math.round(e.form)), e.count != null && (n.uCount.value = Math.max(1, Math.min(6, Math.round(e.count)))), e.size != null && (n.uSize.value = e.size), e.spread != null && (n.uSpread.value = e.spread), e.irid != null && (n.uIrid.value = e.irid), e.hue != null && (n.uHue.value = e.hue), e.sheen != null && (n.uSheen.value = e.sheen), e.gloss != null && (n.uGloss.value = e.gloss), n.uRelief.value = e.relief ?? .9, e.warp != null && (n.uWarp.value = e.warp), e.grain != null && (n.uGrain.value = e.grain), e.spectral != null && (n.uSpectral.value = +!!e.spectral), e.angle != null && (n.uAngle.value = e.angle), n.uFreq.value = e.freq ?? 2, e.winds != null && (n.uWinds.value = e.winds), e.pitch != null && (n.uPitch.value = e.pitch), e.petals != null && (n.uPetals.value = e.petals), n.uSpin.value = e.spin ?? 1, e.mouth != null && (n.uMouth.value = e.mouth), n.uSquash.value = e.squash ?? 1.4, n.uDrop.value = e.drop ?? -.15, n.uPosX.value = e.posX ?? 0, n.uSoft.value = e.soft ?? .4, n.uLines.value = e.lines ?? 0, n.uShape.value = Math.max(0,
|
|
188
|
-
let t =
|
|
187
|
+
if (e.cat != null && (n.uCat.value = Math.round(e.cat)), e.form != null && (n.uType.value = Math.round(e.form)), e.count != null && (n.uCount.value = Math.max(1, Math.min(6, Math.round(e.count)))), e.size != null && (n.uSize.value = e.size), e.spread != null && (n.uSpread.value = e.spread), e.irid != null && (n.uIrid.value = e.irid), e.hue != null && (n.uHue.value = e.hue), e.sheen != null && (n.uSheen.value = e.sheen), e.gloss != null && (n.uGloss.value = e.gloss), n.uRelief.value = e.relief ?? .9, e.warp != null && (n.uWarp.value = e.warp), e.grain != null && (n.uGrain.value = e.grain), e.spectral != null && (n.uSpectral.value = +!!e.spectral), e.angle != null && (n.uAngle.value = e.angle), n.uFreq.value = e.freq ?? 2, e.winds != null && (n.uWinds.value = e.winds), e.pitch != null && (n.uPitch.value = e.pitch), e.petals != null && (n.uPetals.value = e.petals), n.uSpin.value = e.spin ?? 1, e.mouth != null && (n.uMouth.value = e.mouth), n.uSquash.value = e.squash ?? 1.4, n.uDrop.value = e.drop ?? -.15, n.uPosX.value = e.posX ?? 0, n.uSoft.value = e.soft ?? .4, n.uLines.value = e.lines ?? 0, n.uShape.value = Math.max(0, p.indexOf(e.shape ?? "circle")), n.uSides.value = e.sides ?? 6, e.speed != null && (this.speed = e.speed), e.palette != null) {
|
|
188
|
+
let t = m.find((t) => t.value === e.palette) || m[0];
|
|
189
189
|
n.uColors.value = t.cols.map(U);
|
|
190
190
|
}
|
|
191
191
|
if (e.backdrop != null) {
|
|
192
|
-
let t =
|
|
192
|
+
let t = _.find((t) => t.value === e.backdrop) || _[0];
|
|
193
193
|
n.uBg.value = U(t.col);
|
|
194
194
|
}
|
|
195
195
|
}
|
|
@@ -256,7 +256,7 @@ var Ke = {
|
|
|
256
256
|
uDir: { value: new j(.3, .95) },
|
|
257
257
|
uBgFade: { value: new j(.2, 1.9) },
|
|
258
258
|
uBg: { value: G("#000000") },
|
|
259
|
-
uColors: { value:
|
|
259
|
+
uColors: { value: m[0].cols.map(G) },
|
|
260
260
|
uType: { value: Array(W).fill(2) },
|
|
261
261
|
uPos: { value: Array.from({ length: W }, () => new j()) },
|
|
262
262
|
uScale: { value: Array.from({ length: W }, () => new j(.6, .6)) },
|
|
@@ -309,11 +309,11 @@ var Ke = {
|
|
|
309
309
|
t.uDir.value.set(Math.sin(n), Math.cos(n));
|
|
310
310
|
}
|
|
311
311
|
if (e.speed != null && (this.speed = e.speed), e.forms && this.setForms(e.forms), e.palette != null) {
|
|
312
|
-
let n =
|
|
312
|
+
let n = m.find((t) => t.value === e.palette) || m[0];
|
|
313
313
|
t.uColors.value = n.cols.map(G);
|
|
314
314
|
}
|
|
315
315
|
if (e.backdrop != null) {
|
|
316
|
-
let n =
|
|
316
|
+
let n = _.find((t) => t.value === e.backdrop) || _[0];
|
|
317
317
|
t.uBg.value = G(n.col);
|
|
318
318
|
}
|
|
319
319
|
}
|
|
@@ -382,7 +382,7 @@ var Ke = {
|
|
|
382
382
|
uMetaball: { value: 0 },
|
|
383
383
|
uDir: { value: new j(.3, .95) },
|
|
384
384
|
uBg: { value: q("#000000") },
|
|
385
|
-
uColors: { value:
|
|
385
|
+
uColors: { value: m[0].cols.map(q) },
|
|
386
386
|
uType: { value: Array(K).fill(0) },
|
|
387
387
|
uPos3: { value: Array.from({ length: K }, () => new E()) },
|
|
388
388
|
uScale3: { value: Array.from({ length: K }, () => new E(.7, .7, .7)) },
|
|
@@ -431,11 +431,11 @@ var Ke = {
|
|
|
431
431
|
t.uDir.value.set(Math.sin(n), Math.cos(n));
|
|
432
432
|
}
|
|
433
433
|
if (e.speed != null && (this.speed = e.speed), e.forms && this.setForms(e.forms), e.palette != null) {
|
|
434
|
-
let n =
|
|
434
|
+
let n = m.find((t) => t.value === e.palette) || m[0];
|
|
435
435
|
t.uColors.value = n.cols.map(q);
|
|
436
436
|
}
|
|
437
437
|
if (e.backdrop != null) {
|
|
438
|
-
let n =
|
|
438
|
+
let n = _.find((t) => t.value === e.backdrop) || _[0];
|
|
439
439
|
t.uBg.value = q(n.col);
|
|
440
440
|
}
|
|
441
441
|
}
|
|
@@ -791,7 +791,7 @@ var bt = "#0b0b0e", xt = .004, St = 24, Ct = class {
|
|
|
791
791
|
0,
|
|
792
792
|
0,
|
|
793
793
|
0
|
|
794
|
-
]], this.setCount(1), this.axes = new xe(1), this.axes.material.transparent = !0, this.axes.material.opacity = .7, this.axes.visible = !1, this.scene.add(this.axes), this.presets = Object.fromEntries(
|
|
794
|
+
]], this.setCount(1), this.axes = new xe(1), this.axes.material.transparent = !0, this.axes.material.opacity = .7, this.axes.visible = !1, this.scene.add(this.axes), this.presets = Object.fromEntries(c.map((e) => [e.id, e.sample])), this.dur = 8, this.accum = 0, this.last = performance.now(), this.recording = !1, this._recStop = null, this.globals = {
|
|
795
795
|
preset: "spin",
|
|
796
796
|
animMode: "preset",
|
|
797
797
|
keyframes: [],
|
|
@@ -958,7 +958,7 @@ var bt = "#0b0b0e", xt = .004, St = 24, Ct = class {
|
|
|
958
958
|
this.color = e.color || this.color, this.roughness = e.roughness ?? this.roughness, this.metalness = e.metalness ?? this.metalness, this.flat = !!e.flatShading, this.setMaterialType(e.materialType || "standard"), this.applyMaterialProps();
|
|
959
959
|
let t = !!e.wireframe;
|
|
960
960
|
for (let e of this.items) e.mesh.visible = !t, e.wire.visible = t;
|
|
961
|
-
this.lineMat.linewidth = (e.strokeWidth ?? 3) * xt, e.rounding != null && e.rounding !== this.rounding && (this.rounding = e.rounding, this.primId === "box" && (r = !0)), this.setCount(e.count ?? 1), this.layoutPos =
|
|
961
|
+
this.lineMat.linewidth = (e.strokeWidth ?? 3) * xt, e.rounding != null && e.rounding !== this.rounding && (this.rounding = e.rounding, this.primId === "box" && (r = !0)), this.setCount(e.count ?? 1), this.layoutPos = h(e.arrangement || "single", e.count ?? 1, e.spread ?? 2.2), e.duration && (this.dur = e.duration), e.fov != null && e.fov !== this.camera.fov && (this.camera.fov = e.fov, this.camera.updateProjectionMatrix()), this.scene.environment = e.environment ? this.ensureEnv() : null, this.axes.visible = !!e.showAxis, this.axes.scale.setScalar(e.axisLength ?? 1.5), this.axes.material.opacity = e.axisOpacity ?? .7;
|
|
962
962
|
}
|
|
963
963
|
r && this.rebuildGeometry();
|
|
964
964
|
}
|
|
@@ -1096,7 +1096,7 @@ var Dt = class {
|
|
|
1096
1096
|
}, this.onProgress = null, this.autoLoop && (this.raf = requestAnimationFrame(this.loop));
|
|
1097
1097
|
}
|
|
1098
1098
|
_rebuild() {
|
|
1099
|
-
this.count =
|
|
1099
|
+
this.count = f(this.form, this.samples), this.posArr = new Float32Array(this.count * 3), this.colArr = new Float32Array(this.count * 3), this.vparArr = new Float32Array(this.count), s(this.form, this.samples, this.vparArr);
|
|
1100
1100
|
let e = new z();
|
|
1101
1101
|
e.setAttribute("position", new I(this.posArr, 3)), e.setAttribute("color", new I(this.colArr, 3));
|
|
1102
1102
|
let t = this.geometry;
|
|
@@ -1146,7 +1146,7 @@ var Dt = class {
|
|
|
1146
1146
|
dur: this.dur
|
|
1147
1147
|
});
|
|
1148
1148
|
let r = (this.dur > 0 ? n / this.dur : 0) * wt * (t.cycles ?? 2);
|
|
1149
|
-
if (
|
|
1149
|
+
if (i(this.form, this.samples, r, {
|
|
1150
1150
|
amp: t.amp ?? .35,
|
|
1151
1151
|
turns: t.turns,
|
|
1152
1152
|
radius: t.radius,
|
|
@@ -1255,9 +1255,9 @@ var Dt = class {
|
|
|
1255
1255
|
}
|
|
1256
1256
|
_rebuild() {
|
|
1257
1257
|
let e = this.samples * this.samples;
|
|
1258
|
-
this.posArr = new Float32Array(e * 3), this.colArr = new Float32Array(e * 3), this.vparArr = new Float32Array(e),
|
|
1258
|
+
this.posArr = new Float32Array(e * 3), this.colArr = new Float32Array(e * 3), this.vparArr = new Float32Array(e), u(this.env, this.samples, this.vparArr);
|
|
1259
1259
|
let t = new z();
|
|
1260
|
-
t.setAttribute("position", new I(this.posArr, 3)), t.setAttribute("color", new I(this.colArr, 3)), t.setIndex(new I(
|
|
1260
|
+
t.setAttribute("position", new I(this.posArr, 3)), t.setAttribute("color", new I(this.colArr, 3)), t.setIndex(new I(r(this.env, this.samples), 1));
|
|
1261
1261
|
let n = this.geometry;
|
|
1262
1262
|
this.geometry = t, this.mesh.geometry = t, n.dispose(), this._recolor();
|
|
1263
1263
|
}
|
|
@@ -1306,7 +1306,7 @@ var Dt = class {
|
|
|
1306
1306
|
dur: this.dur
|
|
1307
1307
|
});
|
|
1308
1308
|
let r = (this.dur > 0 ? n / this.dur : 0) * Ot * (t.cycles ?? 2);
|
|
1309
|
-
if (
|
|
1309
|
+
if (a(this.env, this.samples, r, { amp: t.amp ?? .5 }, this.posArr), this.geometry.attributes.position.needsUpdate = !0, this.geometry.computeVertexNormals(), this.controls.autoRotate = !this.recording && !!t.spin && !t.paused && !d(this.env), this.controls.autoRotateSpeed = 2 * (t.spinSpeed ?? 1), this.controls.update(), this.w && this.h && this.renderer.render(this.scene, this.camera), this.recording && this.accum >= this.dur && this._recStop) {
|
|
1310
1310
|
let e = this._recStop;
|
|
1311
1311
|
this._recStop = null, e();
|
|
1312
1312
|
}
|
|
@@ -2206,23 +2206,23 @@ var dn = {
|
|
|
2206
2206
|
paused: !1,
|
|
2207
2207
|
speed: 0
|
|
2208
2208
|
};
|
|
2209
|
-
function fn(
|
|
2210
|
-
if (pn(
|
|
2211
|
-
let
|
|
2212
|
-
if (
|
|
2213
|
-
let
|
|
2214
|
-
|
|
2215
|
-
x:
|
|
2209
|
+
function fn(e, n, r) {
|
|
2210
|
+
if (pn(e, n, r), typeof n.setPointer == "function") {
|
|
2211
|
+
let e = t.getCtx().stage, i = r.w ?? 0, a = r.h ?? 0, o = null;
|
|
2212
|
+
if (e && i > 0 && a > 0) {
|
|
2213
|
+
let t = (e.x - (r.x ?? 0)) / i, n = (e.y - (r.y ?? 0)) / a;
|
|
2214
|
+
t >= 0 && t <= 1 && n >= 0 && n <= 1 && (o = {
|
|
2215
|
+
x: t,
|
|
2216
2216
|
y: n,
|
|
2217
|
-
down: !!
|
|
2217
|
+
down: !!e.down
|
|
2218
2218
|
});
|
|
2219
2219
|
}
|
|
2220
2220
|
n.setPointer(r.mouse === !1 ? null : o);
|
|
2221
2221
|
}
|
|
2222
|
-
|
|
2222
|
+
e.bgToggle && n.renderer?.setClearAlpha(r.bgOn === !1 ? 0 : 1);
|
|
2223
2223
|
}
|
|
2224
|
-
function pn(
|
|
2225
|
-
switch (
|
|
2224
|
+
function pn(t, n, r) {
|
|
2225
|
+
switch (t.engine) {
|
|
2226
2226
|
case "scene": {
|
|
2227
2227
|
an.set(n, r.duration ?? 8);
|
|
2228
2228
|
let e = {
|
|
@@ -2237,7 +2237,7 @@ function pn(e, n, r) {
|
|
|
2237
2237
|
globals: {
|
|
2238
2238
|
preset: r.pose,
|
|
2239
2239
|
animMode: r.animMode === "keyframes" || r.animMode === "keyframe" ? "keyframe" : "preset",
|
|
2240
|
-
keyframes: Array.isArray(r.keyframes) && r.keyframes.length ? r.keyframes :
|
|
2240
|
+
keyframes: Array.isArray(r.keyframes) && r.keyframes.length ? r.keyframes : b,
|
|
2241
2241
|
loop: !0,
|
|
2242
2242
|
paused: !1,
|
|
2243
2243
|
speed: 0,
|
|
@@ -2358,9 +2358,9 @@ function pn(e, n, r) {
|
|
|
2358
2358
|
}), r.background != null && n.setBackground(r.background);
|
|
2359
2359
|
return;
|
|
2360
2360
|
case "mesh": {
|
|
2361
|
-
let
|
|
2361
|
+
let t = r.mode === "grid" ? "grid" : "single", i = r.seed ?? 7, a = t === "grid" ? Array.from({ length: 9 }, (e, t) => i + t * 7919) : [i];
|
|
2362
2362
|
n.update({
|
|
2363
|
-
mode:
|
|
2363
|
+
mode: t,
|
|
2364
2364
|
idx: 0,
|
|
2365
2365
|
specs: a.map((e) => mn(e, r)),
|
|
2366
2366
|
globals: {
|
|
@@ -2371,30 +2371,30 @@ function pn(e, n, r) {
|
|
|
2371
2371
|
bg: r.bgAmount ?? .85,
|
|
2372
2372
|
bgStyle: r.bgStyle ?? 0
|
|
2373
2373
|
}
|
|
2374
|
-
}), n.setBackground(
|
|
2374
|
+
}), n.setBackground(e(r.themeId ?? "kol", !!r.themeInvert).bg);
|
|
2375
2375
|
return;
|
|
2376
2376
|
}
|
|
2377
2377
|
default: n.setParams(r);
|
|
2378
2378
|
}
|
|
2379
2379
|
}
|
|
2380
2380
|
function mn(e, t) {
|
|
2381
|
-
let
|
|
2382
|
-
|
|
2383
|
-
let
|
|
2381
|
+
let n = v(e);
|
|
2382
|
+
n(), n(), n();
|
|
2383
|
+
let r = n(), i = .12 + n() * .3, a = n() * Math.PI * 2, o = l.find((e) => e.id === t.palette) || l[0];
|
|
2384
2384
|
return {
|
|
2385
2385
|
seed: e,
|
|
2386
2386
|
shape: t.shape || "sphere",
|
|
2387
|
-
colors:
|
|
2387
|
+
colors: o.colors.map((e) => y(e, t.hueShift || 0)),
|
|
2388
2388
|
driver: t.driver ?? 0,
|
|
2389
|
-
distort: (t.distort ?? .5) * (.6 +
|
|
2390
|
-
rotSpeed:
|
|
2391
|
-
phase:
|
|
2389
|
+
distort: (t.distort ?? .5) * (.6 + r * .5),
|
|
2390
|
+
rotSpeed: i,
|
|
2391
|
+
phase: a
|
|
2392
2392
|
};
|
|
2393
2393
|
}
|
|
2394
|
-
function hn(
|
|
2395
|
-
if (
|
|
2396
|
-
else if (
|
|
2397
|
-
let
|
|
2394
|
+
function hn(e, n, { u: r, dt: i }) {
|
|
2395
|
+
if (e.drive === "phase") n.renderAtPhase(r);
|
|
2396
|
+
else if (e.drive === "seek") {
|
|
2397
|
+
let e = an.get(n), i = e ? ne(r, ee(e, t.getLoopSeconds())) : r;
|
|
2398
2398
|
n.seek(i), n.frame(0);
|
|
2399
2399
|
} else n.frame(i);
|
|
2400
2400
|
}
|
|
File without changes
|