manim-web 0.22.0 → 0.23.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/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/integrations/react.js +17 -17
- package/dist/integrations/vue.js +16 -16
- package/dist/lottie-fy5zaR1g.js +7057 -0
- package/dist/manim-web.browser.js +1105 -857
- package/dist/mobjects/lottie/LottieMobject.d.ts +211 -0
- package/dist/mobjects/lottie/LottieMobject.d.ts.map +1 -0
- package/dist/mobjects/lottie/index.d.ts +2 -0
- package/dist/mobjects/lottie/index.d.ts.map +1 -0
- package/dist/{src-C18aslV3.js → src-BRT6RDfk.js} +1087 -839
- package/package.json +2 -1
|
@@ -40611,7 +40611,7 @@ var jg = class e {
|
|
|
40611
40611
|
if (this.isHeadless) throw Error("export() is not available in headless mode. Create a Scene with a container for rendering and exporting.");
|
|
40612
40612
|
let n = e.slice(e.lastIndexOf(".")).toLowerCase(), r;
|
|
40613
40613
|
if (n === ".gif") {
|
|
40614
|
-
let { GifExporter: n } = await Promise.resolve().then(() =>
|
|
40614
|
+
let { GifExporter: n } = await Promise.resolve().then(() => ij);
|
|
40615
40615
|
r = await new n(this, {
|
|
40616
40616
|
fps: t?.fps,
|
|
40617
40617
|
quality: t?.quality,
|
|
@@ -40623,7 +40623,7 @@ var jg = class e {
|
|
|
40623
40623
|
workers: t?.workers
|
|
40624
40624
|
}).exportTimeline(t?.duration), n.download(r, e);
|
|
40625
40625
|
} else if (n === ".webm" || n === ".mp4" || n === ".mov") {
|
|
40626
|
-
let { VideoExporter: i } = await Promise.resolve().then(() =>
|
|
40626
|
+
let { VideoExporter: i } = await Promise.resolve().then(() => cj), a = n === ".mp4" ? "mp4" : n === ".mov" ? "mov" : "webm";
|
|
40627
40627
|
r = await new i(this, {
|
|
40628
40628
|
fps: t?.fps,
|
|
40629
40629
|
quality: t?.quality,
|
|
@@ -63207,11 +63207,259 @@ var AE = class e extends Ds {
|
|
|
63207
63207
|
dispose() {
|
|
63208
63208
|
super.dispose(), this._video &&= (this._video.pause(), this._video.removeAttribute("src"), this._video.load(), null), this._texture &&= (this._texture.dispose(), null);
|
|
63209
63209
|
}
|
|
63210
|
-
}, jE =
|
|
63211
|
-
function
|
|
63210
|
+
}, jE = null;
|
|
63211
|
+
function ME(e) {
|
|
63212
|
+
jE = e;
|
|
63213
|
+
}
|
|
63214
|
+
async function NE() {
|
|
63215
|
+
let t = await import("./lottie-fy5zaR1g.js").then((t) => /* @__PURE__ */ e(t.default, 1));
|
|
63216
|
+
return t.default ?? t;
|
|
63217
|
+
}
|
|
63218
|
+
async function PE(e) {
|
|
63219
|
+
return e || (jE ? jE() : NE());
|
|
63220
|
+
}
|
|
63221
|
+
var FE = 512, IE = 30, LE = class e extends Ds {
|
|
63222
|
+
_animationData;
|
|
63223
|
+
_loop;
|
|
63224
|
+
_speed;
|
|
63225
|
+
_width;
|
|
63226
|
+
_height;
|
|
63227
|
+
_scaleToFit;
|
|
63228
|
+
_centerPoint;
|
|
63229
|
+
_doubleSided;
|
|
63230
|
+
_injectedPlayer;
|
|
63231
|
+
_canvas = null;
|
|
63232
|
+
_texture = null;
|
|
63233
|
+
_animation = null;
|
|
63234
|
+
_totalFrames = 0;
|
|
63235
|
+
_frameRate = IE;
|
|
63236
|
+
_naturalWidth = FE;
|
|
63237
|
+
_naturalHeight = FE;
|
|
63238
|
+
_loaded = !1;
|
|
63239
|
+
_loadError = null;
|
|
63240
|
+
_playing = !1;
|
|
63241
|
+
_playhead = 0;
|
|
63242
|
+
_mesh = null;
|
|
63243
|
+
_loadPromise;
|
|
63244
|
+
_loadResolve = null;
|
|
63245
|
+
_loadReject = null;
|
|
63246
|
+
constructor(e) {
|
|
63247
|
+
super();
|
|
63248
|
+
let { animationData: t, loop: n = !1, speed: r = 1, width: i, height: a, scaleToFit: o = !0, center: s = [
|
|
63249
|
+
0,
|
|
63250
|
+
0,
|
|
63251
|
+
0
|
|
63252
|
+
], opacity: c = 1, doubleSided: l = !1, player: u } = e;
|
|
63253
|
+
this._animationData = t, this._loop = n, this._speed = r, this._width = i, this._height = a, this._scaleToFit = o, this._centerPoint = [...s], this._doubleSided = l, this._opacity = c, this._injectedPlayer = u, t && (this._naturalWidth = t.w ?? FE, this._naturalHeight = t.h ?? FE, typeof t.fr == "number" && t.fr > 0 && (this._frameRate = t.fr)), this.position.set(s[0], s[1], s[2]), this._loadPromise = new Promise((e, t) => {
|
|
63254
|
+
this._loadResolve = e, this._loadReject = t;
|
|
63255
|
+
}), this.addUpdater((e, t) => {
|
|
63256
|
+
this._playing && (this._playhead += t * this._speed, this._applyTime(this._playhead));
|
|
63257
|
+
}), this._createCanvasTexture(), this._load();
|
|
63258
|
+
}
|
|
63259
|
+
static async fromUrl(t, n = {}) {
|
|
63260
|
+
let { fetchImpl: r, ...i } = n, a = r ?? (typeof fetch < "u" ? fetch : void 0);
|
|
63261
|
+
if (!a) throw Error("Failed to load Lottie: no fetch available (no DOM/network)");
|
|
63262
|
+
let o = await a(t);
|
|
63263
|
+
if (!o.ok) throw Error(`Failed to load Lottie from "${t}": HTTP ${o.status}`);
|
|
63264
|
+
let s = await o.json(), c = new e({
|
|
63265
|
+
...i,
|
|
63266
|
+
animationData: s
|
|
63267
|
+
});
|
|
63268
|
+
return await c.waitForLoad(), c;
|
|
63269
|
+
}
|
|
63270
|
+
_createCanvasTexture() {
|
|
63271
|
+
if (typeof document > "u" || typeof document.createElement != "function") return;
|
|
63272
|
+
let e = document.createElement("canvas");
|
|
63273
|
+
e.width = Math.max(1, Math.round(this._naturalWidth)), e.height = Math.max(1, Math.round(this._naturalHeight)), this._canvas = e;
|
|
63274
|
+
let t = new a.CanvasTexture(e);
|
|
63275
|
+
t.colorSpace = a.SRGBColorSpace, t.minFilter = a.LinearFilter, t.magFilter = a.LinearFilter, this._texture = t;
|
|
63276
|
+
}
|
|
63277
|
+
async _load() {
|
|
63278
|
+
if (!this._animationData) {
|
|
63279
|
+
this._failLoad(/* @__PURE__ */ Error("Failed to load Lottie: no animationData provided"));
|
|
63280
|
+
return;
|
|
63281
|
+
}
|
|
63282
|
+
if (!this._canvas) {
|
|
63283
|
+
this._failLoad(/* @__PURE__ */ Error("Failed to load Lottie: no DOM (canvas is unavailable)"));
|
|
63284
|
+
return;
|
|
63285
|
+
}
|
|
63286
|
+
try {
|
|
63287
|
+
let e = await PE(this._injectedPlayer), t = this._canvas.getContext("2d") ?? void 0, n = e.loadAnimation({
|
|
63288
|
+
container: this._canvas,
|
|
63289
|
+
renderer: "canvas",
|
|
63290
|
+
loop: this._loop,
|
|
63291
|
+
autoplay: !1,
|
|
63292
|
+
animationData: this._animationData,
|
|
63293
|
+
rendererSettings: {
|
|
63294
|
+
context: t,
|
|
63295
|
+
canvas: this._canvas,
|
|
63296
|
+
clearCanvas: !0
|
|
63297
|
+
}
|
|
63298
|
+
});
|
|
63299
|
+
this._animation = n, this._totalFrames = n.totalFrames > 0 ? n.totalFrames : 0, n.frameRate > 0 && (this._frameRate = n.frameRate), this._speed !== 1 && typeof n.setSpeed == "function" && n.setSpeed(this._speed), this._loaded = !0, this._seekFrame(0), this._updateGeometry(), this._markDirty(), this._loadResolve && (this._loadResolve(), this._loadResolve = null, this._loadReject = null);
|
|
63300
|
+
} catch (e) {
|
|
63301
|
+
let t = e instanceof Error ? e.message : String(e);
|
|
63302
|
+
this._failLoad(/* @__PURE__ */ Error(`Failed to load Lottie: ${t}`));
|
|
63303
|
+
}
|
|
63304
|
+
}
|
|
63305
|
+
_failLoad(e) {
|
|
63306
|
+
this._loadError = e, this._loadReject && (this._loadReject(e), this._loadReject = null, this._loadResolve = null);
|
|
63307
|
+
}
|
|
63308
|
+
async waitForLoad() {
|
|
63309
|
+
return this._loadPromise;
|
|
63310
|
+
}
|
|
63311
|
+
getLoadError() {
|
|
63312
|
+
return this._loadError;
|
|
63313
|
+
}
|
|
63314
|
+
isLoaded() {
|
|
63315
|
+
return this._loaded;
|
|
63316
|
+
}
|
|
63317
|
+
getTotalFrames() {
|
|
63318
|
+
return this._totalFrames;
|
|
63319
|
+
}
|
|
63320
|
+
getFrameRate() {
|
|
63321
|
+
return this._frameRate;
|
|
63322
|
+
}
|
|
63323
|
+
get duration() {
|
|
63324
|
+
return this._frameRate > 0 ? this._totalFrames / this._frameRate : 0;
|
|
63325
|
+
}
|
|
63326
|
+
_frameForTime(e) {
|
|
63327
|
+
let t = this._totalFrames;
|
|
63328
|
+
if (t <= 0) return 0;
|
|
63329
|
+
let n = e * (this._frameRate > 0 ? this._frameRate : IE) * this._speed;
|
|
63330
|
+
return n = this._loop ? (n % t + t) % t : Math.max(0, Math.min(n, t)), n;
|
|
63331
|
+
}
|
|
63332
|
+
_seekFrame(e) {
|
|
63333
|
+
this._animation && this._animation.goToAndStop(e, !0), this._texture && (this._texture.needsUpdate = !0);
|
|
63334
|
+
}
|
|
63335
|
+
_applyTime(e) {
|
|
63336
|
+
this._seekFrame(this._frameForTime(e));
|
|
63337
|
+
}
|
|
63338
|
+
syncToTime(e) {
|
|
63339
|
+
return this._playhead = e, this._applyTime(e), this;
|
|
63340
|
+
}
|
|
63341
|
+
seekToProgress(e) {
|
|
63342
|
+
let t = this._totalFrames;
|
|
63343
|
+
if (t <= 0) return this;
|
|
63344
|
+
let n = e * t;
|
|
63345
|
+
return n = this._loop ? (n % t + t) % t : Math.max(0, Math.min(n, t)), this._playhead = this._frameRate > 0 ? n / (this._frameRate * this._speed) : 0, this._seekFrame(n), this;
|
|
63346
|
+
}
|
|
63347
|
+
play() {
|
|
63348
|
+
return this._playing = !0, this;
|
|
63349
|
+
}
|
|
63350
|
+
pause() {
|
|
63351
|
+
return this._playing = !1, this;
|
|
63352
|
+
}
|
|
63353
|
+
setSpeed(e) {
|
|
63354
|
+
return this._speed = e, this._animation && typeof this._animation.setSpeed == "function" && this._animation.setSpeed(e), this;
|
|
63355
|
+
}
|
|
63356
|
+
setLoop(e) {
|
|
63357
|
+
return this._loop = e, this;
|
|
63358
|
+
}
|
|
63359
|
+
_calculateDimensions() {
|
|
63360
|
+
let e = this._naturalWidth / this._naturalHeight;
|
|
63361
|
+
return this._width !== void 0 && this._height !== void 0 ? this._scaleToFit ? e > this._width / this._height ? {
|
|
63362
|
+
width: this._width,
|
|
63363
|
+
height: this._width / e
|
|
63364
|
+
} : {
|
|
63365
|
+
width: this._height * e,
|
|
63366
|
+
height: this._height
|
|
63367
|
+
} : {
|
|
63368
|
+
width: this._width,
|
|
63369
|
+
height: this._height
|
|
63370
|
+
} : this._width === void 0 ? this._height === void 0 ? {
|
|
63371
|
+
width: 4 * e,
|
|
63372
|
+
height: 4
|
|
63373
|
+
} : {
|
|
63374
|
+
width: this._height * e,
|
|
63375
|
+
height: this._height
|
|
63376
|
+
} : {
|
|
63377
|
+
width: this._width,
|
|
63378
|
+
height: this._width / e
|
|
63379
|
+
};
|
|
63380
|
+
}
|
|
63381
|
+
_createThreeObject() {
|
|
63382
|
+
let e = this._calculateDimensions(), t = new a.PlaneGeometry(1, 1), n = new a.MeshBasicMaterial({
|
|
63383
|
+
map: this._texture,
|
|
63384
|
+
transparent: !0,
|
|
63385
|
+
opacity: this._opacity,
|
|
63386
|
+
side: this._doubleSided ? a.DoubleSide : a.FrontSide
|
|
63387
|
+
}), r = new a.Mesh(t, n);
|
|
63388
|
+
r.scale.set(e.width, e.height, 1), r.frustumCulled = !1, this._mesh = r;
|
|
63389
|
+
let i = new a.Group();
|
|
63390
|
+
return i.add(r), i;
|
|
63391
|
+
}
|
|
63392
|
+
getDisplayMeshLength() {
|
|
63393
|
+
return 1;
|
|
63394
|
+
}
|
|
63395
|
+
getDisplayMeshes() {
|
|
63396
|
+
if (!(this.getThreeObject() instanceof a.Group)) throw Error("LottieMobject.getThreeObject() must return a THREE.Group");
|
|
63397
|
+
if (!this._mesh) throw Error("LottieMobject.getDisplayMeshes requires _mesh");
|
|
63398
|
+
return [this._mesh];
|
|
63399
|
+
}
|
|
63400
|
+
applyTextureFrom(t) {
|
|
63401
|
+
if (!(t instanceof e)) throw Error("LottieMobject.applyTextureFrom requires LottieMobject");
|
|
63402
|
+
let n = this._mesh, r = t.getDisplayMeshes()[0];
|
|
63403
|
+
if (!n) throw Error("LottieMobject.applyTextureFrom requires mesh");
|
|
63404
|
+
if (!r) throw Error("LottieMobject.applyTextureFrom requires source mesh");
|
|
63405
|
+
let i = n.material, o = r.material;
|
|
63406
|
+
if (!(i instanceof a.MeshBasicMaterial)) throw Error("LottieMobject.applyTextureFrom requires MeshBasicMaterial");
|
|
63407
|
+
if (!(o instanceof a.MeshBasicMaterial)) throw Error("LottieMobject.applyTextureFrom requires source MeshBasicMaterial");
|
|
63408
|
+
let s = o.map, c = this._texture;
|
|
63409
|
+
this._handoffTextureMap(i, s, c), this._texture = s;
|
|
63410
|
+
}
|
|
63411
|
+
applyVisualSize(e, t) {
|
|
63412
|
+
this._width = e, this._height = t, this._scaleToFit = !1, this._updateGeometry();
|
|
63413
|
+
}
|
|
63414
|
+
applyContentFrom(t) {
|
|
63415
|
+
if (!(t instanceof e)) throw Error("LottieMobject.applyContentFrom requires LottieMobject");
|
|
63416
|
+
this._animationData = t._animationData;
|
|
63417
|
+
}
|
|
63418
|
+
_updateGeometry() {
|
|
63419
|
+
let e = this._mesh;
|
|
63420
|
+
if (!e) return;
|
|
63421
|
+
let t = this._calculateDimensions();
|
|
63422
|
+
e.scale.set(t.width, t.height, 1);
|
|
63423
|
+
let n = e.material;
|
|
63424
|
+
n && this._texture && (n.map = this._texture, n.needsUpdate = !0), this._markDirty();
|
|
63425
|
+
}
|
|
63426
|
+
_syncMaterialToThree() {
|
|
63427
|
+
let e = this._mesh;
|
|
63428
|
+
if (!e) return;
|
|
63429
|
+
let t = e.material;
|
|
63430
|
+
t && (t.opacity = this._opacity, t.transparent = this._opacity < 1, t.side = this._doubleSided ? a.DoubleSide : a.FrontSide, this._texture && (t.map = this._texture), t.needsUpdate = !0);
|
|
63431
|
+
}
|
|
63432
|
+
getBoundingBox() {
|
|
63433
|
+
let e = this._calculateDimensions();
|
|
63434
|
+
return {
|
|
63435
|
+
width: e.width * this.scaleVector.x,
|
|
63436
|
+
height: e.height * this.scaleVector.y,
|
|
63437
|
+
depth: .01
|
|
63438
|
+
};
|
|
63439
|
+
}
|
|
63440
|
+
copy() {
|
|
63441
|
+
let t = new e({
|
|
63442
|
+
animationData: this._animationData,
|
|
63443
|
+
loop: this._loop,
|
|
63444
|
+
speed: this._speed,
|
|
63445
|
+
width: this._width,
|
|
63446
|
+
height: this._height,
|
|
63447
|
+
scaleToFit: this._scaleToFit,
|
|
63448
|
+
center: this._centerPoint,
|
|
63449
|
+
opacity: this._opacity,
|
|
63450
|
+
doubleSided: this._doubleSided,
|
|
63451
|
+
player: this._injectedPlayer
|
|
63452
|
+
});
|
|
63453
|
+
return t._naturalWidth = this._naturalWidth, t._naturalHeight = this._naturalHeight, this._copyBaseAttributesInto(t, { copyChildren: !1 }), t;
|
|
63454
|
+
}
|
|
63455
|
+
dispose() {
|
|
63456
|
+
super.dispose(), this._playing = !1, this._animation &&= (this._animation.destroy(), null), this._texture &&= (this._texture.dispose(), null), this._canvas = null;
|
|
63457
|
+
}
|
|
63458
|
+
}, RE = 100, zE = 2, BE = 3;
|
|
63459
|
+
function VE(e, t, n) {
|
|
63212
63460
|
let r = [], i = new Uint8ClampedArray(t * n * 4);
|
|
63213
63461
|
for (let a of e) {
|
|
63214
|
-
let { dims: e, patch: o, disposalType: s } = a, c = s ===
|
|
63462
|
+
let { dims: e, patch: o, disposalType: s } = a, c = s === BE ? i.slice() : null;
|
|
63215
63463
|
for (let r = 0; r < e.height; r++) for (let a = 0; a < e.width; a++) {
|
|
63216
63464
|
let s = (r * e.width + a) * 4;
|
|
63217
63465
|
if (o[s + 3] === 0) continue;
|
|
@@ -63220,15 +63468,15 @@ function PE(e, t, n) {
|
|
|
63220
63468
|
let u = (l * t + c) * 4;
|
|
63221
63469
|
i[u] = o[s], i[u + 1] = o[s + 1], i[u + 2] = o[s + 2], i[u + 3] = o[s + 3];
|
|
63222
63470
|
}
|
|
63223
|
-
let l = a.delay > 0 ? a.delay :
|
|
63471
|
+
let l = a.delay > 0 ? a.delay : RE;
|
|
63224
63472
|
r.push({
|
|
63225
63473
|
data: i.slice(),
|
|
63226
63474
|
delay: l
|
|
63227
|
-
}), s ===
|
|
63475
|
+
}), s === zE ? HE(i, t, n, e) : c && (i = c);
|
|
63228
63476
|
}
|
|
63229
63477
|
return r;
|
|
63230
63478
|
}
|
|
63231
|
-
function
|
|
63479
|
+
function HE(e, t, n, r) {
|
|
63232
63480
|
for (let i = 0; i < r.height; i++) for (let a = 0; a < r.width; a++) {
|
|
63233
63481
|
let o = r.left + a, s = r.top + i;
|
|
63234
63482
|
if (o < 0 || s < 0 || o >= t || s >= n) continue;
|
|
@@ -63236,20 +63484,20 @@ function FE(e, t, n, r) {
|
|
|
63236
63484
|
e[c] = 0, e[c + 1] = 0, e[c + 2] = 0, e[c + 3] = 0;
|
|
63237
63485
|
}
|
|
63238
63486
|
}
|
|
63239
|
-
var
|
|
63487
|
+
var UE = async (t) => {
|
|
63240
63488
|
if (typeof document > "u") throw Error("AnimatedImageMobject: GIF decoding needs a browser (document is unavailable)");
|
|
63241
63489
|
if (typeof fetch > "u") throw Error("AnimatedImageMobject: GIF decoding needs fetch (fetch is unavailable)");
|
|
63242
63490
|
let n = await (await fetch(t)).arrayBuffer(), { parseGIF: r, decompressFrames: i } = await import("./lib-Bh3UXyYs.js").then((t) => /* @__PURE__ */ e(t.default, 1)), a = r(n), o = i(a, !0), s = a.lsd.width, c = a.lsd.height;
|
|
63243
63491
|
return {
|
|
63244
63492
|
width: s,
|
|
63245
63493
|
height: c,
|
|
63246
|
-
frames:
|
|
63494
|
+
frames: VE(o, s, c)
|
|
63247
63495
|
};
|
|
63248
|
-
},
|
|
63249
|
-
function
|
|
63250
|
-
|
|
63496
|
+
}, WE = null;
|
|
63497
|
+
function GE(e) {
|
|
63498
|
+
WE = e;
|
|
63251
63499
|
}
|
|
63252
|
-
var
|
|
63500
|
+
var KE = 1, qE = class e extends Ds {
|
|
63253
63501
|
_source;
|
|
63254
63502
|
_loop;
|
|
63255
63503
|
_autoplay;
|
|
@@ -63290,7 +63538,7 @@ var zE = 1, BE = class e extends Ds {
|
|
|
63290
63538
|
}
|
|
63291
63539
|
async _startLoad() {
|
|
63292
63540
|
try {
|
|
63293
|
-
let e = await (
|
|
63541
|
+
let e = await (WE ?? UE)(this._source);
|
|
63294
63542
|
this._ingest(e), this._loadResolve && (this._loadResolve(), this._loadResolve = null, this._loadReject = null);
|
|
63295
63543
|
} catch (e) {
|
|
63296
63544
|
this._failLoad(e instanceof Error ? e : Error(String(e)));
|
|
@@ -63299,7 +63547,7 @@ var zE = 1, BE = class e extends Ds {
|
|
|
63299
63547
|
_ingest(e) {
|
|
63300
63548
|
this._naturalWidth = e.width || 1, this._naturalHeight = e.height || 1, this._frames = e.frames.map((e) => e.data);
|
|
63301
63549
|
let t = this._fps !== void 0 && this._fps > 0 ? 1e3 / this._fps : void 0;
|
|
63302
|
-
this._frameDurations = e.frames.map((e) => Math.max(
|
|
63550
|
+
this._frameDurations = e.frames.map((e) => Math.max(KE, t ?? e.delay)), this._totalDurationMs = this._frameDurations.reduce((e, t) => e + t, 0), this._frameTextures = this._frames.map(() => null), this._loaded = !0, this._currentFrame = 0, this._accumulatorMs = 0, this._setFrame(0), this._updateGeometry(), this._markDirty(), this._autoplay && (this._playing = !0);
|
|
63303
63551
|
}
|
|
63304
63552
|
_failLoad(e) {
|
|
63305
63553
|
this._loadError = e, this._loadReject && (this._loadReject(e), this._loadReject = null, this._loadResolve = null);
|
|
@@ -63488,10 +63736,10 @@ var zE = 1, BE = class e extends Ds {
|
|
|
63488
63736
|
for (let e of this._frameTextures) e && e.dispose();
|
|
63489
63737
|
this._frameTextures = [], this._frames = [], this._texture = null;
|
|
63490
63738
|
}
|
|
63491
|
-
},
|
|
63739
|
+
}, JE = 16 / 9, YE = class e extends l_ {
|
|
63492
63740
|
_aspectRatio;
|
|
63493
63741
|
constructor(e = {}) {
|
|
63494
|
-
let { height: t = 4, aspectRatio: n =
|
|
63742
|
+
let { height: t = 4, aspectRatio: n = JE, ...r } = e, i = t * n;
|
|
63495
63743
|
super({
|
|
63496
63744
|
...r,
|
|
63497
63745
|
width: i,
|
|
@@ -63520,7 +63768,7 @@ var zE = 1, BE = class e extends Ds {
|
|
|
63520
63768
|
});
|
|
63521
63769
|
return this._copyBaseAttributesInto(t, { copyChildren: !1 }), t;
|
|
63522
63770
|
}
|
|
63523
|
-
},
|
|
63771
|
+
}, XE = class e extends l_ {
|
|
63524
63772
|
_frameWidth;
|
|
63525
63773
|
_frameHeight;
|
|
63526
63774
|
constructor(e = {}) {
|
|
@@ -63559,7 +63807,7 @@ var zE = 1, BE = class e extends Ds {
|
|
|
63559
63807
|
});
|
|
63560
63808
|
return this._copyBaseAttributesInto(t, { copyChildren: !1 }), t;
|
|
63561
63809
|
}
|
|
63562
|
-
},
|
|
63810
|
+
}, ZE = class e extends XE {
|
|
63563
63811
|
_fadeProgress;
|
|
63564
63812
|
constructor(e = {}) {
|
|
63565
63813
|
let { opacity: t = 0, ...n } = e;
|
|
@@ -63599,21 +63847,21 @@ var zE = 1, BE = class e extends Ds {
|
|
|
63599
63847
|
return this._copyBaseAttributesInto(t, { copyChildren: !1 }), t;
|
|
63600
63848
|
}
|
|
63601
63849
|
};
|
|
63602
|
-
function
|
|
63603
|
-
return new
|
|
63850
|
+
function QE(e = {}) {
|
|
63851
|
+
return new ZE({
|
|
63604
63852
|
...e,
|
|
63605
63853
|
color: de
|
|
63606
63854
|
});
|
|
63607
63855
|
}
|
|
63608
|
-
function
|
|
63609
|
-
return new
|
|
63856
|
+
function $E(e = {}) {
|
|
63857
|
+
return new ZE({
|
|
63610
63858
|
...e,
|
|
63611
63859
|
color: E
|
|
63612
63860
|
});
|
|
63613
63861
|
}
|
|
63614
63862
|
//#endregion
|
|
63615
63863
|
//#region src/mobjects/point/PGroup.ts
|
|
63616
|
-
var
|
|
63864
|
+
var eD = class e extends kr {
|
|
63617
63865
|
normalizeTransform(e = this._ownMatrix()) {
|
|
63618
63866
|
return this._flattenAsContainer(e);
|
|
63619
63867
|
}
|
|
@@ -63704,7 +63952,7 @@ var qE = class e extends kr {
|
|
|
63704
63952
|
[Symbol.iterator]() {
|
|
63705
63953
|
return this.children[Symbol.iterator]();
|
|
63706
63954
|
}
|
|
63707
|
-
},
|
|
63955
|
+
}, tD = class e extends Es {
|
|
63708
63956
|
constructor(e = {}) {
|
|
63709
63957
|
let { position: t = [
|
|
63710
63958
|
0,
|
|
@@ -63746,7 +63994,7 @@ var qE = class e extends kr {
|
|
|
63746
63994
|
});
|
|
63747
63995
|
return this._copyBaseAttributesInto(t, { copyChildren: !1 }), t;
|
|
63748
63996
|
}
|
|
63749
|
-
},
|
|
63997
|
+
}, nD = class e extends Es {
|
|
63750
63998
|
_center;
|
|
63751
63999
|
_radius;
|
|
63752
64000
|
_numParticles;
|
|
@@ -63828,7 +64076,7 @@ var qE = class e extends kr {
|
|
|
63828
64076
|
});
|
|
63829
64077
|
return this._copyBaseAttributesInto(t, { copyChildren: !1 }), t;
|
|
63830
64078
|
}
|
|
63831
|
-
},
|
|
64079
|
+
}, rD = class e extends Es {
|
|
63832
64080
|
_start;
|
|
63833
64081
|
_end;
|
|
63834
64082
|
_numPointsConfig;
|
|
@@ -63934,7 +64182,7 @@ var qE = class e extends kr {
|
|
|
63934
64182
|
});
|
|
63935
64183
|
return this._copyBaseAttributesInto(t, { copyChildren: !1 }), t;
|
|
63936
64184
|
}
|
|
63937
|
-
},
|
|
64185
|
+
}, iD = class e extends Es {
|
|
63938
64186
|
_center2D;
|
|
63939
64187
|
_width;
|
|
63940
64188
|
_height;
|
|
@@ -64070,7 +64318,7 @@ var qE = class e extends kr {
|
|
|
64070
64318
|
};
|
|
64071
64319
|
//#endregion
|
|
64072
64320
|
//#region src/mobjects/particles/ParticleSystem.ts
|
|
64073
|
-
function
|
|
64321
|
+
function aD(e) {
|
|
64074
64322
|
let t = e | 0;
|
|
64075
64323
|
return () => {
|
|
64076
64324
|
t = t + 1831565813 | 0;
|
|
@@ -64078,10 +64326,10 @@ function QE(e) {
|
|
|
64078
64326
|
return e = e + Math.imul(e ^ e >>> 7, 61 | e) ^ e, ((e ^ e >>> 14) >>> 0) / 4294967296;
|
|
64079
64327
|
};
|
|
64080
64328
|
}
|
|
64081
|
-
function
|
|
64329
|
+
function oD(e, t, n) {
|
|
64082
64330
|
return e + (t - e) * n;
|
|
64083
64331
|
}
|
|
64084
|
-
var
|
|
64332
|
+
var sD = class e extends Es {
|
|
64085
64333
|
_spawnRate;
|
|
64086
64334
|
_maxParticles;
|
|
64087
64335
|
_lifetime;
|
|
@@ -64126,13 +64374,13 @@ var eD = class e extends Es {
|
|
|
64126
64374
|
0,
|
|
64127
64375
|
0,
|
|
64128
64376
|
0
|
|
64129
|
-
], this._drag = l.drag ?? 0, this._startSize = u, this._endSize = d, this._startColor = f, this._endColor = p, this._useOklab = m, this._seed = h, this._rng =
|
|
64377
|
+
], this._drag = l.drag ?? 0, this._startSize = u, this._endSize = d, this._startColor = f, this._endColor = p, this._useOklab = m, this._seed = h, this._rng = aD(h), this.addUpdater((e, t) => this.step(t));
|
|
64130
64378
|
}
|
|
64131
64379
|
get seed() {
|
|
64132
64380
|
return this._seed;
|
|
64133
64381
|
}
|
|
64134
64382
|
set seed(e) {
|
|
64135
|
-
this._seed = e, this._rng =
|
|
64383
|
+
this._seed = e, this._rng = aD(e);
|
|
64136
64384
|
}
|
|
64137
64385
|
setSpawnRate(e) {
|
|
64138
64386
|
return this._spawnRate = Math.max(0, e), this;
|
|
@@ -64154,7 +64402,7 @@ var eD = class e extends Es {
|
|
|
64154
64402
|
}));
|
|
64155
64403
|
}
|
|
64156
64404
|
reset() {
|
|
64157
|
-
return this._particles = [], this._spawnCarry = 0, this._rng =
|
|
64405
|
+
return this._particles = [], this._spawnCarry = 0, this._rng = aD(this._seed), this._syncParticlesToPoints(), this;
|
|
64158
64406
|
}
|
|
64159
64407
|
step(e) {
|
|
64160
64408
|
return e <= 0 ? this : (this._spawn(e), this._integrate(e), this._cull(), this._syncParticlesToPoints(), this);
|
|
@@ -64191,7 +64439,7 @@ var eD = class e extends Es {
|
|
|
64191
64439
|
for (let n of this._particles) {
|
|
64192
64440
|
n.velocity[0] = (n.velocity[0] + this._gravity[0] * e) * t, n.velocity[1] = (n.velocity[1] + this._gravity[1] * e) * t, n.velocity[2] = (n.velocity[2] + this._gravity[2] * e) * t, n.position[0] += n.velocity[0] * e, n.position[1] += n.velocity[1] * e, n.position[2] += n.velocity[2] * e, n.age += e;
|
|
64193
64441
|
let r = Math.min(1, n.age / n.lifetime);
|
|
64194
|
-
n.size =
|
|
64442
|
+
n.size = oD(this._startSize, this._endSize, r), n.color = this._useOklab ? Jb(this._startColor, this._endColor, r) : kb(this._startColor, this._endColor, r);
|
|
64195
64443
|
}
|
|
64196
64444
|
}
|
|
64197
64445
|
_cull() {
|
|
@@ -64230,7 +64478,7 @@ var eD = class e extends Es {
|
|
|
64230
64478
|
});
|
|
64231
64479
|
return this._copyBaseAttributesInto(t, { copyChildren: !1 }), t;
|
|
64232
64480
|
}
|
|
64233
|
-
},
|
|
64481
|
+
}, cD = "\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n }\n", lD = "\n precision highp float;\n\n uniform vec2 u_center;\n uniform float u_zoom;\n uniform int u_maxIter;\n uniform float u_saturation;\n uniform float u_lightness;\n uniform float u_aspectRatio;\n uniform float u_opacity;\n\n varying vec2 vUv;\n\n // HSL -> RGB conversion (attempt-free, standard formula)\n vec3 hsl2rgb(float h, float s, float l) {\n float c = (1.0 - abs(2.0 * l - 1.0)) * s;\n float x = c * (1.0 - abs(mod(h * 6.0, 2.0) - 1.0));\n float m = l - c * 0.5;\n vec3 rgb;\n float hue = h * 6.0;\n if (hue < 1.0) rgb = vec3(c, x, 0.0);\n else if (hue < 2.0) rgb = vec3(x, c, 0.0);\n else if (hue < 3.0) rgb = vec3(0.0, c, x);\n else if (hue < 4.0) rgb = vec3(0.0, x, c);\n else if (hue < 5.0) rgb = vec3(x, 0.0, c);\n else rgb = vec3(c, 0.0, x);\n return rgb + m;\n }\n\n void main() {\n // Map UV [0,1] to complex plane, accounting for aspect ratio and zoom\n float scale = 3.5 / u_zoom;\n vec2 c = vec2(\n (vUv.x - 0.5) * scale * u_aspectRatio + u_center.x,\n (vUv.y - 0.5) * scale + u_center.y\n );\n\n vec2 z = vec2(0.0);\n int iter = 0;\n\n // Main iteration loop\n for (int i = 0; i < 2000; i++) {\n if (i >= u_maxIter) break;\n if (dot(z, z) > 4.0) break;\n z = vec2(z.x * z.x - z.y * z.y, 2.0 * z.x * z.y) + c;\n iter = i + 1;\n }\n\n if (iter >= u_maxIter) {\n // Inside the set: black\n gl_FragColor = vec4(0.0, 0.0, 0.0, u_opacity);\n } else {\n // Smooth (continuous) iteration count for anti-banding\n float smoothIter = float(iter) - log2(log2(dot(z, z))) + 4.0;\n float hue = mod(smoothIter * 0.02 + 0.6, 1.0);\n vec3 rgb = hsl2rgb(hue, u_saturation, u_lightness);\n gl_FragColor = vec4(rgb, u_opacity);\n }\n }\n", uD = class e extends kr {
|
|
64234
64482
|
_width;
|
|
64235
64483
|
_height;
|
|
64236
64484
|
_center;
|
|
@@ -64256,8 +64504,8 @@ var eD = class e extends Es {
|
|
|
64256
64504
|
u_aspectRatio: { value: this._width / this._height },
|
|
64257
64505
|
u_opacity: { value: this._opacity }
|
|
64258
64506
|
},
|
|
64259
|
-
vertexShader:
|
|
64260
|
-
fragmentShader:
|
|
64507
|
+
vertexShader: cD,
|
|
64508
|
+
fragmentShader: lD,
|
|
64261
64509
|
transparent: this._opacity < 1,
|
|
64262
64510
|
side: a.DoubleSide
|
|
64263
64511
|
}), new a.Mesh(e, this._material);
|
|
@@ -64332,7 +64580,7 @@ var eD = class e extends Es {
|
|
|
64332
64580
|
dispose() {
|
|
64333
64581
|
this._material &&= (this._material.dispose(), null), this._threeObject instanceof a.Mesh && this._threeObject.geometry.dispose();
|
|
64334
64582
|
}
|
|
64335
|
-
},
|
|
64583
|
+
}, dD = 12, fD = "\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n }\n", pD = `
|
|
64336
64584
|
precision highp float;
|
|
64337
64585
|
|
|
64338
64586
|
// View uniforms
|
|
@@ -64343,7 +64591,7 @@ var eD = class e extends Es {
|
|
|
64343
64591
|
uniform float u_opacity;
|
|
64344
64592
|
|
|
64345
64593
|
// Polynomial uniforms
|
|
64346
|
-
uniform vec2 u_coeffs[${
|
|
64594
|
+
uniform vec2 u_coeffs[${dD}]; // complex coefficients (re, im)
|
|
64347
64595
|
uniform int u_numCoeffs; // number of coefficients supplied
|
|
64348
64596
|
uniform float u_tolerance;
|
|
64349
64597
|
|
|
@@ -64374,7 +64622,7 @@ var eD = class e extends Es {
|
|
|
64374
64622
|
dfz = vec2(0.0);
|
|
64375
64623
|
|
|
64376
64624
|
// We iterate from the highest coefficient to the lowest.
|
|
64377
|
-
for (int i = ${
|
|
64625
|
+
for (int i = ${dD - 1}; i >= 0; i--) {
|
|
64378
64626
|
if (i > deg) continue;
|
|
64379
64627
|
// f(z) = f(z)*z + c_i
|
|
64380
64628
|
fz = cmul(fz, z) + u_coeffs[i];
|
|
@@ -64389,7 +64637,7 @@ var eD = class e extends Es {
|
|
|
64389
64637
|
// Recompute with proper dual Horner pass
|
|
64390
64638
|
fz = vec2(0.0);
|
|
64391
64639
|
dfz = vec2(0.0);
|
|
64392
|
-
for (int i = ${
|
|
64640
|
+
for (int i = ${dD - 1}; i >= 0; i--) {
|
|
64393
64641
|
if (i > deg) continue;
|
|
64394
64642
|
dfz = cmul(dfz, z) + fz; // derivative accumulator
|
|
64395
64643
|
fz = cmul(fz, z) + u_coeffs[i];
|
|
@@ -64450,7 +64698,7 @@ var eD = class e extends Es {
|
|
|
64450
64698
|
|
|
64451
64699
|
gl_FragColor = vec4(rgb, u_opacity);
|
|
64452
64700
|
}
|
|
64453
|
-
`,
|
|
64701
|
+
`, mD = class e extends kr {
|
|
64454
64702
|
_width;
|
|
64455
64703
|
_height;
|
|
64456
64704
|
_center;
|
|
@@ -64473,7 +64721,7 @@ var eD = class e extends Es {
|
|
|
64473
64721
|
}
|
|
64474
64722
|
_buildCoeffUniforms() {
|
|
64475
64723
|
let e = [];
|
|
64476
|
-
for (let t = 0; t <
|
|
64724
|
+
for (let t = 0; t < dD; t++) {
|
|
64477
64725
|
let n = t < this._coefficients.length ? this._coefficients[t] : 0;
|
|
64478
64726
|
e.push(new a.Vector2(n, 0));
|
|
64479
64727
|
}
|
|
@@ -64489,13 +64737,13 @@ var eD = class e extends Es {
|
|
|
64489
64737
|
u_aspectRatio: { value: this._width / this._height },
|
|
64490
64738
|
u_opacity: { value: this._opacity },
|
|
64491
64739
|
u_coeffs: { value: this._buildCoeffUniforms() },
|
|
64492
|
-
u_numCoeffs: { value: Math.min(this._coefficients.length,
|
|
64740
|
+
u_numCoeffs: { value: Math.min(this._coefficients.length, dD) },
|
|
64493
64741
|
u_tolerance: { value: this._tolerance },
|
|
64494
64742
|
u_saturation: { value: this._saturation },
|
|
64495
64743
|
u_lightness: { value: this._lightness }
|
|
64496
64744
|
},
|
|
64497
|
-
vertexShader:
|
|
64498
|
-
fragmentShader:
|
|
64745
|
+
vertexShader: fD,
|
|
64746
|
+
fragmentShader: pD,
|
|
64499
64747
|
transparent: this._opacity < 1,
|
|
64500
64748
|
side: a.DoubleSide
|
|
64501
64749
|
}), new a.Mesh(e, this._material);
|
|
@@ -64505,11 +64753,11 @@ var eD = class e extends Es {
|
|
|
64505
64753
|
let e = this._material.uniforms;
|
|
64506
64754
|
e.u_center.value.set(this._center[0], this._center[1]), e.u_zoom.value = this._zoom, e.u_maxIter.value = this._maxIterations, e.u_aspectRatio.value = this._width / this._height, e.u_opacity.value = this._opacity, e.u_tolerance.value = this._tolerance, e.u_saturation.value = this._saturation, e.u_lightness.value = this._lightness;
|
|
64507
64755
|
let t = e.u_coeffs.value;
|
|
64508
|
-
for (let e = 0; e <
|
|
64756
|
+
for (let e = 0; e < dD; e++) {
|
|
64509
64757
|
let n = e < this._coefficients.length ? this._coefficients[e] : 0;
|
|
64510
64758
|
t[e].set(n, 0);
|
|
64511
64759
|
}
|
|
64512
|
-
e.u_numCoeffs.value = Math.min(this._coefficients.length,
|
|
64760
|
+
e.u_numCoeffs.value = Math.min(this._coefficients.length, dD), this._material.transparent = this._opacity < 1, this._material.needsUpdate = !0;
|
|
64513
64761
|
}
|
|
64514
64762
|
setCenter(e) {
|
|
64515
64763
|
return this._center = [...e], this._markDirty(), this;
|
|
@@ -64590,7 +64838,7 @@ var eD = class e extends Es {
|
|
|
64590
64838
|
dispose() {
|
|
64591
64839
|
this._material &&= (this._material.dispose(), null), this._threeObject instanceof a.Mesh && this._threeObject.geometry.dispose();
|
|
64592
64840
|
}
|
|
64593
|
-
},
|
|
64841
|
+
}, hD = [
|
|
64594
64842
|
be,
|
|
64595
64843
|
Pe,
|
|
64596
64844
|
ze,
|
|
@@ -64598,7 +64846,7 @@ var eD = class e extends Es {
|
|
|
64598
64846
|
ct,
|
|
64599
64847
|
De,
|
|
64600
64848
|
Ge
|
|
64601
|
-
],
|
|
64849
|
+
], gD = class e extends L {
|
|
64602
64850
|
_ssWidth;
|
|
64603
64851
|
_ssHeight;
|
|
64604
64852
|
_ssCenter;
|
|
@@ -64637,7 +64885,7 @@ var eD = class e extends Es {
|
|
|
64637
64885
|
let l = e[t], p = s * l, m = f + p / 2, h = u, g = new l_({
|
|
64638
64886
|
width: p,
|
|
64639
64887
|
height: c,
|
|
64640
|
-
color: n ? n[t % n.length] :
|
|
64888
|
+
color: n ? n[t % n.length] : hD[t % hD.length],
|
|
64641
64889
|
fillOpacity: r,
|
|
64642
64890
|
strokeWidth: this._outline.strokeWidth,
|
|
64643
64891
|
center: [
|
|
@@ -64673,7 +64921,7 @@ var eD = class e extends Es {
|
|
|
64673
64921
|
let u = e[t], p = c * u, m = l, h = f - p / 2, g = new l_({
|
|
64674
64922
|
width: s,
|
|
64675
64923
|
height: p,
|
|
64676
|
-
color: n ? n[t % n.length] :
|
|
64924
|
+
color: n ? n[t % n.length] : hD[t % hD.length],
|
|
64677
64925
|
fillOpacity: r,
|
|
64678
64926
|
strokeWidth: this._outline.strokeWidth,
|
|
64679
64927
|
center: [
|
|
@@ -64710,7 +64958,7 @@ var eD = class e extends Es {
|
|
|
64710
64958
|
let c = t[n], f = u * c, g = d, _ = m - f / 2, v = new l_({
|
|
64711
64959
|
width: l,
|
|
64712
64960
|
height: f,
|
|
64713
|
-
color: r ? r[n % r.length] :
|
|
64961
|
+
color: r ? r[n % r.length] : hD[(e + n + 2) % hD.length],
|
|
64714
64962
|
fillOpacity: i,
|
|
64715
64963
|
strokeWidth: this._outline.strokeWidth * .5,
|
|
64716
64964
|
center: [
|
|
@@ -64850,7 +65098,7 @@ var eD = class e extends Es {
|
|
|
64850
65098
|
});
|
|
64851
65099
|
return this._copyBaseAttributesInto(t, { copyChildren: !1 }), t;
|
|
64852
65100
|
}
|
|
64853
|
-
},
|
|
65101
|
+
}, _D = {
|
|
64854
65102
|
1: [[0, 0]],
|
|
64855
65103
|
2: [[-.5, .5], [.5, -.5]],
|
|
64856
65104
|
3: [
|
|
@@ -64879,7 +65127,7 @@ var eD = class e extends Es {
|
|
|
64879
65127
|
[-.5, -.5],
|
|
64880
65128
|
[.5, -.5]
|
|
64881
65129
|
]
|
|
64882
|
-
},
|
|
65130
|
+
}, vD = class e extends L {
|
|
64883
65131
|
_value;
|
|
64884
65132
|
_size;
|
|
64885
65133
|
_dotColor;
|
|
@@ -64910,7 +65158,7 @@ var eD = class e extends Es {
|
|
|
64910
65158
|
}), this._background.setColor(i), this._background.color = o, this._background.fillColor = i, this.add(this._background), this._createDots();
|
|
64911
65159
|
}
|
|
64912
65160
|
_createDots() {
|
|
64913
|
-
let e =
|
|
65161
|
+
let e = _D[this._value], [t, n, r] = this._faceCenter, i = this._size * .55;
|
|
64914
65162
|
for (let [a, o] of e) {
|
|
64915
65163
|
let e = new ey({
|
|
64916
65164
|
point: [
|
|
@@ -64972,11 +65220,11 @@ var eD = class e extends Es {
|
|
|
64972
65220
|
return this._copyBaseAttributesInto(t, { copyChildren: !1 }), t;
|
|
64973
65221
|
}
|
|
64974
65222
|
};
|
|
64975
|
-
function
|
|
65223
|
+
function yD(e = {}, t = .3) {
|
|
64976
65224
|
let n = e.size ?? 1.5, r = [];
|
|
64977
65225
|
for (let i = 1; i <= 6; i++) {
|
|
64978
65226
|
let a = (i - 3.5) * (n + t);
|
|
64979
|
-
r.push(new
|
|
65227
|
+
r.push(new vD({
|
|
64980
65228
|
...e,
|
|
64981
65229
|
value: i,
|
|
64982
65230
|
center: [
|
|
@@ -64990,7 +65238,7 @@ function fD(e = {}, t = .3) {
|
|
|
64990
65238
|
}
|
|
64991
65239
|
//#endregion
|
|
64992
65240
|
//#region src/animation/MasterTimeline.ts
|
|
64993
|
-
var
|
|
65241
|
+
var bD = class extends cg {
|
|
64994
65242
|
_segments = [];
|
|
64995
65243
|
_slides = [];
|
|
64996
65244
|
_slideBoundaries = [];
|
|
@@ -65041,7 +65289,7 @@ var pD = class extends cg {
|
|
|
65041
65289
|
return i;
|
|
65042
65290
|
}
|
|
65043
65291
|
addWaitSegment(e) {
|
|
65044
|
-
let t = this.getDuration(), n = new
|
|
65292
|
+
let t = this.getDuration(), n = new SD(e);
|
|
65045
65293
|
this.add(n, t);
|
|
65046
65294
|
let r = {
|
|
65047
65295
|
index: this._segments.length,
|
|
@@ -65138,12 +65386,12 @@ var pD = class extends cg {
|
|
|
65138
65386
|
return this._segments.length;
|
|
65139
65387
|
}
|
|
65140
65388
|
};
|
|
65141
|
-
function
|
|
65142
|
-
return new
|
|
65389
|
+
function xD() {
|
|
65390
|
+
return new bD();
|
|
65143
65391
|
}
|
|
65144
|
-
var
|
|
65392
|
+
var SD = class extends z {
|
|
65145
65393
|
constructor(e) {
|
|
65146
|
-
super(
|
|
65394
|
+
super(CD.instance, { duration: e });
|
|
65147
65395
|
}
|
|
65148
65396
|
interpolate(e) {}
|
|
65149
65397
|
begin() {
|
|
@@ -65152,7 +65400,7 @@ var hD = class extends z {
|
|
|
65152
65400
|
finish() {
|
|
65153
65401
|
this._isFinished = !0;
|
|
65154
65402
|
}
|
|
65155
|
-
},
|
|
65403
|
+
}, CD = class e extends kr {
|
|
65156
65404
|
normalizeTransform(e = this._ownMatrix()) {
|
|
65157
65405
|
return this._flattenAsContainer(e);
|
|
65158
65406
|
}
|
|
@@ -65166,7 +65414,7 @@ var hD = class extends z {
|
|
|
65166
65414
|
_createThreeObject() {
|
|
65167
65415
|
return new a.Object3D();
|
|
65168
65416
|
}
|
|
65169
|
-
},
|
|
65417
|
+
}, wD = class extends z {
|
|
65170
65418
|
_shift;
|
|
65171
65419
|
_startX = 0;
|
|
65172
65420
|
_startY = 0;
|
|
@@ -65187,12 +65435,12 @@ var hD = class extends z {
|
|
|
65187
65435
|
this.mobject.opacity = 1, this._shift && this.mobject.position.set(this._targetX, this._targetY, this._targetZ), super.finish();
|
|
65188
65436
|
}
|
|
65189
65437
|
};
|
|
65190
|
-
function
|
|
65191
|
-
return new
|
|
65438
|
+
function TD(e, t) {
|
|
65439
|
+
return new wD(e, t);
|
|
65192
65440
|
}
|
|
65193
65441
|
//#endregion
|
|
65194
65442
|
//#region src/animation/fading/FadeOut.ts
|
|
65195
|
-
var
|
|
65443
|
+
var ED = class extends z {
|
|
65196
65444
|
_initialOpacity = 1;
|
|
65197
65445
|
_shift;
|
|
65198
65446
|
_startX = 0;
|
|
@@ -65214,16 +65462,16 @@ var yD = class extends z {
|
|
|
65214
65462
|
this.mobject.opacity = 0, this._shift && this.mobject.position.set(this._endX, this._endY, this._endZ), super.finish();
|
|
65215
65463
|
}
|
|
65216
65464
|
};
|
|
65217
|
-
function
|
|
65218
|
-
return new
|
|
65465
|
+
function DD(e, t) {
|
|
65466
|
+
return new ED(e, t);
|
|
65219
65467
|
}
|
|
65220
65468
|
//#endregion
|
|
65221
65469
|
//#region src/animation/transform/ApplyTransforms.ts
|
|
65222
|
-
function
|
|
65470
|
+
function OD(e) {
|
|
65223
65471
|
let t = e;
|
|
65224
65472
|
return typeof t.getLocalPoints == "function" && typeof t.setPoints == "function";
|
|
65225
65473
|
}
|
|
65226
|
-
var
|
|
65474
|
+
var kD = class extends z {
|
|
65227
65475
|
func;
|
|
65228
65476
|
_snapshots = [];
|
|
65229
65477
|
constructor(e, t) {
|
|
@@ -65232,7 +65480,7 @@ var SD = class extends z {
|
|
|
65232
65480
|
begin() {
|
|
65233
65481
|
super.begin(), this._snapshots = [];
|
|
65234
65482
|
let e = new a.Vector3();
|
|
65235
|
-
for (let t of this.mobject.getFamily()) if (
|
|
65483
|
+
for (let t of this.mobject.getFamily()) if (OD(t)) {
|
|
65236
65484
|
let n = t.getLocalPoints();
|
|
65237
65485
|
if (n.length === 0) continue;
|
|
65238
65486
|
let r = t._worldMatrix(), i = r.clone().invert(), a = n.map((t) => {
|
|
@@ -65268,13 +65516,13 @@ var SD = class extends z {
|
|
|
65268
65516
|
this.mobject._markDirtyUpward(), super.finish();
|
|
65269
65517
|
}
|
|
65270
65518
|
};
|
|
65271
|
-
function
|
|
65272
|
-
return new
|
|
65519
|
+
function AD(e, t, n) {
|
|
65520
|
+
return new kD(e, {
|
|
65273
65521
|
...n,
|
|
65274
65522
|
func: t
|
|
65275
65523
|
});
|
|
65276
65524
|
}
|
|
65277
|
-
var
|
|
65525
|
+
var jD = class extends z {
|
|
65278
65526
|
func;
|
|
65279
65527
|
_snapshots = [];
|
|
65280
65528
|
constructor(e, t) {
|
|
@@ -65283,7 +65531,7 @@ var wD = class extends z {
|
|
|
65283
65531
|
begin() {
|
|
65284
65532
|
super.begin(), this._snapshots = [];
|
|
65285
65533
|
let e = new a.Vector3();
|
|
65286
|
-
for (let t of this.mobject.getFamily()) if (
|
|
65534
|
+
for (let t of this.mobject.getFamily()) if (OD(t)) {
|
|
65287
65535
|
let n = t.getLocalPoints();
|
|
65288
65536
|
if (n.length === 0) continue;
|
|
65289
65537
|
let r = t._worldMatrix(), i = r.clone().invert(), a = n.map((t) => {
|
|
@@ -65318,13 +65566,13 @@ var wD = class extends z {
|
|
|
65318
65566
|
this.mobject._markDirtyUpward(), super.finish();
|
|
65319
65567
|
}
|
|
65320
65568
|
};
|
|
65321
|
-
function
|
|
65322
|
-
return new
|
|
65569
|
+
function MD(e, t, n) {
|
|
65570
|
+
return new jD(e, {
|
|
65323
65571
|
...n,
|
|
65324
65572
|
func: t
|
|
65325
65573
|
});
|
|
65326
65574
|
}
|
|
65327
|
-
var
|
|
65575
|
+
var ND = class extends Mh {
|
|
65328
65576
|
methodName;
|
|
65329
65577
|
args;
|
|
65330
65578
|
constructor(e, t) {
|
|
@@ -65332,14 +65580,14 @@ var ED = class extends Mh {
|
|
|
65332
65580
|
typeof r == "function" && r.call(n, ...t.args || []), super(e, n, t), this.methodName = t.methodName, this.args = t.args || [];
|
|
65333
65581
|
}
|
|
65334
65582
|
};
|
|
65335
|
-
function
|
|
65336
|
-
return new
|
|
65583
|
+
function PD(e, t, n, r) {
|
|
65584
|
+
return new ND(e, {
|
|
65337
65585
|
...r,
|
|
65338
65586
|
methodName: t,
|
|
65339
65587
|
args: n
|
|
65340
65588
|
});
|
|
65341
65589
|
}
|
|
65342
|
-
var
|
|
65590
|
+
var FD = class extends z {
|
|
65343
65591
|
matrix;
|
|
65344
65592
|
aboutPoint;
|
|
65345
65593
|
_snapshots = [];
|
|
@@ -65353,7 +65601,7 @@ var OD = class extends z {
|
|
|
65353
65601
|
begin() {
|
|
65354
65602
|
super.begin(), this._snapshots = [];
|
|
65355
65603
|
let e = new a.Vector3();
|
|
65356
|
-
for (let t of this.mobject.getFamily()) if (
|
|
65604
|
+
for (let t of this.mobject.getFamily()) if (OD(t)) {
|
|
65357
65605
|
let n = t.getLocalPoints();
|
|
65358
65606
|
if (n.length === 0) continue;
|
|
65359
65607
|
let r = t._worldMatrix(), i = r.clone().invert(), a = this.aboutPoint, o = n.map((t) => {
|
|
@@ -65389,15 +65637,15 @@ var OD = class extends z {
|
|
|
65389
65637
|
this.mobject._markDirtyUpward(), super.finish();
|
|
65390
65638
|
}
|
|
65391
65639
|
};
|
|
65392
|
-
function
|
|
65393
|
-
return new
|
|
65640
|
+
function ID(e, t, n) {
|
|
65641
|
+
return new FD(e, {
|
|
65394
65642
|
...n,
|
|
65395
65643
|
matrix: t
|
|
65396
65644
|
});
|
|
65397
65645
|
}
|
|
65398
65646
|
//#endregion
|
|
65399
65647
|
//#region src/animation/transform/FadeTransforms.ts
|
|
65400
|
-
var
|
|
65648
|
+
var LD = class extends z {
|
|
65401
65649
|
target;
|
|
65402
65650
|
stretchFactor;
|
|
65403
65651
|
_startPoints = [];
|
|
@@ -65423,10 +65671,10 @@ var AD = class extends z {
|
|
|
65423
65671
|
e.setPoints(this._targetPoints), e.setTransformSubpathLengths(void 0), e.opacity = this._targetOpacity, e.color = this.target.color, super.finish();
|
|
65424
65672
|
}
|
|
65425
65673
|
};
|
|
65426
|
-
function
|
|
65427
|
-
return new
|
|
65674
|
+
function RD(e, t, n) {
|
|
65675
|
+
return new LD(e, t, n);
|
|
65428
65676
|
}
|
|
65429
|
-
var
|
|
65677
|
+
var zD = class extends z {
|
|
65430
65678
|
target;
|
|
65431
65679
|
_pieceStates = [];
|
|
65432
65680
|
constructor(e, t, n = {}) {
|
|
@@ -65484,22 +65732,22 @@ var MD = class extends z {
|
|
|
65484
65732
|
super.finish();
|
|
65485
65733
|
}
|
|
65486
65734
|
};
|
|
65487
|
-
function
|
|
65488
|
-
return new
|
|
65735
|
+
function BD(e, t, n) {
|
|
65736
|
+
return new zD(e, t, n);
|
|
65489
65737
|
}
|
|
65490
|
-
var
|
|
65738
|
+
var VD = class extends Mh {
|
|
65491
65739
|
originalSource;
|
|
65492
65740
|
constructor(e, t, n = {}) {
|
|
65493
65741
|
let r = e.copy();
|
|
65494
65742
|
super(r, t, n), this.originalSource = e;
|
|
65495
65743
|
}
|
|
65496
65744
|
};
|
|
65497
|
-
function
|
|
65498
|
-
return new
|
|
65745
|
+
function HD(e, t, n) {
|
|
65746
|
+
return new VD(e, t, n);
|
|
65499
65747
|
}
|
|
65500
65748
|
//#endregion
|
|
65501
65749
|
//#region src/animation/transform/MovementTransforms.ts
|
|
65502
|
-
var
|
|
65750
|
+
var UD = class extends z {
|
|
65503
65751
|
target;
|
|
65504
65752
|
angle;
|
|
65505
65753
|
_startPoints = [];
|
|
@@ -65542,10 +65790,10 @@ var ID = class extends z {
|
|
|
65542
65790
|
e.setPoints(this._targetPoints), e.setTransformSubpathLengths(void 0), e.opacity = this._targetOpacity, e.color = this.target.color, super.finish();
|
|
65543
65791
|
}
|
|
65544
65792
|
};
|
|
65545
|
-
function
|
|
65546
|
-
return new
|
|
65793
|
+
function WD(e, t, n) {
|
|
65794
|
+
return new UD(e, t, n);
|
|
65547
65795
|
}
|
|
65548
|
-
var
|
|
65796
|
+
var GD = class extends z {
|
|
65549
65797
|
target;
|
|
65550
65798
|
angle;
|
|
65551
65799
|
_startPoints = [];
|
|
@@ -65588,10 +65836,10 @@ var RD = class extends z {
|
|
|
65588
65836
|
e.setPoints(this._targetPoints), e.setTransformSubpathLengths(void 0), e.opacity = this._targetOpacity, e.color = this.target.color, super.finish();
|
|
65589
65837
|
}
|
|
65590
65838
|
};
|
|
65591
|
-
function
|
|
65592
|
-
return new
|
|
65839
|
+
function KD(e, t, n) {
|
|
65840
|
+
return new GD(e, t, n);
|
|
65593
65841
|
}
|
|
65594
|
-
var
|
|
65842
|
+
var qD = class extends z {
|
|
65595
65843
|
mobject2;
|
|
65596
65844
|
pathArc;
|
|
65597
65845
|
autoCenter;
|
|
@@ -65620,10 +65868,10 @@ var BD = class extends z {
|
|
|
65620
65868
|
this.mobject.position.copy(this._targetPos1), this.mobject2.position.copy(this._targetPos2), this.mobject._markDirty(), this.mobject2._markDirty(), super.finish();
|
|
65621
65869
|
}
|
|
65622
65870
|
};
|
|
65623
|
-
function
|
|
65624
|
-
return new
|
|
65871
|
+
function JD(e, t, n) {
|
|
65872
|
+
return new qD(e, t, n);
|
|
65625
65873
|
}
|
|
65626
|
-
function
|
|
65874
|
+
function YD(e, t, n, r) {
|
|
65627
65875
|
let i = 1e-6;
|
|
65628
65876
|
if (Math.abs(r) < i) return new a.Vector3().lerpVectors(e, t, n);
|
|
65629
65877
|
let o = new a.Vector3().subVectors(t, e), s = new a.Vector3().addVectors(e, o.clone().multiplyScalar(.5));
|
|
@@ -65634,7 +65882,7 @@ function HD(e, t, n, r) {
|
|
|
65634
65882
|
let c = new a.Vector3().subVectors(e, s), l = n * r, u = Math.cos(l), d = Math.sin(l);
|
|
65635
65883
|
return new a.Vector3(s.x + c.x * u - c.y * d, s.y + c.x * d + c.y * u, s.z + c.z);
|
|
65636
65884
|
}
|
|
65637
|
-
var
|
|
65885
|
+
var XD = class extends z {
|
|
65638
65886
|
mobjects;
|
|
65639
65887
|
pathArc;
|
|
65640
65888
|
autoCenter;
|
|
@@ -65656,7 +65904,7 @@ var UD = class extends z {
|
|
|
65656
65904
|
}
|
|
65657
65905
|
interpolate(e) {
|
|
65658
65906
|
for (let t = 0; t < this.mobjects.length; t++) {
|
|
65659
|
-
let n = this.mobjects[t], r =
|
|
65907
|
+
let n = this.mobjects[t], r = YD(this._startPositions[t], this._targetPositions[t], e, this.pathArc);
|
|
65660
65908
|
n.position.copy(r), n._markDirty();
|
|
65661
65909
|
}
|
|
65662
65910
|
}
|
|
@@ -65665,12 +65913,12 @@ var UD = class extends z {
|
|
|
65665
65913
|
super.finish();
|
|
65666
65914
|
}
|
|
65667
65915
|
};
|
|
65668
|
-
function
|
|
65669
|
-
return new
|
|
65916
|
+
function ZD(e, t) {
|
|
65917
|
+
return new XD(e, t);
|
|
65670
65918
|
}
|
|
65671
65919
|
//#endregion
|
|
65672
65920
|
//#region src/animation/transform/SpecialTransforms.ts
|
|
65673
|
-
var
|
|
65921
|
+
var QD = class extends z {
|
|
65674
65922
|
scaleFactor;
|
|
65675
65923
|
_initialScale = new a.Vector3();
|
|
65676
65924
|
_targetScale = new a.Vector3();
|
|
@@ -65698,13 +65946,13 @@ var GD = class extends z {
|
|
|
65698
65946
|
this.interpolate(1), super.finish();
|
|
65699
65947
|
}
|
|
65700
65948
|
};
|
|
65701
|
-
function
|
|
65702
|
-
return new
|
|
65949
|
+
function $D(e, t, n) {
|
|
65950
|
+
return new QD(e, {
|
|
65703
65951
|
...n,
|
|
65704
65952
|
scaleFactor: t
|
|
65705
65953
|
});
|
|
65706
65954
|
}
|
|
65707
|
-
var
|
|
65955
|
+
var eO = class extends z {
|
|
65708
65956
|
_initialScale = new a.Vector3();
|
|
65709
65957
|
constructor(e, t = {}) {
|
|
65710
65958
|
super(e, t);
|
|
@@ -65720,19 +65968,19 @@ var qD = class extends z {
|
|
|
65720
65968
|
this.mobject.scaleVector.set(0, 0, 0), this.mobject._markDirty(), super.finish();
|
|
65721
65969
|
}
|
|
65722
65970
|
};
|
|
65723
|
-
function
|
|
65724
|
-
return new
|
|
65971
|
+
function tO(e, t) {
|
|
65972
|
+
return new eO(e, t);
|
|
65725
65973
|
}
|
|
65726
|
-
var
|
|
65974
|
+
var nO = class extends Mh {
|
|
65727
65975
|
constructor(e, t = {}) {
|
|
65728
65976
|
if (!e.savedState) throw Error("Restore requires mobject.savedState to be set. Use mobject.saveState() first.");
|
|
65729
65977
|
super(e, e.savedState, t);
|
|
65730
65978
|
}
|
|
65731
65979
|
};
|
|
65732
|
-
function
|
|
65733
|
-
return new
|
|
65980
|
+
function rO(e, t) {
|
|
65981
|
+
return new nO(e, t);
|
|
65734
65982
|
}
|
|
65735
|
-
var
|
|
65983
|
+
var iO = class extends z {
|
|
65736
65984
|
targetColor;
|
|
65737
65985
|
_startColor = new a.Color();
|
|
65738
65986
|
_targetColorObj = new a.Color();
|
|
@@ -65750,13 +65998,13 @@ var ZD = class extends z {
|
|
|
65750
65998
|
this.mobject.color = this.targetColor, this.mobject._markDirty(), super.finish();
|
|
65751
65999
|
}
|
|
65752
66000
|
};
|
|
65753
|
-
function
|
|
65754
|
-
return new
|
|
66001
|
+
function aO(e, t, n) {
|
|
66002
|
+
return new iO(e, {
|
|
65755
66003
|
...n,
|
|
65756
66004
|
color: t
|
|
65757
66005
|
});
|
|
65758
66006
|
}
|
|
65759
|
-
var
|
|
66007
|
+
var oO = class extends z {
|
|
65760
66008
|
animation1;
|
|
65761
66009
|
animation2;
|
|
65762
66010
|
transformRateFunc;
|
|
@@ -65789,12 +66037,12 @@ var $D = class extends z {
|
|
|
65789
66037
|
e.setPoints(this._anim2EndPoints), e.opacity = t.opacity, this.animation1.finish(), this.animation2.finish(), super.finish();
|
|
65790
66038
|
}
|
|
65791
66039
|
};
|
|
65792
|
-
function
|
|
65793
|
-
return new
|
|
66040
|
+
function sO(e, t, n) {
|
|
66041
|
+
return new oO(e, t, n);
|
|
65794
66042
|
}
|
|
65795
66043
|
//#endregion
|
|
65796
66044
|
//#region src/animation/transform/TransformMatchingBase.ts
|
|
65797
|
-
var
|
|
66045
|
+
var cO = class extends z {
|
|
65798
66046
|
target;
|
|
65799
66047
|
keyFunc;
|
|
65800
66048
|
fadeRatio;
|
|
@@ -65889,7 +66137,7 @@ var tO = class extends z {
|
|
|
65889
66137
|
};
|
|
65890
66138
|
//#endregion
|
|
65891
66139
|
//#region src/utils/hungarian.ts
|
|
65892
|
-
function
|
|
66140
|
+
function lO(e) {
|
|
65893
66141
|
let t = e.length;
|
|
65894
66142
|
if (t === 0) return {
|
|
65895
66143
|
assignments: [],
|
|
@@ -65907,7 +66155,7 @@ function nO(e) {
|
|
|
65907
66155
|
let r = 0;
|
|
65908
66156
|
for (let i = 0; i < t; i++) for (let t = 0; t < n; t++) e[i][t] > r && (r = e[i][t]);
|
|
65909
66157
|
let i = r * 10 + 1, a = Math.max(t, n), o = Array.from({ length: a }, (r, o) => Array.from({ length: a }, (r, a) => o < t && a < n ? e[o][a] : i)), s = new Float64Array(a + 1), c = new Float64Array(a + 1), l = new Int32Array(a + 1).fill(0), u = new Int32Array(a + 1).fill(0);
|
|
65910
|
-
for (let e = 1; e <= a; e++)
|
|
66158
|
+
for (let e = 1; e <= a; e++) uO(e, a, o, s, c, l, u);
|
|
65911
66159
|
let d = Array(t).fill(-1), f = /* @__PURE__ */ new Set(), p = /* @__PURE__ */ new Set(), m = 0;
|
|
65912
66160
|
for (let r = 1; r <= a; r++) {
|
|
65913
66161
|
let i = l[r] - 1, a = r - 1;
|
|
@@ -65920,7 +66168,7 @@ function nO(e) {
|
|
|
65920
66168
|
assignedCols: p
|
|
65921
66169
|
};
|
|
65922
66170
|
}
|
|
65923
|
-
function
|
|
66171
|
+
function uO(e, t, n, r, i, a, o) {
|
|
65924
66172
|
a[0] = e;
|
|
65925
66173
|
let s = 0, c = new Float64Array(t + 1).fill(Infinity), l = new Uint8Array(t + 1);
|
|
65926
66174
|
do {
|
|
@@ -65939,7 +66187,7 @@ function rO(e, t, n, r, i, a, o) {
|
|
|
65939
66187
|
a[s] = a[e], s = e;
|
|
65940
66188
|
} while (s !== 0);
|
|
65941
66189
|
}
|
|
65942
|
-
function
|
|
66190
|
+
function dO(e, t = 0) {
|
|
65943
66191
|
let n = e.length;
|
|
65944
66192
|
if (n === 0) return {
|
|
65945
66193
|
assignments: [],
|
|
@@ -65956,7 +66204,7 @@ function iO(e, t = 0) {
|
|
|
65956
66204
|
};
|
|
65957
66205
|
let i = 0;
|
|
65958
66206
|
for (let t = 0; t < n; t++) for (let n = 0; n < r; n++) e[t][n] > i && (i = e[t][n]);
|
|
65959
|
-
let a = i * 10 + 1, o =
|
|
66207
|
+
let a = i * 10 + 1, o = lO(Array.from({ length: n }, (n, o) => Array.from({ length: r }, (n, r) => e[o][r] >= t ? i - e[o][r] : a)));
|
|
65960
66208
|
for (let r = 0; r < n; r++) {
|
|
65961
66209
|
let n = o.assignments[r];
|
|
65962
66210
|
n >= 0 && e[r][n] < t && (o.assignments[r] = -1, o.assignedRows.delete(r), o.assignedCols.delete(n));
|
|
@@ -65965,7 +66213,7 @@ function iO(e, t = 0) {
|
|
|
65965
66213
|
}
|
|
65966
66214
|
//#endregion
|
|
65967
66215
|
//#region src/animation/transform/TransformMatchingShared.ts
|
|
65968
|
-
function
|
|
66216
|
+
function fO(e) {
|
|
65969
66217
|
let t = e.getLocalPoints();
|
|
65970
66218
|
if (t.length === 0) {
|
|
65971
66219
|
let t = e.getCenter();
|
|
@@ -66005,17 +66253,17 @@ function aO(e) {
|
|
|
66005
66253
|
]
|
|
66006
66254
|
};
|
|
66007
66255
|
}
|
|
66008
|
-
function
|
|
66009
|
-
let n =
|
|
66256
|
+
function pO(e, t) {
|
|
66257
|
+
let n = fO(e), r = fO(t), i = Math.sqrt(n.size[0] ** 2 + n.size[1] ** 2), a = Math.sqrt(r.size[0] ** 2 + r.size[1] ** 2), o = Math.max(i, a, .001), s = 1 - Math.abs(i - a) / o, c = n.size[1] === 0 ? 1 : n.size[0] / n.size[1], l = r.size[1] === 0 ? 1 : r.size[0] / r.size[1], u = Math.max(c, l, .001), d = 1 - Math.abs(c - l) / u, f = e.getLocalPoints().length, p = t.getLocalPoints().length, m = Math.max(f, p, 1), h = 1 - Math.abs(f - p) / m;
|
|
66010
66258
|
return s * .4 + d * .3 + h * .3;
|
|
66011
66259
|
}
|
|
66012
|
-
function
|
|
66013
|
-
let n =
|
|
66260
|
+
function mO(e, t) {
|
|
66261
|
+
let n = fO(e).center, r = fO(t).center;
|
|
66014
66262
|
return Math.sqrt((n[0] - r[0]) ** 2 + (n[1] - r[1]) ** 2 + (n[2] - r[2]) ** 2);
|
|
66015
66263
|
}
|
|
66016
66264
|
//#endregion
|
|
66017
66265
|
//#region src/animation/transform/TransformMatching.ts
|
|
66018
|
-
var
|
|
66266
|
+
var hO = class extends z {
|
|
66019
66267
|
target;
|
|
66020
66268
|
matchThreshold;
|
|
66021
66269
|
keyFunc;
|
|
@@ -66058,7 +66306,7 @@ var cO = class extends z {
|
|
|
66058
66306
|
}
|
|
66059
66307
|
}
|
|
66060
66308
|
} else {
|
|
66061
|
-
let i =
|
|
66309
|
+
let i = dO(Array.from({ length: e.length }, (n, r) => Array.from({ length: t.length }, (n, i) => pO(e[r], t[i]))), this.matchThreshold);
|
|
66062
66310
|
for (let a = 0; a < e.length; a++) {
|
|
66063
66311
|
let o = i.assignments[a];
|
|
66064
66312
|
o >= 0 && (this._addMatchedPart(e[a], t[o]), n.add(a), r.add(o));
|
|
@@ -66116,16 +66364,16 @@ var cO = class extends z {
|
|
|
66116
66364
|
super.finish();
|
|
66117
66365
|
}
|
|
66118
66366
|
};
|
|
66119
|
-
function
|
|
66120
|
-
return new
|
|
66367
|
+
function gO(e, t, n) {
|
|
66368
|
+
return new hO(e, t, n);
|
|
66121
66369
|
}
|
|
66122
|
-
function
|
|
66370
|
+
function _O(e) {
|
|
66123
66371
|
let t = e;
|
|
66124
66372
|
if (typeof t.getLatex == "function") return t.getLatex();
|
|
66125
|
-
let n =
|
|
66373
|
+
let n = fO(e);
|
|
66126
66374
|
return `shape_${`${n.size[0].toFixed(2)}_${n.size[1].toFixed(2)}`}_${e.getLocalPoints().length}`;
|
|
66127
66375
|
}
|
|
66128
|
-
var
|
|
66376
|
+
var vO = class extends z {
|
|
66129
66377
|
target;
|
|
66130
66378
|
keyFunc;
|
|
66131
66379
|
fadeRatio;
|
|
@@ -66135,7 +66383,7 @@ var dO = class extends z {
|
|
|
66135
66383
|
_fadeInParts = [];
|
|
66136
66384
|
_mismatchedPairs = [];
|
|
66137
66385
|
constructor(e, t, n = {}) {
|
|
66138
|
-
super(e, n), this.target = t, this.keyFunc = n.keyFunc ??
|
|
66386
|
+
super(e, n), this.target = t, this.keyFunc = n.keyFunc ?? _O, this.fadeRatio = Math.min(.5, Math.max(0, n.fadeRatio ?? .25)), this.transformMismatches = n.transformMismatches ?? !1;
|
|
66139
66387
|
}
|
|
66140
66388
|
_getTexParts(e) {
|
|
66141
66389
|
let t = e.children.filter((e) => e instanceof I);
|
|
@@ -66178,7 +66426,7 @@ var dO = class extends z {
|
|
|
66178
66426
|
for (let t = 0; t < e.length; t++) n.has(t) || o.push(t);
|
|
66179
66427
|
for (let e = 0; e < t.length; e++) r.has(e) || s.push(e);
|
|
66180
66428
|
if (this.transformMismatches && o.length > 0 && s.length > 0) {
|
|
66181
|
-
let n = o.map((t) => e[t]), r = s.map((e) => t[e]), i =
|
|
66429
|
+
let n = o.map((t) => e[t]), r = s.map((e) => t[e]), i = lO(Array.from({ length: n.length }, (e, t) => Array.from({ length: r.length }, (e, i) => mO(n[t], r[i])))), a = /* @__PURE__ */ new Set(), c = /* @__PURE__ */ new Set();
|
|
66182
66430
|
for (let e = 0; e < n.length; e++) {
|
|
66183
66431
|
let t = i.assignments[e];
|
|
66184
66432
|
t >= 0 && t < r.length && (this._addMismatchedPair(n[e], r[t]), a.add(e), c.add(t));
|
|
@@ -66283,12 +66531,12 @@ var dO = class extends z {
|
|
|
66283
66531
|
super.finish();
|
|
66284
66532
|
}
|
|
66285
66533
|
};
|
|
66286
|
-
function
|
|
66287
|
-
return new
|
|
66534
|
+
function yO(e, t, n) {
|
|
66535
|
+
return new vO(e, t, n);
|
|
66288
66536
|
}
|
|
66289
66537
|
//#endregion
|
|
66290
66538
|
//#region src/animation/transform/TransformMatchingCode.ts
|
|
66291
|
-
var
|
|
66539
|
+
var bO = .25, xO = 1, SO = class extends z {
|
|
66292
66540
|
target;
|
|
66293
66541
|
keyFunc;
|
|
66294
66542
|
fadeRatio;
|
|
@@ -66300,7 +66548,7 @@ var pO = .25, mO = 1, hO = class extends z {
|
|
|
66300
66548
|
_fadeOutParts = [];
|
|
66301
66549
|
_fadeInParts = [];
|
|
66302
66550
|
constructor(e, t, n = {}) {
|
|
66303
|
-
super(e, n), this.target = t, this.keyFunc = n.keyFunc, this.fadeRatio = Math.min(.5, Math.max(0, n.fadeRatio ??
|
|
66551
|
+
super(e, n), this.target = t, this.keyFunc = n.keyFunc, this.fadeRatio = Math.min(.5, Math.max(0, n.fadeRatio ?? bO)), this.matchBy = n.matchBy ?? "token", this.transformMismatches = n.transformMismatches ?? !1, this.fadeTransformMismatches = n.fadeTransformMismatches ?? !1;
|
|
66304
66552
|
}
|
|
66305
66553
|
get matchedParts() {
|
|
66306
66554
|
return this._matchedParts;
|
|
@@ -66376,19 +66624,19 @@ var pO = .25, mO = 1, hO = class extends z {
|
|
|
66376
66624
|
}
|
|
66377
66625
|
_addMatchedPart(e, t, n) {
|
|
66378
66626
|
let r = this.mobject.makeTokenMobject(e.text, e.type);
|
|
66379
|
-
this._place(r, e.position), r.opacity =
|
|
66627
|
+
this._place(r, e.position), r.opacity = xO, this._parentAdd(r), n.push({
|
|
66380
66628
|
mobject: r,
|
|
66381
66629
|
startPosition: e.position,
|
|
66382
66630
|
targetPosition: t.position,
|
|
66383
|
-
startOpacity:
|
|
66384
|
-
targetOpacity:
|
|
66631
|
+
startOpacity: xO,
|
|
66632
|
+
targetOpacity: xO
|
|
66385
66633
|
});
|
|
66386
66634
|
}
|
|
66387
66635
|
_addFadeOutPart(e) {
|
|
66388
66636
|
let t = this.mobject.makeTokenMobject(e.text, e.type);
|
|
66389
|
-
this._place(t, e.position), t.opacity =
|
|
66637
|
+
this._place(t, e.position), t.opacity = xO, this._parentAdd(t), this._fadeOutParts.push({
|
|
66390
66638
|
mobject: t,
|
|
66391
|
-
startOpacity:
|
|
66639
|
+
startOpacity: xO,
|
|
66392
66640
|
targetOpacity: 0,
|
|
66393
66641
|
fadeIn: !1
|
|
66394
66642
|
});
|
|
@@ -66398,7 +66646,7 @@ var pO = .25, mO = 1, hO = class extends z {
|
|
|
66398
66646
|
this._place(t, e.position), t.opacity = 0, this._parentAdd(t), this._fadeInParts.push({
|
|
66399
66647
|
mobject: t,
|
|
66400
66648
|
startOpacity: 0,
|
|
66401
|
-
targetOpacity:
|
|
66649
|
+
targetOpacity: xO,
|
|
66402
66650
|
fadeIn: !0
|
|
66403
66651
|
});
|
|
66404
66652
|
}
|
|
@@ -66423,16 +66671,16 @@ var pO = .25, mO = 1, hO = class extends z {
|
|
|
66423
66671
|
super.finish();
|
|
66424
66672
|
}
|
|
66425
66673
|
};
|
|
66426
|
-
function
|
|
66427
|
-
return new
|
|
66674
|
+
function CO(e, t, n) {
|
|
66675
|
+
return new SO(e, t, n);
|
|
66428
66676
|
}
|
|
66429
66677
|
//#endregion
|
|
66430
66678
|
//#region src/animation/transform/ApplyPointwiseFunction.ts
|
|
66431
|
-
function
|
|
66679
|
+
function wO(e) {
|
|
66432
66680
|
let t = e;
|
|
66433
66681
|
return typeof t.getLocalPoints == "function" && typeof t.setPoints == "function";
|
|
66434
66682
|
}
|
|
66435
|
-
var
|
|
66683
|
+
var TO = class extends z {
|
|
66436
66684
|
func;
|
|
66437
66685
|
_snapshots = [];
|
|
66438
66686
|
constructor(e, t, n) {
|
|
@@ -66441,7 +66689,7 @@ var vO = class extends z {
|
|
|
66441
66689
|
begin() {
|
|
66442
66690
|
super.begin(), this._snapshots = [];
|
|
66443
66691
|
let e = new a.Vector3();
|
|
66444
|
-
for (let t of this.mobject.getFamily()) if (
|
|
66692
|
+
for (let t of this.mobject.getFamily()) if (wO(t)) {
|
|
66445
66693
|
let n = t.getLocalPoints();
|
|
66446
66694
|
if (n.length === 0) continue;
|
|
66447
66695
|
let r = t._worldMatrix(), i = r.clone().invert(), a = n.map((t) => {
|
|
@@ -66477,16 +66725,16 @@ var vO = class extends z {
|
|
|
66477
66725
|
this.mobject._markDirtyUpward(), super.finish();
|
|
66478
66726
|
}
|
|
66479
66727
|
};
|
|
66480
|
-
function
|
|
66481
|
-
return new
|
|
66728
|
+
function EO(e, t, n) {
|
|
66729
|
+
return new TO(e, t, n);
|
|
66482
66730
|
}
|
|
66483
66731
|
//#endregion
|
|
66484
66732
|
//#region src/animation/transform/ApplyPointwiseFunctionToCenter.ts
|
|
66485
|
-
function
|
|
66733
|
+
function DO(e) {
|
|
66486
66734
|
let t = e;
|
|
66487
66735
|
return typeof t.getLocalPoints == "function" && typeof t.setPoints == "function";
|
|
66488
66736
|
}
|
|
66489
|
-
var
|
|
66737
|
+
var OO = class extends z {
|
|
66490
66738
|
func;
|
|
66491
66739
|
_snapshots = [];
|
|
66492
66740
|
constructor(e, t, n) {
|
|
@@ -66495,7 +66743,7 @@ var xO = class extends z {
|
|
|
66495
66743
|
begin() {
|
|
66496
66744
|
super.begin(), this._snapshots = [];
|
|
66497
66745
|
let e = new a.Vector3();
|
|
66498
|
-
for (let t of this.mobject.getFamily()) if (
|
|
66746
|
+
for (let t of this.mobject.getFamily()) if (DO(t)) {
|
|
66499
66747
|
let n = t.getLocalPoints();
|
|
66500
66748
|
if (n.length === 0) continue;
|
|
66501
66749
|
let r = t, i = r._threeObject, a = null, o = null;
|
|
@@ -66544,12 +66792,12 @@ var xO = class extends z {
|
|
|
66544
66792
|
this.mobject._markDirtyUpward(), super.finish();
|
|
66545
66793
|
}
|
|
66546
66794
|
};
|
|
66547
|
-
function
|
|
66548
|
-
return new
|
|
66795
|
+
function kO(e, t, n) {
|
|
66796
|
+
return new OO(e, t, n);
|
|
66549
66797
|
}
|
|
66550
66798
|
//#endregion
|
|
66551
66799
|
//#region src/animation/movement/Rotate.ts
|
|
66552
|
-
var
|
|
66800
|
+
var AO = class extends z {
|
|
66553
66801
|
angle;
|
|
66554
66802
|
axis;
|
|
66555
66803
|
aboutPoint;
|
|
@@ -66730,7 +66978,7 @@ var CO = class extends z {
|
|
|
66730
66978
|
this.interpolate(1), super.finish();
|
|
66731
66979
|
}
|
|
66732
66980
|
};
|
|
66733
|
-
function
|
|
66981
|
+
function jO(e, t, n) {
|
|
66734
66982
|
if (typeof t != "number") throw TypeError("rotate(): angle must be a number");
|
|
66735
66983
|
return n && (() => {
|
|
66736
66984
|
let e = (e) => (e.duration === void 0 || typeof e.duration == "number") && (e.rateFunc === void 0 || !0) && (e.shift === void 0 || Array.isArray(e.shift) && e.shift.length === 3 && typeof e.shift[0] == "number" && typeof e.shift[1] == "number" && typeof e.shift[2] == "number") && (e.axis === void 0 || Array.isArray(e.axis) && e.axis.length === 3 && typeof e.axis[0] == "number" && typeof e.axis[1] == "number" && typeof e.axis[2] == "number") && (e.aboutPoint === void 0 || Array.isArray(e.aboutPoint) && e.aboutPoint.length === 3 && typeof e.aboutPoint[0] == "number" && typeof e.aboutPoint[1] == "number" && typeof e.aboutPoint[2] == "number") && (e.aboutEdge === void 0 || Array.isArray(e.aboutEdge) && e.aboutEdge.length === 3 && typeof e.aboutEdge[0] == "number" && typeof e.aboutEdge[1] == "number" && typeof e.aboutEdge[2] == "number"), t = (e, t, n = !0) => (e.duration === void 0 || typeof e.duration == "number" || F(n, {
|
|
@@ -66870,17 +67118,17 @@ function wO(e, t, n) {
|
|
|
66870
67118
|
expected: "Omit<RotateOptions, \"angle\">",
|
|
66871
67119
|
value: e
|
|
66872
67120
|
}, r))(e, "$input", !0)), e);
|
|
66873
|
-
})()(n), new
|
|
67121
|
+
})()(n), new AO(e, {
|
|
66874
67122
|
...n,
|
|
66875
67123
|
angle: t
|
|
66876
67124
|
});
|
|
66877
67125
|
}
|
|
66878
67126
|
//#endregion
|
|
66879
67127
|
//#region src/animation/movement/Scale.ts
|
|
66880
|
-
function
|
|
67128
|
+
function MO(e, t, n) {
|
|
66881
67129
|
return new a.Vector3(e.x + (t.x - e.x) * n, e.y + (t.y - e.y) * n, e.z + (t.z - e.z) * n);
|
|
66882
67130
|
}
|
|
66883
|
-
var
|
|
67131
|
+
var NO = class extends z {
|
|
66884
67132
|
scaleFactor;
|
|
66885
67133
|
aboutPoint;
|
|
66886
67134
|
_initialScale = new a.Vector3();
|
|
@@ -66905,7 +67153,7 @@ var EO = class extends z {
|
|
|
66905
67153
|
}
|
|
66906
67154
|
}
|
|
66907
67155
|
interpolate(e) {
|
|
66908
|
-
let t =
|
|
67156
|
+
let t = MO(this._initialScale, this._targetScale, e);
|
|
66909
67157
|
if (this.mobject.scaleVector.copy(t), this._aboutPointVector) {
|
|
66910
67158
|
let e = new a.Vector3(t.x / this._initialScale.x, t.y / this._initialScale.y, t.z / this._initialScale.z), n = new a.Vector3().copy(this._initialPosition).sub(this._aboutPointVector);
|
|
66911
67159
|
n.multiply(e);
|
|
@@ -66918,13 +67166,13 @@ var EO = class extends z {
|
|
|
66918
67166
|
this.interpolate(1), super.finish();
|
|
66919
67167
|
}
|
|
66920
67168
|
};
|
|
66921
|
-
function
|
|
66922
|
-
return new
|
|
67169
|
+
function PO(e, t, n) {
|
|
67170
|
+
return new NO(e, {
|
|
66923
67171
|
...n,
|
|
66924
67172
|
scaleFactor: t
|
|
66925
67173
|
});
|
|
66926
67174
|
}
|
|
66927
|
-
var
|
|
67175
|
+
var FO = class extends z {
|
|
66928
67176
|
_targetScale = new a.Vector3();
|
|
66929
67177
|
constructor(e, t = {}) {
|
|
66930
67178
|
super(e, t);
|
|
@@ -66939,12 +67187,12 @@ var OO = class extends z {
|
|
|
66939
67187
|
this.mobject.scaleVector.copy(this._targetScale), this.mobject._markDirty(), super.finish();
|
|
66940
67188
|
}
|
|
66941
67189
|
};
|
|
66942
|
-
function
|
|
66943
|
-
return new
|
|
67190
|
+
function IO(e, t) {
|
|
67191
|
+
return new FO(e, t);
|
|
66944
67192
|
}
|
|
66945
67193
|
//#endregion
|
|
66946
67194
|
//#region src/animation/movement/Shift.ts
|
|
66947
|
-
var
|
|
67195
|
+
var LO = class extends z {
|
|
66948
67196
|
direction;
|
|
66949
67197
|
_initialPosition = new a.Vector3();
|
|
66950
67198
|
_targetPosition = new a.Vector3();
|
|
@@ -66962,13 +67210,13 @@ var AO = class extends z {
|
|
|
66962
67210
|
this.mobject.position.set(this._initialPosition.x + this.direction[0] * e, this._initialPosition.y + this.direction[1] * e, this._initialPosition.z + this.direction[2] * e), this.mobject._markDirty(), super.finish();
|
|
66963
67211
|
}
|
|
66964
67212
|
};
|
|
66965
|
-
function
|
|
66966
|
-
return new
|
|
67213
|
+
function RO(e, t, n) {
|
|
67214
|
+
return new LO(e, {
|
|
66967
67215
|
...n,
|
|
66968
67216
|
direction: t
|
|
66969
67217
|
});
|
|
66970
67218
|
}
|
|
66971
|
-
var
|
|
67219
|
+
var zO = class extends z {
|
|
66972
67220
|
_initialPosition = new a.Vector3();
|
|
66973
67221
|
_targetPosition = new a.Vector3();
|
|
66974
67222
|
constructor(e, t = {}) {
|
|
@@ -66986,12 +67234,12 @@ var MO = class extends z {
|
|
|
66986
67234
|
this.mobject.position.copy(this._targetPosition), this.mobject._markDirty(), super.finish();
|
|
66987
67235
|
}
|
|
66988
67236
|
};
|
|
66989
|
-
function
|
|
66990
|
-
return new
|
|
67237
|
+
function BO(e, t) {
|
|
67238
|
+
return new zO(e, t);
|
|
66991
67239
|
}
|
|
66992
67240
|
//#endregion
|
|
66993
67241
|
//#region src/animation/movement/MoveAlongPath.ts
|
|
66994
|
-
function
|
|
67242
|
+
function VO(e, t, n, r, i) {
|
|
66995
67243
|
let a = 1 - i, o = a * a, s = o * a, c = i * i, l = c * i;
|
|
66996
67244
|
return [
|
|
66997
67245
|
s * e[0] + 3 * o * i * t[0] + 3 * a * c * n[0] + l * r[0],
|
|
@@ -66999,7 +67247,7 @@ function PO(e, t, n, r, i) {
|
|
|
66999
67247
|
s * e[2] + 3 * o * i * t[2] + 3 * a * c * n[2] + l * r[2]
|
|
67000
67248
|
];
|
|
67001
67249
|
}
|
|
67002
|
-
function
|
|
67250
|
+
function HO(e, t, n, r, i) {
|
|
67003
67251
|
let a = 1 - i, o = a * a, s = i * i;
|
|
67004
67252
|
return [
|
|
67005
67253
|
3 * o * (t[0] - e[0]) + 6 * a * i * (n[0] - t[0]) + 3 * s * (r[0] - n[0]),
|
|
@@ -67007,7 +67255,7 @@ function FO(e, t, n, r, i) {
|
|
|
67007
67255
|
3 * o * (t[2] - e[2]) + 6 * a * i * (n[2] - t[2]) + 3 * s * (r[2] - n[2])
|
|
67008
67256
|
];
|
|
67009
67257
|
}
|
|
67010
|
-
var
|
|
67258
|
+
var UO = class extends z {
|
|
67011
67259
|
path;
|
|
67012
67260
|
rotateAlongPath;
|
|
67013
67261
|
_pathPoints = [];
|
|
@@ -67049,8 +67297,8 @@ var IO = class extends z {
|
|
|
67049
67297
|
e = Math.max(0, Math.min(1, e));
|
|
67050
67298
|
let t = e * this._numSegments, n = Math.min(Math.floor(t), this._numSegments - 1), r = t - n, i = n * 3, a = this._pathPoints[i], o = this._pathPoints[i + 1], s = this._pathPoints[i + 2], c = this._pathPoints[i + 3];
|
|
67051
67299
|
return {
|
|
67052
|
-
position:
|
|
67053
|
-
tangent:
|
|
67300
|
+
position: VO(a, o, s, c, r),
|
|
67301
|
+
tangent: HO(a, o, s, c, r)
|
|
67054
67302
|
};
|
|
67055
67303
|
}
|
|
67056
67304
|
interpolate(e) {
|
|
@@ -67069,15 +67317,15 @@ var IO = class extends z {
|
|
|
67069
67317
|
this.interpolate(1), super.finish();
|
|
67070
67318
|
}
|
|
67071
67319
|
};
|
|
67072
|
-
function
|
|
67073
|
-
return new
|
|
67320
|
+
function WO(e, t, n) {
|
|
67321
|
+
return new UO(e, {
|
|
67074
67322
|
...n,
|
|
67075
67323
|
path: t
|
|
67076
67324
|
});
|
|
67077
67325
|
}
|
|
67078
67326
|
//#endregion
|
|
67079
67327
|
//#region src/utils/ode.ts
|
|
67080
|
-
function
|
|
67328
|
+
function GO(e, t, n, r) {
|
|
67081
67329
|
let i = n.length, a = e(t, n), o = Array(i);
|
|
67082
67330
|
for (let e = 0; e < i; e++) o[e] = n[e] + .5 * r * a[e];
|
|
67083
67331
|
let s = e(t + .5 * r, o), c = Array(i);
|
|
@@ -67088,7 +67336,7 @@ function RO(e, t, n, r) {
|
|
|
67088
67336
|
for (let e = 0; e < i; e++) f[e] = n[e] + r / 6 * (a[e] + 2 * s[e] + 2 * l[e] + d[e]);
|
|
67089
67337
|
return f;
|
|
67090
67338
|
}
|
|
67091
|
-
function
|
|
67339
|
+
function KO(e, t, n, r, i = {}) {
|
|
67092
67340
|
let { recordTrajectory: a = !1 } = i, o, s;
|
|
67093
67341
|
i.stepSize === void 0 ? (o = i.numSteps ?? 100, s = (r - t) / o) : (s = i.stepSize, o = Math.max(1, Math.ceil(Math.abs(r - t) / Math.abs(s))), s = (r - t) / o);
|
|
67094
67342
|
let c = [], l = t, u = [...n];
|
|
@@ -67096,7 +67344,7 @@ function zO(e, t, n, r, i = {}) {
|
|
|
67096
67344
|
t: l,
|
|
67097
67345
|
y: [...u]
|
|
67098
67346
|
});
|
|
67099
|
-
for (let n = 0; n < o; n++) u =
|
|
67347
|
+
for (let n = 0; n < o; n++) u = GO(e, l, u, s), l = t + (n + 1) * s, a && c.push({
|
|
67100
67348
|
t: l,
|
|
67101
67349
|
y: [...u]
|
|
67102
67350
|
});
|
|
@@ -67106,9 +67354,9 @@ function zO(e, t, n, r, i = {}) {
|
|
|
67106
67354
|
trajectory: c
|
|
67107
67355
|
};
|
|
67108
67356
|
}
|
|
67109
|
-
function
|
|
67357
|
+
function qO(e, t, n, r = 100) {
|
|
67110
67358
|
if (n === 0) return [...t];
|
|
67111
|
-
let i =
|
|
67359
|
+
let i = KO((t, n) => {
|
|
67112
67360
|
let r = e([
|
|
67113
67361
|
n[0],
|
|
67114
67362
|
n[1],
|
|
@@ -67128,14 +67376,14 @@ function BO(e, t, n, r = 100) {
|
|
|
67128
67376
|
}
|
|
67129
67377
|
//#endregion
|
|
67130
67378
|
//#region src/animation/movement/Homotopy.ts
|
|
67131
|
-
function
|
|
67379
|
+
function JO(e) {
|
|
67132
67380
|
let t = e._worldMatrix();
|
|
67133
67381
|
return {
|
|
67134
67382
|
worldMatrix: t,
|
|
67135
67383
|
inverseWorld: t.clone().invert()
|
|
67136
67384
|
};
|
|
67137
67385
|
}
|
|
67138
|
-
function
|
|
67386
|
+
function YO(e, t) {
|
|
67139
67387
|
let n = new a.Vector3(t[0], t[1], t[2]).applyMatrix4(e);
|
|
67140
67388
|
return [
|
|
67141
67389
|
n.x,
|
|
@@ -67143,7 +67391,7 @@ function HO(e, t) {
|
|
|
67143
67391
|
n.z
|
|
67144
67392
|
];
|
|
67145
67393
|
}
|
|
67146
|
-
var
|
|
67394
|
+
var XO = class extends z {
|
|
67147
67395
|
homotopyFunc;
|
|
67148
67396
|
_originalPoints = null;
|
|
67149
67397
|
_frame = null;
|
|
@@ -67152,7 +67400,7 @@ var UO = class extends z {
|
|
|
67152
67400
|
super(e, t), this.homotopyFunc = t.homotopyFunc;
|
|
67153
67401
|
}
|
|
67154
67402
|
begin() {
|
|
67155
|
-
super.begin(), this.mobject instanceof I ? (this._isVMobject = !0, this._originalPoints = this.mobject.getLocalPoints(), this._frame =
|
|
67403
|
+
super.begin(), this.mobject instanceof I ? (this._isVMobject = !0, this._originalPoints = this.mobject.getLocalPoints(), this._frame = JO(this.mobject)) : (this._isVMobject = !1, this._originalPoints = null, this._frame = null);
|
|
67156
67404
|
}
|
|
67157
67405
|
interpolate(e) {
|
|
67158
67406
|
if (!this._isVMobject || !this._originalPoints || !this._frame) {
|
|
@@ -67162,15 +67410,15 @@ var UO = class extends z {
|
|
|
67162
67410
|
}
|
|
67163
67411
|
let t = this.mobject, { worldMatrix: n, inverseWorld: r } = this._frame, i = [];
|
|
67164
67412
|
for (let t of this._originalPoints) {
|
|
67165
|
-
let [a, o, s] =
|
|
67166
|
-
i.push(
|
|
67413
|
+
let [a, o, s] = YO(n, t), c = this.homotopyFunc(a, o, s, e);
|
|
67414
|
+
i.push(YO(r, c));
|
|
67167
67415
|
}
|
|
67168
67416
|
t.setPoints3D(i);
|
|
67169
67417
|
}
|
|
67170
67418
|
finish() {
|
|
67171
67419
|
this.interpolate(1), super.finish();
|
|
67172
67420
|
}
|
|
67173
|
-
},
|
|
67421
|
+
}, ZO = class extends z {
|
|
67174
67422
|
complexFunc;
|
|
67175
67423
|
_originalPoints = null;
|
|
67176
67424
|
_frame = null;
|
|
@@ -67179,7 +67427,7 @@ var UO = class extends z {
|
|
|
67179
67427
|
super(e, t), this.complexFunc = t.complexFunc;
|
|
67180
67428
|
}
|
|
67181
67429
|
begin() {
|
|
67182
|
-
super.begin(), this.mobject instanceof I ? (this._isVMobject = !0, this._originalPoints = this.mobject.getLocalPoints(), this._frame =
|
|
67430
|
+
super.begin(), this.mobject instanceof I ? (this._isVMobject = !0, this._originalPoints = this.mobject.getLocalPoints(), this._frame = JO(this.mobject)) : (this._isVMobject = !1, this._originalPoints = null, this._frame = null);
|
|
67183
67431
|
}
|
|
67184
67432
|
interpolate(e) {
|
|
67185
67433
|
if (!this._isVMobject || !this._originalPoints || !this._frame) {
|
|
@@ -67192,11 +67440,11 @@ var UO = class extends z {
|
|
|
67192
67440
|
}
|
|
67193
67441
|
let t = this.mobject, { worldMatrix: n, inverseWorld: r } = this._frame, i = [];
|
|
67194
67442
|
for (let t of this._originalPoints) {
|
|
67195
|
-
let [a, o, s] =
|
|
67443
|
+
let [a, o, s] = YO(n, t), c = this.complexFunc({
|
|
67196
67444
|
re: a,
|
|
67197
67445
|
im: o
|
|
67198
67446
|
}, e);
|
|
67199
|
-
i.push(
|
|
67447
|
+
i.push(YO(r, [
|
|
67200
67448
|
c.re,
|
|
67201
67449
|
c.im,
|
|
67202
67450
|
s
|
|
@@ -67207,7 +67455,7 @@ var UO = class extends z {
|
|
|
67207
67455
|
finish() {
|
|
67208
67456
|
this.interpolate(1), super.finish();
|
|
67209
67457
|
}
|
|
67210
|
-
},
|
|
67458
|
+
}, QO = class extends z {
|
|
67211
67459
|
homotopyFunc;
|
|
67212
67460
|
_originalPoints = null;
|
|
67213
67461
|
_frame = null;
|
|
@@ -67218,9 +67466,9 @@ var UO = class extends z {
|
|
|
67218
67466
|
begin() {
|
|
67219
67467
|
super.begin();
|
|
67220
67468
|
let e = this.mobject;
|
|
67221
|
-
this._frame =
|
|
67469
|
+
this._frame = JO(e);
|
|
67222
67470
|
let { worldMatrix: t } = this._frame;
|
|
67223
|
-
this._originalPoints = e.getLocalPoints().map((e) =>
|
|
67471
|
+
this._originalPoints = e.getLocalPoints().map((e) => YO(t, e)), this._anchorIndices = [];
|
|
67224
67472
|
for (let e = 0; e < this._originalPoints.length; e += 3) this._anchorIndices.push(e);
|
|
67225
67473
|
let n = this._originalPoints.length - 1;
|
|
67226
67474
|
n >= 0 && !this._anchorIndices.includes(n) && this._anchorIndices.push(n);
|
|
@@ -67237,7 +67485,7 @@ var UO = class extends z {
|
|
|
67237
67485
|
}
|
|
67238
67486
|
for (let t = 0; t < n; t++) i.has(t) || (r[t] = this._transformHandle(t, e, i));
|
|
67239
67487
|
let { inverseWorld: a } = this._frame;
|
|
67240
|
-
t.setPoints3D(r.map((e) =>
|
|
67488
|
+
t.setPoints3D(r.map((e) => YO(a, e)));
|
|
67241
67489
|
}
|
|
67242
67490
|
_transformHandle(e, t, n) {
|
|
67243
67491
|
let r = this._originalPoints[e], i = -1, a = -1;
|
|
@@ -67271,7 +67519,7 @@ var UO = class extends z {
|
|
|
67271
67519
|
finish() {
|
|
67272
67520
|
this.interpolate(1), super.finish();
|
|
67273
67521
|
}
|
|
67274
|
-
},
|
|
67522
|
+
}, $O = class extends z {
|
|
67275
67523
|
vectorField;
|
|
67276
67524
|
virtualTime;
|
|
67277
67525
|
_originalPoints = null;
|
|
@@ -67283,7 +67531,7 @@ var UO = class extends z {
|
|
|
67283
67531
|
super(e, t), this.vectorField = t.vectorField, this.virtualTime = t.virtualTime ?? 1, this._integrationSteps = t.integrationSteps ?? 100;
|
|
67284
67532
|
}
|
|
67285
67533
|
begin() {
|
|
67286
|
-
if (super.begin(), this.mobject instanceof I) this._isVMobject = !0, this._originalPoints = this.mobject.getLocalPoints(), this._frame =
|
|
67534
|
+
if (super.begin(), this.mobject instanceof I) this._isVMobject = !0, this._originalPoints = this.mobject.getLocalPoints(), this._frame = JO(this.mobject);
|
|
67287
67535
|
else {
|
|
67288
67536
|
this._isVMobject = !1, this._originalPoints = null, this._frame = null;
|
|
67289
67537
|
let e = this.mobject.position;
|
|
@@ -67301,14 +67549,14 @@ var UO = class extends z {
|
|
|
67301
67549
|
this.mobject.position.x,
|
|
67302
67550
|
this.mobject.position.y,
|
|
67303
67551
|
this.mobject.position.z
|
|
67304
|
-
], [n, r, i] =
|
|
67552
|
+
], [n, r, i] = qO(this.vectorField, e, t, this._integrationSteps);
|
|
67305
67553
|
this.mobject.position.set(n, r, i), this.mobject._markDirty();
|
|
67306
67554
|
return;
|
|
67307
67555
|
}
|
|
67308
67556
|
let n = this.mobject, { worldMatrix: r, inverseWorld: i } = this._frame, a = [];
|
|
67309
67557
|
for (let e of this._originalPoints) {
|
|
67310
|
-
let n =
|
|
67311
|
-
a.push(
|
|
67558
|
+
let n = qO(this.vectorField, YO(r, e), t, this._integrationSteps);
|
|
67559
|
+
a.push(YO(i, n));
|
|
67312
67560
|
}
|
|
67313
67561
|
n.setPoints3D(a);
|
|
67314
67562
|
}
|
|
@@ -67316,33 +67564,33 @@ var UO = class extends z {
|
|
|
67316
67564
|
this.interpolate(1), super.finish();
|
|
67317
67565
|
}
|
|
67318
67566
|
};
|
|
67319
|
-
function
|
|
67320
|
-
return new
|
|
67567
|
+
function ek(e, t, n) {
|
|
67568
|
+
return new XO(e, {
|
|
67321
67569
|
...n,
|
|
67322
67570
|
homotopyFunc: t
|
|
67323
67571
|
});
|
|
67324
67572
|
}
|
|
67325
|
-
function
|
|
67326
|
-
return new
|
|
67573
|
+
function tk(e, t, n) {
|
|
67574
|
+
return new ZO(e, {
|
|
67327
67575
|
...n,
|
|
67328
67576
|
complexFunc: t
|
|
67329
67577
|
});
|
|
67330
67578
|
}
|
|
67331
|
-
function
|
|
67332
|
-
return new
|
|
67579
|
+
function nk(e, t, n) {
|
|
67580
|
+
return new QO(e, {
|
|
67333
67581
|
...n,
|
|
67334
67582
|
homotopyFunc: t
|
|
67335
67583
|
});
|
|
67336
67584
|
}
|
|
67337
|
-
function
|
|
67338
|
-
return new
|
|
67585
|
+
function rk(e, t, n) {
|
|
67586
|
+
return new $O(e, {
|
|
67339
67587
|
...n,
|
|
67340
67588
|
vectorField: t
|
|
67341
67589
|
});
|
|
67342
67590
|
}
|
|
67343
67591
|
//#endregion
|
|
67344
67592
|
//#region src/animation/growing/index.ts
|
|
67345
|
-
var
|
|
67593
|
+
var ik = class extends z {
|
|
67346
67594
|
_start = new a.Vector3();
|
|
67347
67595
|
_endShaftPos = new a.Vector3();
|
|
67348
67596
|
_endTipPos = new a.Vector3();
|
|
@@ -67400,10 +67648,10 @@ var ZO = class extends z {
|
|
|
67400
67648
|
t.position.copy(this._endShaftPos), n.position.copy(this._endTipPos), t.scaleVector.copy(this._endShaftScale), n.scaleVector.copy(this._endTipScale), t._markDirty(), n._markDirty(), this.mobject._markDirty(), super.finish();
|
|
67401
67649
|
}
|
|
67402
67650
|
};
|
|
67403
|
-
function
|
|
67404
|
-
return new
|
|
67651
|
+
function ak(e, t) {
|
|
67652
|
+
return new ik(e, t);
|
|
67405
67653
|
}
|
|
67406
|
-
var
|
|
67654
|
+
var ok = class extends z {
|
|
67407
67655
|
edge;
|
|
67408
67656
|
_targetScale = new a.Vector3();
|
|
67409
67657
|
_targetPosition = new a.Vector3();
|
|
@@ -67424,13 +67672,13 @@ var $O = class extends z {
|
|
|
67424
67672
|
this.mobject.scaleVector.copy(this._targetScale), this.mobject.position.copy(this._targetPosition), this.mobject._markDirty(), super.finish();
|
|
67425
67673
|
}
|
|
67426
67674
|
};
|
|
67427
|
-
function
|
|
67428
|
-
return new
|
|
67675
|
+
function sk(e, t, n) {
|
|
67676
|
+
return new ok(e, {
|
|
67429
67677
|
...n,
|
|
67430
67678
|
edge: t
|
|
67431
67679
|
});
|
|
67432
67680
|
}
|
|
67433
|
-
var
|
|
67681
|
+
var ck = class extends z {
|
|
67434
67682
|
point;
|
|
67435
67683
|
_targetScale = new a.Vector3();
|
|
67436
67684
|
_targetPosition = new a.Vector3();
|
|
@@ -67449,13 +67697,13 @@ var tk = class extends z {
|
|
|
67449
67697
|
this.mobject.scaleVector.copy(this._targetScale), this.mobject.position.copy(this._targetPosition), this.mobject._markDirty(), super.finish();
|
|
67450
67698
|
}
|
|
67451
67699
|
};
|
|
67452
|
-
function
|
|
67453
|
-
return new
|
|
67700
|
+
function lk(e, t, n) {
|
|
67701
|
+
return new ck(e, {
|
|
67454
67702
|
...n,
|
|
67455
67703
|
point: t
|
|
67456
67704
|
});
|
|
67457
67705
|
}
|
|
67458
|
-
var
|
|
67706
|
+
var uk = class extends z {
|
|
67459
67707
|
angle;
|
|
67460
67708
|
axis;
|
|
67461
67709
|
_targetScale = new a.Vector3();
|
|
@@ -67483,18 +67731,18 @@ var rk = class extends z {
|
|
|
67483
67731
|
this.mobject.scaleVector.copy(this._targetScale), this.mobject.rotation.copy(this._initialRotation), this.mobject._markDirty(), super.finish();
|
|
67484
67732
|
}
|
|
67485
67733
|
};
|
|
67486
|
-
function
|
|
67487
|
-
return new
|
|
67734
|
+
function dk(e, t) {
|
|
67735
|
+
return new uk(e, t);
|
|
67488
67736
|
}
|
|
67489
67737
|
//#endregion
|
|
67490
67738
|
//#region src/animation/LaggedStart.ts
|
|
67491
|
-
function
|
|
67739
|
+
function fk(e, t) {
|
|
67492
67740
|
return new og(e, {
|
|
67493
67741
|
...t,
|
|
67494
67742
|
lagRatio: t?.lagRatio ?? .2
|
|
67495
67743
|
});
|
|
67496
67744
|
}
|
|
67497
|
-
var
|
|
67745
|
+
var pk = class extends og {
|
|
67498
67746
|
constructor(e, t = {}) {
|
|
67499
67747
|
super(e, {
|
|
67500
67748
|
...t,
|
|
@@ -67504,13 +67752,13 @@ var ok = class extends og {
|
|
|
67504
67752
|
};
|
|
67505
67753
|
//#endregion
|
|
67506
67754
|
//#region src/animation/Succession.ts
|
|
67507
|
-
function
|
|
67755
|
+
function mk(e, t) {
|
|
67508
67756
|
return new og(e, {
|
|
67509
67757
|
...t,
|
|
67510
67758
|
lagRatio: 1
|
|
67511
67759
|
});
|
|
67512
67760
|
}
|
|
67513
|
-
var
|
|
67761
|
+
var hk = class extends og {
|
|
67514
67762
|
constructor(e, t = {}) {
|
|
67515
67763
|
super(e, {
|
|
67516
67764
|
...t,
|
|
@@ -67520,14 +67768,14 @@ var ck = class extends og {
|
|
|
67520
67768
|
};
|
|
67521
67769
|
//#endregion
|
|
67522
67770
|
//#region src/animation/composition/LaggedStartMap.ts
|
|
67523
|
-
function
|
|
67771
|
+
function gk(e, t, n) {
|
|
67524
67772
|
let { lagRatio: r = .2, animOptions: i, ...a } = n ?? {};
|
|
67525
67773
|
return new og(t.map((t) => new e(t, i)), {
|
|
67526
67774
|
...a,
|
|
67527
67775
|
lagRatio: r
|
|
67528
67776
|
});
|
|
67529
67777
|
}
|
|
67530
|
-
var
|
|
67778
|
+
var _k = class extends og {
|
|
67531
67779
|
constructor(e, t, n = {}) {
|
|
67532
67780
|
let { lagRatio: r = .2, animOptions: i, ...a } = n, o = t.map((t) => new e(t, i));
|
|
67533
67781
|
super(o, {
|
|
@@ -67535,7 +67783,7 @@ var uk = class extends og {
|
|
|
67535
67783
|
lagRatio: r
|
|
67536
67784
|
});
|
|
67537
67785
|
}
|
|
67538
|
-
},
|
|
67786
|
+
}, vk = class extends z {
|
|
67539
67787
|
_func;
|
|
67540
67788
|
constructor(e, t, n) {
|
|
67541
67789
|
super(e, n), this._func = t;
|
|
@@ -67544,18 +67792,18 @@ var uk = class extends og {
|
|
|
67544
67792
|
this._func(this.mobject, e);
|
|
67545
67793
|
}
|
|
67546
67794
|
};
|
|
67547
|
-
function
|
|
67548
|
-
return new
|
|
67795
|
+
function yk(e, t, n) {
|
|
67796
|
+
return new vk(e, t, n);
|
|
67549
67797
|
}
|
|
67550
67798
|
//#endregion
|
|
67551
67799
|
//#region src/animation/UpdateFromAlphaFunc.ts
|
|
67552
|
-
var
|
|
67553
|
-
function
|
|
67554
|
-
return new
|
|
67800
|
+
var bk = class extends vk {};
|
|
67801
|
+
function xk(e, t, n) {
|
|
67802
|
+
return new bk(e, t, n);
|
|
67555
67803
|
}
|
|
67556
67804
|
//#endregion
|
|
67557
67805
|
//#region src/animation/MaintainPositionRelativeTo.ts
|
|
67558
|
-
function
|
|
67806
|
+
function Sk(e, t) {
|
|
67559
67807
|
let n = [
|
|
67560
67808
|
e.position.x - t.position.x,
|
|
67561
67809
|
e.position.y - t.position.y,
|
|
@@ -67571,7 +67819,7 @@ function hk(e, t) {
|
|
|
67571
67819
|
}
|
|
67572
67820
|
//#endregion
|
|
67573
67821
|
//#region src/animation/AlwaysRedraw.ts
|
|
67574
|
-
function
|
|
67822
|
+
function Ck(e) {
|
|
67575
67823
|
let t = e();
|
|
67576
67824
|
return t.addUpdater((t) => {
|
|
67577
67825
|
t.become(e());
|
|
@@ -67579,24 +67827,24 @@ function gk(e) {
|
|
|
67579
67827
|
}
|
|
67580
67828
|
//#endregion
|
|
67581
67829
|
//#region src/animation/Always.ts
|
|
67582
|
-
function
|
|
67830
|
+
function wk(e, t, ...n) {
|
|
67583
67831
|
return e.addUpdater(() => {
|
|
67584
67832
|
e[t].apply(e, n.map((e) => e()));
|
|
67585
67833
|
}), e;
|
|
67586
67834
|
}
|
|
67587
|
-
function
|
|
67835
|
+
function Tk(e, t, ...n) {
|
|
67588
67836
|
return e.addUpdater(() => {
|
|
67589
67837
|
e[t].apply(e, n);
|
|
67590
67838
|
}), e;
|
|
67591
67839
|
}
|
|
67592
|
-
function
|
|
67840
|
+
function Ek(e, t) {
|
|
67593
67841
|
if (!(e instanceof kr)) throw Error(`assertIsMobjectMethod: expected a Mobject, got ${e === null ? "null" : typeof e}`);
|
|
67594
67842
|
if (typeof e[t] != "function") throw Error(`assertIsMobjectMethod: "${t}" is not a method of ${e.constructor.name}`);
|
|
67595
67843
|
}
|
|
67596
67844
|
//#endregion
|
|
67597
67845
|
//#region src/animation/updaters.ts
|
|
67598
|
-
var
|
|
67599
|
-
function
|
|
67846
|
+
var Dk = 20 * Math.PI / 180;
|
|
67847
|
+
function Ok(e, t = _n, n = .1) {
|
|
67600
67848
|
let r = Rn(t);
|
|
67601
67849
|
return e.addUpdater((e, t) => {
|
|
67602
67850
|
e.shift([
|
|
@@ -67606,12 +67854,12 @@ function xk(e, t = _n, n = .1) {
|
|
|
67606
67854
|
]);
|
|
67607
67855
|
}), e;
|
|
67608
67856
|
}
|
|
67609
|
-
function
|
|
67857
|
+
function kk(e, t = Dk, n) {
|
|
67610
67858
|
return e.addUpdater((e, r) => {
|
|
67611
67859
|
e.rotate(r * t, n);
|
|
67612
67860
|
}), e;
|
|
67613
67861
|
}
|
|
67614
|
-
function
|
|
67862
|
+
function Ak(e, t = !1, n = 0) {
|
|
67615
67863
|
let r = e.mobject;
|
|
67616
67864
|
e.begin();
|
|
67617
67865
|
let i = -n, a = (n, r) => {
|
|
@@ -67633,12 +67881,12 @@ function Ck(e, t = !1, n = 0) {
|
|
|
67633
67881
|
};
|
|
67634
67882
|
return r.addUpdater(a), r;
|
|
67635
67883
|
}
|
|
67636
|
-
function
|
|
67637
|
-
return
|
|
67884
|
+
function jk(e, t = 0) {
|
|
67885
|
+
return Ak(e, !0, t);
|
|
67638
67886
|
}
|
|
67639
67887
|
//#endregion
|
|
67640
67888
|
//#region src/animation/numbers/index.ts
|
|
67641
|
-
var
|
|
67889
|
+
var Mk = class extends z {
|
|
67642
67890
|
decimalNumber;
|
|
67643
67891
|
_startValue;
|
|
67644
67892
|
_endValue;
|
|
@@ -67660,7 +67908,7 @@ var Tk = class extends z {
|
|
|
67660
67908
|
getEndValue() {
|
|
67661
67909
|
return this._endValue;
|
|
67662
67910
|
}
|
|
67663
|
-
},
|
|
67911
|
+
}, Nk = class extends z {
|
|
67664
67912
|
decimalNumber;
|
|
67665
67913
|
_startValue;
|
|
67666
67914
|
_targetValue;
|
|
@@ -67686,15 +67934,15 @@ var Tk = class extends z {
|
|
|
67686
67934
|
return this._targetValue;
|
|
67687
67935
|
}
|
|
67688
67936
|
};
|
|
67689
|
-
function
|
|
67690
|
-
return new
|
|
67937
|
+
function Pk(e, t) {
|
|
67938
|
+
return new Mk(e, t);
|
|
67691
67939
|
}
|
|
67692
|
-
function
|
|
67693
|
-
return new
|
|
67940
|
+
function Fk(e, t) {
|
|
67941
|
+
return new Nk(e, t);
|
|
67694
67942
|
}
|
|
67695
67943
|
//#endregion
|
|
67696
67944
|
//#region src/animation/changing/index.ts
|
|
67697
|
-
var
|
|
67945
|
+
var Ik = class e extends I {
|
|
67698
67946
|
_trackedMobject;
|
|
67699
67947
|
_dissipatingTime;
|
|
67700
67948
|
_minDistanceToNewPoint;
|
|
@@ -67777,10 +68025,10 @@ var kk = class e extends I {
|
|
|
67777
68025
|
})), t._elapsedTime = this._elapsedTime, t._lastPosition = this._lastPosition ? [...this._lastPosition] : null, t;
|
|
67778
68026
|
}
|
|
67779
68027
|
};
|
|
67780
|
-
function
|
|
67781
|
-
return new
|
|
68028
|
+
function Lk(e, t) {
|
|
68029
|
+
return new Ik(e, t);
|
|
67782
68030
|
}
|
|
67783
|
-
var
|
|
68031
|
+
var Rk = class e extends I {
|
|
67784
68032
|
_boundedMobject;
|
|
67785
68033
|
_colors;
|
|
67786
68034
|
_numDashes;
|
|
@@ -67904,12 +68152,12 @@ var jk = class e extends I {
|
|
|
67904
68152
|
this._dashes = [], super.dispose();
|
|
67905
68153
|
}
|
|
67906
68154
|
};
|
|
67907
|
-
function
|
|
67908
|
-
return new
|
|
68155
|
+
function zk(e, t) {
|
|
68156
|
+
return new Rk(e, t);
|
|
67909
68157
|
}
|
|
67910
68158
|
//#endregion
|
|
67911
68159
|
//#region src/animation/speed/index.ts
|
|
67912
|
-
var
|
|
68160
|
+
var Bk = class e extends kr {
|
|
67913
68161
|
normalizeTransform(e = this._ownMatrix()) {
|
|
67914
68162
|
return this._flattenAsContainer(e);
|
|
67915
68163
|
}
|
|
@@ -67920,7 +68168,7 @@ var Nk = class e extends kr {
|
|
|
67920
68168
|
return new e();
|
|
67921
68169
|
}
|
|
67922
68170
|
};
|
|
67923
|
-
function
|
|
68171
|
+
function Vk(e, t, n = 100) {
|
|
67924
68172
|
let r = 0, i = 1 / n;
|
|
67925
68173
|
for (let e = 0; e < n; e++) {
|
|
67926
68174
|
let a = e / n, o = (e + 1) / n, s = Math.max(.001, t(a)), c = Math.max(.001, t(o));
|
|
@@ -67928,7 +68176,7 @@ function Pk(e, t, n = 100) {
|
|
|
67928
68176
|
}
|
|
67929
68177
|
return e * r;
|
|
67930
68178
|
}
|
|
67931
|
-
function
|
|
68179
|
+
function Hk(e, t, n = 100) {
|
|
67932
68180
|
let r = 0, i = 1 / n, a = [0];
|
|
67933
68181
|
for (let e = 0; e < n; e++) {
|
|
67934
68182
|
let o = e / n, s = (e + 1) / n, c = Math.max(.001, t(o)), l = Math.max(.001, t(s));
|
|
@@ -67942,12 +68190,12 @@ function Fk(e, t, n = 100) {
|
|
|
67942
68190
|
let l = a[s], u = a[Math.min(c, n)], d = u > l ? (o - l) / (u - l) : 0;
|
|
67943
68191
|
return Math.min(1, Math.max(0, (s + d) / n));
|
|
67944
68192
|
}
|
|
67945
|
-
var
|
|
68193
|
+
var Uk = class extends z {
|
|
67946
68194
|
animation;
|
|
67947
68195
|
speedFunc;
|
|
67948
68196
|
_numSamples = 200;
|
|
67949
68197
|
constructor(e, t, n = {}) {
|
|
67950
|
-
let r = new
|
|
68198
|
+
let r = new Bk(), i = Vk(e.duration, t);
|
|
67951
68199
|
super(r, {
|
|
67952
68200
|
duration: i,
|
|
67953
68201
|
rateFunc: n.rateFunc ?? wo
|
|
@@ -67957,7 +68205,7 @@ var Ik = class extends z {
|
|
|
67957
68205
|
super.begin(), this.animation.begin();
|
|
67958
68206
|
}
|
|
67959
68207
|
interpolate(e) {
|
|
67960
|
-
let t =
|
|
68208
|
+
let t = Hk(e, this.speedFunc, this._numSamples), n = this.animation.rateFunc(t);
|
|
67961
68209
|
this.animation.interpolate(n);
|
|
67962
68210
|
}
|
|
67963
68211
|
finish() {
|
|
@@ -67967,19 +68215,19 @@ var Ik = class extends z {
|
|
|
67967
68215
|
super.reset(), this.animation.reset();
|
|
67968
68216
|
}
|
|
67969
68217
|
};
|
|
67970
|
-
function
|
|
67971
|
-
return new
|
|
68218
|
+
function Wk(e, t, n) {
|
|
68219
|
+
return new Uk(e, t, n);
|
|
67972
68220
|
}
|
|
67973
|
-
function
|
|
68221
|
+
function Gk(e, t) {
|
|
67974
68222
|
return (n) => e + (t - e) * n;
|
|
67975
68223
|
}
|
|
67976
|
-
function
|
|
68224
|
+
function Kk(e, t, n = 2, r = .5) {
|
|
67977
68225
|
return (i) => i >= e && i <= t ? r : n;
|
|
67978
68226
|
}
|
|
67979
|
-
function
|
|
68227
|
+
function qk(e, t, n = 1, r = 3) {
|
|
67980
68228
|
return (i) => i >= e && i <= t ? r : n;
|
|
67981
68229
|
}
|
|
67982
|
-
function
|
|
68230
|
+
function Jk(e, t) {
|
|
67983
68231
|
return (n) => {
|
|
67984
68232
|
let r = (1 + Math.cos(2 * Math.PI * n)) / 2;
|
|
67985
68233
|
return e + (t - e) * r;
|
|
@@ -67987,7 +68235,7 @@ function Vk(e, t) {
|
|
|
67987
68235
|
}
|
|
67988
68236
|
//#endregion
|
|
67989
68237
|
//#region src/animation/utility/index.ts
|
|
67990
|
-
var
|
|
68238
|
+
var Yk = class extends z {
|
|
67991
68239
|
constructor(e, t = {}) {
|
|
67992
68240
|
super(e, {
|
|
67993
68241
|
...t,
|
|
@@ -67999,10 +68247,10 @@ var Hk = class extends z {
|
|
|
67999
68247
|
}
|
|
68000
68248
|
interpolate(e) {}
|
|
68001
68249
|
};
|
|
68002
|
-
function
|
|
68003
|
-
return new
|
|
68250
|
+
function Xk(e, t) {
|
|
68251
|
+
return new Yk(e, t);
|
|
68004
68252
|
}
|
|
68005
|
-
var
|
|
68253
|
+
var Zk = class extends z {
|
|
68006
68254
|
constructor(e, t = {}) {
|
|
68007
68255
|
super(e, {
|
|
68008
68256
|
...t,
|
|
@@ -68014,10 +68262,10 @@ var Wk = class extends z {
|
|
|
68014
68262
|
}
|
|
68015
68263
|
interpolate(e) {}
|
|
68016
68264
|
};
|
|
68017
|
-
function
|
|
68018
|
-
return new
|
|
68265
|
+
function Qk(e, t) {
|
|
68266
|
+
return new Zk(e, t);
|
|
68019
68267
|
}
|
|
68020
|
-
var
|
|
68268
|
+
var $k = class extends z {
|
|
68021
68269
|
constructor(e, t = {}) {
|
|
68022
68270
|
super(e, {
|
|
68023
68271
|
duration: t.duration ?? 1,
|
|
@@ -68026,13 +68274,13 @@ var Kk = class extends z {
|
|
|
68026
68274
|
}
|
|
68027
68275
|
interpolate(e) {}
|
|
68028
68276
|
};
|
|
68029
|
-
function
|
|
68030
|
-
return new
|
|
68277
|
+
function eA(e, t, n) {
|
|
68278
|
+
return new $k(e, {
|
|
68031
68279
|
...n,
|
|
68032
68280
|
duration: t
|
|
68033
68281
|
});
|
|
68034
68282
|
}
|
|
68035
|
-
var
|
|
68283
|
+
var tA = class extends z {
|
|
68036
68284
|
angle;
|
|
68037
68285
|
axis;
|
|
68038
68286
|
aboutPoint;
|
|
@@ -68070,10 +68318,10 @@ var Jk = class extends z {
|
|
|
68070
68318
|
this.mobject._markDirty();
|
|
68071
68319
|
}
|
|
68072
68320
|
};
|
|
68073
|
-
function
|
|
68074
|
-
return new
|
|
68321
|
+
function nA(e, t) {
|
|
68322
|
+
return new tA(e, t);
|
|
68075
68323
|
}
|
|
68076
|
-
var
|
|
68324
|
+
var rA = class extends z {
|
|
68077
68325
|
focalPoint;
|
|
68078
68326
|
nMobs;
|
|
68079
68327
|
initialOpacity;
|
|
@@ -68132,12 +68380,12 @@ var Xk = class extends z {
|
|
|
68132
68380
|
this._copies = [], this._parentObject = null, super.finish();
|
|
68133
68381
|
}
|
|
68134
68382
|
};
|
|
68135
|
-
function
|
|
68136
|
-
return new
|
|
68383
|
+
function iA(e, t) {
|
|
68384
|
+
return new rA(e, t);
|
|
68137
68385
|
}
|
|
68138
68386
|
//#endregion
|
|
68139
68387
|
//#region src/animation/indication/Indicate.ts
|
|
68140
|
-
var
|
|
68388
|
+
var aA = class extends z {
|
|
68141
68389
|
scaleFactor;
|
|
68142
68390
|
indicateColor;
|
|
68143
68391
|
_originalScale = new a.Vector3();
|
|
@@ -68161,12 +68409,12 @@ var Qk = class extends z {
|
|
|
68161
68409
|
this.mobject.scaleVector.copy(this._originalScale), this.mobject.setColor(this._originalColor), this.mobject._markDirty(), super.finish();
|
|
68162
68410
|
}
|
|
68163
68411
|
};
|
|
68164
|
-
function
|
|
68165
|
-
return new
|
|
68412
|
+
function oA(e, t) {
|
|
68413
|
+
return new aA(e, t);
|
|
68166
68414
|
}
|
|
68167
68415
|
//#endregion
|
|
68168
68416
|
//#region src/animation/indication/Flash.ts
|
|
68169
|
-
var
|
|
68417
|
+
var sA = class extends z {
|
|
68170
68418
|
flashColor;
|
|
68171
68419
|
numLines;
|
|
68172
68420
|
flashRadius;
|
|
@@ -68239,12 +68487,12 @@ var eA = class extends z {
|
|
|
68239
68487
|
}), this._flashGroup = null), super.finish();
|
|
68240
68488
|
}
|
|
68241
68489
|
};
|
|
68242
|
-
function
|
|
68243
|
-
return new
|
|
68490
|
+
function cA(e, t) {
|
|
68491
|
+
return new sA(e, t);
|
|
68244
68492
|
}
|
|
68245
68493
|
//#endregion
|
|
68246
68494
|
//#region src/animation/indication/Circumscribe.ts
|
|
68247
|
-
var
|
|
68495
|
+
var lA = class extends z {
|
|
68248
68496
|
shapeType;
|
|
68249
68497
|
shapeColor;
|
|
68250
68498
|
buff;
|
|
@@ -68334,12 +68582,12 @@ var nA = class extends z {
|
|
|
68334
68582
|
}), this._shapeGroup = null), super.finish();
|
|
68335
68583
|
}
|
|
68336
68584
|
};
|
|
68337
|
-
function
|
|
68338
|
-
return new
|
|
68585
|
+
function uA(e, t) {
|
|
68586
|
+
return new lA(e, t);
|
|
68339
68587
|
}
|
|
68340
68588
|
//#endregion
|
|
68341
68589
|
//#region src/animation/indication/Wiggle.ts
|
|
68342
|
-
var
|
|
68590
|
+
var dA = class extends z {
|
|
68343
68591
|
rotationAngle;
|
|
68344
68592
|
nWiggles;
|
|
68345
68593
|
scaleFactor;
|
|
@@ -68383,12 +68631,12 @@ var iA = class extends z {
|
|
|
68383
68631
|
this.mobject.rotation.setFromQuaternion(this._initialQuaternion), this.mobject.scaleVector.copy(this._initialScale), this.mobject.position.copy(this._initialPosition), this.mobject._markDirty(), super.finish();
|
|
68384
68632
|
}
|
|
68385
68633
|
};
|
|
68386
|
-
function
|
|
68387
|
-
return new
|
|
68634
|
+
function fA(e, t) {
|
|
68635
|
+
return new dA(e, t);
|
|
68388
68636
|
}
|
|
68389
68637
|
//#endregion
|
|
68390
68638
|
//#region src/animation/indication/ShowPassingFlash.ts
|
|
68391
|
-
var
|
|
68639
|
+
var pA = class extends z {
|
|
68392
68640
|
flashColor;
|
|
68393
68641
|
timeWidth;
|
|
68394
68642
|
flashStrokeWidth;
|
|
@@ -68489,12 +68737,12 @@ var oA = class extends z {
|
|
|
68489
68737
|
}), this._flashGroup = null), super.finish();
|
|
68490
68738
|
}
|
|
68491
68739
|
};
|
|
68492
|
-
function
|
|
68493
|
-
return new
|
|
68740
|
+
function mA(e, t) {
|
|
68741
|
+
return new pA(e, t);
|
|
68494
68742
|
}
|
|
68495
68743
|
//#endregion
|
|
68496
68744
|
//#region src/animation/indication/ApplyWave.ts
|
|
68497
|
-
var
|
|
68745
|
+
var hA = class extends z {
|
|
68498
68746
|
direction;
|
|
68499
68747
|
amplitude;
|
|
68500
68748
|
wavelength;
|
|
@@ -68580,12 +68828,12 @@ var cA = class extends z {
|
|
|
68580
68828
|
this._isVMobject && this.mobject.setPoints(this._originalPoints), this.mobject.position.copy(this._originalPosition), this.mobject._markDirty(), super.finish();
|
|
68581
68829
|
}
|
|
68582
68830
|
};
|
|
68583
|
-
function
|
|
68584
|
-
return new
|
|
68831
|
+
function gA(e, t) {
|
|
68832
|
+
return new hA(e, t);
|
|
68585
68833
|
}
|
|
68586
68834
|
//#endregion
|
|
68587
68835
|
//#region src/animation/indication/FocusOn.ts
|
|
68588
|
-
var
|
|
68836
|
+
var _A = class extends z {
|
|
68589
68837
|
focusColor;
|
|
68590
68838
|
startRadius;
|
|
68591
68839
|
endRadius;
|
|
@@ -68657,10 +68905,10 @@ var uA = class extends z {
|
|
|
68657
68905
|
}), this._ringsGroup = null), super.finish();
|
|
68658
68906
|
}
|
|
68659
68907
|
};
|
|
68660
|
-
function
|
|
68661
|
-
return new
|
|
68908
|
+
function vA(e, t) {
|
|
68909
|
+
return new _A(e, t);
|
|
68662
68910
|
}
|
|
68663
|
-
var
|
|
68911
|
+
var yA = class extends z {
|
|
68664
68912
|
scaleFactor;
|
|
68665
68913
|
nPulses;
|
|
68666
68914
|
_originalScale = new a.Vector3();
|
|
@@ -68681,12 +68929,12 @@ var fA = class extends z {
|
|
|
68681
68929
|
this.mobject.scaleVector.copy(this._originalScale), this.mobject._markDirty(), super.finish();
|
|
68682
68930
|
}
|
|
68683
68931
|
};
|
|
68684
|
-
function
|
|
68685
|
-
return new
|
|
68932
|
+
function bA(e, t) {
|
|
68933
|
+
return new yA(e, t);
|
|
68686
68934
|
}
|
|
68687
68935
|
//#endregion
|
|
68688
68936
|
//#region src/animation/indication/ShowPassingFlashWithThinningStrokeWidth.ts
|
|
68689
|
-
var
|
|
68937
|
+
var xA = class extends pA {
|
|
68690
68938
|
minStrokeWidthRatio;
|
|
68691
68939
|
constructor(e, t = {}) {
|
|
68692
68940
|
super(e, t), this.minStrokeWidthRatio = t.minStrokeWidthRatio ?? .1;
|
|
@@ -68727,12 +68975,12 @@ var mA = class extends oA {
|
|
|
68727
68975
|
}
|
|
68728
68976
|
}
|
|
68729
68977
|
};
|
|
68730
|
-
function
|
|
68731
|
-
return new
|
|
68978
|
+
function SA(e, t) {
|
|
68979
|
+
return new xA(e, t);
|
|
68732
68980
|
}
|
|
68733
68981
|
//#endregion
|
|
68734
68982
|
//#region src/animation/indication/Blink.ts
|
|
68735
|
-
var
|
|
68983
|
+
var CA = class extends z {
|
|
68736
68984
|
nBlinks;
|
|
68737
68985
|
minOpacity;
|
|
68738
68986
|
blinkDuration;
|
|
@@ -68773,12 +69021,12 @@ var gA = class extends z {
|
|
|
68773
69021
|
this.mobject._markDirty(), super.finish();
|
|
68774
69022
|
}
|
|
68775
69023
|
};
|
|
68776
|
-
function
|
|
68777
|
-
return new
|
|
69024
|
+
function wA(e, t) {
|
|
69025
|
+
return new CA(e, t);
|
|
68778
69026
|
}
|
|
68779
69027
|
//#endregion
|
|
68780
69028
|
//#region src/animation/indication/ShowCreationThenDestruction.ts
|
|
68781
|
-
var
|
|
69029
|
+
var TA = class extends z {
|
|
68782
69030
|
_totalLength = 0;
|
|
68783
69031
|
_useDashReveal = !1;
|
|
68784
69032
|
constructor(e, t = {}) {
|
|
@@ -68813,19 +69061,19 @@ var vA = class extends z {
|
|
|
68813
69061
|
}) : this.mobject.setStrokeOpacity(0), super.finish();
|
|
68814
69062
|
}
|
|
68815
69063
|
};
|
|
68816
|
-
function
|
|
68817
|
-
return new
|
|
69064
|
+
function EA(e, t) {
|
|
69065
|
+
return new TA(e, t);
|
|
68818
69066
|
}
|
|
68819
69067
|
//#endregion
|
|
68820
69068
|
//#region src/animation/indication/WiggleOutThenIn.ts
|
|
68821
|
-
var
|
|
68822
|
-
function
|
|
69069
|
+
var DA = 2 * Math.PI;
|
|
69070
|
+
function OA(e) {
|
|
68823
69071
|
return Kn(e < .5 ? 2 * e : 2 * (1 - e));
|
|
68824
69072
|
}
|
|
68825
|
-
function
|
|
68826
|
-
return Math.sin(t *
|
|
69073
|
+
function kA(e, t) {
|
|
69074
|
+
return Math.sin(t * DA * e) * OA(e);
|
|
68827
69075
|
}
|
|
68828
|
-
var
|
|
69076
|
+
var AA = class extends z {
|
|
68829
69077
|
scaleValue;
|
|
68830
69078
|
rotationAngle;
|
|
68831
69079
|
nWiggles;
|
|
@@ -68839,7 +69087,7 @@ var CA = class extends z {
|
|
|
68839
69087
|
super(e, {
|
|
68840
69088
|
duration: t.duration ?? 2,
|
|
68841
69089
|
rateFunc: t.rateFunc ?? wo
|
|
68842
|
-
}), this.scaleValue = t.scaleValue ?? 1.1, this.rotationAngle = t.rotationAngle ?? .01 *
|
|
69090
|
+
}), this.scaleValue = t.scaleValue ?? 1.1, this.rotationAngle = t.rotationAngle ?? .01 * DA, this.nWiggles = t.nWiggles ?? 6, this.rotationAxis = t.rotationAxis ?? [
|
|
68843
69091
|
0,
|
|
68844
69092
|
0,
|
|
68845
69093
|
1
|
|
@@ -68851,9 +69099,9 @@ var CA = class extends z {
|
|
|
68851
69099
|
this._aboutPoint.set(e[0], e[1], e[2]);
|
|
68852
69100
|
}
|
|
68853
69101
|
interpolate(e) {
|
|
68854
|
-
let t =
|
|
69102
|
+
let t = OA(e), n = Un(1, this.scaleValue, t);
|
|
68855
69103
|
this.mobject.scaleVector.set(this._initialScale.x * n, this._initialScale.y * n, this._initialScale.z * n);
|
|
68856
|
-
let r =
|
|
69104
|
+
let r = kA(e, this.nWiggles) * this.rotationAngle, i = new a.Quaternion().setFromAxisAngle(this._axisVector, r), o = new a.Quaternion().copy(this._initialQuaternion);
|
|
68857
69105
|
o.premultiply(i), this.mobject.rotation.setFromQuaternion(o);
|
|
68858
69106
|
let s = new a.Vector3().copy(this._initialPosition).sub(this._aboutPoint);
|
|
68859
69107
|
s.applyQuaternion(i);
|
|
@@ -68864,12 +69112,12 @@ var CA = class extends z {
|
|
|
68864
69112
|
this.mobject.rotation.setFromQuaternion(this._initialQuaternion), this.mobject.scaleVector.copy(this._initialScale), this.mobject.position.copy(this._initialPosition), this.mobject._markDirty(), super.finish();
|
|
68865
69113
|
}
|
|
68866
69114
|
};
|
|
68867
|
-
function
|
|
68868
|
-
return new
|
|
69115
|
+
function jA(e, t) {
|
|
69116
|
+
return new AA(e, t);
|
|
68869
69117
|
}
|
|
68870
69118
|
//#endregion
|
|
68871
69119
|
//#region src/interaction/Draggable.ts
|
|
68872
|
-
var
|
|
69120
|
+
var MA = class {
|
|
68873
69121
|
_mobject;
|
|
68874
69122
|
_scene;
|
|
68875
69123
|
_options;
|
|
@@ -69002,12 +69250,12 @@ var TA = class {
|
|
|
69002
69250
|
e.removeEventListener("mousedown", this._onMouseDown), window.removeEventListener("mousemove", this._onMouseMove), window.removeEventListener("mouseup", this._onMouseUp), e.removeEventListener("touchstart", this._onTouchStart), window.removeEventListener("touchmove", this._onTouchMove), window.removeEventListener("touchend", this._onTouchEnd);
|
|
69003
69251
|
}
|
|
69004
69252
|
};
|
|
69005
|
-
function
|
|
69006
|
-
return new
|
|
69253
|
+
function NA(e, t, n) {
|
|
69254
|
+
return new MA(e, t, n);
|
|
69007
69255
|
}
|
|
69008
69256
|
//#endregion
|
|
69009
69257
|
//#region src/interaction/Hoverable.ts
|
|
69010
|
-
var
|
|
69258
|
+
var PA = class {
|
|
69011
69259
|
_mobject;
|
|
69012
69260
|
_scene;
|
|
69013
69261
|
_options;
|
|
@@ -69090,12 +69338,12 @@ var DA = class {
|
|
|
69090
69338
|
e.removeEventListener("mousemove", this._onMouseMove), e.removeEventListener("mouseleave", this._onMouseLeave), this._isHovering && this._endHover();
|
|
69091
69339
|
}
|
|
69092
69340
|
};
|
|
69093
|
-
function
|
|
69094
|
-
return new
|
|
69341
|
+
function FA(e, t, n) {
|
|
69342
|
+
return new PA(e, t, n);
|
|
69095
69343
|
}
|
|
69096
69344
|
//#endregion
|
|
69097
69345
|
//#region src/interaction/Clickable.ts
|
|
69098
|
-
var
|
|
69346
|
+
var IA = class {
|
|
69099
69347
|
_mobject;
|
|
69100
69348
|
_scene;
|
|
69101
69349
|
_options;
|
|
@@ -69191,12 +69439,12 @@ var kA = class {
|
|
|
69191
69439
|
e.removeEventListener("click", this._onClick), e.removeEventListener("dblclick", this._onDblClick), e.removeEventListener("touchstart", this._onTouchStart), e.removeEventListener("touchend", this._onTouchEnd);
|
|
69192
69440
|
}
|
|
69193
69441
|
};
|
|
69194
|
-
function
|
|
69195
|
-
return new
|
|
69442
|
+
function LA(e, t, n) {
|
|
69443
|
+
return new IA(e, t, n);
|
|
69196
69444
|
}
|
|
69197
69445
|
//#endregion
|
|
69198
69446
|
//#region src/interaction/MovablePoint.ts
|
|
69199
|
-
var
|
|
69447
|
+
var RA = class extends ey {
|
|
69200
69448
|
_draggable;
|
|
69201
69449
|
_onChange;
|
|
69202
69450
|
_xTracker;
|
|
@@ -69213,7 +69461,7 @@ var jA = class extends ey {
|
|
|
69213
69461
|
point: n,
|
|
69214
69462
|
color: r,
|
|
69215
69463
|
radius: i
|
|
69216
|
-
}), this._onChange = a, this._xTracker = o, this._yTracker = s, this._draggable = new
|
|
69464
|
+
}), this._onChange = a, this._xTracker = o, this._yTracker = s, this._draggable = new MA(this, e, {
|
|
69217
69465
|
autoRender: c,
|
|
69218
69466
|
onDrag: (e, t) => this._commit(t, !0)
|
|
69219
69467
|
}), this._syncTrackers(this.getPoint());
|
|
@@ -69231,7 +69479,7 @@ var jA = class extends ey {
|
|
|
69231
69479
|
constrainToParametric(e, t) {
|
|
69232
69480
|
let n = t[0], r = t[1], i = t.length > 2 ? Math.max(2, Math.floor(t[2])) : 256;
|
|
69233
69481
|
return this._constraint = ([t, a, o]) => {
|
|
69234
|
-
let s =
|
|
69482
|
+
let s = BA(e, n, r, i, t, a);
|
|
69235
69483
|
this._parameter = s;
|
|
69236
69484
|
let [c, l] = e(s);
|
|
69237
69485
|
return [
|
|
@@ -69242,10 +69490,10 @@ var jA = class extends ey {
|
|
|
69242
69490
|
}, this._reproject(), this;
|
|
69243
69491
|
}
|
|
69244
69492
|
constrainToLine(e, t) {
|
|
69245
|
-
return this._constraint = (n) =>
|
|
69493
|
+
return this._constraint = (n) => zA(e, t, n, !1), this._reproject(), this;
|
|
69246
69494
|
}
|
|
69247
69495
|
constrainToSegment(e, t) {
|
|
69248
|
-
return this._constraint = (n) =>
|
|
69496
|
+
return this._constraint = (n) => zA(e, t, n, !0), this._reproject(), this;
|
|
69249
69497
|
}
|
|
69250
69498
|
clearConstraint() {
|
|
69251
69499
|
return this._constraint = null, this._parameter = null, this;
|
|
@@ -69270,7 +69518,7 @@ var jA = class extends ey {
|
|
|
69270
69518
|
this._xTracker?.setValue(e[0]), this._yTracker?.setValue(e[1]);
|
|
69271
69519
|
}
|
|
69272
69520
|
};
|
|
69273
|
-
function
|
|
69521
|
+
function zA(e, t, n, r) {
|
|
69274
69522
|
let i = t[0] - e[0], a = t[1] - e[1], o = i * i + a * a, s = o === 0 ? 0 : ((n[0] - e[0]) * i + (n[1] - e[1]) * a) / o;
|
|
69275
69523
|
return r && (s = Math.max(0, Math.min(1, s))), [
|
|
69276
69524
|
e[0] + s * i,
|
|
@@ -69278,7 +69526,7 @@ function MA(e, t, n, r) {
|
|
|
69278
69526
|
n[2]
|
|
69279
69527
|
];
|
|
69280
69528
|
}
|
|
69281
|
-
function
|
|
69529
|
+
function BA(e, t, n, r, i, a) {
|
|
69282
69530
|
let o = (t) => {
|
|
69283
69531
|
let [n, r] = e(t), o = n - i, s = r - a;
|
|
69284
69532
|
return o * o + s * s;
|
|
@@ -69294,12 +69542,12 @@ function NA(e, t, n, r, i, a) {
|
|
|
69294
69542
|
}
|
|
69295
69543
|
return (u + d) / 2;
|
|
69296
69544
|
}
|
|
69297
|
-
function
|
|
69298
|
-
return new
|
|
69545
|
+
function VA(e, t) {
|
|
69546
|
+
return new RA(e, t);
|
|
69299
69547
|
}
|
|
69300
69548
|
//#endregion
|
|
69301
69549
|
//#region src/interaction/Slider.ts
|
|
69302
|
-
var
|
|
69550
|
+
var HA = 28, UA = .35, WA = class extends Qh {
|
|
69303
69551
|
_min;
|
|
69304
69552
|
_max;
|
|
69305
69553
|
_step;
|
|
@@ -69315,7 +69563,7 @@ var FA = 28, IA = .35, LA = class extends Qh {
|
|
|
69315
69563
|
_draggable;
|
|
69316
69564
|
constructor(e, t = {}) {
|
|
69317
69565
|
super();
|
|
69318
|
-
let n =
|
|
69566
|
+
let n = GA(t), { center: r, color: i } = n;
|
|
69319
69567
|
this._min = n.min, this._max = n.max, this._step = n.step, this._length = n.length, this._center = [...r], this._trackY = r[1], this._tracker = n.tracker ?? new pS(n.value), this._onChange = n.onChange, this._value = this._clampAndStep(n.value);
|
|
69320
69568
|
let a = r[0] - n.length / 2;
|
|
69321
69569
|
this._track = new x_({
|
|
@@ -69338,7 +69586,7 @@ var FA = 28, IA = .35, LA = class extends Qh {
|
|
|
69338
69586
|
],
|
|
69339
69587
|
color: i,
|
|
69340
69588
|
radius: n.handleRadius
|
|
69341
|
-
}), this.add(this._track), this.add(this._handle), n.showLabel && this._createLabel(n.numDecimalPlaces, i), this._tracker.setValue(this._value), this._draggable = new
|
|
69589
|
+
}), this.add(this._track), this.add(this._handle), n.showLabel && this._createLabel(n.numDecimalPlaces, i), this._tracker.setValue(this._value), this._draggable = new MA(this._handle, e, {
|
|
69342
69590
|
autoRender: n.autoRender,
|
|
69343
69591
|
onDrag: (e, t) => this.setValue(this._xToValue(t[0]))
|
|
69344
69592
|
});
|
|
@@ -69376,7 +69624,7 @@ var FA = 28, IA = .35, LA = class extends Qh {
|
|
|
69376
69624
|
this._label = new uS({
|
|
69377
69625
|
value: this._value,
|
|
69378
69626
|
numDecimalPlaces: e,
|
|
69379
|
-
fontSize:
|
|
69627
|
+
fontSize: HA,
|
|
69380
69628
|
color: t
|
|
69381
69629
|
}), this.add(this._label), this._positionLabel();
|
|
69382
69630
|
}
|
|
@@ -69385,7 +69633,7 @@ var FA = 28, IA = .35, LA = class extends Qh {
|
|
|
69385
69633
|
let e = this._valueToX(this._value);
|
|
69386
69634
|
this._label.moveTo([
|
|
69387
69635
|
e,
|
|
69388
|
-
this._trackY +
|
|
69636
|
+
this._trackY + UA,
|
|
69389
69637
|
this._center[2]
|
|
69390
69638
|
]);
|
|
69391
69639
|
}
|
|
@@ -69402,7 +69650,7 @@ var FA = 28, IA = .35, LA = class extends Qh {
|
|
|
69402
69650
|
return this._step > 0 && (t = this._min + Math.round((e - this._min) / this._step) * this._step), Math.max(this._min, Math.min(this._max, t));
|
|
69403
69651
|
}
|
|
69404
69652
|
};
|
|
69405
|
-
function
|
|
69653
|
+
function GA(e) {
|
|
69406
69654
|
let t = e.min ?? 0;
|
|
69407
69655
|
return {
|
|
69408
69656
|
min: t,
|
|
@@ -69425,18 +69673,18 @@ function RA(e) {
|
|
|
69425
69673
|
autoRender: e.autoRender
|
|
69426
69674
|
};
|
|
69427
69675
|
}
|
|
69428
|
-
function
|
|
69429
|
-
return new
|
|
69676
|
+
function KA(e, t) {
|
|
69677
|
+
return new WA(e, t);
|
|
69430
69678
|
}
|
|
69431
69679
|
//#endregion
|
|
69432
69680
|
//#region src/interaction/DynamicMatrix.ts
|
|
69433
|
-
function
|
|
69681
|
+
function qA() {
|
|
69434
69682
|
return [[1, 0], [0, 1]];
|
|
69435
69683
|
}
|
|
69436
|
-
function
|
|
69684
|
+
function JA(e) {
|
|
69437
69685
|
return [[e[0][0], e[0][1]], [e[1][0], e[1][1]]];
|
|
69438
69686
|
}
|
|
69439
|
-
function
|
|
69687
|
+
function YA(e) {
|
|
69440
69688
|
if (typeof e == "function") {
|
|
69441
69689
|
let t = e();
|
|
69442
69690
|
return [t[0], t[1]];
|
|
@@ -69444,17 +69692,17 @@ function HA(e) {
|
|
|
69444
69692
|
let t = e.getPoint();
|
|
69445
69693
|
return [t[0], t[1]];
|
|
69446
69694
|
}
|
|
69447
|
-
var
|
|
69695
|
+
var XA = class e {
|
|
69448
69696
|
_matrix;
|
|
69449
69697
|
_compute;
|
|
69450
|
-
constructor(e =
|
|
69451
|
-
this._matrix =
|
|
69698
|
+
constructor(e = qA()) {
|
|
69699
|
+
this._matrix = JA(e), this._compute = null;
|
|
69452
69700
|
}
|
|
69453
69701
|
getMatrix() {
|
|
69454
|
-
return
|
|
69702
|
+
return JA(this._compute ? this._compute() : this._matrix);
|
|
69455
69703
|
}
|
|
69456
69704
|
setMatrix(e) {
|
|
69457
|
-
return this._compute = null, this._matrix =
|
|
69705
|
+
return this._compute = null, this._matrix = JA(e), this;
|
|
69458
69706
|
}
|
|
69459
69707
|
setColumns(e, t) {
|
|
69460
69708
|
return this.setMatrix([[e[0], t[0]], [e[1], t[1]]]);
|
|
@@ -69473,19 +69721,19 @@ var UA = class e {
|
|
|
69473
69721
|
}
|
|
69474
69722
|
static fromBasisVectors(t, n) {
|
|
69475
69723
|
return e.fromGetter(() => {
|
|
69476
|
-
let e =
|
|
69724
|
+
let e = YA(t), r = YA(n);
|
|
69477
69725
|
return [[e[0], r[0]], [e[1], r[1]]];
|
|
69478
69726
|
});
|
|
69479
69727
|
}
|
|
69480
69728
|
};
|
|
69481
|
-
function
|
|
69482
|
-
return new
|
|
69729
|
+
function ZA(e) {
|
|
69730
|
+
return new XA(e);
|
|
69483
69731
|
}
|
|
69484
|
-
function
|
|
69485
|
-
return e instanceof
|
|
69732
|
+
function QA(e) {
|
|
69733
|
+
return e instanceof XA ? e : typeof e == "function" ? XA.fromGetter(e) : new XA(e);
|
|
69486
69734
|
}
|
|
69487
|
-
function
|
|
69488
|
-
let r =
|
|
69735
|
+
function $A(e, t, n = {}) {
|
|
69736
|
+
let r = QA(t), i = n.aboutPoint ?? [
|
|
69489
69737
|
0,
|
|
69490
69738
|
0,
|
|
69491
69739
|
0
|
|
@@ -69525,10 +69773,10 @@ function KA(e, t, n = {}) {
|
|
|
69525
69773
|
}
|
|
69526
69774
|
//#endregion
|
|
69527
69775
|
//#region src/interaction/PanZoomControls.ts
|
|
69528
|
-
function
|
|
69776
|
+
function ej(e, t, n) {
|
|
69529
69777
|
return Math.max(t, Math.min(n, e));
|
|
69530
69778
|
}
|
|
69531
|
-
var
|
|
69779
|
+
var tj = class {
|
|
69532
69780
|
_camera;
|
|
69533
69781
|
_domElement;
|
|
69534
69782
|
_options;
|
|
@@ -69580,7 +69828,7 @@ var JA = class {
|
|
|
69580
69828
|
if (!this._enabled || !this._options.enableZoom) return;
|
|
69581
69829
|
let t = this._eventToNdc(e.clientX, e.clientY);
|
|
69582
69830
|
if (!t) return;
|
|
69583
|
-
let n = this._worldAt(t.x, t.y), r = this._options.invertZoom ? -e.deltaY : e.deltaY, i = Math.exp(r * this._options.zoomSpeed), a = this._baseFrameWidth / this._options.maxZoom, o = this._baseFrameWidth / this._options.minZoom, s =
|
|
69831
|
+
let n = this._worldAt(t.x, t.y), r = this._options.invertZoom ? -e.deltaY : e.deltaY, i = Math.exp(r * this._options.zoomSpeed), a = this._baseFrameWidth / this._options.maxZoom, o = this._baseFrameWidth / this._options.minZoom, s = ej(this._camera.frameWidth * i, a, o) / this._camera.frameWidth;
|
|
69584
69832
|
if (s === 1) return;
|
|
69585
69833
|
this._camera.frameWidth = this._camera.frameWidth * s, this._camera.frameHeight = this._camera.frameHeight * s;
|
|
69586
69834
|
let c = n.x - t.x * this._camera.frameWidth / 2, l = n.y - t.y * this._camera.frameHeight / 2;
|
|
@@ -69629,12 +69877,12 @@ var JA = class {
|
|
|
69629
69877
|
this._options.onChange?.();
|
|
69630
69878
|
}
|
|
69631
69879
|
};
|
|
69632
|
-
function
|
|
69633
|
-
return new
|
|
69880
|
+
function nj(e, t, n) {
|
|
69881
|
+
return new tj(e, t, n);
|
|
69634
69882
|
}
|
|
69635
69883
|
//#endregion
|
|
69636
69884
|
//#region node_modules/gif.js/dist/gif.js
|
|
69637
|
-
var
|
|
69885
|
+
var rj = /* @__PURE__ */ r(((e, t) => {
|
|
69638
69886
|
(function(n) {
|
|
69639
69887
|
if (typeof e == "object" && t !== void 0) t.exports = n();
|
|
69640
69888
|
else if (typeof define == "function" && define.amd) define([], n);
|
|
@@ -69888,10 +70136,10 @@ var XA = /* @__PURE__ */ r(((e, t) => {
|
|
|
69888
70136
|
}]
|
|
69889
70137
|
}, {}, [3])(3);
|
|
69890
70138
|
});
|
|
69891
|
-
})),
|
|
69892
|
-
GifExporter: () =>
|
|
69893
|
-
createGifExporter: () =>
|
|
69894
|
-
}),
|
|
70139
|
+
})), ij = /* @__PURE__ */ t({
|
|
70140
|
+
GifExporter: () => oj,
|
|
70141
|
+
createGifExporter: () => sj
|
|
70142
|
+
}), aj = /* @__PURE__ */ e(rj(), 1), oj = class e {
|
|
69895
70143
|
_scene;
|
|
69896
70144
|
_options;
|
|
69897
70145
|
constructor(e, t) {
|
|
@@ -69909,7 +70157,7 @@ var XA = /* @__PURE__ */ r(((e, t) => {
|
|
|
69909
70157
|
};
|
|
69910
70158
|
}
|
|
69911
70159
|
async exportTimeline(e) {
|
|
69912
|
-
let t = (e || this._options.duration || this._getTimelineDuration()) ?? 5, n = Math.ceil(t * this._options.fps), r = Math.round(1e3 / this._options.fps), i = await this._createWorkerBlobUrl(), a = new
|
|
70160
|
+
let t = (e || this._options.duration || this._getTimelineDuration()) ?? 5, n = Math.ceil(t * this._options.fps), r = Math.round(1e3 / this._options.fps), i = await this._createWorkerBlobUrl(), a = new aj.default({
|
|
69913
70161
|
workers: this._options.workers,
|
|
69914
70162
|
quality: this._options.quality,
|
|
69915
70163
|
width: this._options.width,
|
|
@@ -69968,15 +70216,15 @@ var XA = /* @__PURE__ */ r(((e, t) => {
|
|
|
69968
70216
|
e.download(r, t);
|
|
69969
70217
|
}
|
|
69970
70218
|
};
|
|
69971
|
-
function
|
|
69972
|
-
return new
|
|
70219
|
+
function sj(e, t) {
|
|
70220
|
+
return new oj(e, t);
|
|
69973
70221
|
}
|
|
69974
70222
|
//#endregion
|
|
69975
70223
|
//#region src/export/VideoExporter.ts
|
|
69976
|
-
var
|
|
69977
|
-
VideoExporter: () =>
|
|
69978
|
-
createVideoExporter: () =>
|
|
69979
|
-
}),
|
|
70224
|
+
var cj = /* @__PURE__ */ t({
|
|
70225
|
+
VideoExporter: () => lj,
|
|
70226
|
+
createVideoExporter: () => uj
|
|
70227
|
+
}), lj = class e {
|
|
69980
70228
|
_scene;
|
|
69981
70229
|
_options;
|
|
69982
70230
|
_mediaRecorder = null;
|
|
@@ -70068,26 +70316,26 @@ var tj = /* @__PURE__ */ t({
|
|
|
70068
70316
|
return { ...this._options };
|
|
70069
70317
|
}
|
|
70070
70318
|
};
|
|
70071
|
-
function
|
|
70072
|
-
return new
|
|
70319
|
+
function uj(e, t) {
|
|
70320
|
+
return new lj(e, t);
|
|
70073
70321
|
}
|
|
70074
70322
|
//#endregion
|
|
70075
70323
|
//#region src/export/alphaBackground.ts
|
|
70076
|
-
var
|
|
70077
|
-
function
|
|
70324
|
+
var dj = "Transparent export needs a WebGL context created with an alpha channel. Create the Scene with { alpha: true } (or backgroundOpacity < 1) so the canvas carries a real alpha channel to export.", fj = "Transparent export needs access to the WebGL renderer, but the scene did not expose one.";
|
|
70325
|
+
function pj(e) {
|
|
70078
70326
|
let t = e.renderer;
|
|
70079
70327
|
return !t || typeof t.getThreeRenderer != "function" ? null : t.getThreeRenderer() ?? null;
|
|
70080
70328
|
}
|
|
70081
|
-
function
|
|
70329
|
+
function mj(e) {
|
|
70082
70330
|
return e.getContext().getContextAttributes()?.alpha === !0;
|
|
70083
70331
|
}
|
|
70084
|
-
function
|
|
70085
|
-
let t =
|
|
70086
|
-
if (!t) throw Error(
|
|
70087
|
-
if (!
|
|
70332
|
+
function hj(e) {
|
|
70333
|
+
let t = pj(e);
|
|
70334
|
+
if (!t) throw Error(fj);
|
|
70335
|
+
if (!mj(t)) throw Error(dj);
|
|
70088
70336
|
return t;
|
|
70089
70337
|
}
|
|
70090
|
-
async function
|
|
70338
|
+
async function gj(e, t) {
|
|
70091
70339
|
let n = e.getClearAlpha();
|
|
70092
70340
|
e.setClearAlpha(0);
|
|
70093
70341
|
try {
|
|
@@ -70098,7 +70346,7 @@ async function lj(e, t) {
|
|
|
70098
70346
|
}
|
|
70099
70347
|
//#endregion
|
|
70100
70348
|
//#region src/export/FrameExporter.ts
|
|
70101
|
-
function
|
|
70349
|
+
function _j(e, t, n) {
|
|
70102
70350
|
return new Promise((r, i) => {
|
|
70103
70351
|
if (typeof e.toBlob == "function") {
|
|
70104
70352
|
e.toBlob((e) => {
|
|
@@ -70107,22 +70355,22 @@ function uj(e, t, n) {
|
|
|
70107
70355
|
return;
|
|
70108
70356
|
}
|
|
70109
70357
|
try {
|
|
70110
|
-
r(
|
|
70358
|
+
r(vj(e.toDataURL(t, n)));
|
|
70111
70359
|
} catch (e) {
|
|
70112
70360
|
i(e instanceof Error ? e : Error(String(e)));
|
|
70113
70361
|
}
|
|
70114
70362
|
});
|
|
70115
70363
|
}
|
|
70116
|
-
function
|
|
70364
|
+
function vj(e) {
|
|
70117
70365
|
let [t, n] = e.split(","), r = t.match(/data:([^;]+)/), i = r ? r[1] : "image/png", a = atob(n), o = new Uint8Array(a.length);
|
|
70118
70366
|
for (let e = 0; e < a.length; e++) o[e] = a.charCodeAt(e);
|
|
70119
70367
|
return new Blob([o], { type: i });
|
|
70120
70368
|
}
|
|
70121
|
-
async function
|
|
70369
|
+
async function yj(e, t) {
|
|
70122
70370
|
let n = t?.type ?? "image/png";
|
|
70123
|
-
return t?.transparent ?
|
|
70371
|
+
return t?.transparent ? gj(hj(e), () => (bj(e, t?.time), _j(e.getCanvas(), n, t?.quality))) : (t?.time !== void 0 && e.seek(t.time), _j(e.getCanvas(), n, t?.quality));
|
|
70124
70372
|
}
|
|
70125
|
-
function
|
|
70373
|
+
function bj(e, t) {
|
|
70126
70374
|
if (t !== void 0) {
|
|
70127
70375
|
e.seek(t);
|
|
70128
70376
|
return;
|
|
@@ -70133,29 +70381,29 @@ function pj(e, t) {
|
|
|
70133
70381
|
}
|
|
70134
70382
|
throw Error("Transparent single-frame export needs either a `time` to seek to, or a scene with a render() method, so the frame is re-rendered with a transparent background.");
|
|
70135
70383
|
}
|
|
70136
|
-
async function
|
|
70384
|
+
async function xj(e, t) {
|
|
70137
70385
|
let n = t.fps, r = t.from ?? 0, i = t.to ?? e.getTimelineDuration() ?? 5, a = t.type ?? "image/png", o = t.onProgress ?? (() => {}), s = Math.max(0, i - r), c = Math.ceil(s * n), l = 1 / n, u = async () => {
|
|
70138
70386
|
let n = [];
|
|
70139
70387
|
for (let i = 0; i < c; i++) {
|
|
70140
70388
|
let s = r + i * l;
|
|
70141
70389
|
e.seek(s);
|
|
70142
70390
|
let u = e.getCanvas();
|
|
70143
|
-
n.push(await
|
|
70391
|
+
n.push(await _j(u, a, t.quality)), o((i + 1) / c);
|
|
70144
70392
|
}
|
|
70145
70393
|
return n;
|
|
70146
70394
|
};
|
|
70147
|
-
return t.transparent ?
|
|
70395
|
+
return t.transparent ? gj(hj(e), u) : u();
|
|
70148
70396
|
}
|
|
70149
|
-
function
|
|
70397
|
+
function Sj(e, t) {
|
|
70150
70398
|
let n = URL.createObjectURL(e), r = document.createElement("a");
|
|
70151
70399
|
r.href = n, r.download = t, document.body.appendChild(r), r.click(), document.body.removeChild(r), URL.revokeObjectURL(n);
|
|
70152
70400
|
}
|
|
70153
|
-
async function
|
|
70154
|
-
|
|
70401
|
+
async function Cj(e, t = "frame.png", n) {
|
|
70402
|
+
Sj(await yj(e, n), t);
|
|
70155
70403
|
}
|
|
70156
70404
|
//#endregion
|
|
70157
70405
|
//#region src/export/WebCodecsExporter.ts
|
|
70158
|
-
var
|
|
70406
|
+
var wj = {
|
|
70159
70407
|
avc: {
|
|
70160
70408
|
encoderCodec: "avc1.42001f",
|
|
70161
70409
|
mp4Codec: "avc",
|
|
@@ -70176,7 +70424,7 @@ var _j = {
|
|
|
70176
70424
|
mp4Codec: "av1",
|
|
70177
70425
|
webmCodec: "V_AV1"
|
|
70178
70426
|
}
|
|
70179
|
-
},
|
|
70427
|
+
}, Tj = class e {
|
|
70180
70428
|
_scene;
|
|
70181
70429
|
_options;
|
|
70182
70430
|
constructor(e, t) {
|
|
@@ -70200,8 +70448,8 @@ var _j = {
|
|
|
70200
70448
|
}
|
|
70201
70449
|
async export() {
|
|
70202
70450
|
if (!e.isSupported()) throw Error("WebCodecs VideoEncoder is not available in this environment. Use VideoExporter (MediaRecorder) instead to export video.");
|
|
70203
|
-
let t = this._options, n = t.duration || this._scene.getTimelineDuration() || 5, r = Math.ceil(n * t.fps), a =
|
|
70204
|
-
t.alpha && (this._assertAlphaCodec(), o =
|
|
70451
|
+
let t = this._options, n = t.duration || this._scene.getTimelineDuration() || 5, r = Math.ceil(n * t.fps), a = wj[t.codec], o = null;
|
|
70452
|
+
t.alpha && (this._assertAlphaCodec(), o = hj(this._scene), await this._assertAlphaEncodeSupport(a));
|
|
70205
70453
|
let s = await this._createMuxer(a), c = new window.VideoEncoder({
|
|
70206
70454
|
output: (e, t) => s.addVideoChunk(e, t),
|
|
70207
70455
|
error: (e) => i.error("WebCodecs encoder error:", e)
|
|
@@ -70225,7 +70473,7 @@ var _j = {
|
|
|
70225
70473
|
c.encode(i, { keyFrame: e % t.keyFrameInterval === 0 }), i.close(), t.onProgress(r === 0 ? 1 : (e + 1) / r);
|
|
70226
70474
|
}
|
|
70227
70475
|
};
|
|
70228
|
-
return o ? await
|
|
70476
|
+
return o ? await gj(o, f) : f(), await c.flush(), c.close(), s.finalize();
|
|
70229
70477
|
}
|
|
70230
70478
|
_assertAlphaCodec() {
|
|
70231
70479
|
let e = this._options;
|
|
@@ -70281,30 +70529,30 @@ var _j = {
|
|
|
70281
70529
|
return { ...this._options };
|
|
70282
70530
|
}
|
|
70283
70531
|
};
|
|
70284
|
-
function
|
|
70285
|
-
return new
|
|
70532
|
+
function Ej(e, t) {
|
|
70533
|
+
return new Tj(e, t);
|
|
70286
70534
|
}
|
|
70287
70535
|
//#endregion
|
|
70288
70536
|
//#region src/export/chooseExporter.ts
|
|
70289
|
-
function
|
|
70537
|
+
function Dj(e = Tj.isSupported()) {
|
|
70290
70538
|
return e ? "webcodecs" : "mediarecorder";
|
|
70291
70539
|
}
|
|
70292
70540
|
//#endregion
|
|
70293
70541
|
//#region src/export/SvgExporter.ts
|
|
70294
|
-
var
|
|
70295
|
-
function
|
|
70542
|
+
var Oj = 3;
|
|
70543
|
+
function kj(e, t) {
|
|
70296
70544
|
if (!Number.isFinite(e)) return "0";
|
|
70297
70545
|
let n = Number(e.toFixed(t));
|
|
70298
70546
|
return String(Object.is(n, -0) ? 0 : n);
|
|
70299
70547
|
}
|
|
70300
|
-
function
|
|
70548
|
+
function Aj(e) {
|
|
70301
70549
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
70302
70550
|
}
|
|
70303
|
-
function
|
|
70551
|
+
function jj(e, t, n) {
|
|
70304
70552
|
let r = e.position.x, i = e.position.y, a = e.frameWidth || 1, o = e.frameHeight || 1;
|
|
70305
70553
|
return (e) => [(e[0] - r) / a * t + t / 2, n / 2 - (e[1] - i) / o * n];
|
|
70306
70554
|
}
|
|
70307
|
-
function
|
|
70555
|
+
function Mj(e, t) {
|
|
70308
70556
|
if (!t || t.length <= 1) return [e];
|
|
70309
70557
|
let n = [], r = 0;
|
|
70310
70558
|
for (let i of t) {
|
|
@@ -70313,11 +70561,11 @@ function Tj(e, t) {
|
|
|
70313
70561
|
}
|
|
70314
70562
|
return r === e.length ? n : [e];
|
|
70315
70563
|
}
|
|
70316
|
-
function
|
|
70564
|
+
function Nj(e, t, n) {
|
|
70317
70565
|
if (e.length < 4) return null;
|
|
70318
70566
|
let r = (e) => {
|
|
70319
70567
|
let [r, i] = t(e);
|
|
70320
|
-
return `${
|
|
70568
|
+
return `${kj(r, n)} ${kj(i, n)}`;
|
|
70321
70569
|
}, i = [`M ${r(e[0])}`], a = Math.floor((e.length - 1) / 3);
|
|
70322
70570
|
for (let t = 0; t < a; t++) {
|
|
70323
70571
|
let n = e[3 * t + 1], a = e[3 * t + 2], o = e[3 * t + 3];
|
|
@@ -70325,53 +70573,53 @@ function Ej(e, t, n) {
|
|
|
70325
70573
|
}
|
|
70326
70574
|
return Xi(e) && i.push("Z"), i.join(" ");
|
|
70327
70575
|
}
|
|
70328
|
-
function
|
|
70576
|
+
function Pj(e) {
|
|
70329
70577
|
return e.style.fillColor ?? e.color;
|
|
70330
70578
|
}
|
|
70331
|
-
function
|
|
70579
|
+
function Fj(e, t, n, r) {
|
|
70332
70580
|
let i = e.getPoints();
|
|
70333
70581
|
if (i.length < 4) return null;
|
|
70334
|
-
let a =
|
|
70582
|
+
let a = Mj(i, e.getEffectiveSubpathLengths()), o = [];
|
|
70335
70583
|
for (let e of a) {
|
|
70336
|
-
let n =
|
|
70584
|
+
let n = Nj(e, t, r);
|
|
70337
70585
|
n && o.push(n);
|
|
70338
70586
|
}
|
|
70339
70587
|
if (o.length === 0) return null;
|
|
70340
70588
|
let s = e.fillOpacity > 0, c = e.strokeWidth > 0;
|
|
70341
70589
|
if (!s && !c) return null;
|
|
70342
70590
|
let l = [`d="${o.join(" ")}"`];
|
|
70343
|
-
return s ? (l.push(`fill="${
|
|
70591
|
+
return s ? (l.push(`fill="${Aj(Pj(e))}"`), l.push("fill-rule=\"nonzero\""), e.fillOpacity < 1 && l.push(`fill-opacity="${kj(e.fillOpacity, r)}"`)) : l.push("fill=\"none\""), c && (l.push(`stroke="${Aj(e.color)}"`), l.push(`stroke-width="${kj(e.strokeWidth * n, r)}"`), l.push("stroke-linejoin=\"round\""), l.push("stroke-linecap=\"round\""), e.opacity < 1 && l.push(`stroke-opacity="${kj(e.opacity, r)}"`)), `<path ${l.join(" ")} />`;
|
|
70344
70592
|
}
|
|
70345
|
-
function
|
|
70593
|
+
function Ij(e) {
|
|
70346
70594
|
return e instanceof I && e.getPoints().length >= 4;
|
|
70347
70595
|
}
|
|
70348
|
-
function
|
|
70349
|
-
let n = t?.precision ??
|
|
70596
|
+
function Lj(e, t) {
|
|
70597
|
+
let n = t?.precision ?? Oj, r = e.getWidth(), i = e.getHeight(), a = e.camera, o = jj(a, r, i), s = .01 * r / (a.frameWidth || 1), c = [];
|
|
70350
70598
|
for (let t of e.mobjects) {
|
|
70351
70599
|
let e = [];
|
|
70352
70600
|
for (let r of t.getFamily()) {
|
|
70353
|
-
if (!
|
|
70354
|
-
let t =
|
|
70601
|
+
if (!Ij(r)) continue;
|
|
70602
|
+
let t = Fj(r, o, s, n);
|
|
70355
70603
|
t && e.push(t);
|
|
70356
70604
|
}
|
|
70357
70605
|
if (e.length === 0) continue;
|
|
70358
|
-
let r = t.userId ? ` data-mobject-id="${
|
|
70606
|
+
let r = t.userId ? ` data-mobject-id="${Aj(t.userId)}"` : "";
|
|
70359
70607
|
c.push(` <g${r}>\n ${e.join("\n ")}\n </g>`);
|
|
70360
70608
|
}
|
|
70361
|
-
let l =
|
|
70362
|
-
return `${`<svg xmlns="http://www.w3.org/2000/svg" width="${l}" height="${u}" viewBox="0 0 ${l} ${u}">`}${t?.background ? `\n <rect x="0" y="0" width="${l}" height="${u}" fill="${
|
|
70609
|
+
let l = kj(r, n), u = kj(i, n);
|
|
70610
|
+
return `${`<svg xmlns="http://www.w3.org/2000/svg" width="${l}" height="${u}" viewBox="0 0 ${l} ${u}">`}${t?.background ? `\n <rect x="0" y="0" width="${l}" height="${u}" fill="${Aj(t.background)}" />` : ""}${c.length > 0 ? `\n${c.join("\n")}\n` : "\n"}</svg>`;
|
|
70363
70611
|
}
|
|
70364
|
-
function
|
|
70365
|
-
let n =
|
|
70612
|
+
function Rj(e, t) {
|
|
70613
|
+
let n = Lj(e, t);
|
|
70366
70614
|
return new Blob([n], { type: "image/svg+xml" });
|
|
70367
70615
|
}
|
|
70368
|
-
function
|
|
70616
|
+
function zj(e, t = "scene.svg", n) {
|
|
70369
70617
|
if (typeof document > "u") throw Error("exportAndDownloadSVG requires a DOM (document is undefined)");
|
|
70370
|
-
|
|
70618
|
+
Sj(Rj(e, n), t);
|
|
70371
70619
|
}
|
|
70372
70620
|
//#endregion
|
|
70373
70621
|
//#region src/player/ExportSettingsUI.ts
|
|
70374
|
-
var
|
|
70622
|
+
var Bj = [
|
|
70375
70623
|
{
|
|
70376
70624
|
id: "current",
|
|
70377
70625
|
label: "Current",
|
|
@@ -70408,11 +70656,11 @@ var Nj = [
|
|
|
70408
70656
|
width: 3840,
|
|
70409
70657
|
height: 2160
|
|
70410
70658
|
}
|
|
70411
|
-
],
|
|
70659
|
+
], Vj = [
|
|
70412
70660
|
24,
|
|
70413
70661
|
30,
|
|
70414
70662
|
60
|
|
70415
|
-
],
|
|
70663
|
+
], Hj = [
|
|
70416
70664
|
{
|
|
70417
70665
|
id: "low",
|
|
70418
70666
|
label: "Low",
|
|
@@ -70428,12 +70676,12 @@ var Nj = [
|
|
|
70428
70676
|
label: "High",
|
|
70429
70677
|
value: .9
|
|
70430
70678
|
}
|
|
70431
|
-
],
|
|
70432
|
-
function
|
|
70433
|
-
return Math.round(Math.max(0, Math.min(1, e)) *
|
|
70679
|
+
], Uj = 1e7;
|
|
70680
|
+
function Wj(e) {
|
|
70681
|
+
return Math.round(Math.max(0, Math.min(1, e)) * Uj);
|
|
70434
70682
|
}
|
|
70435
|
-
function
|
|
70436
|
-
let r =
|
|
70683
|
+
function Gj(e, t, n) {
|
|
70684
|
+
let r = Bj.find((t) => t.id === e);
|
|
70437
70685
|
return !r || r.width === null || r.height === null ? {
|
|
70438
70686
|
width: t,
|
|
70439
70687
|
height: n
|
|
@@ -70442,7 +70690,7 @@ function Rj(e, t, n) {
|
|
|
70442
70690
|
height: r.height
|
|
70443
70691
|
};
|
|
70444
70692
|
}
|
|
70445
|
-
var
|
|
70693
|
+
var Kj = class {
|
|
70446
70694
|
_element;
|
|
70447
70695
|
_fpsSelect;
|
|
70448
70696
|
_resolutionSelect;
|
|
@@ -70455,22 +70703,22 @@ var zj = class {
|
|
|
70455
70703
|
display: "flex",
|
|
70456
70704
|
flexDirection: "column",
|
|
70457
70705
|
gap: "6px"
|
|
70458
|
-
}), this._element.setAttribute("data-export-settings", ""), this._fpsSelect = this._buildSelect("FPS",
|
|
70706
|
+
}), this._element.setAttribute("data-export-settings", ""), this._fpsSelect = this._buildSelect("FPS", Vj.map((e) => ({
|
|
70459
70707
|
value: String(e),
|
|
70460
70708
|
label: `${e} fps`
|
|
70461
|
-
})), String(this._nearestFps(e.fps))), this._resolutionSelect = this._buildSelect("Resolution",
|
|
70709
|
+
})), String(this._nearestFps(e.fps))), this._resolutionSelect = this._buildSelect("Resolution", Bj.map((e) => ({
|
|
70462
70710
|
value: e.id,
|
|
70463
70711
|
label: e.label
|
|
70464
|
-
})), "current"), this._qualitySelect = this._buildSelect("Quality",
|
|
70712
|
+
})), "current"), this._qualitySelect = this._buildSelect("Quality", Hj.map((e) => ({
|
|
70465
70713
|
value: String(e.value),
|
|
70466
70714
|
label: e.label
|
|
70467
|
-
})), String(
|
|
70715
|
+
})), String(Hj[Hj.length - 1].value));
|
|
70468
70716
|
}
|
|
70469
70717
|
get element() {
|
|
70470
70718
|
return this._element;
|
|
70471
70719
|
}
|
|
70472
70720
|
getSettings() {
|
|
70473
|
-
let e = parseInt(this._fpsSelect.value, 10), { width: t, height: n } =
|
|
70721
|
+
let e = parseInt(this._fpsSelect.value, 10), { width: t, height: n } = Gj(this._resolutionSelect.value, this._defaults.width, this._defaults.height);
|
|
70474
70722
|
return {
|
|
70475
70723
|
fps: e,
|
|
70476
70724
|
width: t,
|
|
@@ -70479,7 +70727,7 @@ var zj = class {
|
|
|
70479
70727
|
};
|
|
70480
70728
|
}
|
|
70481
70729
|
_nearestFps(e) {
|
|
70482
|
-
return
|
|
70730
|
+
return Vj.reduce((t, n) => Math.abs(n - e) < Math.abs(t - e) ? n : t);
|
|
70483
70731
|
}
|
|
70484
70732
|
_buildSelect(e, t, n) {
|
|
70485
70733
|
let r = document.createElement("label");
|
|
@@ -70510,7 +70758,7 @@ var zj = class {
|
|
|
70510
70758
|
}
|
|
70511
70759
|
return a.value = n, a.addEventListener("click", (e) => e.stopPropagation()), r.appendChild(i), r.appendChild(a), this._element.appendChild(r), a;
|
|
70512
70760
|
}
|
|
70513
|
-
},
|
|
70761
|
+
}, qj = class {
|
|
70514
70762
|
_container;
|
|
70515
70763
|
_bar;
|
|
70516
70764
|
_playBtn;
|
|
@@ -70546,19 +70794,19 @@ var zj = class {
|
|
|
70546
70794
|
this._container = e, this._callbacks = t, this._autoHideMs = n.autoHideMs ?? 2500, this._exportControls = n.exportControls ?? !1, getComputedStyle(e).position === "static" && (e.style.position = "relative"), e.style.overflow = "hidden", this._bar = this._createBar(), this._playBtn = this._createPlayBtn(), this._prevBtn = this._createNavBtn("prev"), this._nextBtn = this._createNavBtn("next");
|
|
70547
70795
|
let r = this._createProgressBar();
|
|
70548
70796
|
this._progressWrap = r.wrap, this._progressFill = r.fill, this._segmentMarkers = r.markers, this._timeDisplay = this._createTimeDisplay(), this._speedSelect = this._createSpeedSelect(), this._fullscreenBtn = this._createFullscreenBtn(), this._slidesBtn = this._createSlidesBtn(), this._exportBtn = this._createExportBtn();
|
|
70549
|
-
let i =
|
|
70797
|
+
let i = Jj("div", {
|
|
70550
70798
|
display: "flex",
|
|
70551
70799
|
alignItems: "center",
|
|
70552
70800
|
gap: "4px"
|
|
70553
70801
|
});
|
|
70554
70802
|
i.appendChild(this._prevBtn), i.appendChild(this._playBtn), i.appendChild(this._nextBtn);
|
|
70555
|
-
let a =
|
|
70803
|
+
let a = Jj("div", {
|
|
70556
70804
|
display: "flex",
|
|
70557
70805
|
alignItems: "center",
|
|
70558
70806
|
gap: "8px"
|
|
70559
70807
|
});
|
|
70560
70808
|
a.appendChild(this._timeDisplay), a.appendChild(this._speedSelect), a.appendChild(this._slidesBtn), a.appendChild(this._exportBtnWrapper), a.appendChild(this._fullscreenBtn), this._bar.appendChild(this._progressWrap);
|
|
70561
|
-
let o =
|
|
70809
|
+
let o = Jj("div", {
|
|
70562
70810
|
display: "flex",
|
|
70563
70811
|
alignItems: "center",
|
|
70564
70812
|
justifyContent: "space-between",
|
|
@@ -70573,10 +70821,10 @@ var zj = class {
|
|
|
70573
70821
|
let n = e / t * 100;
|
|
70574
70822
|
this._progressFill.style.width = `${n}%`;
|
|
70575
70823
|
}
|
|
70576
|
-
this._timeDisplay.textContent = `${
|
|
70824
|
+
this._timeDisplay.textContent = `${Xj(e)} / ${Xj(t)}`;
|
|
70577
70825
|
}
|
|
70578
70826
|
setPlaying(e, t = !1) {
|
|
70579
|
-
this._isPlaying = e, t ? (this._playBtn.innerHTML =
|
|
70827
|
+
this._isPlaying = e, t ? (this._playBtn.innerHTML = $j, this._playBtn.title = "Replay (Space)") : (this._playBtn.innerHTML = e ? Qj : Zj, this._playBtn.title = e ? "Pause (Space)" : "Play (Space)"), e && this._scheduleHide();
|
|
70580
70828
|
}
|
|
70581
70829
|
setSlidesMode(e) {
|
|
70582
70830
|
this._slidesActive = e, this._slidesBtn.style.opacity = e ? "1" : "0.4", this._slidesBtn.style.background = e ? "rgba(74,158,255,0.25)" : "none", this._slidesBtn.title = `Slides mode ${e ? "on" : "off"} (S)`;
|
|
@@ -70586,7 +70834,7 @@ var zj = class {
|
|
|
70586
70834
|
let t = e.getSlides(), n = e.getDuration();
|
|
70587
70835
|
if (!(n <= 0)) for (let e of t) {
|
|
70588
70836
|
if (e.index === 0) continue;
|
|
70589
|
-
let t =
|
|
70837
|
+
let t = Jj("div", {
|
|
70590
70838
|
position: "absolute",
|
|
70591
70839
|
left: `${e.startTime / n * 100}%`,
|
|
70592
70840
|
top: "50%",
|
|
@@ -70601,7 +70849,7 @@ var zj = class {
|
|
|
70601
70849
|
}
|
|
70602
70850
|
}
|
|
70603
70851
|
_createBar() {
|
|
70604
|
-
let e =
|
|
70852
|
+
let e = Jj("div", {
|
|
70605
70853
|
position: "absolute",
|
|
70606
70854
|
bottom: "0",
|
|
70607
70855
|
left: "0",
|
|
@@ -70619,21 +70867,21 @@ var zj = class {
|
|
|
70619
70867
|
}
|
|
70620
70868
|
_createPlayBtn() {
|
|
70621
70869
|
let e = document.createElement("button");
|
|
70622
|
-
return e.innerHTML =
|
|
70870
|
+
return e.innerHTML = Zj, e.title = "Play (Space)", Yj(e, "36px", "36px"), e.addEventListener("click", () => this._callbacks.onPlayPause()), e;
|
|
70623
70871
|
}
|
|
70624
70872
|
_createNavBtn(e) {
|
|
70625
70873
|
let t = document.createElement("button");
|
|
70626
|
-
return t.innerHTML = e === "prev" ?
|
|
70874
|
+
return t.innerHTML = e === "prev" ? eM : tM, t.title = e === "prev" ? "Previous (Left arrow)" : "Next (Right arrow)", Yj(t, "28px", "28px"), t.addEventListener("click", () => {
|
|
70627
70875
|
e === "prev" ? this._callbacks.onPrev() : this._callbacks.onNext();
|
|
70628
70876
|
}), t;
|
|
70629
70877
|
}
|
|
70630
70878
|
_createProgressBar() {
|
|
70631
|
-
let e =
|
|
70879
|
+
let e = Jj("div", {
|
|
70632
70880
|
position: "relative",
|
|
70633
70881
|
height: "16px",
|
|
70634
70882
|
padding: "6px 12px",
|
|
70635
70883
|
cursor: "pointer"
|
|
70636
|
-
}), t =
|
|
70884
|
+
}), t = Jj("div", {
|
|
70637
70885
|
position: "absolute",
|
|
70638
70886
|
left: "12px",
|
|
70639
70887
|
right: "12px",
|
|
@@ -70643,14 +70891,14 @@ var zj = class {
|
|
|
70643
70891
|
background: "rgba(255,255,255,0.2)",
|
|
70644
70892
|
borderRadius: "2px",
|
|
70645
70893
|
overflow: "visible"
|
|
70646
|
-
}), n =
|
|
70894
|
+
}), n = Jj("div", {
|
|
70647
70895
|
width: "0%",
|
|
70648
70896
|
height: "100%",
|
|
70649
70897
|
background: "#4a9eff",
|
|
70650
70898
|
borderRadius: "2px",
|
|
70651
70899
|
transition: "none",
|
|
70652
70900
|
position: "relative"
|
|
70653
|
-
}), r =
|
|
70901
|
+
}), r = Jj("div", {
|
|
70654
70902
|
position: "absolute",
|
|
70655
70903
|
right: "-5px",
|
|
70656
70904
|
top: "50%",
|
|
@@ -70663,7 +70911,7 @@ var zj = class {
|
|
|
70663
70911
|
transition: "transform 0.1s"
|
|
70664
70912
|
});
|
|
70665
70913
|
n.appendChild(r);
|
|
70666
|
-
let i =
|
|
70914
|
+
let i = Jj("div", {
|
|
70667
70915
|
width: "0%",
|
|
70668
70916
|
height: "100%",
|
|
70669
70917
|
background: "rgba(255,255,255,0.1)",
|
|
@@ -70672,7 +70920,7 @@ var zj = class {
|
|
|
70672
70920
|
top: "0",
|
|
70673
70921
|
left: "0",
|
|
70674
70922
|
pointerEvents: "none"
|
|
70675
|
-
}), a =
|
|
70923
|
+
}), a = Jj("div", {
|
|
70676
70924
|
position: "absolute",
|
|
70677
70925
|
top: "0",
|
|
70678
70926
|
left: "0",
|
|
@@ -70697,7 +70945,7 @@ var zj = class {
|
|
|
70697
70945
|
};
|
|
70698
70946
|
}
|
|
70699
70947
|
_createTimeDisplay() {
|
|
70700
|
-
let e =
|
|
70948
|
+
let e = Jj("span", {
|
|
70701
70949
|
fontFamily: "\"SF Mono\", Monaco, Consolas, monospace",
|
|
70702
70950
|
fontSize: "12px",
|
|
70703
70951
|
opacity: "0.8",
|
|
@@ -70739,16 +70987,16 @@ var zj = class {
|
|
|
70739
70987
|
}), e;
|
|
70740
70988
|
}
|
|
70741
70989
|
_createExportBtn() {
|
|
70742
|
-
let e =
|
|
70990
|
+
let e = Jj("div", {
|
|
70743
70991
|
position: "relative",
|
|
70744
70992
|
display: "inline-block"
|
|
70745
70993
|
}), t = document.createElement("button");
|
|
70746
|
-
return t.innerHTML =
|
|
70994
|
+
return t.innerHTML = nM, t.title = "Export animation", Yj(t, "28px", "28px"), t.addEventListener("click", (e) => {
|
|
70747
70995
|
e.stopPropagation(), this._exportMenu ? this._closeExportMenu() : this._showExportMenu();
|
|
70748
70996
|
}), e.appendChild(t), this._exportBtnWrapper = e, t;
|
|
70749
70997
|
}
|
|
70750
70998
|
_showExportMenu() {
|
|
70751
|
-
let e = this._exportBtn.getBoundingClientRect(), t =
|
|
70999
|
+
let e = this._exportBtn.getBoundingClientRect(), t = Jj("div", {
|
|
70752
71000
|
position: "fixed",
|
|
70753
71001
|
top: "0",
|
|
70754
71002
|
left: "0",
|
|
@@ -70759,7 +71007,7 @@ var zj = class {
|
|
|
70759
71007
|
t.setAttribute("data-player-bar", ""), t.addEventListener("mousedown", (e) => {
|
|
70760
71008
|
e.stopPropagation(), e.preventDefault(), this._closeExportMenu();
|
|
70761
71009
|
});
|
|
70762
|
-
let n =
|
|
71010
|
+
let n = Jj("div", {
|
|
70763
71011
|
position: "fixed",
|
|
70764
71012
|
bottom: `${window.innerHeight - e.top + 6}px`,
|
|
70765
71013
|
left: `${e.left - 60}px`,
|
|
@@ -70780,7 +71028,7 @@ var zj = class {
|
|
|
70780
71028
|
height: 1080,
|
|
70781
71029
|
fps: 60
|
|
70782
71030
|
};
|
|
70783
|
-
this._exportPanel = new
|
|
71031
|
+
this._exportPanel = new Kj(e), n.appendChild(this._exportPanel.element);
|
|
70784
71032
|
}
|
|
70785
71033
|
for (let e of [
|
|
70786
71034
|
{
|
|
@@ -70799,7 +71047,7 @@ var zj = class {
|
|
|
70799
71047
|
desc: "Video file"
|
|
70800
71048
|
}
|
|
70801
71049
|
]) {
|
|
70802
|
-
let t =
|
|
71050
|
+
let t = Jj("div", {
|
|
70803
71051
|
padding: "8px 14px",
|
|
70804
71052
|
cursor: "pointer",
|
|
70805
71053
|
fontSize: "13px",
|
|
@@ -70824,7 +71072,7 @@ var zj = class {
|
|
|
70824
71072
|
this._exportMenu && (this._exportMenuBackdrop?.remove(), this._exportMenuBackdrop = null, this._exportMenu.remove(), this._exportMenu = null, this._exportPanel = null);
|
|
70825
71073
|
}
|
|
70826
71074
|
setExportProgress(e) {
|
|
70827
|
-
if (e === null) this._exportBtn.innerHTML =
|
|
71075
|
+
if (e === null) this._exportBtn.innerHTML = nM, this._exportBtn.disabled = !1, this._exportBtn.title = "Export animation";
|
|
70828
71076
|
else {
|
|
70829
71077
|
let t = Math.round(e * 100);
|
|
70830
71078
|
this._exportBtn.innerHTML = `<span style="font-size:10px;font-weight:600">${t}%</span>`, this._exportBtn.disabled = !0, this._exportBtn.title = `Exporting... ${t}%`;
|
|
@@ -70832,7 +71080,7 @@ var zj = class {
|
|
|
70832
71080
|
}
|
|
70833
71081
|
_createSlidesBtn() {
|
|
70834
71082
|
let e = document.createElement("button");
|
|
70835
|
-
return e.innerHTML =
|
|
71083
|
+
return e.innerHTML = rM, e.title = "Slides mode off (S)", Yj(e, "28px", "28px"), e.style.opacity = "0.4", e.addEventListener("click", () => {
|
|
70836
71084
|
this._slidesActive = !this._slidesActive, this.setSlidesMode(this._slidesActive), this._callbacks.onSlidesToggle(this._slidesActive);
|
|
70837
71085
|
}), e.addEventListener("mouseenter", () => {
|
|
70838
71086
|
e.style.background = this._slidesActive ? "rgba(74,158,255,0.35)" : "rgba(255,255,255,0.15)";
|
|
@@ -70842,7 +71090,7 @@ var zj = class {
|
|
|
70842
71090
|
}
|
|
70843
71091
|
_createFullscreenBtn() {
|
|
70844
71092
|
let e = document.createElement("button");
|
|
70845
|
-
return e.innerHTML =
|
|
71093
|
+
return e.innerHTML = iM, e.title = "Fullscreen (F)", Yj(e, "28px", "28px"), e.addEventListener("click", () => this._callbacks.onFullscreen()), e;
|
|
70846
71094
|
}
|
|
70847
71095
|
_showControls() {
|
|
70848
71096
|
this._isVisible ||= (this._bar.style.opacity = "1", this._bar.style.transform = "translateY(0)", !0), this._scheduleHide();
|
|
@@ -70897,11 +71145,11 @@ var zj = class {
|
|
|
70897
71145
|
this._hideTimeout && clearTimeout(this._hideTimeout), this._container.removeEventListener("mousemove", this._onMouseMove), this._container.removeEventListener("mouseleave", this._onMouseLeave), this._progressWrap.removeEventListener("mousedown", this._onProgressDown), document.removeEventListener("mousemove", this._onProgressMove), document.removeEventListener("mouseup", this._onProgressUp), this._bar.remove();
|
|
70898
71146
|
}
|
|
70899
71147
|
};
|
|
70900
|
-
function
|
|
71148
|
+
function Jj(e, t) {
|
|
70901
71149
|
let n = document.createElement(e);
|
|
70902
71150
|
return Object.assign(n.style, t), n;
|
|
70903
71151
|
}
|
|
70904
|
-
function
|
|
71152
|
+
function Yj(e, t, n) {
|
|
70905
71153
|
Object.assign(e.style, {
|
|
70906
71154
|
width: t,
|
|
70907
71155
|
height: n,
|
|
@@ -70922,11 +71170,11 @@ function Hj(e, t, n) {
|
|
|
70922
71170
|
e.style.background = "none";
|
|
70923
71171
|
});
|
|
70924
71172
|
}
|
|
70925
|
-
function
|
|
71173
|
+
function Xj(e) {
|
|
70926
71174
|
let t = Math.floor(e / 60), n = Math.floor(e % 60);
|
|
70927
71175
|
return `${t}:${String(n).padStart(2, "0")}`;
|
|
70928
71176
|
}
|
|
70929
|
-
var
|
|
71177
|
+
var Zj = "<svg width=\"18\" height=\"18\" viewBox=\"0 0 18 18\" fill=\"currentColor\"><path d=\"M5 3l10 6-10 6V3z\"/></svg>", Qj = "<svg width=\"18\" height=\"18\" viewBox=\"0 0 18 18\" fill=\"currentColor\"><rect x=\"4\" y=\"3\" width=\"3.5\" height=\"12\" rx=\"0.5\"/><rect x=\"10.5\" y=\"3\" width=\"3.5\" height=\"12\" rx=\"0.5\"/></svg>", $j = "<svg width=\"18\" height=\"18\" viewBox=\"0 0 18 18\" fill=\"currentColor\"><path d=\"M9 3a6 6 0 1 0 6 6h-2a4 4 0 1 1-4-4v3l4-3.5L9 1v2z\"/></svg>", eM = "<svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"currentColor\"><rect x=\"2\" y=\"3\" width=\"2\" height=\"10\"/><path d=\"M14 3L6 8l8 5V3z\"/></svg>", tM = "<svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"currentColor\"><rect x=\"12\" y=\"3\" width=\"2\" height=\"10\"/><path d=\"M2 3l8 5-8 5V3z\"/></svg>", nM = "<svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"currentColor\"><path d=\"M8 1L8 10M8 10L5 7M8 10L11 7\" stroke=\"currentColor\" stroke-width=\"1.5\" fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/><path d=\"M3 12v1h10v-1\" stroke=\"currentColor\" stroke-width=\"1.5\" fill=\"none\" stroke-linecap=\"round\"/></svg>", rM = "<svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"currentColor\"><rect x=\"1\" y=\"2\" width=\"14\" height=\"10\" rx=\"1.5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\"/><path d=\"M5 14h6\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"/><path d=\"M6 6l5 3-5 3V6z\"/></svg>", iM = "<svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"currentColor\"><path d=\"M2 2h4v2H4v2H2V2zm8 0h4v4h-2V4h-2V2zM2 10h2v2h2v2H2v-4zm10 2h-2v2h4v-4h-2v2z\"/></svg>", aM = class {
|
|
70930
71178
|
_container;
|
|
70931
71179
|
_callbacks;
|
|
70932
71180
|
_onKeyDown;
|
|
@@ -70956,7 +71204,7 @@ var Wj = "<svg width=\"18\" height=\"18\" viewBox=\"0 0 18 18\" fill=\"currentCo
|
|
|
70956
71204
|
dispose() {
|
|
70957
71205
|
this._container.removeEventListener("keydown", this._onKeyDown);
|
|
70958
71206
|
}
|
|
70959
|
-
},
|
|
71207
|
+
}, oM = class {
|
|
70960
71208
|
_realScene;
|
|
70961
71209
|
_masterTimeline;
|
|
70962
71210
|
constructor(e, t) {
|
|
@@ -70993,7 +71241,7 @@ var Wj = "<svg width=\"18\" height=\"18\" viewBox=\"0 0 18 18\" fill=\"currentCo
|
|
|
70993
71241
|
for (let n of e) t.push(n), n instanceof og && t.push(...this._collectAll(n.animations));
|
|
70994
71242
|
return t;
|
|
70995
71243
|
}
|
|
70996
|
-
},
|
|
71244
|
+
}, sM = [
|
|
70997
71245
|
"mousedown",
|
|
70998
71246
|
"mousemove",
|
|
70999
71247
|
"mouseup",
|
|
@@ -71001,7 +71249,7 @@ var Wj = "<svg width=\"18\" height=\"18\" viewBox=\"0 0 18 18\" fill=\"currentCo
|
|
|
71001
71249
|
"touchstart",
|
|
71002
71250
|
"touchmove",
|
|
71003
71251
|
"touchend"
|
|
71004
|
-
],
|
|
71252
|
+
], cM = class {
|
|
71005
71253
|
_target;
|
|
71006
71254
|
_scene;
|
|
71007
71255
|
_isIdle;
|
|
@@ -71020,13 +71268,13 @@ var Wj = "<svg width=\"18\" height=\"18\" viewBox=\"0 0 18 18\" fill=\"currentCo
|
|
|
71020
71268
|
}
|
|
71021
71269
|
attach() {
|
|
71022
71270
|
if (!this._attached) {
|
|
71023
|
-
for (let e of
|
|
71271
|
+
for (let e of sM) this._target.addEventListener(e, this._onEvent);
|
|
71024
71272
|
this._attached = !0;
|
|
71025
71273
|
}
|
|
71026
71274
|
}
|
|
71027
71275
|
dispose() {
|
|
71028
71276
|
if (this._attached) {
|
|
71029
|
-
for (let e of
|
|
71277
|
+
for (let e of sM) this._target.removeEventListener(e, this._onEvent);
|
|
71030
71278
|
this._attached = !1, this._renderScheduled = !1;
|
|
71031
71279
|
}
|
|
71032
71280
|
}
|
|
@@ -71038,7 +71286,7 @@ var Wj = "<svg width=\"18\" height=\"18\" viewBox=\"0 0 18 18\" fill=\"currentCo
|
|
|
71038
71286
|
this._renderScheduled = !1, !(!this._attached || !this._isIdle()) && (this._scene.render(), this._renderCount++);
|
|
71039
71287
|
}));
|
|
71040
71288
|
}
|
|
71041
|
-
},
|
|
71289
|
+
}, lM = class {
|
|
71042
71290
|
_scene;
|
|
71043
71291
|
_masterTimeline;
|
|
71044
71292
|
_ui;
|
|
@@ -71061,7 +71309,7 @@ var Wj = "<svg width=\"18\" height=\"18\" viewBox=\"0 0 18 18\" fill=\"currentCo
|
|
|
71061
71309
|
_origHeight = 0;
|
|
71062
71310
|
_onFullscreenChange;
|
|
71063
71311
|
constructor(e, t = {}) {
|
|
71064
|
-
this._container = e, this._loop = t.loop ?? !1, this._autoPlay = t.autoPlay ?? !1, this._slidesMode = t.slidesMode ?? !1, this._interactiveSlides = t.interactiveSlides ?? !1, this._exportControls = t.exportControls ?? !1, this._exportFps = t.targetFps ?? 60, this._scene = new jg(e, t), this._masterTimeline = new
|
|
71312
|
+
this._container = e, this._loop = t.loop ?? !1, this._autoPlay = t.autoPlay ?? !1, this._slidesMode = t.slidesMode ?? !1, this._interactiveSlides = t.interactiveSlides ?? !1, this._exportControls = t.exportControls ?? !1, this._exportFps = t.targetFps ?? 60, this._scene = new jg(e, t), this._masterTimeline = new bD(), this._ui = new qj(e, {
|
|
71065
71313
|
onPlayPause: () => this.togglePlayPause(),
|
|
71066
71314
|
onSeek: (e) => this.seek(e),
|
|
71067
71315
|
onPrev: () => this.prevSegment(),
|
|
@@ -71078,7 +71326,7 @@ var Wj = "<svg width=\"18\" height=\"18\" viewBox=\"0 0 18 18\" fill=\"currentCo
|
|
|
71078
71326
|
}, {
|
|
71079
71327
|
autoHideMs: t.autoHideMs,
|
|
71080
71328
|
exportControls: this._exportControls
|
|
71081
|
-
}), this._ui.setSlidesMode(this._slidesMode), this._ui.enableScrollScrub(() => this._masterTimeline.getCurrentTime()), this._controller = new
|
|
71329
|
+
}), this._ui.setSlidesMode(this._slidesMode), this._ui.enableScrollScrub(() => this._masterTimeline.getCurrentTime()), this._controller = new aM(e, {
|
|
71082
71330
|
onPlayPause: () => this.togglePlayPause(),
|
|
71083
71331
|
onPrev: () => this.prevSegment(),
|
|
71084
71332
|
onNext: () => this.nextSegment(),
|
|
@@ -71092,10 +71340,10 @@ var Wj = "<svg width=\"18\" height=\"18\" viewBox=\"0 0 18 18\" fill=\"currentCo
|
|
|
71092
71340
|
}, document.addEventListener("fullscreenchange", this._onFullscreenChange), this._interactiveSlides && this._enableSlideInteraction();
|
|
71093
71341
|
}
|
|
71094
71342
|
_enableSlideInteraction() {
|
|
71095
|
-
this._slideInteraction || (this._slideInteraction = new
|
|
71343
|
+
this._slideInteraction || (this._slideInteraction = new cM(this._container, this._scene, () => !this._isPlaying), this._slideInteraction.attach());
|
|
71096
71344
|
}
|
|
71097
71345
|
async sequence(e) {
|
|
71098
|
-
this._masterTimeline = new
|
|
71346
|
+
this._masterTimeline = new bD(), this._activeLoopSlideIndex = null, this._slidesTargetSlideIndex = -1, await e(new oM(this._scene, this._masterTimeline)), this._masterTimeline.finalizeSlides(), this._scene.setTimeline(this._masterTimeline), this._masterTimeline.seek(0), this._scene.render(), this._ui.setSegments(this._masterTimeline), this._ui.updateTime(0, this._masterTimeline.getDuration()), this._autoPlay && this.play();
|
|
71099
71347
|
}
|
|
71100
71348
|
get scene() {
|
|
71101
71349
|
return this._scene;
|
|
@@ -71206,7 +71454,7 @@ var Wj = "<svg width=\"18\" height=\"18\" viewBox=\"0 0 18 18\" fill=\"currentCo
|
|
|
71206
71454
|
let a = `animation.${e}`, o = this._masterTimeline.getDuration(), s = (e) => this._ui.setExportProgress(e);
|
|
71207
71455
|
this._ui.setExportProgress(0);
|
|
71208
71456
|
try {
|
|
71209
|
-
(e === "webm" || e === "mp4") &&
|
|
71457
|
+
(e === "webm" || e === "mp4") && Dj() === "webcodecs" ? await this._exportWithWebCodecs(e === "mp4" ? "mp4" : "webm", t, o, s, a) : await this._scene.export(a, this._buildSceneExportOptions(e, t, o, s));
|
|
71210
71458
|
} catch (e) {
|
|
71211
71459
|
i.error("Export failed:", e), this._ui.showError(`Export failed: ${e instanceof Error ? e.message : "Unknown error"}`);
|
|
71212
71460
|
} finally {
|
|
@@ -71214,12 +71462,12 @@ var Wj = "<svg width=\"18\" height=\"18\" viewBox=\"0 0 18 18\" fill=\"currentCo
|
|
|
71214
71462
|
}
|
|
71215
71463
|
}
|
|
71216
71464
|
async _exportWithWebCodecs(e, t, n, r, i) {
|
|
71217
|
-
|
|
71465
|
+
Sj(await new Tj(this._scene, {
|
|
71218
71466
|
format: e,
|
|
71219
71467
|
fps: t?.fps ?? this._exportFps,
|
|
71220
71468
|
width: t?.width ?? this._scene.getWidth(),
|
|
71221
71469
|
height: t?.height ?? this._scene.getHeight(),
|
|
71222
|
-
bitrate:
|
|
71470
|
+
bitrate: Wj(t?.quality ?? .9),
|
|
71223
71471
|
duration: n,
|
|
71224
71472
|
onProgress: r
|
|
71225
71473
|
}).export(), i);
|
|
@@ -71280,36 +71528,36 @@ var Wj = "<svg width=\"18\" height=\"18\" viewBox=\"0 0 18 18\" fill=\"currentCo
|
|
|
71280
71528
|
_stopLoop() {
|
|
71281
71529
|
this._animFrameId !== null && (cancelAnimationFrame(this._animFrameId), this._animFrameId = null);
|
|
71282
71530
|
}
|
|
71283
|
-
},
|
|
71531
|
+
}, uM = {
|
|
71284
71532
|
EXPERIMENTAL_3D_LIGHTING: !1,
|
|
71285
71533
|
WEBGPU_RENDERER: !1,
|
|
71286
71534
|
ADVANCED_TEXT_LAYOUT: !1
|
|
71287
|
-
},
|
|
71288
|
-
function
|
|
71289
|
-
return
|
|
71535
|
+
}, dM = { ...uM };
|
|
71536
|
+
function fM(e) {
|
|
71537
|
+
return dM[e] ?? !1;
|
|
71290
71538
|
}
|
|
71291
|
-
function
|
|
71292
|
-
|
|
71293
|
-
...
|
|
71539
|
+
function pM(e) {
|
|
71540
|
+
dM = {
|
|
71541
|
+
...dM,
|
|
71294
71542
|
...e
|
|
71295
71543
|
};
|
|
71296
71544
|
}
|
|
71297
|
-
function
|
|
71298
|
-
|
|
71545
|
+
function mM() {
|
|
71546
|
+
dM = { ...uM };
|
|
71299
71547
|
}
|
|
71300
|
-
function
|
|
71301
|
-
return { ...
|
|
71548
|
+
function hM() {
|
|
71549
|
+
return { ...dM };
|
|
71302
71550
|
}
|
|
71303
71551
|
//#endregion
|
|
71304
71552
|
//#region src/utils/ManimColor.ts
|
|
71305
|
-
var
|
|
71306
|
-
function
|
|
71553
|
+
var gM = /(?:#|0[xX])([A-Fa-f0-9]{3,8})/;
|
|
71554
|
+
function _M(e) {
|
|
71307
71555
|
return Math.min(255, Math.max(0, Math.trunc(e * 255)));
|
|
71308
71556
|
}
|
|
71309
|
-
function
|
|
71310
|
-
return
|
|
71557
|
+
function vM(e) {
|
|
71558
|
+
return _M(e).toString(16).toUpperCase().padStart(2, "0");
|
|
71311
71559
|
}
|
|
71312
|
-
function
|
|
71560
|
+
function yM(e, t) {
|
|
71313
71561
|
let n = e;
|
|
71314
71562
|
(n.length === 3 || n.length === 4) && (n = n.split("").map((e) => e + e).join(""));
|
|
71315
71563
|
let r = t;
|
|
@@ -71322,14 +71570,14 @@ function fM(e, t) {
|
|
|
71322
71570
|
r
|
|
71323
71571
|
];
|
|
71324
71572
|
}
|
|
71325
|
-
function
|
|
71326
|
-
let n =
|
|
71327
|
-
if (n !== null) return
|
|
71573
|
+
function bM(e, t) {
|
|
71574
|
+
let n = gM.exec(e);
|
|
71575
|
+
if (n !== null) return yM(n[1], t);
|
|
71328
71576
|
let r = se[e.toUpperCase()];
|
|
71329
|
-
if (typeof r == "string") return
|
|
71577
|
+
if (typeof r == "string") return bM(r, t);
|
|
71330
71578
|
throw Error(`Failed to parse a color from "${e}"`);
|
|
71331
71579
|
}
|
|
71332
|
-
function
|
|
71580
|
+
function xM(e, t) {
|
|
71333
71581
|
return [
|
|
71334
71582
|
(e >> 16 & 255) / 255,
|
|
71335
71583
|
(e >> 8 & 255) / 255,
|
|
@@ -71337,7 +71585,7 @@ function mM(e, t) {
|
|
|
71337
71585
|
t
|
|
71338
71586
|
];
|
|
71339
71587
|
}
|
|
71340
|
-
var
|
|
71588
|
+
var SM = class e {
|
|
71341
71589
|
value;
|
|
71342
71590
|
constructor(t, n = 1) {
|
|
71343
71591
|
if (t === null) this.value = [
|
|
@@ -71354,8 +71602,8 @@ var hM = class e {
|
|
|
71354
71602
|
e[2],
|
|
71355
71603
|
e[3]
|
|
71356
71604
|
];
|
|
71357
|
-
} else if (typeof t == "number") this.value =
|
|
71358
|
-
else if (typeof t == "string") this.value =
|
|
71605
|
+
} else if (typeof t == "number") this.value = xM(t, n);
|
|
71606
|
+
else if (typeof t == "string") this.value = bM(t, n);
|
|
71359
71607
|
else if (t.length === 3) this.value = [
|
|
71360
71608
|
t[0],
|
|
71361
71609
|
t[1],
|
|
@@ -71413,18 +71661,18 @@ var hM = class e {
|
|
|
71413
71661
|
toIntRgb() {
|
|
71414
71662
|
let e = this.internalRgba();
|
|
71415
71663
|
return [
|
|
71416
|
-
|
|
71417
|
-
|
|
71418
|
-
|
|
71664
|
+
_M(e[0]),
|
|
71665
|
+
_M(e[1]),
|
|
71666
|
+
_M(e[2])
|
|
71419
71667
|
];
|
|
71420
71668
|
}
|
|
71421
71669
|
toIntRgba() {
|
|
71422
71670
|
let e = this.internalRgba();
|
|
71423
71671
|
return [
|
|
71424
|
-
|
|
71425
|
-
|
|
71426
|
-
|
|
71427
|
-
|
|
71672
|
+
_M(e[0]),
|
|
71673
|
+
_M(e[1]),
|
|
71674
|
+
_M(e[2]),
|
|
71675
|
+
_M(e[3])
|
|
71428
71676
|
];
|
|
71429
71677
|
}
|
|
71430
71678
|
toHex(e = !1) {
|
|
@@ -71433,7 +71681,7 @@ var hM = class e {
|
|
|
71433
71681
|
t[1],
|
|
71434
71682
|
t[2]
|
|
71435
71683
|
]);
|
|
71436
|
-
return e ? n +
|
|
71684
|
+
return e ? n + vM(t[3]) : n;
|
|
71437
71685
|
}
|
|
71438
71686
|
toHsv() {
|
|
71439
71687
|
return Fb(this.toRgb());
|
|
@@ -71493,7 +71741,7 @@ var hM = class e {
|
|
|
71493
71741
|
static parse(t, n = 1) {
|
|
71494
71742
|
return Array.isArray(t) && t.some((e) => typeof e != "number") ? t.map((t) => new e(t, n)) : new e(t, n);
|
|
71495
71743
|
}
|
|
71496
|
-
},
|
|
71744
|
+
}, CM = SM, wM = class e extends SM {
|
|
71497
71745
|
hsva;
|
|
71498
71746
|
constructor(e, t = 1) {
|
|
71499
71747
|
if (super(null), e.length === 3) this.hsva = [
|
|
@@ -71562,7 +71810,7 @@ var hM = class e {
|
|
|
71562
71810
|
return this.hsva[2];
|
|
71563
71811
|
}
|
|
71564
71812
|
};
|
|
71565
|
-
function
|
|
71813
|
+
function TM(e) {
|
|
71566
71814
|
let t = e >>> 0;
|
|
71567
71815
|
return () => {
|
|
71568
71816
|
t = t + 1831565813 | 0;
|
|
@@ -71570,18 +71818,18 @@ function vM(e) {
|
|
|
71570
71818
|
return e = e + Math.imul(e ^ e >>> 7, 61 | e) ^ e, ((e ^ e >>> 14) >>> 0) / 4294967296;
|
|
71571
71819
|
};
|
|
71572
71820
|
}
|
|
71573
|
-
var
|
|
71821
|
+
var EM = Array.from(new Set(Object.values(se))).map((e) => new SM(e)), DM = class {
|
|
71574
71822
|
rng;
|
|
71575
71823
|
colors;
|
|
71576
71824
|
constructor(e, t) {
|
|
71577
|
-
this.rng = e === void 0 ? Math.random :
|
|
71825
|
+
this.rng = e === void 0 ? Math.random : TM(e), this.colors = t === void 0 ? EM : t.map((e) => e instanceof SM ? e : new SM(e));
|
|
71578
71826
|
}
|
|
71579
71827
|
next() {
|
|
71580
71828
|
let e = Math.floor(this.rng() * this.colors.length);
|
|
71581
71829
|
return this.colors[e];
|
|
71582
71830
|
}
|
|
71583
71831
|
};
|
|
71584
|
-
function
|
|
71832
|
+
function OM(e, t, n, r) {
|
|
71585
71833
|
let i = .5 * Fn(n, Rn([
|
|
71586
71834
|
r[0] - t[0],
|
|
71587
71835
|
r[1] - t[1],
|
|
@@ -71595,7 +71843,7 @@ function xM(e, t, n, r) {
|
|
|
71595
71843
|
}
|
|
71596
71844
|
//#endregion
|
|
71597
71845
|
//#region src/utils/iterables.ts
|
|
71598
|
-
function
|
|
71846
|
+
function kM(e, t) {
|
|
71599
71847
|
let n = e.length;
|
|
71600
71848
|
if (n === 0) return [];
|
|
71601
71849
|
let r = [];
|
|
@@ -71606,10 +71854,10 @@ function SM(e, t) {
|
|
|
71606
71854
|
}
|
|
71607
71855
|
return r;
|
|
71608
71856
|
}
|
|
71609
|
-
function
|
|
71610
|
-
return
|
|
71857
|
+
function AM(e) {
|
|
71858
|
+
return kM(e, 2);
|
|
71611
71859
|
}
|
|
71612
|
-
function
|
|
71860
|
+
function jM(e) {
|
|
71613
71861
|
let t = [], n = /* @__PURE__ */ new Set();
|
|
71614
71862
|
for (let r = e.length - 1; r >= 0; r--) {
|
|
71615
71863
|
let i = e[r];
|
|
@@ -71617,7 +71865,7 @@ function wM(e) {
|
|
|
71617
71865
|
}
|
|
71618
71866
|
return t.reverse(), t;
|
|
71619
71867
|
}
|
|
71620
|
-
function
|
|
71868
|
+
function MM(e, t, n) {
|
|
71621
71869
|
if (n === void 0) {
|
|
71622
71870
|
let n = new Set(t);
|
|
71623
71871
|
return e.filter((e) => !n.has(e));
|
|
@@ -71625,29 +71873,29 @@ function TM(e, t, n) {
|
|
|
71625
71873
|
let r = new Set(t.map((e) => n(e)));
|
|
71626
71874
|
return e.filter((e) => !r.has(n(e)));
|
|
71627
71875
|
}
|
|
71628
|
-
function
|
|
71629
|
-
return
|
|
71876
|
+
function NM(e, t, n) {
|
|
71877
|
+
return MM(e, t, n).concat(t);
|
|
71630
71878
|
}
|
|
71631
|
-
function
|
|
71879
|
+
function PM(e) {
|
|
71632
71880
|
return typeof e == "string" ? [e] : typeof e == "object" && e && Symbol.iterator in e ? [...e] : [e];
|
|
71633
71881
|
}
|
|
71634
|
-
function
|
|
71882
|
+
function FM(e, t) {
|
|
71635
71883
|
let n = e.length, r = t.length, i = Math.max(n, r), a = [], o = [];
|
|
71636
71884
|
for (let s = 0; s < i; s++) a.push(e[Math.floor(s * n / i)]), o.push(t[Math.floor(s * r / i)]);
|
|
71637
71885
|
return [a, o];
|
|
71638
71886
|
}
|
|
71639
|
-
function
|
|
71887
|
+
function IM(e, t) {
|
|
71640
71888
|
let n = e.length;
|
|
71641
71889
|
if (n > t) throw Error("Trying to stretch array to a length shorter than its own");
|
|
71642
71890
|
let r = [];
|
|
71643
71891
|
for (let i = 0; i < t; i++) r.push(e[Math.floor(i / t * n)]);
|
|
71644
71892
|
return r;
|
|
71645
71893
|
}
|
|
71646
|
-
function*
|
|
71894
|
+
function* LM(...e) {
|
|
71647
71895
|
let t = /* @__PURE__ */ new Set();
|
|
71648
71896
|
for (let n of e) for (let e of n) t.has(e) || (t.add(e), yield e);
|
|
71649
71897
|
}
|
|
71650
|
-
function
|
|
71898
|
+
function RM(e) {
|
|
71651
71899
|
let t = [[]];
|
|
71652
71900
|
for (let n of e) {
|
|
71653
71901
|
let e = t.length;
|
|
@@ -71655,82 +71903,82 @@ function jM(e) {
|
|
|
71655
71903
|
}
|
|
71656
71904
|
return t;
|
|
71657
71905
|
}
|
|
71658
|
-
function
|
|
71906
|
+
function zM(e, t) {
|
|
71659
71907
|
for (let n of e) if (!(n instanceof t)) return !1;
|
|
71660
71908
|
return !0;
|
|
71661
71909
|
}
|
|
71662
|
-
function
|
|
71910
|
+
function BM(...e) {
|
|
71663
71911
|
let t = [];
|
|
71664
71912
|
for (let n of e) for (let e of n) t.push(e);
|
|
71665
71913
|
return t;
|
|
71666
71914
|
}
|
|
71667
|
-
function
|
|
71915
|
+
function VM(e) {
|
|
71668
71916
|
return typeof e == "string" ? [e] : typeof e == "object" && e && Symbol.iterator in e ? [...e] : [e];
|
|
71669
71917
|
}
|
|
71670
|
-
function
|
|
71918
|
+
function HM(e) {
|
|
71671
71919
|
let t = [];
|
|
71672
71920
|
for (let n of e) n && t.push(n);
|
|
71673
71921
|
return t;
|
|
71674
71922
|
}
|
|
71675
|
-
function
|
|
71923
|
+
function UM(e, t) {
|
|
71676
71924
|
let n = Math.max(e.length, t.length), r = [], i = [];
|
|
71677
71925
|
for (let a = 0; a < n; a++) r.push(e[a % e.length]), i.push(t[a % t.length]);
|
|
71678
71926
|
return [r, i];
|
|
71679
71927
|
}
|
|
71680
|
-
function
|
|
71681
|
-
return
|
|
71928
|
+
function WM(e) {
|
|
71929
|
+
return KM(GM(e));
|
|
71682
71930
|
}
|
|
71683
|
-
function
|
|
71931
|
+
function GM(e) {
|
|
71684
71932
|
if (e === null) return "null";
|
|
71685
71933
|
if (e === void 0) return "undefined";
|
|
71686
71934
|
let t = typeof e;
|
|
71687
71935
|
if (t === "string") return `s:${e}`;
|
|
71688
71936
|
if (t === "number" || t === "boolean" || t === "bigint") return `${t[0]}:${String(e)}`;
|
|
71689
|
-
if (e instanceof Set) return `set:[${[...e].map(
|
|
71690
|
-
if (e instanceof Map) return `map:{${[...e.entries()].map(([e, t]) => `${
|
|
71691
|
-
if (Array.isArray(e)) return `arr:[${e.map(
|
|
71937
|
+
if (e instanceof Set) return `set:[${[...e].map(GM).sort().join(",")}]`;
|
|
71938
|
+
if (e instanceof Map) return `map:{${[...e.entries()].map(([e, t]) => `${GM(e)}=${GM(t)}`).sort().join(",")}}`;
|
|
71939
|
+
if (Array.isArray(e)) return `arr:[${e.map(GM).join(",")}]`;
|
|
71692
71940
|
if (t === "object") {
|
|
71693
71941
|
let t = e;
|
|
71694
|
-
return `obj:{${Object.keys(t).sort().map((e) => `${e}=${
|
|
71942
|
+
return `obj:{${Object.keys(t).sort().map((e) => `${e}=${GM(t[e])}`).join(",")}}`;
|
|
71695
71943
|
}
|
|
71696
71944
|
return `${t}:${String(e)}`;
|
|
71697
71945
|
}
|
|
71698
|
-
function
|
|
71946
|
+
function KM(e) {
|
|
71699
71947
|
let t = 2166136261;
|
|
71700
71948
|
for (let n = 0; n < e.length; n++) t ^= e.charCodeAt(n), t = Math.imul(t, 16777619);
|
|
71701
71949
|
return t >>> 0;
|
|
71702
71950
|
}
|
|
71703
71951
|
//#endregion
|
|
71704
71952
|
//#region src/utils/unit.ts
|
|
71705
|
-
function
|
|
71953
|
+
function qM(e) {
|
|
71706
71954
|
return e * Zt / $t;
|
|
71707
71955
|
}
|
|
71708
|
-
function
|
|
71956
|
+
function JM(e) {
|
|
71709
71957
|
return e * Math.PI / 180;
|
|
71710
71958
|
}
|
|
71711
|
-
function
|
|
71959
|
+
function YM(e) {
|
|
71712
71960
|
return e;
|
|
71713
71961
|
}
|
|
71714
|
-
function
|
|
71962
|
+
function XM(e, t) {
|
|
71715
71963
|
return e[0] === t[0] && e[1] === t[1] && e[2] === t[2];
|
|
71716
71964
|
}
|
|
71717
|
-
function
|
|
71965
|
+
function ZM(e, t) {
|
|
71718
71966
|
let n;
|
|
71719
|
-
if (
|
|
71720
|
-
else if (
|
|
71721
|
-
else if (
|
|
71967
|
+
if (XM(e, _n)) n = Zt;
|
|
71968
|
+
else if (XM(e, mn)) n = 8;
|
|
71969
|
+
else if (XM(e, vn)) throw Error("length of Z axis is undefined");
|
|
71722
71970
|
else throw Error("Percent axis must be the X axis (RIGHT) or Y axis (UP)");
|
|
71723
71971
|
return t / 100 * n;
|
|
71724
71972
|
}
|
|
71725
71973
|
//#endregion
|
|
71726
71974
|
//#region src/utils/debug.ts
|
|
71727
|
-
function
|
|
71975
|
+
function QM(e, t = !1) {
|
|
71728
71976
|
let n = [];
|
|
71729
71977
|
for (let t of e) n.push(...t.getFamily());
|
|
71730
71978
|
return t ? n.filter((e) => e instanceof I && e.hasOwnPoints()) : n;
|
|
71731
71979
|
}
|
|
71732
|
-
function
|
|
71733
|
-
let n = [], r = new Set(
|
|
71980
|
+
function $M(e, t) {
|
|
71981
|
+
let n = [], r = new Set(QM(t)), i = (e, t) => {
|
|
71734
71982
|
for (let r of e) {
|
|
71735
71983
|
if (t.has(r)) continue;
|
|
71736
71984
|
let e = new Set(r.getFamily().filter((e) => t.has(e)));
|
|
@@ -71739,14 +71987,14 @@ function KM(e, t) {
|
|
|
71739
71987
|
};
|
|
71740
71988
|
return i(e, r), n;
|
|
71741
71989
|
}
|
|
71742
|
-
function
|
|
71990
|
+
function eN(e, t = {}) {
|
|
71743
71991
|
let { labelHeight: n = .15 } = t, r = new L();
|
|
71744
71992
|
return e.children.forEach((e, t) => {
|
|
71745
71993
|
let i = new dS({ value: t });
|
|
71746
71994
|
i.setHeight(n), i.moveTo(e), r.add(i);
|
|
71747
71995
|
}), r;
|
|
71748
71996
|
}
|
|
71749
|
-
function
|
|
71997
|
+
function tN(e, t = 0) {
|
|
71750
71998
|
let n = [], r = (e, t) => {
|
|
71751
71999
|
n.push(" ".repeat(t) + `${e.constructor.name} ${e.id}`);
|
|
71752
72000
|
for (let n of e.children) r(n, t + 1);
|
|
@@ -71757,8 +72005,8 @@ function JM(e, t = 0) {
|
|
|
71757
72005
|
}
|
|
71758
72006
|
//#endregion
|
|
71759
72007
|
//#region src/utils/spaceOps.ts
|
|
71760
|
-
var
|
|
71761
|
-
function
|
|
72008
|
+
var nN = 2 * Math.PI;
|
|
72009
|
+
function rN(e) {
|
|
71762
72010
|
let t = e.length, n = e[0].length, r = [];
|
|
71763
72011
|
for (let i = 0; i < n; i++) {
|
|
71764
72012
|
let n = [];
|
|
@@ -71767,20 +72015,20 @@ function XM(e) {
|
|
|
71767
72015
|
}
|
|
71768
72016
|
return r;
|
|
71769
72017
|
}
|
|
71770
|
-
function
|
|
72018
|
+
function iN(e, t) {
|
|
71771
72019
|
return e.map((e) => e.reduce((e, n, r) => e + n * (t[r] ?? 0), 0));
|
|
71772
72020
|
}
|
|
71773
|
-
function
|
|
72021
|
+
function aN(e) {
|
|
71774
72022
|
return e.reduce((e, t) => e + t * t, 0);
|
|
71775
72023
|
}
|
|
71776
|
-
function
|
|
72024
|
+
function oN(e, t) {
|
|
71777
72025
|
return e[0] * t[1] - e[1] * t[0];
|
|
71778
72026
|
}
|
|
71779
|
-
function
|
|
71780
|
-
let n = Math.sqrt(
|
|
72027
|
+
function sN(e, t) {
|
|
72028
|
+
let n = Math.sqrt(aN(e));
|
|
71781
72029
|
return n > 0 ? e.map((e) => e / n) : t ?? e.map(() => 0);
|
|
71782
72030
|
}
|
|
71783
|
-
function
|
|
72031
|
+
function cN(...e) {
|
|
71784
72032
|
if (e.length === 0) return [
|
|
71785
72033
|
1,
|
|
71786
72034
|
0,
|
|
@@ -71799,8 +72047,8 @@ function tN(...e) {
|
|
|
71799
72047
|
}
|
|
71800
72048
|
return t;
|
|
71801
72049
|
}
|
|
71802
|
-
function
|
|
71803
|
-
let r = n ? t :
|
|
72050
|
+
function lN(e, t, n = !1) {
|
|
72051
|
+
let r = n ? t : sN(t), i = Math.sin(e / 2);
|
|
71804
72052
|
return [
|
|
71805
72053
|
Math.cos(e / 2),
|
|
71806
72054
|
i * (r[0] ?? 0),
|
|
@@ -71808,19 +72056,19 @@ function nN(e, t, n = !1) {
|
|
|
71808
72056
|
i * (r[2] ?? 0)
|
|
71809
72057
|
];
|
|
71810
72058
|
}
|
|
71811
|
-
function
|
|
71812
|
-
let t =
|
|
72059
|
+
function uN(e) {
|
|
72060
|
+
let t = sN(e.slice(1), [
|
|
71813
72061
|
1,
|
|
71814
72062
|
0,
|
|
71815
72063
|
0
|
|
71816
72064
|
]), n = 2 * Math.acos(e[0]);
|
|
71817
|
-
return n >
|
|
72065
|
+
return n > nN / 2 && (n = nN - n, t = [
|
|
71818
72066
|
-t[0],
|
|
71819
72067
|
-t[1],
|
|
71820
72068
|
-t[2]
|
|
71821
72069
|
]), [n, t];
|
|
71822
72070
|
}
|
|
71823
|
-
function
|
|
72071
|
+
function dN(e) {
|
|
71824
72072
|
return [
|
|
71825
72073
|
e[0],
|
|
71826
72074
|
-e[1],
|
|
@@ -71828,7 +72076,7 @@ function iN(e) {
|
|
|
71828
72076
|
-e[3]
|
|
71829
72077
|
];
|
|
71830
72078
|
}
|
|
71831
|
-
function
|
|
72079
|
+
function fN(e, t, n = !1) {
|
|
71832
72080
|
let [r, i, a] = Rn(t), o = Math.cos(e), s = Math.sin(e), c = 1 - o, l = [
|
|
71833
72081
|
[
|
|
71834
72082
|
o + r * r * c,
|
|
@@ -71858,7 +72106,7 @@ function aN(e, t, n = !1) {
|
|
|
71858
72106
|
]
|
|
71859
72107
|
] : l;
|
|
71860
72108
|
}
|
|
71861
|
-
function
|
|
72109
|
+
function pN(e) {
|
|
71862
72110
|
let t = Math.cos(e), n = Math.sin(e);
|
|
71863
72111
|
return [
|
|
71864
72112
|
[
|
|
@@ -71878,23 +72126,23 @@ function oN(e) {
|
|
|
71878
72126
|
]
|
|
71879
72127
|
];
|
|
71880
72128
|
}
|
|
71881
|
-
function
|
|
71882
|
-
return (t[0] ?? 0) === 0 && (t[1] ?? 0) === 0 ?
|
|
72129
|
+
function mN(e, t) {
|
|
72130
|
+
return (t[0] ?? 0) === 0 && (t[1] ?? 0) === 0 ? rN(pN(e * Math.sign(t[2] ?? 0))) : rN(fN(e, t));
|
|
71883
72131
|
}
|
|
71884
|
-
function
|
|
72132
|
+
function hN(e, t, n = vn) {
|
|
71885
72133
|
if (e.length > 3) throw Error("Vector must have the correct dimensions.");
|
|
71886
72134
|
let r = e.length === 2 ? [
|
|
71887
72135
|
e[0],
|
|
71888
72136
|
e[1],
|
|
71889
72137
|
0
|
|
71890
|
-
] : e, i =
|
|
72138
|
+
] : e, i = iN(fN(t, n), r);
|
|
71891
72139
|
return [
|
|
71892
72140
|
i[0],
|
|
71893
72141
|
i[1],
|
|
71894
72142
|
i[2]
|
|
71895
72143
|
];
|
|
71896
72144
|
}
|
|
71897
|
-
function
|
|
72145
|
+
function gN(e) {
|
|
71898
72146
|
let t = Rn(e), n = Rn(In(t, _n)), r = In(n, t);
|
|
71899
72147
|
if (Ln(n) === 0) {
|
|
71900
72148
|
r = Rn(In(mn, t));
|
|
@@ -71905,27 +72153,27 @@ function lN(e) {
|
|
|
71905
72153
|
-e[2]
|
|
71906
72154
|
];
|
|
71907
72155
|
}
|
|
71908
|
-
return
|
|
72156
|
+
return rN([
|
|
71909
72157
|
r,
|
|
71910
72158
|
n,
|
|
71911
72159
|
t
|
|
71912
72160
|
]);
|
|
71913
72161
|
}
|
|
71914
|
-
function
|
|
72162
|
+
function _N(e) {
|
|
71915
72163
|
return Math.atan2(e[1] ?? 0, e[0] ?? 0);
|
|
71916
72164
|
}
|
|
71917
|
-
function
|
|
71918
|
-
let n =
|
|
71919
|
-
return 2 * Math.atan2(Math.sqrt(
|
|
72165
|
+
function vN(e, t) {
|
|
72166
|
+
let n = sN(e), r = sN(t), i = n.map((e, t) => e - r[t]), a = n.map((e, t) => e + r[t]);
|
|
72167
|
+
return 2 * Math.atan2(Math.sqrt(aN(i)), Math.sqrt(aN(a)));
|
|
71920
72168
|
}
|
|
71921
|
-
function
|
|
72169
|
+
function yN(e, t, n = 1e-6) {
|
|
71922
72170
|
let r = Math.max(...e.map(Math.abs)), i = Math.max(...t.map(Math.abs)), a;
|
|
71923
72171
|
if (r === 0) {
|
|
71924
72172
|
if (i === 0) return hn;
|
|
71925
72173
|
a = t.map((e) => e / i);
|
|
71926
72174
|
} else if (i === 0) a = e.map((e) => e / r);
|
|
71927
72175
|
else {
|
|
71928
|
-
let o = e.map((e) => e / r), s = In(o, t.map((e) => e / i)), c = Math.sqrt(
|
|
72176
|
+
let o = e.map((e) => e / r), s = In(o, t.map((e) => e / i)), c = Math.sqrt(aN(s));
|
|
71929
72177
|
if (c > n) return [
|
|
71930
72178
|
s[0] / c,
|
|
71931
72179
|
s[1] / c,
|
|
@@ -71938,43 +72186,43 @@ function fN(e, t, n = 1e-6) {
|
|
|
71938
72186
|
-a[0] * a[2],
|
|
71939
72187
|
-a[1] * a[2],
|
|
71940
72188
|
a[0] * a[0] + a[1] * a[1]
|
|
71941
|
-
], s = Math.sqrt(
|
|
72189
|
+
], s = Math.sqrt(aN(o));
|
|
71942
72190
|
return [
|
|
71943
72191
|
o[0] / s,
|
|
71944
72192
|
o[1] / s,
|
|
71945
72193
|
o[2] / s
|
|
71946
72194
|
];
|
|
71947
72195
|
}
|
|
71948
|
-
function
|
|
71949
|
-
let n =
|
|
71950
|
-
for (let i = 0; i < e; i++) r.push(
|
|
72196
|
+
function bN(e = 4, t = _n) {
|
|
72197
|
+
let n = nN / e, r = [];
|
|
72198
|
+
for (let i = 0; i < e; i++) r.push(hN(t, i * n));
|
|
71951
72199
|
return r;
|
|
71952
72200
|
}
|
|
71953
|
-
function
|
|
71954
|
-
let n = t.radius ?? 1, r = t.startAngle ?? (e % 2 == 0 ? 0 :
|
|
71955
|
-
return [
|
|
72201
|
+
function xN(e, t = {}) {
|
|
72202
|
+
let n = t.radius ?? 1, r = t.startAngle ?? (e % 2 == 0 ? 0 : nN / 4);
|
|
72203
|
+
return [bN(e, hN([
|
|
71956
72204
|
n,
|
|
71957
72205
|
0,
|
|
71958
72206
|
0
|
|
71959
72207
|
], r)), r];
|
|
71960
72208
|
}
|
|
71961
|
-
function
|
|
72209
|
+
function SN(e) {
|
|
71962
72210
|
return [
|
|
71963
72211
|
e.re,
|
|
71964
72212
|
e.im,
|
|
71965
72213
|
0
|
|
71966
72214
|
];
|
|
71967
72215
|
}
|
|
71968
|
-
function
|
|
72216
|
+
function CN(e) {
|
|
71969
72217
|
return {
|
|
71970
72218
|
re: e[0] ?? 0,
|
|
71971
72219
|
im: e[1] ?? 0
|
|
71972
72220
|
};
|
|
71973
72221
|
}
|
|
71974
|
-
function
|
|
71975
|
-
return (t) =>
|
|
72222
|
+
function wN(e) {
|
|
72223
|
+
return (t) => SN(e(CN(t)));
|
|
71976
72224
|
}
|
|
71977
|
-
function
|
|
72225
|
+
function TN(e) {
|
|
71978
72226
|
let t = [
|
|
71979
72227
|
0,
|
|
71980
72228
|
0,
|
|
@@ -71988,10 +72236,10 @@ function vN(e) {
|
|
|
71988
72236
|
t[2] / n
|
|
71989
72237
|
];
|
|
71990
72238
|
}
|
|
71991
|
-
function
|
|
71992
|
-
return
|
|
72239
|
+
function EN(e, t) {
|
|
72240
|
+
return TN([e, t]);
|
|
71993
72241
|
}
|
|
71994
|
-
function
|
|
72242
|
+
function DN(e, t) {
|
|
71995
72243
|
for (let n of [e, t]) for (let e of n) if ((e[2] ?? 0) !== 0) throw Error("Coords must be in the xy-plane.");
|
|
71996
72244
|
let n = (e) => In([
|
|
71997
72245
|
e[0][0],
|
|
@@ -72009,7 +72257,7 @@ function bN(e, t) {
|
|
|
72009
72257
|
0
|
|
72010
72258
|
];
|
|
72011
72259
|
}
|
|
72012
|
-
function
|
|
72260
|
+
function ON(e, t, n, r, i = 1e-5) {
|
|
72013
72261
|
let a = [];
|
|
72014
72262
|
for (let o = 0; o < e.length; o++) {
|
|
72015
72263
|
let s = e[o], c = t[o], l = n[o], u = r[o], d = In(u, In(c, u)), f = c[0] * d[0] + c[1] * d[1] + c[2] * d[2], p = Math.max(f, i), m = [
|
|
@@ -72025,15 +72273,15 @@ function xN(e, t, n, r, i = 1e-5) {
|
|
|
72025
72273
|
}
|
|
72026
72274
|
return a;
|
|
72027
72275
|
}
|
|
72028
|
-
function
|
|
72276
|
+
function kN(e) {
|
|
72029
72277
|
let t = 0;
|
|
72030
72278
|
for (let n = 0; n < e.length - 1; n++) t += (e[n + 1][0] - e[n][0]) * (e[n][1] + e[n + 1][1]) / 2;
|
|
72031
72279
|
return t;
|
|
72032
72280
|
}
|
|
72033
|
-
function
|
|
72034
|
-
return
|
|
72281
|
+
function AN(e) {
|
|
72282
|
+
return kN(e) > 0 ? "CW" : "CCW";
|
|
72035
72283
|
}
|
|
72036
|
-
function
|
|
72284
|
+
function jN(e) {
|
|
72037
72285
|
let t = Ln(e);
|
|
72038
72286
|
if (t === 0) return [
|
|
72039
72287
|
0,
|
|
@@ -72047,7 +72295,7 @@ function wN(e) {
|
|
|
72047
72295
|
n
|
|
72048
72296
|
];
|
|
72049
72297
|
}
|
|
72050
|
-
function
|
|
72298
|
+
function MN(e) {
|
|
72051
72299
|
let [t, n, r] = e;
|
|
72052
72300
|
return [
|
|
72053
72301
|
t * Math.cos(n) * Math.sin(r),
|
|
@@ -72055,12 +72303,12 @@ function TN(e) {
|
|
|
72055
72303
|
t * Math.cos(r)
|
|
72056
72304
|
];
|
|
72057
72305
|
}
|
|
72058
|
-
function
|
|
72306
|
+
function NN(e, t = vn) {
|
|
72059
72307
|
let n = e[0], r = e[1], i = In([
|
|
72060
72308
|
n[0] - r[0],
|
|
72061
72309
|
n[1] - r[1],
|
|
72062
72310
|
n[2] - r[2]
|
|
72063
|
-
], t), a =
|
|
72311
|
+
], t), a = EN(n, r);
|
|
72064
72312
|
return [[
|
|
72065
72313
|
a[0] + i[0],
|
|
72066
72314
|
a[1] + i[1],
|
|
@@ -72071,7 +72319,7 @@ function EN(e, t = vn) {
|
|
|
72071
72319
|
a[2] - i[2]
|
|
72072
72320
|
]];
|
|
72073
72321
|
}
|
|
72074
|
-
function
|
|
72322
|
+
function PN(e, t = 2) {
|
|
72075
72323
|
let n = [];
|
|
72076
72324
|
for (let r = 0; r < e; r++) {
|
|
72077
72325
|
let i = [];
|
|
@@ -72080,41 +72328,41 @@ function DN(e, t = 2) {
|
|
|
72080
72328
|
}
|
|
72081
72329
|
return n;
|
|
72082
72330
|
}
|
|
72083
|
-
function
|
|
72331
|
+
function FN(e) {
|
|
72084
72332
|
let t = 0;
|
|
72085
|
-
for (let [n, r] of
|
|
72086
|
-
let e = ((
|
|
72333
|
+
for (let [n, r] of AM(e)) {
|
|
72334
|
+
let e = ((_N(r) - _N(n) + Math.PI) % nN + nN) % nN - Math.PI;
|
|
72087
72335
|
t += e;
|
|
72088
72336
|
}
|
|
72089
|
-
return t /
|
|
72337
|
+
return t / nN;
|
|
72090
72338
|
}
|
|
72091
72339
|
//#endregion
|
|
72092
72340
|
//#region src/utils/paths.ts
|
|
72093
|
-
var
|
|
72094
|
-
function
|
|
72341
|
+
var IN = .01;
|
|
72342
|
+
function LN(e, t, n) {
|
|
72095
72343
|
return e.map((e, r) => e.map((e, i) => e + n * (t[r][i] - e)));
|
|
72096
72344
|
}
|
|
72097
|
-
function
|
|
72345
|
+
function RN(e, t) {
|
|
72098
72346
|
return t.map((t) => t.reduce((t, n, r) => t + n * e[r], 0));
|
|
72099
72347
|
}
|
|
72100
|
-
function
|
|
72101
|
-
return
|
|
72348
|
+
function zN() {
|
|
72349
|
+
return LN;
|
|
72102
72350
|
}
|
|
72103
|
-
function
|
|
72104
|
-
let r =
|
|
72351
|
+
function BN(e, t, n = vn) {
|
|
72352
|
+
let r = sN(n, vn), i = (e) => t[e] ?? t[0];
|
|
72105
72353
|
return (t, n, a) => {
|
|
72106
|
-
let o =
|
|
72354
|
+
let o = fN(-e, r), s = fN(a * e, r);
|
|
72107
72355
|
return t.map((e, t) => {
|
|
72108
|
-
let r = i(t), c =
|
|
72109
|
-
return
|
|
72356
|
+
let r = i(t), c = RN(n[t].map((e, t) => e - r[t]), o).map((e, t) => e + r[t]);
|
|
72357
|
+
return RN(e.map((e, t) => e + a * (c[t] - e)).map((e, t) => e - r[t]), s).map((e, t) => e + r[t]);
|
|
72110
72358
|
});
|
|
72111
72359
|
};
|
|
72112
72360
|
}
|
|
72113
|
-
function
|
|
72114
|
-
if (Math.abs(e) <
|
|
72115
|
-
let n =
|
|
72361
|
+
function VN(e, t = vn) {
|
|
72362
|
+
if (Math.abs(e) < IN) return zN();
|
|
72363
|
+
let n = sN(t, vn);
|
|
72116
72364
|
return (t, r, i) => {
|
|
72117
|
-
let a =
|
|
72365
|
+
let a = fN(i * e, n);
|
|
72118
72366
|
return t.map((t, i) => {
|
|
72119
72367
|
let o = r[i].map((e, n) => e - t[n]), s = t.map((e, t) => e + .5 * o[t]);
|
|
72120
72368
|
if (e !== Math.PI) {
|
|
@@ -72125,19 +72373,19 @@ function PN(e, t = vn) {
|
|
|
72125
72373
|
], i = 1 / Math.tan(e / 2);
|
|
72126
72374
|
for (let e = 0; e < s.length; e++) s[e] += r[e] * i;
|
|
72127
72375
|
}
|
|
72128
|
-
return
|
|
72376
|
+
return RN(t.map((e, t) => e - s[t]), a).map((e, t) => e + s[t]);
|
|
72129
72377
|
});
|
|
72130
72378
|
};
|
|
72131
72379
|
}
|
|
72132
|
-
function
|
|
72133
|
-
return
|
|
72380
|
+
function HN() {
|
|
72381
|
+
return VN(-Math.PI);
|
|
72134
72382
|
}
|
|
72135
|
-
function
|
|
72136
|
-
return
|
|
72383
|
+
function UN() {
|
|
72384
|
+
return VN(Math.PI);
|
|
72137
72385
|
}
|
|
72138
72386
|
//#endregion
|
|
72139
72387
|
//#region src/utils/simpleFunctions.ts
|
|
72140
|
-
function
|
|
72388
|
+
function WN(e, t, n, r, i = 1e-4) {
|
|
72141
72389
|
let a = n, o = r, s = (a + o) / 2;
|
|
72142
72390
|
for (; Math.abs(o - a) > i;) {
|
|
72143
72391
|
s = (a + o) / 2;
|
|
@@ -72150,7 +72398,7 @@ function LN(e, t, n, r, i = 1e-4) {
|
|
|
72150
72398
|
}
|
|
72151
72399
|
return s;
|
|
72152
72400
|
}
|
|
72153
|
-
function
|
|
72401
|
+
function GN(e, t) {
|
|
72154
72402
|
if (t < 0 || t > e) return 0;
|
|
72155
72403
|
let n = t;
|
|
72156
72404
|
n > e - n && (n = e - n);
|
|
@@ -72158,30 +72406,30 @@ function RN(e, t) {
|
|
|
72158
72406
|
for (let t = 0; t < n; t++) r = r * (e - t) / (t + 1);
|
|
72159
72407
|
return Math.round(r);
|
|
72160
72408
|
}
|
|
72161
|
-
function
|
|
72409
|
+
function KN(e, t, n) {
|
|
72162
72410
|
return e < t ? t : e > n ? n : e;
|
|
72163
72411
|
}
|
|
72164
|
-
function
|
|
72412
|
+
function qN(e) {
|
|
72165
72413
|
return 1 / (1 + Math.exp(-e));
|
|
72166
72414
|
}
|
|
72167
72415
|
//#endregion
|
|
72168
72416
|
//#region src/utils/bezier.ts
|
|
72169
|
-
function
|
|
72417
|
+
function JN(e, t, n) {
|
|
72170
72418
|
if (Array.isArray(e) && Array.isArray(t)) return e.map((e, r) => (1 - n) * e + n * t[r]);
|
|
72171
72419
|
if (typeof e == "number" && typeof t == "number") return (1 - n) * e + n * t;
|
|
72172
72420
|
throw Error("interpolate: start and end must both be numbers or both be arrays");
|
|
72173
72421
|
}
|
|
72174
|
-
function
|
|
72422
|
+
function YN(e, t) {
|
|
72175
72423
|
if (Array.isArray(e) && Array.isArray(t)) return e.map((e, n) => (e + t[n]) / 2);
|
|
72176
72424
|
if (typeof e == "number" && typeof t == "number") return (e + t) / 2;
|
|
72177
72425
|
throw Error("mid: start and end must both be numbers or both be arrays");
|
|
72178
72426
|
}
|
|
72179
|
-
function
|
|
72427
|
+
function XN(e, t, n) {
|
|
72180
72428
|
if (Array.isArray(e) && Array.isArray(t) && Array.isArray(n)) return e.map((e, r) => (n[r] - e) / (t[r] - e));
|
|
72181
72429
|
if (typeof e == "number" && typeof t == "number" && typeof n == "number") return (n - e) / (t - e);
|
|
72182
72430
|
throw Error("inverse_interpolate: start, end and value must all be numbers or all be arrays");
|
|
72183
72431
|
}
|
|
72184
|
-
function
|
|
72432
|
+
function ZN(e, t, n, r, i) {
|
|
72185
72433
|
let a = r - n;
|
|
72186
72434
|
if (Array.isArray(i)) return i.map((r) => {
|
|
72187
72435
|
let i = (r - n) / a;
|
|
@@ -72190,7 +72438,7 @@ function WN(e, t, n, r, i) {
|
|
|
72190
72438
|
let o = (i - n) / a;
|
|
72191
72439
|
return (1 - o) * e + o * t;
|
|
72192
72440
|
}
|
|
72193
|
-
function
|
|
72441
|
+
function QN(e, t) {
|
|
72194
72442
|
if (e.length === 0) return 0;
|
|
72195
72443
|
let n = e.slice();
|
|
72196
72444
|
for (; n.length > 1;) {
|
|
@@ -72200,7 +72448,7 @@ function GN(e, t) {
|
|
|
72200
72448
|
}
|
|
72201
72449
|
return n[0];
|
|
72202
72450
|
}
|
|
72203
|
-
function
|
|
72451
|
+
function $N(e, t) {
|
|
72204
72452
|
if (e.length === 0) return [];
|
|
72205
72453
|
let n = e.map((e) => e.slice());
|
|
72206
72454
|
for (; n.length > 1;) {
|
|
@@ -72210,15 +72458,15 @@ function KN(e, t) {
|
|
|
72210
72458
|
}
|
|
72211
72459
|
return n[0];
|
|
72212
72460
|
}
|
|
72213
|
-
function
|
|
72461
|
+
function eP(e) {
|
|
72214
72462
|
if (e.length > 0 && Array.isArray(e[0])) {
|
|
72215
72463
|
let t = e.filter((e) => Array.isArray(e));
|
|
72216
|
-
return (e) =>
|
|
72464
|
+
return (e) => $N(t, e);
|
|
72217
72465
|
}
|
|
72218
72466
|
let t = e.filter((e) => typeof e == "number");
|
|
72219
|
-
return (e) =>
|
|
72467
|
+
return (e) => QN(t, e);
|
|
72220
72468
|
}
|
|
72221
|
-
function
|
|
72469
|
+
function tP(e, t) {
|
|
72222
72470
|
let n = e.length, r = e.map((e) => e.slice()), i = Array(n);
|
|
72223
72471
|
i[0] = e[0].slice();
|
|
72224
72472
|
for (let e = 1; e < n; e++) {
|
|
@@ -72227,7 +72475,7 @@ function JN(e, t) {
|
|
|
72227
72475
|
}
|
|
72228
72476
|
return [...i, ...r];
|
|
72229
72477
|
}
|
|
72230
|
-
function
|
|
72478
|
+
function nP(e, t) {
|
|
72231
72479
|
if (t <= 1) return e.map((e) => e.slice());
|
|
72232
72480
|
let n = [];
|
|
72233
72481
|
for (let r = 0; r < t; r++) {
|
|
@@ -72236,7 +72484,7 @@ function YN(e, t) {
|
|
|
72236
72484
|
}
|
|
72237
72485
|
return n;
|
|
72238
72486
|
}
|
|
72239
|
-
function
|
|
72487
|
+
function rP(e, t) {
|
|
72240
72488
|
let n = e.length;
|
|
72241
72489
|
if (n === 0) return [];
|
|
72242
72490
|
let r = e[0].length, i = [];
|
|
@@ -72247,12 +72495,12 @@ function XN(e, t) {
|
|
|
72247
72495
|
for (let t = 0; t < n; t++) {
|
|
72248
72496
|
let n = a[t];
|
|
72249
72497
|
if (n <= 0) continue;
|
|
72250
|
-
let i =
|
|
72498
|
+
let i = nP(e[t], n);
|
|
72251
72499
|
for (let e = 0; e < n; e++) o.push(i.slice(e * r, e * r + r));
|
|
72252
72500
|
}
|
|
72253
72501
|
return o;
|
|
72254
72502
|
}
|
|
72255
|
-
function
|
|
72503
|
+
function iP(e) {
|
|
72256
72504
|
let t = e[0], n = e[e.length - 1];
|
|
72257
72505
|
for (let e = 0; e < 3; e++) {
|
|
72258
72506
|
let r = t[e] ?? 0, i = n[e] ?? 0, a = 1e-8 + 1e-5 * Math.abs(r);
|
|
@@ -72260,43 +72508,43 @@ function ZN(e) {
|
|
|
72260
72508
|
}
|
|
72261
72509
|
return !0;
|
|
72262
72510
|
}
|
|
72263
|
-
function
|
|
72511
|
+
function aP(e, t) {
|
|
72264
72512
|
return {
|
|
72265
72513
|
re: e.re + t.re,
|
|
72266
72514
|
im: e.im + t.im
|
|
72267
72515
|
};
|
|
72268
72516
|
}
|
|
72269
|
-
function
|
|
72517
|
+
function oP(e, t) {
|
|
72270
72518
|
return {
|
|
72271
72519
|
re: e.re - t.re,
|
|
72272
72520
|
im: e.im - t.im
|
|
72273
72521
|
};
|
|
72274
72522
|
}
|
|
72275
|
-
function
|
|
72523
|
+
function sP(e, t) {
|
|
72276
72524
|
return {
|
|
72277
72525
|
re: e.re * t.re - e.im * t.im,
|
|
72278
72526
|
im: e.re * t.im + e.im * t.re
|
|
72279
72527
|
};
|
|
72280
72528
|
}
|
|
72281
|
-
function
|
|
72529
|
+
function cP(e, t) {
|
|
72282
72530
|
let n = t.re * t.re + t.im * t.im;
|
|
72283
72531
|
return {
|
|
72284
72532
|
re: (e.re * t.re + e.im * t.im) / n,
|
|
72285
72533
|
im: (e.im * t.re - e.re * t.im) / n
|
|
72286
72534
|
};
|
|
72287
72535
|
}
|
|
72288
|
-
function
|
|
72536
|
+
function lP(e, t) {
|
|
72289
72537
|
let n = {
|
|
72290
72538
|
re: e[e.length - 1],
|
|
72291
72539
|
im: 0
|
|
72292
72540
|
};
|
|
72293
|
-
for (let r = e.length - 2; r >= 0; r--) n =
|
|
72541
|
+
for (let r = e.length - 2; r >= 0; r--) n = aP(sP(n, t), {
|
|
72294
72542
|
re: e[r],
|
|
72295
72543
|
im: 0
|
|
72296
72544
|
});
|
|
72297
72545
|
return n;
|
|
72298
72546
|
}
|
|
72299
|
-
function
|
|
72547
|
+
function uP(e) {
|
|
72300
72548
|
let t = e.slice();
|
|
72301
72549
|
for (; t.length > 1 && Math.abs(t[t.length - 1]) < 1e-14;) t.pop();
|
|
72302
72550
|
let n = t.length - 1;
|
|
@@ -72311,17 +72559,17 @@ function rP(e) {
|
|
|
72311
72559
|
for (let e = 0; e < n; e++) a.push({
|
|
72312
72560
|
re: s.re,
|
|
72313
72561
|
im: s.im
|
|
72314
|
-
}), s =
|
|
72562
|
+
}), s = sP(s, o);
|
|
72315
72563
|
for (let e = 0; e < 200; e++) {
|
|
72316
72564
|
let e = 0;
|
|
72317
72565
|
for (let t = 0; t < n; t++) {
|
|
72318
|
-
let r =
|
|
72566
|
+
let r = lP(i, a[t]), o = {
|
|
72319
72567
|
re: 1,
|
|
72320
72568
|
im: 0
|
|
72321
72569
|
};
|
|
72322
|
-
for (let e = 0; e < n; e++) e !== t && (o =
|
|
72323
|
-
let s =
|
|
72324
|
-
a[t] =
|
|
72570
|
+
for (let e = 0; e < n; e++) e !== t && (o = sP(o, oP(a[t], a[e])));
|
|
72571
|
+
let s = cP(r, o);
|
|
72572
|
+
a[t] = oP(a[t], s);
|
|
72325
72573
|
let c = Math.hypot(s.re, s.im);
|
|
72326
72574
|
c > e && (e = c);
|
|
72327
72575
|
}
|
|
@@ -72329,98 +72577,98 @@ function rP(e) {
|
|
|
72329
72577
|
}
|
|
72330
72578
|
return a;
|
|
72331
72579
|
}
|
|
72332
|
-
function
|
|
72580
|
+
function dP(e, t) {
|
|
72333
72581
|
if (t < 0 || t > e) return 0;
|
|
72334
72582
|
let n = 1;
|
|
72335
72583
|
for (let r = 0; r < t; r++) n = n * (e - r) / (r + 1);
|
|
72336
72584
|
return Math.round(n);
|
|
72337
72585
|
}
|
|
72338
|
-
function
|
|
72586
|
+
function fP(e, t) {
|
|
72339
72587
|
let n = 10 ** t;
|
|
72340
72588
|
return Math.round(e * n) / n;
|
|
72341
72589
|
}
|
|
72342
|
-
function
|
|
72590
|
+
function pP(e, t, n) {
|
|
72343
72591
|
let r = .5 * 10 ** -n, i = [];
|
|
72344
72592
|
for (let n of e) t.some((e) => Math.abs(n - e) <= r) && !i.some((e) => Math.abs(n - e) <= r) && i.push(n);
|
|
72345
72593
|
return i;
|
|
72346
72594
|
}
|
|
72347
|
-
function
|
|
72595
|
+
function mP(e, t, n = 1e-6) {
|
|
72348
72596
|
for (let n of t) if (n.length !== e.length) throw Error("proportions_along_bezier_curve_for_point: point and control points have different shapes");
|
|
72349
72597
|
let r = t.length - 1, i = Math.round(Math.log10(1 / n)), a = [];
|
|
72350
72598
|
for (let n = 0; n < e.length; n++) {
|
|
72351
72599
|
let o = e[n], s = t.map((e) => e[n]), c = [];
|
|
72352
72600
|
for (let e = r; e >= 0; e--) {
|
|
72353
|
-
let t =
|
|
72601
|
+
let t = dP(r, e), n = 1, i = 0;
|
|
72354
72602
|
for (let t = e; t >= 0; t--) {
|
|
72355
|
-
let r =
|
|
72603
|
+
let r = dP(e, t) * n * s[t];
|
|
72356
72604
|
e === 0 && (r -= o), i += r, n *= -1;
|
|
72357
72605
|
}
|
|
72358
72606
|
c.push(t * i);
|
|
72359
72607
|
}
|
|
72360
72608
|
if (c.every((e) => e === 0)) continue;
|
|
72361
|
-
let l =
|
|
72609
|
+
let l = uP(c.slice().reverse()).filter((e) => Math.abs(e.im) < 1e-9).map((e) => fP(e.re, i));
|
|
72362
72610
|
a.push(l);
|
|
72363
72611
|
}
|
|
72364
72612
|
if (a.length === 0) return [];
|
|
72365
72613
|
let o = a[0];
|
|
72366
|
-
for (let e = 1; e < a.length; e++) o =
|
|
72614
|
+
for (let e = 1; e < a.length; e++) o = pP(o, a[e], i);
|
|
72367
72615
|
return o.filter((e) => e >= 0 && e <= 1);
|
|
72368
72616
|
}
|
|
72369
|
-
function
|
|
72370
|
-
return
|
|
72617
|
+
function hP(e, t, n = 1e-6) {
|
|
72618
|
+
return mP(e, t, n).length > 0;
|
|
72371
72619
|
}
|
|
72372
72620
|
//#endregion
|
|
72373
72621
|
//#region src/mobjects/three-d/threeDVmobUtils.ts
|
|
72374
|
-
function
|
|
72622
|
+
function gP(e) {
|
|
72375
72623
|
return [
|
|
72376
72624
|
e[0],
|
|
72377
72625
|
e[1],
|
|
72378
72626
|
e[2]
|
|
72379
72627
|
];
|
|
72380
72628
|
}
|
|
72381
|
-
function
|
|
72629
|
+
function _P(e) {
|
|
72382
72630
|
return e.filter((e, t) => t % 3 == 0);
|
|
72383
72631
|
}
|
|
72384
|
-
function
|
|
72385
|
-
return [
|
|
72632
|
+
function vP(e) {
|
|
72633
|
+
return [xP(e), SP(e)];
|
|
72386
72634
|
}
|
|
72387
|
-
function
|
|
72635
|
+
function yP(e) {
|
|
72388
72636
|
return 0;
|
|
72389
72637
|
}
|
|
72390
|
-
function
|
|
72638
|
+
function bP(e) {
|
|
72391
72639
|
return Math.floor((e.getPoints().length - 1) / 6) * 3;
|
|
72392
72640
|
}
|
|
72393
|
-
function
|
|
72641
|
+
function xP(e) {
|
|
72394
72642
|
let t = e.getPoints();
|
|
72395
|
-
return t.length === 0 ? [...bn] :
|
|
72643
|
+
return t.length === 0 ? [...bn] : gP(t[yP(e)]);
|
|
72396
72644
|
}
|
|
72397
|
-
function
|
|
72645
|
+
function SP(e) {
|
|
72398
72646
|
let t = e.getPoints();
|
|
72399
|
-
return t.length === 0 ? [...bn] :
|
|
72647
|
+
return t.length === 0 ? [...bn] : gP(t[bP(e)]);
|
|
72400
72648
|
}
|
|
72401
|
-
function
|
|
72649
|
+
function CP(e, t) {
|
|
72402
72650
|
let n = e.getPoints(), r = n.length;
|
|
72403
|
-
if (
|
|
72404
|
-
let i = t, a = i > 2 ? i - 3 : r - 4, o =
|
|
72651
|
+
if (_P(n).length <= 2) return [...mn];
|
|
72652
|
+
let i = t, a = i > 2 ? i - 3 : r - 4, o = yN(n[i < r - 3 ? i + 3 : 3].map((e, t) => e - n[i][t]), n[a].map((e, t) => e - n[i][t]));
|
|
72405
72653
|
return Math.hypot(...o) === 0 ? [...mn] : o;
|
|
72406
72654
|
}
|
|
72407
|
-
function
|
|
72408
|
-
return
|
|
72655
|
+
function wP(e) {
|
|
72656
|
+
return CP(e, yP(e));
|
|
72409
72657
|
}
|
|
72410
|
-
function
|
|
72411
|
-
return
|
|
72658
|
+
function TP(e) {
|
|
72659
|
+
return CP(e, bP(e));
|
|
72412
72660
|
}
|
|
72413
72661
|
//#endregion
|
|
72414
72662
|
//#region src/core/SpecialThreeDScene.ts
|
|
72415
|
-
var
|
|
72663
|
+
var EP = 70 * _t, DP = -110 * _t, OP = 2, kP = 48, AP = class extends c_ {
|
|
72416
72664
|
cutAxesAtRadius;
|
|
72417
72665
|
_threeDAxesConfig;
|
|
72418
72666
|
_sphereConfig;
|
|
72419
72667
|
_defaultAngledCameraPosition;
|
|
72420
72668
|
constructor(e, t = {}) {
|
|
72421
72669
|
let { cutAxesAtRadius: n = !0, threeDAxesConfig: r = {}, sphereConfig: i = {}, defaultAngledCameraPosition: a = {
|
|
72422
|
-
phi:
|
|
72423
|
-
theta:
|
|
72670
|
+
phi: EP,
|
|
72671
|
+
theta: DP
|
|
72424
72672
|
}, phi: o = a.phi, theta: s = a.theta, ...c } = t;
|
|
72425
72673
|
super(e, {
|
|
72426
72674
|
...c,
|
|
@@ -72450,8 +72698,8 @@ var yP = 70 * _t, bP = -110 * _t, xP = 2, SP = 48, CP = class extends c_ {
|
|
|
72450
72698
|
}
|
|
72451
72699
|
getDefaultSphereConfig() {
|
|
72452
72700
|
return {
|
|
72453
|
-
radius:
|
|
72454
|
-
resolution:
|
|
72701
|
+
radius: OP,
|
|
72702
|
+
resolution: kP
|
|
72455
72703
|
};
|
|
72456
72704
|
}
|
|
72457
72705
|
getAxes() {
|
|
@@ -72477,73 +72725,73 @@ var yP = 70 * _t, bP = -110 * _t, xP = 2, SP = 48, CP = class extends c_ {
|
|
|
72477
72725
|
};
|
|
72478
72726
|
//#endregion
|
|
72479
72727
|
//#region src/mobjects/text/registerFont.ts
|
|
72480
|
-
function
|
|
72728
|
+
function jP(e, t) {
|
|
72481
72729
|
if (typeof document > "u" || typeof FontFace > "u" || document.fonts === void 0) return !1;
|
|
72482
72730
|
let n = typeof t == "string" && !/^\s*(url|local)\s*\(/i.test(t) ? `url("${t}")` : t, r = new FontFace(e, n);
|
|
72483
72731
|
return document.fonts.add(r), !0;
|
|
72484
72732
|
}
|
|
72485
72733
|
//#endregion
|
|
72486
72734
|
//#region src/serialization/registry.ts
|
|
72487
|
-
var
|
|
72488
|
-
function
|
|
72489
|
-
|
|
72735
|
+
var MP = /* @__PURE__ */ new Map();
|
|
72736
|
+
function NP(e, t) {
|
|
72737
|
+
MP.set(e, t);
|
|
72490
72738
|
}
|
|
72491
|
-
function
|
|
72492
|
-
|
|
72739
|
+
function PP(e) {
|
|
72740
|
+
MP.delete(e);
|
|
72493
72741
|
}
|
|
72494
|
-
function
|
|
72495
|
-
return
|
|
72742
|
+
function FP(e) {
|
|
72743
|
+
return MP.get(e);
|
|
72496
72744
|
}
|
|
72497
|
-
function
|
|
72498
|
-
return [...
|
|
72745
|
+
function IP() {
|
|
72746
|
+
return [...MP.keys()].sort();
|
|
72499
72747
|
}
|
|
72500
72748
|
//#endregion
|
|
72501
72749
|
//#region src/serialization/props.ts
|
|
72502
|
-
function
|
|
72750
|
+
function LP(e, t) {
|
|
72503
72751
|
return typeof e == "number" && Number.isFinite(e) ? e : t;
|
|
72504
72752
|
}
|
|
72505
|
-
function
|
|
72753
|
+
function RP(e, t) {
|
|
72506
72754
|
return typeof e == "string" ? e : t;
|
|
72507
72755
|
}
|
|
72508
|
-
function
|
|
72756
|
+
function zP(e, t) {
|
|
72509
72757
|
return typeof e == "boolean" ? e : t;
|
|
72510
72758
|
}
|
|
72511
|
-
function
|
|
72759
|
+
function BP(e) {
|
|
72512
72760
|
return typeof e == "string" ? e : void 0;
|
|
72513
72761
|
}
|
|
72514
|
-
function
|
|
72762
|
+
function VP(e) {
|
|
72515
72763
|
return Array.isArray(e) && e.length === 3 && e.every((e) => typeof e == "number" && Number.isFinite(e));
|
|
72516
72764
|
}
|
|
72517
|
-
function
|
|
72518
|
-
return
|
|
72765
|
+
function HP(e, t) {
|
|
72766
|
+
return VP(e) ? [
|
|
72519
72767
|
e[0],
|
|
72520
72768
|
e[1],
|
|
72521
72769
|
e[2]
|
|
72522
72770
|
] : t;
|
|
72523
72771
|
}
|
|
72524
|
-
function
|
|
72772
|
+
function UP(e) {
|
|
72525
72773
|
if (!Array.isArray(e)) return [];
|
|
72526
72774
|
let t = [];
|
|
72527
|
-
for (let n of e)
|
|
72775
|
+
for (let n of e) VP(n) && t.push([
|
|
72528
72776
|
n[0],
|
|
72529
72777
|
n[1],
|
|
72530
72778
|
n[2]
|
|
72531
72779
|
]);
|
|
72532
72780
|
return t;
|
|
72533
72781
|
}
|
|
72534
|
-
function
|
|
72782
|
+
function WP(e) {
|
|
72535
72783
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
72536
72784
|
}
|
|
72537
72785
|
//#endregion
|
|
72538
72786
|
//#region src/serialization/defaults.ts
|
|
72539
|
-
function
|
|
72540
|
-
return typeof e == "number" && Number.isFinite(e) ? e :
|
|
72787
|
+
function GP(e) {
|
|
72788
|
+
return typeof e == "number" && Number.isFinite(e) ? e : RP(e, "normal");
|
|
72541
72789
|
}
|
|
72542
|
-
function
|
|
72790
|
+
function KP(e) {
|
|
72543
72791
|
return e === "left" || e === "right" ? e : "center";
|
|
72544
72792
|
}
|
|
72545
|
-
function
|
|
72546
|
-
|
|
72793
|
+
function qP() {
|
|
72794
|
+
NP("Circle", {
|
|
72547
72795
|
serialize: (e) => {
|
|
72548
72796
|
let t = e;
|
|
72549
72797
|
return {
|
|
@@ -72552,10 +72800,10 @@ function BP() {
|
|
|
72552
72800
|
};
|
|
72553
72801
|
},
|
|
72554
72802
|
deserialize: (e) => new Av({
|
|
72555
|
-
radius:
|
|
72556
|
-
numPoints:
|
|
72803
|
+
radius: LP(e.radius, 1),
|
|
72804
|
+
numPoints: LP(e.numPoints, 64)
|
|
72557
72805
|
})
|
|
72558
|
-
}),
|
|
72806
|
+
}), NP("Rectangle", {
|
|
72559
72807
|
serialize: (e) => {
|
|
72560
72808
|
let t = e;
|
|
72561
72809
|
return {
|
|
@@ -72564,13 +72812,13 @@ function BP() {
|
|
|
72564
72812
|
};
|
|
72565
72813
|
},
|
|
72566
72814
|
deserialize: (e) => new l_({
|
|
72567
|
-
width:
|
|
72568
|
-
height:
|
|
72815
|
+
width: LP(e.width, 2),
|
|
72816
|
+
height: LP(e.height, 1)
|
|
72569
72817
|
})
|
|
72570
|
-
}),
|
|
72818
|
+
}), NP("Square", {
|
|
72571
72819
|
serialize: (e) => ({ sideLength: e._width }),
|
|
72572
|
-
deserialize: (e) => new u_({ sideLength:
|
|
72573
|
-
}),
|
|
72820
|
+
deserialize: (e) => new u_({ sideLength: LP(e.sideLength, 2) })
|
|
72821
|
+
}), NP("Line", {
|
|
72574
72822
|
serialize: (e) => {
|
|
72575
72823
|
let t = e;
|
|
72576
72824
|
return {
|
|
@@ -72579,27 +72827,27 @@ function BP() {
|
|
|
72579
72827
|
};
|
|
72580
72828
|
},
|
|
72581
72829
|
deserialize: (e) => new x_({
|
|
72582
|
-
start:
|
|
72830
|
+
start: HP(e.start, [
|
|
72583
72831
|
0,
|
|
72584
72832
|
0,
|
|
72585
72833
|
0
|
|
72586
72834
|
]),
|
|
72587
|
-
end:
|
|
72835
|
+
end: HP(e.end, [
|
|
72588
72836
|
1,
|
|
72589
72837
|
0,
|
|
72590
72838
|
0
|
|
72591
72839
|
])
|
|
72592
72840
|
})
|
|
72593
|
-
}),
|
|
72841
|
+
}), NP("Dot", {
|
|
72594
72842
|
serialize: (e) => ({ radius: e._radius }),
|
|
72595
|
-
deserialize: (e) => new ey({ radius:
|
|
72596
|
-
}),
|
|
72843
|
+
deserialize: (e) => new ey({ radius: LP(e.radius, .08) })
|
|
72844
|
+
}), NP("Polygon", {
|
|
72597
72845
|
serialize: (e) => ({
|
|
72598
72846
|
vertices: e.getVertices().map((e) => [...e]),
|
|
72599
72847
|
closed: e._closed
|
|
72600
72848
|
}),
|
|
72601
72849
|
deserialize: (e) => {
|
|
72602
|
-
let t =
|
|
72850
|
+
let t = UP(e.vertices);
|
|
72603
72851
|
return new jv({
|
|
72604
72852
|
vertices: t.length >= 2 ? t : [[
|
|
72605
72853
|
0,
|
|
@@ -72610,16 +72858,16 @@ function BP() {
|
|
|
72610
72858
|
0,
|
|
72611
72859
|
0
|
|
72612
72860
|
]],
|
|
72613
|
-
closed:
|
|
72861
|
+
closed: zP(e.closed, !0)
|
|
72614
72862
|
});
|
|
72615
72863
|
}
|
|
72616
|
-
}),
|
|
72864
|
+
}), NP("Group", {
|
|
72617
72865
|
serialize: () => ({}),
|
|
72618
72866
|
deserialize: () => new Qh()
|
|
72619
|
-
}),
|
|
72867
|
+
}), NP("VGroup", {
|
|
72620
72868
|
serialize: () => ({}),
|
|
72621
72869
|
deserialize: () => new L()
|
|
72622
|
-
}),
|
|
72870
|
+
}), NP("Text", {
|
|
72623
72871
|
serialize: (e) => {
|
|
72624
72872
|
let t = e;
|
|
72625
72873
|
return {
|
|
@@ -72634,16 +72882,16 @@ function BP() {
|
|
|
72634
72882
|
};
|
|
72635
72883
|
},
|
|
72636
72884
|
deserialize: (e) => new sh({
|
|
72637
|
-
text:
|
|
72638
|
-
fontSize:
|
|
72639
|
-
fontFamily:
|
|
72640
|
-
fontWeight:
|
|
72641
|
-
fontStyle:
|
|
72642
|
-
lineHeight:
|
|
72643
|
-
letterSpacing:
|
|
72644
|
-
textAlign:
|
|
72885
|
+
text: RP(e.text, ""),
|
|
72886
|
+
fontSize: LP(e.fontSize, 48),
|
|
72887
|
+
fontFamily: RP(e.fontFamily, "CMU Serif, Georgia, Times New Roman, serif"),
|
|
72888
|
+
fontWeight: GP(e.fontWeight),
|
|
72889
|
+
fontStyle: RP(e.fontStyle, "normal"),
|
|
72890
|
+
lineHeight: LP(e.lineHeight, 1.2),
|
|
72891
|
+
letterSpacing: LP(e.letterSpacing, 0),
|
|
72892
|
+
textAlign: KP(e.textAlign)
|
|
72645
72893
|
})
|
|
72646
|
-
}),
|
|
72894
|
+
}), NP("MathTex", {
|
|
72647
72895
|
serialize: (e) => {
|
|
72648
72896
|
let t = e;
|
|
72649
72897
|
return {
|
|
@@ -72653,15 +72901,15 @@ function BP() {
|
|
|
72653
72901
|
};
|
|
72654
72902
|
},
|
|
72655
72903
|
deserialize: (e) => new qx({
|
|
72656
|
-
latex:
|
|
72657
|
-
fontSize:
|
|
72658
|
-
displayMode:
|
|
72904
|
+
latex: RP(e.latex, ""),
|
|
72905
|
+
fontSize: LP(e.fontSize, 1),
|
|
72906
|
+
displayMode: zP(e.displayMode, !0)
|
|
72659
72907
|
})
|
|
72660
72908
|
});
|
|
72661
72909
|
}
|
|
72662
72910
|
//#endregion
|
|
72663
72911
|
//#region src/serialization/types.ts
|
|
72664
|
-
var
|
|
72912
|
+
var JP = "manim-web-scene", YP = {
|
|
72665
72913
|
position: [
|
|
72666
72914
|
0,
|
|
72667
72915
|
0,
|
|
@@ -72678,7 +72926,7 @@ var VP = "manim-web-scene", HP = {
|
|
|
72678
72926
|
1
|
|
72679
72927
|
]
|
|
72680
72928
|
};
|
|
72681
|
-
function
|
|
72929
|
+
function XP(e) {
|
|
72682
72930
|
return {
|
|
72683
72931
|
position: [
|
|
72684
72932
|
e.position.x,
|
|
@@ -72697,67 +72945,67 @@ function UP(e) {
|
|
|
72697
72945
|
]
|
|
72698
72946
|
};
|
|
72699
72947
|
}
|
|
72700
|
-
function
|
|
72948
|
+
function ZP(e) {
|
|
72701
72949
|
let t = {};
|
|
72702
72950
|
return e.strokeColor !== void 0 && (t.strokeColor = e.strokeColor), e.fillColor !== void 0 && (t.fillColor = e.fillColor), typeof e.opacity == "number" && (t.strokeOpacity = e.opacity), typeof e.fillOpacity == "number" && (t.fillOpacity = e.fillOpacity), typeof e.strokeWidth == "number" && (t.strokeWidth = e.strokeWidth), t;
|
|
72703
72951
|
}
|
|
72704
|
-
function
|
|
72705
|
-
let n =
|
|
72952
|
+
function QP(e, t) {
|
|
72953
|
+
let n = WP(t) ? t : {}, r = HP(n.position, YP.position), i = HP(n.rotation, YP.rotation), a = HP(n.scale, YP.scale);
|
|
72706
72954
|
e.position.set(r[0], r[1], r[2]), e.rotation.set(i[0], i[1], i[2]), e.scaleVector.set(a[0], a[1], a[2]);
|
|
72707
72955
|
}
|
|
72708
|
-
function
|
|
72709
|
-
let n =
|
|
72956
|
+
function $P(e, t) {
|
|
72957
|
+
let n = WP(t) ? t : {};
|
|
72710
72958
|
typeof n.strokeWidth == "number" && e.setStrokeWidth(n.strokeWidth), typeof n.strokeOpacity == "number" && e.setStrokeOpacity(n.strokeOpacity), typeof n.fillOpacity == "number" && e.setFillOpacity(n.fillOpacity);
|
|
72711
|
-
let r =
|
|
72959
|
+
let r = BP(n.strokeColor), i = BP(n.fillColor);
|
|
72712
72960
|
r !== void 0 && (e.color = r), r !== void 0 && (e.strokeColor = r), i !== void 0 && (e.fillColor = i);
|
|
72713
72961
|
}
|
|
72714
|
-
function
|
|
72715
|
-
let t = e.constructor.name, n =
|
|
72962
|
+
function eF(e) {
|
|
72963
|
+
let t = e.constructor.name, n = FP(t), r = {
|
|
72716
72964
|
type: t,
|
|
72717
72965
|
props: n ? n.serialize(e) : {},
|
|
72718
|
-
transform:
|
|
72719
|
-
style:
|
|
72720
|
-
children: e.children.map(
|
|
72966
|
+
transform: XP(e),
|
|
72967
|
+
style: ZP(e),
|
|
72968
|
+
children: e.children.map(eF)
|
|
72721
72969
|
};
|
|
72722
72970
|
return n || (r.unknown = !0), r;
|
|
72723
72971
|
}
|
|
72724
|
-
function
|
|
72725
|
-
if (!
|
|
72726
|
-
let t =
|
|
72972
|
+
function tF(e) {
|
|
72973
|
+
if (!WP(e) || e.unknown === !0) return null;
|
|
72974
|
+
let t = BP(e.type);
|
|
72727
72975
|
if (t === void 0) return null;
|
|
72728
|
-
let n =
|
|
72976
|
+
let n = FP(t);
|
|
72729
72977
|
if (!n) return null;
|
|
72730
|
-
let r =
|
|
72731
|
-
if (
|
|
72732
|
-
let e =
|
|
72978
|
+
let r = WP(e.props) ? e.props : {}, i = n.deserialize(r);
|
|
72979
|
+
if (QP(i, e.transform), $P(i, e.style), Array.isArray(e.children)) for (let t of e.children) {
|
|
72980
|
+
let e = tF(t);
|
|
72733
72981
|
e && i.add(e);
|
|
72734
72982
|
}
|
|
72735
72983
|
return i;
|
|
72736
72984
|
}
|
|
72737
|
-
function
|
|
72985
|
+
function nF(e) {
|
|
72738
72986
|
let t = [];
|
|
72739
|
-
for (let n of e.mobjects) t.push(
|
|
72987
|
+
for (let n of e.mobjects) t.push(eF(n));
|
|
72740
72988
|
return {
|
|
72741
|
-
format:
|
|
72989
|
+
format: JP,
|
|
72742
72990
|
version: 1,
|
|
72743
72991
|
mobjects: t
|
|
72744
72992
|
};
|
|
72745
72993
|
}
|
|
72746
|
-
function
|
|
72747
|
-
if (!
|
|
72994
|
+
function rF(e, t) {
|
|
72995
|
+
if (!WP(e) || !Array.isArray(e.mobjects)) return [];
|
|
72748
72996
|
let n = [];
|
|
72749
72997
|
for (let r of e.mobjects) {
|
|
72750
|
-
let e =
|
|
72998
|
+
let e = tF(r);
|
|
72751
72999
|
e && (t.add(e), n.push(e));
|
|
72752
73000
|
}
|
|
72753
73001
|
return n;
|
|
72754
73002
|
}
|
|
72755
73003
|
//#endregion
|
|
72756
73004
|
//#region src/serialization/index.ts
|
|
72757
|
-
|
|
73005
|
+
qP();
|
|
72758
73006
|
//#endregion
|
|
72759
73007
|
//#region src/mobjects/geo/geojson.ts
|
|
72760
|
-
function
|
|
73008
|
+
function iF(e) {
|
|
72761
73009
|
if (e.type === "Polygon") {
|
|
72762
73010
|
let t = e.coordinates[0];
|
|
72763
73011
|
return t ? [t] : [];
|
|
@@ -72771,26 +73019,26 @@ function ZP(e) {
|
|
|
72771
73019
|
}
|
|
72772
73020
|
//#endregion
|
|
72773
73021
|
//#region src/mobjects/geo/projections.ts
|
|
72774
|
-
var
|
|
72775
|
-
function
|
|
72776
|
-
let { radius: t = 1, centerLon: n = 0, centerLat: r = 0, standardParallel: i = 0 } = e, a = Math.cos(i *
|
|
72777
|
-
return ([e, i]) => [(e - n) *
|
|
73022
|
+
var aF = Math.PI / 180;
|
|
73023
|
+
function oF(e = {}) {
|
|
73024
|
+
let { radius: t = 1, centerLon: n = 0, centerLat: r = 0, standardParallel: i = 0 } = e, a = Math.cos(i * aF);
|
|
73025
|
+
return ([e, i]) => [(e - n) * aF * t * a, (i - r) * aF * t];
|
|
72778
73026
|
}
|
|
72779
|
-
function
|
|
73027
|
+
function sF(e = {}) {
|
|
72780
73028
|
let { radius: t = 1, centerLon: n = 0, maxLatitude: r = 85.05112878 } = e;
|
|
72781
73029
|
return ([e, i]) => {
|
|
72782
|
-
let a = Math.max(-r, Math.min(r, i)) *
|
|
72783
|
-
return [(e - n) *
|
|
73030
|
+
let a = Math.max(-r, Math.min(r, i)) * aF;
|
|
73031
|
+
return [(e - n) * aF * t, t * Math.log(Math.tan(Math.PI / 4 + a / 2))];
|
|
72784
73032
|
};
|
|
72785
73033
|
}
|
|
72786
73034
|
//#endregion
|
|
72787
73035
|
//#region src/mobjects/geo/colorScale.ts
|
|
72788
|
-
var
|
|
73036
|
+
var cF = ["#0d1b2a", "#4cc9f0"], lF = class {
|
|
72789
73037
|
_palette;
|
|
72790
73038
|
_domain;
|
|
72791
73039
|
constructor(e = {}) {
|
|
72792
|
-
let { colors: t =
|
|
72793
|
-
this._palette = Ua(t.length > 0 ? t :
|
|
73040
|
+
let { colors: t = cF, domain: n = [0, 1], samples: r = 256 } = e, i = Math.max(2, Math.floor(r));
|
|
73041
|
+
this._palette = Ua(t.length > 0 ? t : cF, i), this._domain = [n[0], n[1]];
|
|
72794
73042
|
}
|
|
72795
73043
|
setDomainFromValues(e) {
|
|
72796
73044
|
let t = Infinity, n = -Infinity;
|
|
@@ -72806,7 +73054,7 @@ var tF = ["#0d1b2a", "#4cc9f0"], nF = class {
|
|
|
72806
73054
|
let a = Math.round(i * (this._palette.length - 1));
|
|
72807
73055
|
return this._palette[a];
|
|
72808
73056
|
}
|
|
72809
|
-
},
|
|
73057
|
+
}, uF = class extends Qh {
|
|
72810
73058
|
_projection;
|
|
72811
73059
|
_colorScale;
|
|
72812
73060
|
_regions = [];
|
|
@@ -72814,10 +73062,10 @@ var tF = ["#0d1b2a", "#4cc9f0"], nF = class {
|
|
|
72814
73062
|
_regionPolygons = [];
|
|
72815
73063
|
constructor(e) {
|
|
72816
73064
|
super();
|
|
72817
|
-
let { geojson: t, value: n, colorScale: r = ["#0d1b2a", "#4cc9f0"], domain: i, fillOpacity: a = 1, noDataColor: o = pe, borderColor: s = "#1b263b", borderWidth: c = 1, projection: l =
|
|
73065
|
+
let { geojson: t, value: n, colorScale: r = ["#0d1b2a", "#4cc9f0"], domain: i, fillOpacity: a = 1, noDataColor: o = pe, borderColor: s = "#1b263b", borderWidth: c = 1, projection: l = oF() } = e;
|
|
72818
73066
|
this._projection = l;
|
|
72819
73067
|
let u = t.features ?? [], d = u.map((e, t) => n(e, t));
|
|
72820
|
-
this._colorScale = new
|
|
73068
|
+
this._colorScale = new lF({
|
|
72821
73069
|
colors: r,
|
|
72822
73070
|
domain: i
|
|
72823
73071
|
}), i || this._colorScale.setDomainFromValues(d.filter((e) => typeof e == "number" && Number.isFinite(e))), u.forEach((e, t) => {
|
|
@@ -72830,7 +73078,7 @@ var tF = ["#0d1b2a", "#4cc9f0"], nF = class {
|
|
|
72830
73078
|
});
|
|
72831
73079
|
}
|
|
72832
73080
|
_buildRegion(e, t, n) {
|
|
72833
|
-
let r = typeof t == "number" && Number.isFinite(t) ? this._colorScale.colorFor(t) : n.noDataColor, i =
|
|
73081
|
+
let r = typeof t == "number" && Number.isFinite(t) ? this._colorScale.colorFor(t) : n.noDataColor, i = iF(e.geometry), a = [];
|
|
72834
73082
|
for (let e of i) {
|
|
72835
73083
|
let t = this._buildPolygon(e, r, n);
|
|
72836
73084
|
t && a.push(t);
|
|
@@ -72839,7 +73087,7 @@ var tF = ["#0d1b2a", "#4cc9f0"], nF = class {
|
|
|
72839
73087
|
this.add(o), this._regions.push(o), this._regionColors.push(r), this._regionPolygons.push(a);
|
|
72840
73088
|
}
|
|
72841
73089
|
_buildPolygon(e, t, n) {
|
|
72842
|
-
let r =
|
|
73090
|
+
let r = fF(e);
|
|
72843
73091
|
if (r.length < 3) return null;
|
|
72844
73092
|
let i = new jv({
|
|
72845
73093
|
vertices: r.map((e) => {
|
|
@@ -72875,15 +73123,15 @@ var tF = ["#0d1b2a", "#4cc9f0"], nF = class {
|
|
|
72875
73123
|
getColorScale() {
|
|
72876
73124
|
return this._colorScale;
|
|
72877
73125
|
}
|
|
72878
|
-
},
|
|
72879
|
-
function
|
|
73126
|
+
}, dF = uF;
|
|
73127
|
+
function fF(e) {
|
|
72880
73128
|
if (e.length < 2) return e;
|
|
72881
73129
|
let t = e[0], n = e[e.length - 1];
|
|
72882
73130
|
return t[0] === n[0] && t[1] === n[1] ? e.slice(0, -1) : e;
|
|
72883
73131
|
}
|
|
72884
73132
|
//#endregion
|
|
72885
73133
|
//#region src/mobjects/geo/Globe.ts
|
|
72886
|
-
var
|
|
73134
|
+
var pF = Math.PI / 180, mF = class extends Qh {
|
|
72887
73135
|
_radius;
|
|
72888
73136
|
_center;
|
|
72889
73137
|
_sphere;
|
|
@@ -72931,9 +73179,9 @@ var oF = Math.PI / 180, sF = class extends Qh {
|
|
|
72931
73179
|
return [...this._plottedPoints];
|
|
72932
73180
|
}
|
|
72933
73181
|
arc(e, t, n = {}) {
|
|
72934
|
-
let { segments: r = 64, color: i = "#ef476f", lineWidth: a = 2, altitude: o = 0 } = n, s = this._radius * (1 + o), c =
|
|
73182
|
+
let { segments: r = 64, color: i = "#ef476f", lineWidth: a = 2, altitude: o = 0 } = n, s = this._radius * (1 + o), c = hF(e[0], e[1]), l = hF(t[0], t[1]), u = vF(c[0] * l[0] + c[1] * l[1] + c[2] * l[2], -1, 1), d = Math.acos(u), f = Math.sin(d), p = [];
|
|
72935
73183
|
for (let e = 0; e <= r; e++) {
|
|
72936
|
-
let t =
|
|
73184
|
+
let t = gF(c, l, e / r, d, f);
|
|
72937
73185
|
p.push([
|
|
72938
73186
|
this._center[0] + s * t[0],
|
|
72939
73187
|
this._center[1] + s * t[1],
|
|
@@ -72950,8 +73198,8 @@ var oF = Math.PI / 180, sF = class extends Qh {
|
|
|
72950
73198
|
}
|
|
72951
73199
|
graticule(e = {}) {
|
|
72952
73200
|
let { latStep: t = 30, lonStep: n = 30, segments: r = 48, color: i = "#8d99ae", lineWidth: a = 1 } = e, o = new Qh();
|
|
72953
|
-
for (let e = -180; e < 180; e += n) o.add(this._gridLine(
|
|
72954
|
-
for (let e = -90 + t; e < 90; e += t) o.add(this._gridLine(
|
|
73201
|
+
for (let e = -180; e < 180; e += n) o.add(this._gridLine(yF(e, r), i, a));
|
|
73202
|
+
for (let e = -90 + t; e < 90; e += t) o.add(this._gridLine(bF(e, r), i, a));
|
|
72955
73203
|
return this.add(o), o;
|
|
72956
73204
|
}
|
|
72957
73205
|
_gridLine(e, t, n) {
|
|
@@ -72963,7 +73211,7 @@ var oF = Math.PI / 180, sF = class extends Qh {
|
|
|
72963
73211
|
});
|
|
72964
73212
|
}
|
|
72965
73213
|
_surfacePoint(e, t, n) {
|
|
72966
|
-
let r =
|
|
73214
|
+
let r = hF(e, t);
|
|
72967
73215
|
return [
|
|
72968
73216
|
this._center[0] + n * r[0],
|
|
72969
73217
|
this._center[1] + n * r[1],
|
|
@@ -72971,16 +73219,16 @@ var oF = Math.PI / 180, sF = class extends Qh {
|
|
|
72971
73219
|
];
|
|
72972
73220
|
}
|
|
72973
73221
|
};
|
|
72974
|
-
function
|
|
72975
|
-
let n = e *
|
|
73222
|
+
function hF(e, t) {
|
|
73223
|
+
let n = e * pF, r = t * pF, i = Math.cos(n);
|
|
72976
73224
|
return [
|
|
72977
73225
|
i * Math.cos(r),
|
|
72978
73226
|
i * Math.sin(r),
|
|
72979
73227
|
Math.sin(n)
|
|
72980
73228
|
];
|
|
72981
73229
|
}
|
|
72982
|
-
function
|
|
72983
|
-
if (i < 1e-9) return
|
|
73230
|
+
function gF(e, t, n, r, i) {
|
|
73231
|
+
if (i < 1e-9) return _F([
|
|
72984
73232
|
e[0] + (t[0] - e[0]) * n,
|
|
72985
73233
|
e[1] + (t[1] - e[1]) * n,
|
|
72986
73234
|
e[2] + (t[2] - e[2]) * n
|
|
@@ -72992,7 +73240,7 @@ function lF(e, t, n, r, i) {
|
|
|
72992
73240
|
e[2] * a + t[2] * o
|
|
72993
73241
|
];
|
|
72994
73242
|
}
|
|
72995
|
-
function
|
|
73243
|
+
function _F(e) {
|
|
72996
73244
|
let t = Math.sqrt(e[0] * e[0] + e[1] * e[1] + e[2] * e[2]) || 1;
|
|
72997
73245
|
return [
|
|
72998
73246
|
e[0] / t,
|
|
@@ -73000,18 +73248,18 @@ function uF(e) {
|
|
|
73000
73248
|
e[2] / t
|
|
73001
73249
|
];
|
|
73002
73250
|
}
|
|
73003
|
-
function
|
|
73251
|
+
function vF(e, t, n) {
|
|
73004
73252
|
return Math.max(t, Math.min(n, e));
|
|
73005
73253
|
}
|
|
73006
|
-
function
|
|
73254
|
+
function yF(e, t) {
|
|
73007
73255
|
let n = [];
|
|
73008
73256
|
for (let r = 0; r <= t; r++) n.push([-90 + 180 * r / t, e]);
|
|
73009
73257
|
return n;
|
|
73010
73258
|
}
|
|
73011
|
-
function
|
|
73259
|
+
function bF(e, t) {
|
|
73012
73260
|
let n = [];
|
|
73013
73261
|
for (let r = 0; r <= t; r++) n.push([e, -180 + 360 * r / t]);
|
|
73014
73262
|
return n;
|
|
73015
73263
|
}
|
|
73016
73264
|
//#endregion
|
|
73017
|
-
export {
|
|
73265
|
+
export { SN as $, bE as $a, Eb as $c, Rm as $d, Lo as $f, qe as $h, KD as $i, Zv as $l, bt as $m, gA as $n, yw as $o, vn as $p, ik as $r, vS as $s, fM as $t, m_ as $u, iP as A, nD as Aa, Zb as Ac, ng as Ad, ss as Af, ft as Ah, EO as Ai, by as Al, St as Am, WA as An, qw as Ao, yr as Ap, Nk as Ar, sC as As, qM as At, mv as Au, qN as B, GE as Ba, Kb as Bc, Vh as Bd, ps as Bf, dt as Bh, QD as Bi, dy as Bl, ht as Bm, AA as Bn, Fw as Bo, Rn as Bp, wk as Br, GS as Bs, UM as Bt, P_ as Bu, yP as C, yD as Ca, px as Cc, pg as Cd, Eo as Cf, Pe as Ch, IO as Ci, By as Cl, qt as Cm, oj as Cn, iT as Co, La as Cp, Gk as Cr, mC as Cs, QM as Ct, wv as Cu, rP as D, sD as Da, lx as Dc, og as Dd, R as Df, je as Dh, OO as Di, Cy as Dl, Bt as Dm, XA as Dn, rT as Do, Tr as Dp, Ik as Dr, lC as Ds, JM as Dt, _v as Du, eP as E, uD as Ea, ux as Ec, cg as Ed, ms as Ef, Ae as Eh, jO as Ei, wy as El, xt as Em, nj as En, tT as Eo, Cr as Ep, Rk as Er, dC as Es, $M as Et, xv as Eu, tP as F, XE as Fa, Gb as Fc, Xh as Fd, cs as Ff, Qe as Fh, gO as Fi, gy as Fl, Ot as Fm, LA as Fn, kw as Fo, Nn as Fp, Ok as Fr, ZS as Fs, WM as Ft, av as Fu, zN as G, kE as Ga, Sb as Gc, Ih as Gd, ls as Gf, ct as Gh, $D as Gi, oy as Gl, Gt as Gm, wA as Gn, Pw as Go, zn as Gp, vk as Gr, FS as Gs, PM as Gt, k_ as Gu, UN as H, ME as Ha, Ab as Hc, Bh as Hd, Mo as Hf, ye as Hh, oO as Hi, ly as Hl, At as Hm, TA as Hn, Aw as Ho, Bn as Hp, Sk as Hr, VS as Hs, jM as Ht, M_ as Hu, nP as I, YE as Ia, Jb as Ic, Zh as Id, ts as If, P as Ih, yO as Ii, hy as Il, Kt as Im, PA as In, jw as Io, In as Ip, jk as Ir, nC as Is, MM as It, ev as Iu, _N as J, OE as Ja, Pb as Jc, Lh as Jd, wo as Jf, at as Jh, UD as Ji, ey as Jl, It as Jm, _A as Jn, Cw as Jo, hn as Jp, gk as Jr, PS as Js, SM as Jt, E_ as Ju, uN as K, CE as Ka, Cb as Kc, Ph as Kd, ns as Kf, rt as Kh, tO as Ki, iy as Kl, gt as Km, xA as Kn, Rw as Ko, a as Kp, yk as Kr, LS as Ks, LM as Kt, O_ as Ku, WN as L, QE as La, Yb as Lc, Yh as Ld, Oo as Lf, $e as Lh, cO as Li, _y as Ll, kt as Lm, FA as Ln, Vw as Lo, Fn as Lp, Ak as Lr, XS as Ls, NM as Lt, Q_ as Lu, YN as M, eD as Ma, $b as Mc, eg as Md, rs as Mf, ut as Mh, CO as Mi, xy as Ml, _t as Mm, RA as Mn, Jw as Mo, _r as Mp, Fk as Mr, aC as Ms, AM as Mt, fv as Mu, hP as N, JE as Na, ex as Nc, $h as Nd, ko as Nf, mt as Nh, hO as Ni, Dy as Nl, jt as Nm, VA as Nn, Xw as No, Sr as Np, Pk as Nr, iC as Ns, zM as Nt, sv as Nu, JN as O, iD as Oa, cx as Oc, sg as Od, ds as Of, Me as Oh, kO as Oi, Ey as Ol, Ht as Om, $A as On, aT as Oo, wr as Op, zk as Or, uC as Os, YM as Ot, vv as Ou, mP as P, ZE as Pa, Vb as Pc, Qh as Pd, as as Pf, nt as Ph, vO as Pi, my as Pl, Lt as Pm, IA as Pn, zw as Po, vr as Pp, kk as Pr, rC as Ps, BM as Pt, nv as Pu, wN as Q, xE as Qa, Mb as Qc, Hm as Qd, qo as Qf, Ke as Qh, WD as Qi, Qv as Ql, yt as Qm, hA as Qn, bw as Qo, bn as Qp, fk as Qr, wS as Qs, hM as Qt, p_ as Qu, GN as R, $E as Ra, Hb as Rc, Gh as Rd, ys as Rf, et as Rh, iO as Ri, py as Rl, Tt as Rm, MA as Rn, Nw as Ro, Ln as Rp, Tk as Rr, qS as Rs, VM as Rt, H_ as Ru, xP as S, vD as Sa, yx as Sc, mg as Sd, jo as Sf, ue as Sh, NO as Si, zy as Sl, Ft as Sm, uj as Sn, nT as So, Na as Sp, Kk as Sr, gC as Ss, gN as St, Sv as Su, CP as T, mD as Ta, dx as Tc, dg as Td, Ts as Tf, ke as Th, AO as Ti, Ly as Tl, Ct as Tm, tj as Tn, $w as To, kr as Tp, Jk as Tr, fC as Ts, tN as Tt, Cv as Tu, VN as U, AE as Ua, wb as Uc, zh as Ud, Ao as Uf, Ne as Uh, aO as Ui, sy as Ul, Pt as Um, EA as Un, Mw as Uo, Mn as Up, bk as Ur, RS as Us, HM as Ut, L_ as Uu, HN as V, LE as Va, Wb as Vc, Hh as Vd, ws as Vf, lt as Vh, eO as Vi, cy as Vl, Ut as Vm, jA as Vn, Bw as Vo, Vn as Vp, Ck as Vr, WS as Vs, RM as Vt, R_ as Vu, BN as W, DE as Wa, Tb as Wc, Wh as Wd, os as Wf, Ze as Wh, rO as Wi, ry as Wl, Wt as Wm, CA as Wn, Hw as Wo, Pn as Wp, xk as Wr, zS as Ws, IM as Wt, j_ as Wu, TN as X, EE as Xa, Ob as Xc, Nh as Xd, Yo as Xf, st as Xh, XD as Xi, ty as Xl, Nt as Xm, vA as Xn, Tw as Xo, yn as Xp, mk as Xr, MS as Xs, DM as Xt, x_ as Xu, jN as Y, TE as Ya, kb as Yc, Fh as Yd, Xo as Yf, ot as Yh, GD as Yi, ny as Yl, Mt as Ym, yA as Yn, ww as Yo, wn as Yp, hk as Yr, NS as Ys, CM as Yt, D_ as Yu, bN as Z, SE as Za, Nb as Zc, sh as Zd, Bo as Zf, N as Zh, qD as Zi, $v as Zl, vt as Zm, bA as Zn, xw as Zo, gn as Zp, pk as Zr, CS as Zs, OM as Zt, h_ as Zu, AP as _, DD as _a, Sx as _c, hg as _d, Do as _f, pe as _h, zO as _i, ky as _l, on as _m, Sj as _n, fT as _o, co as _p, Qk as _r, SC as _s, mN as _t, Mv as _u, oF as a, RD as aa, dS as ac, Ng as ad, lm as af, Ce as ag, ve as ah, lk as ai, pb as al, ln as am, Kj as an, BT as ao, Qo as ap, uA as ar, rw as as, EN as at, Uv as au, TP as b, bD as ba, _x as bc, gg as bd, fs as bf, le as bh, RO as bi, Py as bl, nn as bm, xj as bn, Qw as bo, Ua as bp, Uk as br, vC as bs, MN as bt, Dv as bu, tF as c, jD as ca, tS as cc, Ag as cd, Qp as cf, Ee as cg, xe as ch, XO as ci, db as cl, Yt as cm, Bj as cn, OT as co, Fo as cp, aA as cr, QC as cs, NN as ct, Bv as cu, nF as d, ND as da, $x as dc, Cg as dd, Hp as df, Fe as dg, Ge as dh, tk as di, nb as dl, Zt as dm, zj as dn, _T as do, vo as dp, rA as dr, BC as ds, cN as dt, Lv as du, ZD as ea, hS as ec, l_ as ed, Im as ef, Je as eg, de as eh, ok as ei, bb as el, _n as em, mM as en, iE as eo, Io as ep, pA as er, Sw as es, oN as et, Xv as eu, IP as f, MD as fa, Yx as fc, kg as fd, Os as ff, Ie as fg, Be as fh, ek as fi, $y as fl, sn as fm, Rj as fn, yT as fo, yo as fp, Zk as fr, TC as fs, CN as ft, Iv as fu, jP as g, ED as ga, Tx as gc, vg as gd, Ro as gf, We as gh, WO as gi, eb as gl, Jt as gm, Ej as gn, dT as go, Co as gp, iA as gr, xC as gs, fN as gt, Nv as gu, PP as h, PD as ha, Vx as hc, Og as hd, Vo as hf, M as hg, Ue as hh, UO as hi, Xy as hl, $t as hm, Tj as hn, pT as ho, xo as hp, Xk as hr, CC as hs, pN as ht, jv as hu, lF as i, VD as ia, uS as ic, Pg as id, cm as if, Se as ig, _e as ih, sk as ii, hb as il, dn as im, qj as in, nE as io, $o as ip, lA as ir, cw as is, DN as it, qv as iu, ZN as j, tD as ja, Xb as jc, tg as jd, us as jf, fe as jh, SO as ji, Sy as jl, zt as jm, KA as jn, Yw as jo, xr as jp, Mk as jr, oC as js, kM as jt, dv as ju, XN as k, rD as ka, Qb as kc, rg as kd, is as kf, k as kh, TO as ki, Ty as kl, Vt as km, ZA as kn, sT as ko, br as kp, Lk as kr, cC as ks, ZM as kt, pv as ku, rF as l, kD as la, nS as lc, Eg as ld, Kp as lf, E as lg, pt as lh, $O as li, rb as ll, tn as lm, Wj as ln, vT as lo, Ko as lp, oA as lr, KC as ls, dN as lt, zv as lu, NP as m, ID as ma, Jx as mc, wg as md, z as mf, Re as mg, He as mh, nk as mi, Qy as ml, en as mm, Dj as mn, mT as mo, So as mp, $k as mr, EC as ms, hN as mt, Fv as mu, uF as n, LD as na, _S as nc, c_ as nd, sm as nf, Xe as ng, he as nh, uk as ni, Db as nl, mn as nm, lM as nn, tE as no, To as np, dA as nr, fw as ns, yN as nt, Jv as nu, sF as o, BD as oa, sS as oc, Mg as od, im as of, we as og, j as oh, dk as oi, mb as ol, fn as om, Vj as on, MT as oo, Go as op, sA as or, aw as os, aN as ot, Hv as ou, FP as p, AD as pa, qx as pc, Dg as pd, Es as pf, Le as pg, Ve as ph, rk as pi, Zy as pl, cn as pm, Lj as pn, bT as po, bo as pp, tA as pr, wC as ps, xN as pt, Pv as pu, vN as q, wE as qa, xb as qc, Mh as qd, Zo as qf, it as qh, sO as qi, ay as ql, Dt as qm, SA as qn, Iw as qo, Cn as qp, _k as qr, IS as qs, wM as qt, T_ as qu, dF as r, zD as ra, gS as rc, a_ as rd, um as rf, De as rg, ge as rh, ak as ri, gb as rl, Sn as rm, aM as rn, eE as ro, es as rp, fA as rr, dw as rs, FN as rt, Wv as ru, iF as s, HD as sa, oS as sc, jg as sd, Jp as sf, Te as sg, me as sh, ZO as si, fb as sl, Xt as sm, Hj as sn, NT as so, zo as sp, cA as sr, ew as ss, sN as st, Vv as su, mF as t, JD as ta, pS as tc, u_ as td, hm as tf, Ye as tg, be as th, ck as ti, Fb as tl, xn as tm, pM as tn, rE as to, Wo as tp, mA as tr, vw as ts, ON as tt, Yv as tu, eF as u, FD as ua, iS as uc, Tg as ud, Wp as uf, ze as ug, A as uh, QO as ui, tb as ul, Qt as um, Gj as un, gT as uo, Jo as up, Yk as ur, GC as us, lN as ut, Rv as uu, SP as v, wD as va, bx as vc, ug as vd, vs as vf, D as vh, LO as vi, Fy as vl, an as vm, Cj as vn, uT as vo, L as vp, nA as vr, yC as vs, kN as vt, Av as vu, wP as w, gD as wa, fx as wc, fg as wd, bs as wf, Oe as wh, PO as wi, Ry as wl, wt as wm, sj as wn, oT as wo, Bi as wp, qk as wr, pC as ws, eN as wt, Ev as wu, vP as x, xD as xa, gx as xc, lg as xd, Cs as xf, O as xh, FO as xi, Ny as xl, Et as xm, lj as xn, eT as xo, Pa as xp, Wk as xr, hC as xs, PN as xt, Tv as xu, bP as y, TD as ya, vx as yc, _g as yd, Po as yf, ce as yh, BO as yi, Iy as yl, rn as ym, yj as yn, cT as yo, I as yp, eA as yr, bC as ys, AN as yt, kv as yu, KN as z, qE as za, Ub as zc, Uh as zd, No as zf, tt as zh, nO as zi, fy as zl, Rt as zm, NA as zn, Lw as zo, Hn as zp, Ek as zr, KS as zs, FM as zt, V_ as zu };
|