@rive-app/canvas-lite 2.29.0 → 2.29.2
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/package.json +1 -1
- package/rive.d.ts +1 -0
- package/rive.js +218 -209
- package/rive.js.map +1 -1
- package/rive.wasm +0 -0
- package/rive_advanced.mjs.d.ts +1 -0
- package/rive_fallback.wasm +0 -0
package/rive.js
CHANGED
|
@@ -176,26 +176,26 @@ const fa = "createConicGradient createImageData createLinearGradient createPatte
|
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
178
|
}
|
|
179
|
-
q = new Proxy(q, {get(
|
|
180
|
-
if (
|
|
181
|
-
if (n || (console.error("Cannot render the mesh because the GL Context was lost. Tried to invoke ", v), n = !0), "function" === typeof
|
|
179
|
+
q = new Proxy(q, {get(E, v) {
|
|
180
|
+
if (E.isContextLost()) {
|
|
181
|
+
if (n || (console.error("Cannot render the mesh because the GL Context was lost. Tried to invoke ", v), n = !0), "function" === typeof E[v]) {
|
|
182
182
|
return function() {
|
|
183
183
|
};
|
|
184
184
|
}
|
|
185
185
|
} else {
|
|
186
|
-
return "function" === typeof
|
|
187
|
-
return
|
|
188
|
-
} :
|
|
186
|
+
return "function" === typeof E[v] ? function(...I) {
|
|
187
|
+
return E[v].apply(E, I);
|
|
188
|
+
} : E[v];
|
|
189
189
|
}
|
|
190
|
-
}, set(
|
|
191
|
-
if (
|
|
190
|
+
}, set(E, v, I) {
|
|
191
|
+
if (E.isContextLost()) {
|
|
192
192
|
n || (console.error("Cannot render the mesh because the GL Context was lost. Tried to set property " + v), n = !0);
|
|
193
193
|
} else {
|
|
194
|
-
return
|
|
194
|
+
return E[v] = I, !0;
|
|
195
195
|
}
|
|
196
196
|
},});
|
|
197
197
|
d = Math.min(q.getParameter(q.MAX_RENDERBUFFER_SIZE), q.getParameter(q.MAX_TEXTURE_SIZE));
|
|
198
|
-
function
|
|
198
|
+
function F(E, v, I) {
|
|
199
199
|
v = q.createShader(v);
|
|
200
200
|
q.shaderSource(v, I);
|
|
201
201
|
q.compileShader(v);
|
|
@@ -203,11 +203,11 @@ const fa = "createConicGradient createImageData createLinearGradient createPatte
|
|
|
203
203
|
if (0 < (I || "").length) {
|
|
204
204
|
throw I;
|
|
205
205
|
}
|
|
206
|
-
q.attachShader(
|
|
206
|
+
q.attachShader(E, v);
|
|
207
207
|
}
|
|
208
208
|
g = q.createProgram();
|
|
209
|
-
|
|
210
|
-
|
|
209
|
+
F(g, q.VERTEX_SHADER, "attribute vec2 vertex;\n attribute vec2 uv;\n uniform vec4 mat;\n uniform vec2 translate;\n varying vec2 st;\n void main() {\n st = uv;\n gl_Position = vec4(mat2(mat) * vertex + translate, 0, 1);\n }");
|
|
210
|
+
F(g, q.FRAGMENT_SHADER, "precision highp float;\n uniform sampler2D image;\n varying vec2 st;\n void main() {\n gl_FragColor = texture2D(image, st);\n }");
|
|
211
211
|
q.bindAttribLocation(g, 0, "vertex");
|
|
212
212
|
q.bindAttribLocation(g, 1, "uv");
|
|
213
213
|
q.linkProgram(g);
|
|
@@ -254,7 +254,7 @@ const fa = "createConicGradient createImageData createLinearGradient createPatte
|
|
|
254
254
|
return r;
|
|
255
255
|
};
|
|
256
256
|
const l = new da(8), t = new da(8), w = new da(10), x = new da(10);
|
|
257
|
-
this.Qa = function(g, r, q,
|
|
257
|
+
this.Qa = function(g, r, q, F, E) {
|
|
258
258
|
if (b()) {
|
|
259
259
|
var v = l.push(g), I = t.push(r);
|
|
260
260
|
if (a.canvas) {
|
|
@@ -266,43 +266,43 @@ const fa = "createConicGradient createImageData createLinearGradient createPatte
|
|
|
266
266
|
a.clearColor(0, 0, 0, 0);
|
|
267
267
|
a.clear(a.COLOR_BUFFER_BIT);
|
|
268
268
|
a.enable(a.SCISSOR_TEST);
|
|
269
|
-
q.sort((C,
|
|
270
|
-
v = w.push(
|
|
269
|
+
q.sort((C, Y) => Y.Ba - C.Ba);
|
|
270
|
+
v = w.push(F);
|
|
271
271
|
m != v && (a.bufferData(a.ARRAY_BUFFER, 8 * v, a.DYNAMIC_DRAW), m = v);
|
|
272
272
|
v = 0;
|
|
273
273
|
for (var O of q) {
|
|
274
274
|
a.bufferSubData(a.ARRAY_BUFFER, v, O.ia), v += 4 * O.ia.length;
|
|
275
275
|
}
|
|
276
|
-
console.assert(v == 4 *
|
|
277
|
-
for (var
|
|
278
|
-
a.bufferSubData(a.ARRAY_BUFFER, v,
|
|
276
|
+
console.assert(v == 4 * F);
|
|
277
|
+
for (var Z of q) {
|
|
278
|
+
a.bufferSubData(a.ARRAY_BUFFER, v, Z.Ea), v += 4 * Z.Ea.length;
|
|
279
279
|
}
|
|
280
|
-
console.assert(v == 8 *
|
|
281
|
-
v = x.push(
|
|
280
|
+
console.assert(v == 8 * F);
|
|
281
|
+
v = x.push(E);
|
|
282
282
|
k != v && (a.bufferData(a.ELEMENT_ARRAY_BUFFER, 2 * v, a.DYNAMIC_DRAW), k = v);
|
|
283
283
|
O = 0;
|
|
284
284
|
for (var ia of q) {
|
|
285
285
|
a.bufferSubData(a.ELEMENT_ARRAY_BUFFER, O, ia.indices), O += 2 * ia.indices.length;
|
|
286
286
|
}
|
|
287
|
-
console.assert(O == 2 *
|
|
287
|
+
console.assert(O == 2 * E);
|
|
288
288
|
ia = 0;
|
|
289
|
-
|
|
289
|
+
Z = !0;
|
|
290
290
|
v = O = 0;
|
|
291
291
|
for (const C of q) {
|
|
292
292
|
C.image.da != ia && (a.bindTexture(a.TEXTURE_2D, C.image.ca || null), ia = C.image.da);
|
|
293
|
-
C.hb ? (a.scissor(C.na, I - C.oa - C.va, C.sb, C.va),
|
|
293
|
+
C.hb ? (a.scissor(C.na, I - C.oa - C.va, C.sb, C.va), Z = !0) : Z && (a.scissor(0, I - r, g, r), Z = !1);
|
|
294
294
|
q = 2 / g;
|
|
295
|
-
const
|
|
296
|
-
a.uniform4f(e, C.N[0] * q * C.X, C.N[1] *
|
|
297
|
-
a.uniform2f(f, C.N[4] * q * C.X + q * (C.na - C.fb * C.X) - 1, C.N[5] *
|
|
295
|
+
const Y = -2 / r;
|
|
296
|
+
a.uniform4f(e, C.N[0] * q * C.X, C.N[1] * Y * C.Y, C.N[2] * q * C.X, C.N[3] * Y * C.Y);
|
|
297
|
+
a.uniform2f(f, C.N[4] * q * C.X + q * (C.na - C.fb * C.X) - 1, C.N[5] * Y * C.Y + Y * (C.oa - C.gb * C.Y) + 1);
|
|
298
298
|
a.vertexAttribPointer(0, 2, a.FLOAT, !1, 0, v);
|
|
299
|
-
a.vertexAttribPointer(1, 2, a.FLOAT, !1, 0, v + 4 *
|
|
299
|
+
a.vertexAttribPointer(1, 2, a.FLOAT, !1, 0, v + 4 * F);
|
|
300
300
|
a.drawElements(a.TRIANGLES, C.indices.length, a.UNSIGNED_SHORT, O);
|
|
301
301
|
v += 4 * C.ia.length;
|
|
302
302
|
O += 2 * C.indices.length;
|
|
303
303
|
}
|
|
304
|
-
console.assert(v == 4 *
|
|
305
|
-
console.assert(O == 2 *
|
|
304
|
+
console.assert(v == 4 * F);
|
|
305
|
+
console.assert(O == 2 * E);
|
|
306
306
|
}
|
|
307
307
|
}
|
|
308
308
|
};
|
|
@@ -351,14 +351,14 @@ h.onRuntimeInitialized = function() {
|
|
|
351
351
|
return "rgba(" + ((16711680 & p) >>> 16) + "," + ((65280 & p) >>> 8) + "," + ((255 & p) >>> 0) + "," + ((4278190080 & p) >>> 24) / 255 + ")";
|
|
352
352
|
}
|
|
353
353
|
function c() {
|
|
354
|
-
0 < I.length && (ha.Qa(v.drawWidth(), v.drawHeight(), I, O,
|
|
355
|
-
for (const p of
|
|
354
|
+
0 < I.length && (ha.Qa(v.drawWidth(), v.drawHeight(), I, O, Z), I = [], Z = O = 0, v.reset(512, 512));
|
|
355
|
+
for (const p of E) {
|
|
356
356
|
for (const u of p.u) {
|
|
357
357
|
u();
|
|
358
358
|
}
|
|
359
359
|
p.u = [];
|
|
360
360
|
}
|
|
361
|
-
|
|
361
|
+
E.clear();
|
|
362
362
|
}
|
|
363
363
|
la && la();
|
|
364
364
|
var d = h.RenderPaintStyle;
|
|
@@ -390,28 +390,28 @@ h.onRuntimeInitialized = function() {
|
|
|
390
390
|
this.F = new Path2D();
|
|
391
391
|
}, rewind:function() {
|
|
392
392
|
this.F = new Path2D();
|
|
393
|
-
}, addPath:function(p, u, A,
|
|
394
|
-
var H = this.F,
|
|
393
|
+
}, addPath:function(p, u, A, D, y, B, G) {
|
|
394
|
+
var H = this.F, V = H.addPath;
|
|
395
395
|
p = p.F;
|
|
396
|
-
const
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
396
|
+
const M = new DOMMatrix();
|
|
397
|
+
M.a = u;
|
|
398
|
+
M.b = A;
|
|
399
|
+
M.c = D;
|
|
400
|
+
M.d = y;
|
|
401
|
+
M.e = B;
|
|
402
|
+
M.f = G;
|
|
403
|
+
V.call(H, p, M);
|
|
404
404
|
}, fillRule:function(p) {
|
|
405
405
|
this.ka = p;
|
|
406
406
|
}, moveTo:function(p, u) {
|
|
407
407
|
this.F.moveTo(p, u);
|
|
408
408
|
}, lineTo:function(p, u) {
|
|
409
409
|
this.F.lineTo(p, u);
|
|
410
|
-
}, cubicTo:function(p, u, A,
|
|
411
|
-
this.F.bezierCurveTo(p, u, A,
|
|
410
|
+
}, cubicTo:function(p, u, A, D, y, B) {
|
|
411
|
+
this.F.bezierCurveTo(p, u, A, D, y, B);
|
|
412
412
|
}, close:function() {
|
|
413
413
|
this.F.closePath();
|
|
414
|
-
},}),
|
|
414
|
+
},}), F = f.extend("CanvasRenderPaint", {color:function(p) {
|
|
415
415
|
this.ma = a(p);
|
|
416
416
|
}, thickness:function(p) {
|
|
417
417
|
this.Ja = p;
|
|
@@ -443,31 +443,31 @@ h.onRuntimeInitialized = function() {
|
|
|
443
443
|
this.Fa = b(p);
|
|
444
444
|
}, clearGradient:function() {
|
|
445
445
|
this.P = null;
|
|
446
|
-
}, linearGradient:function(p, u, A,
|
|
447
|
-
this.P = {Ca:p, Da:u, qa:A, ra:
|
|
448
|
-
}, radialGradient:function(p, u, A,
|
|
449
|
-
this.P = {Ca:p, Da:u, qa:A, ra:
|
|
446
|
+
}, linearGradient:function(p, u, A, D) {
|
|
447
|
+
this.P = {Ca:p, Da:u, qa:A, ra:D, ga:[],};
|
|
448
|
+
}, radialGradient:function(p, u, A, D) {
|
|
449
|
+
this.P = {Ca:p, Da:u, qa:A, ra:D, ga:[], bb:!0,};
|
|
450
450
|
}, addStop:function(p, u) {
|
|
451
451
|
this.P.ga.push({color:p, stop:u,});
|
|
452
452
|
}, completeGradient:function() {
|
|
453
453
|
}, draw:function(p, u, A) {
|
|
454
|
-
let
|
|
455
|
-
var y = this.ma,
|
|
454
|
+
let D = this.Ia;
|
|
455
|
+
var y = this.ma, B = this.P;
|
|
456
456
|
p.globalCompositeOperation = this.Fa;
|
|
457
|
-
if (null !=
|
|
458
|
-
y =
|
|
459
|
-
var
|
|
460
|
-
const
|
|
461
|
-
var H =
|
|
462
|
-
const
|
|
463
|
-
|
|
464
|
-
for (let
|
|
465
|
-
|
|
457
|
+
if (null != B) {
|
|
458
|
+
y = B.Ca;
|
|
459
|
+
var G = B.Da;
|
|
460
|
+
const V = B.qa;
|
|
461
|
+
var H = B.ra;
|
|
462
|
+
const M = B.ga;
|
|
463
|
+
B.bb ? (B = V - y, H -= G, y = p.createRadialGradient(y, G, 0, y, G, Math.sqrt(B * B + H * H))) : y = p.createLinearGradient(y, G, V, H);
|
|
464
|
+
for (let T = 0, N = M.length; T < N; T++) {
|
|
465
|
+
G = M[T], y.addColorStop(G.stop, a(G.color));
|
|
466
466
|
}
|
|
467
467
|
this.ma = y;
|
|
468
468
|
this.P = null;
|
|
469
469
|
}
|
|
470
|
-
switch(
|
|
470
|
+
switch(D) {
|
|
471
471
|
case w:
|
|
472
472
|
p.strokeStyle = y;
|
|
473
473
|
p.lineWidth = this.Ja;
|
|
@@ -479,8 +479,8 @@ h.onRuntimeInitialized = function() {
|
|
|
479
479
|
p.fillStyle = y, p.fill(u, A);
|
|
480
480
|
}
|
|
481
481
|
},});
|
|
482
|
-
const
|
|
483
|
-
let v = null, I = [], O = 0,
|
|
482
|
+
const E = new Set();
|
|
483
|
+
let v = null, I = [], O = 0, Z = 0;
|
|
484
484
|
var ia = h.CanvasRenderer = m.extend("Renderer", {__construct:function(p) {
|
|
485
485
|
this.__parent.__construct.call(this);
|
|
486
486
|
this.D = [1, 0, 0, 1, 0, 0];
|
|
@@ -497,71 +497,72 @@ h.onRuntimeInitialized = function() {
|
|
|
497
497
|
}
|
|
498
498
|
this.D.splice(p);
|
|
499
499
|
this.u.push(this.o.restore.bind(this.o));
|
|
500
|
-
}, transform:function(p, u, A,
|
|
501
|
-
const
|
|
502
|
-
|
|
503
|
-
this.u.push(this.o.transform.bind(this.o, p, u, A,
|
|
500
|
+
}, transform:function(p, u, A, D, y, B) {
|
|
501
|
+
const G = this.D, H = G.length - 6;
|
|
502
|
+
G.splice(H, 6, G[H] * p + G[H + 2] * u, G[H + 1] * p + G[H + 3] * u, G[H] * A + G[H + 2] * D, G[H + 1] * A + G[H + 3] * D, G[H] * y + G[H + 2] * B + G[H + 4], G[H + 1] * y + G[H + 3] * B + G[H + 5]);
|
|
503
|
+
this.u.push(this.o.transform.bind(this.o, p, u, A, D, y, B));
|
|
504
504
|
}, rotate:function(p) {
|
|
505
505
|
const u = Math.sin(p);
|
|
506
506
|
p = Math.cos(p);
|
|
507
507
|
this.transform(p, u, -u, p, 0, 0);
|
|
508
508
|
}, _drawPath:function(p, u) {
|
|
509
509
|
this.u.push(u.draw.bind(u, this.o, p.F, p.ka === x ? "evenodd" : "nonzero"));
|
|
510
|
-
}, _drawRiveImage:function(p, u, A) {
|
|
511
|
-
var
|
|
512
|
-
if (
|
|
513
|
-
var
|
|
510
|
+
}, _drawRiveImage:function(p, u, A, D) {
|
|
511
|
+
var y = p.Ga;
|
|
512
|
+
if (y) {
|
|
513
|
+
var B = this.o, G = b(A);
|
|
514
514
|
this.u.push(function() {
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
515
|
+
B.globalCompositeOperation = G;
|
|
516
|
+
B.globalAlpha = D;
|
|
517
|
+
B.drawImage(y, 0, 0);
|
|
518
|
+
B.globalAlpha = 1;
|
|
519
519
|
});
|
|
520
520
|
}
|
|
521
521
|
}, _getMatrix:function(p) {
|
|
522
522
|
const u = this.D, A = u.length - 6;
|
|
523
|
-
for (let
|
|
524
|
-
p[
|
|
523
|
+
for (let D = 0; 6 > D; ++D) {
|
|
524
|
+
p[D] = u[A + D];
|
|
525
525
|
}
|
|
526
|
-
}, _drawImageMesh:function(p, u, A,
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
526
|
+
}, _drawImageMesh:function(p, u, A, D, y, B, G, H, V, M, T) {
|
|
527
|
+
u = this.o.canvas.width;
|
|
528
|
+
var N = this.o.canvas.height;
|
|
529
|
+
const tb = M - H, ub = T - V;
|
|
530
530
|
H = Math.max(H, 0);
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
531
|
+
V = Math.max(V, 0);
|
|
532
|
+
M = Math.min(M, u);
|
|
533
|
+
T = Math.min(T, N);
|
|
534
|
+
const wa = M - H, xa = T - V;
|
|
535
|
+
console.assert(wa <= Math.min(tb, u));
|
|
535
536
|
console.assert(xa <= Math.min(ub, N));
|
|
536
537
|
if (!(0 >= wa || 0 >= xa)) {
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
var ja = Math.ceil(wa *
|
|
538
|
+
M = wa < tb || xa < ub;
|
|
539
|
+
u = T = 1;
|
|
540
|
+
var ja = Math.ceil(wa * T), ka = Math.ceil(xa * u);
|
|
540
541
|
N = ha.eb();
|
|
541
|
-
ja > N && (
|
|
542
|
-
ka > N && (
|
|
542
|
+
ja > N && (T *= N / ja, ja = N);
|
|
543
|
+
ka > N && (u *= N / ka, ka = N);
|
|
543
544
|
v || (v = new h.DynamicRectanizer(N), v.reset(512, 512));
|
|
544
545
|
N = v.addRect(ja, ka);
|
|
545
|
-
0 > N && (c(),
|
|
546
|
+
0 > N && (c(), E.add(this), N = v.addRect(ja, ka), console.assert(0 <= N));
|
|
546
547
|
var vb = N & 65535, wb = N >> 16;
|
|
547
|
-
I.push({N:this.D.slice(this.D.length - 6), image:p, na:vb, oa:wb, fb:
|
|
548
|
-
O +=
|
|
549
|
-
|
|
550
|
-
var pa = this.o, oc = b(
|
|
548
|
+
I.push({N:this.D.slice(this.D.length - 6), image:p, na:vb, oa:wb, fb:H, gb:V, sb:ja, va:ka, X:T, Y:u, ia:new Float32Array(y), Ea:new Float32Array(B), indices:new Uint16Array(G), hb:M, Ba:p.da << 1 | (M ? 1 : 0),});
|
|
549
|
+
O += y.length;
|
|
550
|
+
Z += G.length;
|
|
551
|
+
var pa = this.o, oc = b(A);
|
|
551
552
|
this.u.push(function() {
|
|
552
553
|
pa.save();
|
|
553
554
|
pa.resetTransform();
|
|
554
555
|
pa.globalCompositeOperation = oc;
|
|
555
|
-
pa.globalAlpha =
|
|
556
|
+
pa.globalAlpha = D;
|
|
556
557
|
const xb = ha.canvas();
|
|
557
|
-
xb && pa.drawImage(xb, vb, wb, ja, ka,
|
|
558
|
+
xb && pa.drawImage(xb, vb, wb, ja, ka, H, V, wa, xa);
|
|
558
559
|
pa.restore();
|
|
559
560
|
});
|
|
560
561
|
}
|
|
561
562
|
}, _clipPath:function(p) {
|
|
562
563
|
this.u.push(this.o.clip.bind(this.o, p.F, p.ka === x ? "evenodd" : "nonzero"));
|
|
563
564
|
}, clear:function() {
|
|
564
|
-
|
|
565
|
+
E.add(this);
|
|
565
566
|
this.u.push(this.o.clearRect.bind(this.o, 0, 0, this.ja.width, this.ja.height));
|
|
566
567
|
}, flush:function() {
|
|
567
568
|
}, translate:function(p, u) {
|
|
@@ -569,25 +570,25 @@ h.onRuntimeInitialized = function() {
|
|
|
569
570
|
},});
|
|
570
571
|
h.makeRenderer = function(p) {
|
|
571
572
|
const u = new ia(p), A = u.o;
|
|
572
|
-
return new Proxy(u, {get(
|
|
573
|
-
if ("function" === typeof
|
|
574
|
-
return function(...
|
|
575
|
-
return
|
|
573
|
+
return new Proxy(u, {get(D, y) {
|
|
574
|
+
if ("function" === typeof D[y]) {
|
|
575
|
+
return function(...B) {
|
|
576
|
+
return D[y].apply(D, B);
|
|
576
577
|
};
|
|
577
578
|
}
|
|
578
579
|
if ("function" === typeof A[y]) {
|
|
579
580
|
if (-1 < fa.indexOf(y)) {
|
|
580
581
|
throw Error("RiveException: Method call to '" + y + "()' is not allowed, as the renderer cannot immediately pass through the return values of any canvas 2d context methods.");
|
|
581
582
|
}
|
|
582
|
-
return function(...
|
|
583
|
-
u.u.push(A[y].bind(A, ...
|
|
583
|
+
return function(...B) {
|
|
584
|
+
u.u.push(A[y].bind(A, ...B));
|
|
584
585
|
};
|
|
585
586
|
}
|
|
586
|
-
return
|
|
587
|
-
}, set(
|
|
587
|
+
return D[y];
|
|
588
|
+
}, set(D, y, B) {
|
|
588
589
|
if (y in A) {
|
|
589
590
|
return u.u.push(() => {
|
|
590
|
-
A[y] =
|
|
591
|
+
A[y] = B;
|
|
591
592
|
}), !0;
|
|
592
593
|
}
|
|
593
594
|
},});
|
|
@@ -596,11 +597,11 @@ h.onRuntimeInitialized = function() {
|
|
|
596
597
|
(new r({R:u})).decode(p);
|
|
597
598
|
};
|
|
598
599
|
h.renderFactory = {makeRenderPaint:function() {
|
|
599
|
-
return new
|
|
600
|
+
return new F();
|
|
600
601
|
}, makeRenderPath:function() {
|
|
601
602
|
return new q();
|
|
602
603
|
}, makeRenderImage:function() {
|
|
603
|
-
let p =
|
|
604
|
+
let p = Y;
|
|
604
605
|
return new r({W:() => {
|
|
605
606
|
p.total++;
|
|
606
607
|
}, R:() => {
|
|
@@ -611,23 +612,23 @@ h.onRuntimeInitialized = function() {
|
|
|
611
612
|
}
|
|
612
613
|
},});
|
|
613
614
|
},};
|
|
614
|
-
let C = h.load,
|
|
615
|
+
let C = h.load, Y = null;
|
|
615
616
|
h.load = function(p, u, A = !0) {
|
|
616
|
-
const
|
|
617
|
-
void 0 !== u &&
|
|
618
|
-
A && (u = new h.CDNFileAssetLoader(),
|
|
617
|
+
const D = new h.FallbackFileAssetLoader();
|
|
618
|
+
void 0 !== u && D.addLoader(u);
|
|
619
|
+
A && (u = new h.CDNFileAssetLoader(), D.addLoader(u));
|
|
619
620
|
return new Promise(function(y) {
|
|
620
|
-
let
|
|
621
|
-
|
|
622
|
-
y(
|
|
621
|
+
let B = null;
|
|
622
|
+
Y = {total:0, loaded:0, ready:function() {
|
|
623
|
+
y(B);
|
|
623
624
|
},};
|
|
624
|
-
|
|
625
|
-
0 ==
|
|
625
|
+
B = C(p, D);
|
|
626
|
+
0 == Y.total && y(B);
|
|
626
627
|
});
|
|
627
628
|
};
|
|
628
629
|
let pc = h.RendererWrapper.prototype.align;
|
|
629
|
-
h.RendererWrapper.prototype.align = function(p, u, A,
|
|
630
|
-
pc.call(this, p, u, A,
|
|
630
|
+
h.RendererWrapper.prototype.align = function(p, u, A, D, y = 1.0) {
|
|
631
|
+
pc.call(this, p, u, A, D, y);
|
|
631
632
|
};
|
|
632
633
|
d = new ca();
|
|
633
634
|
h.requestAnimationFrame = d.requestAnimationFrame.bind(d);
|
|
@@ -667,15 +668,15 @@ var ya;
|
|
|
667
668
|
h.wasmBinary && (ya = h.wasmBinary);
|
|
668
669
|
var noExitRuntime = h.noExitRuntime || !0;
|
|
669
670
|
"object" != typeof WebAssembly && za("no native wasm support detected");
|
|
670
|
-
var Aa, z, Ba = !1, Ca, J, Da, Ea,
|
|
671
|
+
var Aa, z, Ba = !1, Ca, J, Da, Ea, K, L, Fa, Ga;
|
|
671
672
|
function Ha() {
|
|
672
673
|
var b = Aa.buffer;
|
|
673
674
|
h.HEAP8 = Ca = new Int8Array(b);
|
|
674
675
|
h.HEAP16 = Da = new Int16Array(b);
|
|
675
|
-
h.HEAP32 =
|
|
676
|
+
h.HEAP32 = K = new Int32Array(b);
|
|
676
677
|
h.HEAPU8 = J = new Uint8Array(b);
|
|
677
678
|
h.HEAPU16 = Ea = new Uint16Array(b);
|
|
678
|
-
h.HEAPU32 =
|
|
679
|
+
h.HEAPU32 = L = new Uint32Array(b);
|
|
679
680
|
h.HEAPF32 = Fa = new Float32Array(b);
|
|
680
681
|
h.HEAPF64 = Ga = new Float64Array(b);
|
|
681
682
|
}
|
|
@@ -895,10 +896,10 @@ function Eb(b) {
|
|
|
895
896
|
}
|
|
896
897
|
}
|
|
897
898
|
function Fb(b) {
|
|
898
|
-
return this.fromWireType(
|
|
899
|
+
return this.fromWireType(K[b >> 2]);
|
|
899
900
|
}
|
|
900
901
|
var Gb = {}, Hb = {};
|
|
901
|
-
function
|
|
902
|
+
function W(b, a, c) {
|
|
902
903
|
function d(k) {
|
|
903
904
|
k = c(k);
|
|
904
905
|
k.length !== b.length && Ab("Mismatched type converter count");
|
|
@@ -1075,7 +1076,7 @@ var Xb = [], Yb = b => {
|
|
|
1075
1076
|
return d;
|
|
1076
1077
|
};
|
|
1077
1078
|
};
|
|
1078
|
-
function
|
|
1079
|
+
function X(b, a) {
|
|
1079
1080
|
b = U(b);
|
|
1080
1081
|
var c = b.includes("j") ? Zb(b, a) : Yb(a);
|
|
1081
1082
|
"function" != typeof c && Q(`unknown function pointer with signature ${b}: ${a}`);
|
|
@@ -1118,8 +1119,8 @@ function bc(b, a, c, d, e) {
|
|
|
1118
1119
|
Eb(x);
|
|
1119
1120
|
} else {
|
|
1120
1121
|
for (var q = m ? 1 : 2; q < a.length; q++) {
|
|
1121
|
-
var
|
|
1122
|
-
null !== a[q].v && a[q].v(
|
|
1122
|
+
var F = 1 === q ? g : t[q - 2];
|
|
1123
|
+
null !== a[q].v && a[q].v(F);
|
|
1123
1124
|
}
|
|
1124
1125
|
}
|
|
1125
1126
|
g = n ? a[0].fromWireType(r) : void 0;
|
|
@@ -1128,7 +1129,7 @@ function bc(b, a, c, d, e) {
|
|
|
1128
1129
|
}
|
|
1129
1130
|
function cc(b, a) {
|
|
1130
1131
|
for (var c = [], d = 0; d < b; d++) {
|
|
1131
|
-
c.push(
|
|
1132
|
+
c.push(L[a + 4 * d >> 2]);
|
|
1132
1133
|
}
|
|
1133
1134
|
return c;
|
|
1134
1135
|
}
|
|
@@ -1153,7 +1154,7 @@ function fc(b, a, c) {
|
|
|
1153
1154
|
};
|
|
1154
1155
|
case 2:
|
|
1155
1156
|
return function(d) {
|
|
1156
|
-
return this.fromWireType((c ?
|
|
1157
|
+
return this.fromWireType((c ? K : L)[d >> 2]);
|
|
1157
1158
|
};
|
|
1158
1159
|
default:
|
|
1159
1160
|
throw new TypeError("Unknown integer type: " + b);
|
|
@@ -1196,9 +1197,9 @@ function hc(b, a, c) {
|
|
|
1196
1197
|
};
|
|
1197
1198
|
case 2:
|
|
1198
1199
|
return c ? function(d) {
|
|
1199
|
-
return
|
|
1200
|
+
return K[d >> 2];
|
|
1200
1201
|
} : function(d) {
|
|
1201
|
-
return
|
|
1202
|
+
return L[d >> 2];
|
|
1202
1203
|
};
|
|
1203
1204
|
default:
|
|
1204
1205
|
throw new TypeError("Unknown integer type: " + b);
|
|
@@ -1307,7 +1308,7 @@ var ic = (b, a, c, d) => {
|
|
|
1307
1308
|
return a - d;
|
|
1308
1309
|
}, rc = b => 2 * b.length, sc = (b, a) => {
|
|
1309
1310
|
for (var c = 0, d = ""; !(c >= a / 4);) {
|
|
1310
|
-
var e =
|
|
1311
|
+
var e = K[b + 4 * c >> 2];
|
|
1311
1312
|
if (0 == e) {
|
|
1312
1313
|
break;
|
|
1313
1314
|
}
|
|
@@ -1328,13 +1329,13 @@ var ic = (b, a, c, d) => {
|
|
|
1328
1329
|
var m = b.charCodeAt(++e);
|
|
1329
1330
|
f = 65536 + ((f & 1023) << 10) | m & 1023;
|
|
1330
1331
|
}
|
|
1331
|
-
|
|
1332
|
+
K[a >> 2] = f;
|
|
1332
1333
|
a += 4;
|
|
1333
1334
|
if (a + 4 > c) {
|
|
1334
1335
|
break;
|
|
1335
1336
|
}
|
|
1336
1337
|
}
|
|
1337
|
-
|
|
1338
|
+
K[a >> 2] = 0;
|
|
1338
1339
|
return a - d;
|
|
1339
1340
|
}, uc = b => {
|
|
1340
1341
|
for (var a = 0, c = 0; c < b.length; ++c) {
|
|
@@ -1356,7 +1357,7 @@ function yc(b) {
|
|
|
1356
1357
|
}
|
|
1357
1358
|
function zc(b, a) {
|
|
1358
1359
|
for (var c = Array(b), d = 0; d < b; ++d) {
|
|
1359
|
-
c[d] = nb(
|
|
1360
|
+
c[d] = nb(L[a + 4 * d >> 2], "parameter " + d);
|
|
1360
1361
|
}
|
|
1361
1362
|
return c;
|
|
1362
1363
|
}
|
|
@@ -1390,12 +1391,12 @@ var Jc = (b, a, c, d) => {
|
|
|
1390
1391
|
return e(g, r, "0");
|
|
1391
1392
|
}
|
|
1392
1393
|
function m(g, r) {
|
|
1393
|
-
function q(
|
|
1394
|
-
return 0 >
|
|
1394
|
+
function q(E) {
|
|
1395
|
+
return 0 > E ? -1 : 0 < E ? 1 : 0;
|
|
1395
1396
|
}
|
|
1396
|
-
var
|
|
1397
|
-
0 === (
|
|
1398
|
-
return
|
|
1397
|
+
var F;
|
|
1398
|
+
0 === (F = q(g.getFullYear() - r.getFullYear())) && 0 === (F = q(g.getMonth() - r.getMonth())) && (F = q(g.getDate() - r.getDate()));
|
|
1399
|
+
return F;
|
|
1399
1400
|
}
|
|
1400
1401
|
function k(g) {
|
|
1401
1402
|
switch(g.getDay()) {
|
|
@@ -1418,9 +1419,9 @@ var Jc = (b, a, c, d) => {
|
|
|
1418
1419
|
function n(g) {
|
|
1419
1420
|
var r = g.J;
|
|
1420
1421
|
for (g = new Date((new Date(g.K + 1900, 0, 1)).getTime()); 0 < r;) {
|
|
1421
|
-
var q = g.getMonth(),
|
|
1422
|
-
if (r >
|
|
1423
|
-
r -=
|
|
1422
|
+
var q = g.getMonth(), F = (Fc(g.getFullYear()) ? Gc : Hc)[q];
|
|
1423
|
+
if (r > F - g.getDate()) {
|
|
1424
|
+
r -= F - g.getDate() + 1, g.setDate(1), 11 > q ? g.setMonth(q + 1) : (g.setMonth(0), g.setFullYear(g.getFullYear() + 1));
|
|
1424
1425
|
} else {
|
|
1425
1426
|
g.setDate(g.getDate() + r);
|
|
1426
1427
|
break;
|
|
@@ -1431,8 +1432,8 @@ var Jc = (b, a, c, d) => {
|
|
|
1431
1432
|
q = k(q);
|
|
1432
1433
|
return 0 >= m(r, g) ? 0 >= m(q, g) ? g.getFullYear() + 1 : g.getFullYear() : g.getFullYear() - 1;
|
|
1433
1434
|
}
|
|
1434
|
-
var l =
|
|
1435
|
-
d = {qb:
|
|
1435
|
+
var l = K[d + 40 >> 2];
|
|
1436
|
+
d = {qb:K[d >> 2], pb:K[d + 4 >> 2], Z:K[d + 8 >> 2], ha:K[d + 12 >> 2], $:K[d + 16 >> 2], K:K[d + 20 >> 2], C:K[d + 24 >> 2], J:K[d + 28 >> 2], ub:K[d + 32 >> 2], ob:K[d + 36 >> 2], rb:l ? l ? lc(J, l) : "" : ""};
|
|
1436
1437
|
c = c ? lc(J, c) : "";
|
|
1437
1438
|
l = {"%c":"%a %b %d %H:%M:%S %Y", "%D":"%m/%d/%y", "%F":"%Y-%m-%d", "%h":"%b", "%r":"%I:%M:%S %p", "%R":"%H:%M", "%T":"%H:%M:%S", "%x":"%m/%d/%y", "%X":"%H:%M:%S", "%Ec":"%c", "%EC":"%C", "%Ex":"%m/%d/%y", "%EX":"%H:%M:%S", "%Ey":"%y", "%EY":"%Y", "%Od":"%d", "%Oe":"%e", "%OH":"%H", "%OI":"%I", "%Om":"%m", "%OM":"%M", "%OS":"%S", "%Ou":"%u", "%OU":"%U", "%OV":"%V", "%Ow":"%w", "%OW":"%W", "%Oy":"%y",};
|
|
1438
1439
|
for (var t in l) {
|
|
@@ -1654,13 +1655,13 @@ var Nc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
1654
1655
|
var a = Db[b];
|
|
1655
1656
|
delete Db[b];
|
|
1656
1657
|
var c = a.fa, d = a.H, e = a.sa, f = e.map(m => m.Ya).concat(e.map(m => m.lb));
|
|
1657
|
-
|
|
1658
|
+
W([b], f, m => {
|
|
1658
1659
|
var k = {};
|
|
1659
1660
|
e.forEach((n, l) => {
|
|
1660
1661
|
var t = m[l], w = n.Wa, x = n.Xa, g = m[l + e.length], r = n.kb, q = n.mb;
|
|
1661
|
-
k[n.Sa] = {read:
|
|
1662
|
+
k[n.Sa] = {read:F => t.fromWireType(w(x, F)), write:(F, E) => {
|
|
1662
1663
|
var v = [];
|
|
1663
|
-
r(q,
|
|
1664
|
+
r(q, F, g.toWireType(v, E));
|
|
1664
1665
|
Eb(v);
|
|
1665
1666
|
}};
|
|
1666
1667
|
});
|
|
@@ -1699,7 +1700,7 @@ var Nc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
1699
1700
|
} else if (2 === c) {
|
|
1700
1701
|
k = Da;
|
|
1701
1702
|
} else if (4 === c) {
|
|
1702
|
-
k =
|
|
1703
|
+
k = K;
|
|
1703
1704
|
} else {
|
|
1704
1705
|
throw new TypeError("Unknown boolean type size: " + a);
|
|
1705
1706
|
}
|
|
@@ -1707,24 +1708,24 @@ var Nc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
1707
1708
|
}, v:null,});
|
|
1708
1709
|
}, _embind_register_class:function(b, a, c, d, e, f, m, k, n, l, t, w, x) {
|
|
1709
1710
|
t = U(t);
|
|
1710
|
-
f =
|
|
1711
|
-
k && (k =
|
|
1712
|
-
l && (l =
|
|
1713
|
-
x =
|
|
1711
|
+
f = X(e, f);
|
|
1712
|
+
k && (k = X(m, k));
|
|
1713
|
+
l && (l = X(n, l));
|
|
1714
|
+
x = X(w, x);
|
|
1714
1715
|
var g = Ya(t);
|
|
1715
1716
|
Ob(g, function() {
|
|
1716
1717
|
ac(`Cannot construct ${t} due to unbound types`, [d]);
|
|
1717
1718
|
});
|
|
1718
|
-
|
|
1719
|
+
W([b, a, c], d ? [d] : [], function(r) {
|
|
1719
1720
|
r = r[0];
|
|
1720
1721
|
if (d) {
|
|
1721
1722
|
var q = r.h;
|
|
1722
|
-
var
|
|
1723
|
+
var F = q.B;
|
|
1723
1724
|
} else {
|
|
1724
|
-
|
|
1725
|
+
F = Mb.prototype;
|
|
1725
1726
|
}
|
|
1726
1727
|
r = Za(g, function() {
|
|
1727
|
-
if (Object.getPrototypeOf(this) !==
|
|
1728
|
+
if (Object.getPrototypeOf(this) !== E) {
|
|
1728
1729
|
throw new ab("Use 'new' to construct " + t);
|
|
1729
1730
|
}
|
|
1730
1731
|
if (void 0 === v.I) {
|
|
@@ -1736,22 +1737,22 @@ var Nc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
1736
1737
|
}
|
|
1737
1738
|
return O.apply(this, arguments);
|
|
1738
1739
|
});
|
|
1739
|
-
var
|
|
1740
|
-
r.prototype =
|
|
1741
|
-
var v = new Pb(t, r,
|
|
1740
|
+
var E = Object.create(F, {constructor:{value:r},});
|
|
1741
|
+
r.prototype = E;
|
|
1742
|
+
var v = new Pb(t, r, E, x, q, f, k, l);
|
|
1742
1743
|
v.l && (void 0 === v.l.T && (v.l.T = []), v.l.T.push(v));
|
|
1743
1744
|
q = new Vb(t, v, !0, !1);
|
|
1744
|
-
|
|
1745
|
+
F = new Vb(t + "*", v, !1, !1);
|
|
1745
1746
|
var I = new Vb(t + " const*", v, !1, !0);
|
|
1746
|
-
sb[b] = {pointerType:
|
|
1747
|
+
sb[b] = {pointerType:F, Ka:I};
|
|
1747
1748
|
Wb(g, r);
|
|
1748
|
-
return [q,
|
|
1749
|
+
return [q, F, I];
|
|
1749
1750
|
});
|
|
1750
1751
|
}, _embind_register_class_class_function:function(b, a, c, d, e, f, m) {
|
|
1751
1752
|
var k = cc(c, d);
|
|
1752
1753
|
a = U(a);
|
|
1753
|
-
f =
|
|
1754
|
-
|
|
1754
|
+
f = X(e, f);
|
|
1755
|
+
W([], [b], function(n) {
|
|
1755
1756
|
function l() {
|
|
1756
1757
|
ac(`Cannot call ${t} due to unbound types`, k);
|
|
1757
1758
|
}
|
|
@@ -1760,7 +1761,7 @@ var Nc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
1760
1761
|
a.startsWith("@@") && (a = Symbol[a.substring(2)]);
|
|
1761
1762
|
var w = n.h.constructor;
|
|
1762
1763
|
void 0 === w[a] ? (l.L = c - 1, w[a] = l) : (Nb(w, a, t), w[a].m[c - 1] = l);
|
|
1763
|
-
|
|
1764
|
+
W([], k, function(x) {
|
|
1764
1765
|
x = bc(t, [x[0], null].concat(x.slice(1)), null, f, m);
|
|
1765
1766
|
void 0 === w[a].m ? (x.L = c - 1, w[a] = x) : w[a].m[c - 1] = x;
|
|
1766
1767
|
if (n.h.T) {
|
|
@@ -1774,8 +1775,8 @@ var Nc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
1774
1775
|
});
|
|
1775
1776
|
}, _embind_register_class_class_property:function(b, a, c, d, e, f, m, k) {
|
|
1776
1777
|
a = U(a);
|
|
1777
|
-
f =
|
|
1778
|
-
|
|
1778
|
+
f = X(e, f);
|
|
1779
|
+
W([], [b], function(n) {
|
|
1779
1780
|
n = n[0];
|
|
1780
1781
|
var l = `${n.name}.${a}`, t = {get() {
|
|
1781
1782
|
ac(`Cannot access ${l} due to unbound types`, [c]);
|
|
@@ -1786,12 +1787,12 @@ var Nc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
1786
1787
|
Q(`${l} is a read-only property`);
|
|
1787
1788
|
};
|
|
1788
1789
|
Object.defineProperty(n.h.constructor, a, t);
|
|
1789
|
-
|
|
1790
|
+
W([], [c], function(w) {
|
|
1790
1791
|
w = w[0];
|
|
1791
1792
|
var x = {get() {
|
|
1792
1793
|
return w.fromWireType(f(d));
|
|
1793
1794
|
}, enumerable:!0};
|
|
1794
|
-
k && (k =
|
|
1795
|
+
k && (k = X(m, k), x.set = g => {
|
|
1795
1796
|
var r = [];
|
|
1796
1797
|
k(d, w.toWireType(r, g));
|
|
1797
1798
|
Eb(r);
|
|
@@ -1803,8 +1804,8 @@ var Nc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
1803
1804
|
});
|
|
1804
1805
|
}, _embind_register_class_constructor:function(b, a, c, d, e, f) {
|
|
1805
1806
|
var m = cc(a, c);
|
|
1806
|
-
e =
|
|
1807
|
-
|
|
1807
|
+
e = X(d, e);
|
|
1808
|
+
W([], [b], function(k) {
|
|
1808
1809
|
k = k[0];
|
|
1809
1810
|
var n = `constructor ${k.name}`;
|
|
1810
1811
|
void 0 === k.h.I && (k.h.I = []);
|
|
@@ -1814,7 +1815,7 @@ var Nc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
1814
1815
|
k.h.I[a - 1] = () => {
|
|
1815
1816
|
ac(`Cannot construct ${k.name} due to unbound types`, m);
|
|
1816
1817
|
};
|
|
1817
|
-
|
|
1818
|
+
W([], m, function(l) {
|
|
1818
1819
|
l.splice(1, 0, null);
|
|
1819
1820
|
k.h.I[a - 1] = bc(n, l, null, e, f);
|
|
1820
1821
|
return [];
|
|
@@ -1824,8 +1825,8 @@ var Nc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
1824
1825
|
}, _embind_register_class_function:function(b, a, c, d, e, f, m, k) {
|
|
1825
1826
|
var n = cc(c, d);
|
|
1826
1827
|
a = U(a);
|
|
1827
|
-
f =
|
|
1828
|
-
|
|
1828
|
+
f = X(e, f);
|
|
1829
|
+
W([], [b], function(l) {
|
|
1829
1830
|
function t() {
|
|
1830
1831
|
ac(`Cannot call ${w} due to unbound types`, n);
|
|
1831
1832
|
}
|
|
@@ -1835,7 +1836,7 @@ var Nc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
1835
1836
|
k && l.h.ya.push(a);
|
|
1836
1837
|
var x = l.h.B, g = x[a];
|
|
1837
1838
|
void 0 === g || void 0 === g.m && g.className !== l.name && g.L === c - 2 ? (t.L = c - 2, t.className = l.name, x[a] = t) : (Nb(x, a, w), x[a].m[c - 2] = t);
|
|
1838
|
-
|
|
1839
|
+
W([], n, function(r) {
|
|
1839
1840
|
r = bc(w, r, l, f, m);
|
|
1840
1841
|
void 0 === x[a].m ? (r.L = c - 2, x[a] = r) : x[a].m[c - 2] = r;
|
|
1841
1842
|
return [];
|
|
@@ -1844,8 +1845,8 @@ var Nc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
1844
1845
|
});
|
|
1845
1846
|
}, _embind_register_class_property:function(b, a, c, d, e, f, m, k, n, l) {
|
|
1846
1847
|
a = U(a);
|
|
1847
|
-
e =
|
|
1848
|
-
|
|
1848
|
+
e = X(d, e);
|
|
1849
|
+
W([], [b], function(t) {
|
|
1849
1850
|
t = t[0];
|
|
1850
1851
|
var w = `${t.name}.${a}`, x = {get() {
|
|
1851
1852
|
ac(`Cannot access ${w} due to unbound types`, [c, m]);
|
|
@@ -1856,17 +1857,17 @@ var Nc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
1856
1857
|
Q(w + " is a read-only property");
|
|
1857
1858
|
};
|
|
1858
1859
|
Object.defineProperty(t.h.B, a, x);
|
|
1859
|
-
|
|
1860
|
+
W([], n ? [c, m] : [c], function(g) {
|
|
1860
1861
|
var r = g[0], q = {get() {
|
|
1861
|
-
var
|
|
1862
|
-
return r.fromWireType(e(f,
|
|
1862
|
+
var E = dc(this, t, w + " getter");
|
|
1863
|
+
return r.fromWireType(e(f, E));
|
|
1863
1864
|
}, enumerable:!0};
|
|
1864
1865
|
if (n) {
|
|
1865
|
-
n =
|
|
1866
|
-
var
|
|
1867
|
-
q.set = function(
|
|
1866
|
+
n = X(k, n);
|
|
1867
|
+
var F = g[1];
|
|
1868
|
+
q.set = function(E) {
|
|
1868
1869
|
var v = dc(this, t, w + " setter"), I = [];
|
|
1869
|
-
n(l, v,
|
|
1870
|
+
n(l, v, F.toWireType(I, E));
|
|
1870
1871
|
Eb(I);
|
|
1871
1872
|
};
|
|
1872
1873
|
}
|
|
@@ -1915,11 +1916,11 @@ var Nc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
1915
1916
|
}, _embind_register_function:function(b, a, c, d, e, f) {
|
|
1916
1917
|
var m = cc(a, c);
|
|
1917
1918
|
b = U(b);
|
|
1918
|
-
e =
|
|
1919
|
+
e = X(d, e);
|
|
1919
1920
|
Ob(b, function() {
|
|
1920
1921
|
ac(`Cannot call ${b} due to unbound types`, m);
|
|
1921
1922
|
}, a - 1);
|
|
1922
|
-
|
|
1923
|
+
W([], m, function(k) {
|
|
1923
1924
|
Wb(b, bc(b, [k[0], null].concat(k.slice(1)), null, e, f), a - 1);
|
|
1924
1925
|
return [];
|
|
1925
1926
|
});
|
|
@@ -1941,7 +1942,7 @@ var Nc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
1941
1942
|
}, _embind_register_memory_view:function(b, a, c) {
|
|
1942
1943
|
function d(f) {
|
|
1943
1944
|
f >>= 2;
|
|
1944
|
-
var m =
|
|
1945
|
+
var m = L;
|
|
1945
1946
|
return new e(m.buffer, m[f + 1], m[f]);
|
|
1946
1947
|
}
|
|
1947
1948
|
var e = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array,][a];
|
|
@@ -1951,7 +1952,7 @@ var Nc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
1951
1952
|
a = U(a);
|
|
1952
1953
|
var c = "std::string" === a;
|
|
1953
1954
|
Ib(b, {name:a, fromWireType:function(d) {
|
|
1954
|
-
var e =
|
|
1955
|
+
var e = L[d >> 2], f = d + 4;
|
|
1955
1956
|
if (c) {
|
|
1956
1957
|
for (var m = f, k = 0; k <= e; ++k) {
|
|
1957
1958
|
var n = f + k;
|
|
@@ -1980,7 +1981,7 @@ var Nc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
1980
1981
|
f || e instanceof Uint8Array || e instanceof Uint8ClampedArray || e instanceof Int8Array || Q("Cannot pass non-string to std::string");
|
|
1981
1982
|
var m = c && f ? jc(e) : e.length;
|
|
1982
1983
|
var k = Mc(4 + m + 1), n = k + 4;
|
|
1983
|
-
|
|
1984
|
+
L[k >> 2] = m;
|
|
1984
1985
|
if (c && f) {
|
|
1985
1986
|
ic(e, J, n, m + 1);
|
|
1986
1987
|
} else {
|
|
@@ -2010,10 +2011,10 @@ var Nc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
2010
2011
|
var m = () => Ea;
|
|
2011
2012
|
var k = 1;
|
|
2012
2013
|
} else {
|
|
2013
|
-
4 === a && (d = sc, e = tc, f = uc, m = () =>
|
|
2014
|
+
4 === a && (d = sc, e = tc, f = uc, m = () => L, k = 2);
|
|
2014
2015
|
}
|
|
2015
2016
|
Ib(b, {name:c, fromWireType:function(n) {
|
|
2016
|
-
for (var l =
|
|
2017
|
+
for (var l = L[n >> 2], t = m(), w, x = n + 4, g = 0; g <= l; ++g) {
|
|
2017
2018
|
var r = n + 4 + g * a;
|
|
2018
2019
|
if (g == l || 0 == t[r >> k]) {
|
|
2019
2020
|
x = d(x, r - x), void 0 === w ? w = x : (w += String.fromCharCode(0), w += x), x = r + a;
|
|
@@ -2024,7 +2025,7 @@ var Nc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
2024
2025
|
}, toWireType:function(n, l) {
|
|
2025
2026
|
"string" != typeof l && Q(`Cannot pass non-string to C++ string type ${c}`);
|
|
2026
2027
|
var t = f(l), w = Mc(4 + t + a);
|
|
2027
|
-
|
|
2028
|
+
L[w >> 2] = t >> k;
|
|
2028
2029
|
e(l, w + 4, t + a);
|
|
2029
2030
|
null !== n && n.push(mb, w);
|
|
2030
2031
|
return w;
|
|
@@ -2032,9 +2033,9 @@ var Nc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
2032
2033
|
mb(n);
|
|
2033
2034
|
},});
|
|
2034
2035
|
}, _embind_register_value_object:function(b, a, c, d, e, f) {
|
|
2035
|
-
Db[b] = {name:U(a), fa:
|
|
2036
|
+
Db[b] = {name:U(a), fa:X(c, d), H:X(e, f), sa:[],};
|
|
2036
2037
|
}, _embind_register_value_object_field:function(b, a, c, d, e, f, m, k, n, l) {
|
|
2037
|
-
Db[b].sa.push({Sa:U(a), Ya:c, Wa:
|
|
2038
|
+
Db[b].sa.push({Sa:U(a), Ya:c, Wa:X(d, e), Xa:f, lb:m, kb:X(k, n), mb:l,});
|
|
2038
2039
|
}, _embind_register_void:function(b, a) {
|
|
2039
2040
|
a = U(a);
|
|
2040
2041
|
Ib(b, {cb:!0, name:a, argPackAdvance:0, fromWireType:function() {
|
|
@@ -2044,14 +2045,14 @@ var Nc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
2044
2045
|
b = R(b);
|
|
2045
2046
|
a = nb(a, "emval::as");
|
|
2046
2047
|
var d = [], e = S(d);
|
|
2047
|
-
|
|
2048
|
+
L[c >> 2] = e;
|
|
2048
2049
|
return a.toWireType(d, b);
|
|
2049
2050
|
}, _emval_call_method:function(b, a, c, d, e) {
|
|
2050
2051
|
b = xc[b];
|
|
2051
2052
|
a = R(a);
|
|
2052
2053
|
c = wc(c);
|
|
2053
2054
|
var f = [];
|
|
2054
|
-
|
|
2055
|
+
L[d >> 2] = S(f);
|
|
2055
2056
|
return b(a, c, f, e);
|
|
2056
2057
|
}, _emval_call_void_method:function(b, a, c, d) {
|
|
2057
2058
|
b = xc[b];
|
|
@@ -2144,7 +2145,7 @@ var Nc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
2144
2145
|
var c = 0;
|
|
2145
2146
|
Dc().forEach(function(d, e) {
|
|
2146
2147
|
var f = a + c;
|
|
2147
|
-
e =
|
|
2148
|
+
e = L[b + 4 * e >> 2] = f;
|
|
2148
2149
|
for (f = 0; f < d.length; ++f) {
|
|
2149
2150
|
Ca[e++ >> 0] = d.charCodeAt(f);
|
|
2150
2151
|
}
|
|
@@ -2154,18 +2155,18 @@ var Nc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
2154
2155
|
return 0;
|
|
2155
2156
|
}, environ_sizes_get:(b, a) => {
|
|
2156
2157
|
var c = Dc();
|
|
2157
|
-
|
|
2158
|
+
L[b >> 2] = c.length;
|
|
2158
2159
|
var d = 0;
|
|
2159
2160
|
c.forEach(function(e) {
|
|
2160
2161
|
d += e.length + 1;
|
|
2161
2162
|
});
|
|
2162
|
-
|
|
2163
|
+
L[a >> 2] = d;
|
|
2163
2164
|
return 0;
|
|
2164
2165
|
}, fd_close:() => 52, fd_seek:function() {
|
|
2165
2166
|
return 70;
|
|
2166
2167
|
}, fd_write:(b, a, c, d) => {
|
|
2167
2168
|
for (var e = 0, f = 0; f < c; f++) {
|
|
2168
|
-
var m =
|
|
2169
|
+
var m = L[a >> 2], k = L[a + 4 >> 2];
|
|
2169
2170
|
a += 8;
|
|
2170
2171
|
for (var n = 0; n < k; n++) {
|
|
2171
2172
|
var l = J[m + n], t = Ec[b];
|
|
@@ -2173,7 +2174,7 @@ var Nc = {_embind_create_inheriting_constructor:function(b, a, c) {
|
|
|
2173
2174
|
}
|
|
2174
2175
|
e += k;
|
|
2175
2176
|
}
|
|
2176
|
-
|
|
2177
|
+
L[d >> 2] = e;
|
|
2177
2178
|
return 0;
|
|
2178
2179
|
}, strftime_l:(b, a, c, d) => Jc(b, a, c, d)};
|
|
2179
2180
|
(function() {
|
|
@@ -2271,7 +2272,7 @@ Qc();
|
|
|
2271
2272
|
/* 2 */
|
|
2272
2273
|
/***/ ((module) => {
|
|
2273
2274
|
|
|
2274
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@rive-app/canvas-lite","version":"2.29.
|
|
2275
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@rive-app/canvas-lite","version":"2.29.2","description":"A lite version of Rive\'s canvas based web api.","main":"rive.js","homepage":"https://rive.app","repository":{"type":"git","url":"https://github.com/rive-app/rive-wasm/tree/master/js"},"keywords":["rive","animation"],"author":"Rive","contributors":["Luigi Rosso <luigi@rive.app> (https://rive.app)","Maxwell Talbot <max@rive.app> (https://rive.app)","Arthur Vivian <arthur@rive.app> (https://rive.app)","Umberto Sonnino <umberto@rive.app> (https://rive.app)","Matthew Sullivan <matt.j.sullivan@gmail.com> (mailto:matt.j.sullivan@gmail.com)"],"license":"MIT","files":["rive.js","rive.js.map","rive.wasm","rive_fallback.wasm","rive.d.ts","rive_advanced.mjs.d.ts"],"typings":"rive.d.ts","dependencies":{},"browser":{"fs":false,"path":false}}');
|
|
2275
2276
|
|
|
2276
2277
|
/***/ }),
|
|
2277
2278
|
/* 3 */
|
|
@@ -5937,9 +5938,12 @@ var ViewModelInstance = /** @class */ (function () {
|
|
|
5937
5938
|
this._children.forEach(function (child) { return child.handleCallbacks(); });
|
|
5938
5939
|
};
|
|
5939
5940
|
ViewModelInstance.prototype.addParent = function (parent) {
|
|
5940
|
-
this._parents.
|
|
5941
|
-
|
|
5942
|
-
|
|
5941
|
+
if (!this._parents.includes(parent)) {
|
|
5942
|
+
this._parents.push(parent);
|
|
5943
|
+
if (this._propertiesWithCallbacks.length > 0 ||
|
|
5944
|
+
this._children.length > 0) {
|
|
5945
|
+
parent.addToViewModelCallbacks(this);
|
|
5946
|
+
}
|
|
5943
5947
|
}
|
|
5944
5948
|
};
|
|
5945
5949
|
ViewModelInstance.prototype.removeParent = function (parent) {
|
|
@@ -6466,11 +6470,13 @@ var ViewModelInstanceList = /** @class */ (function (_super) {
|
|
|
6466
6470
|
ViewModelInstanceList.prototype.addInstance = function (instance) {
|
|
6467
6471
|
if (instance.runtimeInstance != null) {
|
|
6468
6472
|
this._viewModelInstanceValue.addInstance(instance.runtimeInstance);
|
|
6473
|
+
instance.addParent(this._parentViewModel);
|
|
6469
6474
|
}
|
|
6470
6475
|
};
|
|
6471
6476
|
ViewModelInstanceList.prototype.removeInstance = function (instance) {
|
|
6472
6477
|
if (instance.runtimeInstance != null) {
|
|
6473
6478
|
this._viewModelInstanceValue.removeInstance(instance.runtimeInstance);
|
|
6479
|
+
instance.removeParent(this._parentViewModel);
|
|
6474
6480
|
}
|
|
6475
6481
|
};
|
|
6476
6482
|
ViewModelInstanceList.prototype.removeInstanceAt = function (index) {
|
|
@@ -6479,11 +6485,14 @@ var ViewModelInstanceList = /** @class */ (function (_super) {
|
|
|
6479
6485
|
ViewModelInstanceList.prototype.instanceAt = function (index) {
|
|
6480
6486
|
var runtimeInstance = this._viewModelInstanceValue.instanceAt(index);
|
|
6481
6487
|
if (runtimeInstance != null) {
|
|
6482
|
-
var viewModelInstance = new ViewModelInstance(runtimeInstance,
|
|
6488
|
+
var viewModelInstance = new ViewModelInstance(runtimeInstance, this._parentViewModel);
|
|
6483
6489
|
return viewModelInstance;
|
|
6484
6490
|
}
|
|
6485
6491
|
return null;
|
|
6486
6492
|
};
|
|
6493
|
+
ViewModelInstanceList.prototype.swap = function (a, b) {
|
|
6494
|
+
this._viewModelInstanceValue.swap(a, b);
|
|
6495
|
+
};
|
|
6487
6496
|
ViewModelInstanceList.prototype.internalHandleCallback = function (callback) {
|
|
6488
6497
|
callback();
|
|
6489
6498
|
};
|