modern-canvas 0.3.1 → 0.3.3
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.cjs +443 -378
- package/dist/index.d.cts +75 -48
- package/dist/index.d.mts +75 -48
- package/dist/index.d.ts +75 -48
- package/dist/index.js +29 -29
- package/dist/index.mjs +440 -376
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -471,6 +471,9 @@ class CoreObject extends EventEmitter {
|
|
|
471
471
|
_changedProperties = /* @__PURE__ */ new Set();
|
|
472
472
|
_updatingPromise = Promise.resolve();
|
|
473
473
|
_updating = false;
|
|
474
|
+
is(target) {
|
|
475
|
+
return Boolean(target && this.instanceId === target.instanceId);
|
|
476
|
+
}
|
|
474
477
|
async _enqueueUpdate() {
|
|
475
478
|
this._updating = true;
|
|
476
479
|
try {
|
|
@@ -2205,13 +2208,13 @@ class Vector3 extends Vector {
|
|
|
2205
2208
|
}
|
|
2206
2209
|
}
|
|
2207
2210
|
|
|
2208
|
-
var __defProp$
|
|
2209
|
-
var __decorateClass$
|
|
2211
|
+
var __defProp$P = Object.defineProperty;
|
|
2212
|
+
var __decorateClass$P = (decorators, target, key, kind) => {
|
|
2210
2213
|
var result = undefined ;
|
|
2211
2214
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
2212
2215
|
if (decorator = decorators[i])
|
|
2213
2216
|
result = (decorator(target, key, result) ) || result;
|
|
2214
|
-
if (result) __defProp$
|
|
2217
|
+
if (result) __defProp$P(target, key, result);
|
|
2215
2218
|
return result;
|
|
2216
2219
|
};
|
|
2217
2220
|
class MainLoop extends CoreObject {
|
|
@@ -2230,7 +2233,7 @@ class MainLoop extends CoreObject {
|
|
|
2230
2233
|
start(process) {
|
|
2231
2234
|
if (!this._starting) {
|
|
2232
2235
|
this._starting = true;
|
|
2233
|
-
this.
|
|
2236
|
+
this.off("process");
|
|
2234
2237
|
this.on("process", process);
|
|
2235
2238
|
Ticker.on(this._onNextTick, { sort: 0 });
|
|
2236
2239
|
}
|
|
@@ -2252,10 +2255,10 @@ class MainLoop extends CoreObject {
|
|
|
2252
2255
|
}
|
|
2253
2256
|
}
|
|
2254
2257
|
}
|
|
2255
|
-
__decorateClass$
|
|
2258
|
+
__decorateClass$P([
|
|
2256
2259
|
property({ default: 24 })
|
|
2257
2260
|
], MainLoop.prototype, "fps");
|
|
2258
|
-
__decorateClass$
|
|
2261
|
+
__decorateClass$P([
|
|
2259
2262
|
property({ default: 1 })
|
|
2260
2263
|
], MainLoop.prototype, "speed");
|
|
2261
2264
|
|
|
@@ -4399,13 +4402,13 @@ class Geometry extends Resource {
|
|
|
4399
4402
|
}
|
|
4400
4403
|
}
|
|
4401
4404
|
|
|
4402
|
-
var __defProp$
|
|
4403
|
-
var __decorateClass$
|
|
4405
|
+
var __defProp$O = Object.defineProperty;
|
|
4406
|
+
var __decorateClass$O = (decorators, target, key, kind) => {
|
|
4404
4407
|
var result = undefined ;
|
|
4405
4408
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
4406
4409
|
if (decorator = decorators[i])
|
|
4407
4410
|
result = (decorator(target, key, result) ) || result;
|
|
4408
|
-
if (result) __defProp$
|
|
4411
|
+
if (result) __defProp$O(target, key, result);
|
|
4409
4412
|
return result;
|
|
4410
4413
|
};
|
|
4411
4414
|
class IndexBuffer extends Resource {
|
|
@@ -4449,20 +4452,20 @@ class IndexBuffer extends Resource {
|
|
|
4449
4452
|
return result;
|
|
4450
4453
|
}
|
|
4451
4454
|
}
|
|
4452
|
-
__decorateClass$
|
|
4455
|
+
__decorateClass$O([
|
|
4453
4456
|
protectedProperty({ default: null })
|
|
4454
4457
|
], IndexBuffer.prototype, "data");
|
|
4455
|
-
__decorateClass$
|
|
4458
|
+
__decorateClass$O([
|
|
4456
4459
|
protectedProperty({ default: false })
|
|
4457
4460
|
], IndexBuffer.prototype, "dynamic");
|
|
4458
4461
|
|
|
4459
|
-
var __defProp$
|
|
4460
|
-
var __decorateClass$
|
|
4462
|
+
var __defProp$N = Object.defineProperty;
|
|
4463
|
+
var __decorateClass$N = (decorators, target, key, kind) => {
|
|
4461
4464
|
var result = undefined ;
|
|
4462
4465
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
4463
4466
|
if (decorator = decorators[i])
|
|
4464
4467
|
result = (decorator(target, key, result) ) || result;
|
|
4465
|
-
if (result) __defProp$
|
|
4468
|
+
if (result) __defProp$N(target, key, result);
|
|
4466
4469
|
return result;
|
|
4467
4470
|
};
|
|
4468
4471
|
class VertexBuffer extends Resource {
|
|
@@ -4506,20 +4509,20 @@ class VertexBuffer extends Resource {
|
|
|
4506
4509
|
return result;
|
|
4507
4510
|
}
|
|
4508
4511
|
}
|
|
4509
|
-
__decorateClass$
|
|
4512
|
+
__decorateClass$N([
|
|
4510
4513
|
protectedProperty({ default: null })
|
|
4511
4514
|
], VertexBuffer.prototype, "data");
|
|
4512
|
-
__decorateClass$
|
|
4515
|
+
__decorateClass$N([
|
|
4513
4516
|
protectedProperty({ default: false })
|
|
4514
4517
|
], VertexBuffer.prototype, "dynamic");
|
|
4515
4518
|
|
|
4516
|
-
var __defProp$
|
|
4517
|
-
var __decorateClass$
|
|
4519
|
+
var __defProp$M = Object.defineProperty;
|
|
4520
|
+
var __decorateClass$M = (decorators, target, key, kind) => {
|
|
4518
4521
|
var result = undefined ;
|
|
4519
4522
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
4520
4523
|
if (decorator = decorators[i])
|
|
4521
4524
|
result = (decorator(target, key, result) ) || result;
|
|
4522
|
-
if (result) __defProp$
|
|
4525
|
+
if (result) __defProp$M(target, key, result);
|
|
4523
4526
|
return result;
|
|
4524
4527
|
};
|
|
4525
4528
|
class VertexAttribute extends Resource {
|
|
@@ -4556,25 +4559,25 @@ class VertexAttribute extends Resource {
|
|
|
4556
4559
|
return result;
|
|
4557
4560
|
}
|
|
4558
4561
|
}
|
|
4559
|
-
__decorateClass$
|
|
4562
|
+
__decorateClass$M([
|
|
4560
4563
|
protectedProperty()
|
|
4561
4564
|
], VertexAttribute.prototype, "buffer");
|
|
4562
|
-
__decorateClass$
|
|
4565
|
+
__decorateClass$M([
|
|
4563
4566
|
protectedProperty({ default: 0 })
|
|
4564
4567
|
], VertexAttribute.prototype, "size");
|
|
4565
|
-
__decorateClass$
|
|
4568
|
+
__decorateClass$M([
|
|
4566
4569
|
protectedProperty({ default: false })
|
|
4567
4570
|
], VertexAttribute.prototype, "normalized");
|
|
4568
|
-
__decorateClass$
|
|
4571
|
+
__decorateClass$M([
|
|
4569
4572
|
protectedProperty({ default: "float" })
|
|
4570
4573
|
], VertexAttribute.prototype, "type");
|
|
4571
|
-
__decorateClass$
|
|
4574
|
+
__decorateClass$M([
|
|
4572
4575
|
protectedProperty()
|
|
4573
4576
|
], VertexAttribute.prototype, "stride");
|
|
4574
|
-
__decorateClass$
|
|
4577
|
+
__decorateClass$M([
|
|
4575
4578
|
protectedProperty()
|
|
4576
4579
|
], VertexAttribute.prototype, "offset");
|
|
4577
|
-
__decorateClass$
|
|
4580
|
+
__decorateClass$M([
|
|
4578
4581
|
protectedProperty()
|
|
4579
4582
|
], VertexAttribute.prototype, "divisor");
|
|
4580
4583
|
|
|
@@ -4824,13 +4827,13 @@ class UvGeometry extends Geometry {
|
|
|
4824
4827
|
}
|
|
4825
4828
|
}
|
|
4826
4829
|
|
|
4827
|
-
var __defProp$
|
|
4828
|
-
var __decorateClass$
|
|
4830
|
+
var __defProp$L = Object.defineProperty;
|
|
4831
|
+
var __decorateClass$L = (decorators, target, key, kind) => {
|
|
4829
4832
|
var result = undefined ;
|
|
4830
4833
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
4831
4834
|
if (decorator = decorators[i])
|
|
4832
4835
|
result = (decorator(target, key, result) ) || result;
|
|
4833
|
-
if (result) __defProp$
|
|
4836
|
+
if (result) __defProp$L(target, key, result);
|
|
4834
4837
|
return result;
|
|
4835
4838
|
};
|
|
4836
4839
|
const style2DFilterDefault = {
|
|
@@ -5047,58 +5050,58 @@ class CanvasItemStyle extends Resource {
|
|
|
5047
5050
|
return m;
|
|
5048
5051
|
}
|
|
5049
5052
|
}
|
|
5050
|
-
__decorateClass$
|
|
5053
|
+
__decorateClass$L([
|
|
5051
5054
|
property({ default: "none" })
|
|
5052
5055
|
], CanvasItemStyle.prototype, "backgroundColor");
|
|
5053
|
-
__decorateClass$
|
|
5056
|
+
__decorateClass$L([
|
|
5054
5057
|
property({ default: "none" })
|
|
5055
5058
|
], CanvasItemStyle.prototype, "backgroundImage");
|
|
5056
|
-
__decorateClass$
|
|
5059
|
+
__decorateClass$L([
|
|
5057
5060
|
property({ default: "none" })
|
|
5058
5061
|
], CanvasItemStyle.prototype, "filter");
|
|
5059
|
-
__decorateClass$
|
|
5062
|
+
__decorateClass$L([
|
|
5060
5063
|
property({ default: "inherit" })
|
|
5061
5064
|
], CanvasItemStyle.prototype, "direction");
|
|
5062
|
-
__decorateClass$
|
|
5065
|
+
__decorateClass$L([
|
|
5063
5066
|
property({ default: "none" })
|
|
5064
5067
|
], CanvasItemStyle.prototype, "boxShadow");
|
|
5065
|
-
__decorateClass$
|
|
5068
|
+
__decorateClass$L([
|
|
5066
5069
|
property({ default: "none" })
|
|
5067
5070
|
], CanvasItemStyle.prototype, "maskImage");
|
|
5068
|
-
__decorateClass$
|
|
5071
|
+
__decorateClass$L([
|
|
5069
5072
|
property({ default: 1 })
|
|
5070
5073
|
], CanvasItemStyle.prototype, "opacity");
|
|
5071
|
-
__decorateClass$
|
|
5074
|
+
__decorateClass$L([
|
|
5072
5075
|
property({ default: 0 })
|
|
5073
5076
|
], CanvasItemStyle.prototype, "borderWidth");
|
|
5074
|
-
__decorateClass$
|
|
5077
|
+
__decorateClass$L([
|
|
5075
5078
|
property({ default: 0 })
|
|
5076
5079
|
], CanvasItemStyle.prototype, "borderRadius");
|
|
5077
|
-
__decorateClass$
|
|
5080
|
+
__decorateClass$L([
|
|
5078
5081
|
property({ default: "#000000" })
|
|
5079
5082
|
], CanvasItemStyle.prototype, "borderColor");
|
|
5080
|
-
__decorateClass$
|
|
5083
|
+
__decorateClass$L([
|
|
5081
5084
|
property({ default: "none" })
|
|
5082
5085
|
], CanvasItemStyle.prototype, "borderStyle");
|
|
5083
|
-
__decorateClass$
|
|
5086
|
+
__decorateClass$L([
|
|
5084
5087
|
property({ default: 0 })
|
|
5085
5088
|
], CanvasItemStyle.prototype, "outlineWidth");
|
|
5086
|
-
__decorateClass$
|
|
5089
|
+
__decorateClass$L([
|
|
5087
5090
|
property({ default: 0 })
|
|
5088
5091
|
], CanvasItemStyle.prototype, "outlineOffset");
|
|
5089
|
-
__decorateClass$
|
|
5092
|
+
__decorateClass$L([
|
|
5090
5093
|
property({ default: "#000000" })
|
|
5091
5094
|
], CanvasItemStyle.prototype, "outlineColor");
|
|
5092
|
-
__decorateClass$
|
|
5095
|
+
__decorateClass$L([
|
|
5093
5096
|
property({ default: "none" })
|
|
5094
5097
|
], CanvasItemStyle.prototype, "outlineStyle");
|
|
5095
|
-
__decorateClass$
|
|
5098
|
+
__decorateClass$L([
|
|
5096
5099
|
property({ default: "visible" })
|
|
5097
5100
|
], CanvasItemStyle.prototype, "visibility");
|
|
5098
|
-
__decorateClass$
|
|
5101
|
+
__decorateClass$L([
|
|
5099
5102
|
property({ default: "visible" })
|
|
5100
5103
|
], CanvasItemStyle.prototype, "overflow");
|
|
5101
|
-
__decorateClass$
|
|
5104
|
+
__decorateClass$L([
|
|
5102
5105
|
property({ default: "auto" })
|
|
5103
5106
|
], CanvasItemStyle.prototype, "pointerEvents");
|
|
5104
5107
|
const transformStyle$1 = modernIdoc.getDefaultTransformStyle();
|
|
@@ -5110,13 +5113,13 @@ for (const key in textStyle$1) {
|
|
|
5110
5113
|
defineProperty(CanvasItemStyle, key, { default: textStyle$1[key] });
|
|
5111
5114
|
}
|
|
5112
5115
|
|
|
5113
|
-
var __defProp$
|
|
5114
|
-
var __decorateClass$
|
|
5116
|
+
var __defProp$K = Object.defineProperty;
|
|
5117
|
+
var __decorateClass$K = (decorators, target, key, kind) => {
|
|
5115
5118
|
var result = undefined ;
|
|
5116
5119
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
5117
5120
|
if (decorator = decorators[i])
|
|
5118
5121
|
result = (decorator(target, key, result) ) || result;
|
|
5119
|
-
if (result) __defProp$
|
|
5122
|
+
if (result) __defProp$K(target, key, result);
|
|
5120
5123
|
return result;
|
|
5121
5124
|
};
|
|
5122
5125
|
class Texture2D extends Resource {
|
|
@@ -5242,32 +5245,58 @@ class Texture2D extends Resource {
|
|
|
5242
5245
|
}
|
|
5243
5246
|
}
|
|
5244
5247
|
}
|
|
5245
|
-
__decorateClass$
|
|
5248
|
+
__decorateClass$K([
|
|
5246
5249
|
protectedProperty()
|
|
5247
5250
|
], Texture2D.prototype, "source");
|
|
5248
|
-
__decorateClass$
|
|
5251
|
+
__decorateClass$K([
|
|
5249
5252
|
property({ default: 0 })
|
|
5250
5253
|
], Texture2D.prototype, "width");
|
|
5251
|
-
__decorateClass$
|
|
5254
|
+
__decorateClass$K([
|
|
5252
5255
|
property({ default: 0 })
|
|
5253
5256
|
], Texture2D.prototype, "height");
|
|
5254
|
-
__decorateClass$
|
|
5257
|
+
__decorateClass$K([
|
|
5255
5258
|
property({ default: "linear" })
|
|
5256
5259
|
], Texture2D.prototype, "filterMode");
|
|
5257
|
-
__decorateClass$
|
|
5260
|
+
__decorateClass$K([
|
|
5258
5261
|
property({ default: "clamp_to_edge" })
|
|
5259
5262
|
], Texture2D.prototype, "wrapMode");
|
|
5260
|
-
__decorateClass$
|
|
5263
|
+
__decorateClass$K([
|
|
5261
5264
|
property({ default: 1 })
|
|
5262
5265
|
], Texture2D.prototype, "pixelRatio");
|
|
5263
5266
|
|
|
5264
|
-
|
|
5265
|
-
|
|
5267
|
+
class AnimatedTexture extends Resource {
|
|
5268
|
+
frames;
|
|
5269
|
+
constructor(source) {
|
|
5270
|
+
super();
|
|
5271
|
+
let frames;
|
|
5272
|
+
if (Array.isArray(source)) {
|
|
5273
|
+
frames = source;
|
|
5274
|
+
} else if (source instanceof Texture2D) {
|
|
5275
|
+
frames = [{ texture: source, duration: 0 }];
|
|
5276
|
+
} else {
|
|
5277
|
+
throw new TypeError("Failed new AnimatedTexture");
|
|
5278
|
+
}
|
|
5279
|
+
this.frames = frames;
|
|
5280
|
+
this.updateDuration();
|
|
5281
|
+
}
|
|
5282
|
+
updateDuration() {
|
|
5283
|
+
this.duration = this.frames.reduce((duration, frame) => frame.duration + duration, 0);
|
|
5284
|
+
return this;
|
|
5285
|
+
}
|
|
5286
|
+
destroy() {
|
|
5287
|
+
this.frames.forEach((frame) => {
|
|
5288
|
+
frame.texture.destroy();
|
|
5289
|
+
});
|
|
5290
|
+
}
|
|
5291
|
+
}
|
|
5292
|
+
|
|
5293
|
+
var __defProp$J = Object.defineProperty;
|
|
5294
|
+
var __decorateClass$J = (decorators, target, key, kind) => {
|
|
5266
5295
|
var result = undefined ;
|
|
5267
5296
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
5268
5297
|
if (decorator = decorators[i])
|
|
5269
5298
|
result = (decorator(target, key, result) ) || result;
|
|
5270
|
-
if (result) __defProp$
|
|
5299
|
+
if (result) __defProp$J(target, key, result);
|
|
5271
5300
|
return result;
|
|
5272
5301
|
};
|
|
5273
5302
|
class CanvasTexture extends Texture2D {
|
|
@@ -5286,7 +5315,7 @@ class CanvasTexture extends Texture2D {
|
|
|
5286
5315
|
super._updateProperty(key, value, oldValue, declaration);
|
|
5287
5316
|
}
|
|
5288
5317
|
}
|
|
5289
|
-
__decorateClass$
|
|
5318
|
+
__decorateClass$J([
|
|
5290
5319
|
property({ default: 2 })
|
|
5291
5320
|
], CanvasTexture.prototype, "pixelRatio");
|
|
5292
5321
|
|
|
@@ -5444,13 +5473,13 @@ class PixelsTexture extends Texture2D {
|
|
|
5444
5473
|
}
|
|
5445
5474
|
}
|
|
5446
5475
|
|
|
5447
|
-
var __defProp$
|
|
5448
|
-
var __decorateClass$
|
|
5476
|
+
var __defProp$I = Object.defineProperty;
|
|
5477
|
+
var __decorateClass$I = (decorators, target, key, kind) => {
|
|
5449
5478
|
var result = undefined ;
|
|
5450
5479
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
5451
5480
|
if (decorator = decorators[i])
|
|
5452
5481
|
result = (decorator(target, key, result) ) || result;
|
|
5453
|
-
if (result) __defProp$
|
|
5482
|
+
if (result) __defProp$I(target, key, result);
|
|
5454
5483
|
return result;
|
|
5455
5484
|
};
|
|
5456
5485
|
function resolveOptions(options) {
|
|
@@ -5694,10 +5723,10 @@ const _VideoTexture = class _VideoTexture extends Texture2D {
|
|
|
5694
5723
|
}
|
|
5695
5724
|
}
|
|
5696
5725
|
};
|
|
5697
|
-
__decorateClass$
|
|
5726
|
+
__decorateClass$I([
|
|
5698
5727
|
protectedProperty({ default: true })
|
|
5699
5728
|
], _VideoTexture.prototype, "autoUpdate");
|
|
5700
|
-
__decorateClass$
|
|
5729
|
+
__decorateClass$I([
|
|
5701
5730
|
protectedProperty({ default: 0 })
|
|
5702
5731
|
], _VideoTexture.prototype, "fps");
|
|
5703
5732
|
let VideoTexture = _VideoTexture;
|
|
@@ -5715,8 +5744,8 @@ class CanvasContext extends modernPath2d.Path2D {
|
|
|
5715
5744
|
lineWidth;
|
|
5716
5745
|
miterLimit;
|
|
5717
5746
|
_defaultStyle = Texture2D.EMPTY;
|
|
5718
|
-
|
|
5719
|
-
|
|
5747
|
+
_strokes = [];
|
|
5748
|
+
_fills = [];
|
|
5720
5749
|
stroke() {
|
|
5721
5750
|
let texture = this._defaultStyle;
|
|
5722
5751
|
if (this.strokeStyle) {
|
|
@@ -5727,7 +5756,7 @@ class CanvasContext extends modernPath2d.Path2D {
|
|
|
5727
5756
|
}
|
|
5728
5757
|
}
|
|
5729
5758
|
if (this.curves.length) {
|
|
5730
|
-
this.
|
|
5759
|
+
this._strokes.push({
|
|
5731
5760
|
path: new modernPath2d.Path2D(this),
|
|
5732
5761
|
texture,
|
|
5733
5762
|
textureTransform: this.textureTransform,
|
|
@@ -5758,7 +5787,7 @@ class CanvasContext extends modernPath2d.Path2D {
|
|
|
5758
5787
|
texture = new ColorTexture(this.fillStyle);
|
|
5759
5788
|
}
|
|
5760
5789
|
}
|
|
5761
|
-
this.
|
|
5790
|
+
this._fills.push({
|
|
5762
5791
|
path: new modernPath2d.Path2D(this),
|
|
5763
5792
|
texture,
|
|
5764
5793
|
textureTransform: this.textureTransform
|
|
@@ -5775,8 +5804,8 @@ class CanvasContext extends modernPath2d.Path2D {
|
|
|
5775
5804
|
this.lineJoin = source.lineJoin;
|
|
5776
5805
|
this.lineWidth = source.lineWidth;
|
|
5777
5806
|
this.miterLimit = source.miterLimit;
|
|
5778
|
-
this.
|
|
5779
|
-
this.
|
|
5807
|
+
this._strokes = source._strokes.slice();
|
|
5808
|
+
this._fills = source._fills.slice();
|
|
5780
5809
|
return this;
|
|
5781
5810
|
}
|
|
5782
5811
|
reset() {
|
|
@@ -5788,8 +5817,8 @@ class CanvasContext extends modernPath2d.Path2D {
|
|
|
5788
5817
|
this.lineJoin = undefined;
|
|
5789
5818
|
this.lineWidth = undefined;
|
|
5790
5819
|
this.miterLimit = undefined;
|
|
5791
|
-
this.
|
|
5792
|
-
this.
|
|
5820
|
+
this._strokes.length = 0;
|
|
5821
|
+
this._fills.length = 0;
|
|
5793
5822
|
return this;
|
|
5794
5823
|
}
|
|
5795
5824
|
buildUvs(start, vertices, uvs, texture, textureTransform) {
|
|
@@ -5815,6 +5844,7 @@ class CanvasContext extends modernPath2d.Path2D {
|
|
|
5815
5844
|
let uvs = [];
|
|
5816
5845
|
let startUv = 0;
|
|
5817
5846
|
let texture;
|
|
5847
|
+
let verticesLen = vertices.length;
|
|
5818
5848
|
const push = (type) => {
|
|
5819
5849
|
batchables.push({
|
|
5820
5850
|
type,
|
|
@@ -5827,12 +5857,13 @@ class CanvasContext extends modernPath2d.Path2D {
|
|
|
5827
5857
|
indices = [];
|
|
5828
5858
|
uvs = [];
|
|
5829
5859
|
texture = undefined;
|
|
5860
|
+
verticesLen = vertices.length;
|
|
5830
5861
|
};
|
|
5831
|
-
let
|
|
5832
|
-
|
|
5833
|
-
|
|
5834
|
-
|
|
5835
|
-
if (texture
|
|
5862
|
+
for (let len = this._fills.length, i = 0; i < len; i++) {
|
|
5863
|
+
const graphics = this._fills[i];
|
|
5864
|
+
if (!texture) {
|
|
5865
|
+
texture = graphics.texture;
|
|
5866
|
+
} else if (!texture.is(graphics.texture)) {
|
|
5836
5867
|
push("fill");
|
|
5837
5868
|
}
|
|
5838
5869
|
startUv = vertices.length;
|
|
@@ -5841,14 +5872,17 @@ class CanvasContext extends modernPath2d.Path2D {
|
|
|
5841
5872
|
indices
|
|
5842
5873
|
});
|
|
5843
5874
|
this.buildUvs(startUv, vertices, uvs, graphics.texture, graphics.textureTransform);
|
|
5875
|
+
if (!texture) {
|
|
5876
|
+
texture = graphics.texture;
|
|
5877
|
+
}
|
|
5844
5878
|
}
|
|
5845
5879
|
if (vertices.length - verticesLen > 0) {
|
|
5846
5880
|
push("fill");
|
|
5847
5881
|
}
|
|
5848
5882
|
verticesLen = vertices.length;
|
|
5849
|
-
for (let len = this.
|
|
5883
|
+
for (let len = this._strokes.length, i = 0; i < len; i++) {
|
|
5850
5884
|
startUv = vertices.length;
|
|
5851
|
-
const graphics = this.
|
|
5885
|
+
const graphics = this._strokes[i];
|
|
5852
5886
|
texture ??= graphics.texture;
|
|
5853
5887
|
graphics.path.strokeTriangulate({
|
|
5854
5888
|
vertices,
|
|
@@ -5867,14 +5901,14 @@ class CanvasContext extends modernPath2d.Path2D {
|
|
|
5867
5901
|
}
|
|
5868
5902
|
}
|
|
5869
5903
|
|
|
5870
|
-
var __defProp$
|
|
5904
|
+
var __defProp$H = Object.defineProperty;
|
|
5871
5905
|
var __getOwnPropDesc$E = Object.getOwnPropertyDescriptor;
|
|
5872
|
-
var __decorateClass$
|
|
5906
|
+
var __decorateClass$H = (decorators, target, key, kind) => {
|
|
5873
5907
|
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$E(target, key) : target;
|
|
5874
5908
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
5875
5909
|
if (decorator = decorators[i])
|
|
5876
5910
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
5877
|
-
if (kind && result) __defProp$
|
|
5911
|
+
if (kind && result) __defProp$H(target, key, result);
|
|
5878
5912
|
return result;
|
|
5879
5913
|
};
|
|
5880
5914
|
const tagUidMap = {};
|
|
@@ -5929,7 +5963,7 @@ exports.Node = class Node extends CoreObject {
|
|
|
5929
5963
|
}
|
|
5930
5964
|
setTree(tree) {
|
|
5931
5965
|
const oldTree = this._tree;
|
|
5932
|
-
if (tree
|
|
5966
|
+
if (!tree?.is(oldTree)) {
|
|
5933
5967
|
if (oldTree) {
|
|
5934
5968
|
this.emit("treeExit", oldTree);
|
|
5935
5969
|
}
|
|
@@ -6261,9 +6295,6 @@ exports.Node = class Node extends CoreObject {
|
|
|
6261
6295
|
});
|
|
6262
6296
|
return this;
|
|
6263
6297
|
}
|
|
6264
|
-
is(target) {
|
|
6265
|
-
return Boolean(target && this.instanceId === target.instanceId);
|
|
6266
|
-
}
|
|
6267
6298
|
/** override */
|
|
6268
6299
|
_ready() {
|
|
6269
6300
|
}
|
|
@@ -6306,33 +6337,33 @@ exports.Node = class Node extends CoreObject {
|
|
|
6306
6337
|
return node;
|
|
6307
6338
|
}
|
|
6308
6339
|
};
|
|
6309
|
-
__decorateClass$
|
|
6340
|
+
__decorateClass$H([
|
|
6310
6341
|
property()
|
|
6311
6342
|
], exports.Node.prototype, "name", 2);
|
|
6312
|
-
__decorateClass$
|
|
6343
|
+
__decorateClass$H([
|
|
6313
6344
|
property()
|
|
6314
6345
|
], exports.Node.prototype, "mask", 2);
|
|
6315
|
-
__decorateClass$
|
|
6346
|
+
__decorateClass$H([
|
|
6316
6347
|
property({ default: "inherit" })
|
|
6317
6348
|
], exports.Node.prototype, "processMode", 2);
|
|
6318
|
-
__decorateClass$
|
|
6349
|
+
__decorateClass$H([
|
|
6319
6350
|
property({ default: "inherit" })
|
|
6320
6351
|
], exports.Node.prototype, "renderMode", 2);
|
|
6321
|
-
__decorateClass$
|
|
6352
|
+
__decorateClass$H([
|
|
6322
6353
|
property({ default: "default" })
|
|
6323
6354
|
], exports.Node.prototype, "internalMode", 2);
|
|
6324
|
-
exports.Node = __decorateClass$
|
|
6355
|
+
exports.Node = __decorateClass$H([
|
|
6325
6356
|
customNode("Node")
|
|
6326
6357
|
], exports.Node);
|
|
6327
6358
|
|
|
6328
|
-
var __defProp$
|
|
6359
|
+
var __defProp$G = Object.defineProperty;
|
|
6329
6360
|
var __getOwnPropDesc$D = Object.getOwnPropertyDescriptor;
|
|
6330
|
-
var __decorateClass$
|
|
6361
|
+
var __decorateClass$G = (decorators, target, key, kind) => {
|
|
6331
6362
|
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$D(target, key) : target;
|
|
6332
6363
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6333
6364
|
if (decorator = decorators[i])
|
|
6334
6365
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
6335
|
-
if (kind && result) __defProp$
|
|
6366
|
+
if (kind && result) __defProp$G(target, key, result);
|
|
6336
6367
|
return result;
|
|
6337
6368
|
};
|
|
6338
6369
|
exports.TimelineNode = class TimelineNode extends exports.Node {
|
|
@@ -6391,27 +6422,27 @@ exports.TimelineNode = class TimelineNode extends exports.Node {
|
|
|
6391
6422
|
super._process(delta);
|
|
6392
6423
|
}
|
|
6393
6424
|
};
|
|
6394
|
-
__decorateClass$
|
|
6425
|
+
__decorateClass$G([
|
|
6395
6426
|
property({ default: 0 })
|
|
6396
6427
|
], exports.TimelineNode.prototype, "delay", 2);
|
|
6397
|
-
__decorateClass$
|
|
6428
|
+
__decorateClass$G([
|
|
6398
6429
|
property({ default: 0 })
|
|
6399
6430
|
], exports.TimelineNode.prototype, "duration", 2);
|
|
6400
|
-
__decorateClass$
|
|
6431
|
+
__decorateClass$G([
|
|
6401
6432
|
property({ default: false })
|
|
6402
6433
|
], exports.TimelineNode.prototype, "paused", 2);
|
|
6403
|
-
exports.TimelineNode = __decorateClass$
|
|
6434
|
+
exports.TimelineNode = __decorateClass$G([
|
|
6404
6435
|
customNode("TimelineNode")
|
|
6405
6436
|
], exports.TimelineNode);
|
|
6406
6437
|
|
|
6407
|
-
var __defProp$
|
|
6438
|
+
var __defProp$F = Object.defineProperty;
|
|
6408
6439
|
var __getOwnPropDesc$C = Object.getOwnPropertyDescriptor;
|
|
6409
|
-
var __decorateClass$
|
|
6440
|
+
var __decorateClass$F = (decorators, target, key, kind) => {
|
|
6410
6441
|
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$C(target, key) : target;
|
|
6411
6442
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6412
6443
|
if (decorator = decorators[i])
|
|
6413
6444
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
6414
|
-
if (kind && result) __defProp$
|
|
6445
|
+
if (kind && result) __defProp$F(target, key, result);
|
|
6415
6446
|
return result;
|
|
6416
6447
|
};
|
|
6417
6448
|
exports.Viewport = class Viewport extends exports.Node {
|
|
@@ -6549,30 +6580,30 @@ exports.Viewport = class Viewport extends exports.Node {
|
|
|
6549
6580
|
return this._projection.toArray(transpose);
|
|
6550
6581
|
}
|
|
6551
6582
|
};
|
|
6552
|
-
__decorateClass$
|
|
6583
|
+
__decorateClass$F([
|
|
6553
6584
|
property({ default: 0 })
|
|
6554
6585
|
], exports.Viewport.prototype, "x", 2);
|
|
6555
|
-
__decorateClass$
|
|
6586
|
+
__decorateClass$F([
|
|
6556
6587
|
property({ default: 0 })
|
|
6557
6588
|
], exports.Viewport.prototype, "y", 2);
|
|
6558
|
-
__decorateClass$
|
|
6589
|
+
__decorateClass$F([
|
|
6559
6590
|
property({ default: 0 })
|
|
6560
6591
|
], exports.Viewport.prototype, "width", 2);
|
|
6561
|
-
__decorateClass$
|
|
6592
|
+
__decorateClass$F([
|
|
6562
6593
|
property({ default: 0 })
|
|
6563
6594
|
], exports.Viewport.prototype, "height", 2);
|
|
6564
|
-
exports.Viewport = __decorateClass$
|
|
6595
|
+
exports.Viewport = __decorateClass$F([
|
|
6565
6596
|
customNode("Viewport")
|
|
6566
6597
|
], exports.Viewport);
|
|
6567
6598
|
|
|
6568
|
-
var __defProp$
|
|
6599
|
+
var __defProp$E = Object.defineProperty;
|
|
6569
6600
|
var __getOwnPropDesc$B = Object.getOwnPropertyDescriptor;
|
|
6570
|
-
var __decorateClass$
|
|
6601
|
+
var __decorateClass$E = (decorators, target, key, kind) => {
|
|
6571
6602
|
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$B(target, key) : target;
|
|
6572
6603
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6573
6604
|
if (decorator = decorators[i])
|
|
6574
6605
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
6575
|
-
if (kind && result) __defProp$
|
|
6606
|
+
if (kind && result) __defProp$E(target, key, result);
|
|
6576
6607
|
return result;
|
|
6577
6608
|
};
|
|
6578
6609
|
exports.Effect = class Effect extends exports.TimelineNode {
|
|
@@ -6628,6 +6659,8 @@ exports.Effect = class Effect extends exports.TimelineNode {
|
|
|
6628
6659
|
this.viewport2.setTree(undefined);
|
|
6629
6660
|
}
|
|
6630
6661
|
_onProcessing() {
|
|
6662
|
+
if (!this.canProcess())
|
|
6663
|
+
return;
|
|
6631
6664
|
this._updateCurrentTime();
|
|
6632
6665
|
switch (this._effectMode) {
|
|
6633
6666
|
case "transition":
|
|
@@ -6641,6 +6674,8 @@ exports.Effect = class Effect extends exports.TimelineNode {
|
|
|
6641
6674
|
}
|
|
6642
6675
|
}
|
|
6643
6676
|
_onNodeProcessed(node) {
|
|
6677
|
+
if (!this.canProcess())
|
|
6678
|
+
return;
|
|
6644
6679
|
if (!this.isInsideTimeRange())
|
|
6645
6680
|
return;
|
|
6646
6681
|
const renderStack = this._tree?.renderStack;
|
|
@@ -6809,31 +6844,31 @@ exports.Effect = class Effect extends exports.TimelineNode {
|
|
|
6809
6844
|
}
|
|
6810
6845
|
}
|
|
6811
6846
|
};
|
|
6812
|
-
__decorateClass$
|
|
6847
|
+
__decorateClass$E([
|
|
6813
6848
|
protectedProperty()
|
|
6814
6849
|
], exports.Effect.prototype, "material", 2);
|
|
6815
|
-
__decorateClass$
|
|
6850
|
+
__decorateClass$E([
|
|
6816
6851
|
property()
|
|
6817
6852
|
], exports.Effect.prototype, "effectMode", 2);
|
|
6818
|
-
__decorateClass$
|
|
6853
|
+
__decorateClass$E([
|
|
6819
6854
|
property({ default: "" })
|
|
6820
6855
|
], exports.Effect.prototype, "glsl", 2);
|
|
6821
|
-
__decorateClass$
|
|
6856
|
+
__decorateClass$E([
|
|
6822
6857
|
property({ default: "" })
|
|
6823
6858
|
], exports.Effect.prototype, "glslSrc", 2);
|
|
6824
|
-
exports.Effect = __decorateClass$
|
|
6859
|
+
exports.Effect = __decorateClass$E([
|
|
6825
6860
|
customNode("Effect")
|
|
6826
6861
|
], exports.Effect);
|
|
6827
6862
|
|
|
6828
|
-
var __defProp$
|
|
6863
|
+
var __defProp$D = Object.defineProperty;
|
|
6829
6864
|
var __getOwnPropDesc$A = Object.getOwnPropertyDescriptor;
|
|
6830
|
-
var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$
|
|
6831
|
-
var __decorateClass$
|
|
6865
|
+
var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$D(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6866
|
+
var __decorateClass$D = (decorators, target, key, kind) => {
|
|
6832
6867
|
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$A(target, key) : target;
|
|
6833
6868
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6834
6869
|
if (decorator = decorators[i])
|
|
6835
6870
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
6836
|
-
if (kind && result) __defProp$
|
|
6871
|
+
if (kind && result) __defProp$D(target, key, result);
|
|
6837
6872
|
return result;
|
|
6838
6873
|
};
|
|
6839
6874
|
var __publicField$i = (obj, key, value) => __defNormalProp$i(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
@@ -6930,25 +6965,25 @@ __publicField$i(exports.BlurEffect, "materialY", new Material({
|
|
|
6930
6965
|
vert: vertY,
|
|
6931
6966
|
frag
|
|
6932
6967
|
}));
|
|
6933
|
-
__decorateClass$
|
|
6968
|
+
__decorateClass$D([
|
|
6934
6969
|
property({ default: 8 })
|
|
6935
6970
|
], exports.BlurEffect.prototype, "strength", 2);
|
|
6936
|
-
__decorateClass$
|
|
6971
|
+
__decorateClass$D([
|
|
6937
6972
|
property({ default: 4 })
|
|
6938
6973
|
], exports.BlurEffect.prototype, "quality", 2);
|
|
6939
|
-
exports.BlurEffect = __decorateClass$
|
|
6974
|
+
exports.BlurEffect = __decorateClass$D([
|
|
6940
6975
|
customNode("BlurEffect")
|
|
6941
6976
|
], exports.BlurEffect);
|
|
6942
6977
|
|
|
6943
|
-
var __defProp$
|
|
6978
|
+
var __defProp$C = Object.defineProperty;
|
|
6944
6979
|
var __getOwnPropDesc$z = Object.getOwnPropertyDescriptor;
|
|
6945
|
-
var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$
|
|
6946
|
-
var __decorateClass$
|
|
6980
|
+
var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$C(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6981
|
+
var __decorateClass$C = (decorators, target, key, kind) => {
|
|
6947
6982
|
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$z(target, key) : target;
|
|
6948
6983
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6949
6984
|
if (decorator = decorators[i])
|
|
6950
6985
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
6951
|
-
if (kind && result) __defProp$
|
|
6986
|
+
if (kind && result) __defProp$C(target, key, result);
|
|
6952
6987
|
return result;
|
|
6953
6988
|
};
|
|
6954
6989
|
var __publicField$h = (obj, key, value) => __defNormalProp$h(obj, key + "" , value);
|
|
@@ -7012,43 +7047,43 @@ void main(void) {
|
|
|
7012
7047
|
gl_FragColor = c * alpha;
|
|
7013
7048
|
}`
|
|
7014
7049
|
}));
|
|
7015
|
-
__decorateClass$
|
|
7050
|
+
__decorateClass$C([
|
|
7016
7051
|
property()
|
|
7017
7052
|
], exports.ColorAdjustEffect.prototype, "saturation", 2);
|
|
7018
|
-
__decorateClass$
|
|
7053
|
+
__decorateClass$C([
|
|
7019
7054
|
property()
|
|
7020
7055
|
], exports.ColorAdjustEffect.prototype, "contrast", 2);
|
|
7021
|
-
__decorateClass$
|
|
7056
|
+
__decorateClass$C([
|
|
7022
7057
|
property()
|
|
7023
7058
|
], exports.ColorAdjustEffect.prototype, "brightness", 2);
|
|
7024
|
-
__decorateClass$
|
|
7059
|
+
__decorateClass$C([
|
|
7025
7060
|
property()
|
|
7026
7061
|
], exports.ColorAdjustEffect.prototype, "red", 2);
|
|
7027
|
-
__decorateClass$
|
|
7062
|
+
__decorateClass$C([
|
|
7028
7063
|
property()
|
|
7029
7064
|
], exports.ColorAdjustEffect.prototype, "green", 2);
|
|
7030
|
-
__decorateClass$
|
|
7065
|
+
__decorateClass$C([
|
|
7031
7066
|
property()
|
|
7032
7067
|
], exports.ColorAdjustEffect.prototype, "blue", 2);
|
|
7033
|
-
__decorateClass$
|
|
7068
|
+
__decorateClass$C([
|
|
7034
7069
|
property()
|
|
7035
7070
|
], exports.ColorAdjustEffect.prototype, "alpha", 2);
|
|
7036
|
-
__decorateClass$
|
|
7071
|
+
__decorateClass$C([
|
|
7037
7072
|
property()
|
|
7038
7073
|
], exports.ColorAdjustEffect.prototype, "gamma", 2);
|
|
7039
|
-
exports.ColorAdjustEffect = __decorateClass$
|
|
7074
|
+
exports.ColorAdjustEffect = __decorateClass$C([
|
|
7040
7075
|
customNode("ColorAdjustEffect")
|
|
7041
7076
|
], exports.ColorAdjustEffect);
|
|
7042
7077
|
|
|
7043
|
-
var __defProp$
|
|
7078
|
+
var __defProp$B = Object.defineProperty;
|
|
7044
7079
|
var __getOwnPropDesc$y = Object.getOwnPropertyDescriptor;
|
|
7045
|
-
var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$
|
|
7046
|
-
var __decorateClass$
|
|
7080
|
+
var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$B(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7081
|
+
var __decorateClass$B = (decorators, target, key, kind) => {
|
|
7047
7082
|
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$y(target, key) : target;
|
|
7048
7083
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7049
7084
|
if (decorator = decorators[i])
|
|
7050
7085
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7051
|
-
if (kind && result) __defProp$
|
|
7086
|
+
if (kind && result) __defProp$B(target, key, result);
|
|
7052
7087
|
return result;
|
|
7053
7088
|
};
|
|
7054
7089
|
var __publicField$g = (obj, key, value) => __defNormalProp$g(obj, key + "" , value);
|
|
@@ -7128,22 +7163,22 @@ void main(void) {
|
|
|
7128
7163
|
);
|
|
7129
7164
|
}`
|
|
7130
7165
|
}));
|
|
7131
|
-
__decorateClass$
|
|
7166
|
+
__decorateClass$B([
|
|
7132
7167
|
property({ default: "" })
|
|
7133
7168
|
], exports.ColorFilterEffect.prototype, "filter", 2);
|
|
7134
|
-
exports.ColorFilterEffect = __decorateClass$
|
|
7169
|
+
exports.ColorFilterEffect = __decorateClass$B([
|
|
7135
7170
|
customNode("ColorFilterEffect")
|
|
7136
7171
|
], exports.ColorFilterEffect);
|
|
7137
7172
|
|
|
7138
|
-
var __defProp$
|
|
7173
|
+
var __defProp$A = Object.defineProperty;
|
|
7139
7174
|
var __getOwnPropDesc$x = Object.getOwnPropertyDescriptor;
|
|
7140
|
-
var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$
|
|
7141
|
-
var __decorateClass$
|
|
7175
|
+
var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$A(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7176
|
+
var __decorateClass$A = (decorators, target, key, kind) => {
|
|
7142
7177
|
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$x(target, key) : target;
|
|
7143
7178
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7144
7179
|
if (decorator = decorators[i])
|
|
7145
7180
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7146
|
-
if (kind && result) __defProp$
|
|
7181
|
+
if (kind && result) __defProp$A(target, key, result);
|
|
7147
7182
|
return result;
|
|
7148
7183
|
};
|
|
7149
7184
|
var __publicField$f = (obj, key, value) => __defNormalProp$f(obj, key + "" , value);
|
|
@@ -7217,25 +7252,25 @@ void main(void) {
|
|
|
7217
7252
|
gl_FragColor = vec4(mix(color.rgb, mask.rgb, color.a * mask.a), color.a);
|
|
7218
7253
|
}`
|
|
7219
7254
|
}));
|
|
7220
|
-
__decorateClass$
|
|
7255
|
+
__decorateClass$A([
|
|
7221
7256
|
property()
|
|
7222
7257
|
], exports.ColorOverlayEffect.prototype, "colors", 2);
|
|
7223
|
-
__decorateClass$
|
|
7258
|
+
__decorateClass$A([
|
|
7224
7259
|
property()
|
|
7225
7260
|
], exports.ColorOverlayEffect.prototype, "alpha", 2);
|
|
7226
|
-
exports.ColorOverlayEffect = __decorateClass$
|
|
7261
|
+
exports.ColorOverlayEffect = __decorateClass$A([
|
|
7227
7262
|
customNode("ColorOverlayEffect")
|
|
7228
7263
|
], exports.ColorOverlayEffect);
|
|
7229
7264
|
|
|
7230
|
-
var __defProp$
|
|
7265
|
+
var __defProp$z = Object.defineProperty;
|
|
7231
7266
|
var __getOwnPropDesc$w = Object.getOwnPropertyDescriptor;
|
|
7232
|
-
var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$
|
|
7233
|
-
var __decorateClass$
|
|
7267
|
+
var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7268
|
+
var __decorateClass$z = (decorators, target, key, kind) => {
|
|
7234
7269
|
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$w(target, key) : target;
|
|
7235
7270
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7236
7271
|
if (decorator = decorators[i])
|
|
7237
7272
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7238
|
-
if (kind && result) __defProp$
|
|
7273
|
+
if (kind && result) __defProp$z(target, key, result);
|
|
7239
7274
|
return result;
|
|
7240
7275
|
};
|
|
7241
7276
|
var __publicField$e = (obj, key, value) => __defNormalProp$e(obj, key + "" , value);
|
|
@@ -7300,25 +7335,25 @@ void main(void) {
|
|
|
7300
7335
|
gl_FragColor = color;
|
|
7301
7336
|
}`
|
|
7302
7337
|
}));
|
|
7303
|
-
__decorateClass$
|
|
7338
|
+
__decorateClass$z([
|
|
7304
7339
|
property()
|
|
7305
7340
|
], exports.ColorRemoveEffect.prototype, "colors", 2);
|
|
7306
|
-
__decorateClass$
|
|
7341
|
+
__decorateClass$z([
|
|
7307
7342
|
property()
|
|
7308
7343
|
], exports.ColorRemoveEffect.prototype, "epsilon", 2);
|
|
7309
|
-
exports.ColorRemoveEffect = __decorateClass$
|
|
7344
|
+
exports.ColorRemoveEffect = __decorateClass$z([
|
|
7310
7345
|
customNode("ColorRemoveEffect")
|
|
7311
7346
|
], exports.ColorRemoveEffect);
|
|
7312
7347
|
|
|
7313
|
-
var __defProp$
|
|
7348
|
+
var __defProp$y = Object.defineProperty;
|
|
7314
7349
|
var __getOwnPropDesc$v = Object.getOwnPropertyDescriptor;
|
|
7315
|
-
var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$
|
|
7316
|
-
var __decorateClass$
|
|
7350
|
+
var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7351
|
+
var __decorateClass$y = (decorators, target, key, kind) => {
|
|
7317
7352
|
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$v(target, key) : target;
|
|
7318
7353
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7319
7354
|
if (decorator = decorators[i])
|
|
7320
7355
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7321
|
-
if (kind && result) __defProp$
|
|
7356
|
+
if (kind && result) __defProp$y(target, key, result);
|
|
7322
7357
|
return result;
|
|
7323
7358
|
};
|
|
7324
7359
|
var __publicField$d = (obj, key, value) => __defNormalProp$d(obj, key + "" , value);
|
|
@@ -7405,25 +7440,25 @@ void main(void) {
|
|
|
7405
7440
|
}
|
|
7406
7441
|
}`
|
|
7407
7442
|
}));
|
|
7408
|
-
__decorateClass$
|
|
7443
|
+
__decorateClass$y([
|
|
7409
7444
|
property()
|
|
7410
7445
|
], exports.ColorReplaceEffect.prototype, "colors", 2);
|
|
7411
|
-
__decorateClass$
|
|
7446
|
+
__decorateClass$y([
|
|
7412
7447
|
property()
|
|
7413
7448
|
], exports.ColorReplaceEffect.prototype, "epsilon", 2);
|
|
7414
|
-
exports.ColorReplaceEffect = __decorateClass$
|
|
7449
|
+
exports.ColorReplaceEffect = __decorateClass$y([
|
|
7415
7450
|
customNode("ColorReplaceEffect")
|
|
7416
7451
|
], exports.ColorReplaceEffect);
|
|
7417
7452
|
|
|
7418
|
-
var __defProp$
|
|
7453
|
+
var __defProp$x = Object.defineProperty;
|
|
7419
7454
|
var __getOwnPropDesc$u = Object.getOwnPropertyDescriptor;
|
|
7420
|
-
var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$
|
|
7421
|
-
var __decorateClass$
|
|
7455
|
+
var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$x(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7456
|
+
var __decorateClass$x = (decorators, target, key, kind) => {
|
|
7422
7457
|
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$u(target, key) : target;
|
|
7423
7458
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7424
7459
|
if (decorator = decorators[i])
|
|
7425
7460
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7426
|
-
if (kind && result) __defProp$
|
|
7461
|
+
if (kind && result) __defProp$x(target, key, result);
|
|
7427
7462
|
return result;
|
|
7428
7463
|
};
|
|
7429
7464
|
var __publicField$c = (obj, key, value) => __defNormalProp$c(obj, key + "" , value);
|
|
@@ -7469,22 +7504,22 @@ void main(void) {
|
|
|
7469
7504
|
gl_FragColor = vec4(color.rgb * alpha, alpha);
|
|
7470
7505
|
}`
|
|
7471
7506
|
}));
|
|
7472
|
-
__decorateClass$
|
|
7507
|
+
__decorateClass$x([
|
|
7473
7508
|
property()
|
|
7474
7509
|
], exports.EmbossEffect.prototype, "strength", 2);
|
|
7475
|
-
exports.EmbossEffect = __decorateClass$
|
|
7510
|
+
exports.EmbossEffect = __decorateClass$x([
|
|
7476
7511
|
customNode("EmbossEffect")
|
|
7477
7512
|
], exports.EmbossEffect);
|
|
7478
7513
|
|
|
7479
|
-
var __defProp$
|
|
7514
|
+
var __defProp$w = Object.defineProperty;
|
|
7480
7515
|
var __getOwnPropDesc$t = Object.getOwnPropertyDescriptor;
|
|
7481
|
-
var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$
|
|
7482
|
-
var __decorateClass$
|
|
7516
|
+
var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$w(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7517
|
+
var __decorateClass$w = (decorators, target, key, kind) => {
|
|
7483
7518
|
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$t(target, key) : target;
|
|
7484
7519
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7485
7520
|
if (decorator = decorators[i])
|
|
7486
7521
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7487
|
-
if (kind && result) __defProp$
|
|
7522
|
+
if (kind && result) __defProp$w(target, key, result);
|
|
7488
7523
|
return result;
|
|
7489
7524
|
};
|
|
7490
7525
|
var __publicField$b = (obj, key, value) => __defNormalProp$b(obj, key + "" , value);
|
|
@@ -7666,46 +7701,46 @@ void main(void) {
|
|
|
7666
7701
|
gl_FragColor.a = texture2D(sampler, coord).a;
|
|
7667
7702
|
}`
|
|
7668
7703
|
}));
|
|
7669
|
-
__decorateClass$
|
|
7704
|
+
__decorateClass$w([
|
|
7670
7705
|
property()
|
|
7671
7706
|
], exports.GlitchEffect.prototype, "slices", 2);
|
|
7672
|
-
__decorateClass$
|
|
7707
|
+
__decorateClass$w([
|
|
7673
7708
|
property()
|
|
7674
7709
|
], exports.GlitchEffect.prototype, "sampleSize", 2);
|
|
7675
|
-
__decorateClass$
|
|
7710
|
+
__decorateClass$w([
|
|
7676
7711
|
property()
|
|
7677
7712
|
], exports.GlitchEffect.prototype, "offset", 2);
|
|
7678
|
-
__decorateClass$
|
|
7713
|
+
__decorateClass$w([
|
|
7679
7714
|
property()
|
|
7680
7715
|
], exports.GlitchEffect.prototype, "direction", 2);
|
|
7681
|
-
__decorateClass$
|
|
7716
|
+
__decorateClass$w([
|
|
7682
7717
|
property()
|
|
7683
7718
|
], exports.GlitchEffect.prototype, "fillMode", 2);
|
|
7684
|
-
__decorateClass$
|
|
7719
|
+
__decorateClass$w([
|
|
7685
7720
|
property()
|
|
7686
7721
|
], exports.GlitchEffect.prototype, "seed", 2);
|
|
7687
|
-
__decorateClass$
|
|
7722
|
+
__decorateClass$w([
|
|
7688
7723
|
property()
|
|
7689
7724
|
], exports.GlitchEffect.prototype, "red", 2);
|
|
7690
|
-
__decorateClass$
|
|
7725
|
+
__decorateClass$w([
|
|
7691
7726
|
property()
|
|
7692
7727
|
], exports.GlitchEffect.prototype, "green", 2);
|
|
7693
|
-
__decorateClass$
|
|
7728
|
+
__decorateClass$w([
|
|
7694
7729
|
property()
|
|
7695
7730
|
], exports.GlitchEffect.prototype, "blue", 2);
|
|
7696
|
-
exports.GlitchEffect = __decorateClass$
|
|
7731
|
+
exports.GlitchEffect = __decorateClass$w([
|
|
7697
7732
|
customNode("GlitchEffect")
|
|
7698
7733
|
], exports.GlitchEffect);
|
|
7699
7734
|
|
|
7700
|
-
var __defProp$
|
|
7735
|
+
var __defProp$v = Object.defineProperty;
|
|
7701
7736
|
var __getOwnPropDesc$s = Object.getOwnPropertyDescriptor;
|
|
7702
|
-
var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$
|
|
7703
|
-
var __decorateClass$
|
|
7737
|
+
var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7738
|
+
var __decorateClass$v = (decorators, target, key, kind) => {
|
|
7704
7739
|
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$s(target, key) : target;
|
|
7705
7740
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7706
7741
|
if (decorator = decorators[i])
|
|
7707
7742
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7708
|
-
if (kind && result) __defProp$
|
|
7743
|
+
if (kind && result) __defProp$v(target, key, result);
|
|
7709
7744
|
return result;
|
|
7710
7745
|
};
|
|
7711
7746
|
var __publicField$a = (obj, key, value) => __defNormalProp$a(obj, key + "" , value);
|
|
@@ -7867,37 +7902,37 @@ void main(void) {
|
|
|
7867
7902
|
gl_FragColor = vec4(color.rgb + mist.rgb, color.a);
|
|
7868
7903
|
}`
|
|
7869
7904
|
}));
|
|
7870
|
-
__decorateClass$
|
|
7905
|
+
__decorateClass$v([
|
|
7871
7906
|
property()
|
|
7872
7907
|
], exports.GodrayEffect.prototype, "angle", 2);
|
|
7873
|
-
__decorateClass$
|
|
7908
|
+
__decorateClass$v([
|
|
7874
7909
|
property()
|
|
7875
7910
|
], exports.GodrayEffect.prototype, "gain", 2);
|
|
7876
|
-
__decorateClass$
|
|
7911
|
+
__decorateClass$v([
|
|
7877
7912
|
property()
|
|
7878
7913
|
], exports.GodrayEffect.prototype, "lacunarity", 2);
|
|
7879
|
-
__decorateClass$
|
|
7914
|
+
__decorateClass$v([
|
|
7880
7915
|
property()
|
|
7881
7916
|
], exports.GodrayEffect.prototype, "parallel", 2);
|
|
7882
|
-
__decorateClass$
|
|
7917
|
+
__decorateClass$v([
|
|
7883
7918
|
property()
|
|
7884
7919
|
], exports.GodrayEffect.prototype, "center", 2);
|
|
7885
|
-
__decorateClass$
|
|
7920
|
+
__decorateClass$v([
|
|
7886
7921
|
property()
|
|
7887
7922
|
], exports.GodrayEffect.prototype, "alpha", 2);
|
|
7888
|
-
exports.GodrayEffect = __decorateClass$
|
|
7923
|
+
exports.GodrayEffect = __decorateClass$v([
|
|
7889
7924
|
customNode("GodrayEffect")
|
|
7890
7925
|
], exports.GodrayEffect);
|
|
7891
7926
|
|
|
7892
|
-
var __defProp$
|
|
7927
|
+
var __defProp$u = Object.defineProperty;
|
|
7893
7928
|
var __getOwnPropDesc$r = Object.getOwnPropertyDescriptor;
|
|
7894
|
-
var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$
|
|
7895
|
-
var __decorateClass$
|
|
7929
|
+
var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7930
|
+
var __decorateClass$u = (decorators, target, key, kind) => {
|
|
7896
7931
|
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$r(target, key) : target;
|
|
7897
7932
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7898
7933
|
if (decorator = decorators[i])
|
|
7899
7934
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7900
|
-
if (kind && result) __defProp$
|
|
7935
|
+
if (kind && result) __defProp$u(target, key, result);
|
|
7901
7936
|
return result;
|
|
7902
7937
|
};
|
|
7903
7938
|
var __publicField$9 = (obj, key, value) => __defNormalProp$9(obj, key + "" , value);
|
|
@@ -7971,25 +8006,25 @@ void main(void) {
|
|
|
7971
8006
|
}
|
|
7972
8007
|
}`
|
|
7973
8008
|
}));
|
|
7974
|
-
__decorateClass$
|
|
8009
|
+
__decorateClass$u([
|
|
7975
8010
|
protectedProperty()
|
|
7976
8011
|
], exports.MaskEffect.prototype, "texture", 2);
|
|
7977
|
-
__decorateClass$
|
|
8012
|
+
__decorateClass$u([
|
|
7978
8013
|
property({ default: "" })
|
|
7979
8014
|
], exports.MaskEffect.prototype, "src", 2);
|
|
7980
|
-
exports.MaskEffect = __decorateClass$
|
|
8015
|
+
exports.MaskEffect = __decorateClass$u([
|
|
7981
8016
|
customNode("MaskEffect")
|
|
7982
8017
|
], exports.MaskEffect);
|
|
7983
8018
|
|
|
7984
|
-
var __defProp$
|
|
8019
|
+
var __defProp$t = Object.defineProperty;
|
|
7985
8020
|
var __getOwnPropDesc$q = Object.getOwnPropertyDescriptor;
|
|
7986
|
-
var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$
|
|
7987
|
-
var __decorateClass$
|
|
8021
|
+
var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$t(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8022
|
+
var __decorateClass$t = (decorators, target, key, kind) => {
|
|
7988
8023
|
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$q(target, key) : target;
|
|
7989
8024
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7990
8025
|
if (decorator = decorators[i])
|
|
7991
8026
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7992
|
-
if (kind && result) __defProp$
|
|
8027
|
+
if (kind && result) __defProp$t(target, key, result);
|
|
7993
8028
|
return result;
|
|
7994
8029
|
};
|
|
7995
8030
|
var __publicField$8 = (obj, key, value) => __defNormalProp$8(obj, key + "" , value);
|
|
@@ -8046,22 +8081,22 @@ void main(void) {
|
|
|
8046
8081
|
gl_FragColor = texture2D(sampler, coord);
|
|
8047
8082
|
}`
|
|
8048
8083
|
}));
|
|
8049
|
-
__decorateClass$
|
|
8084
|
+
__decorateClass$t([
|
|
8050
8085
|
property()
|
|
8051
8086
|
], exports.PixelateEffect.prototype, "size", 2);
|
|
8052
|
-
exports.PixelateEffect = __decorateClass$
|
|
8087
|
+
exports.PixelateEffect = __decorateClass$t([
|
|
8053
8088
|
customNode("PixelateEffect")
|
|
8054
8089
|
], exports.PixelateEffect);
|
|
8055
8090
|
|
|
8056
|
-
var __defProp$
|
|
8091
|
+
var __defProp$s = Object.defineProperty;
|
|
8057
8092
|
var __getOwnPropDesc$p = Object.getOwnPropertyDescriptor;
|
|
8058
|
-
var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$
|
|
8059
|
-
var __decorateClass$
|
|
8093
|
+
var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$s(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8094
|
+
var __decorateClass$s = (decorators, target, key, kind) => {
|
|
8060
8095
|
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$p(target, key) : target;
|
|
8061
8096
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
8062
8097
|
if (decorator = decorators[i])
|
|
8063
8098
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8064
|
-
if (kind && result) __defProp$
|
|
8099
|
+
if (kind && result) __defProp$s(target, key, result);
|
|
8065
8100
|
return result;
|
|
8066
8101
|
};
|
|
8067
8102
|
var __publicField$7 = (obj, key, value) => __defNormalProp$7(obj, key + "" , value);
|
|
@@ -8114,19 +8149,19 @@ void main(void) {
|
|
|
8114
8149
|
gl_FragColor = sample;
|
|
8115
8150
|
}`
|
|
8116
8151
|
}));
|
|
8117
|
-
exports.ShadowEffect = __decorateClass$
|
|
8152
|
+
exports.ShadowEffect = __decorateClass$s([
|
|
8118
8153
|
customNode("ShadowEffect")
|
|
8119
8154
|
], exports.ShadowEffect);
|
|
8120
8155
|
|
|
8121
|
-
var __defProp$
|
|
8156
|
+
var __defProp$r = Object.defineProperty;
|
|
8122
8157
|
var __getOwnPropDesc$o = Object.getOwnPropertyDescriptor;
|
|
8123
|
-
var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$
|
|
8124
|
-
var __decorateClass$
|
|
8158
|
+
var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$r(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8159
|
+
var __decorateClass$r = (decorators, target, key, kind) => {
|
|
8125
8160
|
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$o(target, key) : target;
|
|
8126
8161
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
8127
8162
|
if (decorator = decorators[i])
|
|
8128
8163
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8129
|
-
if (kind && result) __defProp$
|
|
8164
|
+
if (kind && result) __defProp$r(target, key, result);
|
|
8130
8165
|
return result;
|
|
8131
8166
|
};
|
|
8132
8167
|
var __publicField$6 = (obj, key, value) => __defNormalProp$6(obj, key + "" , value);
|
|
@@ -8232,30 +8267,30 @@ void main() {
|
|
|
8232
8267
|
gl_FragColor = color;
|
|
8233
8268
|
}`
|
|
8234
8269
|
}));
|
|
8235
|
-
__decorateClass$
|
|
8270
|
+
__decorateClass$r([
|
|
8236
8271
|
property()
|
|
8237
8272
|
], exports.ZoomBlurEffect.prototype, "center", 2);
|
|
8238
|
-
__decorateClass$
|
|
8273
|
+
__decorateClass$r([
|
|
8239
8274
|
property()
|
|
8240
8275
|
], exports.ZoomBlurEffect.prototype, "innerRadius", 2);
|
|
8241
|
-
__decorateClass$
|
|
8276
|
+
__decorateClass$r([
|
|
8242
8277
|
property()
|
|
8243
8278
|
], exports.ZoomBlurEffect.prototype, "radius", 2);
|
|
8244
|
-
__decorateClass$
|
|
8279
|
+
__decorateClass$r([
|
|
8245
8280
|
property()
|
|
8246
8281
|
], exports.ZoomBlurEffect.prototype, "strength", 2);
|
|
8247
|
-
exports.ZoomBlurEffect = __decorateClass$
|
|
8282
|
+
exports.ZoomBlurEffect = __decorateClass$r([
|
|
8248
8283
|
customNode("ZoomBlurEffect")
|
|
8249
8284
|
], exports.ZoomBlurEffect);
|
|
8250
8285
|
|
|
8251
|
-
var __defProp$
|
|
8286
|
+
var __defProp$q = Object.defineProperty;
|
|
8252
8287
|
var __getOwnPropDesc$n = Object.getOwnPropertyDescriptor;
|
|
8253
|
-
var __decorateClass$
|
|
8288
|
+
var __decorateClass$q = (decorators, target, key, kind) => {
|
|
8254
8289
|
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$n(target, key) : target;
|
|
8255
8290
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
8256
8291
|
if (decorator = decorators[i])
|
|
8257
8292
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8258
|
-
if (kind && result) __defProp$
|
|
8293
|
+
if (kind && result) __defProp$q(target, key, result);
|
|
8259
8294
|
return result;
|
|
8260
8295
|
};
|
|
8261
8296
|
exports.CanvasItem = class CanvasItem extends exports.TimelineNode {
|
|
@@ -8343,31 +8378,31 @@ exports.CanvasItem = class CanvasItem extends exports.TimelineNode {
|
|
|
8343
8378
|
}
|
|
8344
8379
|
}
|
|
8345
8380
|
_updateBoxShadow() {
|
|
8346
|
-
const
|
|
8381
|
+
const name = "__$style.shadow";
|
|
8347
8382
|
if (this.style.boxShadow !== "none") {
|
|
8348
|
-
const node = this.getNode(
|
|
8383
|
+
const node = this.getNode(name);
|
|
8349
8384
|
if (node) ; else {
|
|
8350
|
-
this.appendChild(new exports.ShadowEffect(), "back");
|
|
8385
|
+
this.appendChild(new exports.ShadowEffect({ name }), "back");
|
|
8351
8386
|
}
|
|
8352
8387
|
} else {
|
|
8353
|
-
const node = this.getNode(
|
|
8388
|
+
const node = this.getNode(name);
|
|
8354
8389
|
if (node) {
|
|
8355
8390
|
this.removeChild(node);
|
|
8356
8391
|
}
|
|
8357
8392
|
}
|
|
8358
8393
|
}
|
|
8359
8394
|
_updateMaskImage() {
|
|
8360
|
-
const
|
|
8395
|
+
const name = "__$style.maskImage";
|
|
8361
8396
|
const maskImage = this.style.maskImage;
|
|
8362
8397
|
if (maskImage && maskImage !== "none") {
|
|
8363
|
-
const node = this.getNode(
|
|
8398
|
+
const node = this.getNode(name);
|
|
8364
8399
|
if (node) {
|
|
8365
8400
|
node.src = maskImage;
|
|
8366
8401
|
} else {
|
|
8367
|
-
this.appendChild(new exports.MaskEffect({ src: maskImage }), "back");
|
|
8402
|
+
this.appendChild(new exports.MaskEffect({ name, src: maskImage }), "back");
|
|
8368
8403
|
}
|
|
8369
8404
|
} else {
|
|
8370
|
-
const node = this.getNode(
|
|
8405
|
+
const node = this.getNode(name);
|
|
8371
8406
|
if (node) {
|
|
8372
8407
|
this.removeChild(node);
|
|
8373
8408
|
}
|
|
@@ -8550,13 +8585,13 @@ exports.CanvasItem = class CanvasItem extends exports.TimelineNode {
|
|
|
8550
8585
|
};
|
|
8551
8586
|
}
|
|
8552
8587
|
};
|
|
8553
|
-
__decorateClass$
|
|
8588
|
+
__decorateClass$q([
|
|
8554
8589
|
property()
|
|
8555
8590
|
], exports.CanvasItem.prototype, "modulate", 2);
|
|
8556
|
-
__decorateClass$
|
|
8591
|
+
__decorateClass$q([
|
|
8557
8592
|
property()
|
|
8558
8593
|
], exports.CanvasItem.prototype, "blendMode", 2);
|
|
8559
|
-
exports.CanvasItem = __decorateClass$
|
|
8594
|
+
exports.CanvasItem = __decorateClass$q([
|
|
8560
8595
|
customNode("CanvasItem")
|
|
8561
8596
|
], exports.CanvasItem);
|
|
8562
8597
|
|
|
@@ -8586,14 +8621,14 @@ class RenderStack {
|
|
|
8586
8621
|
}
|
|
8587
8622
|
}
|
|
8588
8623
|
|
|
8589
|
-
var __defProp$
|
|
8624
|
+
var __defProp$p = Object.defineProperty;
|
|
8590
8625
|
var __getOwnPropDesc$m = Object.getOwnPropertyDescriptor;
|
|
8591
|
-
var __decorateClass$
|
|
8626
|
+
var __decorateClass$p = (decorators, target, key, kind) => {
|
|
8592
8627
|
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$m(target, key) : target;
|
|
8593
8628
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
8594
8629
|
if (decorator = decorators[i])
|
|
8595
8630
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8596
|
-
if (kind && result) __defProp$
|
|
8631
|
+
if (kind && result) __defProp$p(target, key, result);
|
|
8597
8632
|
return result;
|
|
8598
8633
|
};
|
|
8599
8634
|
exports.Timeline = class Timeline extends exports.Node {
|
|
@@ -8638,29 +8673,29 @@ exports.Timeline = class Timeline extends exports.Node {
|
|
|
8638
8673
|
this.addTime(delta);
|
|
8639
8674
|
}
|
|
8640
8675
|
};
|
|
8641
|
-
__decorateClass$
|
|
8676
|
+
__decorateClass$p([
|
|
8642
8677
|
property({ default: 0 })
|
|
8643
8678
|
], exports.Timeline.prototype, "startTime", 2);
|
|
8644
|
-
__decorateClass$
|
|
8679
|
+
__decorateClass$p([
|
|
8645
8680
|
property({ default: 0 })
|
|
8646
8681
|
], exports.Timeline.prototype, "currentTime", 2);
|
|
8647
|
-
__decorateClass$
|
|
8682
|
+
__decorateClass$p([
|
|
8648
8683
|
property({ default: Number.MAX_SAFE_INTEGER })
|
|
8649
8684
|
], exports.Timeline.prototype, "endTime", 2);
|
|
8650
|
-
__decorateClass$
|
|
8685
|
+
__decorateClass$p([
|
|
8651
8686
|
property({ default: false })
|
|
8652
8687
|
], exports.Timeline.prototype, "loop", 2);
|
|
8653
|
-
exports.Timeline = __decorateClass$
|
|
8688
|
+
exports.Timeline = __decorateClass$p([
|
|
8654
8689
|
customNode("Timeline")
|
|
8655
8690
|
], exports.Timeline);
|
|
8656
8691
|
|
|
8657
|
-
var __defProp$
|
|
8658
|
-
var __decorateClass$
|
|
8692
|
+
var __defProp$o = Object.defineProperty;
|
|
8693
|
+
var __decorateClass$o = (decorators, target, key, kind) => {
|
|
8659
8694
|
var result = undefined ;
|
|
8660
8695
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
8661
8696
|
if (decorator = decorators[i])
|
|
8662
8697
|
result = (decorator(target, key, result) ) || result;
|
|
8663
|
-
if (result) __defProp$
|
|
8698
|
+
if (result) __defProp$o(target, key, result);
|
|
8664
8699
|
return result;
|
|
8665
8700
|
};
|
|
8666
8701
|
class SceneTree extends MainLoop {
|
|
@@ -8721,21 +8756,21 @@ class SceneTree extends MainLoop {
|
|
|
8721
8756
|
renderer.texture.unbind(texture);
|
|
8722
8757
|
}
|
|
8723
8758
|
}
|
|
8724
|
-
__decorateClass$
|
|
8759
|
+
__decorateClass$o([
|
|
8725
8760
|
property({ default: false })
|
|
8726
8761
|
], SceneTree.prototype, "paused");
|
|
8727
|
-
__decorateClass$
|
|
8762
|
+
__decorateClass$o([
|
|
8728
8763
|
property()
|
|
8729
8764
|
], SceneTree.prototype, "backgroundColor");
|
|
8730
8765
|
|
|
8731
|
-
var __defProp$
|
|
8766
|
+
var __defProp$n = Object.defineProperty;
|
|
8732
8767
|
var __getOwnPropDesc$l = Object.getOwnPropertyDescriptor;
|
|
8733
|
-
var __decorateClass$
|
|
8768
|
+
var __decorateClass$n = (decorators, target, key, kind) => {
|
|
8734
8769
|
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$l(target, key) : target;
|
|
8735
8770
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
8736
8771
|
if (decorator = decorators[i])
|
|
8737
8772
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8738
|
-
if (kind && result) __defProp$
|
|
8773
|
+
if (kind && result) __defProp$n(target, key, result);
|
|
8739
8774
|
return result;
|
|
8740
8775
|
};
|
|
8741
8776
|
exports.Transition = class Transition extends exports.Effect {
|
|
@@ -8744,7 +8779,7 @@ exports.Transition = class Transition extends exports.Effect {
|
|
|
8744
8779
|
this.setProperties(properties).append(children);
|
|
8745
8780
|
}
|
|
8746
8781
|
};
|
|
8747
|
-
exports.Transition = __decorateClass$
|
|
8782
|
+
exports.Transition = __decorateClass$n([
|
|
8748
8783
|
customNode("Transition", {
|
|
8749
8784
|
effectMode: "transition",
|
|
8750
8785
|
processMode: "pausable",
|
|
@@ -8752,14 +8787,14 @@ exports.Transition = __decorateClass$m([
|
|
|
8752
8787
|
})
|
|
8753
8788
|
], exports.Transition);
|
|
8754
8789
|
|
|
8755
|
-
var __defProp$
|
|
8790
|
+
var __defProp$m = Object.defineProperty;
|
|
8756
8791
|
var __getOwnPropDesc$k = Object.getOwnPropertyDescriptor;
|
|
8757
|
-
var __decorateClass$
|
|
8792
|
+
var __decorateClass$m = (decorators, target, key, kind) => {
|
|
8758
8793
|
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$k(target, key) : target;
|
|
8759
8794
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
8760
8795
|
if (decorator = decorators[i])
|
|
8761
8796
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8762
|
-
if (kind && result) __defProp$
|
|
8797
|
+
if (kind && result) __defProp$m(target, key, result);
|
|
8763
8798
|
return result;
|
|
8764
8799
|
};
|
|
8765
8800
|
exports.Node2D = class Node2D extends exports.CanvasItem {
|
|
@@ -8769,8 +8804,8 @@ exports.Node2D = class Node2D extends exports.CanvasItem {
|
|
|
8769
8804
|
super();
|
|
8770
8805
|
this.setProperties(properties).append(children);
|
|
8771
8806
|
}
|
|
8772
|
-
_updateStyleProperty(key, value, oldValue) {
|
|
8773
|
-
super._updateStyleProperty(key, value, oldValue);
|
|
8807
|
+
_updateStyleProperty(key, value, oldValue, declaration) {
|
|
8808
|
+
super._updateStyleProperty(key, value, oldValue, declaration);
|
|
8774
8809
|
switch (key) {
|
|
8775
8810
|
case "width":
|
|
8776
8811
|
case "height":
|
|
@@ -8900,18 +8935,18 @@ exports.Node2D = class Node2D extends exports.CanvasItem {
|
|
|
8900
8935
|
);
|
|
8901
8936
|
}
|
|
8902
8937
|
};
|
|
8903
|
-
exports.Node2D = __decorateClass$
|
|
8938
|
+
exports.Node2D = __decorateClass$m([
|
|
8904
8939
|
customNode("Node2D")
|
|
8905
8940
|
], exports.Node2D);
|
|
8906
8941
|
|
|
8907
|
-
var __defProp$
|
|
8942
|
+
var __defProp$l = Object.defineProperty;
|
|
8908
8943
|
var __getOwnPropDesc$j = Object.getOwnPropertyDescriptor;
|
|
8909
|
-
var __decorateClass$
|
|
8944
|
+
var __decorateClass$l = (decorators, target, key, kind) => {
|
|
8910
8945
|
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$j(target, key) : target;
|
|
8911
8946
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
8912
8947
|
if (decorator = decorators[i])
|
|
8913
8948
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8914
|
-
if (kind && result) __defProp$
|
|
8949
|
+
if (kind && result) __defProp$l(target, key, result);
|
|
8915
8950
|
return result;
|
|
8916
8951
|
};
|
|
8917
8952
|
function proxy(options) {
|
|
@@ -8956,98 +8991,72 @@ exports.Graphics2D = class Graphics2D extends exports.Node2D {
|
|
|
8956
8991
|
return this;
|
|
8957
8992
|
}
|
|
8958
8993
|
};
|
|
8959
|
-
__decorateClass$
|
|
8994
|
+
__decorateClass$l([
|
|
8960
8995
|
proxy()
|
|
8961
8996
|
], exports.Graphics2D.prototype, "lineCap", 2);
|
|
8962
|
-
__decorateClass$
|
|
8997
|
+
__decorateClass$l([
|
|
8963
8998
|
proxy()
|
|
8964
8999
|
], exports.Graphics2D.prototype, "lineJoin", 2);
|
|
8965
|
-
__decorateClass$
|
|
9000
|
+
__decorateClass$l([
|
|
8966
9001
|
proxy()
|
|
8967
9002
|
], exports.Graphics2D.prototype, "fillStyle", 2);
|
|
8968
|
-
__decorateClass$
|
|
9003
|
+
__decorateClass$l([
|
|
8969
9004
|
proxy()
|
|
8970
9005
|
], exports.Graphics2D.prototype, "strokeStyle", 2);
|
|
8971
|
-
__decorateClass$
|
|
9006
|
+
__decorateClass$l([
|
|
8972
9007
|
proxy()
|
|
8973
9008
|
], exports.Graphics2D.prototype, "lineWidth", 2);
|
|
8974
|
-
__decorateClass$
|
|
9009
|
+
__decorateClass$l([
|
|
8975
9010
|
proxy()
|
|
8976
9011
|
], exports.Graphics2D.prototype, "miterLimit", 2);
|
|
8977
|
-
__decorateClass$
|
|
9012
|
+
__decorateClass$l([
|
|
8978
9013
|
proxy({ method: true })
|
|
8979
9014
|
], exports.Graphics2D.prototype, "rect", 2);
|
|
8980
|
-
__decorateClass$
|
|
9015
|
+
__decorateClass$l([
|
|
8981
9016
|
proxy({ method: true, redraw: true })
|
|
8982
9017
|
], exports.Graphics2D.prototype, "fillRect", 2);
|
|
8983
|
-
__decorateClass$
|
|
9018
|
+
__decorateClass$l([
|
|
8984
9019
|
proxy({ method: true, redraw: true })
|
|
8985
9020
|
], exports.Graphics2D.prototype, "strokeRect", 2);
|
|
8986
|
-
__decorateClass$
|
|
9021
|
+
__decorateClass$l([
|
|
8987
9022
|
proxy({ method: true })
|
|
8988
9023
|
], exports.Graphics2D.prototype, "roundRect", 2);
|
|
8989
|
-
__decorateClass$
|
|
9024
|
+
__decorateClass$l([
|
|
8990
9025
|
proxy({ method: true })
|
|
8991
9026
|
], exports.Graphics2D.prototype, "ellipse", 2);
|
|
8992
|
-
__decorateClass$
|
|
9027
|
+
__decorateClass$l([
|
|
8993
9028
|
proxy({ method: true })
|
|
8994
9029
|
], exports.Graphics2D.prototype, "arc", 2);
|
|
8995
|
-
__decorateClass$
|
|
9030
|
+
__decorateClass$l([
|
|
8996
9031
|
proxy({ method: true })
|
|
8997
9032
|
], exports.Graphics2D.prototype, "beginPath", 2);
|
|
8998
|
-
__decorateClass$
|
|
9033
|
+
__decorateClass$l([
|
|
8999
9034
|
proxy({ method: true })
|
|
9000
9035
|
], exports.Graphics2D.prototype, "moveTo", 2);
|
|
9001
|
-
__decorateClass$
|
|
9036
|
+
__decorateClass$l([
|
|
9002
9037
|
proxy({ method: true })
|
|
9003
9038
|
], exports.Graphics2D.prototype, "lineTo", 2);
|
|
9004
|
-
__decorateClass$
|
|
9039
|
+
__decorateClass$l([
|
|
9005
9040
|
proxy({ method: true })
|
|
9006
9041
|
], exports.Graphics2D.prototype, "closePath", 2);
|
|
9007
|
-
__decorateClass$
|
|
9042
|
+
__decorateClass$l([
|
|
9008
9043
|
proxy({ method: true, redraw: true })
|
|
9009
9044
|
], exports.Graphics2D.prototype, "fill", 2);
|
|
9010
|
-
__decorateClass$
|
|
9045
|
+
__decorateClass$l([
|
|
9011
9046
|
proxy({ method: true, redraw: true })
|
|
9012
9047
|
], exports.Graphics2D.prototype, "stroke", 2);
|
|
9013
|
-
exports.Graphics2D = __decorateClass$
|
|
9048
|
+
exports.Graphics2D = __decorateClass$l([
|
|
9014
9049
|
customNode("Graphics2D")
|
|
9015
9050
|
], exports.Graphics2D);
|
|
9016
9051
|
|
|
9017
|
-
|
|
9018
|
-
frames;
|
|
9019
|
-
constructor(source) {
|
|
9020
|
-
super();
|
|
9021
|
-
let frames;
|
|
9022
|
-
if (Array.isArray(source)) {
|
|
9023
|
-
frames = source;
|
|
9024
|
-
} else if (source instanceof Texture2D) {
|
|
9025
|
-
frames = [{ texture: source, duration: 0 }];
|
|
9026
|
-
} else {
|
|
9027
|
-
throw new TypeError("Failed new Image2DResource");
|
|
9028
|
-
}
|
|
9029
|
-
this.frames = frames;
|
|
9030
|
-
this.updateDuration();
|
|
9031
|
-
}
|
|
9032
|
-
updateDuration() {
|
|
9033
|
-
this.duration = this.frames.reduce((duration, frame) => frame.duration + duration, 0);
|
|
9034
|
-
return this;
|
|
9035
|
-
}
|
|
9036
|
-
destroy() {
|
|
9037
|
-
this.frames.forEach((frame) => {
|
|
9038
|
-
frame.texture.destroy();
|
|
9039
|
-
});
|
|
9040
|
-
}
|
|
9041
|
-
}
|
|
9042
|
-
|
|
9043
|
-
var __defProp$j = Object.defineProperty;
|
|
9052
|
+
var __defProp$k = Object.defineProperty;
|
|
9044
9053
|
var __getOwnPropDesc$i = Object.getOwnPropertyDescriptor;
|
|
9045
|
-
var __decorateClass$
|
|
9054
|
+
var __decorateClass$k = (decorators, target, key, kind) => {
|
|
9046
9055
|
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$i(target, key) : target;
|
|
9047
9056
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
9048
9057
|
if (decorator = decorators[i])
|
|
9049
9058
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
9050
|
-
if (kind && result) __defProp$
|
|
9059
|
+
if (kind && result) __defProp$k(target, key, result);
|
|
9051
9060
|
return result;
|
|
9052
9061
|
};
|
|
9053
9062
|
exports.Image2D = class Image2D extends exports.Node2D {
|
|
@@ -9089,10 +9098,10 @@ exports.Image2D = class Image2D extends exports.Node2D {
|
|
|
9089
9098
|
}
|
|
9090
9099
|
setResource(source) {
|
|
9091
9100
|
let resource;
|
|
9092
|
-
if (source instanceof
|
|
9101
|
+
if (source instanceof AnimatedTexture) {
|
|
9093
9102
|
resource = source;
|
|
9094
9103
|
} else {
|
|
9095
|
-
resource = new
|
|
9104
|
+
resource = new AnimatedTexture(source);
|
|
9096
9105
|
}
|
|
9097
9106
|
this.resource = resource.updateDuration();
|
|
9098
9107
|
if (this.currentTexture && (!this.style.width || !this.style.height)) {
|
|
@@ -9167,16 +9176,16 @@ exports.Image2D = class Image2D extends exports.Node2D {
|
|
|
9167
9176
|
}
|
|
9168
9177
|
}
|
|
9169
9178
|
};
|
|
9170
|
-
__decorateClass$
|
|
9179
|
+
__decorateClass$k([
|
|
9171
9180
|
protectedProperty()
|
|
9172
9181
|
], exports.Image2D.prototype, "resource", 2);
|
|
9173
|
-
__decorateClass$
|
|
9182
|
+
__decorateClass$k([
|
|
9174
9183
|
property({ default: false })
|
|
9175
9184
|
], exports.Image2D.prototype, "gif", 2);
|
|
9176
|
-
__decorateClass$
|
|
9185
|
+
__decorateClass$k([
|
|
9177
9186
|
property({ default: "" })
|
|
9178
9187
|
], exports.Image2D.prototype, "src", 2);
|
|
9179
|
-
exports.Image2D = __decorateClass$
|
|
9188
|
+
exports.Image2D = __decorateClass$k([
|
|
9180
9189
|
customNode("Image2D")
|
|
9181
9190
|
], exports.Image2D);
|
|
9182
9191
|
|
|
@@ -9194,14 +9203,14 @@ class TextureRect2D extends exports.Node2D {
|
|
|
9194
9203
|
}
|
|
9195
9204
|
}
|
|
9196
9205
|
|
|
9197
|
-
var __defProp$
|
|
9206
|
+
var __defProp$j = Object.defineProperty;
|
|
9198
9207
|
var __getOwnPropDesc$h = Object.getOwnPropertyDescriptor;
|
|
9199
|
-
var __decorateClass$
|
|
9208
|
+
var __decorateClass$j = (decorators, target, key, kind) => {
|
|
9200
9209
|
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$h(target, key) : target;
|
|
9201
9210
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
9202
9211
|
if (decorator = decorators[i])
|
|
9203
9212
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
9204
|
-
if (kind && result) __defProp$
|
|
9213
|
+
if (kind && result) __defProp$j(target, key, result);
|
|
9205
9214
|
return result;
|
|
9206
9215
|
};
|
|
9207
9216
|
exports.Lottie2D = class Lottie2D extends TextureRect2D {
|
|
@@ -9244,21 +9253,21 @@ exports.Lottie2D = class Lottie2D extends TextureRect2D {
|
|
|
9244
9253
|
super._process(delta);
|
|
9245
9254
|
}
|
|
9246
9255
|
};
|
|
9247
|
-
__decorateClass$
|
|
9256
|
+
__decorateClass$j([
|
|
9248
9257
|
property({ default: "" })
|
|
9249
9258
|
], exports.Lottie2D.prototype, "src", 2);
|
|
9250
|
-
exports.Lottie2D = __decorateClass$
|
|
9259
|
+
exports.Lottie2D = __decorateClass$j([
|
|
9251
9260
|
customNode("Lottie2D")
|
|
9252
9261
|
], exports.Lottie2D);
|
|
9253
9262
|
|
|
9254
|
-
var __defProp$
|
|
9263
|
+
var __defProp$i = Object.defineProperty;
|
|
9255
9264
|
var __getOwnPropDesc$g = Object.getOwnPropertyDescriptor;
|
|
9256
|
-
var __decorateClass$
|
|
9265
|
+
var __decorateClass$i = (decorators, target, key, kind) => {
|
|
9257
9266
|
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$g(target, key) : target;
|
|
9258
9267
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
9259
9268
|
if (decorator = decorators[i])
|
|
9260
9269
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
9261
|
-
if (kind && result) __defProp$
|
|
9270
|
+
if (kind && result) __defProp$i(target, key, result);
|
|
9262
9271
|
return result;
|
|
9263
9272
|
};
|
|
9264
9273
|
const textStyles = new Set(Object.keys(modernText.textDefaultStyle));
|
|
@@ -9396,25 +9405,77 @@ exports.Text2D = class Text2D extends TextureRect2D {
|
|
|
9396
9405
|
}
|
|
9397
9406
|
}
|
|
9398
9407
|
};
|
|
9399
|
-
__decorateClass$
|
|
9408
|
+
__decorateClass$i([
|
|
9400
9409
|
property({ default: false })
|
|
9401
9410
|
], exports.Text2D.prototype, "split", 2);
|
|
9402
|
-
__decorateClass$
|
|
9411
|
+
__decorateClass$i([
|
|
9403
9412
|
property({ default: "" })
|
|
9404
9413
|
], exports.Text2D.prototype, "content", 2);
|
|
9405
|
-
__decorateClass$
|
|
9414
|
+
__decorateClass$i([
|
|
9406
9415
|
property()
|
|
9407
9416
|
], exports.Text2D.prototype, "effects", 2);
|
|
9408
|
-
__decorateClass$
|
|
9417
|
+
__decorateClass$i([
|
|
9409
9418
|
protectedProperty()
|
|
9410
9419
|
], exports.Text2D.prototype, "measureDom", 2);
|
|
9411
|
-
__decorateClass$
|
|
9420
|
+
__decorateClass$i([
|
|
9412
9421
|
protectedProperty()
|
|
9413
9422
|
], exports.Text2D.prototype, "fonts", 2);
|
|
9414
|
-
exports.Text2D = __decorateClass$
|
|
9423
|
+
exports.Text2D = __decorateClass$i([
|
|
9415
9424
|
customNode("Text2D")
|
|
9416
9425
|
], exports.Text2D);
|
|
9417
9426
|
|
|
9427
|
+
var __defProp$h = Object.defineProperty;
|
|
9428
|
+
var __decorateClass$h = (decorators, target, key, kind) => {
|
|
9429
|
+
var result = undefined ;
|
|
9430
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
9431
|
+
if (decorator = decorators[i])
|
|
9432
|
+
result = (decorator(target, key, result) ) || result;
|
|
9433
|
+
if (result) __defProp$h(target, key, result);
|
|
9434
|
+
return result;
|
|
9435
|
+
};
|
|
9436
|
+
class TransformRect2D extends exports.Node2D {
|
|
9437
|
+
_updateStyleProperty(key, value, oldValue, declaration) {
|
|
9438
|
+
super._updateStyleProperty(key, value, oldValue, declaration);
|
|
9439
|
+
switch (key) {
|
|
9440
|
+
case "width":
|
|
9441
|
+
case "height":
|
|
9442
|
+
this.requestRedraw();
|
|
9443
|
+
break;
|
|
9444
|
+
}
|
|
9445
|
+
}
|
|
9446
|
+
_drawCircle(x, y) {
|
|
9447
|
+
this.context.arc(x, y, this.size, 0, Math.PI * 2, true);
|
|
9448
|
+
this.context.fillStyle = Texture2D.WHITE;
|
|
9449
|
+
this.context.fill();
|
|
9450
|
+
this.context.arc(x, y, this.size, 0, Math.PI * 2, true);
|
|
9451
|
+
this.context.strokeStyle = "rgba(0, 0, 0, 0.2)";
|
|
9452
|
+
this.context.stroke();
|
|
9453
|
+
}
|
|
9454
|
+
_drawEllipse(x, y) {
|
|
9455
|
+
this.context.roundRect(x - this.size, y - this.size * 2, this.size * 2, this.size * 4, this.size);
|
|
9456
|
+
this.context.fillStyle = Texture2D.WHITE;
|
|
9457
|
+
this.context.fill();
|
|
9458
|
+
this.context.roundRect(x - this.size, y - this.size * 2, this.size * 2, this.size * 4, this.size);
|
|
9459
|
+
this.context.strokeStyle = "rgba(0, 0, 0, 0.2)";
|
|
9460
|
+
this.context.stroke();
|
|
9461
|
+
}
|
|
9462
|
+
_draw() {
|
|
9463
|
+
const { width, height } = this.style;
|
|
9464
|
+
this.context.rect(0, 0, width, height);
|
|
9465
|
+
this.context.strokeStyle = "#00FF00";
|
|
9466
|
+
this.context.stroke();
|
|
9467
|
+
this._drawCircle(0, 0);
|
|
9468
|
+
this._drawCircle(width, height);
|
|
9469
|
+
this._drawCircle(0, height);
|
|
9470
|
+
this._drawEllipse(0, height / 2);
|
|
9471
|
+
this._drawCircle(width, 0);
|
|
9472
|
+
this._drawEllipse(width, height / 2);
|
|
9473
|
+
}
|
|
9474
|
+
}
|
|
9475
|
+
__decorateClass$h([
|
|
9476
|
+
property({ default: 6 })
|
|
9477
|
+
], TransformRect2D.prototype, "size");
|
|
9478
|
+
|
|
9418
9479
|
var __defProp$g = Object.defineProperty;
|
|
9419
9480
|
var __getOwnPropDesc$f = Object.getOwnPropertyDescriptor;
|
|
9420
9481
|
var __decorateClass$g = (decorators, target, key, kind) => {
|
|
@@ -12885,11 +12946,11 @@ exports.TwistTransition = __decorateClass([
|
|
|
12885
12946
|
customNode("TwistTransition")
|
|
12886
12947
|
], exports.TwistTransition);
|
|
12887
12948
|
|
|
12888
|
-
class
|
|
12949
|
+
class GIFLoader extends Loader {
|
|
12889
12950
|
install(assets) {
|
|
12890
12951
|
const handler = async (url) => {
|
|
12891
12952
|
const { decodeFrames } = await import('modern-gif');
|
|
12892
|
-
return await assets.fetch(url).then((res) => res.arrayBuffer()).then((buffer) => decodeFrames(buffer)).then((frames) => new
|
|
12953
|
+
return await assets.fetch(url).then((res) => res.arrayBuffer()).then((buffer) => decodeFrames(buffer)).then((frames) => new AnimatedTexture(
|
|
12893
12954
|
frames.map((frame) => {
|
|
12894
12955
|
return {
|
|
12895
12956
|
duration: frame.delay,
|
|
@@ -12911,7 +12972,7 @@ class GifLoader extends Loader {
|
|
|
12911
12972
|
}
|
|
12912
12973
|
}
|
|
12913
12974
|
|
|
12914
|
-
class
|
|
12975
|
+
class JSONLoader extends Loader {
|
|
12915
12976
|
install(assets) {
|
|
12916
12977
|
const handler = (url) => {
|
|
12917
12978
|
return assets.fetch(url).then((rep) => rep.json());
|
|
@@ -13221,9 +13282,14 @@ class Assets {
|
|
|
13221
13282
|
this._handled.clear();
|
|
13222
13283
|
}
|
|
13223
13284
|
}
|
|
13224
|
-
const assets = new Assets().use(new FontLoader()).use(new
|
|
13285
|
+
const assets = new Assets().use(new FontLoader()).use(new GIFLoader()).use(new JSONLoader()).use(new LottieLoader()).use(new TextLoader()).use(new TextureLoader()).use(new VideoLoader());
|
|
13225
13286
|
|
|
13226
13287
|
class CanvasItemEditor extends exports.Control {
|
|
13288
|
+
_pointerStart;
|
|
13289
|
+
_pointerOffset;
|
|
13290
|
+
selected;
|
|
13291
|
+
dragging;
|
|
13292
|
+
hovered;
|
|
13227
13293
|
hover = new exports.Node2D({
|
|
13228
13294
|
name: "hover",
|
|
13229
13295
|
internalMode: "back",
|
|
@@ -13235,28 +13301,20 @@ class CanvasItemEditor extends exports.Control {
|
|
|
13235
13301
|
pointerEvents: "none"
|
|
13236
13302
|
}
|
|
13237
13303
|
});
|
|
13238
|
-
|
|
13239
|
-
name: "
|
|
13304
|
+
transformRect = new TransformRect2D({
|
|
13305
|
+
name: "transformRect",
|
|
13240
13306
|
internalMode: "back",
|
|
13241
13307
|
style: {
|
|
13242
13308
|
visibility: "hidden",
|
|
13243
|
-
width: 1,
|
|
13244
|
-
height: 1,
|
|
13245
|
-
backgroundColor: 16711695,
|
|
13246
|
-
outlineStyle: "solid",
|
|
13247
|
-
outlineColor: 16711935,
|
|
13248
|
-
outlineWidth: 2,
|
|
13249
13309
|
pointerEvents: "none"
|
|
13250
13310
|
}
|
|
13251
13311
|
});
|
|
13252
|
-
selector = new exports.Node2D({
|
|
13253
|
-
name: "selector"
|
|
13254
|
-
});
|
|
13255
13312
|
scaler = new exports.Scaler({
|
|
13256
13313
|
internalMode: "back"
|
|
13257
13314
|
}).on("updateScale", (scale) => {
|
|
13258
13315
|
this.ruler.scale = scale;
|
|
13259
13316
|
this._updateScrollbars();
|
|
13317
|
+
this._updateSelectionRect();
|
|
13260
13318
|
});
|
|
13261
13319
|
xScrollBar = new exports.XScrollBar({
|
|
13262
13320
|
internalMode: "back",
|
|
@@ -13290,13 +13348,10 @@ class CanvasItemEditor extends exports.Control {
|
|
|
13290
13348
|
}, [
|
|
13291
13349
|
this.drawboard,
|
|
13292
13350
|
this.hover,
|
|
13293
|
-
this.
|
|
13351
|
+
this.transformRect,
|
|
13294
13352
|
this.xScrollBar,
|
|
13295
13353
|
this.yScrollBar
|
|
13296
13354
|
]);
|
|
13297
|
-
_pointerStart;
|
|
13298
|
-
_pointerOffset;
|
|
13299
|
-
selected;
|
|
13300
13355
|
constructor() {
|
|
13301
13356
|
super();
|
|
13302
13357
|
this._onPointerdown = this._onPointerdown.bind(this);
|
|
@@ -13334,51 +13389,60 @@ class CanvasItemEditor extends exports.Control {
|
|
|
13334
13389
|
_onPointerdown(e) {
|
|
13335
13390
|
const target = e.target;
|
|
13336
13391
|
this._pointerOffset = { x: e.offsetX, y: e.offsetY };
|
|
13392
|
+
this.selected = target;
|
|
13393
|
+
this.dragging = target;
|
|
13337
13394
|
if (target instanceof exports.Node2D) {
|
|
13338
|
-
this.selected = target;
|
|
13339
13395
|
this._pointerStart = target.style.clone();
|
|
13340
13396
|
} else {
|
|
13341
|
-
this.selected = undefined;
|
|
13342
13397
|
this._pointerStart = undefined;
|
|
13343
|
-
this.selectionRect.style.visibility = "visible";
|
|
13344
|
-
this.selectionRect.style.left = e.screen.x;
|
|
13345
|
-
this.selectionRect.style.top = e.screen.y;
|
|
13346
|
-
this.selectionRect.style.width = 1;
|
|
13347
|
-
this.selectionRect.style.height = 1;
|
|
13348
13398
|
}
|
|
13349
|
-
this.
|
|
13399
|
+
this._updateHover();
|
|
13400
|
+
this._updateSelectionRect();
|
|
13350
13401
|
}
|
|
13351
13402
|
_onPointermove(e) {
|
|
13352
|
-
const
|
|
13353
|
-
const
|
|
13354
|
-
if (selected &&
|
|
13355
|
-
|
|
13356
|
-
selected.style.top = _pointerStart.top + offset.y;
|
|
13403
|
+
const target = e.target;
|
|
13404
|
+
const { selected, dragging, _pointerStart, _pointerOffset } = this;
|
|
13405
|
+
if (selected && target?.is(selected)) {
|
|
13406
|
+
this.hovered = undefined;
|
|
13357
13407
|
} else {
|
|
13358
|
-
|
|
13359
|
-
this.selectionRect.style.width = offset.x;
|
|
13360
|
-
this.selectionRect.style.height = offset.y;
|
|
13361
|
-
}
|
|
13408
|
+
this.hovered = target;
|
|
13362
13409
|
}
|
|
13363
|
-
|
|
13410
|
+
const offset = _pointerOffset ? { x: e.offsetX - _pointerOffset.x, y: e.offsetY - _pointerOffset.y } : { x: 0, y: 0 };
|
|
13411
|
+
if (dragging && _pointerStart) {
|
|
13412
|
+
dragging.style.left = _pointerStart.left + offset.x;
|
|
13413
|
+
dragging.style.top = _pointerStart.top + offset.y;
|
|
13414
|
+
}
|
|
13415
|
+
this._updateHover();
|
|
13416
|
+
this._updateSelectionRect();
|
|
13364
13417
|
}
|
|
13365
13418
|
_onPointerup() {
|
|
13366
|
-
this.
|
|
13367
|
-
this.
|
|
13368
|
-
this.
|
|
13419
|
+
this.dragging = undefined;
|
|
13420
|
+
this._updateHover();
|
|
13421
|
+
this._updateSelectionRect();
|
|
13369
13422
|
}
|
|
13370
|
-
|
|
13371
|
-
const
|
|
13372
|
-
if (
|
|
13423
|
+
_updateHover() {
|
|
13424
|
+
const hovered = this.hovered;
|
|
13425
|
+
if (hovered instanceof exports.Node2D) {
|
|
13373
13426
|
this.hover.style.visibility = "visible";
|
|
13374
|
-
this.hover.style.width =
|
|
13375
|
-
this.hover.style.height =
|
|
13376
|
-
this.hover.transform.set(
|
|
13427
|
+
this.hover.style.width = hovered.style.width;
|
|
13428
|
+
this.hover.style.height = hovered.style.height;
|
|
13429
|
+
this.hover.transform.set(hovered.transform);
|
|
13377
13430
|
this.hover.requestRedraw();
|
|
13378
13431
|
} else {
|
|
13379
13432
|
this.hover.style.visibility = "hidden";
|
|
13380
13433
|
}
|
|
13381
13434
|
}
|
|
13435
|
+
_updateSelectionRect() {
|
|
13436
|
+
if (this.selected) {
|
|
13437
|
+
this.transformRect.style.visibility = "visible";
|
|
13438
|
+
this.transformRect.style.width = this.selected.style.width;
|
|
13439
|
+
this.transformRect.style.height = this.selected.style.height;
|
|
13440
|
+
this.transformRect.transform.set(this.selected.transform);
|
|
13441
|
+
this.transformRect.requestReflow();
|
|
13442
|
+
} else {
|
|
13443
|
+
this.transformRect.style.visibility = "hidden";
|
|
13444
|
+
}
|
|
13445
|
+
}
|
|
13382
13446
|
_updateScrollbars() {
|
|
13383
13447
|
const scale = this.ruler.scale;
|
|
13384
13448
|
const scrollHeight = this.drawboard.style.height * scale;
|
|
@@ -13606,6 +13670,7 @@ async function render(options) {
|
|
|
13606
13670
|
});
|
|
13607
13671
|
}
|
|
13608
13672
|
|
|
13673
|
+
exports.AnimatedTexture = AnimatedTexture;
|
|
13609
13674
|
exports.Assets = Assets;
|
|
13610
13675
|
exports.AudioPipeline = AudioPipeline;
|
|
13611
13676
|
exports.AudioProcessor = AudioProcessor;
|
|
@@ -13625,18 +13690,17 @@ exports.ElementStyle = ElementStyle;
|
|
|
13625
13690
|
exports.Engine = Engine;
|
|
13626
13691
|
exports.EventEmitter = EventEmitter;
|
|
13627
13692
|
exports.FontLoader = FontLoader;
|
|
13693
|
+
exports.GIFLoader = GIFLoader;
|
|
13628
13694
|
exports.Geometry = Geometry;
|
|
13629
|
-
exports.GifLoader = GifLoader;
|
|
13630
13695
|
exports.HTMLAudio = HTMLAudio;
|
|
13631
13696
|
exports.HTMLAudioContext = HTMLAudioContext;
|
|
13632
13697
|
exports.HTMLSound = HTMLSound;
|
|
13633
13698
|
exports.IN_BROWSER = IN_BROWSER;
|
|
13634
|
-
exports.Image2DResource = Image2DResource;
|
|
13635
13699
|
exports.ImageTexture = ImageTexture;
|
|
13636
13700
|
exports.IndexBuffer = IndexBuffer;
|
|
13637
13701
|
exports.Input = Input;
|
|
13638
13702
|
exports.InputEvent = InputEvent;
|
|
13639
|
-
exports.
|
|
13703
|
+
exports.JSONLoader = JSONLoader;
|
|
13640
13704
|
exports.Loader = Loader;
|
|
13641
13705
|
exports.LottieLoader = LottieLoader;
|
|
13642
13706
|
exports.MainLoop = MainLoop;
|
|
@@ -13680,6 +13744,7 @@ exports.TextureLoader = TextureLoader;
|
|
|
13680
13744
|
exports.TextureRect2D = TextureRect2D;
|
|
13681
13745
|
exports.Ticker = Ticker;
|
|
13682
13746
|
exports.Transform2D = Transform2D;
|
|
13747
|
+
exports.TransformRect2D = TransformRect2D;
|
|
13683
13748
|
exports.UvGeometry = UvGeometry;
|
|
13684
13749
|
exports.UvMaterial = UvMaterial;
|
|
13685
13750
|
exports.Vector = Vector;
|