modern-canvas 0.2.5 → 0.3.1
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/README.md +4 -4
- package/dist/index.cjs +1575 -568
- package/dist/index.d.cts +229 -14
- package/dist/index.d.mts +229 -14
- package/dist/index.d.ts +229 -14
- package/dist/index.js +40 -39
- package/dist/index.mjs +1574 -568
- package/package.json +13 -12
package/dist/index.cjs
CHANGED
|
@@ -5,6 +5,7 @@ const namesPlugin = require('colord/plugins/names');
|
|
|
5
5
|
const modernPath2d = require('modern-path2d');
|
|
6
6
|
const modernIdoc = require('modern-idoc');
|
|
7
7
|
const modernText = require('modern-text');
|
|
8
|
+
const load = require('yoga-layout/load');
|
|
8
9
|
|
|
9
10
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
|
|
10
11
|
|
|
@@ -483,12 +484,12 @@ class CoreObject extends EventEmitter {
|
|
|
483
484
|
_performUpdate() {
|
|
484
485
|
if (!this._updating)
|
|
485
486
|
return;
|
|
486
|
-
this.
|
|
487
|
+
this._update(this._updatedProperties);
|
|
487
488
|
this._updatedProperties = /* @__PURE__ */ new Map();
|
|
488
489
|
this._updating = false;
|
|
489
490
|
}
|
|
490
491
|
// eslint-disable-next-line unused-imports/no-unused-vars
|
|
491
|
-
|
|
492
|
+
_update(changed) {
|
|
492
493
|
}
|
|
493
494
|
// eslint-disable-next-line unused-imports/no-unused-vars
|
|
494
495
|
_updateProperty(key, value, oldValue, declaration) {
|
|
@@ -2204,13 +2205,13 @@ class Vector3 extends Vector {
|
|
|
2204
2205
|
}
|
|
2205
2206
|
}
|
|
2206
2207
|
|
|
2207
|
-
var __defProp$
|
|
2208
|
-
var __decorateClass$
|
|
2208
|
+
var __defProp$O = Object.defineProperty;
|
|
2209
|
+
var __decorateClass$O = (decorators, target, key, kind) => {
|
|
2209
2210
|
var result = undefined ;
|
|
2210
2211
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
2211
2212
|
if (decorator = decorators[i])
|
|
2212
2213
|
result = (decorator(target, key, result) ) || result;
|
|
2213
|
-
if (result) __defProp$
|
|
2214
|
+
if (result) __defProp$O(target, key, result);
|
|
2214
2215
|
return result;
|
|
2215
2216
|
};
|
|
2216
2217
|
class MainLoop extends CoreObject {
|
|
@@ -2251,10 +2252,10 @@ class MainLoop extends CoreObject {
|
|
|
2251
2252
|
}
|
|
2252
2253
|
}
|
|
2253
2254
|
}
|
|
2254
|
-
__decorateClass$
|
|
2255
|
+
__decorateClass$O([
|
|
2255
2256
|
property({ default: 24 })
|
|
2256
2257
|
], MainLoop.prototype, "fps");
|
|
2257
|
-
__decorateClass$
|
|
2258
|
+
__decorateClass$O([
|
|
2258
2259
|
property({ default: 1 })
|
|
2259
2260
|
], MainLoop.prototype, "speed");
|
|
2260
2261
|
|
|
@@ -4398,13 +4399,13 @@ class Geometry extends Resource {
|
|
|
4398
4399
|
}
|
|
4399
4400
|
}
|
|
4400
4401
|
|
|
4401
|
-
var __defProp$
|
|
4402
|
-
var __decorateClass$
|
|
4402
|
+
var __defProp$N = Object.defineProperty;
|
|
4403
|
+
var __decorateClass$N = (decorators, target, key, kind) => {
|
|
4403
4404
|
var result = undefined ;
|
|
4404
4405
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
4405
4406
|
if (decorator = decorators[i])
|
|
4406
4407
|
result = (decorator(target, key, result) ) || result;
|
|
4407
|
-
if (result) __defProp$
|
|
4408
|
+
if (result) __defProp$N(target, key, result);
|
|
4408
4409
|
return result;
|
|
4409
4410
|
};
|
|
4410
4411
|
class IndexBuffer extends Resource {
|
|
@@ -4448,20 +4449,20 @@ class IndexBuffer extends Resource {
|
|
|
4448
4449
|
return result;
|
|
4449
4450
|
}
|
|
4450
4451
|
}
|
|
4451
|
-
__decorateClass$
|
|
4452
|
+
__decorateClass$N([
|
|
4452
4453
|
protectedProperty({ default: null })
|
|
4453
4454
|
], IndexBuffer.prototype, "data");
|
|
4454
|
-
__decorateClass$
|
|
4455
|
+
__decorateClass$N([
|
|
4455
4456
|
protectedProperty({ default: false })
|
|
4456
4457
|
], IndexBuffer.prototype, "dynamic");
|
|
4457
4458
|
|
|
4458
|
-
var __defProp$
|
|
4459
|
-
var __decorateClass$
|
|
4459
|
+
var __defProp$M = Object.defineProperty;
|
|
4460
|
+
var __decorateClass$M = (decorators, target, key, kind) => {
|
|
4460
4461
|
var result = undefined ;
|
|
4461
4462
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
4462
4463
|
if (decorator = decorators[i])
|
|
4463
4464
|
result = (decorator(target, key, result) ) || result;
|
|
4464
|
-
if (result) __defProp$
|
|
4465
|
+
if (result) __defProp$M(target, key, result);
|
|
4465
4466
|
return result;
|
|
4466
4467
|
};
|
|
4467
4468
|
class VertexBuffer extends Resource {
|
|
@@ -4505,20 +4506,20 @@ class VertexBuffer extends Resource {
|
|
|
4505
4506
|
return result;
|
|
4506
4507
|
}
|
|
4507
4508
|
}
|
|
4508
|
-
__decorateClass$
|
|
4509
|
+
__decorateClass$M([
|
|
4509
4510
|
protectedProperty({ default: null })
|
|
4510
4511
|
], VertexBuffer.prototype, "data");
|
|
4511
|
-
__decorateClass$
|
|
4512
|
+
__decorateClass$M([
|
|
4512
4513
|
protectedProperty({ default: false })
|
|
4513
4514
|
], VertexBuffer.prototype, "dynamic");
|
|
4514
4515
|
|
|
4515
|
-
var __defProp$
|
|
4516
|
-
var __decorateClass$
|
|
4516
|
+
var __defProp$L = Object.defineProperty;
|
|
4517
|
+
var __decorateClass$L = (decorators, target, key, kind) => {
|
|
4517
4518
|
var result = undefined ;
|
|
4518
4519
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
4519
4520
|
if (decorator = decorators[i])
|
|
4520
4521
|
result = (decorator(target, key, result) ) || result;
|
|
4521
|
-
if (result) __defProp$
|
|
4522
|
+
if (result) __defProp$L(target, key, result);
|
|
4522
4523
|
return result;
|
|
4523
4524
|
};
|
|
4524
4525
|
class VertexAttribute extends Resource {
|
|
@@ -4555,25 +4556,25 @@ class VertexAttribute extends Resource {
|
|
|
4555
4556
|
return result;
|
|
4556
4557
|
}
|
|
4557
4558
|
}
|
|
4558
|
-
__decorateClass$
|
|
4559
|
+
__decorateClass$L([
|
|
4559
4560
|
protectedProperty()
|
|
4560
4561
|
], VertexAttribute.prototype, "buffer");
|
|
4561
|
-
__decorateClass$
|
|
4562
|
+
__decorateClass$L([
|
|
4562
4563
|
protectedProperty({ default: 0 })
|
|
4563
4564
|
], VertexAttribute.prototype, "size");
|
|
4564
|
-
__decorateClass$
|
|
4565
|
+
__decorateClass$L([
|
|
4565
4566
|
protectedProperty({ default: false })
|
|
4566
4567
|
], VertexAttribute.prototype, "normalized");
|
|
4567
|
-
__decorateClass$
|
|
4568
|
+
__decorateClass$L([
|
|
4568
4569
|
protectedProperty({ default: "float" })
|
|
4569
4570
|
], VertexAttribute.prototype, "type");
|
|
4570
|
-
__decorateClass$
|
|
4571
|
+
__decorateClass$L([
|
|
4571
4572
|
protectedProperty()
|
|
4572
4573
|
], VertexAttribute.prototype, "stride");
|
|
4573
|
-
__decorateClass$
|
|
4574
|
+
__decorateClass$L([
|
|
4574
4575
|
protectedProperty()
|
|
4575
4576
|
], VertexAttribute.prototype, "offset");
|
|
4576
|
-
__decorateClass$
|
|
4577
|
+
__decorateClass$L([
|
|
4577
4578
|
protectedProperty()
|
|
4578
4579
|
], VertexAttribute.prototype, "divisor");
|
|
4579
4580
|
|
|
@@ -4823,13 +4824,13 @@ class UvGeometry extends Geometry {
|
|
|
4823
4824
|
}
|
|
4824
4825
|
}
|
|
4825
4826
|
|
|
4826
|
-
var __defProp$
|
|
4827
|
-
var __decorateClass$
|
|
4827
|
+
var __defProp$K = Object.defineProperty;
|
|
4828
|
+
var __decorateClass$K = (decorators, target, key, kind) => {
|
|
4828
4829
|
var result = undefined ;
|
|
4829
4830
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
4830
4831
|
if (decorator = decorators[i])
|
|
4831
4832
|
result = (decorator(target, key, result) ) || result;
|
|
4832
|
-
if (result) __defProp$
|
|
4833
|
+
if (result) __defProp$K(target, key, result);
|
|
4833
4834
|
return result;
|
|
4834
4835
|
};
|
|
4835
4836
|
const style2DFilterDefault = {
|
|
@@ -5046,76 +5047,76 @@ class CanvasItemStyle extends Resource {
|
|
|
5046
5047
|
return m;
|
|
5047
5048
|
}
|
|
5048
5049
|
}
|
|
5049
|
-
__decorateClass$
|
|
5050
|
+
__decorateClass$K([
|
|
5050
5051
|
property({ default: "none" })
|
|
5051
5052
|
], CanvasItemStyle.prototype, "backgroundColor");
|
|
5052
|
-
__decorateClass$
|
|
5053
|
+
__decorateClass$K([
|
|
5053
5054
|
property({ default: "none" })
|
|
5054
5055
|
], CanvasItemStyle.prototype, "backgroundImage");
|
|
5055
|
-
__decorateClass$
|
|
5056
|
+
__decorateClass$K([
|
|
5056
5057
|
property({ default: "none" })
|
|
5057
5058
|
], CanvasItemStyle.prototype, "filter");
|
|
5058
|
-
__decorateClass$
|
|
5059
|
+
__decorateClass$K([
|
|
5059
5060
|
property({ default: "inherit" })
|
|
5060
5061
|
], CanvasItemStyle.prototype, "direction");
|
|
5061
|
-
__decorateClass$
|
|
5062
|
+
__decorateClass$K([
|
|
5062
5063
|
property({ default: "none" })
|
|
5063
5064
|
], CanvasItemStyle.prototype, "boxShadow");
|
|
5064
|
-
__decorateClass$
|
|
5065
|
+
__decorateClass$K([
|
|
5065
5066
|
property({ default: "none" })
|
|
5066
5067
|
], CanvasItemStyle.prototype, "maskImage");
|
|
5067
|
-
__decorateClass$
|
|
5068
|
+
__decorateClass$K([
|
|
5068
5069
|
property({ default: 1 })
|
|
5069
5070
|
], CanvasItemStyle.prototype, "opacity");
|
|
5070
|
-
__decorateClass$
|
|
5071
|
+
__decorateClass$K([
|
|
5071
5072
|
property({ default: 0 })
|
|
5072
5073
|
], CanvasItemStyle.prototype, "borderWidth");
|
|
5073
|
-
__decorateClass$
|
|
5074
|
+
__decorateClass$K([
|
|
5074
5075
|
property({ default: 0 })
|
|
5075
5076
|
], CanvasItemStyle.prototype, "borderRadius");
|
|
5076
|
-
__decorateClass$
|
|
5077
|
+
__decorateClass$K([
|
|
5077
5078
|
property({ default: "#000000" })
|
|
5078
5079
|
], CanvasItemStyle.prototype, "borderColor");
|
|
5079
|
-
__decorateClass$
|
|
5080
|
+
__decorateClass$K([
|
|
5080
5081
|
property({ default: "none" })
|
|
5081
5082
|
], CanvasItemStyle.prototype, "borderStyle");
|
|
5082
|
-
__decorateClass$
|
|
5083
|
+
__decorateClass$K([
|
|
5083
5084
|
property({ default: 0 })
|
|
5084
5085
|
], CanvasItemStyle.prototype, "outlineWidth");
|
|
5085
|
-
__decorateClass$
|
|
5086
|
+
__decorateClass$K([
|
|
5086
5087
|
property({ default: 0 })
|
|
5087
5088
|
], CanvasItemStyle.prototype, "outlineOffset");
|
|
5088
|
-
__decorateClass$
|
|
5089
|
+
__decorateClass$K([
|
|
5089
5090
|
property({ default: "#000000" })
|
|
5090
5091
|
], CanvasItemStyle.prototype, "outlineColor");
|
|
5091
|
-
__decorateClass$
|
|
5092
|
+
__decorateClass$K([
|
|
5092
5093
|
property({ default: "none" })
|
|
5093
5094
|
], CanvasItemStyle.prototype, "outlineStyle");
|
|
5094
|
-
__decorateClass$
|
|
5095
|
+
__decorateClass$K([
|
|
5095
5096
|
property({ default: "visible" })
|
|
5096
5097
|
], CanvasItemStyle.prototype, "visibility");
|
|
5097
|
-
__decorateClass$
|
|
5098
|
+
__decorateClass$K([
|
|
5098
5099
|
property({ default: "visible" })
|
|
5099
5100
|
], CanvasItemStyle.prototype, "overflow");
|
|
5100
|
-
__decorateClass$
|
|
5101
|
+
__decorateClass$K([
|
|
5101
5102
|
property({ default: "auto" })
|
|
5102
5103
|
], CanvasItemStyle.prototype, "pointerEvents");
|
|
5103
|
-
const transformStyle = modernIdoc.getDefaultTransformStyle();
|
|
5104
|
-
for (const key in transformStyle) {
|
|
5105
|
-
defineProperty(CanvasItemStyle, key, { default: transformStyle[key] });
|
|
5104
|
+
const transformStyle$1 = modernIdoc.getDefaultTransformStyle();
|
|
5105
|
+
for (const key in transformStyle$1) {
|
|
5106
|
+
defineProperty(CanvasItemStyle, key, { default: transformStyle$1[key] });
|
|
5106
5107
|
}
|
|
5107
|
-
const textStyle = modernIdoc.getDefaultTextStyle();
|
|
5108
|
-
for (const key in textStyle) {
|
|
5109
|
-
defineProperty(CanvasItemStyle, key, { default: textStyle[key] });
|
|
5108
|
+
const textStyle$1 = modernIdoc.getDefaultTextStyle();
|
|
5109
|
+
for (const key in textStyle$1) {
|
|
5110
|
+
defineProperty(CanvasItemStyle, key, { default: textStyle$1[key] });
|
|
5110
5111
|
}
|
|
5111
5112
|
|
|
5112
|
-
var __defProp$
|
|
5113
|
-
var __decorateClass$
|
|
5113
|
+
var __defProp$J = Object.defineProperty;
|
|
5114
|
+
var __decorateClass$J = (decorators, target, key, kind) => {
|
|
5114
5115
|
var result = undefined ;
|
|
5115
5116
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
5116
5117
|
if (decorator = decorators[i])
|
|
5117
5118
|
result = (decorator(target, key, result) ) || result;
|
|
5118
|
-
if (result) __defProp$
|
|
5119
|
+
if (result) __defProp$J(target, key, result);
|
|
5119
5120
|
return result;
|
|
5120
5121
|
};
|
|
5121
5122
|
class Texture2D extends Resource {
|
|
@@ -5241,32 +5242,32 @@ class Texture2D extends Resource {
|
|
|
5241
5242
|
}
|
|
5242
5243
|
}
|
|
5243
5244
|
}
|
|
5244
|
-
__decorateClass$
|
|
5245
|
+
__decorateClass$J([
|
|
5245
5246
|
protectedProperty()
|
|
5246
5247
|
], Texture2D.prototype, "source");
|
|
5247
|
-
__decorateClass$
|
|
5248
|
+
__decorateClass$J([
|
|
5248
5249
|
property({ default: 0 })
|
|
5249
5250
|
], Texture2D.prototype, "width");
|
|
5250
|
-
__decorateClass$
|
|
5251
|
+
__decorateClass$J([
|
|
5251
5252
|
property({ default: 0 })
|
|
5252
5253
|
], Texture2D.prototype, "height");
|
|
5253
|
-
__decorateClass$
|
|
5254
|
+
__decorateClass$J([
|
|
5254
5255
|
property({ default: "linear" })
|
|
5255
5256
|
], Texture2D.prototype, "filterMode");
|
|
5256
|
-
__decorateClass$
|
|
5257
|
+
__decorateClass$J([
|
|
5257
5258
|
property({ default: "clamp_to_edge" })
|
|
5258
5259
|
], Texture2D.prototype, "wrapMode");
|
|
5259
|
-
__decorateClass$
|
|
5260
|
+
__decorateClass$J([
|
|
5260
5261
|
property({ default: 1 })
|
|
5261
5262
|
], Texture2D.prototype, "pixelRatio");
|
|
5262
5263
|
|
|
5263
|
-
var __defProp$
|
|
5264
|
-
var __decorateClass$
|
|
5264
|
+
var __defProp$I = Object.defineProperty;
|
|
5265
|
+
var __decorateClass$I = (decorators, target, key, kind) => {
|
|
5265
5266
|
var result = undefined ;
|
|
5266
5267
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
5267
5268
|
if (decorator = decorators[i])
|
|
5268
5269
|
result = (decorator(target, key, result) ) || result;
|
|
5269
|
-
if (result) __defProp$
|
|
5270
|
+
if (result) __defProp$I(target, key, result);
|
|
5270
5271
|
return result;
|
|
5271
5272
|
};
|
|
5272
5273
|
class CanvasTexture extends Texture2D {
|
|
@@ -5285,7 +5286,7 @@ class CanvasTexture extends Texture2D {
|
|
|
5285
5286
|
super._updateProperty(key, value, oldValue, declaration);
|
|
5286
5287
|
}
|
|
5287
5288
|
}
|
|
5288
|
-
__decorateClass$
|
|
5289
|
+
__decorateClass$I([
|
|
5289
5290
|
property({ default: 2 })
|
|
5290
5291
|
], CanvasTexture.prototype, "pixelRatio");
|
|
5291
5292
|
|
|
@@ -5443,13 +5444,13 @@ class PixelsTexture extends Texture2D {
|
|
|
5443
5444
|
}
|
|
5444
5445
|
}
|
|
5445
5446
|
|
|
5446
|
-
var __defProp$
|
|
5447
|
-
var __decorateClass$
|
|
5447
|
+
var __defProp$H = Object.defineProperty;
|
|
5448
|
+
var __decorateClass$H = (decorators, target, key, kind) => {
|
|
5448
5449
|
var result = undefined ;
|
|
5449
5450
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
5450
5451
|
if (decorator = decorators[i])
|
|
5451
5452
|
result = (decorator(target, key, result) ) || result;
|
|
5452
|
-
if (result) __defProp$
|
|
5453
|
+
if (result) __defProp$H(target, key, result);
|
|
5453
5454
|
return result;
|
|
5454
5455
|
};
|
|
5455
5456
|
function resolveOptions(options) {
|
|
@@ -5693,10 +5694,10 @@ const _VideoTexture = class _VideoTexture extends Texture2D {
|
|
|
5693
5694
|
}
|
|
5694
5695
|
}
|
|
5695
5696
|
};
|
|
5696
|
-
__decorateClass$
|
|
5697
|
+
__decorateClass$H([
|
|
5697
5698
|
protectedProperty({ default: true })
|
|
5698
5699
|
], _VideoTexture.prototype, "autoUpdate");
|
|
5699
|
-
__decorateClass$
|
|
5700
|
+
__decorateClass$H([
|
|
5700
5701
|
protectedProperty({ default: 0 })
|
|
5701
5702
|
], _VideoTexture.prototype, "fps");
|
|
5702
5703
|
let VideoTexture = _VideoTexture;
|
|
@@ -5866,18 +5867,25 @@ class CanvasContext extends modernPath2d.Path2D {
|
|
|
5866
5867
|
}
|
|
5867
5868
|
}
|
|
5868
5869
|
|
|
5869
|
-
var __defProp$
|
|
5870
|
-
var __getOwnPropDesc$
|
|
5871
|
-
var __decorateClass$
|
|
5872
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
5870
|
+
var __defProp$G = Object.defineProperty;
|
|
5871
|
+
var __getOwnPropDesc$E = Object.getOwnPropertyDescriptor;
|
|
5872
|
+
var __decorateClass$G = (decorators, target, key, kind) => {
|
|
5873
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$E(target, key) : target;
|
|
5873
5874
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
5874
5875
|
if (decorator = decorators[i])
|
|
5875
5876
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
5876
|
-
if (kind && result) __defProp$
|
|
5877
|
+
if (kind && result) __defProp$G(target, key, result);
|
|
5877
5878
|
return result;
|
|
5878
5879
|
};
|
|
5880
|
+
const tagUidMap = {};
|
|
5881
|
+
function getTagUid(tag) {
|
|
5882
|
+
let uid = tagUidMap[tag] ?? 0;
|
|
5883
|
+
uid++;
|
|
5884
|
+
tagUidMap[tag] = uid;
|
|
5885
|
+
return uid;
|
|
5886
|
+
}
|
|
5879
5887
|
exports.Node = class Node extends CoreObject {
|
|
5880
|
-
name = `${this.tag}:${
|
|
5888
|
+
name = `${this.tag}:${getTagUid(this.tag)}`;
|
|
5881
5889
|
mask;
|
|
5882
5890
|
_readyed = false;
|
|
5883
5891
|
constructor(properties, children = []) {
|
|
@@ -5888,7 +5896,8 @@ exports.Node = class Node extends CoreObject {
|
|
|
5888
5896
|
this._onUnparented = this._onUnparented.bind(this);
|
|
5889
5897
|
this._onReady = this._onReady.bind(this);
|
|
5890
5898
|
this._onProcess = this._onProcess.bind(this);
|
|
5891
|
-
this.setProperties(properties).append(children)
|
|
5899
|
+
this.setProperties(properties).append(children);
|
|
5900
|
+
this.on("treeEnter", this._onTreeEnter).on("treeExit", this._onTreeExit).on("parented", this._onParented).on("unparented", this._onUnparented).on("ready", this._onReady).on("process", this._onProcess);
|
|
5892
5901
|
}
|
|
5893
5902
|
/** Name */
|
|
5894
5903
|
getName() {
|
|
@@ -5921,12 +5930,12 @@ exports.Node = class Node extends CoreObject {
|
|
|
5921
5930
|
setTree(tree) {
|
|
5922
5931
|
const oldTree = this._tree;
|
|
5923
5932
|
if (tree !== oldTree) {
|
|
5933
|
+
if (oldTree) {
|
|
5934
|
+
this.emit("treeExit", oldTree);
|
|
5935
|
+
}
|
|
5936
|
+
this._tree = tree;
|
|
5924
5937
|
if (tree) {
|
|
5925
|
-
this._tree = tree;
|
|
5926
5938
|
this.emit("treeEnter", tree);
|
|
5927
|
-
} else if (oldTree) {
|
|
5928
|
-
this.emit("treeExit", oldTree);
|
|
5929
|
-
this._tree = tree;
|
|
5930
5939
|
}
|
|
5931
5940
|
for (let len = this._children.length, i = 0; i < len; i++) {
|
|
5932
5941
|
const node = this._children[i];
|
|
@@ -6075,7 +6084,7 @@ exports.Node = class Node extends CoreObject {
|
|
|
6075
6084
|
if (this.mask instanceof exports.Node) {
|
|
6076
6085
|
if (!this.getNode("__$mask")) {
|
|
6077
6086
|
this.mask.processMode = "disabled";
|
|
6078
|
-
this.
|
|
6087
|
+
this.appendChild(this.mask, "front");
|
|
6079
6088
|
}
|
|
6080
6089
|
} else {
|
|
6081
6090
|
const mask = this.getNode("__$mask");
|
|
@@ -6141,42 +6150,41 @@ exports.Node = class Node extends CoreObject {
|
|
|
6141
6150
|
this._parent.moveChild(sibling, this.getIndex(true) + 1);
|
|
6142
6151
|
return this;
|
|
6143
6152
|
}
|
|
6144
|
-
append(...
|
|
6145
|
-
let
|
|
6146
|
-
if (Array.isArray(
|
|
6147
|
-
|
|
6153
|
+
append(...nodes) {
|
|
6154
|
+
let _nodes;
|
|
6155
|
+
if (Array.isArray(nodes[0])) {
|
|
6156
|
+
_nodes = nodes[0];
|
|
6148
6157
|
} else {
|
|
6149
|
-
|
|
6158
|
+
_nodes = nodes;
|
|
6150
6159
|
}
|
|
6151
|
-
|
|
6152
|
-
this.
|
|
6160
|
+
_nodes.forEach((node) => {
|
|
6161
|
+
this.appendChild(node);
|
|
6153
6162
|
});
|
|
6154
|
-
return this;
|
|
6155
6163
|
}
|
|
6156
|
-
|
|
6157
|
-
if (this.is(
|
|
6158
|
-
return
|
|
6164
|
+
appendChild(node, internalMode = node.internalMode) {
|
|
6165
|
+
if (this.is(node) || node.hasParent()) {
|
|
6166
|
+
return node;
|
|
6159
6167
|
}
|
|
6160
6168
|
switch (internalMode) {
|
|
6161
6169
|
case "default":
|
|
6162
6170
|
case "front": {
|
|
6163
6171
|
const targetMode = internalMode === "default" ? "back" : "front";
|
|
6164
|
-
const index = this._children.findIndex((
|
|
6172
|
+
const index = this._children.findIndex((node2) => node2.internalMode === targetMode);
|
|
6165
6173
|
if (index > -1) {
|
|
6166
|
-
this._children.splice(index, 0,
|
|
6174
|
+
this._children.splice(index, 0, node);
|
|
6167
6175
|
} else {
|
|
6168
|
-
this._children.push(
|
|
6176
|
+
this._children.push(node);
|
|
6169
6177
|
}
|
|
6170
6178
|
break;
|
|
6171
6179
|
}
|
|
6172
6180
|
case "back":
|
|
6173
|
-
this._children.push(
|
|
6181
|
+
this._children.push(node);
|
|
6174
6182
|
break;
|
|
6175
6183
|
}
|
|
6176
|
-
|
|
6177
|
-
|
|
6178
|
-
this.emit("
|
|
6179
|
-
return
|
|
6184
|
+
node.internalMode = internalMode;
|
|
6185
|
+
node.setParent(this);
|
|
6186
|
+
this.emit("appendChild", node);
|
|
6187
|
+
return node;
|
|
6180
6188
|
}
|
|
6181
6189
|
moveChild(child, toIndex, internalMode = child.internalMode) {
|
|
6182
6190
|
if (this.is(child) || child.hasParent() && !this.is(child.parent)) {
|
|
@@ -6207,7 +6215,7 @@ exports.Node = class Node extends CoreObject {
|
|
|
6207
6215
|
return false;
|
|
6208
6216
|
}
|
|
6209
6217
|
});
|
|
6210
|
-
maxIndex = maxIndex > -1 ? minIndex + maxIndex : Math.max(0, this._children.length
|
|
6218
|
+
maxIndex = maxIndex > -1 ? minIndex + maxIndex : Math.max(0, this._children.length);
|
|
6211
6219
|
const newIndex = clamp(minIndex, toIndex > -1 ? toIndex : maxIndex, maxIndex);
|
|
6212
6220
|
if (newIndex !== oldIndex) {
|
|
6213
6221
|
if (oldIndex > -1) {
|
|
@@ -6222,7 +6230,7 @@ exports.Node = class Node extends CoreObject {
|
|
|
6222
6230
|
if (oldIndex > -1) {
|
|
6223
6231
|
this.emit("moveChild", child, newIndex, oldIndex);
|
|
6224
6232
|
} else {
|
|
6225
|
-
this.emit("
|
|
6233
|
+
this.emit("appendChild", child);
|
|
6226
6234
|
}
|
|
6227
6235
|
}
|
|
6228
6236
|
return this;
|
|
@@ -6234,7 +6242,7 @@ exports.Node = class Node extends CoreObject {
|
|
|
6234
6242
|
child.setParent(undefined);
|
|
6235
6243
|
this.emit("removeChild", child, index);
|
|
6236
6244
|
}
|
|
6237
|
-
return
|
|
6245
|
+
return child;
|
|
6238
6246
|
}
|
|
6239
6247
|
removeChildren() {
|
|
6240
6248
|
this.getChildren().forEach((child) => this.removeChild(child));
|
|
@@ -6294,37 +6302,37 @@ exports.Node = class Node extends CoreObject {
|
|
|
6294
6302
|
const { tag, props, children } = JSON;
|
|
6295
6303
|
const NodeClass = customNodes.get(tag) ?? exports.Node;
|
|
6296
6304
|
const node = new NodeClass(props);
|
|
6297
|
-
children?.forEach((child) => node.
|
|
6305
|
+
children?.forEach((child) => node.appendChild(this.parse(child)));
|
|
6298
6306
|
return node;
|
|
6299
6307
|
}
|
|
6300
6308
|
};
|
|
6301
|
-
__decorateClass$
|
|
6309
|
+
__decorateClass$G([
|
|
6302
6310
|
property()
|
|
6303
6311
|
], exports.Node.prototype, "name", 2);
|
|
6304
|
-
__decorateClass$
|
|
6312
|
+
__decorateClass$G([
|
|
6305
6313
|
property()
|
|
6306
6314
|
], exports.Node.prototype, "mask", 2);
|
|
6307
|
-
__decorateClass$
|
|
6315
|
+
__decorateClass$G([
|
|
6308
6316
|
property({ default: "inherit" })
|
|
6309
6317
|
], exports.Node.prototype, "processMode", 2);
|
|
6310
|
-
__decorateClass$
|
|
6318
|
+
__decorateClass$G([
|
|
6311
6319
|
property({ default: "inherit" })
|
|
6312
6320
|
], exports.Node.prototype, "renderMode", 2);
|
|
6313
|
-
__decorateClass$
|
|
6321
|
+
__decorateClass$G([
|
|
6314
6322
|
property({ default: "default" })
|
|
6315
6323
|
], exports.Node.prototype, "internalMode", 2);
|
|
6316
|
-
exports.Node = __decorateClass$
|
|
6324
|
+
exports.Node = __decorateClass$G([
|
|
6317
6325
|
customNode("Node")
|
|
6318
6326
|
], exports.Node);
|
|
6319
6327
|
|
|
6320
|
-
var __defProp$
|
|
6321
|
-
var __getOwnPropDesc$
|
|
6322
|
-
var __decorateClass$
|
|
6323
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
6328
|
+
var __defProp$F = Object.defineProperty;
|
|
6329
|
+
var __getOwnPropDesc$D = Object.getOwnPropertyDescriptor;
|
|
6330
|
+
var __decorateClass$F = (decorators, target, key, kind) => {
|
|
6331
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$D(target, key) : target;
|
|
6324
6332
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6325
6333
|
if (decorator = decorators[i])
|
|
6326
6334
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
6327
|
-
if (kind && result) __defProp$
|
|
6335
|
+
if (kind && result) __defProp$F(target, key, result);
|
|
6328
6336
|
return result;
|
|
6329
6337
|
};
|
|
6330
6338
|
exports.TimelineNode = class TimelineNode extends exports.Node {
|
|
@@ -6383,27 +6391,27 @@ exports.TimelineNode = class TimelineNode extends exports.Node {
|
|
|
6383
6391
|
super._process(delta);
|
|
6384
6392
|
}
|
|
6385
6393
|
};
|
|
6386
|
-
__decorateClass$
|
|
6394
|
+
__decorateClass$F([
|
|
6387
6395
|
property({ default: 0 })
|
|
6388
6396
|
], exports.TimelineNode.prototype, "delay", 2);
|
|
6389
|
-
__decorateClass$
|
|
6397
|
+
__decorateClass$F([
|
|
6390
6398
|
property({ default: 0 })
|
|
6391
6399
|
], exports.TimelineNode.prototype, "duration", 2);
|
|
6392
|
-
__decorateClass$
|
|
6400
|
+
__decorateClass$F([
|
|
6393
6401
|
property({ default: false })
|
|
6394
6402
|
], exports.TimelineNode.prototype, "paused", 2);
|
|
6395
|
-
exports.TimelineNode = __decorateClass$
|
|
6403
|
+
exports.TimelineNode = __decorateClass$F([
|
|
6396
6404
|
customNode("TimelineNode")
|
|
6397
6405
|
], exports.TimelineNode);
|
|
6398
6406
|
|
|
6399
|
-
var __defProp$
|
|
6400
|
-
var __getOwnPropDesc$
|
|
6401
|
-
var __decorateClass$
|
|
6402
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
6407
|
+
var __defProp$E = Object.defineProperty;
|
|
6408
|
+
var __getOwnPropDesc$C = Object.getOwnPropertyDescriptor;
|
|
6409
|
+
var __decorateClass$E = (decorators, target, key, kind) => {
|
|
6410
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$C(target, key) : target;
|
|
6403
6411
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6404
6412
|
if (decorator = decorators[i])
|
|
6405
6413
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
6406
|
-
if (kind && result) __defProp$
|
|
6414
|
+
if (kind && result) __defProp$E(target, key, result);
|
|
6407
6415
|
return result;
|
|
6408
6416
|
};
|
|
6409
6417
|
exports.Viewport = class Viewport extends exports.Node {
|
|
@@ -6541,30 +6549,30 @@ exports.Viewport = class Viewport extends exports.Node {
|
|
|
6541
6549
|
return this._projection.toArray(transpose);
|
|
6542
6550
|
}
|
|
6543
6551
|
};
|
|
6544
|
-
__decorateClass$
|
|
6552
|
+
__decorateClass$E([
|
|
6545
6553
|
property({ default: 0 })
|
|
6546
6554
|
], exports.Viewport.prototype, "x", 2);
|
|
6547
|
-
__decorateClass$
|
|
6555
|
+
__decorateClass$E([
|
|
6548
6556
|
property({ default: 0 })
|
|
6549
6557
|
], exports.Viewport.prototype, "y", 2);
|
|
6550
|
-
__decorateClass$
|
|
6558
|
+
__decorateClass$E([
|
|
6551
6559
|
property({ default: 0 })
|
|
6552
6560
|
], exports.Viewport.prototype, "width", 2);
|
|
6553
|
-
__decorateClass$
|
|
6561
|
+
__decorateClass$E([
|
|
6554
6562
|
property({ default: 0 })
|
|
6555
6563
|
], exports.Viewport.prototype, "height", 2);
|
|
6556
|
-
exports.Viewport = __decorateClass$
|
|
6564
|
+
exports.Viewport = __decorateClass$E([
|
|
6557
6565
|
customNode("Viewport")
|
|
6558
6566
|
], exports.Viewport);
|
|
6559
6567
|
|
|
6560
|
-
var __defProp$
|
|
6561
|
-
var __getOwnPropDesc$
|
|
6562
|
-
var __decorateClass$
|
|
6563
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
6568
|
+
var __defProp$D = Object.defineProperty;
|
|
6569
|
+
var __getOwnPropDesc$B = Object.getOwnPropertyDescriptor;
|
|
6570
|
+
var __decorateClass$D = (decorators, target, key, kind) => {
|
|
6571
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$B(target, key) : target;
|
|
6564
6572
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6565
6573
|
if (decorator = decorators[i])
|
|
6566
6574
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
6567
|
-
if (kind && result) __defProp$
|
|
6575
|
+
if (kind && result) __defProp$D(target, key, result);
|
|
6568
6576
|
return result;
|
|
6569
6577
|
};
|
|
6570
6578
|
exports.Effect = class Effect extends exports.TimelineNode {
|
|
@@ -6801,34 +6809,34 @@ exports.Effect = class Effect extends exports.TimelineNode {
|
|
|
6801
6809
|
}
|
|
6802
6810
|
}
|
|
6803
6811
|
};
|
|
6804
|
-
__decorateClass$
|
|
6812
|
+
__decorateClass$D([
|
|
6805
6813
|
protectedProperty()
|
|
6806
6814
|
], exports.Effect.prototype, "material", 2);
|
|
6807
|
-
__decorateClass$
|
|
6815
|
+
__decorateClass$D([
|
|
6808
6816
|
property()
|
|
6809
6817
|
], exports.Effect.prototype, "effectMode", 2);
|
|
6810
|
-
__decorateClass$
|
|
6818
|
+
__decorateClass$D([
|
|
6811
6819
|
property({ default: "" })
|
|
6812
6820
|
], exports.Effect.prototype, "glsl", 2);
|
|
6813
|
-
__decorateClass$
|
|
6821
|
+
__decorateClass$D([
|
|
6814
6822
|
property({ default: "" })
|
|
6815
6823
|
], exports.Effect.prototype, "glslSrc", 2);
|
|
6816
|
-
exports.Effect = __decorateClass$
|
|
6824
|
+
exports.Effect = __decorateClass$D([
|
|
6817
6825
|
customNode("Effect")
|
|
6818
6826
|
], exports.Effect);
|
|
6819
6827
|
|
|
6820
|
-
var __defProp$
|
|
6821
|
-
var __getOwnPropDesc$
|
|
6822
|
-
var __defNormalProp$
|
|
6823
|
-
var __decorateClass$
|
|
6824
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
6828
|
+
var __defProp$C = Object.defineProperty;
|
|
6829
|
+
var __getOwnPropDesc$A = Object.getOwnPropertyDescriptor;
|
|
6830
|
+
var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$C(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6831
|
+
var __decorateClass$C = (decorators, target, key, kind) => {
|
|
6832
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$A(target, key) : target;
|
|
6825
6833
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6826
6834
|
if (decorator = decorators[i])
|
|
6827
6835
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
6828
|
-
if (kind && result) __defProp$
|
|
6836
|
+
if (kind && result) __defProp$C(target, key, result);
|
|
6829
6837
|
return result;
|
|
6830
6838
|
};
|
|
6831
|
-
var __publicField$
|
|
6839
|
+
var __publicField$i = (obj, key, value) => __defNormalProp$i(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
6832
6840
|
const vertX = `attribute vec2 position;
|
|
6833
6841
|
attribute vec2 uv;
|
|
6834
6842
|
varying vec2 vUv[9];
|
|
@@ -6914,36 +6922,36 @@ exports.BlurEffect = class BlurEffect extends exports.Effect {
|
|
|
6914
6922
|
});
|
|
6915
6923
|
}
|
|
6916
6924
|
};
|
|
6917
|
-
__publicField$
|
|
6925
|
+
__publicField$i(exports.BlurEffect, "materialX", new Material({
|
|
6918
6926
|
vert: vertX,
|
|
6919
6927
|
frag
|
|
6920
6928
|
}));
|
|
6921
|
-
__publicField$
|
|
6929
|
+
__publicField$i(exports.BlurEffect, "materialY", new Material({
|
|
6922
6930
|
vert: vertY,
|
|
6923
6931
|
frag
|
|
6924
6932
|
}));
|
|
6925
|
-
__decorateClass$
|
|
6933
|
+
__decorateClass$C([
|
|
6926
6934
|
property({ default: 8 })
|
|
6927
6935
|
], exports.BlurEffect.prototype, "strength", 2);
|
|
6928
|
-
__decorateClass$
|
|
6936
|
+
__decorateClass$C([
|
|
6929
6937
|
property({ default: 4 })
|
|
6930
6938
|
], exports.BlurEffect.prototype, "quality", 2);
|
|
6931
|
-
exports.BlurEffect = __decorateClass$
|
|
6939
|
+
exports.BlurEffect = __decorateClass$C([
|
|
6932
6940
|
customNode("BlurEffect")
|
|
6933
6941
|
], exports.BlurEffect);
|
|
6934
6942
|
|
|
6935
|
-
var __defProp$
|
|
6936
|
-
var __getOwnPropDesc$
|
|
6937
|
-
var __defNormalProp$
|
|
6938
|
-
var __decorateClass$
|
|
6939
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
6943
|
+
var __defProp$B = Object.defineProperty;
|
|
6944
|
+
var __getOwnPropDesc$z = Object.getOwnPropertyDescriptor;
|
|
6945
|
+
var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$B(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6946
|
+
var __decorateClass$B = (decorators, target, key, kind) => {
|
|
6947
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$z(target, key) : target;
|
|
6940
6948
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6941
6949
|
if (decorator = decorators[i])
|
|
6942
6950
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
6943
|
-
if (kind && result) __defProp$
|
|
6951
|
+
if (kind && result) __defProp$B(target, key, result);
|
|
6944
6952
|
return result;
|
|
6945
6953
|
};
|
|
6946
|
-
var __publicField$
|
|
6954
|
+
var __publicField$h = (obj, key, value) => __defNormalProp$h(obj, key + "" , value);
|
|
6947
6955
|
exports.ColorAdjustEffect = class ColorAdjustEffect extends exports.Effect {
|
|
6948
6956
|
saturation = 1;
|
|
6949
6957
|
contrast = 1;
|
|
@@ -6969,7 +6977,7 @@ exports.ColorAdjustEffect = class ColorAdjustEffect extends exports.Effect {
|
|
|
6969
6977
|
});
|
|
6970
6978
|
}
|
|
6971
6979
|
};
|
|
6972
|
-
__publicField$
|
|
6980
|
+
__publicField$h(exports.ColorAdjustEffect, "material", new Material({
|
|
6973
6981
|
vert: `precision mediump float;
|
|
6974
6982
|
attribute vec2 position;
|
|
6975
6983
|
attribute vec2 uv;
|
|
@@ -7004,46 +7012,46 @@ void main(void) {
|
|
|
7004
7012
|
gl_FragColor = c * alpha;
|
|
7005
7013
|
}`
|
|
7006
7014
|
}));
|
|
7007
|
-
__decorateClass$
|
|
7015
|
+
__decorateClass$B([
|
|
7008
7016
|
property()
|
|
7009
7017
|
], exports.ColorAdjustEffect.prototype, "saturation", 2);
|
|
7010
|
-
__decorateClass$
|
|
7018
|
+
__decorateClass$B([
|
|
7011
7019
|
property()
|
|
7012
7020
|
], exports.ColorAdjustEffect.prototype, "contrast", 2);
|
|
7013
|
-
__decorateClass$
|
|
7021
|
+
__decorateClass$B([
|
|
7014
7022
|
property()
|
|
7015
7023
|
], exports.ColorAdjustEffect.prototype, "brightness", 2);
|
|
7016
|
-
__decorateClass$
|
|
7024
|
+
__decorateClass$B([
|
|
7017
7025
|
property()
|
|
7018
7026
|
], exports.ColorAdjustEffect.prototype, "red", 2);
|
|
7019
|
-
__decorateClass$
|
|
7027
|
+
__decorateClass$B([
|
|
7020
7028
|
property()
|
|
7021
7029
|
], exports.ColorAdjustEffect.prototype, "green", 2);
|
|
7022
|
-
__decorateClass$
|
|
7030
|
+
__decorateClass$B([
|
|
7023
7031
|
property()
|
|
7024
7032
|
], exports.ColorAdjustEffect.prototype, "blue", 2);
|
|
7025
|
-
__decorateClass$
|
|
7033
|
+
__decorateClass$B([
|
|
7026
7034
|
property()
|
|
7027
7035
|
], exports.ColorAdjustEffect.prototype, "alpha", 2);
|
|
7028
|
-
__decorateClass$
|
|
7036
|
+
__decorateClass$B([
|
|
7029
7037
|
property()
|
|
7030
7038
|
], exports.ColorAdjustEffect.prototype, "gamma", 2);
|
|
7031
|
-
exports.ColorAdjustEffect = __decorateClass$
|
|
7039
|
+
exports.ColorAdjustEffect = __decorateClass$B([
|
|
7032
7040
|
customNode("ColorAdjustEffect")
|
|
7033
7041
|
], exports.ColorAdjustEffect);
|
|
7034
7042
|
|
|
7035
|
-
var __defProp$
|
|
7036
|
-
var __getOwnPropDesc$
|
|
7037
|
-
var __defNormalProp$
|
|
7038
|
-
var __decorateClass$
|
|
7039
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
7043
|
+
var __defProp$A = Object.defineProperty;
|
|
7044
|
+
var __getOwnPropDesc$y = Object.getOwnPropertyDescriptor;
|
|
7045
|
+
var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$A(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7046
|
+
var __decorateClass$A = (decorators, target, key, kind) => {
|
|
7047
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$y(target, key) : target;
|
|
7040
7048
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7041
7049
|
if (decorator = decorators[i])
|
|
7042
7050
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7043
|
-
if (kind && result) __defProp$
|
|
7051
|
+
if (kind && result) __defProp$A(target, key, result);
|
|
7044
7052
|
return result;
|
|
7045
7053
|
};
|
|
7046
|
-
var __publicField$
|
|
7054
|
+
var __publicField$g = (obj, key, value) => __defNormalProp$g(obj, key + "" , value);
|
|
7047
7055
|
exports.ColorFilterEffect = class ColorFilterEffect extends exports.Effect {
|
|
7048
7056
|
_colorMatrix = new ColorMatrix();
|
|
7049
7057
|
constructor(properties) {
|
|
@@ -7093,7 +7101,7 @@ exports.ColorFilterEffect = class ColorFilterEffect extends exports.Effect {
|
|
|
7093
7101
|
});
|
|
7094
7102
|
}
|
|
7095
7103
|
};
|
|
7096
|
-
__publicField$
|
|
7104
|
+
__publicField$g(exports.ColorFilterEffect, "material", new Material({
|
|
7097
7105
|
vert: `precision mediump float;
|
|
7098
7106
|
attribute vec2 position;
|
|
7099
7107
|
attribute vec2 uv;
|
|
@@ -7120,25 +7128,25 @@ void main(void) {
|
|
|
7120
7128
|
);
|
|
7121
7129
|
}`
|
|
7122
7130
|
}));
|
|
7123
|
-
__decorateClass$
|
|
7131
|
+
__decorateClass$A([
|
|
7124
7132
|
property({ default: "" })
|
|
7125
7133
|
], exports.ColorFilterEffect.prototype, "filter", 2);
|
|
7126
|
-
exports.ColorFilterEffect = __decorateClass$
|
|
7134
|
+
exports.ColorFilterEffect = __decorateClass$A([
|
|
7127
7135
|
customNode("ColorFilterEffect")
|
|
7128
7136
|
], exports.ColorFilterEffect);
|
|
7129
7137
|
|
|
7130
|
-
var __defProp$
|
|
7131
|
-
var __getOwnPropDesc$
|
|
7132
|
-
var __defNormalProp$
|
|
7133
|
-
var __decorateClass$
|
|
7134
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
7138
|
+
var __defProp$z = Object.defineProperty;
|
|
7139
|
+
var __getOwnPropDesc$x = Object.getOwnPropertyDescriptor;
|
|
7140
|
+
var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7141
|
+
var __decorateClass$z = (decorators, target, key, kind) => {
|
|
7142
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$x(target, key) : target;
|
|
7135
7143
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7136
7144
|
if (decorator = decorators[i])
|
|
7137
7145
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7138
|
-
if (kind && result) __defProp$
|
|
7146
|
+
if (kind && result) __defProp$z(target, key, result);
|
|
7139
7147
|
return result;
|
|
7140
7148
|
};
|
|
7141
|
-
var __publicField$
|
|
7149
|
+
var __publicField$f = (obj, key, value) => __defNormalProp$f(obj, key + "" , value);
|
|
7142
7150
|
const MAX_COLORS$1 = 50;
|
|
7143
7151
|
exports.ColorOverlayEffect = class ColorOverlayEffect extends exports.Effect {
|
|
7144
7152
|
colors = [];
|
|
@@ -7162,7 +7170,7 @@ exports.ColorOverlayEffect = class ColorOverlayEffect extends exports.Effect {
|
|
|
7162
7170
|
});
|
|
7163
7171
|
}
|
|
7164
7172
|
};
|
|
7165
|
-
__publicField$
|
|
7173
|
+
__publicField$f(exports.ColorOverlayEffect, "material", new Material({
|
|
7166
7174
|
vert: `precision mediump float;
|
|
7167
7175
|
attribute vec2 position;
|
|
7168
7176
|
attribute vec2 uv;
|
|
@@ -7209,28 +7217,28 @@ void main(void) {
|
|
|
7209
7217
|
gl_FragColor = vec4(mix(color.rgb, mask.rgb, color.a * mask.a), color.a);
|
|
7210
7218
|
}`
|
|
7211
7219
|
}));
|
|
7212
|
-
__decorateClass$
|
|
7220
|
+
__decorateClass$z([
|
|
7213
7221
|
property()
|
|
7214
7222
|
], exports.ColorOverlayEffect.prototype, "colors", 2);
|
|
7215
|
-
__decorateClass$
|
|
7223
|
+
__decorateClass$z([
|
|
7216
7224
|
property()
|
|
7217
7225
|
], exports.ColorOverlayEffect.prototype, "alpha", 2);
|
|
7218
|
-
exports.ColorOverlayEffect = __decorateClass$
|
|
7226
|
+
exports.ColorOverlayEffect = __decorateClass$z([
|
|
7219
7227
|
customNode("ColorOverlayEffect")
|
|
7220
7228
|
], exports.ColorOverlayEffect);
|
|
7221
7229
|
|
|
7222
|
-
var __defProp$
|
|
7223
|
-
var __getOwnPropDesc$
|
|
7224
|
-
var __defNormalProp$
|
|
7225
|
-
var __decorateClass$
|
|
7226
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
7230
|
+
var __defProp$y = Object.defineProperty;
|
|
7231
|
+
var __getOwnPropDesc$w = Object.getOwnPropertyDescriptor;
|
|
7232
|
+
var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7233
|
+
var __decorateClass$y = (decorators, target, key, kind) => {
|
|
7234
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$w(target, key) : target;
|
|
7227
7235
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7228
7236
|
if (decorator = decorators[i])
|
|
7229
7237
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7230
|
-
if (kind && result) __defProp$
|
|
7238
|
+
if (kind && result) __defProp$y(target, key, result);
|
|
7231
7239
|
return result;
|
|
7232
7240
|
};
|
|
7233
|
-
var __publicField$
|
|
7241
|
+
var __publicField$e = (obj, key, value) => __defNormalProp$e(obj, key + "" , value);
|
|
7234
7242
|
exports.ColorRemoveEffect = class ColorRemoveEffect extends exports.Effect {
|
|
7235
7243
|
colors = [];
|
|
7236
7244
|
epsilon = 0.5;
|
|
@@ -7259,7 +7267,7 @@ exports.ColorRemoveEffect = class ColorRemoveEffect extends exports.Effect {
|
|
|
7259
7267
|
});
|
|
7260
7268
|
}
|
|
7261
7269
|
};
|
|
7262
|
-
__publicField$
|
|
7270
|
+
__publicField$e(exports.ColorRemoveEffect, "material", new Material({
|
|
7263
7271
|
vert: `precision mediump float;
|
|
7264
7272
|
attribute vec2 position;
|
|
7265
7273
|
attribute vec2 uv;
|
|
@@ -7292,28 +7300,28 @@ void main(void) {
|
|
|
7292
7300
|
gl_FragColor = color;
|
|
7293
7301
|
}`
|
|
7294
7302
|
}));
|
|
7295
|
-
__decorateClass$
|
|
7303
|
+
__decorateClass$y([
|
|
7296
7304
|
property()
|
|
7297
7305
|
], exports.ColorRemoveEffect.prototype, "colors", 2);
|
|
7298
|
-
__decorateClass$
|
|
7306
|
+
__decorateClass$y([
|
|
7299
7307
|
property()
|
|
7300
7308
|
], exports.ColorRemoveEffect.prototype, "epsilon", 2);
|
|
7301
|
-
exports.ColorRemoveEffect = __decorateClass$
|
|
7309
|
+
exports.ColorRemoveEffect = __decorateClass$y([
|
|
7302
7310
|
customNode("ColorRemoveEffect")
|
|
7303
7311
|
], exports.ColorRemoveEffect);
|
|
7304
7312
|
|
|
7305
|
-
var __defProp$
|
|
7306
|
-
var __getOwnPropDesc$
|
|
7307
|
-
var __defNormalProp$
|
|
7308
|
-
var __decorateClass$
|
|
7309
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
7313
|
+
var __defProp$x = Object.defineProperty;
|
|
7314
|
+
var __getOwnPropDesc$v = Object.getOwnPropertyDescriptor;
|
|
7315
|
+
var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$x(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7316
|
+
var __decorateClass$x = (decorators, target, key, kind) => {
|
|
7317
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$v(target, key) : target;
|
|
7310
7318
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7311
7319
|
if (decorator = decorators[i])
|
|
7312
7320
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7313
|
-
if (kind && result) __defProp$
|
|
7321
|
+
if (kind && result) __defProp$x(target, key, result);
|
|
7314
7322
|
return result;
|
|
7315
7323
|
};
|
|
7316
|
-
var __publicField$
|
|
7324
|
+
var __publicField$d = (obj, key, value) => __defNormalProp$d(obj, key + "" , value);
|
|
7317
7325
|
const MAX_COLORS = 50;
|
|
7318
7326
|
exports.ColorReplaceEffect = class ColorReplaceEffect extends exports.Effect {
|
|
7319
7327
|
colors = [];
|
|
@@ -7357,7 +7365,7 @@ exports.ColorReplaceEffect = class ColorReplaceEffect extends exports.Effect {
|
|
|
7357
7365
|
});
|
|
7358
7366
|
}
|
|
7359
7367
|
};
|
|
7360
|
-
__publicField$
|
|
7368
|
+
__publicField$d(exports.ColorReplaceEffect, "material", new Material({
|
|
7361
7369
|
vert: `precision mediump float;
|
|
7362
7370
|
attribute vec2 position;
|
|
7363
7371
|
attribute vec2 uv;
|
|
@@ -7397,28 +7405,28 @@ void main(void) {
|
|
|
7397
7405
|
}
|
|
7398
7406
|
}`
|
|
7399
7407
|
}));
|
|
7400
|
-
__decorateClass$
|
|
7408
|
+
__decorateClass$x([
|
|
7401
7409
|
property()
|
|
7402
7410
|
], exports.ColorReplaceEffect.prototype, "colors", 2);
|
|
7403
|
-
__decorateClass$
|
|
7411
|
+
__decorateClass$x([
|
|
7404
7412
|
property()
|
|
7405
7413
|
], exports.ColorReplaceEffect.prototype, "epsilon", 2);
|
|
7406
|
-
exports.ColorReplaceEffect = __decorateClass$
|
|
7414
|
+
exports.ColorReplaceEffect = __decorateClass$x([
|
|
7407
7415
|
customNode("ColorReplaceEffect")
|
|
7408
7416
|
], exports.ColorReplaceEffect);
|
|
7409
7417
|
|
|
7410
|
-
var __defProp$
|
|
7411
|
-
var __getOwnPropDesc$
|
|
7412
|
-
var __defNormalProp$
|
|
7413
|
-
var __decorateClass$
|
|
7414
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
7418
|
+
var __defProp$w = Object.defineProperty;
|
|
7419
|
+
var __getOwnPropDesc$u = Object.getOwnPropertyDescriptor;
|
|
7420
|
+
var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$w(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7421
|
+
var __decorateClass$w = (decorators, target, key, kind) => {
|
|
7422
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$u(target, key) : target;
|
|
7415
7423
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7416
7424
|
if (decorator = decorators[i])
|
|
7417
7425
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7418
|
-
if (kind && result) __defProp$
|
|
7426
|
+
if (kind && result) __defProp$w(target, key, result);
|
|
7419
7427
|
return result;
|
|
7420
7428
|
};
|
|
7421
|
-
var __publicField$
|
|
7429
|
+
var __publicField$c = (obj, key, value) => __defNormalProp$c(obj, key + "" , value);
|
|
7422
7430
|
exports.EmbossEffect = class EmbossEffect extends exports.Effect {
|
|
7423
7431
|
strength;
|
|
7424
7432
|
constructor(strength = 5) {
|
|
@@ -7435,7 +7443,7 @@ exports.EmbossEffect = class EmbossEffect extends exports.Effect {
|
|
|
7435
7443
|
});
|
|
7436
7444
|
}
|
|
7437
7445
|
};
|
|
7438
|
-
__publicField$
|
|
7446
|
+
__publicField$c(exports.EmbossEffect, "material", new Material({
|
|
7439
7447
|
vert: `precision mediump float;
|
|
7440
7448
|
attribute vec2 position;
|
|
7441
7449
|
attribute vec2 uv;
|
|
@@ -7461,25 +7469,25 @@ void main(void) {
|
|
|
7461
7469
|
gl_FragColor = vec4(color.rgb * alpha, alpha);
|
|
7462
7470
|
}`
|
|
7463
7471
|
}));
|
|
7464
|
-
__decorateClass$
|
|
7472
|
+
__decorateClass$w([
|
|
7465
7473
|
property()
|
|
7466
7474
|
], exports.EmbossEffect.prototype, "strength", 2);
|
|
7467
|
-
exports.EmbossEffect = __decorateClass$
|
|
7475
|
+
exports.EmbossEffect = __decorateClass$w([
|
|
7468
7476
|
customNode("EmbossEffect")
|
|
7469
7477
|
], exports.EmbossEffect);
|
|
7470
7478
|
|
|
7471
|
-
var __defProp$
|
|
7472
|
-
var __getOwnPropDesc$
|
|
7473
|
-
var __defNormalProp$
|
|
7474
|
-
var __decorateClass$
|
|
7475
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
7479
|
+
var __defProp$v = Object.defineProperty;
|
|
7480
|
+
var __getOwnPropDesc$t = Object.getOwnPropertyDescriptor;
|
|
7481
|
+
var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7482
|
+
var __decorateClass$v = (decorators, target, key, kind) => {
|
|
7483
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$t(target, key) : target;
|
|
7476
7484
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7477
7485
|
if (decorator = decorators[i])
|
|
7478
7486
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7479
|
-
if (kind && result) __defProp$
|
|
7487
|
+
if (kind && result) __defProp$v(target, key, result);
|
|
7480
7488
|
return result;
|
|
7481
7489
|
};
|
|
7482
|
-
var __publicField$
|
|
7490
|
+
var __publicField$b = (obj, key, value) => __defNormalProp$b(obj, key + "" , value);
|
|
7483
7491
|
exports.GlitchEffect = class GlitchEffect extends exports.Effect {
|
|
7484
7492
|
_canvas;
|
|
7485
7493
|
_texture;
|
|
@@ -7553,7 +7561,7 @@ exports.GlitchEffect = class GlitchEffect extends exports.Effect {
|
|
|
7553
7561
|
});
|
|
7554
7562
|
}
|
|
7555
7563
|
};
|
|
7556
|
-
__publicField$
|
|
7564
|
+
__publicField$b(exports.GlitchEffect, "material", new Material({
|
|
7557
7565
|
vert: `precision mediump float;
|
|
7558
7566
|
attribute vec2 position;
|
|
7559
7567
|
attribute vec2 uv;
|
|
@@ -7658,49 +7666,49 @@ void main(void) {
|
|
|
7658
7666
|
gl_FragColor.a = texture2D(sampler, coord).a;
|
|
7659
7667
|
}`
|
|
7660
7668
|
}));
|
|
7661
|
-
__decorateClass$
|
|
7669
|
+
__decorateClass$v([
|
|
7662
7670
|
property()
|
|
7663
7671
|
], exports.GlitchEffect.prototype, "slices", 2);
|
|
7664
|
-
__decorateClass$
|
|
7672
|
+
__decorateClass$v([
|
|
7665
7673
|
property()
|
|
7666
7674
|
], exports.GlitchEffect.prototype, "sampleSize", 2);
|
|
7667
|
-
__decorateClass$
|
|
7675
|
+
__decorateClass$v([
|
|
7668
7676
|
property()
|
|
7669
7677
|
], exports.GlitchEffect.prototype, "offset", 2);
|
|
7670
|
-
__decorateClass$
|
|
7678
|
+
__decorateClass$v([
|
|
7671
7679
|
property()
|
|
7672
7680
|
], exports.GlitchEffect.prototype, "direction", 2);
|
|
7673
|
-
__decorateClass$
|
|
7681
|
+
__decorateClass$v([
|
|
7674
7682
|
property()
|
|
7675
7683
|
], exports.GlitchEffect.prototype, "fillMode", 2);
|
|
7676
|
-
__decorateClass$
|
|
7684
|
+
__decorateClass$v([
|
|
7677
7685
|
property()
|
|
7678
7686
|
], exports.GlitchEffect.prototype, "seed", 2);
|
|
7679
|
-
__decorateClass$
|
|
7687
|
+
__decorateClass$v([
|
|
7680
7688
|
property()
|
|
7681
7689
|
], exports.GlitchEffect.prototype, "red", 2);
|
|
7682
|
-
__decorateClass$
|
|
7690
|
+
__decorateClass$v([
|
|
7683
7691
|
property()
|
|
7684
7692
|
], exports.GlitchEffect.prototype, "green", 2);
|
|
7685
|
-
__decorateClass$
|
|
7693
|
+
__decorateClass$v([
|
|
7686
7694
|
property()
|
|
7687
7695
|
], exports.GlitchEffect.prototype, "blue", 2);
|
|
7688
|
-
exports.GlitchEffect = __decorateClass$
|
|
7696
|
+
exports.GlitchEffect = __decorateClass$v([
|
|
7689
7697
|
customNode("GlitchEffect")
|
|
7690
7698
|
], exports.GlitchEffect);
|
|
7691
7699
|
|
|
7692
|
-
var __defProp$
|
|
7693
|
-
var __getOwnPropDesc$
|
|
7694
|
-
var __defNormalProp$
|
|
7695
|
-
var __decorateClass$
|
|
7696
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
7700
|
+
var __defProp$u = Object.defineProperty;
|
|
7701
|
+
var __getOwnPropDesc$s = Object.getOwnPropertyDescriptor;
|
|
7702
|
+
var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7703
|
+
var __decorateClass$u = (decorators, target, key, kind) => {
|
|
7704
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$s(target, key) : target;
|
|
7697
7705
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7698
7706
|
if (decorator = decorators[i])
|
|
7699
7707
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7700
|
-
if (kind && result) __defProp$
|
|
7708
|
+
if (kind && result) __defProp$u(target, key, result);
|
|
7701
7709
|
return result;
|
|
7702
7710
|
};
|
|
7703
|
-
var __publicField$
|
|
7711
|
+
var __publicField$a = (obj, key, value) => __defNormalProp$a(obj, key + "" , value);
|
|
7704
7712
|
exports.GodrayEffect = class GodrayEffect extends exports.Effect {
|
|
7705
7713
|
angle = 30;
|
|
7706
7714
|
gain = 0.5;
|
|
@@ -7725,7 +7733,7 @@ exports.GodrayEffect = class GodrayEffect extends exports.Effect {
|
|
|
7725
7733
|
});
|
|
7726
7734
|
}
|
|
7727
7735
|
};
|
|
7728
|
-
__publicField$
|
|
7736
|
+
__publicField$a(exports.GodrayEffect, "material", new Material({
|
|
7729
7737
|
vert: `precision mediump float;
|
|
7730
7738
|
attribute vec2 position;
|
|
7731
7739
|
attribute vec2 uv;
|
|
@@ -7859,40 +7867,40 @@ void main(void) {
|
|
|
7859
7867
|
gl_FragColor = vec4(color.rgb + mist.rgb, color.a);
|
|
7860
7868
|
}`
|
|
7861
7869
|
}));
|
|
7862
|
-
__decorateClass$
|
|
7870
|
+
__decorateClass$u([
|
|
7863
7871
|
property()
|
|
7864
7872
|
], exports.GodrayEffect.prototype, "angle", 2);
|
|
7865
|
-
__decorateClass$
|
|
7873
|
+
__decorateClass$u([
|
|
7866
7874
|
property()
|
|
7867
7875
|
], exports.GodrayEffect.prototype, "gain", 2);
|
|
7868
|
-
__decorateClass$
|
|
7876
|
+
__decorateClass$u([
|
|
7869
7877
|
property()
|
|
7870
7878
|
], exports.GodrayEffect.prototype, "lacunarity", 2);
|
|
7871
|
-
__decorateClass$
|
|
7879
|
+
__decorateClass$u([
|
|
7872
7880
|
property()
|
|
7873
7881
|
], exports.GodrayEffect.prototype, "parallel", 2);
|
|
7874
|
-
__decorateClass$
|
|
7882
|
+
__decorateClass$u([
|
|
7875
7883
|
property()
|
|
7876
7884
|
], exports.GodrayEffect.prototype, "center", 2);
|
|
7877
|
-
__decorateClass$
|
|
7885
|
+
__decorateClass$u([
|
|
7878
7886
|
property()
|
|
7879
7887
|
], exports.GodrayEffect.prototype, "alpha", 2);
|
|
7880
|
-
exports.GodrayEffect = __decorateClass$
|
|
7888
|
+
exports.GodrayEffect = __decorateClass$u([
|
|
7881
7889
|
customNode("GodrayEffect")
|
|
7882
7890
|
], exports.GodrayEffect);
|
|
7883
7891
|
|
|
7884
|
-
var __defProp$
|
|
7885
|
-
var __getOwnPropDesc$
|
|
7886
|
-
var __defNormalProp$
|
|
7887
|
-
var __decorateClass$
|
|
7888
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
7892
|
+
var __defProp$t = Object.defineProperty;
|
|
7893
|
+
var __getOwnPropDesc$r = Object.getOwnPropertyDescriptor;
|
|
7894
|
+
var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$t(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7895
|
+
var __decorateClass$t = (decorators, target, key, kind) => {
|
|
7896
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$r(target, key) : target;
|
|
7889
7897
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7890
7898
|
if (decorator = decorators[i])
|
|
7891
7899
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7892
|
-
if (kind && result) __defProp$
|
|
7900
|
+
if (kind && result) __defProp$t(target, key, result);
|
|
7893
7901
|
return result;
|
|
7894
7902
|
};
|
|
7895
|
-
var __publicField$
|
|
7903
|
+
var __publicField$9 = (obj, key, value) => __defNormalProp$9(obj, key + "" , value);
|
|
7896
7904
|
exports.MaskEffect = class MaskEffect extends exports.Effect {
|
|
7897
7905
|
texture;
|
|
7898
7906
|
constructor(properties, children = []) {
|
|
@@ -7930,7 +7938,7 @@ exports.MaskEffect = class MaskEffect extends exports.Effect {
|
|
|
7930
7938
|
}
|
|
7931
7939
|
}
|
|
7932
7940
|
};
|
|
7933
|
-
__publicField$
|
|
7941
|
+
__publicField$9(exports.MaskEffect, "material", new Material({
|
|
7934
7942
|
vert: `precision mediump float;
|
|
7935
7943
|
attribute vec2 position;
|
|
7936
7944
|
attribute vec2 uv;
|
|
@@ -7963,28 +7971,28 @@ void main(void) {
|
|
|
7963
7971
|
}
|
|
7964
7972
|
}`
|
|
7965
7973
|
}));
|
|
7966
|
-
__decorateClass$
|
|
7974
|
+
__decorateClass$t([
|
|
7967
7975
|
protectedProperty()
|
|
7968
7976
|
], exports.MaskEffect.prototype, "texture", 2);
|
|
7969
|
-
__decorateClass$
|
|
7977
|
+
__decorateClass$t([
|
|
7970
7978
|
property({ default: "" })
|
|
7971
7979
|
], exports.MaskEffect.prototype, "src", 2);
|
|
7972
|
-
exports.MaskEffect = __decorateClass$
|
|
7980
|
+
exports.MaskEffect = __decorateClass$t([
|
|
7973
7981
|
customNode("MaskEffect")
|
|
7974
7982
|
], exports.MaskEffect);
|
|
7975
7983
|
|
|
7976
|
-
var __defProp$
|
|
7977
|
-
var __getOwnPropDesc$
|
|
7978
|
-
var __defNormalProp$
|
|
7979
|
-
var __decorateClass$
|
|
7980
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
7984
|
+
var __defProp$s = Object.defineProperty;
|
|
7985
|
+
var __getOwnPropDesc$q = Object.getOwnPropertyDescriptor;
|
|
7986
|
+
var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$s(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7987
|
+
var __decorateClass$s = (decorators, target, key, kind) => {
|
|
7988
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$q(target, key) : target;
|
|
7981
7989
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7982
7990
|
if (decorator = decorators[i])
|
|
7983
7991
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7984
|
-
if (kind && result) __defProp$
|
|
7992
|
+
if (kind && result) __defProp$s(target, key, result);
|
|
7985
7993
|
return result;
|
|
7986
7994
|
};
|
|
7987
|
-
var __publicField$
|
|
7995
|
+
var __publicField$8 = (obj, key, value) => __defNormalProp$8(obj, key + "" , value);
|
|
7988
7996
|
exports.PixelateEffect = class PixelateEffect extends exports.Effect {
|
|
7989
7997
|
size;
|
|
7990
7998
|
constructor(size = 10) {
|
|
@@ -8001,7 +8009,7 @@ exports.PixelateEffect = class PixelateEffect extends exports.Effect {
|
|
|
8001
8009
|
});
|
|
8002
8010
|
}
|
|
8003
8011
|
};
|
|
8004
|
-
__publicField$
|
|
8012
|
+
__publicField$8(exports.PixelateEffect, "material", new Material({
|
|
8005
8013
|
vert: `precision mediump float;
|
|
8006
8014
|
attribute vec2 position;
|
|
8007
8015
|
attribute vec2 uv;
|
|
@@ -8038,25 +8046,25 @@ void main(void) {
|
|
|
8038
8046
|
gl_FragColor = texture2D(sampler, coord);
|
|
8039
8047
|
}`
|
|
8040
8048
|
}));
|
|
8041
|
-
__decorateClass$
|
|
8049
|
+
__decorateClass$s([
|
|
8042
8050
|
property()
|
|
8043
8051
|
], exports.PixelateEffect.prototype, "size", 2);
|
|
8044
|
-
exports.PixelateEffect = __decorateClass$
|
|
8052
|
+
exports.PixelateEffect = __decorateClass$s([
|
|
8045
8053
|
customNode("PixelateEffect")
|
|
8046
8054
|
], exports.PixelateEffect);
|
|
8047
8055
|
|
|
8048
|
-
var __defProp$
|
|
8049
|
-
var __getOwnPropDesc$
|
|
8050
|
-
var __defNormalProp$
|
|
8051
|
-
var __decorateClass$
|
|
8052
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
8056
|
+
var __defProp$r = Object.defineProperty;
|
|
8057
|
+
var __getOwnPropDesc$p = Object.getOwnPropertyDescriptor;
|
|
8058
|
+
var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$r(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8059
|
+
var __decorateClass$r = (decorators, target, key, kind) => {
|
|
8060
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$p(target, key) : target;
|
|
8053
8061
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
8054
8062
|
if (decorator = decorators[i])
|
|
8055
8063
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8056
|
-
if (kind && result) __defProp$
|
|
8064
|
+
if (kind && result) __defProp$r(target, key, result);
|
|
8057
8065
|
return result;
|
|
8058
8066
|
};
|
|
8059
|
-
var __publicField$
|
|
8067
|
+
var __publicField$7 = (obj, key, value) => __defNormalProp$7(obj, key + "" , value);
|
|
8060
8068
|
exports.ShadowEffect = class ShadowEffect extends exports.Effect {
|
|
8061
8069
|
blur = new exports.BlurEffect();
|
|
8062
8070
|
viewport3 = new exports.Viewport();
|
|
@@ -8083,7 +8091,7 @@ exports.ShadowEffect = class ShadowEffect extends exports.Effect {
|
|
|
8083
8091
|
});
|
|
8084
8092
|
}
|
|
8085
8093
|
};
|
|
8086
|
-
__publicField$
|
|
8094
|
+
__publicField$7(exports.ShadowEffect, "material", new Material({
|
|
8087
8095
|
vert: `precision mediump float;
|
|
8088
8096
|
attribute vec2 position;
|
|
8089
8097
|
attribute vec2 uv;
|
|
@@ -8106,22 +8114,22 @@ void main(void) {
|
|
|
8106
8114
|
gl_FragColor = sample;
|
|
8107
8115
|
}`
|
|
8108
8116
|
}));
|
|
8109
|
-
exports.ShadowEffect = __decorateClass$
|
|
8117
|
+
exports.ShadowEffect = __decorateClass$r([
|
|
8110
8118
|
customNode("ShadowEffect")
|
|
8111
8119
|
], exports.ShadowEffect);
|
|
8112
8120
|
|
|
8113
|
-
var __defProp$
|
|
8114
|
-
var __getOwnPropDesc$
|
|
8115
|
-
var __defNormalProp$
|
|
8116
|
-
var __decorateClass$
|
|
8117
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
8121
|
+
var __defProp$q = Object.defineProperty;
|
|
8122
|
+
var __getOwnPropDesc$o = Object.getOwnPropertyDescriptor;
|
|
8123
|
+
var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8124
|
+
var __decorateClass$q = (decorators, target, key, kind) => {
|
|
8125
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$o(target, key) : target;
|
|
8118
8126
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
8119
8127
|
if (decorator = decorators[i])
|
|
8120
8128
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8121
|
-
if (kind && result) __defProp$
|
|
8129
|
+
if (kind && result) __defProp$q(target, key, result);
|
|
8122
8130
|
return result;
|
|
8123
8131
|
};
|
|
8124
|
-
var __publicField$
|
|
8132
|
+
var __publicField$6 = (obj, key, value) => __defNormalProp$6(obj, key + "" , value);
|
|
8125
8133
|
exports.ZoomBlurEffect = class ZoomBlurEffect extends exports.Effect {
|
|
8126
8134
|
center;
|
|
8127
8135
|
innerRadius = 20;
|
|
@@ -8140,7 +8148,7 @@ exports.ZoomBlurEffect = class ZoomBlurEffect extends exports.Effect {
|
|
|
8140
8148
|
});
|
|
8141
8149
|
}
|
|
8142
8150
|
};
|
|
8143
|
-
__publicField$
|
|
8151
|
+
__publicField$6(exports.ZoomBlurEffect, "material", new Material({
|
|
8144
8152
|
vert: `attribute vec2 position;
|
|
8145
8153
|
attribute vec2 uv;
|
|
8146
8154
|
varying vec2 vUv;
|
|
@@ -8224,30 +8232,30 @@ void main() {
|
|
|
8224
8232
|
gl_FragColor = color;
|
|
8225
8233
|
}`
|
|
8226
8234
|
}));
|
|
8227
|
-
__decorateClass$
|
|
8235
|
+
__decorateClass$q([
|
|
8228
8236
|
property()
|
|
8229
8237
|
], exports.ZoomBlurEffect.prototype, "center", 2);
|
|
8230
|
-
__decorateClass$
|
|
8238
|
+
__decorateClass$q([
|
|
8231
8239
|
property()
|
|
8232
8240
|
], exports.ZoomBlurEffect.prototype, "innerRadius", 2);
|
|
8233
|
-
__decorateClass$
|
|
8241
|
+
__decorateClass$q([
|
|
8234
8242
|
property()
|
|
8235
8243
|
], exports.ZoomBlurEffect.prototype, "radius", 2);
|
|
8236
|
-
__decorateClass$
|
|
8244
|
+
__decorateClass$q([
|
|
8237
8245
|
property()
|
|
8238
8246
|
], exports.ZoomBlurEffect.prototype, "strength", 2);
|
|
8239
|
-
exports.ZoomBlurEffect = __decorateClass$
|
|
8247
|
+
exports.ZoomBlurEffect = __decorateClass$q([
|
|
8240
8248
|
customNode("ZoomBlurEffect")
|
|
8241
8249
|
], exports.ZoomBlurEffect);
|
|
8242
8250
|
|
|
8243
|
-
var __defProp$
|
|
8244
|
-
var __getOwnPropDesc$
|
|
8245
|
-
var __decorateClass$
|
|
8246
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
8251
|
+
var __defProp$p = Object.defineProperty;
|
|
8252
|
+
var __getOwnPropDesc$n = Object.getOwnPropertyDescriptor;
|
|
8253
|
+
var __decorateClass$p = (decorators, target, key, kind) => {
|
|
8254
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$n(target, key) : target;
|
|
8247
8255
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
8248
8256
|
if (decorator = decorators[i])
|
|
8249
8257
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8250
|
-
if (kind && result) __defProp$
|
|
8258
|
+
if (kind && result) __defProp$p(target, key, result);
|
|
8251
8259
|
return result;
|
|
8252
8260
|
};
|
|
8253
8261
|
exports.CanvasItem = class CanvasItem extends exports.TimelineNode {
|
|
@@ -8339,7 +8347,7 @@ exports.CanvasItem = class CanvasItem extends exports.TimelineNode {
|
|
|
8339
8347
|
if (this.style.boxShadow !== "none") {
|
|
8340
8348
|
const node = this.getNode(nodePath);
|
|
8341
8349
|
if (node) ; else {
|
|
8342
|
-
this.
|
|
8350
|
+
this.appendChild(new exports.ShadowEffect(), "back");
|
|
8343
8351
|
}
|
|
8344
8352
|
} else {
|
|
8345
8353
|
const node = this.getNode(nodePath);
|
|
@@ -8356,7 +8364,7 @@ exports.CanvasItem = class CanvasItem extends exports.TimelineNode {
|
|
|
8356
8364
|
if (node) {
|
|
8357
8365
|
node.src = maskImage;
|
|
8358
8366
|
} else {
|
|
8359
|
-
this.
|
|
8367
|
+
this.appendChild(new exports.MaskEffect({ src: maskImage }), "back");
|
|
8360
8368
|
}
|
|
8361
8369
|
} else {
|
|
8362
8370
|
const node = this.getNode(nodePath);
|
|
@@ -8542,17 +8550,17 @@ exports.CanvasItem = class CanvasItem extends exports.TimelineNode {
|
|
|
8542
8550
|
};
|
|
8543
8551
|
}
|
|
8544
8552
|
};
|
|
8545
|
-
__decorateClass$
|
|
8553
|
+
__decorateClass$p([
|
|
8546
8554
|
property()
|
|
8547
8555
|
], exports.CanvasItem.prototype, "modulate", 2);
|
|
8548
|
-
__decorateClass$
|
|
8556
|
+
__decorateClass$p([
|
|
8549
8557
|
property()
|
|
8550
8558
|
], exports.CanvasItem.prototype, "blendMode", 2);
|
|
8551
|
-
exports.CanvasItem = __decorateClass$
|
|
8559
|
+
exports.CanvasItem = __decorateClass$p([
|
|
8552
8560
|
customNode("CanvasItem")
|
|
8553
8561
|
], exports.CanvasItem);
|
|
8554
8562
|
|
|
8555
|
-
class RenderStack
|
|
8563
|
+
class RenderStack {
|
|
8556
8564
|
currentCall;
|
|
8557
8565
|
calls = [];
|
|
8558
8566
|
createCall(renderable) {
|
|
@@ -8578,14 +8586,14 @@ class RenderStack extends exports.Node {
|
|
|
8578
8586
|
}
|
|
8579
8587
|
}
|
|
8580
8588
|
|
|
8581
|
-
var __defProp$
|
|
8582
|
-
var __getOwnPropDesc$
|
|
8583
|
-
var __decorateClass$
|
|
8584
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
8589
|
+
var __defProp$o = Object.defineProperty;
|
|
8590
|
+
var __getOwnPropDesc$m = Object.getOwnPropertyDescriptor;
|
|
8591
|
+
var __decorateClass$o = (decorators, target, key, kind) => {
|
|
8592
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$m(target, key) : target;
|
|
8585
8593
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
8586
8594
|
if (decorator = decorators[i])
|
|
8587
8595
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8588
|
-
if (kind && result) __defProp$
|
|
8596
|
+
if (kind && result) __defProp$o(target, key, result);
|
|
8589
8597
|
return result;
|
|
8590
8598
|
};
|
|
8591
8599
|
exports.Timeline = class Timeline extends exports.Node {
|
|
@@ -8630,29 +8638,29 @@ exports.Timeline = class Timeline extends exports.Node {
|
|
|
8630
8638
|
this.addTime(delta);
|
|
8631
8639
|
}
|
|
8632
8640
|
};
|
|
8633
|
-
__decorateClass$
|
|
8641
|
+
__decorateClass$o([
|
|
8634
8642
|
property({ default: 0 })
|
|
8635
8643
|
], exports.Timeline.prototype, "startTime", 2);
|
|
8636
|
-
__decorateClass$
|
|
8644
|
+
__decorateClass$o([
|
|
8637
8645
|
property({ default: 0 })
|
|
8638
8646
|
], exports.Timeline.prototype, "currentTime", 2);
|
|
8639
|
-
__decorateClass$
|
|
8647
|
+
__decorateClass$o([
|
|
8640
8648
|
property({ default: Number.MAX_SAFE_INTEGER })
|
|
8641
8649
|
], exports.Timeline.prototype, "endTime", 2);
|
|
8642
|
-
__decorateClass$
|
|
8650
|
+
__decorateClass$o([
|
|
8643
8651
|
property({ default: false })
|
|
8644
8652
|
], exports.Timeline.prototype, "loop", 2);
|
|
8645
|
-
exports.Timeline = __decorateClass$
|
|
8653
|
+
exports.Timeline = __decorateClass$o([
|
|
8646
8654
|
customNode("Timeline")
|
|
8647
8655
|
], exports.Timeline);
|
|
8648
8656
|
|
|
8649
|
-
var __defProp$
|
|
8650
|
-
var __decorateClass$
|
|
8657
|
+
var __defProp$n = Object.defineProperty;
|
|
8658
|
+
var __decorateClass$n = (decorators, target, key, kind) => {
|
|
8651
8659
|
var result = undefined ;
|
|
8652
8660
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
8653
8661
|
if (decorator = decorators[i])
|
|
8654
8662
|
result = (decorator(target, key, result) ) || result;
|
|
8655
|
-
if (result) __defProp$
|
|
8663
|
+
if (result) __defProp$n(target, key, result);
|
|
8656
8664
|
return result;
|
|
8657
8665
|
};
|
|
8658
8666
|
class SceneTree extends MainLoop {
|
|
@@ -8713,21 +8721,21 @@ class SceneTree extends MainLoop {
|
|
|
8713
8721
|
renderer.texture.unbind(texture);
|
|
8714
8722
|
}
|
|
8715
8723
|
}
|
|
8716
|
-
__decorateClass$
|
|
8724
|
+
__decorateClass$n([
|
|
8717
8725
|
property({ default: false })
|
|
8718
8726
|
], SceneTree.prototype, "paused");
|
|
8719
|
-
__decorateClass$
|
|
8727
|
+
__decorateClass$n([
|
|
8720
8728
|
property()
|
|
8721
8729
|
], SceneTree.prototype, "backgroundColor");
|
|
8722
8730
|
|
|
8723
|
-
var __defProp$
|
|
8724
|
-
var __getOwnPropDesc$
|
|
8725
|
-
var __decorateClass$
|
|
8726
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
8731
|
+
var __defProp$m = Object.defineProperty;
|
|
8732
|
+
var __getOwnPropDesc$l = Object.getOwnPropertyDescriptor;
|
|
8733
|
+
var __decorateClass$m = (decorators, target, key, kind) => {
|
|
8734
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$l(target, key) : target;
|
|
8727
8735
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
8728
8736
|
if (decorator = decorators[i])
|
|
8729
8737
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8730
|
-
if (kind && result) __defProp$
|
|
8738
|
+
if (kind && result) __defProp$m(target, key, result);
|
|
8731
8739
|
return result;
|
|
8732
8740
|
};
|
|
8733
8741
|
exports.Transition = class Transition extends exports.Effect {
|
|
@@ -8736,7 +8744,7 @@ exports.Transition = class Transition extends exports.Effect {
|
|
|
8736
8744
|
this.setProperties(properties).append(children);
|
|
8737
8745
|
}
|
|
8738
8746
|
};
|
|
8739
|
-
exports.Transition = __decorateClass$
|
|
8747
|
+
exports.Transition = __decorateClass$m([
|
|
8740
8748
|
customNode("Transition", {
|
|
8741
8749
|
effectMode: "transition",
|
|
8742
8750
|
processMode: "pausable",
|
|
@@ -8744,14 +8752,14 @@ exports.Transition = __decorateClass$k([
|
|
|
8744
8752
|
})
|
|
8745
8753
|
], exports.Transition);
|
|
8746
8754
|
|
|
8747
|
-
var __defProp$
|
|
8748
|
-
var __getOwnPropDesc$
|
|
8749
|
-
var __decorateClass$
|
|
8750
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
8755
|
+
var __defProp$l = Object.defineProperty;
|
|
8756
|
+
var __getOwnPropDesc$k = Object.getOwnPropertyDescriptor;
|
|
8757
|
+
var __decorateClass$l = (decorators, target, key, kind) => {
|
|
8758
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$k(target, key) : target;
|
|
8751
8759
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
8752
8760
|
if (decorator = decorators[i])
|
|
8753
8761
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8754
|
-
if (kind && result) __defProp$
|
|
8762
|
+
if (kind && result) __defProp$l(target, key, result);
|
|
8755
8763
|
return result;
|
|
8756
8764
|
};
|
|
8757
8765
|
exports.Node2D = class Node2D extends exports.CanvasItem {
|
|
@@ -8892,18 +8900,18 @@ exports.Node2D = class Node2D extends exports.CanvasItem {
|
|
|
8892
8900
|
);
|
|
8893
8901
|
}
|
|
8894
8902
|
};
|
|
8895
|
-
exports.Node2D = __decorateClass$
|
|
8903
|
+
exports.Node2D = __decorateClass$l([
|
|
8896
8904
|
customNode("Node2D")
|
|
8897
8905
|
], exports.Node2D);
|
|
8898
8906
|
|
|
8899
|
-
var __defProp$
|
|
8900
|
-
var __getOwnPropDesc$
|
|
8901
|
-
var __decorateClass$
|
|
8902
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
8907
|
+
var __defProp$k = Object.defineProperty;
|
|
8908
|
+
var __getOwnPropDesc$j = Object.getOwnPropertyDescriptor;
|
|
8909
|
+
var __decorateClass$k = (decorators, target, key, kind) => {
|
|
8910
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$j(target, key) : target;
|
|
8903
8911
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
8904
8912
|
if (decorator = decorators[i])
|
|
8905
8913
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8906
|
-
if (kind && result) __defProp$
|
|
8914
|
+
if (kind && result) __defProp$k(target, key, result);
|
|
8907
8915
|
return result;
|
|
8908
8916
|
};
|
|
8909
8917
|
function proxy(options) {
|
|
@@ -8948,61 +8956,61 @@ exports.Graphics2D = class Graphics2D extends exports.Node2D {
|
|
|
8948
8956
|
return this;
|
|
8949
8957
|
}
|
|
8950
8958
|
};
|
|
8951
|
-
__decorateClass$
|
|
8959
|
+
__decorateClass$k([
|
|
8952
8960
|
proxy()
|
|
8953
8961
|
], exports.Graphics2D.prototype, "lineCap", 2);
|
|
8954
|
-
__decorateClass$
|
|
8962
|
+
__decorateClass$k([
|
|
8955
8963
|
proxy()
|
|
8956
8964
|
], exports.Graphics2D.prototype, "lineJoin", 2);
|
|
8957
|
-
__decorateClass$
|
|
8965
|
+
__decorateClass$k([
|
|
8958
8966
|
proxy()
|
|
8959
8967
|
], exports.Graphics2D.prototype, "fillStyle", 2);
|
|
8960
|
-
__decorateClass$
|
|
8968
|
+
__decorateClass$k([
|
|
8961
8969
|
proxy()
|
|
8962
8970
|
], exports.Graphics2D.prototype, "strokeStyle", 2);
|
|
8963
|
-
__decorateClass$
|
|
8971
|
+
__decorateClass$k([
|
|
8964
8972
|
proxy()
|
|
8965
8973
|
], exports.Graphics2D.prototype, "lineWidth", 2);
|
|
8966
|
-
__decorateClass$
|
|
8974
|
+
__decorateClass$k([
|
|
8967
8975
|
proxy()
|
|
8968
8976
|
], exports.Graphics2D.prototype, "miterLimit", 2);
|
|
8969
|
-
__decorateClass$
|
|
8977
|
+
__decorateClass$k([
|
|
8970
8978
|
proxy({ method: true })
|
|
8971
8979
|
], exports.Graphics2D.prototype, "rect", 2);
|
|
8972
|
-
__decorateClass$
|
|
8980
|
+
__decorateClass$k([
|
|
8973
8981
|
proxy({ method: true, redraw: true })
|
|
8974
8982
|
], exports.Graphics2D.prototype, "fillRect", 2);
|
|
8975
|
-
__decorateClass$
|
|
8983
|
+
__decorateClass$k([
|
|
8976
8984
|
proxy({ method: true, redraw: true })
|
|
8977
8985
|
], exports.Graphics2D.prototype, "strokeRect", 2);
|
|
8978
|
-
__decorateClass$
|
|
8986
|
+
__decorateClass$k([
|
|
8979
8987
|
proxy({ method: true })
|
|
8980
8988
|
], exports.Graphics2D.prototype, "roundRect", 2);
|
|
8981
|
-
__decorateClass$
|
|
8989
|
+
__decorateClass$k([
|
|
8982
8990
|
proxy({ method: true })
|
|
8983
8991
|
], exports.Graphics2D.prototype, "ellipse", 2);
|
|
8984
|
-
__decorateClass$
|
|
8992
|
+
__decorateClass$k([
|
|
8985
8993
|
proxy({ method: true })
|
|
8986
8994
|
], exports.Graphics2D.prototype, "arc", 2);
|
|
8987
|
-
__decorateClass$
|
|
8995
|
+
__decorateClass$k([
|
|
8988
8996
|
proxy({ method: true })
|
|
8989
8997
|
], exports.Graphics2D.prototype, "beginPath", 2);
|
|
8990
|
-
__decorateClass$
|
|
8998
|
+
__decorateClass$k([
|
|
8991
8999
|
proxy({ method: true })
|
|
8992
9000
|
], exports.Graphics2D.prototype, "moveTo", 2);
|
|
8993
|
-
__decorateClass$
|
|
9001
|
+
__decorateClass$k([
|
|
8994
9002
|
proxy({ method: true })
|
|
8995
9003
|
], exports.Graphics2D.prototype, "lineTo", 2);
|
|
8996
|
-
__decorateClass$
|
|
9004
|
+
__decorateClass$k([
|
|
8997
9005
|
proxy({ method: true })
|
|
8998
9006
|
], exports.Graphics2D.prototype, "closePath", 2);
|
|
8999
|
-
__decorateClass$
|
|
9007
|
+
__decorateClass$k([
|
|
9000
9008
|
proxy({ method: true, redraw: true })
|
|
9001
9009
|
], exports.Graphics2D.prototype, "fill", 2);
|
|
9002
|
-
__decorateClass$
|
|
9010
|
+
__decorateClass$k([
|
|
9003
9011
|
proxy({ method: true, redraw: true })
|
|
9004
9012
|
], exports.Graphics2D.prototype, "stroke", 2);
|
|
9005
|
-
exports.Graphics2D = __decorateClass$
|
|
9013
|
+
exports.Graphics2D = __decorateClass$k([
|
|
9006
9014
|
customNode("Graphics2D")
|
|
9007
9015
|
], exports.Graphics2D);
|
|
9008
9016
|
|
|
@@ -9032,14 +9040,14 @@ class Image2DResource extends Resource {
|
|
|
9032
9040
|
}
|
|
9033
9041
|
}
|
|
9034
9042
|
|
|
9035
|
-
var __defProp$
|
|
9036
|
-
var __getOwnPropDesc$
|
|
9037
|
-
var __decorateClass$
|
|
9038
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
9043
|
+
var __defProp$j = Object.defineProperty;
|
|
9044
|
+
var __getOwnPropDesc$i = Object.getOwnPropertyDescriptor;
|
|
9045
|
+
var __decorateClass$j = (decorators, target, key, kind) => {
|
|
9046
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$i(target, key) : target;
|
|
9039
9047
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
9040
9048
|
if (decorator = decorators[i])
|
|
9041
9049
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
9042
|
-
if (kind && result) __defProp$
|
|
9050
|
+
if (kind && result) __defProp$j(target, key, result);
|
|
9043
9051
|
return result;
|
|
9044
9052
|
};
|
|
9045
9053
|
exports.Image2D = class Image2D extends exports.Node2D {
|
|
@@ -9159,16 +9167,16 @@ exports.Image2D = class Image2D extends exports.Node2D {
|
|
|
9159
9167
|
}
|
|
9160
9168
|
}
|
|
9161
9169
|
};
|
|
9162
|
-
__decorateClass$
|
|
9170
|
+
__decorateClass$j([
|
|
9163
9171
|
protectedProperty()
|
|
9164
9172
|
], exports.Image2D.prototype, "resource", 2);
|
|
9165
|
-
__decorateClass$
|
|
9173
|
+
__decorateClass$j([
|
|
9166
9174
|
property({ default: false })
|
|
9167
9175
|
], exports.Image2D.prototype, "gif", 2);
|
|
9168
|
-
__decorateClass$
|
|
9176
|
+
__decorateClass$j([
|
|
9169
9177
|
property({ default: "" })
|
|
9170
9178
|
], exports.Image2D.prototype, "src", 2);
|
|
9171
|
-
exports.Image2D = __decorateClass$
|
|
9179
|
+
exports.Image2D = __decorateClass$j([
|
|
9172
9180
|
customNode("Image2D")
|
|
9173
9181
|
], exports.Image2D);
|
|
9174
9182
|
|
|
@@ -9186,14 +9194,14 @@ class TextureRect2D extends exports.Node2D {
|
|
|
9186
9194
|
}
|
|
9187
9195
|
}
|
|
9188
9196
|
|
|
9189
|
-
var __defProp$
|
|
9190
|
-
var __getOwnPropDesc$
|
|
9191
|
-
var __decorateClass$
|
|
9192
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
9197
|
+
var __defProp$i = Object.defineProperty;
|
|
9198
|
+
var __getOwnPropDesc$h = Object.getOwnPropertyDescriptor;
|
|
9199
|
+
var __decorateClass$i = (decorators, target, key, kind) => {
|
|
9200
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$h(target, key) : target;
|
|
9193
9201
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
9194
9202
|
if (decorator = decorators[i])
|
|
9195
9203
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
9196
|
-
if (kind && result) __defProp$
|
|
9204
|
+
if (kind && result) __defProp$i(target, key, result);
|
|
9197
9205
|
return result;
|
|
9198
9206
|
};
|
|
9199
9207
|
exports.Lottie2D = class Lottie2D extends TextureRect2D {
|
|
@@ -9236,21 +9244,21 @@ exports.Lottie2D = class Lottie2D extends TextureRect2D {
|
|
|
9236
9244
|
super._process(delta);
|
|
9237
9245
|
}
|
|
9238
9246
|
};
|
|
9239
|
-
__decorateClass$
|
|
9247
|
+
__decorateClass$i([
|
|
9240
9248
|
property({ default: "" })
|
|
9241
9249
|
], exports.Lottie2D.prototype, "src", 2);
|
|
9242
|
-
exports.Lottie2D = __decorateClass$
|
|
9250
|
+
exports.Lottie2D = __decorateClass$i([
|
|
9243
9251
|
customNode("Lottie2D")
|
|
9244
9252
|
], exports.Lottie2D);
|
|
9245
9253
|
|
|
9246
|
-
var __defProp$
|
|
9247
|
-
var __getOwnPropDesc$
|
|
9248
|
-
var __decorateClass$
|
|
9249
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
9254
|
+
var __defProp$h = Object.defineProperty;
|
|
9255
|
+
var __getOwnPropDesc$g = Object.getOwnPropertyDescriptor;
|
|
9256
|
+
var __decorateClass$h = (decorators, target, key, kind) => {
|
|
9257
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$g(target, key) : target;
|
|
9250
9258
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
9251
9259
|
if (decorator = decorators[i])
|
|
9252
9260
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
9253
|
-
if (kind && result) __defProp$
|
|
9261
|
+
if (kind && result) __defProp$h(target, key, result);
|
|
9254
9262
|
return result;
|
|
9255
9263
|
};
|
|
9256
9264
|
const textStyles = new Set(Object.keys(modernText.textDefaultStyle));
|
|
@@ -9351,7 +9359,7 @@ exports.Text2D = class Text2D extends TextureRect2D {
|
|
|
9351
9359
|
result.paragraphs.forEach((p) => {
|
|
9352
9360
|
p.fragments.forEach((f) => {
|
|
9353
9361
|
f.characters.forEach((c) => {
|
|
9354
|
-
this.
|
|
9362
|
+
this.appendChild(
|
|
9355
9363
|
new exports.Text2D({
|
|
9356
9364
|
content: c.content,
|
|
9357
9365
|
style: {
|
|
@@ -9388,33 +9396,33 @@ exports.Text2D = class Text2D extends TextureRect2D {
|
|
|
9388
9396
|
}
|
|
9389
9397
|
}
|
|
9390
9398
|
};
|
|
9391
|
-
__decorateClass$
|
|
9399
|
+
__decorateClass$h([
|
|
9392
9400
|
property({ default: false })
|
|
9393
9401
|
], exports.Text2D.prototype, "split", 2);
|
|
9394
|
-
__decorateClass$
|
|
9402
|
+
__decorateClass$h([
|
|
9395
9403
|
property({ default: "" })
|
|
9396
9404
|
], exports.Text2D.prototype, "content", 2);
|
|
9397
|
-
__decorateClass$
|
|
9405
|
+
__decorateClass$h([
|
|
9398
9406
|
property()
|
|
9399
9407
|
], exports.Text2D.prototype, "effects", 2);
|
|
9400
|
-
__decorateClass$
|
|
9408
|
+
__decorateClass$h([
|
|
9401
9409
|
protectedProperty()
|
|
9402
9410
|
], exports.Text2D.prototype, "measureDom", 2);
|
|
9403
|
-
__decorateClass$
|
|
9411
|
+
__decorateClass$h([
|
|
9404
9412
|
protectedProperty()
|
|
9405
9413
|
], exports.Text2D.prototype, "fonts", 2);
|
|
9406
|
-
exports.Text2D = __decorateClass$
|
|
9414
|
+
exports.Text2D = __decorateClass$h([
|
|
9407
9415
|
customNode("Text2D")
|
|
9408
9416
|
], exports.Text2D);
|
|
9409
9417
|
|
|
9410
|
-
var __defProp$
|
|
9411
|
-
var __getOwnPropDesc$
|
|
9412
|
-
var __decorateClass$
|
|
9413
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
9418
|
+
var __defProp$g = Object.defineProperty;
|
|
9419
|
+
var __getOwnPropDesc$f = Object.getOwnPropertyDescriptor;
|
|
9420
|
+
var __decorateClass$g = (decorators, target, key, kind) => {
|
|
9421
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$f(target, key) : target;
|
|
9414
9422
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
9415
9423
|
if (decorator = decorators[i])
|
|
9416
9424
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
9417
|
-
if (kind && result) __defProp$
|
|
9425
|
+
if (kind && result) __defProp$g(target, key, result);
|
|
9418
9426
|
return result;
|
|
9419
9427
|
};
|
|
9420
9428
|
exports.Video2D = class Video2D extends TextureRect2D {
|
|
@@ -9467,21 +9475,21 @@ exports.Video2D = class Video2D extends TextureRect2D {
|
|
|
9467
9475
|
super._process(delta);
|
|
9468
9476
|
}
|
|
9469
9477
|
};
|
|
9470
|
-
__decorateClass$
|
|
9478
|
+
__decorateClass$g([
|
|
9471
9479
|
property({ default: "" })
|
|
9472
9480
|
], exports.Video2D.prototype, "src", 2);
|
|
9473
|
-
exports.Video2D = __decorateClass$
|
|
9481
|
+
exports.Video2D = __decorateClass$g([
|
|
9474
9482
|
customNode("Video2D")
|
|
9475
9483
|
], exports.Video2D);
|
|
9476
9484
|
|
|
9477
|
-
var __defProp$
|
|
9478
|
-
var __getOwnPropDesc$
|
|
9479
|
-
var __decorateClass$
|
|
9480
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
9485
|
+
var __defProp$f = Object.defineProperty;
|
|
9486
|
+
var __getOwnPropDesc$e = Object.getOwnPropertyDescriptor;
|
|
9487
|
+
var __decorateClass$f = (decorators, target, key, kind) => {
|
|
9488
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$e(target, key) : target;
|
|
9481
9489
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
9482
9490
|
if (decorator = decorators[i])
|
|
9483
9491
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
9484
|
-
if (kind && result) __defProp$
|
|
9492
|
+
if (kind && result) __defProp$f(target, key, result);
|
|
9485
9493
|
return result;
|
|
9486
9494
|
};
|
|
9487
9495
|
const linear = (amount) => amount;
|
|
@@ -9800,19 +9808,19 @@ exports.Animation = class Animation extends exports.TimelineNode {
|
|
|
9800
9808
|
});
|
|
9801
9809
|
}
|
|
9802
9810
|
};
|
|
9803
|
-
__decorateClass$
|
|
9811
|
+
__decorateClass$f([
|
|
9804
9812
|
property({ default: "parent" })
|
|
9805
9813
|
], exports.Animation.prototype, "effectMode", 2);
|
|
9806
|
-
__decorateClass$
|
|
9814
|
+
__decorateClass$f([
|
|
9807
9815
|
property({ default: false })
|
|
9808
9816
|
], exports.Animation.prototype, "loop", 2);
|
|
9809
|
-
__decorateClass$
|
|
9817
|
+
__decorateClass$f([
|
|
9810
9818
|
property({ default: [] })
|
|
9811
9819
|
], exports.Animation.prototype, "keyframes", 2);
|
|
9812
|
-
__decorateClass$
|
|
9820
|
+
__decorateClass$f([
|
|
9813
9821
|
property()
|
|
9814
9822
|
], exports.Animation.prototype, "easing", 2);
|
|
9815
|
-
exports.Animation = __decorateClass$
|
|
9823
|
+
exports.Animation = __decorateClass$f([
|
|
9816
9824
|
customNode("Animation", {
|
|
9817
9825
|
renderMode: "disabled",
|
|
9818
9826
|
processMode: "pausable",
|
|
@@ -10695,18 +10703,18 @@ class WebAudio extends AudioPipeline {
|
|
|
10695
10703
|
}
|
|
10696
10704
|
}
|
|
10697
10705
|
|
|
10698
|
-
var __defProp$
|
|
10699
|
-
var __getOwnPropDesc$
|
|
10700
|
-
var __defNormalProp$
|
|
10701
|
-
var __decorateClass$
|
|
10702
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
10706
|
+
var __defProp$e = Object.defineProperty;
|
|
10707
|
+
var __getOwnPropDesc$d = Object.getOwnPropertyDescriptor;
|
|
10708
|
+
var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10709
|
+
var __decorateClass$e = (decorators, target, key, kind) => {
|
|
10710
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$d(target, key) : target;
|
|
10703
10711
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
10704
10712
|
if (decorator = decorators[i])
|
|
10705
10713
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
10706
|
-
if (kind && result) __defProp$
|
|
10714
|
+
if (kind && result) __defProp$e(target, key, result);
|
|
10707
10715
|
return result;
|
|
10708
10716
|
};
|
|
10709
|
-
var __publicField$
|
|
10717
|
+
var __publicField$5 = (obj, key, value) => __defNormalProp$5(obj, key + "" , value);
|
|
10710
10718
|
exports.Audio = class Audio extends exports.TimelineNode {
|
|
10711
10719
|
_sounds = [];
|
|
10712
10720
|
/** PlatformAudio */
|
|
@@ -10910,8 +10918,8 @@ exports.Audio = class Audio extends exports.TimelineNode {
|
|
|
10910
10918
|
}, 100);
|
|
10911
10919
|
}
|
|
10912
10920
|
};
|
|
10913
|
-
__publicField$
|
|
10914
|
-
exports.Audio = __decorateClass$
|
|
10921
|
+
__publicField$5(exports.Audio, "_soundPool", []);
|
|
10922
|
+
exports.Audio = __decorateClass$e([
|
|
10915
10923
|
customNode("Audio")
|
|
10916
10924
|
], exports.Audio);
|
|
10917
10925
|
|
|
@@ -10919,14 +10927,14 @@ class AudioSpectrum extends exports.Node2D {
|
|
|
10919
10927
|
//
|
|
10920
10928
|
}
|
|
10921
10929
|
|
|
10922
|
-
var __defProp$
|
|
10923
|
-
var __getOwnPropDesc$
|
|
10924
|
-
var __decorateClass$
|
|
10925
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
10930
|
+
var __defProp$d = Object.defineProperty;
|
|
10931
|
+
var __getOwnPropDesc$c = Object.getOwnPropertyDescriptor;
|
|
10932
|
+
var __decorateClass$d = (decorators, target, key, kind) => {
|
|
10933
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$c(target, key) : target;
|
|
10926
10934
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
10927
10935
|
if (decorator = decorators[i])
|
|
10928
10936
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
10929
|
-
if (kind && result) __defProp$
|
|
10937
|
+
if (kind && result) __defProp$d(target, key, result);
|
|
10930
10938
|
return result;
|
|
10931
10939
|
};
|
|
10932
10940
|
exports.AudioWaveform = class AudioWaveform extends exports.Node2D {
|
|
@@ -11020,27 +11028,27 @@ exports.AudioWaveform = class AudioWaveform extends exports.Node2D {
|
|
|
11020
11028
|
}
|
|
11021
11029
|
}
|
|
11022
11030
|
};
|
|
11023
|
-
__decorateClass$
|
|
11031
|
+
__decorateClass$d([
|
|
11024
11032
|
property()
|
|
11025
11033
|
], exports.AudioWaveform.prototype, "src", 2);
|
|
11026
|
-
__decorateClass$
|
|
11034
|
+
__decorateClass$d([
|
|
11027
11035
|
property()
|
|
11028
11036
|
], exports.AudioWaveform.prototype, "gap", 2);
|
|
11029
|
-
__decorateClass$
|
|
11037
|
+
__decorateClass$d([
|
|
11030
11038
|
property()
|
|
11031
11039
|
], exports.AudioWaveform.prototype, "color", 2);
|
|
11032
|
-
exports.AudioWaveform = __decorateClass$
|
|
11040
|
+
exports.AudioWaveform = __decorateClass$d([
|
|
11033
11041
|
customNode("AudioWaveform")
|
|
11034
11042
|
], exports.AudioWaveform);
|
|
11035
11043
|
|
|
11036
|
-
var __defProp$
|
|
11037
|
-
var __getOwnPropDesc$
|
|
11038
|
-
var __decorateClass$
|
|
11039
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
11044
|
+
var __defProp$c = Object.defineProperty;
|
|
11045
|
+
var __getOwnPropDesc$b = Object.getOwnPropertyDescriptor;
|
|
11046
|
+
var __decorateClass$c = (decorators, target, key, kind) => {
|
|
11047
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$b(target, key) : target;
|
|
11040
11048
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
11041
11049
|
if (decorator = decorators[i])
|
|
11042
11050
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
11043
|
-
if (kind && result) __defProp$
|
|
11051
|
+
if (kind && result) __defProp$c(target, key, result);
|
|
11044
11052
|
return result;
|
|
11045
11053
|
};
|
|
11046
11054
|
exports.Control = class Control extends exports.CanvasItem {
|
|
@@ -11100,18 +11108,18 @@ exports.Control = class Control extends exports.CanvasItem {
|
|
|
11100
11108
|
return new Rect2(left, top, width, height);
|
|
11101
11109
|
}
|
|
11102
11110
|
};
|
|
11103
|
-
exports.Control = __decorateClass$
|
|
11111
|
+
exports.Control = __decorateClass$c([
|
|
11104
11112
|
customNode("Control")
|
|
11105
11113
|
], exports.Control);
|
|
11106
11114
|
|
|
11107
|
-
var __defProp$
|
|
11108
|
-
var __getOwnPropDesc$
|
|
11109
|
-
var __decorateClass$
|
|
11110
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
11115
|
+
var __defProp$b = Object.defineProperty;
|
|
11116
|
+
var __getOwnPropDesc$a = Object.getOwnPropertyDescriptor;
|
|
11117
|
+
var __decorateClass$b = (decorators, target, key, kind) => {
|
|
11118
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$a(target, key) : target;
|
|
11111
11119
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
11112
11120
|
if (decorator = decorators[i])
|
|
11113
11121
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
11114
|
-
if (kind && result) __defProp$
|
|
11122
|
+
if (kind && result) __defProp$b(target, key, result);
|
|
11115
11123
|
return result;
|
|
11116
11124
|
};
|
|
11117
11125
|
exports.Range = class Range extends exports.Control {
|
|
@@ -11134,39 +11142,39 @@ exports.Range = class Range extends exports.Control {
|
|
|
11134
11142
|
}
|
|
11135
11143
|
}
|
|
11136
11144
|
};
|
|
11137
|
-
__decorateClass$
|
|
11145
|
+
__decorateClass$b([
|
|
11138
11146
|
property({ default: false })
|
|
11139
11147
|
], exports.Range.prototype, "allowGreater", 2);
|
|
11140
|
-
__decorateClass$
|
|
11148
|
+
__decorateClass$b([
|
|
11141
11149
|
property({ default: false })
|
|
11142
11150
|
], exports.Range.prototype, "allowLesser", 2);
|
|
11143
|
-
__decorateClass$
|
|
11151
|
+
__decorateClass$b([
|
|
11144
11152
|
property({ default: 1 })
|
|
11145
11153
|
], exports.Range.prototype, "page", 2);
|
|
11146
|
-
__decorateClass$
|
|
11154
|
+
__decorateClass$b([
|
|
11147
11155
|
property({ default: 0 })
|
|
11148
11156
|
], exports.Range.prototype, "minValue", 2);
|
|
11149
|
-
__decorateClass$
|
|
11157
|
+
__decorateClass$b([
|
|
11150
11158
|
property({ default: 100 })
|
|
11151
11159
|
], exports.Range.prototype, "maxValue", 2);
|
|
11152
|
-
__decorateClass$
|
|
11160
|
+
__decorateClass$b([
|
|
11153
11161
|
property({ default: 0.01 })
|
|
11154
11162
|
], exports.Range.prototype, "step", 2);
|
|
11155
|
-
__decorateClass$
|
|
11163
|
+
__decorateClass$b([
|
|
11156
11164
|
property({ default: 0 })
|
|
11157
11165
|
], exports.Range.prototype, "value", 2);
|
|
11158
|
-
exports.Range = __decorateClass$
|
|
11166
|
+
exports.Range = __decorateClass$b([
|
|
11159
11167
|
customNode("Range")
|
|
11160
11168
|
], exports.Range);
|
|
11161
11169
|
|
|
11162
|
-
var __defProp$
|
|
11163
|
-
var __getOwnPropDesc$
|
|
11164
|
-
var __decorateClass$
|
|
11165
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
11170
|
+
var __defProp$a = Object.defineProperty;
|
|
11171
|
+
var __getOwnPropDesc$9 = Object.getOwnPropertyDescriptor;
|
|
11172
|
+
var __decorateClass$a = (decorators, target, key, kind) => {
|
|
11173
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$9(target, key) : target;
|
|
11166
11174
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
11167
11175
|
if (decorator = decorators[i])
|
|
11168
11176
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
11169
|
-
if (kind && result) __defProp$
|
|
11177
|
+
if (kind && result) __defProp$a(target, key, result);
|
|
11170
11178
|
return result;
|
|
11171
11179
|
};
|
|
11172
11180
|
exports.Ruler = class Ruler extends exports.Control {
|
|
@@ -11317,45 +11325,45 @@ exports.Ruler = class Ruler extends exports.Control {
|
|
|
11317
11325
|
}
|
|
11318
11326
|
}
|
|
11319
11327
|
};
|
|
11320
|
-
__decorateClass$
|
|
11328
|
+
__decorateClass$a([
|
|
11321
11329
|
property({ default: 0 })
|
|
11322
11330
|
], exports.Ruler.prototype, "offsetX", 2);
|
|
11323
|
-
__decorateClass$
|
|
11331
|
+
__decorateClass$a([
|
|
11324
11332
|
property({ default: 0 })
|
|
11325
11333
|
], exports.Ruler.prototype, "offsetY", 2);
|
|
11326
|
-
__decorateClass$
|
|
11334
|
+
__decorateClass$a([
|
|
11327
11335
|
property({ default: 20 })
|
|
11328
11336
|
], exports.Ruler.prototype, "thickness", 2);
|
|
11329
|
-
__decorateClass$
|
|
11337
|
+
__decorateClass$a([
|
|
11330
11338
|
property({ default: 3 })
|
|
11331
11339
|
], exports.Ruler.prototype, "markHeight", 2);
|
|
11332
|
-
__decorateClass$
|
|
11340
|
+
__decorateClass$a([
|
|
11333
11341
|
property({ default: "#b2b6bc" })
|
|
11334
11342
|
], exports.Ruler.prototype, "color", 2);
|
|
11335
|
-
__decorateClass$
|
|
11343
|
+
__decorateClass$a([
|
|
11336
11344
|
property({ default: "#f9f9fa" })
|
|
11337
11345
|
], exports.Ruler.prototype, "markBackgroundColor", 2);
|
|
11338
|
-
__decorateClass$
|
|
11346
|
+
__decorateClass$a([
|
|
11339
11347
|
property({ default: "#b2b6bc" })
|
|
11340
11348
|
], exports.Ruler.prototype, "markColor", 2);
|
|
11341
|
-
__decorateClass$
|
|
11349
|
+
__decorateClass$a([
|
|
11342
11350
|
property({ default: 300 })
|
|
11343
11351
|
], exports.Ruler.prototype, "gap", 2);
|
|
11344
|
-
__decorateClass$
|
|
11352
|
+
__decorateClass$a([
|
|
11345
11353
|
property({ default: 1 })
|
|
11346
11354
|
], exports.Ruler.prototype, "scale", 2);
|
|
11347
|
-
exports.Ruler = __decorateClass$
|
|
11355
|
+
exports.Ruler = __decorateClass$a([
|
|
11348
11356
|
customNode("Ruler")
|
|
11349
11357
|
], exports.Ruler);
|
|
11350
11358
|
|
|
11351
|
-
var __defProp$
|
|
11352
|
-
var __getOwnPropDesc$
|
|
11353
|
-
var __decorateClass$
|
|
11354
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
11359
|
+
var __defProp$9 = Object.defineProperty;
|
|
11360
|
+
var __getOwnPropDesc$8 = Object.getOwnPropertyDescriptor;
|
|
11361
|
+
var __decorateClass$9 = (decorators, target, key, kind) => {
|
|
11362
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$8(target, key) : target;
|
|
11355
11363
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
11356
11364
|
if (decorator = decorators[i])
|
|
11357
11365
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
11358
|
-
if (kind && result) __defProp$
|
|
11366
|
+
if (kind && result) __defProp$9(target, key, result);
|
|
11359
11367
|
return result;
|
|
11360
11368
|
};
|
|
11361
11369
|
exports.ScrollBar = class ScrollBar extends exports.Range {
|
|
@@ -11397,21 +11405,21 @@ exports.ScrollBar = class ScrollBar extends exports.Range {
|
|
|
11397
11405
|
this.context.fill();
|
|
11398
11406
|
}
|
|
11399
11407
|
};
|
|
11400
|
-
__decorateClass$
|
|
11408
|
+
__decorateClass$9([
|
|
11401
11409
|
property({ default: "vertical" })
|
|
11402
11410
|
], exports.ScrollBar.prototype, "direction", 2);
|
|
11403
|
-
exports.ScrollBar = __decorateClass$
|
|
11411
|
+
exports.ScrollBar = __decorateClass$9([
|
|
11404
11412
|
customNode("ScrollBar")
|
|
11405
11413
|
], exports.ScrollBar);
|
|
11406
11414
|
|
|
11407
|
-
var __defProp$
|
|
11408
|
-
var __getOwnPropDesc$
|
|
11409
|
-
var __decorateClass$
|
|
11410
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
11415
|
+
var __defProp$8 = Object.defineProperty;
|
|
11416
|
+
var __getOwnPropDesc$7 = Object.getOwnPropertyDescriptor;
|
|
11417
|
+
var __decorateClass$8 = (decorators, target, key, kind) => {
|
|
11418
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$7(target, key) : target;
|
|
11411
11419
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
11412
11420
|
if (decorator = decorators[i])
|
|
11413
11421
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
11414
|
-
if (kind && result) __defProp$
|
|
11422
|
+
if (kind && result) __defProp$8(target, key, result);
|
|
11415
11423
|
return result;
|
|
11416
11424
|
};
|
|
11417
11425
|
exports.XScrollBar = class XScrollBar extends exports.ScrollBar {
|
|
@@ -11420,20 +11428,20 @@ exports.XScrollBar = class XScrollBar extends exports.ScrollBar {
|
|
|
11420
11428
|
this.setProperties(properties).append(children);
|
|
11421
11429
|
}
|
|
11422
11430
|
};
|
|
11423
|
-
exports.XScrollBar = __decorateClass$
|
|
11431
|
+
exports.XScrollBar = __decorateClass$8([
|
|
11424
11432
|
customNode("XScrollBar", {
|
|
11425
11433
|
direction: "horizontal"
|
|
11426
11434
|
})
|
|
11427
11435
|
], exports.XScrollBar);
|
|
11428
11436
|
|
|
11429
|
-
var __defProp$
|
|
11430
|
-
var __getOwnPropDesc$
|
|
11431
|
-
var __decorateClass$
|
|
11432
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
11437
|
+
var __defProp$7 = Object.defineProperty;
|
|
11438
|
+
var __getOwnPropDesc$6 = Object.getOwnPropertyDescriptor;
|
|
11439
|
+
var __decorateClass$7 = (decorators, target, key, kind) => {
|
|
11440
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$6(target, key) : target;
|
|
11433
11441
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
11434
11442
|
if (decorator = decorators[i])
|
|
11435
11443
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
11436
|
-
if (kind && result) __defProp$
|
|
11444
|
+
if (kind && result) __defProp$7(target, key, result);
|
|
11437
11445
|
return result;
|
|
11438
11446
|
};
|
|
11439
11447
|
exports.YScrollBar = class YScrollBar extends exports.ScrollBar {
|
|
@@ -11442,94 +11450,1089 @@ exports.YScrollBar = class YScrollBar extends exports.ScrollBar {
|
|
|
11442
11450
|
this.setProperties(properties).append(children);
|
|
11443
11451
|
}
|
|
11444
11452
|
};
|
|
11445
|
-
exports.YScrollBar = __decorateClass$
|
|
11453
|
+
exports.YScrollBar = __decorateClass$7([
|
|
11446
11454
|
customNode("YScrollBar", {
|
|
11447
11455
|
direction: "vertical"
|
|
11448
11456
|
})
|
|
11449
11457
|
], exports.YScrollBar);
|
|
11450
11458
|
|
|
11451
|
-
var __defProp$
|
|
11452
|
-
var
|
|
11453
|
-
var
|
|
11454
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$4(target, key) : target;
|
|
11459
|
+
var __defProp$6 = Object.defineProperty;
|
|
11460
|
+
var __decorateClass$6 = (decorators, target, key, kind) => {
|
|
11461
|
+
var result = undefined ;
|
|
11455
11462
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
11456
11463
|
if (decorator = decorators[i])
|
|
11457
|
-
result = (
|
|
11458
|
-
if (
|
|
11464
|
+
result = (decorator(target, key, result) ) || result;
|
|
11465
|
+
if (result) __defProp$6(target, key, result);
|
|
11459
11466
|
return result;
|
|
11460
11467
|
};
|
|
11461
|
-
|
|
11462
|
-
|
|
11463
|
-
|
|
11464
|
-
return this.parent;
|
|
11465
|
-
}
|
|
11466
|
-
return undefined;
|
|
11467
|
-
}
|
|
11468
|
-
constructor(properties, children = []) {
|
|
11468
|
+
class ElementStyle extends Resource {
|
|
11469
|
+
_backgroundColor = new Color();
|
|
11470
|
+
constructor(properties) {
|
|
11469
11471
|
super();
|
|
11470
11472
|
this.setProperties(properties);
|
|
11471
|
-
this.append(children);
|
|
11472
11473
|
}
|
|
11473
11474
|
_updateProperty(key, value, oldValue, declaration) {
|
|
11474
11475
|
super._updateProperty(key, value, oldValue, declaration);
|
|
11475
11476
|
switch (key) {
|
|
11476
|
-
case "
|
|
11477
|
-
|
|
11478
|
-
case "max": {
|
|
11479
|
-
this.value = clamp(this.minValue, this.value, this.maxValue);
|
|
11480
|
-
this._updateScale();
|
|
11477
|
+
case "backgroundColor":
|
|
11478
|
+
this._backgroundColor.value = this.backgroundColor === "none" ? undefined : this.backgroundColor;
|
|
11481
11479
|
break;
|
|
11482
|
-
}
|
|
11483
11480
|
}
|
|
11484
11481
|
}
|
|
11485
|
-
|
|
11486
|
-
|
|
11487
|
-
if (target) {
|
|
11488
|
-
target.style.scaleX = this.value;
|
|
11489
|
-
target.style.scaleY = this.value;
|
|
11490
|
-
this.emit("updateScale", this.value);
|
|
11491
|
-
}
|
|
11482
|
+
canPointeEvents() {
|
|
11483
|
+
return this.pointerEvents !== "none";
|
|
11492
11484
|
}
|
|
11493
|
-
|
|
11494
|
-
|
|
11495
|
-
if (!target)
|
|
11496
|
-
return;
|
|
11497
|
-
e.preventDefault();
|
|
11498
|
-
const isTouchPad = e.wheelDeltaY ? Math.abs(Math.abs(e.wheelDeltaY) - Math.abs(3 * e.deltaY)) < 3 : e.deltaMode === 0;
|
|
11499
|
-
if (!isTouchPad && e.ctrlKey) {
|
|
11500
|
-
e.preventDefault();
|
|
11501
|
-
let distance = e.deltaY / (e.ctrlKey ? 1 : 100);
|
|
11502
|
-
distance *= -0.015;
|
|
11503
|
-
this.value += distance;
|
|
11504
|
-
}
|
|
11485
|
+
getComputedOpacity() {
|
|
11486
|
+
return clamp(0, this.opacity, 1);
|
|
11505
11487
|
}
|
|
11506
|
-
|
|
11507
|
-
|
|
11508
|
-
|
|
11509
|
-
|
|
11510
|
-
|
|
11511
|
-
|
|
11488
|
+
getComputedBackgroundColor() {
|
|
11489
|
+
return this._backgroundColor;
|
|
11490
|
+
}
|
|
11491
|
+
async loadBackgroundImage() {
|
|
11492
|
+
if (this.backgroundImage !== "none") {
|
|
11493
|
+
return await assets.texture.load(this.backgroundImage);
|
|
11512
11494
|
}
|
|
11513
11495
|
}
|
|
11514
|
-
|
|
11515
|
-
|
|
11516
|
-
|
|
11517
|
-
|
|
11518
|
-
|
|
11519
|
-
|
|
11520
|
-
|
|
11521
|
-
|
|
11522
|
-
|
|
11523
|
-
|
|
11524
|
-
|
|
11525
|
-
|
|
11526
|
-
|
|
11527
|
-
|
|
11528
|
-
|
|
11529
|
-
|
|
11530
|
-
|
|
11531
|
-
|
|
11532
|
-
|
|
11496
|
+
getComputedTransformOrigin() {
|
|
11497
|
+
const [originX, originY = originX] = this.transformOrigin.split(" ");
|
|
11498
|
+
return [originX, originY].map((val) => {
|
|
11499
|
+
val = val.trim();
|
|
11500
|
+
switch (val) {
|
|
11501
|
+
case "left":
|
|
11502
|
+
case "top":
|
|
11503
|
+
return 0;
|
|
11504
|
+
case "center":
|
|
11505
|
+
return 0.5;
|
|
11506
|
+
case "right":
|
|
11507
|
+
case "bottom":
|
|
11508
|
+
return 1;
|
|
11509
|
+
default:
|
|
11510
|
+
return Number(val);
|
|
11511
|
+
}
|
|
11512
|
+
});
|
|
11513
|
+
}
|
|
11514
|
+
_defaultFilter = {
|
|
11515
|
+
"brightness": 1,
|
|
11516
|
+
"contrast": 1,
|
|
11517
|
+
"grayscale": 0,
|
|
11518
|
+
"hue-rotate": 0,
|
|
11519
|
+
"invert": 0,
|
|
11520
|
+
"opacity": 1,
|
|
11521
|
+
"saturate": 1,
|
|
11522
|
+
"sepia": 0
|
|
11523
|
+
};
|
|
11524
|
+
getComputedFilter() {
|
|
11525
|
+
let filter = {};
|
|
11526
|
+
if (this.filter === "none") {
|
|
11527
|
+
return filter;
|
|
11528
|
+
}
|
|
11529
|
+
filter = parseCssFunctions(this.filter).reduce((filter2, { name, args }) => {
|
|
11530
|
+
filter2[name] = args[0].normalizedIntValue;
|
|
11531
|
+
return filter2;
|
|
11532
|
+
}, filter);
|
|
11533
|
+
Object.keys(this._defaultFilter).forEach((name) => {
|
|
11534
|
+
filter[name] = filter[name] ?? this._defaultFilter[name];
|
|
11535
|
+
});
|
|
11536
|
+
return filter;
|
|
11537
|
+
}
|
|
11538
|
+
getComputedFilterColorMatrix() {
|
|
11539
|
+
const m = new ColorMatrix();
|
|
11540
|
+
const filter = this.getComputedFilter();
|
|
11541
|
+
for (const name in filter) {
|
|
11542
|
+
const value = filter[name];
|
|
11543
|
+
switch (name) {
|
|
11544
|
+
case "hue-rotate":
|
|
11545
|
+
m.hueRotate(value * PI_2);
|
|
11546
|
+
break;
|
|
11547
|
+
case "saturate":
|
|
11548
|
+
m.saturate(value);
|
|
11549
|
+
break;
|
|
11550
|
+
case "brightness":
|
|
11551
|
+
m.brightness(value);
|
|
11552
|
+
break;
|
|
11553
|
+
case "contrast":
|
|
11554
|
+
m.contrast(value);
|
|
11555
|
+
break;
|
|
11556
|
+
case "invert":
|
|
11557
|
+
m.invert(value);
|
|
11558
|
+
break;
|
|
11559
|
+
case "sepia":
|
|
11560
|
+
m.sepia(value);
|
|
11561
|
+
break;
|
|
11562
|
+
case "opacity":
|
|
11563
|
+
m.opacity(value);
|
|
11564
|
+
break;
|
|
11565
|
+
case "grayscale":
|
|
11566
|
+
m.grayscale(value);
|
|
11567
|
+
break;
|
|
11568
|
+
}
|
|
11569
|
+
}
|
|
11570
|
+
return m;
|
|
11571
|
+
}
|
|
11572
|
+
}
|
|
11573
|
+
__decorateClass$6([
|
|
11574
|
+
property({ default: "none" })
|
|
11575
|
+
], ElementStyle.prototype, "backgroundColor");
|
|
11576
|
+
__decorateClass$6([
|
|
11577
|
+
property({ default: "none" })
|
|
11578
|
+
], ElementStyle.prototype, "backgroundImage");
|
|
11579
|
+
__decorateClass$6([
|
|
11580
|
+
property({ default: "none" })
|
|
11581
|
+
], ElementStyle.prototype, "filter");
|
|
11582
|
+
__decorateClass$6([
|
|
11583
|
+
property({ default: "none" })
|
|
11584
|
+
], ElementStyle.prototype, "boxShadow");
|
|
11585
|
+
__decorateClass$6([
|
|
11586
|
+
property({ default: "none" })
|
|
11587
|
+
], ElementStyle.prototype, "maskImage");
|
|
11588
|
+
__decorateClass$6([
|
|
11589
|
+
property({ default: 1 })
|
|
11590
|
+
], ElementStyle.prototype, "opacity");
|
|
11591
|
+
__decorateClass$6([
|
|
11592
|
+
property({ default: 0 })
|
|
11593
|
+
], ElementStyle.prototype, "borderRadius");
|
|
11594
|
+
__decorateClass$6([
|
|
11595
|
+
property({ default: "#000000" })
|
|
11596
|
+
], ElementStyle.prototype, "borderColor");
|
|
11597
|
+
__decorateClass$6([
|
|
11598
|
+
property({ default: "none" })
|
|
11599
|
+
], ElementStyle.prototype, "borderStyle");
|
|
11600
|
+
__decorateClass$6([
|
|
11601
|
+
property({ default: 0 })
|
|
11602
|
+
], ElementStyle.prototype, "outlineWidth");
|
|
11603
|
+
__decorateClass$6([
|
|
11604
|
+
property({ default: 0 })
|
|
11605
|
+
], ElementStyle.prototype, "outlineOffset");
|
|
11606
|
+
__decorateClass$6([
|
|
11607
|
+
property({ default: "#000000" })
|
|
11608
|
+
], ElementStyle.prototype, "outlineColor");
|
|
11609
|
+
__decorateClass$6([
|
|
11610
|
+
property({ default: "none" })
|
|
11611
|
+
], ElementStyle.prototype, "outlineStyle");
|
|
11612
|
+
__decorateClass$6([
|
|
11613
|
+
property({ default: "visible" })
|
|
11614
|
+
], ElementStyle.prototype, "visibility");
|
|
11615
|
+
__decorateClass$6([
|
|
11616
|
+
property({ default: "visible" })
|
|
11617
|
+
], ElementStyle.prototype, "overflow");
|
|
11618
|
+
__decorateClass$6([
|
|
11619
|
+
property({ default: "auto" })
|
|
11620
|
+
], ElementStyle.prototype, "pointerEvents");
|
|
11621
|
+
__decorateClass$6([
|
|
11622
|
+
property()
|
|
11623
|
+
], ElementStyle.prototype, "alignContent");
|
|
11624
|
+
__decorateClass$6([
|
|
11625
|
+
property()
|
|
11626
|
+
], ElementStyle.prototype, "alignItems");
|
|
11627
|
+
__decorateClass$6([
|
|
11628
|
+
property()
|
|
11629
|
+
], ElementStyle.prototype, "alignSelf");
|
|
11630
|
+
__decorateClass$6([
|
|
11631
|
+
property()
|
|
11632
|
+
], ElementStyle.prototype, "borderTop");
|
|
11633
|
+
__decorateClass$6([
|
|
11634
|
+
property()
|
|
11635
|
+
], ElementStyle.prototype, "borderLeft");
|
|
11636
|
+
__decorateClass$6([
|
|
11637
|
+
property()
|
|
11638
|
+
], ElementStyle.prototype, "borderRight");
|
|
11639
|
+
__decorateClass$6([
|
|
11640
|
+
property()
|
|
11641
|
+
], ElementStyle.prototype, "borderBottom");
|
|
11642
|
+
__decorateClass$6([
|
|
11643
|
+
property()
|
|
11644
|
+
], ElementStyle.prototype, "borderWidth");
|
|
11645
|
+
__decorateClass$6([
|
|
11646
|
+
property()
|
|
11647
|
+
], ElementStyle.prototype, "border");
|
|
11648
|
+
__decorateClass$6([
|
|
11649
|
+
property()
|
|
11650
|
+
], ElementStyle.prototype, "direction");
|
|
11651
|
+
__decorateClass$6([
|
|
11652
|
+
property()
|
|
11653
|
+
], ElementStyle.prototype, "display");
|
|
11654
|
+
__decorateClass$6([
|
|
11655
|
+
property()
|
|
11656
|
+
], ElementStyle.prototype, "flex");
|
|
11657
|
+
__decorateClass$6([
|
|
11658
|
+
property()
|
|
11659
|
+
], ElementStyle.prototype, "flexBasis");
|
|
11660
|
+
__decorateClass$6([
|
|
11661
|
+
property()
|
|
11662
|
+
], ElementStyle.prototype, "flexDirection");
|
|
11663
|
+
__decorateClass$6([
|
|
11664
|
+
property()
|
|
11665
|
+
], ElementStyle.prototype, "flexGrow");
|
|
11666
|
+
__decorateClass$6([
|
|
11667
|
+
property()
|
|
11668
|
+
], ElementStyle.prototype, "flexShrink");
|
|
11669
|
+
__decorateClass$6([
|
|
11670
|
+
property()
|
|
11671
|
+
], ElementStyle.prototype, "flexWrap");
|
|
11672
|
+
__decorateClass$6([
|
|
11673
|
+
property()
|
|
11674
|
+
], ElementStyle.prototype, "height");
|
|
11675
|
+
__decorateClass$6([
|
|
11676
|
+
property()
|
|
11677
|
+
], ElementStyle.prototype, "justifyContent");
|
|
11678
|
+
__decorateClass$6([
|
|
11679
|
+
property()
|
|
11680
|
+
], ElementStyle.prototype, "gap");
|
|
11681
|
+
__decorateClass$6([
|
|
11682
|
+
property()
|
|
11683
|
+
], ElementStyle.prototype, "marginTop");
|
|
11684
|
+
__decorateClass$6([
|
|
11685
|
+
property()
|
|
11686
|
+
], ElementStyle.prototype, "marginLeft");
|
|
11687
|
+
__decorateClass$6([
|
|
11688
|
+
property()
|
|
11689
|
+
], ElementStyle.prototype, "marginRight");
|
|
11690
|
+
__decorateClass$6([
|
|
11691
|
+
property()
|
|
11692
|
+
], ElementStyle.prototype, "marginBottom");
|
|
11693
|
+
__decorateClass$6([
|
|
11694
|
+
property()
|
|
11695
|
+
], ElementStyle.prototype, "margin");
|
|
11696
|
+
__decorateClass$6([
|
|
11697
|
+
property()
|
|
11698
|
+
], ElementStyle.prototype, "maxHeight");
|
|
11699
|
+
__decorateClass$6([
|
|
11700
|
+
property()
|
|
11701
|
+
], ElementStyle.prototype, "maxWidth");
|
|
11702
|
+
__decorateClass$6([
|
|
11703
|
+
property()
|
|
11704
|
+
], ElementStyle.prototype, "minHeight");
|
|
11705
|
+
__decorateClass$6([
|
|
11706
|
+
property()
|
|
11707
|
+
], ElementStyle.prototype, "minWidth");
|
|
11708
|
+
__decorateClass$6([
|
|
11709
|
+
property()
|
|
11710
|
+
], ElementStyle.prototype, "paddingTop");
|
|
11711
|
+
__decorateClass$6([
|
|
11712
|
+
property()
|
|
11713
|
+
], ElementStyle.prototype, "paddingLeft");
|
|
11714
|
+
__decorateClass$6([
|
|
11715
|
+
property()
|
|
11716
|
+
], ElementStyle.prototype, "paddingRight");
|
|
11717
|
+
__decorateClass$6([
|
|
11718
|
+
property()
|
|
11719
|
+
], ElementStyle.prototype, "paddingBottom");
|
|
11720
|
+
__decorateClass$6([
|
|
11721
|
+
property()
|
|
11722
|
+
], ElementStyle.prototype, "padding");
|
|
11723
|
+
__decorateClass$6([
|
|
11724
|
+
property()
|
|
11725
|
+
], ElementStyle.prototype, "top");
|
|
11726
|
+
__decorateClass$6([
|
|
11727
|
+
property()
|
|
11728
|
+
], ElementStyle.prototype, "bottom");
|
|
11729
|
+
__decorateClass$6([
|
|
11730
|
+
property()
|
|
11731
|
+
], ElementStyle.prototype, "left");
|
|
11732
|
+
__decorateClass$6([
|
|
11733
|
+
property()
|
|
11734
|
+
], ElementStyle.prototype, "right");
|
|
11735
|
+
__decorateClass$6([
|
|
11736
|
+
property()
|
|
11737
|
+
], ElementStyle.prototype, "position");
|
|
11738
|
+
__decorateClass$6([
|
|
11739
|
+
property()
|
|
11740
|
+
], ElementStyle.prototype, "boxSizing");
|
|
11741
|
+
__decorateClass$6([
|
|
11742
|
+
property()
|
|
11743
|
+
], ElementStyle.prototype, "width");
|
|
11744
|
+
const transformStyle = modernIdoc.getDefaultTransformStyle();
|
|
11745
|
+
for (const key in transformStyle) {
|
|
11746
|
+
defineProperty(ElementStyle, key, { default: transformStyle[key] });
|
|
11747
|
+
}
|
|
11748
|
+
const textStyle = modernIdoc.getDefaultTextStyle();
|
|
11749
|
+
for (const key in textStyle) {
|
|
11750
|
+
defineProperty(ElementStyle, key, { default: textStyle[key] });
|
|
11751
|
+
}
|
|
11752
|
+
|
|
11753
|
+
var __defProp$5 = Object.defineProperty;
|
|
11754
|
+
var __getOwnPropDesc$5 = Object.getOwnPropertyDescriptor;
|
|
11755
|
+
var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
11756
|
+
var __decorateClass$5 = (decorators, target, key, kind) => {
|
|
11757
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$5(target, key) : target;
|
|
11758
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
11759
|
+
if (decorator = decorators[i])
|
|
11760
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
11761
|
+
if (kind && result) __defProp$5(target, key, result);
|
|
11762
|
+
return result;
|
|
11763
|
+
};
|
|
11764
|
+
var __publicField$4 = (obj, key, value) => __defNormalProp$4(obj, key + "" , value);
|
|
11765
|
+
const alignMap = {
|
|
11766
|
+
"auto": load.Align.Auto,
|
|
11767
|
+
"flex-start": load.Align.FlexStart,
|
|
11768
|
+
"center": load.Align.Center,
|
|
11769
|
+
"flex-end": load.Align.FlexEnd,
|
|
11770
|
+
"stretch": load.Align.Stretch,
|
|
11771
|
+
"baseline": load.Align.Baseline,
|
|
11772
|
+
"space-between": load.Align.SpaceBetween,
|
|
11773
|
+
"space-around": load.Align.SpaceAround,
|
|
11774
|
+
"space-evenly": load.Align.SpaceEvenly
|
|
11775
|
+
};
|
|
11776
|
+
const displayMap = {
|
|
11777
|
+
none: load.Display.None,
|
|
11778
|
+
flex: load.Display.Flex,
|
|
11779
|
+
contents: load.Display.Contents
|
|
11780
|
+
};
|
|
11781
|
+
const directionMap = {
|
|
11782
|
+
inherit: load.Direction.Inherit,
|
|
11783
|
+
ltr: load.Direction.LTR,
|
|
11784
|
+
rtl: load.Direction.RTL
|
|
11785
|
+
};
|
|
11786
|
+
const flexDirectionMap = {
|
|
11787
|
+
"column": load.FlexDirection.Column,
|
|
11788
|
+
"column-reverse": load.FlexDirection.ColumnReverse,
|
|
11789
|
+
"row": load.FlexDirection.Row,
|
|
11790
|
+
"row-reverse": load.FlexDirection.RowReverse
|
|
11791
|
+
};
|
|
11792
|
+
const flexWrapMap = {
|
|
11793
|
+
"no-wrap": load.Wrap.NoWrap,
|
|
11794
|
+
"wrap": load.Wrap.Wrap,
|
|
11795
|
+
"Wrap-reverse": load.Wrap.WrapReverse
|
|
11796
|
+
};
|
|
11797
|
+
const justifyMap = {
|
|
11798
|
+
"flex-start": load.Justify.FlexStart,
|
|
11799
|
+
"center": load.Justify.Center,
|
|
11800
|
+
"flex-end": load.Justify.FlexEnd,
|
|
11801
|
+
"space-between": load.Justify.SpaceBetween,
|
|
11802
|
+
"space-around": load.Justify.SpaceAround,
|
|
11803
|
+
"space-evenly": load.Justify.SpaceEvenly
|
|
11804
|
+
};
|
|
11805
|
+
const overflowMap = {
|
|
11806
|
+
visible: load.Overflow.Visible,
|
|
11807
|
+
hidden: load.Overflow.Hidden,
|
|
11808
|
+
scroll: load.Overflow.Scroll
|
|
11809
|
+
};
|
|
11810
|
+
const positionTypeMap = {
|
|
11811
|
+
static: load.PositionType.Static,
|
|
11812
|
+
relative: load.PositionType.Relative,
|
|
11813
|
+
absolute: load.PositionType.Absolute
|
|
11814
|
+
};
|
|
11815
|
+
const boxSizingMap = {
|
|
11816
|
+
"border-box": load.BoxSizing.BorderBox,
|
|
11817
|
+
"content-box": load.BoxSizing.ContentBox
|
|
11818
|
+
};
|
|
11819
|
+
exports.Element = class Element extends exports.Node {
|
|
11820
|
+
static async loadLayoutEngine() {
|
|
11821
|
+
this.layoutEngine = await load.loadYoga();
|
|
11822
|
+
}
|
|
11823
|
+
get style() {
|
|
11824
|
+
return this._style;
|
|
11825
|
+
}
|
|
11826
|
+
set style(style) {
|
|
11827
|
+
const cb = (...args) => {
|
|
11828
|
+
this.emit("updateStyleProperty", ...args);
|
|
11829
|
+
this._updateStyleProperty(args[0], args[1], args[2], args[3]);
|
|
11830
|
+
};
|
|
11831
|
+
style.on("updateProperty", cb);
|
|
11832
|
+
this._style?.off("updateProperty", cb);
|
|
11833
|
+
this._style = style;
|
|
11834
|
+
}
|
|
11835
|
+
_layout = exports.Element.layoutEngine.Node.create();
|
|
11836
|
+
transform = new Transform2D();
|
|
11837
|
+
_parentTransformDirtyId;
|
|
11838
|
+
opacity = 1;
|
|
11839
|
+
visible = true;
|
|
11840
|
+
_parentOpacity;
|
|
11841
|
+
_parentVisible;
|
|
11842
|
+
_modulate = new Color(4294967295);
|
|
11843
|
+
_backgroundImage;
|
|
11844
|
+
context = new CanvasContext();
|
|
11845
|
+
_resetContext = true;
|
|
11846
|
+
_redrawing = false;
|
|
11847
|
+
_reflowing = false;
|
|
11848
|
+
_repainting = false;
|
|
11849
|
+
_originalBatchables = [];
|
|
11850
|
+
_layoutedBatchables = [];
|
|
11851
|
+
_batchables = [];
|
|
11852
|
+
constructor(properties, children = []) {
|
|
11853
|
+
super();
|
|
11854
|
+
this._updateStyleProperty = this._updateStyleProperty.bind(this);
|
|
11855
|
+
this.style = new ElementStyle();
|
|
11856
|
+
this.setProperties(properties).append(children);
|
|
11857
|
+
}
|
|
11858
|
+
setProperties(properties) {
|
|
11859
|
+
if (properties) {
|
|
11860
|
+
const { style, ...restProperties } = properties;
|
|
11861
|
+
style && this.style.setProperties(style);
|
|
11862
|
+
super.setProperties(restProperties);
|
|
11863
|
+
}
|
|
11864
|
+
return this;
|
|
11865
|
+
}
|
|
11866
|
+
_parented(parent) {
|
|
11867
|
+
super._parented(parent);
|
|
11868
|
+
if (parent._layout && this._layout) {
|
|
11869
|
+
parent._layout.insertChild(
|
|
11870
|
+
this._layout,
|
|
11871
|
+
parent._layout.getChildCount()
|
|
11872
|
+
);
|
|
11873
|
+
}
|
|
11874
|
+
}
|
|
11875
|
+
_unparented(oldParent) {
|
|
11876
|
+
super._unparented(oldParent);
|
|
11877
|
+
if (oldParent._layout && this._layout) {
|
|
11878
|
+
oldParent._layout.removeChild(this._layout);
|
|
11879
|
+
}
|
|
11880
|
+
}
|
|
11881
|
+
_updateProperty(key, value, oldValue, declaration) {
|
|
11882
|
+
super._updateProperty(key, value, oldValue, declaration);
|
|
11883
|
+
switch (key) {
|
|
11884
|
+
case "modulate":
|
|
11885
|
+
this._modulate.value = value;
|
|
11886
|
+
this.requestRepaint();
|
|
11887
|
+
break;
|
|
11888
|
+
case "blendMode":
|
|
11889
|
+
return this.requestRepaint();
|
|
11890
|
+
}
|
|
11891
|
+
}
|
|
11892
|
+
// eslint-disable-next-line unused-imports/no-unused-vars
|
|
11893
|
+
_updateStyleProperty(key, value, oldValue, declaration) {
|
|
11894
|
+
switch (key) {
|
|
11895
|
+
/** layout */
|
|
11896
|
+
case "alignContent":
|
|
11897
|
+
this._layout.setAlignContent(alignMap[this.style.alignContent]);
|
|
11898
|
+
break;
|
|
11899
|
+
case "alignItems":
|
|
11900
|
+
this._layout.setAlignItems(alignMap[this.style.alignItems]);
|
|
11901
|
+
break;
|
|
11902
|
+
case "alignSelf":
|
|
11903
|
+
this._layout.setAlignSelf(alignMap[this.style.alignSelf]);
|
|
11904
|
+
break;
|
|
11905
|
+
case "aspectRatio":
|
|
11906
|
+
this._layout.setAspectRatio(value);
|
|
11907
|
+
break;
|
|
11908
|
+
case "borderTop":
|
|
11909
|
+
this._layout.setBorder(load.Edge.Top, this.style.borderWidth);
|
|
11910
|
+
break;
|
|
11911
|
+
case "borderBottom":
|
|
11912
|
+
this._layout.setBorder(load.Edge.Bottom, this.style.borderWidth);
|
|
11913
|
+
break;
|
|
11914
|
+
case "borderLeft":
|
|
11915
|
+
this._layout.setBorder(load.Edge.Left, this.style.borderWidth);
|
|
11916
|
+
break;
|
|
11917
|
+
case "borderRight":
|
|
11918
|
+
this._layout.setBorder(load.Edge.Right, this.style.borderWidth);
|
|
11919
|
+
break;
|
|
11920
|
+
case "border":
|
|
11921
|
+
this._layout.setBorder(load.Edge.All, this.style.borderWidth);
|
|
11922
|
+
break;
|
|
11923
|
+
case "direction":
|
|
11924
|
+
this._layout.setDirection(directionMap[this.style.direction]);
|
|
11925
|
+
break;
|
|
11926
|
+
case "display":
|
|
11927
|
+
this._layout.setDisplay(displayMap[this.style.display]);
|
|
11928
|
+
break;
|
|
11929
|
+
case "flex":
|
|
11930
|
+
this._layout.setFlex(this.style.flex);
|
|
11931
|
+
break;
|
|
11932
|
+
case "flexBasis":
|
|
11933
|
+
this._layout.setFlexBasis(this.style.flexBasis);
|
|
11934
|
+
break;
|
|
11935
|
+
case "flexDirection":
|
|
11936
|
+
this._layout.setFlexDirection(flexDirectionMap[this.style.flexDirection]);
|
|
11937
|
+
break;
|
|
11938
|
+
case "flexGrow":
|
|
11939
|
+
this._layout.setFlexGrow(this.style.flexGrow);
|
|
11940
|
+
break;
|
|
11941
|
+
case "flexShrink":
|
|
11942
|
+
this._layout.setFlexShrink(this.style.flexShrink);
|
|
11943
|
+
break;
|
|
11944
|
+
case "flexWrap":
|
|
11945
|
+
this._layout.setFlexWrap(flexWrapMap[this.style.flexWrap]);
|
|
11946
|
+
break;
|
|
11947
|
+
case "height":
|
|
11948
|
+
this._layout.setHeight(this.style.height);
|
|
11949
|
+
break;
|
|
11950
|
+
case "justifyContent":
|
|
11951
|
+
this._layout.setJustifyContent(justifyMap[this.style.justifyContent]);
|
|
11952
|
+
break;
|
|
11953
|
+
case "gap":
|
|
11954
|
+
this._layout.setGap(load.Gutter.All, this.style.gap);
|
|
11955
|
+
break;
|
|
11956
|
+
case "marginTop":
|
|
11957
|
+
this._layout.setMargin(load.Edge.Top, this.style.marginTop);
|
|
11958
|
+
break;
|
|
11959
|
+
case "marginBottom":
|
|
11960
|
+
this._layout.setMargin(load.Edge.Top, this.style.marginBottom);
|
|
11961
|
+
break;
|
|
11962
|
+
case "marginLeft":
|
|
11963
|
+
this._layout.setMargin(load.Edge.Left, this.style.marginLeft);
|
|
11964
|
+
break;
|
|
11965
|
+
case "marginRight":
|
|
11966
|
+
this._layout.setMargin(load.Edge.Top, this.style.marginRight);
|
|
11967
|
+
break;
|
|
11968
|
+
case "margin":
|
|
11969
|
+
this._layout.setMargin(load.Edge.All, this.style.margin);
|
|
11970
|
+
break;
|
|
11971
|
+
case "maxHeight":
|
|
11972
|
+
this._layout.setMaxHeight(this.style.maxHeight);
|
|
11973
|
+
break;
|
|
11974
|
+
case "maxWidth":
|
|
11975
|
+
this._layout.setMaxWidth(this.style.maxWidth);
|
|
11976
|
+
break;
|
|
11977
|
+
// setDirtiedFunc(dirtiedFunc: DirtiedFunction | null): void;
|
|
11978
|
+
// setMeasureFunc(measureFunc: MeasureFunction | null): void;
|
|
11979
|
+
case "minHeight":
|
|
11980
|
+
this._layout.setMinHeight(this.style.minHeight);
|
|
11981
|
+
break;
|
|
11982
|
+
case "minWidth":
|
|
11983
|
+
this._layout.setMinWidth(this.style.minWidth);
|
|
11984
|
+
break;
|
|
11985
|
+
case "overflow":
|
|
11986
|
+
this._layout.setOverflow(overflowMap[this.style.overflow]);
|
|
11987
|
+
break;
|
|
11988
|
+
case "paddingTop":
|
|
11989
|
+
this._layout.setPadding(load.Edge.Top, this.style.paddingTop);
|
|
11990
|
+
break;
|
|
11991
|
+
case "paddingBottom":
|
|
11992
|
+
this._layout.setPadding(load.Edge.Bottom, this.style.paddingBottom);
|
|
11993
|
+
break;
|
|
11994
|
+
case "paddingLeft":
|
|
11995
|
+
this._layout.setPadding(load.Edge.Left, this.style.paddingLeft);
|
|
11996
|
+
break;
|
|
11997
|
+
case "paddingRight":
|
|
11998
|
+
this._layout.setPadding(load.Edge.Right, this.style.paddingRight);
|
|
11999
|
+
break;
|
|
12000
|
+
case "padding":
|
|
12001
|
+
this._layout.setPadding(load.Edge.All, this.style.padding);
|
|
12002
|
+
break;
|
|
12003
|
+
case "top":
|
|
12004
|
+
this._layout.setPosition(load.Edge.Top, this.style.top);
|
|
12005
|
+
break;
|
|
12006
|
+
case "bottom":
|
|
12007
|
+
this._layout.setPosition(load.Edge.Bottom, this.style.bottom);
|
|
12008
|
+
break;
|
|
12009
|
+
case "left":
|
|
12010
|
+
this._layout.setPosition(load.Edge.Left, this.style.left);
|
|
12011
|
+
break;
|
|
12012
|
+
case "right":
|
|
12013
|
+
this._layout.setPosition(load.Edge.Right, this.style.right);
|
|
12014
|
+
break;
|
|
12015
|
+
case "position":
|
|
12016
|
+
this._layout.setPositionType(positionTypeMap[this.style.position]);
|
|
12017
|
+
break;
|
|
12018
|
+
case "boxSizing":
|
|
12019
|
+
this._layout.setBoxSizing(boxSizingMap[this.style.boxSizing]);
|
|
12020
|
+
break;
|
|
12021
|
+
case "width":
|
|
12022
|
+
this._layout.setWidth(this.style.width);
|
|
12023
|
+
break;
|
|
12024
|
+
case "scaleX":
|
|
12025
|
+
case "scaleY":
|
|
12026
|
+
case "rotate":
|
|
12027
|
+
case "transform":
|
|
12028
|
+
case "transformOrigin":
|
|
12029
|
+
this._updateTransform();
|
|
12030
|
+
break;
|
|
12031
|
+
/** draw */
|
|
12032
|
+
case "backgroundColor":
|
|
12033
|
+
this._updateBackgroundColor();
|
|
12034
|
+
break;
|
|
12035
|
+
case "backgroundImage":
|
|
12036
|
+
this._updateBackgroundImage();
|
|
12037
|
+
break;
|
|
12038
|
+
case "opacity":
|
|
12039
|
+
this._updateOpacity();
|
|
12040
|
+
break;
|
|
12041
|
+
case "visibility":
|
|
12042
|
+
this._updateVisible();
|
|
12043
|
+
break;
|
|
12044
|
+
case "filter":
|
|
12045
|
+
this.requestRepaint();
|
|
12046
|
+
break;
|
|
12047
|
+
case "boxShadow":
|
|
12048
|
+
this._updateBoxShadow();
|
|
12049
|
+
break;
|
|
12050
|
+
case "maskImage":
|
|
12051
|
+
this._updateMaskImage();
|
|
12052
|
+
break;
|
|
12053
|
+
case "borderRadius":
|
|
12054
|
+
this.requestRedraw();
|
|
12055
|
+
break;
|
|
12056
|
+
}
|
|
12057
|
+
}
|
|
12058
|
+
_updateBoxShadow() {
|
|
12059
|
+
const nodePath = "__$style.shadow";
|
|
12060
|
+
if (this.style.boxShadow !== "none") {
|
|
12061
|
+
const node = this.getNode(nodePath);
|
|
12062
|
+
if (node) ; else {
|
|
12063
|
+
this.appendChild(new exports.ShadowEffect(), "back");
|
|
12064
|
+
}
|
|
12065
|
+
} else {
|
|
12066
|
+
const node = this.getNode(nodePath);
|
|
12067
|
+
if (node) {
|
|
12068
|
+
this.removeChild(node);
|
|
12069
|
+
}
|
|
12070
|
+
}
|
|
12071
|
+
}
|
|
12072
|
+
_updateMaskImage() {
|
|
12073
|
+
const nodePath = "__$style.maskImage";
|
|
12074
|
+
const maskImage = this.style.maskImage;
|
|
12075
|
+
if (maskImage && maskImage !== "none") {
|
|
12076
|
+
const node = this.getNode(nodePath);
|
|
12077
|
+
if (node) {
|
|
12078
|
+
node.src = maskImage;
|
|
12079
|
+
} else {
|
|
12080
|
+
this.appendChild(new exports.MaskEffect({ src: maskImage }), "back");
|
|
12081
|
+
}
|
|
12082
|
+
} else {
|
|
12083
|
+
const node = this.getNode(nodePath);
|
|
12084
|
+
if (node) {
|
|
12085
|
+
this.removeChild(node);
|
|
12086
|
+
}
|
|
12087
|
+
}
|
|
12088
|
+
}
|
|
12089
|
+
_updateBackgroundColor() {
|
|
12090
|
+
const backgroundColor = this.style.getComputedBackgroundColor();
|
|
12091
|
+
if (this._originalBatchables.length) {
|
|
12092
|
+
this.requestRepaint();
|
|
12093
|
+
} else if (backgroundColor.a > 0) {
|
|
12094
|
+
this.requestRedraw();
|
|
12095
|
+
}
|
|
12096
|
+
}
|
|
12097
|
+
async _updateBackgroundImage() {
|
|
12098
|
+
this._backgroundImage = await this.style.loadBackgroundImage();
|
|
12099
|
+
this.requestRedraw();
|
|
12100
|
+
}
|
|
12101
|
+
_updateOpacity() {
|
|
12102
|
+
const opacity = this.style.getComputedOpacity() * (this.getParent()?.opacity ?? 1);
|
|
12103
|
+
if (this.opacity !== opacity) {
|
|
12104
|
+
this.opacity = opacity;
|
|
12105
|
+
this.requestRepaint();
|
|
12106
|
+
}
|
|
12107
|
+
}
|
|
12108
|
+
_updateVisible() {
|
|
12109
|
+
this.visible = this.style.visibility === "visible" && (this.getParent()?.visible ?? true);
|
|
12110
|
+
}
|
|
12111
|
+
_updateTransform() {
|
|
12112
|
+
this.calculateLayout(undefined, undefined, load.Direction.LTR);
|
|
12113
|
+
const layout = this._layout.getComputedLayout();
|
|
12114
|
+
const { left, top, width, height } = layout;
|
|
12115
|
+
const {
|
|
12116
|
+
scaleX,
|
|
12117
|
+
scaleY,
|
|
12118
|
+
rotate
|
|
12119
|
+
} = this.style;
|
|
12120
|
+
const t3d = new Transform2D(false);
|
|
12121
|
+
const t2d = new Transform2D(false).scale(scaleX, scaleY).translate(left, top).rotate(rotate * DEG_TO_RAD);
|
|
12122
|
+
const _t3d = new Transform2D();
|
|
12123
|
+
parseCssFunctions(
|
|
12124
|
+
!this.style.transform || this.style.transform === "none" ? "" : this.style.transform,
|
|
12125
|
+
{ width, height }
|
|
12126
|
+
).forEach(({ name, args }) => {
|
|
12127
|
+
const values = args.map((arg) => arg.normalizedIntValue);
|
|
12128
|
+
_t3d.identity();
|
|
12129
|
+
switch (name) {
|
|
12130
|
+
case "translate":
|
|
12131
|
+
_t3d.translate(values[0] * width, (values[1] ?? values[0]) * height);
|
|
12132
|
+
break;
|
|
12133
|
+
case "translateX":
|
|
12134
|
+
_t3d.translateX(values[0] * width);
|
|
12135
|
+
break;
|
|
12136
|
+
case "translateY":
|
|
12137
|
+
_t3d.translateY(values[0] * height);
|
|
12138
|
+
break;
|
|
12139
|
+
case "translateZ":
|
|
12140
|
+
_t3d.translateZ(values[0]);
|
|
12141
|
+
break;
|
|
12142
|
+
case "translate3d":
|
|
12143
|
+
_t3d.translate3d(
|
|
12144
|
+
values[0] * width,
|
|
12145
|
+
(values[1] ?? values[0]) * height,
|
|
12146
|
+
values[2] ?? values[1] ?? values[0]
|
|
12147
|
+
);
|
|
12148
|
+
break;
|
|
12149
|
+
case "scale":
|
|
12150
|
+
_t3d.scale(values[0], values[1] ?? values[0]);
|
|
12151
|
+
break;
|
|
12152
|
+
case "scaleX":
|
|
12153
|
+
_t3d.scaleX(values[0]);
|
|
12154
|
+
break;
|
|
12155
|
+
case "scaleY":
|
|
12156
|
+
_t3d.scaleY(values[0]);
|
|
12157
|
+
break;
|
|
12158
|
+
case "scale3d":
|
|
12159
|
+
_t3d.scale3d(values[0], values[1] ?? values[0], values[2] ?? values[1] ?? values[0]);
|
|
12160
|
+
break;
|
|
12161
|
+
case "rotate":
|
|
12162
|
+
_t3d.rotate(values[0] * PI_2);
|
|
12163
|
+
break;
|
|
12164
|
+
case "rotateX":
|
|
12165
|
+
_t3d.rotateX(values[0] * PI_2);
|
|
12166
|
+
break;
|
|
12167
|
+
case "rotateY":
|
|
12168
|
+
_t3d.rotateY(values[0] * PI_2);
|
|
12169
|
+
break;
|
|
12170
|
+
case "rotateZ":
|
|
12171
|
+
_t3d.rotateZ(values[0] * PI_2);
|
|
12172
|
+
break;
|
|
12173
|
+
case "rotate3d":
|
|
12174
|
+
_t3d.rotate3d(
|
|
12175
|
+
values[0] * PI_2,
|
|
12176
|
+
(values[1] ?? values[0]) * PI_2,
|
|
12177
|
+
(values[2] ?? values[1] ?? values[0]) * PI_2,
|
|
12178
|
+
(values[3] ?? values[2] ?? values[1] ?? values[0]) * PI_2
|
|
12179
|
+
);
|
|
12180
|
+
break;
|
|
12181
|
+
case "skew":
|
|
12182
|
+
_t3d.skew(values[0], values[0] ?? values[1]);
|
|
12183
|
+
break;
|
|
12184
|
+
case "skewX":
|
|
12185
|
+
_t3d.skewX(values[0]);
|
|
12186
|
+
break;
|
|
12187
|
+
case "skewY":
|
|
12188
|
+
_t3d.skewY(values[0]);
|
|
12189
|
+
break;
|
|
12190
|
+
case "matrix":
|
|
12191
|
+
_t3d.set(values);
|
|
12192
|
+
break;
|
|
12193
|
+
}
|
|
12194
|
+
t3d.multiply(_t3d);
|
|
12195
|
+
});
|
|
12196
|
+
t2d.update();
|
|
12197
|
+
t3d.update();
|
|
12198
|
+
const t2dArr = t2d.toArray();
|
|
12199
|
+
const t3dArr = t3d.toArray();
|
|
12200
|
+
const t3dT2dArr = [
|
|
12201
|
+
t3dArr[0] * t2dArr[0] + t3dArr[3] * t2dArr[1],
|
|
12202
|
+
t3dArr[1] * t2dArr[0] + t3dArr[4] * t2dArr[1],
|
|
12203
|
+
t3dArr[2] * t2dArr[0] + t3dArr[5] * t2dArr[1] + t2dArr[2],
|
|
12204
|
+
t3dArr[0] * t2dArr[3] + t3dArr[3] * t2dArr[4],
|
|
12205
|
+
t3dArr[1] * t2dArr[3] + t3dArr[4] * t2dArr[4],
|
|
12206
|
+
t3dArr[2] * t2dArr[3] + t3dArr[5] * t2dArr[4] + t2dArr[5],
|
|
12207
|
+
0,
|
|
12208
|
+
0,
|
|
12209
|
+
1
|
|
12210
|
+
];
|
|
12211
|
+
const [originX, originY] = this.style.getComputedTransformOrigin();
|
|
12212
|
+
const offsetX = originX * width;
|
|
12213
|
+
const offsetY = originY * height;
|
|
12214
|
+
t3dT2dArr[2] += t3dT2dArr[0] * -offsetX + t3dT2dArr[1] * -offsetY + offsetX;
|
|
12215
|
+
t3dT2dArr[5] += t3dT2dArr[3] * -offsetX + t3dT2dArr[4] * -offsetY + offsetY;
|
|
12216
|
+
const parent = this.getParent();
|
|
12217
|
+
const parentTransform = parent?.transform;
|
|
12218
|
+
this._parentTransformDirtyId = parentTransform?.dirtyId;
|
|
12219
|
+
let transform;
|
|
12220
|
+
if (parentTransform) {
|
|
12221
|
+
const pt = parentTransform.toArray();
|
|
12222
|
+
transform = [
|
|
12223
|
+
t3dT2dArr[0] * pt[0] + t3dT2dArr[3] * pt[1],
|
|
12224
|
+
t3dT2dArr[1] * pt[0] + t3dT2dArr[4] * pt[1],
|
|
12225
|
+
t3dT2dArr[2] * pt[0] + t3dT2dArr[5] * pt[1] + pt[2],
|
|
12226
|
+
t3dT2dArr[0] * pt[3] + t3dT2dArr[3] * pt[4],
|
|
12227
|
+
t3dT2dArr[1] * pt[3] + t3dT2dArr[4] * pt[4],
|
|
12228
|
+
t3dT2dArr[2] * pt[3] + t3dT2dArr[5] * pt[4] + pt[5],
|
|
12229
|
+
0,
|
|
12230
|
+
0,
|
|
12231
|
+
1
|
|
12232
|
+
];
|
|
12233
|
+
} else {
|
|
12234
|
+
transform = t3dT2dArr;
|
|
12235
|
+
}
|
|
12236
|
+
this.transform.set(transform);
|
|
12237
|
+
this._updateOverflow();
|
|
12238
|
+
this.requestRedraw();
|
|
12239
|
+
}
|
|
12240
|
+
getRect() {
|
|
12241
|
+
const [a, c, tx, b, d, ty] = this.transform.toArray();
|
|
12242
|
+
const width = this._layout.getComputedWidth() ?? 0;
|
|
12243
|
+
const height = this._layout.getComputedHeight() ?? 0;
|
|
12244
|
+
return new Rect2(
|
|
12245
|
+
tx,
|
|
12246
|
+
ty,
|
|
12247
|
+
a * width + c * height,
|
|
12248
|
+
b * width + d * height
|
|
12249
|
+
);
|
|
12250
|
+
}
|
|
12251
|
+
_updateOverflow() {
|
|
12252
|
+
if (this.style.overflow === "hidden") {
|
|
12253
|
+
const rect = this.getRect();
|
|
12254
|
+
this.mask = {
|
|
12255
|
+
x: rect.x,
|
|
12256
|
+
y: rect.y,
|
|
12257
|
+
width: rect.width,
|
|
12258
|
+
height: rect.height
|
|
12259
|
+
};
|
|
12260
|
+
} else {
|
|
12261
|
+
this.mask = undefined;
|
|
12262
|
+
}
|
|
12263
|
+
}
|
|
12264
|
+
show() {
|
|
12265
|
+
this.style.visibility = "visible";
|
|
12266
|
+
}
|
|
12267
|
+
hide() {
|
|
12268
|
+
this.style.visibility = "hidden";
|
|
12269
|
+
}
|
|
12270
|
+
isVisibleInTree() {
|
|
12271
|
+
return this.opacity > 0 && this.visible;
|
|
12272
|
+
}
|
|
12273
|
+
canRender() {
|
|
12274
|
+
return super.canRender() && this.isVisibleInTree();
|
|
12275
|
+
}
|
|
12276
|
+
requestRedraw() {
|
|
12277
|
+
this._redrawing = true;
|
|
12278
|
+
}
|
|
12279
|
+
requestReflow() {
|
|
12280
|
+
this._reflowing = true;
|
|
12281
|
+
}
|
|
12282
|
+
requestRepaint() {
|
|
12283
|
+
this._repainting = true;
|
|
12284
|
+
}
|
|
12285
|
+
_process(delta) {
|
|
12286
|
+
const parent = this.getParent();
|
|
12287
|
+
if (this._parentVisible !== parent?.visible) {
|
|
12288
|
+
this._parentVisible = parent?.visible;
|
|
12289
|
+
this._updateVisible();
|
|
12290
|
+
}
|
|
12291
|
+
if (this._parentOpacity !== parent?.opacity) {
|
|
12292
|
+
this._parentOpacity = parent?.opacity;
|
|
12293
|
+
this._updateOpacity();
|
|
12294
|
+
}
|
|
12295
|
+
if (this._layout.hasNewLayout() || parent?.transform?.dirtyId !== this._parentTransformDirtyId) {
|
|
12296
|
+
this._layout.markLayoutSeen();
|
|
12297
|
+
this._updateTransform();
|
|
12298
|
+
}
|
|
12299
|
+
super._process(delta);
|
|
12300
|
+
}
|
|
12301
|
+
_transformVertices(vertices) {
|
|
12302
|
+
const [a, c, tx, b, d, ty] = this.transform.toArray();
|
|
12303
|
+
const newVertices = vertices.slice();
|
|
12304
|
+
for (let len = vertices.length, i = 0; i < len; i += 2) {
|
|
12305
|
+
const x = vertices[i];
|
|
12306
|
+
const y = vertices[i + 1];
|
|
12307
|
+
newVertices[i] = a * x + c * y + tx;
|
|
12308
|
+
newVertices[i + 1] = b * x + d * y + ty;
|
|
12309
|
+
}
|
|
12310
|
+
return newVertices;
|
|
12311
|
+
}
|
|
12312
|
+
_draw() {
|
|
12313
|
+
this._drawBackground();
|
|
12314
|
+
this._drawContent();
|
|
12315
|
+
this._drawBorder();
|
|
12316
|
+
this._drawOutline();
|
|
12317
|
+
}
|
|
12318
|
+
_drawBackground() {
|
|
12319
|
+
const texture = this._backgroundImage;
|
|
12320
|
+
if (texture?.valid) {
|
|
12321
|
+
this.context.fillStyle = texture;
|
|
12322
|
+
this.context.textureTransform = new Transform2D().scale(
|
|
12323
|
+
this._layout.getComputedWidth() / texture.width,
|
|
12324
|
+
this._layout.getComputedHeight() / texture.height
|
|
12325
|
+
);
|
|
12326
|
+
this._fillBoundingRect();
|
|
12327
|
+
}
|
|
12328
|
+
}
|
|
12329
|
+
_drawContent() {
|
|
12330
|
+
this._fillBoundingRect();
|
|
12331
|
+
}
|
|
12332
|
+
_drawBorder() {
|
|
12333
|
+
if (this.style.borderWidth && this.style.borderStyle !== "none") {
|
|
12334
|
+
this.context.lineWidth = this.style.borderWidth;
|
|
12335
|
+
this.context.strokeStyle = this.style.borderColor;
|
|
12336
|
+
this._strokeBoundingRect();
|
|
12337
|
+
}
|
|
12338
|
+
}
|
|
12339
|
+
_drawOutline() {
|
|
12340
|
+
if (this.style.outlineWidth && this.style.outlineColor !== "none") {
|
|
12341
|
+
this.context.lineWidth = this.style.outlineWidth;
|
|
12342
|
+
this.context.strokeStyle = this.style.outlineColor;
|
|
12343
|
+
this._strokeBoundingRect();
|
|
12344
|
+
}
|
|
12345
|
+
}
|
|
12346
|
+
_drawBoundingRect() {
|
|
12347
|
+
const { borderRadius } = this.style;
|
|
12348
|
+
const width = this._layout.getComputedWidth();
|
|
12349
|
+
const height = this._layout.getComputedHeight();
|
|
12350
|
+
if (width && height) {
|
|
12351
|
+
if (borderRadius) {
|
|
12352
|
+
this.context.roundRect(0, 0, width, height, borderRadius);
|
|
12353
|
+
} else {
|
|
12354
|
+
this.context.rect(0, 0, width, height);
|
|
12355
|
+
}
|
|
12356
|
+
}
|
|
12357
|
+
}
|
|
12358
|
+
_fillBoundingRect() {
|
|
12359
|
+
this._drawBoundingRect();
|
|
12360
|
+
this.context.fill();
|
|
12361
|
+
}
|
|
12362
|
+
_strokeBoundingRect() {
|
|
12363
|
+
this._drawBoundingRect();
|
|
12364
|
+
this.context.stroke();
|
|
12365
|
+
}
|
|
12366
|
+
_relayout(batchables) {
|
|
12367
|
+
return this._reflow(batchables);
|
|
12368
|
+
}
|
|
12369
|
+
_reflow(batchables) {
|
|
12370
|
+
return this._repaint(
|
|
12371
|
+
batchables.map((batchable) => {
|
|
12372
|
+
return {
|
|
12373
|
+
...batchable,
|
|
12374
|
+
vertices: this._transformVertices(batchable.vertices)
|
|
12375
|
+
};
|
|
12376
|
+
})
|
|
12377
|
+
);
|
|
12378
|
+
}
|
|
12379
|
+
_repaint(batchables) {
|
|
12380
|
+
const colorMatrix = this.style.getComputedFilterColorMatrix();
|
|
12381
|
+
return batchables.map((batchable) => {
|
|
12382
|
+
return {
|
|
12383
|
+
...batchable,
|
|
12384
|
+
backgroundColor: this.style.getComputedBackgroundColor().abgr,
|
|
12385
|
+
modulate: this._modulate.toArgb(this.opacity, true),
|
|
12386
|
+
colorMatrix: colorMatrix.toMatrix4().toArray(true),
|
|
12387
|
+
colorMatrixOffset: colorMatrix.toVector4().toArray(),
|
|
12388
|
+
blendMode: this.blendMode
|
|
12389
|
+
};
|
|
12390
|
+
});
|
|
12391
|
+
}
|
|
12392
|
+
calculateLayout(width, height, direction) {
|
|
12393
|
+
const parent = this.getParent();
|
|
12394
|
+
if (parent?.calculateLayout) {
|
|
12395
|
+
parent.calculateLayout(width, height, direction);
|
|
12396
|
+
} else {
|
|
12397
|
+
this._layout.calculateLayout(width, height, direction);
|
|
12398
|
+
}
|
|
12399
|
+
}
|
|
12400
|
+
_render(renderer) {
|
|
12401
|
+
let batchables;
|
|
12402
|
+
if (this._redrawing) {
|
|
12403
|
+
this.emit("draw");
|
|
12404
|
+
this._draw();
|
|
12405
|
+
this._originalBatchables = this.context.toBatchables();
|
|
12406
|
+
this._layoutedBatchables = this._relayout(this._originalBatchables);
|
|
12407
|
+
batchables = this._layoutedBatchables;
|
|
12408
|
+
if (this._resetContext) {
|
|
12409
|
+
this.context.reset();
|
|
12410
|
+
}
|
|
12411
|
+
} else if (this._reflowing) {
|
|
12412
|
+
this._layoutedBatchables = this._reflow(this._originalBatchables);
|
|
12413
|
+
batchables = this._layoutedBatchables;
|
|
12414
|
+
} else if (this._repainting) {
|
|
12415
|
+
batchables = this._repaint(this._layoutedBatchables);
|
|
12416
|
+
}
|
|
12417
|
+
if (batchables) {
|
|
12418
|
+
this._batchables = batchables;
|
|
12419
|
+
this._redrawing = false;
|
|
12420
|
+
this._reflowing = false;
|
|
12421
|
+
this._repainting = false;
|
|
12422
|
+
}
|
|
12423
|
+
this._batchables.forEach((batchable) => {
|
|
12424
|
+
batchable.texture?.upload(renderer);
|
|
12425
|
+
renderer.batch2D.render({
|
|
12426
|
+
...batchable,
|
|
12427
|
+
texture: batchable.texture?._glTexture(renderer)
|
|
12428
|
+
});
|
|
12429
|
+
});
|
|
12430
|
+
super._render(renderer);
|
|
12431
|
+
}
|
|
12432
|
+
toJSON() {
|
|
12433
|
+
const json = super.toJSON();
|
|
12434
|
+
return {
|
|
12435
|
+
...json,
|
|
12436
|
+
props: {
|
|
12437
|
+
style: this.style.toJSON(),
|
|
12438
|
+
...json.props
|
|
12439
|
+
}
|
|
12440
|
+
};
|
|
12441
|
+
}
|
|
12442
|
+
};
|
|
12443
|
+
__publicField$4(exports.Element, "layoutEngine");
|
|
12444
|
+
__decorateClass$5([
|
|
12445
|
+
property()
|
|
12446
|
+
], exports.Element.prototype, "modulate", 2);
|
|
12447
|
+
__decorateClass$5([
|
|
12448
|
+
property()
|
|
12449
|
+
], exports.Element.prototype, "blendMode", 2);
|
|
12450
|
+
exports.Element = __decorateClass$5([
|
|
12451
|
+
customNode("Element")
|
|
12452
|
+
], exports.Element);
|
|
12453
|
+
|
|
12454
|
+
var __defProp$4 = Object.defineProperty;
|
|
12455
|
+
var __getOwnPropDesc$4 = Object.getOwnPropertyDescriptor;
|
|
12456
|
+
var __decorateClass$4 = (decorators, target, key, kind) => {
|
|
12457
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$4(target, key) : target;
|
|
12458
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
12459
|
+
if (decorator = decorators[i])
|
|
12460
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
12461
|
+
if (kind && result) __defProp$4(target, key, result);
|
|
12462
|
+
return result;
|
|
12463
|
+
};
|
|
12464
|
+
exports.Scaler = class Scaler extends exports.Node {
|
|
12465
|
+
get target() {
|
|
12466
|
+
if (this.parent?.style) {
|
|
12467
|
+
return this.parent;
|
|
12468
|
+
}
|
|
12469
|
+
return undefined;
|
|
12470
|
+
}
|
|
12471
|
+
constructor(properties, children = []) {
|
|
12472
|
+
super();
|
|
12473
|
+
this.setProperties(properties);
|
|
12474
|
+
this.append(children);
|
|
12475
|
+
}
|
|
12476
|
+
_updateProperty(key, value, oldValue, declaration) {
|
|
12477
|
+
super._updateProperty(key, value, oldValue, declaration);
|
|
12478
|
+
switch (key) {
|
|
12479
|
+
case "value":
|
|
12480
|
+
case "min":
|
|
12481
|
+
case "max": {
|
|
12482
|
+
this.value = clamp(this.minValue, this.value, this.maxValue);
|
|
12483
|
+
this._updateScale();
|
|
12484
|
+
break;
|
|
12485
|
+
}
|
|
12486
|
+
}
|
|
12487
|
+
}
|
|
12488
|
+
_updateScale() {
|
|
12489
|
+
const target = this.target;
|
|
12490
|
+
if (target) {
|
|
12491
|
+
target.style.scaleX = this.value;
|
|
12492
|
+
target.style.scaleY = this.value;
|
|
12493
|
+
this.emit("updateScale", this.value);
|
|
12494
|
+
}
|
|
12495
|
+
}
|
|
12496
|
+
_onWheel(e) {
|
|
12497
|
+
const target = this.target;
|
|
12498
|
+
if (!target)
|
|
12499
|
+
return;
|
|
12500
|
+
e.preventDefault();
|
|
12501
|
+
const isTouchPad = e.wheelDeltaY ? Math.abs(Math.abs(e.wheelDeltaY) - Math.abs(3 * e.deltaY)) < 3 : e.deltaMode === 0;
|
|
12502
|
+
if (!isTouchPad && e.ctrlKey) {
|
|
12503
|
+
e.preventDefault();
|
|
12504
|
+
let distance = e.deltaY / (e.ctrlKey ? 1 : 100);
|
|
12505
|
+
distance *= -0.015;
|
|
12506
|
+
this.value += distance;
|
|
12507
|
+
}
|
|
12508
|
+
}
|
|
12509
|
+
_input(event, key) {
|
|
12510
|
+
super._input(event, key);
|
|
12511
|
+
switch (key) {
|
|
12512
|
+
case "wheel":
|
|
12513
|
+
this._onWheel(event);
|
|
12514
|
+
break;
|
|
12515
|
+
}
|
|
12516
|
+
}
|
|
12517
|
+
};
|
|
12518
|
+
__decorateClass$4([
|
|
12519
|
+
property({ default: 1 })
|
|
12520
|
+
], exports.Scaler.prototype, "value", 2);
|
|
12521
|
+
__decorateClass$4([
|
|
12522
|
+
property({ default: 0.05 })
|
|
12523
|
+
], exports.Scaler.prototype, "minValue", 2);
|
|
12524
|
+
__decorateClass$4([
|
|
12525
|
+
property({ default: 10 })
|
|
12526
|
+
], exports.Scaler.prototype, "maxValue", 2);
|
|
12527
|
+
exports.Scaler = __decorateClass$4([
|
|
12528
|
+
customNode("Scaler", {
|
|
12529
|
+
processMode: "disabled",
|
|
12530
|
+
renderMode: "disabled"
|
|
12531
|
+
})
|
|
12532
|
+
], exports.Scaler);
|
|
12533
|
+
|
|
12534
|
+
var __defProp$3 = Object.defineProperty;
|
|
12535
|
+
var __getOwnPropDesc$3 = Object.getOwnPropertyDescriptor;
|
|
11533
12536
|
var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
11534
12537
|
var __decorateClass$3 = (decorators, target, key, kind) => {
|
|
11535
12538
|
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$3(target, key) : target;
|
|
@@ -12220,8 +13223,7 @@ class Assets {
|
|
|
12220
13223
|
}
|
|
12221
13224
|
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());
|
|
12222
13225
|
|
|
12223
|
-
class
|
|
12224
|
-
name = "CanvasEditor";
|
|
13226
|
+
class CanvasItemEditor extends exports.Control {
|
|
12225
13227
|
hover = new exports.Node2D({
|
|
12226
13228
|
name: "hover",
|
|
12227
13229
|
internalMode: "back",
|
|
@@ -12254,22 +13256,7 @@ class CanvasEditor extends exports.Control {
|
|
|
12254
13256
|
internalMode: "back"
|
|
12255
13257
|
}).on("updateScale", (scale) => {
|
|
12256
13258
|
this.ruler.scale = scale;
|
|
12257
|
-
|
|
12258
|
-
const scrollWidth = this.drawboard.style.width * scale;
|
|
12259
|
-
if (scrollHeight > this.style.height) {
|
|
12260
|
-
this.yScrollBar.style.visibility = "visible";
|
|
12261
|
-
this.yScrollBar.maxValue = scrollHeight;
|
|
12262
|
-
this.yScrollBar.page = this.style.height;
|
|
12263
|
-
} else {
|
|
12264
|
-
this.yScrollBar.style.visibility = "hidden";
|
|
12265
|
-
}
|
|
12266
|
-
if (scrollWidth > this.style.width) {
|
|
12267
|
-
this.xScrollBar.style.visibility = "visible";
|
|
12268
|
-
this.xScrollBar.maxValue = scrollWidth;
|
|
12269
|
-
this.xScrollBar.page = this.style.width;
|
|
12270
|
-
} else {
|
|
12271
|
-
this.xScrollBar.style.visibility = "hidden";
|
|
12272
|
-
}
|
|
13259
|
+
this._updateScrollbars();
|
|
12273
13260
|
});
|
|
12274
13261
|
xScrollBar = new exports.XScrollBar({
|
|
12275
13262
|
internalMode: "back",
|
|
@@ -12293,20 +13280,20 @@ class CanvasEditor extends exports.Control {
|
|
|
12293
13280
|
pointerEvents: "none",
|
|
12294
13281
|
boxShadow: "2px 2px 2px 1px rgba(0, 0, 0, 0.2)"
|
|
12295
13282
|
}
|
|
12296
|
-
}
|
|
13283
|
+
}, [
|
|
12297
13284
|
this.scaler
|
|
12298
|
-
);
|
|
13285
|
+
]);
|
|
12299
13286
|
ruler = new exports.Ruler({
|
|
12300
13287
|
name: "ruler",
|
|
12301
13288
|
offsetX: 100,
|
|
12302
13289
|
offsetY: 100
|
|
12303
|
-
}
|
|
13290
|
+
}, [
|
|
12304
13291
|
this.drawboard,
|
|
12305
13292
|
this.hover,
|
|
12306
13293
|
this.selectionRect,
|
|
12307
13294
|
this.xScrollBar,
|
|
12308
13295
|
this.yScrollBar
|
|
12309
|
-
);
|
|
13296
|
+
]);
|
|
12310
13297
|
_pointerStart;
|
|
12311
13298
|
_pointerOffset;
|
|
12312
13299
|
selected;
|
|
@@ -12392,6 +13379,25 @@ class CanvasEditor extends exports.Control {
|
|
|
12392
13379
|
this.hover.style.visibility = "hidden";
|
|
12393
13380
|
}
|
|
12394
13381
|
}
|
|
13382
|
+
_updateScrollbars() {
|
|
13383
|
+
const scale = this.ruler.scale;
|
|
13384
|
+
const scrollHeight = this.drawboard.style.height * scale;
|
|
13385
|
+
const scrollWidth = this.drawboard.style.width * scale;
|
|
13386
|
+
if (scrollHeight > this.style.height) {
|
|
13387
|
+
this.yScrollBar.style.visibility = "visible";
|
|
13388
|
+
this.yScrollBar.maxValue = scrollHeight;
|
|
13389
|
+
this.yScrollBar.page = this.style.height;
|
|
13390
|
+
} else {
|
|
13391
|
+
this.yScrollBar.style.visibility = "hidden";
|
|
13392
|
+
}
|
|
13393
|
+
if (scrollWidth > this.style.width) {
|
|
13394
|
+
this.xScrollBar.style.visibility = "visible";
|
|
13395
|
+
this.xScrollBar.maxValue = scrollWidth;
|
|
13396
|
+
this.xScrollBar.page = this.style.width;
|
|
13397
|
+
} else {
|
|
13398
|
+
this.xScrollBar.style.visibility = "hidden";
|
|
13399
|
+
}
|
|
13400
|
+
}
|
|
12395
13401
|
}
|
|
12396
13402
|
|
|
12397
13403
|
const defaultOptions = {
|
|
@@ -12585,9 +13591,9 @@ async function performRender(options) {
|
|
|
12585
13591
|
engine.resize(width, height);
|
|
12586
13592
|
(Array.isArray(data) ? data : [data]).forEach((v) => {
|
|
12587
13593
|
if (v instanceof exports.Node) {
|
|
12588
|
-
root.
|
|
13594
|
+
root.appendChild(v);
|
|
12589
13595
|
} else {
|
|
12590
|
-
root.
|
|
13596
|
+
root.appendChild(exports.Node.parse(v));
|
|
12591
13597
|
}
|
|
12592
13598
|
});
|
|
12593
13599
|
await engine.waitUntilLoad();
|
|
@@ -12605,7 +13611,7 @@ exports.AudioPipeline = AudioPipeline;
|
|
|
12605
13611
|
exports.AudioProcessor = AudioProcessor;
|
|
12606
13612
|
exports.AudioSpectrum = AudioSpectrum;
|
|
12607
13613
|
exports.CanvasContext = CanvasContext;
|
|
12608
|
-
exports.
|
|
13614
|
+
exports.CanvasItemEditor = CanvasItemEditor;
|
|
12609
13615
|
exports.CanvasItemStyle = CanvasItemStyle;
|
|
12610
13616
|
exports.CanvasTexture = CanvasTexture;
|
|
12611
13617
|
exports.Color = Color;
|
|
@@ -12615,6 +13621,7 @@ exports.CoreObject = CoreObject;
|
|
|
12615
13621
|
exports.DEG_TO_RAD = DEG_TO_RAD;
|
|
12616
13622
|
exports.DEVICE_PIXEL_RATIO = DEVICE_PIXEL_RATIO;
|
|
12617
13623
|
exports.EffectMaterial = EffectMaterial;
|
|
13624
|
+
exports.ElementStyle = ElementStyle;
|
|
12618
13625
|
exports.Engine = Engine;
|
|
12619
13626
|
exports.EventEmitter = EventEmitter;
|
|
12620
13627
|
exports.FontLoader = FontLoader;
|