modern-canvas 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +702 -508
- package/dist/index.d.cts +112 -45
- package/dist/index.d.mts +112 -45
- package/dist/index.d.ts +112 -45
- package/dist/index.js +27 -27
- package/dist/index.mjs +703 -509
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1924,6 +1924,12 @@ class Rect2 {
|
|
|
1924
1924
|
get top() {
|
|
1925
1925
|
return this.position.y;
|
|
1926
1926
|
}
|
|
1927
|
+
get right() {
|
|
1928
|
+
return this.x + this.width;
|
|
1929
|
+
}
|
|
1930
|
+
get bottom() {
|
|
1931
|
+
return this.y + this.height;
|
|
1932
|
+
}
|
|
1927
1933
|
get width() {
|
|
1928
1934
|
return this.size.x;
|
|
1929
1935
|
}
|
|
@@ -1964,6 +1970,9 @@ class Rect2 {
|
|
|
1964
1970
|
);
|
|
1965
1971
|
return this;
|
|
1966
1972
|
}
|
|
1973
|
+
toArray() {
|
|
1974
|
+
return [this.x, this.y, this.width, this.height];
|
|
1975
|
+
}
|
|
1967
1976
|
}
|
|
1968
1977
|
|
|
1969
1978
|
class Transform2D extends Matrix3 {
|
|
@@ -2195,13 +2204,13 @@ class Vector3 extends Vector {
|
|
|
2195
2204
|
}
|
|
2196
2205
|
}
|
|
2197
2206
|
|
|
2198
|
-
var __defProp$
|
|
2199
|
-
var __decorateClass$
|
|
2207
|
+
var __defProp$L = Object.defineProperty;
|
|
2208
|
+
var __decorateClass$L = (decorators, target, key, kind) => {
|
|
2200
2209
|
var result = undefined ;
|
|
2201
2210
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
2202
2211
|
if (decorator = decorators[i])
|
|
2203
2212
|
result = (decorator(target, key, result) ) || result;
|
|
2204
|
-
if (result) __defProp$
|
|
2213
|
+
if (result) __defProp$L(target, key, result);
|
|
2205
2214
|
return result;
|
|
2206
2215
|
};
|
|
2207
2216
|
class MainLoop extends CoreObject {
|
|
@@ -2242,10 +2251,10 @@ class MainLoop extends CoreObject {
|
|
|
2242
2251
|
}
|
|
2243
2252
|
}
|
|
2244
2253
|
}
|
|
2245
|
-
__decorateClass$
|
|
2254
|
+
__decorateClass$L([
|
|
2246
2255
|
property({ default: 24 })
|
|
2247
2256
|
], MainLoop.prototype, "fps");
|
|
2248
|
-
__decorateClass$
|
|
2257
|
+
__decorateClass$L([
|
|
2249
2258
|
property({ default: 1 })
|
|
2250
2259
|
], MainLoop.prototype, "speed");
|
|
2251
2260
|
|
|
@@ -4389,13 +4398,13 @@ class Geometry extends Resource {
|
|
|
4389
4398
|
}
|
|
4390
4399
|
}
|
|
4391
4400
|
|
|
4392
|
-
var __defProp$
|
|
4393
|
-
var __decorateClass$
|
|
4401
|
+
var __defProp$K = Object.defineProperty;
|
|
4402
|
+
var __decorateClass$K = (decorators, target, key, kind) => {
|
|
4394
4403
|
var result = undefined ;
|
|
4395
4404
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
4396
4405
|
if (decorator = decorators[i])
|
|
4397
4406
|
result = (decorator(target, key, result) ) || result;
|
|
4398
|
-
if (result) __defProp$
|
|
4407
|
+
if (result) __defProp$K(target, key, result);
|
|
4399
4408
|
return result;
|
|
4400
4409
|
};
|
|
4401
4410
|
class IndexBuffer extends Resource {
|
|
@@ -4439,20 +4448,20 @@ class IndexBuffer extends Resource {
|
|
|
4439
4448
|
return result;
|
|
4440
4449
|
}
|
|
4441
4450
|
}
|
|
4442
|
-
__decorateClass$
|
|
4451
|
+
__decorateClass$K([
|
|
4443
4452
|
protectedProperty({ default: null })
|
|
4444
4453
|
], IndexBuffer.prototype, "data");
|
|
4445
|
-
__decorateClass$
|
|
4454
|
+
__decorateClass$K([
|
|
4446
4455
|
protectedProperty({ default: false })
|
|
4447
4456
|
], IndexBuffer.prototype, "dynamic");
|
|
4448
4457
|
|
|
4449
|
-
var __defProp$
|
|
4450
|
-
var __decorateClass$
|
|
4458
|
+
var __defProp$J = Object.defineProperty;
|
|
4459
|
+
var __decorateClass$J = (decorators, target, key, kind) => {
|
|
4451
4460
|
var result = undefined ;
|
|
4452
4461
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
4453
4462
|
if (decorator = decorators[i])
|
|
4454
4463
|
result = (decorator(target, key, result) ) || result;
|
|
4455
|
-
if (result) __defProp$
|
|
4464
|
+
if (result) __defProp$J(target, key, result);
|
|
4456
4465
|
return result;
|
|
4457
4466
|
};
|
|
4458
4467
|
class VertexBuffer extends Resource {
|
|
@@ -4496,20 +4505,20 @@ class VertexBuffer extends Resource {
|
|
|
4496
4505
|
return result;
|
|
4497
4506
|
}
|
|
4498
4507
|
}
|
|
4499
|
-
__decorateClass$
|
|
4508
|
+
__decorateClass$J([
|
|
4500
4509
|
protectedProperty({ default: null })
|
|
4501
4510
|
], VertexBuffer.prototype, "data");
|
|
4502
|
-
__decorateClass$
|
|
4511
|
+
__decorateClass$J([
|
|
4503
4512
|
protectedProperty({ default: false })
|
|
4504
4513
|
], VertexBuffer.prototype, "dynamic");
|
|
4505
4514
|
|
|
4506
|
-
var __defProp$
|
|
4507
|
-
var __decorateClass$
|
|
4515
|
+
var __defProp$I = Object.defineProperty;
|
|
4516
|
+
var __decorateClass$I = (decorators, target, key, kind) => {
|
|
4508
4517
|
var result = undefined ;
|
|
4509
4518
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
4510
4519
|
if (decorator = decorators[i])
|
|
4511
4520
|
result = (decorator(target, key, result) ) || result;
|
|
4512
|
-
if (result) __defProp$
|
|
4521
|
+
if (result) __defProp$I(target, key, result);
|
|
4513
4522
|
return result;
|
|
4514
4523
|
};
|
|
4515
4524
|
class VertexAttribute extends Resource {
|
|
@@ -4546,25 +4555,25 @@ class VertexAttribute extends Resource {
|
|
|
4546
4555
|
return result;
|
|
4547
4556
|
}
|
|
4548
4557
|
}
|
|
4549
|
-
__decorateClass$
|
|
4558
|
+
__decorateClass$I([
|
|
4550
4559
|
protectedProperty()
|
|
4551
4560
|
], VertexAttribute.prototype, "buffer");
|
|
4552
|
-
__decorateClass$
|
|
4561
|
+
__decorateClass$I([
|
|
4553
4562
|
protectedProperty({ default: 0 })
|
|
4554
4563
|
], VertexAttribute.prototype, "size");
|
|
4555
|
-
__decorateClass$
|
|
4564
|
+
__decorateClass$I([
|
|
4556
4565
|
protectedProperty({ default: false })
|
|
4557
4566
|
], VertexAttribute.prototype, "normalized");
|
|
4558
|
-
__decorateClass$
|
|
4567
|
+
__decorateClass$I([
|
|
4559
4568
|
protectedProperty({ default: "float" })
|
|
4560
4569
|
], VertexAttribute.prototype, "type");
|
|
4561
|
-
__decorateClass$
|
|
4570
|
+
__decorateClass$I([
|
|
4562
4571
|
protectedProperty()
|
|
4563
4572
|
], VertexAttribute.prototype, "stride");
|
|
4564
|
-
__decorateClass$
|
|
4573
|
+
__decorateClass$I([
|
|
4565
4574
|
protectedProperty()
|
|
4566
4575
|
], VertexAttribute.prototype, "offset");
|
|
4567
|
-
__decorateClass$
|
|
4576
|
+
__decorateClass$I([
|
|
4568
4577
|
protectedProperty()
|
|
4569
4578
|
], VertexAttribute.prototype, "divisor");
|
|
4570
4579
|
|
|
@@ -4814,13 +4823,13 @@ class UvGeometry extends Geometry {
|
|
|
4814
4823
|
}
|
|
4815
4824
|
}
|
|
4816
4825
|
|
|
4817
|
-
var __defProp$
|
|
4818
|
-
var __decorateClass$
|
|
4826
|
+
var __defProp$H = Object.defineProperty;
|
|
4827
|
+
var __decorateClass$H = (decorators, target, key, kind) => {
|
|
4819
4828
|
var result = undefined ;
|
|
4820
4829
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
4821
4830
|
if (decorator = decorators[i])
|
|
4822
4831
|
result = (decorator(target, key, result) ) || result;
|
|
4823
|
-
if (result) __defProp$
|
|
4832
|
+
if (result) __defProp$H(target, key, result);
|
|
4824
4833
|
return result;
|
|
4825
4834
|
};
|
|
4826
4835
|
const style2DFilterDefault = {
|
|
@@ -5033,64 +5042,64 @@ class CanvasItemStyle extends Resource {
|
|
|
5033
5042
|
return m;
|
|
5034
5043
|
}
|
|
5035
5044
|
}
|
|
5036
|
-
__decorateClass$
|
|
5045
|
+
__decorateClass$H([
|
|
5037
5046
|
property()
|
|
5038
5047
|
], CanvasItemStyle.prototype, "backgroundColor");
|
|
5039
|
-
__decorateClass$
|
|
5048
|
+
__decorateClass$H([
|
|
5040
5049
|
property()
|
|
5041
5050
|
], CanvasItemStyle.prototype, "backgroundImage");
|
|
5042
|
-
__decorateClass$
|
|
5051
|
+
__decorateClass$H([
|
|
5043
5052
|
property({ default: "" })
|
|
5044
5053
|
], CanvasItemStyle.prototype, "filter");
|
|
5045
|
-
__decorateClass$
|
|
5054
|
+
__decorateClass$H([
|
|
5046
5055
|
property({ default: "inherit" })
|
|
5047
5056
|
], CanvasItemStyle.prototype, "direction");
|
|
5048
|
-
__decorateClass$
|
|
5057
|
+
__decorateClass$H([
|
|
5049
5058
|
property({ default: "#000000" })
|
|
5050
5059
|
], CanvasItemStyle.prototype, "shadowColor");
|
|
5051
|
-
__decorateClass$
|
|
5060
|
+
__decorateClass$H([
|
|
5052
5061
|
property({ default: 0 })
|
|
5053
5062
|
], CanvasItemStyle.prototype, "shadowOffsetX");
|
|
5054
|
-
__decorateClass$
|
|
5063
|
+
__decorateClass$H([
|
|
5055
5064
|
property({ default: 0 })
|
|
5056
5065
|
], CanvasItemStyle.prototype, "shadowOffsetY");
|
|
5057
|
-
__decorateClass$
|
|
5066
|
+
__decorateClass$H([
|
|
5058
5067
|
property({ default: 0 })
|
|
5059
5068
|
], CanvasItemStyle.prototype, "shadowBlur");
|
|
5060
|
-
__decorateClass$
|
|
5069
|
+
__decorateClass$H([
|
|
5061
5070
|
property({ default: 1 })
|
|
5062
5071
|
], CanvasItemStyle.prototype, "opacity");
|
|
5063
|
-
__decorateClass$
|
|
5072
|
+
__decorateClass$H([
|
|
5064
5073
|
property({ default: 0 })
|
|
5065
5074
|
], CanvasItemStyle.prototype, "borderWidth");
|
|
5066
|
-
__decorateClass$
|
|
5075
|
+
__decorateClass$H([
|
|
5067
5076
|
property({ default: 0 })
|
|
5068
5077
|
], CanvasItemStyle.prototype, "borderRadius");
|
|
5069
|
-
__decorateClass$
|
|
5078
|
+
__decorateClass$H([
|
|
5070
5079
|
property({ default: "#000000" })
|
|
5071
5080
|
], CanvasItemStyle.prototype, "borderColor");
|
|
5072
|
-
__decorateClass$
|
|
5081
|
+
__decorateClass$H([
|
|
5073
5082
|
property({ default: "none" })
|
|
5074
5083
|
], CanvasItemStyle.prototype, "borderStyle");
|
|
5075
|
-
__decorateClass$
|
|
5084
|
+
__decorateClass$H([
|
|
5076
5085
|
property({ default: 0 })
|
|
5077
5086
|
], CanvasItemStyle.prototype, "outlineWidth");
|
|
5078
|
-
__decorateClass$
|
|
5087
|
+
__decorateClass$H([
|
|
5079
5088
|
property({ default: 0 })
|
|
5080
5089
|
], CanvasItemStyle.prototype, "outlineOffset");
|
|
5081
|
-
__decorateClass$
|
|
5090
|
+
__decorateClass$H([
|
|
5082
5091
|
property({ default: "#000000" })
|
|
5083
5092
|
], CanvasItemStyle.prototype, "outlineColor");
|
|
5084
|
-
__decorateClass$
|
|
5093
|
+
__decorateClass$H([
|
|
5085
5094
|
property({ default: "none" })
|
|
5086
5095
|
], CanvasItemStyle.prototype, "outlineStyle");
|
|
5087
|
-
__decorateClass$
|
|
5096
|
+
__decorateClass$H([
|
|
5088
5097
|
property({ default: "visible" })
|
|
5089
5098
|
], CanvasItemStyle.prototype, "visibility");
|
|
5090
|
-
__decorateClass$
|
|
5099
|
+
__decorateClass$H([
|
|
5091
5100
|
property({ default: "visible" })
|
|
5092
5101
|
], CanvasItemStyle.prototype, "overflow");
|
|
5093
|
-
__decorateClass$
|
|
5102
|
+
__decorateClass$H([
|
|
5094
5103
|
property({ default: "auto" })
|
|
5095
5104
|
], CanvasItemStyle.prototype, "pointerEvents");
|
|
5096
5105
|
const transformStyle = modernIdoc.getDefaultTransformStyle();
|
|
@@ -5102,13 +5111,13 @@ for (const key in textStyle) {
|
|
|
5102
5111
|
defineProperty(CanvasItemStyle, key, { default: textStyle[key] });
|
|
5103
5112
|
}
|
|
5104
5113
|
|
|
5105
|
-
var __defProp$
|
|
5106
|
-
var __decorateClass$
|
|
5114
|
+
var __defProp$G = Object.defineProperty;
|
|
5115
|
+
var __decorateClass$G = (decorators, target, key, kind) => {
|
|
5107
5116
|
var result = undefined ;
|
|
5108
5117
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
5109
5118
|
if (decorator = decorators[i])
|
|
5110
5119
|
result = (decorator(target, key, result) ) || result;
|
|
5111
|
-
if (result) __defProp$
|
|
5120
|
+
if (result) __defProp$G(target, key, result);
|
|
5112
5121
|
return result;
|
|
5113
5122
|
};
|
|
5114
5123
|
class Texture2D extends Resource {
|
|
@@ -5234,32 +5243,32 @@ class Texture2D extends Resource {
|
|
|
5234
5243
|
}
|
|
5235
5244
|
}
|
|
5236
5245
|
}
|
|
5237
|
-
__decorateClass$
|
|
5246
|
+
__decorateClass$G([
|
|
5238
5247
|
protectedProperty()
|
|
5239
5248
|
], Texture2D.prototype, "source");
|
|
5240
|
-
__decorateClass$
|
|
5249
|
+
__decorateClass$G([
|
|
5241
5250
|
property({ default: 0 })
|
|
5242
5251
|
], Texture2D.prototype, "width");
|
|
5243
|
-
__decorateClass$
|
|
5252
|
+
__decorateClass$G([
|
|
5244
5253
|
property({ default: 0 })
|
|
5245
5254
|
], Texture2D.prototype, "height");
|
|
5246
|
-
__decorateClass$
|
|
5255
|
+
__decorateClass$G([
|
|
5247
5256
|
property({ default: "linear" })
|
|
5248
5257
|
], Texture2D.prototype, "filterMode");
|
|
5249
|
-
__decorateClass$
|
|
5258
|
+
__decorateClass$G([
|
|
5250
5259
|
property({ default: "clamp_to_edge" })
|
|
5251
5260
|
], Texture2D.prototype, "wrapMode");
|
|
5252
|
-
__decorateClass$
|
|
5261
|
+
__decorateClass$G([
|
|
5253
5262
|
property({ default: 1 })
|
|
5254
5263
|
], Texture2D.prototype, "pixelRatio");
|
|
5255
5264
|
|
|
5256
|
-
var __defProp$
|
|
5257
|
-
var __decorateClass$
|
|
5265
|
+
var __defProp$F = Object.defineProperty;
|
|
5266
|
+
var __decorateClass$F = (decorators, target, key, kind) => {
|
|
5258
5267
|
var result = undefined ;
|
|
5259
5268
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
5260
5269
|
if (decorator = decorators[i])
|
|
5261
5270
|
result = (decorator(target, key, result) ) || result;
|
|
5262
|
-
if (result) __defProp$
|
|
5271
|
+
if (result) __defProp$F(target, key, result);
|
|
5263
5272
|
return result;
|
|
5264
5273
|
};
|
|
5265
5274
|
class CanvasTexture extends Texture2D {
|
|
@@ -5269,16 +5278,16 @@ class CanvasTexture extends Texture2D {
|
|
|
5269
5278
|
_updateProperty(key, value, oldValue, declaration) {
|
|
5270
5279
|
switch (key) {
|
|
5271
5280
|
case "width":
|
|
5272
|
-
this.source.width = value * this.pixelRatio;
|
|
5281
|
+
this.source.width = Math.max(1, Math.ceil(value * this.pixelRatio));
|
|
5273
5282
|
break;
|
|
5274
5283
|
case "height":
|
|
5275
|
-
this.source.height = value * this.pixelRatio;
|
|
5284
|
+
this.source.height = Math.max(1, Math.ceil(value * this.pixelRatio));
|
|
5276
5285
|
break;
|
|
5277
5286
|
}
|
|
5278
5287
|
super._updateProperty(key, value, oldValue, declaration);
|
|
5279
5288
|
}
|
|
5280
5289
|
}
|
|
5281
|
-
__decorateClass$
|
|
5290
|
+
__decorateClass$F([
|
|
5282
5291
|
property({ default: 2 })
|
|
5283
5292
|
], CanvasTexture.prototype, "pixelRatio");
|
|
5284
5293
|
|
|
@@ -5436,13 +5445,13 @@ class PixelsTexture extends Texture2D {
|
|
|
5436
5445
|
}
|
|
5437
5446
|
}
|
|
5438
5447
|
|
|
5439
|
-
var __defProp$
|
|
5440
|
-
var __decorateClass$
|
|
5448
|
+
var __defProp$E = Object.defineProperty;
|
|
5449
|
+
var __decorateClass$E = (decorators, target, key, kind) => {
|
|
5441
5450
|
var result = undefined ;
|
|
5442
5451
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
5443
5452
|
if (decorator = decorators[i])
|
|
5444
5453
|
result = (decorator(target, key, result) ) || result;
|
|
5445
|
-
if (result) __defProp$
|
|
5454
|
+
if (result) __defProp$E(target, key, result);
|
|
5446
5455
|
return result;
|
|
5447
5456
|
};
|
|
5448
5457
|
function resolveOptions(options) {
|
|
@@ -5686,10 +5695,10 @@ const _VideoTexture = class _VideoTexture extends Texture2D {
|
|
|
5686
5695
|
}
|
|
5687
5696
|
}
|
|
5688
5697
|
};
|
|
5689
|
-
__decorateClass$
|
|
5698
|
+
__decorateClass$E([
|
|
5690
5699
|
protectedProperty({ default: true })
|
|
5691
5700
|
], _VideoTexture.prototype, "autoUpdate");
|
|
5692
|
-
__decorateClass$
|
|
5701
|
+
__decorateClass$E([
|
|
5693
5702
|
protectedProperty({ default: 0 })
|
|
5694
5703
|
], _VideoTexture.prototype, "fps");
|
|
5695
5704
|
let VideoTexture = _VideoTexture;
|
|
@@ -5859,14 +5868,14 @@ class CanvasContext extends modernPath2d.Path2D {
|
|
|
5859
5868
|
}
|
|
5860
5869
|
}
|
|
5861
5870
|
|
|
5862
|
-
var __defProp$
|
|
5863
|
-
var __getOwnPropDesc$
|
|
5864
|
-
var __decorateClass$
|
|
5865
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
5871
|
+
var __defProp$D = Object.defineProperty;
|
|
5872
|
+
var __getOwnPropDesc$C = Object.getOwnPropertyDescriptor;
|
|
5873
|
+
var __decorateClass$D = (decorators, target, key, kind) => {
|
|
5874
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$C(target, key) : target;
|
|
5866
5875
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
5867
5876
|
if (decorator = decorators[i])
|
|
5868
5877
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
5869
|
-
if (kind && result) __defProp$
|
|
5878
|
+
if (kind && result) __defProp$D(target, key, result);
|
|
5870
5879
|
return result;
|
|
5871
5880
|
};
|
|
5872
5881
|
exports.Node = class Node extends CoreObject {
|
|
@@ -5966,9 +5975,6 @@ exports.Node = class Node extends CoreObject {
|
|
|
5966
5975
|
}
|
|
5967
5976
|
/** Children */
|
|
5968
5977
|
_children = [];
|
|
5969
|
-
get children() {
|
|
5970
|
-
return this.getChildren();
|
|
5971
|
-
}
|
|
5972
5978
|
get siblingIndex() {
|
|
5973
5979
|
return this.getIndex();
|
|
5974
5980
|
}
|
|
@@ -6233,17 +6239,17 @@ exports.Node = class Node extends CoreObject {
|
|
|
6233
6239
|
return this;
|
|
6234
6240
|
}
|
|
6235
6241
|
removeChildren() {
|
|
6236
|
-
this.
|
|
6242
|
+
this.getChildren().forEach((child) => this.removeChild(child));
|
|
6237
6243
|
}
|
|
6238
6244
|
remove() {
|
|
6239
6245
|
this._parent?.removeChild(this);
|
|
6240
6246
|
}
|
|
6241
6247
|
forEach(fn) {
|
|
6242
|
-
this.
|
|
6248
|
+
this.getChildren().forEach(fn);
|
|
6243
6249
|
return this;
|
|
6244
6250
|
}
|
|
6245
6251
|
deepForEach(fn) {
|
|
6246
|
-
this.
|
|
6252
|
+
this.getChildren().forEach((child) => {
|
|
6247
6253
|
fn(child);
|
|
6248
6254
|
child.deepForEach(fn);
|
|
6249
6255
|
});
|
|
@@ -6280,7 +6286,7 @@ exports.Node = class Node extends CoreObject {
|
|
|
6280
6286
|
return {
|
|
6281
6287
|
tag: this.tag,
|
|
6282
6288
|
props: super.toJSON(),
|
|
6283
|
-
children: this.
|
|
6289
|
+
children: this.getChildren().map((child) => child.toJSON())
|
|
6284
6290
|
};
|
|
6285
6291
|
}
|
|
6286
6292
|
static parse(JSON) {
|
|
@@ -6294,33 +6300,33 @@ exports.Node = class Node extends CoreObject {
|
|
|
6294
6300
|
return node;
|
|
6295
6301
|
}
|
|
6296
6302
|
};
|
|
6297
|
-
__decorateClass$
|
|
6303
|
+
__decorateClass$D([
|
|
6298
6304
|
property()
|
|
6299
6305
|
], exports.Node.prototype, "name", 2);
|
|
6300
|
-
__decorateClass$
|
|
6306
|
+
__decorateClass$D([
|
|
6301
6307
|
property()
|
|
6302
6308
|
], exports.Node.prototype, "mask", 2);
|
|
6303
|
-
__decorateClass$
|
|
6309
|
+
__decorateClass$D([
|
|
6304
6310
|
property({ default: "inherit" })
|
|
6305
6311
|
], exports.Node.prototype, "processMode", 2);
|
|
6306
|
-
__decorateClass$
|
|
6312
|
+
__decorateClass$D([
|
|
6307
6313
|
property({ default: "inherit" })
|
|
6308
6314
|
], exports.Node.prototype, "renderMode", 2);
|
|
6309
|
-
__decorateClass$
|
|
6315
|
+
__decorateClass$D([
|
|
6310
6316
|
property({ default: "default" })
|
|
6311
6317
|
], exports.Node.prototype, "internalMode", 2);
|
|
6312
|
-
exports.Node = __decorateClass$
|
|
6318
|
+
exports.Node = __decorateClass$D([
|
|
6313
6319
|
customNode("Node")
|
|
6314
6320
|
], exports.Node);
|
|
6315
6321
|
|
|
6316
|
-
var __defProp$
|
|
6317
|
-
var __getOwnPropDesc$
|
|
6318
|
-
var __decorateClass$
|
|
6319
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
6322
|
+
var __defProp$C = Object.defineProperty;
|
|
6323
|
+
var __getOwnPropDesc$B = Object.getOwnPropertyDescriptor;
|
|
6324
|
+
var __decorateClass$C = (decorators, target, key, kind) => {
|
|
6325
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$B(target, key) : target;
|
|
6320
6326
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6321
6327
|
if (decorator = decorators[i])
|
|
6322
6328
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
6323
|
-
if (kind && result) __defProp$
|
|
6329
|
+
if (kind && result) __defProp$C(target, key, result);
|
|
6324
6330
|
return result;
|
|
6325
6331
|
};
|
|
6326
6332
|
exports.TimelineNode = class TimelineNode extends exports.Node {
|
|
@@ -6379,27 +6385,27 @@ exports.TimelineNode = class TimelineNode extends exports.Node {
|
|
|
6379
6385
|
super._process(delta);
|
|
6380
6386
|
}
|
|
6381
6387
|
};
|
|
6382
|
-
__decorateClass$
|
|
6388
|
+
__decorateClass$C([
|
|
6383
6389
|
property({ default: 0 })
|
|
6384
6390
|
], exports.TimelineNode.prototype, "delay", 2);
|
|
6385
|
-
__decorateClass$
|
|
6391
|
+
__decorateClass$C([
|
|
6386
6392
|
property({ default: 0 })
|
|
6387
6393
|
], exports.TimelineNode.prototype, "duration", 2);
|
|
6388
|
-
__decorateClass$
|
|
6394
|
+
__decorateClass$C([
|
|
6389
6395
|
property({ default: false })
|
|
6390
6396
|
], exports.TimelineNode.prototype, "paused", 2);
|
|
6391
|
-
exports.TimelineNode = __decorateClass$
|
|
6397
|
+
exports.TimelineNode = __decorateClass$C([
|
|
6392
6398
|
customNode("TimelineNode")
|
|
6393
6399
|
], exports.TimelineNode);
|
|
6394
6400
|
|
|
6395
|
-
var __defProp$
|
|
6396
|
-
var __getOwnPropDesc$
|
|
6397
|
-
var __decorateClass$
|
|
6398
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
6401
|
+
var __defProp$B = Object.defineProperty;
|
|
6402
|
+
var __getOwnPropDesc$A = Object.getOwnPropertyDescriptor;
|
|
6403
|
+
var __decorateClass$B = (decorators, target, key, kind) => {
|
|
6404
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$A(target, key) : target;
|
|
6399
6405
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6400
6406
|
if (decorator = decorators[i])
|
|
6401
6407
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
6402
|
-
if (kind && result) __defProp$
|
|
6408
|
+
if (kind && result) __defProp$B(target, key, result);
|
|
6403
6409
|
return result;
|
|
6404
6410
|
};
|
|
6405
6411
|
exports.CanvasItem = class CanvasItem extends exports.TimelineNode {
|
|
@@ -6417,11 +6423,11 @@ exports.CanvasItem = class CanvasItem extends exports.TimelineNode {
|
|
|
6417
6423
|
}
|
|
6418
6424
|
/** @internal */
|
|
6419
6425
|
opacity = 1;
|
|
6420
|
-
|
|
6426
|
+
visible = true;
|
|
6421
6427
|
_parentOpacity;
|
|
6428
|
+
_parentVisible;
|
|
6422
6429
|
_modulate = new Color(4294967295);
|
|
6423
6430
|
_backgroundImage;
|
|
6424
|
-
_computedVisible = true;
|
|
6425
6431
|
// Batch render
|
|
6426
6432
|
context = new CanvasContext();
|
|
6427
6433
|
_resetContext = true;
|
|
@@ -6455,9 +6461,6 @@ exports.CanvasItem = class CanvasItem extends exports.TimelineNode {
|
|
|
6455
6461
|
this._modulate.value = value;
|
|
6456
6462
|
this.requestRepaint();
|
|
6457
6463
|
break;
|
|
6458
|
-
case "visible":
|
|
6459
|
-
this._updateVisible();
|
|
6460
|
-
break;
|
|
6461
6464
|
}
|
|
6462
6465
|
}
|
|
6463
6466
|
// eslint-disable-next-line unused-imports/no-unused-vars
|
|
@@ -6479,23 +6482,10 @@ exports.CanvasItem = class CanvasItem extends exports.TimelineNode {
|
|
|
6479
6482
|
this.requestRedraw();
|
|
6480
6483
|
break;
|
|
6481
6484
|
case "visibility":
|
|
6482
|
-
this.
|
|
6483
|
-
break;
|
|
6484
|
-
case "width":
|
|
6485
|
-
case "height":
|
|
6486
|
-
this._updateSize();
|
|
6485
|
+
this._updateVisible();
|
|
6487
6486
|
break;
|
|
6488
6487
|
}
|
|
6489
6488
|
}
|
|
6490
|
-
_updateSize() {
|
|
6491
|
-
if (this.inheritSize) {
|
|
6492
|
-
this.size.width = this.style.width || this._parent?.size?.width || this._parent?.width;
|
|
6493
|
-
this.size.height = this.style.height || this._parent?.size?.height || this._parent?.height;
|
|
6494
|
-
} else {
|
|
6495
|
-
this.size.width = this.style.width;
|
|
6496
|
-
this.size.height = this.style.height;
|
|
6497
|
-
}
|
|
6498
|
-
}
|
|
6499
6489
|
_updateBackgroundColor() {
|
|
6500
6490
|
const backgroundColor = this.style.getComputedBackgroundColor();
|
|
6501
6491
|
if (this._originalBatchables.length) {
|
|
@@ -6509,31 +6499,31 @@ exports.CanvasItem = class CanvasItem extends exports.TimelineNode {
|
|
|
6509
6499
|
this.requestRedraw();
|
|
6510
6500
|
}
|
|
6511
6501
|
_updateOpacity() {
|
|
6512
|
-
const
|
|
6513
|
-
if (
|
|
6514
|
-
this.
|
|
6515
|
-
|
|
6516
|
-
if (this.opacity !== opacity) {
|
|
6517
|
-
this.opacity = opacity;
|
|
6518
|
-
this.requestRepaint();
|
|
6519
|
-
}
|
|
6502
|
+
const opacity = this.style.getComputedOpacity() * (this.getParent()?.opacity ?? 1);
|
|
6503
|
+
if (this.opacity !== opacity) {
|
|
6504
|
+
this.opacity = opacity;
|
|
6505
|
+
this.requestRepaint();
|
|
6520
6506
|
}
|
|
6521
6507
|
}
|
|
6508
|
+
_updateCurrentTime(force = false) {
|
|
6509
|
+
super._updateCurrentTime(force);
|
|
6510
|
+
this._updateVisible();
|
|
6511
|
+
}
|
|
6522
6512
|
_updateVisible() {
|
|
6523
|
-
let visible = this.visible
|
|
6513
|
+
let visible = this.style.visibility === "visible" && (this.getParent()?.visible ?? true);
|
|
6524
6514
|
if (visible && !this.isInsideTimeRange()) {
|
|
6525
6515
|
visible = false;
|
|
6526
6516
|
}
|
|
6527
|
-
this.
|
|
6517
|
+
this.visible = visible;
|
|
6528
6518
|
}
|
|
6529
6519
|
show() {
|
|
6530
|
-
this.
|
|
6520
|
+
this.style.visibility = "visible";
|
|
6531
6521
|
}
|
|
6532
6522
|
hide() {
|
|
6533
|
-
this.
|
|
6523
|
+
this.style.visibility = "hidden";
|
|
6534
6524
|
}
|
|
6535
6525
|
isVisibleInTree() {
|
|
6536
|
-
return this.opacity > 0 && this.
|
|
6526
|
+
return this.opacity > 0 && this.visible;
|
|
6537
6527
|
}
|
|
6538
6528
|
canRender() {
|
|
6539
6529
|
return super.canRender() && this.isVisibleInTree();
|
|
@@ -6548,10 +6538,14 @@ exports.CanvasItem = class CanvasItem extends exports.TimelineNode {
|
|
|
6548
6538
|
this._repainting = true;
|
|
6549
6539
|
}
|
|
6550
6540
|
_process(delta) {
|
|
6551
|
-
this.
|
|
6552
|
-
this.
|
|
6553
|
-
|
|
6554
|
-
this.
|
|
6541
|
+
const parent = this.getParent();
|
|
6542
|
+
if (this._parentVisible !== parent?.visible) {
|
|
6543
|
+
this._parentVisible = parent?.visible;
|
|
6544
|
+
this._updateVisible();
|
|
6545
|
+
}
|
|
6546
|
+
if (this._parentOpacity !== parent?.opacity) {
|
|
6547
|
+
this._parentOpacity = parent?.opacity;
|
|
6548
|
+
this._updateOpacity();
|
|
6555
6549
|
}
|
|
6556
6550
|
super._process(delta);
|
|
6557
6551
|
}
|
|
@@ -6590,8 +6584,7 @@ exports.CanvasItem = class CanvasItem extends exports.TimelineNode {
|
|
|
6590
6584
|
}
|
|
6591
6585
|
}
|
|
6592
6586
|
_drawBoundingRect() {
|
|
6593
|
-
const { borderRadius } = this.style;
|
|
6594
|
-
const { width, height } = this.size;
|
|
6587
|
+
const { borderRadius, width, height } = this.style;
|
|
6595
6588
|
if (width && height) {
|
|
6596
6589
|
if (borderRadius) {
|
|
6597
6590
|
this.context.roundRect(0, 0, width, height, borderRadius);
|
|
@@ -6670,19 +6663,13 @@ exports.CanvasItem = class CanvasItem extends exports.TimelineNode {
|
|
|
6670
6663
|
};
|
|
6671
6664
|
}
|
|
6672
6665
|
};
|
|
6673
|
-
__decorateClass$
|
|
6674
|
-
property({ default: true })
|
|
6675
|
-
], exports.CanvasItem.prototype, "visible", 2);
|
|
6676
|
-
__decorateClass$y([
|
|
6666
|
+
__decorateClass$B([
|
|
6677
6667
|
property()
|
|
6678
6668
|
], exports.CanvasItem.prototype, "modulate", 2);
|
|
6679
|
-
__decorateClass$
|
|
6669
|
+
__decorateClass$B([
|
|
6680
6670
|
property()
|
|
6681
6671
|
], exports.CanvasItem.prototype, "blendMode", 2);
|
|
6682
|
-
__decorateClass$
|
|
6683
|
-
property()
|
|
6684
|
-
], exports.CanvasItem.prototype, "inheritSize", 2);
|
|
6685
|
-
exports.CanvasItem = __decorateClass$y([
|
|
6672
|
+
exports.CanvasItem = __decorateClass$B([
|
|
6686
6673
|
customNode("CanvasItem")
|
|
6687
6674
|
], exports.CanvasItem);
|
|
6688
6675
|
|
|
@@ -6712,14 +6699,14 @@ class RenderStack extends exports.Node {
|
|
|
6712
6699
|
}
|
|
6713
6700
|
}
|
|
6714
6701
|
|
|
6715
|
-
var __defProp$
|
|
6716
|
-
var __getOwnPropDesc$
|
|
6717
|
-
var __decorateClass$
|
|
6718
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
6702
|
+
var __defProp$A = Object.defineProperty;
|
|
6703
|
+
var __getOwnPropDesc$z = Object.getOwnPropertyDescriptor;
|
|
6704
|
+
var __decorateClass$A = (decorators, target, key, kind) => {
|
|
6705
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$z(target, key) : target;
|
|
6719
6706
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6720
6707
|
if (decorator = decorators[i])
|
|
6721
6708
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
6722
|
-
if (kind && result) __defProp$
|
|
6709
|
+
if (kind && result) __defProp$A(target, key, result);
|
|
6723
6710
|
return result;
|
|
6724
6711
|
};
|
|
6725
6712
|
exports.Timeline = class Timeline extends exports.Node {
|
|
@@ -6764,30 +6751,30 @@ exports.Timeline = class Timeline extends exports.Node {
|
|
|
6764
6751
|
this.addTime(delta);
|
|
6765
6752
|
}
|
|
6766
6753
|
};
|
|
6767
|
-
__decorateClass$
|
|
6754
|
+
__decorateClass$A([
|
|
6768
6755
|
property({ default: 0 })
|
|
6769
6756
|
], exports.Timeline.prototype, "startTime", 2);
|
|
6770
|
-
__decorateClass$
|
|
6757
|
+
__decorateClass$A([
|
|
6771
6758
|
property({ default: 0 })
|
|
6772
6759
|
], exports.Timeline.prototype, "currentTime", 2);
|
|
6773
|
-
__decorateClass$
|
|
6760
|
+
__decorateClass$A([
|
|
6774
6761
|
property({ default: Number.MAX_SAFE_INTEGER })
|
|
6775
6762
|
], exports.Timeline.prototype, "endTime", 2);
|
|
6776
|
-
__decorateClass$
|
|
6763
|
+
__decorateClass$A([
|
|
6777
6764
|
property({ default: false })
|
|
6778
6765
|
], exports.Timeline.prototype, "loop", 2);
|
|
6779
|
-
exports.Timeline = __decorateClass$
|
|
6766
|
+
exports.Timeline = __decorateClass$A([
|
|
6780
6767
|
customNode("Timeline")
|
|
6781
6768
|
], exports.Timeline);
|
|
6782
6769
|
|
|
6783
|
-
var __defProp$
|
|
6784
|
-
var __getOwnPropDesc$
|
|
6785
|
-
var __decorateClass$
|
|
6786
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
6770
|
+
var __defProp$z = Object.defineProperty;
|
|
6771
|
+
var __getOwnPropDesc$y = Object.getOwnPropertyDescriptor;
|
|
6772
|
+
var __decorateClass$z = (decorators, target, key, kind) => {
|
|
6773
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$y(target, key) : target;
|
|
6787
6774
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6788
6775
|
if (decorator = decorators[i])
|
|
6789
6776
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
6790
|
-
if (kind && result) __defProp$
|
|
6777
|
+
if (kind && result) __defProp$z(target, key, result);
|
|
6791
6778
|
return result;
|
|
6792
6779
|
};
|
|
6793
6780
|
exports.Viewport = class Viewport extends exports.Node {
|
|
@@ -6843,11 +6830,13 @@ exports.Viewport = class Viewport extends exports.Node {
|
|
|
6843
6830
|
case "y":
|
|
6844
6831
|
this.requestUpload();
|
|
6845
6832
|
this._projection.translate(this.x, this.y);
|
|
6833
|
+
this.emit("updateRect");
|
|
6846
6834
|
break;
|
|
6847
6835
|
case "width":
|
|
6848
6836
|
case "height":
|
|
6849
6837
|
this.requestUpload();
|
|
6850
6838
|
this._projection.resize(this.width, this.height);
|
|
6839
|
+
this.emit("updateRect");
|
|
6851
6840
|
break;
|
|
6852
6841
|
}
|
|
6853
6842
|
}
|
|
@@ -6916,33 +6905,36 @@ exports.Viewport = class Viewport extends exports.Node {
|
|
|
6916
6905
|
this._tree?.setCurrentViewport(undefined);
|
|
6917
6906
|
}
|
|
6918
6907
|
}
|
|
6908
|
+
getRect() {
|
|
6909
|
+
return new Rect2(this.x, this.y, this.width, this.height);
|
|
6910
|
+
}
|
|
6919
6911
|
toProjectionArray(transpose = false) {
|
|
6920
6912
|
return this._projection.toArray(transpose);
|
|
6921
6913
|
}
|
|
6922
6914
|
};
|
|
6923
|
-
__decorateClass$
|
|
6915
|
+
__decorateClass$z([
|
|
6924
6916
|
property({ default: 0 })
|
|
6925
6917
|
], exports.Viewport.prototype, "x", 2);
|
|
6926
|
-
__decorateClass$
|
|
6918
|
+
__decorateClass$z([
|
|
6927
6919
|
property({ default: 0 })
|
|
6928
6920
|
], exports.Viewport.prototype, "y", 2);
|
|
6929
|
-
__decorateClass$
|
|
6921
|
+
__decorateClass$z([
|
|
6930
6922
|
property({ default: 0 })
|
|
6931
6923
|
], exports.Viewport.prototype, "width", 2);
|
|
6932
|
-
__decorateClass$
|
|
6924
|
+
__decorateClass$z([
|
|
6933
6925
|
property({ default: 0 })
|
|
6934
6926
|
], exports.Viewport.prototype, "height", 2);
|
|
6935
|
-
exports.Viewport = __decorateClass$
|
|
6927
|
+
exports.Viewport = __decorateClass$z([
|
|
6936
6928
|
customNode("Viewport")
|
|
6937
6929
|
], exports.Viewport);
|
|
6938
6930
|
|
|
6939
|
-
var __defProp$
|
|
6940
|
-
var __decorateClass$
|
|
6931
|
+
var __defProp$y = Object.defineProperty;
|
|
6932
|
+
var __decorateClass$y = (decorators, target, key, kind) => {
|
|
6941
6933
|
var result = undefined ;
|
|
6942
6934
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6943
6935
|
if (decorator = decorators[i])
|
|
6944
6936
|
result = (decorator(target, key, result) ) || result;
|
|
6945
|
-
if (result) __defProp$
|
|
6937
|
+
if (result) __defProp$y(target, key, result);
|
|
6946
6938
|
return result;
|
|
6947
6939
|
};
|
|
6948
6940
|
class SceneTree extends MainLoop {
|
|
@@ -7003,21 +6995,21 @@ class SceneTree extends MainLoop {
|
|
|
7003
6995
|
renderer.texture.unbind(texture);
|
|
7004
6996
|
}
|
|
7005
6997
|
}
|
|
7006
|
-
__decorateClass$
|
|
6998
|
+
__decorateClass$y([
|
|
7007
6999
|
property({ default: false })
|
|
7008
7000
|
], SceneTree.prototype, "paused");
|
|
7009
|
-
__decorateClass$
|
|
7001
|
+
__decorateClass$y([
|
|
7010
7002
|
property()
|
|
7011
7003
|
], SceneTree.prototype, "backgroundColor");
|
|
7012
7004
|
|
|
7013
|
-
var __defProp$
|
|
7014
|
-
var __getOwnPropDesc$
|
|
7015
|
-
var __decorateClass$
|
|
7016
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
7005
|
+
var __defProp$x = Object.defineProperty;
|
|
7006
|
+
var __getOwnPropDesc$x = Object.getOwnPropertyDescriptor;
|
|
7007
|
+
var __decorateClass$x = (decorators, target, key, kind) => {
|
|
7008
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$x(target, key) : target;
|
|
7017
7009
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7018
7010
|
if (decorator = decorators[i])
|
|
7019
7011
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7020
|
-
if (kind && result) __defProp$
|
|
7012
|
+
if (kind && result) __defProp$x(target, key, result);
|
|
7021
7013
|
return result;
|
|
7022
7014
|
};
|
|
7023
7015
|
exports.Node2D = class Node2D extends exports.CanvasItem {
|
|
@@ -7149,18 +7141,18 @@ exports.Node2D = class Node2D extends exports.CanvasItem {
|
|
|
7149
7141
|
);
|
|
7150
7142
|
}
|
|
7151
7143
|
};
|
|
7152
|
-
exports.Node2D = __decorateClass$
|
|
7144
|
+
exports.Node2D = __decorateClass$x([
|
|
7153
7145
|
customNode("Node2D")
|
|
7154
7146
|
], exports.Node2D);
|
|
7155
7147
|
|
|
7156
|
-
var __defProp$
|
|
7157
|
-
var __getOwnPropDesc$
|
|
7158
|
-
var __decorateClass$
|
|
7159
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
7148
|
+
var __defProp$w = Object.defineProperty;
|
|
7149
|
+
var __getOwnPropDesc$w = Object.getOwnPropertyDescriptor;
|
|
7150
|
+
var __decorateClass$w = (decorators, target, key, kind) => {
|
|
7151
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$w(target, key) : target;
|
|
7160
7152
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7161
7153
|
if (decorator = decorators[i])
|
|
7162
7154
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7163
|
-
if (kind && result) __defProp$
|
|
7155
|
+
if (kind && result) __defProp$w(target, key, result);
|
|
7164
7156
|
return result;
|
|
7165
7157
|
};
|
|
7166
7158
|
function proxy(options) {
|
|
@@ -7205,61 +7197,61 @@ exports.Graphics2D = class Graphics2D extends exports.Node2D {
|
|
|
7205
7197
|
return this;
|
|
7206
7198
|
}
|
|
7207
7199
|
};
|
|
7208
|
-
__decorateClass$
|
|
7200
|
+
__decorateClass$w([
|
|
7209
7201
|
proxy()
|
|
7210
7202
|
], exports.Graphics2D.prototype, "lineCap", 2);
|
|
7211
|
-
__decorateClass$
|
|
7203
|
+
__decorateClass$w([
|
|
7212
7204
|
proxy()
|
|
7213
7205
|
], exports.Graphics2D.prototype, "lineJoin", 2);
|
|
7214
|
-
__decorateClass$
|
|
7206
|
+
__decorateClass$w([
|
|
7215
7207
|
proxy()
|
|
7216
7208
|
], exports.Graphics2D.prototype, "fillStyle", 2);
|
|
7217
|
-
__decorateClass$
|
|
7209
|
+
__decorateClass$w([
|
|
7218
7210
|
proxy()
|
|
7219
7211
|
], exports.Graphics2D.prototype, "strokeStyle", 2);
|
|
7220
|
-
__decorateClass$
|
|
7212
|
+
__decorateClass$w([
|
|
7221
7213
|
proxy()
|
|
7222
7214
|
], exports.Graphics2D.prototype, "lineWidth", 2);
|
|
7223
|
-
__decorateClass$
|
|
7215
|
+
__decorateClass$w([
|
|
7224
7216
|
proxy()
|
|
7225
7217
|
], exports.Graphics2D.prototype, "miterLimit", 2);
|
|
7226
|
-
__decorateClass$
|
|
7218
|
+
__decorateClass$w([
|
|
7227
7219
|
proxy({ method: true })
|
|
7228
7220
|
], exports.Graphics2D.prototype, "rect", 2);
|
|
7229
|
-
__decorateClass$
|
|
7221
|
+
__decorateClass$w([
|
|
7230
7222
|
proxy({ method: true, redraw: true })
|
|
7231
7223
|
], exports.Graphics2D.prototype, "fillRect", 2);
|
|
7232
|
-
__decorateClass$
|
|
7224
|
+
__decorateClass$w([
|
|
7233
7225
|
proxy({ method: true, redraw: true })
|
|
7234
7226
|
], exports.Graphics2D.prototype, "strokeRect", 2);
|
|
7235
|
-
__decorateClass$
|
|
7227
|
+
__decorateClass$w([
|
|
7236
7228
|
proxy({ method: true })
|
|
7237
7229
|
], exports.Graphics2D.prototype, "roundRect", 2);
|
|
7238
|
-
__decorateClass$
|
|
7230
|
+
__decorateClass$w([
|
|
7239
7231
|
proxy({ method: true })
|
|
7240
7232
|
], exports.Graphics2D.prototype, "ellipse", 2);
|
|
7241
|
-
__decorateClass$
|
|
7233
|
+
__decorateClass$w([
|
|
7242
7234
|
proxy({ method: true })
|
|
7243
7235
|
], exports.Graphics2D.prototype, "arc", 2);
|
|
7244
|
-
__decorateClass$
|
|
7236
|
+
__decorateClass$w([
|
|
7245
7237
|
proxy({ method: true })
|
|
7246
7238
|
], exports.Graphics2D.prototype, "beginPath", 2);
|
|
7247
|
-
__decorateClass$
|
|
7239
|
+
__decorateClass$w([
|
|
7248
7240
|
proxy({ method: true })
|
|
7249
7241
|
], exports.Graphics2D.prototype, "moveTo", 2);
|
|
7250
|
-
__decorateClass$
|
|
7242
|
+
__decorateClass$w([
|
|
7251
7243
|
proxy({ method: true })
|
|
7252
7244
|
], exports.Graphics2D.prototype, "lineTo", 2);
|
|
7253
|
-
__decorateClass$
|
|
7245
|
+
__decorateClass$w([
|
|
7254
7246
|
proxy({ method: true })
|
|
7255
7247
|
], exports.Graphics2D.prototype, "closePath", 2);
|
|
7256
|
-
__decorateClass$
|
|
7248
|
+
__decorateClass$w([
|
|
7257
7249
|
proxy({ method: true, redraw: true })
|
|
7258
7250
|
], exports.Graphics2D.prototype, "fill", 2);
|
|
7259
|
-
__decorateClass$
|
|
7251
|
+
__decorateClass$w([
|
|
7260
7252
|
proxy({ method: true, redraw: true })
|
|
7261
7253
|
], exports.Graphics2D.prototype, "stroke", 2);
|
|
7262
|
-
exports.Graphics2D = __decorateClass$
|
|
7254
|
+
exports.Graphics2D = __decorateClass$w([
|
|
7263
7255
|
customNode("Graphics2D")
|
|
7264
7256
|
], exports.Graphics2D);
|
|
7265
7257
|
|
|
@@ -7289,14 +7281,14 @@ class Image2DResource extends Resource {
|
|
|
7289
7281
|
}
|
|
7290
7282
|
}
|
|
7291
7283
|
|
|
7292
|
-
var __defProp$
|
|
7293
|
-
var __getOwnPropDesc$
|
|
7294
|
-
var __decorateClass$
|
|
7295
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
7284
|
+
var __defProp$v = Object.defineProperty;
|
|
7285
|
+
var __getOwnPropDesc$v = Object.getOwnPropertyDescriptor;
|
|
7286
|
+
var __decorateClass$v = (decorators, target, key, kind) => {
|
|
7287
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$v(target, key) : target;
|
|
7296
7288
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7297
7289
|
if (decorator = decorators[i])
|
|
7298
7290
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7299
|
-
if (kind && result) __defProp$
|
|
7291
|
+
if (kind && result) __defProp$v(target, key, result);
|
|
7300
7292
|
return result;
|
|
7301
7293
|
};
|
|
7302
7294
|
exports.Image2D = class Image2D extends exports.Node2D {
|
|
@@ -7430,16 +7422,16 @@ exports.Image2D = class Image2D extends exports.Node2D {
|
|
|
7430
7422
|
);
|
|
7431
7423
|
}
|
|
7432
7424
|
};
|
|
7433
|
-
__decorateClass$
|
|
7425
|
+
__decorateClass$v([
|
|
7434
7426
|
protectedProperty()
|
|
7435
7427
|
], exports.Image2D.prototype, "resource", 2);
|
|
7436
|
-
__decorateClass$
|
|
7428
|
+
__decorateClass$v([
|
|
7437
7429
|
property({ default: false })
|
|
7438
7430
|
], exports.Image2D.prototype, "gif", 2);
|
|
7439
|
-
__decorateClass$
|
|
7431
|
+
__decorateClass$v([
|
|
7440
7432
|
property({ default: "" })
|
|
7441
7433
|
], exports.Image2D.prototype, "src", 2);
|
|
7442
|
-
exports.Image2D = __decorateClass$
|
|
7434
|
+
exports.Image2D = __decorateClass$v([
|
|
7443
7435
|
customNode("Image2D")
|
|
7444
7436
|
], exports.Image2D);
|
|
7445
7437
|
|
|
@@ -7473,14 +7465,14 @@ class TextureRect2D extends exports.Node2D {
|
|
|
7473
7465
|
}
|
|
7474
7466
|
}
|
|
7475
7467
|
|
|
7476
|
-
var __defProp$
|
|
7477
|
-
var __getOwnPropDesc$
|
|
7478
|
-
var __decorateClass$
|
|
7479
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
7468
|
+
var __defProp$u = Object.defineProperty;
|
|
7469
|
+
var __getOwnPropDesc$u = Object.getOwnPropertyDescriptor;
|
|
7470
|
+
var __decorateClass$u = (decorators, target, key, kind) => {
|
|
7471
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$u(target, key) : target;
|
|
7480
7472
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7481
7473
|
if (decorator = decorators[i])
|
|
7482
7474
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7483
|
-
if (kind && result) __defProp$
|
|
7475
|
+
if (kind && result) __defProp$u(target, key, result);
|
|
7484
7476
|
return result;
|
|
7485
7477
|
};
|
|
7486
7478
|
exports.Lottie2D = class Lottie2D extends TextureRect2D {
|
|
@@ -7523,21 +7515,21 @@ exports.Lottie2D = class Lottie2D extends TextureRect2D {
|
|
|
7523
7515
|
super._process(delta);
|
|
7524
7516
|
}
|
|
7525
7517
|
};
|
|
7526
|
-
__decorateClass$
|
|
7518
|
+
__decorateClass$u([
|
|
7527
7519
|
property({ default: "" })
|
|
7528
7520
|
], exports.Lottie2D.prototype, "src", 2);
|
|
7529
|
-
exports.Lottie2D = __decorateClass$
|
|
7521
|
+
exports.Lottie2D = __decorateClass$u([
|
|
7530
7522
|
customNode("Lottie2D")
|
|
7531
7523
|
], exports.Lottie2D);
|
|
7532
7524
|
|
|
7533
|
-
var __defProp$
|
|
7534
|
-
var __getOwnPropDesc$
|
|
7535
|
-
var __decorateClass$
|
|
7536
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
7525
|
+
var __defProp$t = Object.defineProperty;
|
|
7526
|
+
var __getOwnPropDesc$t = Object.getOwnPropertyDescriptor;
|
|
7527
|
+
var __decorateClass$t = (decorators, target, key, kind) => {
|
|
7528
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$t(target, key) : target;
|
|
7537
7529
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7538
7530
|
if (decorator = decorators[i])
|
|
7539
7531
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7540
|
-
if (kind && result) __defProp$
|
|
7532
|
+
if (kind && result) __defProp$t(target, key, result);
|
|
7541
7533
|
return result;
|
|
7542
7534
|
};
|
|
7543
7535
|
const textStyles = new Set(Object.keys(modernText.textDefaultStyle));
|
|
@@ -7660,7 +7652,7 @@ exports.Text2D = class Text2D extends TextureRect2D {
|
|
|
7660
7652
|
}
|
|
7661
7653
|
_drawContent() {
|
|
7662
7654
|
if (!this.split) {
|
|
7663
|
-
const onText2DRender = this.
|
|
7655
|
+
const onText2DRender = this.getChildren()?.find((child) => "onText2DRender" in child)?.onText2DRender;
|
|
7664
7656
|
if (onText2DRender) {
|
|
7665
7657
|
onText2DRender();
|
|
7666
7658
|
} else {
|
|
@@ -7675,33 +7667,33 @@ exports.Text2D = class Text2D extends TextureRect2D {
|
|
|
7675
7667
|
}
|
|
7676
7668
|
}
|
|
7677
7669
|
};
|
|
7678
|
-
__decorateClass$
|
|
7670
|
+
__decorateClass$t([
|
|
7679
7671
|
property({ default: false })
|
|
7680
7672
|
], exports.Text2D.prototype, "split", 2);
|
|
7681
|
-
__decorateClass$
|
|
7673
|
+
__decorateClass$t([
|
|
7682
7674
|
property({ default: "" })
|
|
7683
7675
|
], exports.Text2D.prototype, "content", 2);
|
|
7684
|
-
__decorateClass$
|
|
7676
|
+
__decorateClass$t([
|
|
7685
7677
|
property()
|
|
7686
7678
|
], exports.Text2D.prototype, "effects", 2);
|
|
7687
|
-
__decorateClass$
|
|
7679
|
+
__decorateClass$t([
|
|
7688
7680
|
protectedProperty()
|
|
7689
7681
|
], exports.Text2D.prototype, "measureDom", 2);
|
|
7690
|
-
__decorateClass$
|
|
7682
|
+
__decorateClass$t([
|
|
7691
7683
|
protectedProperty()
|
|
7692
7684
|
], exports.Text2D.prototype, "fonts", 2);
|
|
7693
|
-
exports.Text2D = __decorateClass$
|
|
7685
|
+
exports.Text2D = __decorateClass$t([
|
|
7694
7686
|
customNode("Text2D")
|
|
7695
7687
|
], exports.Text2D);
|
|
7696
7688
|
|
|
7697
|
-
var __defProp$
|
|
7698
|
-
var __getOwnPropDesc$
|
|
7699
|
-
var __decorateClass$
|
|
7700
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
7689
|
+
var __defProp$s = Object.defineProperty;
|
|
7690
|
+
var __getOwnPropDesc$s = Object.getOwnPropertyDescriptor;
|
|
7691
|
+
var __decorateClass$s = (decorators, target, key, kind) => {
|
|
7692
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$s(target, key) : target;
|
|
7701
7693
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7702
7694
|
if (decorator = decorators[i])
|
|
7703
7695
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7704
|
-
if (kind && result) __defProp$
|
|
7696
|
+
if (kind && result) __defProp$s(target, key, result);
|
|
7705
7697
|
return result;
|
|
7706
7698
|
};
|
|
7707
7699
|
exports.Video2D = class Video2D extends TextureRect2D {
|
|
@@ -7754,21 +7746,21 @@ exports.Video2D = class Video2D extends TextureRect2D {
|
|
|
7754
7746
|
super._process(delta);
|
|
7755
7747
|
}
|
|
7756
7748
|
};
|
|
7757
|
-
__decorateClass$
|
|
7749
|
+
__decorateClass$s([
|
|
7758
7750
|
property({ default: "" })
|
|
7759
7751
|
], exports.Video2D.prototype, "src", 2);
|
|
7760
|
-
exports.Video2D = __decorateClass$
|
|
7752
|
+
exports.Video2D = __decorateClass$s([
|
|
7761
7753
|
customNode("Video2D")
|
|
7762
7754
|
], exports.Video2D);
|
|
7763
7755
|
|
|
7764
|
-
var __defProp$
|
|
7765
|
-
var __getOwnPropDesc$
|
|
7766
|
-
var __decorateClass$
|
|
7767
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
7756
|
+
var __defProp$r = Object.defineProperty;
|
|
7757
|
+
var __getOwnPropDesc$r = Object.getOwnPropertyDescriptor;
|
|
7758
|
+
var __decorateClass$r = (decorators, target, key, kind) => {
|
|
7759
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$r(target, key) : target;
|
|
7768
7760
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7769
7761
|
if (decorator = decorators[i])
|
|
7770
7762
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7771
|
-
if (kind && result) __defProp$
|
|
7763
|
+
if (kind && result) __defProp$r(target, key, result);
|
|
7772
7764
|
return result;
|
|
7773
7765
|
};
|
|
7774
7766
|
const linear = (amount) => amount;
|
|
@@ -7850,7 +7842,7 @@ exports.Animation = class Animation extends exports.TimelineNode {
|
|
|
7850
7842
|
_updateProperty(key, value, oldValue, declaration) {
|
|
7851
7843
|
super._updateProperty(key, value, oldValue, declaration);
|
|
7852
7844
|
switch (key) {
|
|
7853
|
-
case "
|
|
7845
|
+
case "animationMode":
|
|
7854
7846
|
case "keyframes":
|
|
7855
7847
|
this._updateKeyframes();
|
|
7856
7848
|
break;
|
|
@@ -8080,19 +8072,19 @@ exports.Animation = class Animation extends exports.TimelineNode {
|
|
|
8080
8072
|
});
|
|
8081
8073
|
}
|
|
8082
8074
|
};
|
|
8083
|
-
__decorateClass$
|
|
8075
|
+
__decorateClass$r([
|
|
8084
8076
|
property({ default: "parent" })
|
|
8085
8077
|
], exports.Animation.prototype, "animationMode", 2);
|
|
8086
|
-
__decorateClass$
|
|
8078
|
+
__decorateClass$r([
|
|
8087
8079
|
property({ default: false })
|
|
8088
8080
|
], exports.Animation.prototype, "loop", 2);
|
|
8089
|
-
__decorateClass$
|
|
8081
|
+
__decorateClass$r([
|
|
8090
8082
|
property({ default: [] })
|
|
8091
8083
|
], exports.Animation.prototype, "keyframes", 2);
|
|
8092
|
-
__decorateClass$
|
|
8084
|
+
__decorateClass$r([
|
|
8093
8085
|
property()
|
|
8094
8086
|
], exports.Animation.prototype, "easing", 2);
|
|
8095
|
-
exports.Animation = __decorateClass$
|
|
8087
|
+
exports.Animation = __decorateClass$r([
|
|
8096
8088
|
customNode("Animation", {
|
|
8097
8089
|
renderMode: "disabled",
|
|
8098
8090
|
processMode: "disabled",
|
|
@@ -8975,15 +8967,15 @@ class WebAudio extends AudioPipeline {
|
|
|
8975
8967
|
}
|
|
8976
8968
|
}
|
|
8977
8969
|
|
|
8978
|
-
var __defProp$
|
|
8979
|
-
var __getOwnPropDesc$
|
|
8980
|
-
var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$
|
|
8981
|
-
var __decorateClass$
|
|
8982
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
8970
|
+
var __defProp$q = Object.defineProperty;
|
|
8971
|
+
var __getOwnPropDesc$q = Object.getOwnPropertyDescriptor;
|
|
8972
|
+
var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8973
|
+
var __decorateClass$q = (decorators, target, key, kind) => {
|
|
8974
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$q(target, key) : target;
|
|
8983
8975
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
8984
8976
|
if (decorator = decorators[i])
|
|
8985
8977
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8986
|
-
if (kind && result) __defProp$
|
|
8978
|
+
if (kind && result) __defProp$q(target, key, result);
|
|
8987
8979
|
return result;
|
|
8988
8980
|
};
|
|
8989
8981
|
var __publicField$h = (obj, key, value) => __defNormalProp$h(obj, key + "" , value);
|
|
@@ -9191,7 +9183,7 @@ exports.Audio = class Audio extends exports.TimelineNode {
|
|
|
9191
9183
|
}
|
|
9192
9184
|
};
|
|
9193
9185
|
__publicField$h(exports.Audio, "_soundPool", []);
|
|
9194
|
-
exports.Audio = __decorateClass$
|
|
9186
|
+
exports.Audio = __decorateClass$q([
|
|
9195
9187
|
customNode("Audio")
|
|
9196
9188
|
], exports.Audio);
|
|
9197
9189
|
|
|
@@ -9199,14 +9191,14 @@ class AudioSpectrum extends exports.Node2D {
|
|
|
9199
9191
|
//
|
|
9200
9192
|
}
|
|
9201
9193
|
|
|
9202
|
-
var __defProp$
|
|
9203
|
-
var __getOwnPropDesc$
|
|
9204
|
-
var __decorateClass$
|
|
9205
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
9194
|
+
var __defProp$p = Object.defineProperty;
|
|
9195
|
+
var __getOwnPropDesc$p = Object.getOwnPropertyDescriptor;
|
|
9196
|
+
var __decorateClass$p = (decorators, target, key, kind) => {
|
|
9197
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$p(target, key) : target;
|
|
9206
9198
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
9207
9199
|
if (decorator = decorators[i])
|
|
9208
9200
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
9209
|
-
if (kind && result) __defProp$
|
|
9201
|
+
if (kind && result) __defProp$p(target, key, result);
|
|
9210
9202
|
return result;
|
|
9211
9203
|
};
|
|
9212
9204
|
exports.AudioWaveform = class AudioWaveform extends exports.Node2D {
|
|
@@ -9300,27 +9292,27 @@ exports.AudioWaveform = class AudioWaveform extends exports.Node2D {
|
|
|
9300
9292
|
}
|
|
9301
9293
|
}
|
|
9302
9294
|
};
|
|
9303
|
-
__decorateClass$
|
|
9295
|
+
__decorateClass$p([
|
|
9304
9296
|
property()
|
|
9305
9297
|
], exports.AudioWaveform.prototype, "src", 2);
|
|
9306
|
-
__decorateClass$
|
|
9298
|
+
__decorateClass$p([
|
|
9307
9299
|
property()
|
|
9308
9300
|
], exports.AudioWaveform.prototype, "gap", 2);
|
|
9309
|
-
__decorateClass$
|
|
9301
|
+
__decorateClass$p([
|
|
9310
9302
|
property()
|
|
9311
9303
|
], exports.AudioWaveform.prototype, "color", 2);
|
|
9312
|
-
exports.AudioWaveform = __decorateClass$
|
|
9304
|
+
exports.AudioWaveform = __decorateClass$p([
|
|
9313
9305
|
customNode("AudioWaveform")
|
|
9314
9306
|
], exports.AudioWaveform);
|
|
9315
9307
|
|
|
9316
|
-
var __defProp$
|
|
9317
|
-
var __getOwnPropDesc$
|
|
9318
|
-
var __decorateClass$
|
|
9319
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
9308
|
+
var __defProp$o = Object.defineProperty;
|
|
9309
|
+
var __getOwnPropDesc$o = Object.getOwnPropertyDescriptor;
|
|
9310
|
+
var __decorateClass$o = (decorators, target, key, kind) => {
|
|
9311
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$o(target, key) : target;
|
|
9320
9312
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
9321
9313
|
if (decorator = decorators[i])
|
|
9322
9314
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
9323
|
-
if (kind && result) __defProp$
|
|
9315
|
+
if (kind && result) __defProp$o(target, key, result);
|
|
9324
9316
|
return result;
|
|
9325
9317
|
};
|
|
9326
9318
|
exports.Effect = class Effect extends exports.TimelineNode {
|
|
@@ -9338,11 +9330,11 @@ exports.Effect = class Effect extends exports.TimelineNode {
|
|
|
9338
9330
|
/** Temporary nodes for transition */
|
|
9339
9331
|
_previousSibling;
|
|
9340
9332
|
_nextSibling;
|
|
9341
|
-
constructor(
|
|
9333
|
+
constructor(properties, children = []) {
|
|
9342
9334
|
super();
|
|
9343
9335
|
this._onProcessing = this._onProcessing.bind(this);
|
|
9344
9336
|
this._onNodeProcessed = this._onNodeProcessed.bind(this);
|
|
9345
|
-
this.setProperties(
|
|
9337
|
+
this.setProperties(properties).append(children);
|
|
9346
9338
|
}
|
|
9347
9339
|
_updateProperty(key, value, oldValue, declaration) {
|
|
9348
9340
|
super._updateProperty(key, value, oldValue, declaration);
|
|
@@ -9508,7 +9500,7 @@ exports.Effect = class Effect extends exports.TimelineNode {
|
|
|
9508
9500
|
_parseTargetArea() {
|
|
9509
9501
|
if (this._mode === "parent" && this._parent && "getRect" in this._parent) {
|
|
9510
9502
|
const rect = this._parent.getRect();
|
|
9511
|
-
if (rect
|
|
9503
|
+
if (rect) {
|
|
9512
9504
|
return [
|
|
9513
9505
|
rect.left / this.viewport1.width,
|
|
9514
9506
|
rect.top / this.viewport1.height,
|
|
@@ -9557,31 +9549,31 @@ exports.Effect = class Effect extends exports.TimelineNode {
|
|
|
9557
9549
|
}
|
|
9558
9550
|
}
|
|
9559
9551
|
};
|
|
9560
|
-
__decorateClass$
|
|
9552
|
+
__decorateClass$o([
|
|
9561
9553
|
protectedProperty()
|
|
9562
9554
|
], exports.Effect.prototype, "material", 2);
|
|
9563
|
-
__decorateClass$
|
|
9555
|
+
__decorateClass$o([
|
|
9564
9556
|
property()
|
|
9565
9557
|
], exports.Effect.prototype, "mode", 2);
|
|
9566
|
-
__decorateClass$
|
|
9558
|
+
__decorateClass$o([
|
|
9567
9559
|
property({ default: "" })
|
|
9568
9560
|
], exports.Effect.prototype, "glsl", 2);
|
|
9569
|
-
__decorateClass$
|
|
9561
|
+
__decorateClass$o([
|
|
9570
9562
|
property({ default: "" })
|
|
9571
9563
|
], exports.Effect.prototype, "glslSrc", 2);
|
|
9572
|
-
exports.Effect = __decorateClass$
|
|
9564
|
+
exports.Effect = __decorateClass$o([
|
|
9573
9565
|
customNode("Effect")
|
|
9574
9566
|
], exports.Effect);
|
|
9575
9567
|
|
|
9576
|
-
var __defProp$
|
|
9577
|
-
var __getOwnPropDesc$
|
|
9578
|
-
var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$
|
|
9579
|
-
var __decorateClass$
|
|
9580
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
9568
|
+
var __defProp$n = Object.defineProperty;
|
|
9569
|
+
var __getOwnPropDesc$n = Object.getOwnPropertyDescriptor;
|
|
9570
|
+
var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9571
|
+
var __decorateClass$n = (decorators, target, key, kind) => {
|
|
9572
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$n(target, key) : target;
|
|
9581
9573
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
9582
9574
|
if (decorator = decorators[i])
|
|
9583
9575
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
9584
|
-
if (kind && result) __defProp$
|
|
9576
|
+
if (kind && result) __defProp$n(target, key, result);
|
|
9585
9577
|
return result;
|
|
9586
9578
|
};
|
|
9587
9579
|
var __publicField$g = (obj, key, value) => __defNormalProp$g(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
@@ -9678,25 +9670,25 @@ __publicField$g(exports.BlurEffect, "materialY", new Material({
|
|
|
9678
9670
|
vert: vertY,
|
|
9679
9671
|
frag
|
|
9680
9672
|
}));
|
|
9681
|
-
__decorateClass$
|
|
9673
|
+
__decorateClass$n([
|
|
9682
9674
|
property({ default: 8 })
|
|
9683
9675
|
], exports.BlurEffect.prototype, "strength", 2);
|
|
9684
|
-
__decorateClass$
|
|
9676
|
+
__decorateClass$n([
|
|
9685
9677
|
property({ default: 4 })
|
|
9686
9678
|
], exports.BlurEffect.prototype, "quality", 2);
|
|
9687
|
-
exports.BlurEffect = __decorateClass$
|
|
9679
|
+
exports.BlurEffect = __decorateClass$n([
|
|
9688
9680
|
customNode("BlurEffect")
|
|
9689
9681
|
], exports.BlurEffect);
|
|
9690
9682
|
|
|
9691
|
-
var __defProp$
|
|
9692
|
-
var __getOwnPropDesc$
|
|
9693
|
-
var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$
|
|
9694
|
-
var __decorateClass$
|
|
9695
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
9683
|
+
var __defProp$m = Object.defineProperty;
|
|
9684
|
+
var __getOwnPropDesc$m = Object.getOwnPropertyDescriptor;
|
|
9685
|
+
var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9686
|
+
var __decorateClass$m = (decorators, target, key, kind) => {
|
|
9687
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$m(target, key) : target;
|
|
9696
9688
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
9697
9689
|
if (decorator = decorators[i])
|
|
9698
9690
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
9699
|
-
if (kind && result) __defProp$
|
|
9691
|
+
if (kind && result) __defProp$m(target, key, result);
|
|
9700
9692
|
return result;
|
|
9701
9693
|
};
|
|
9702
9694
|
var __publicField$f = (obj, key, value) => __defNormalProp$f(obj, key + "" , value);
|
|
@@ -9760,43 +9752,43 @@ void main(void) {
|
|
|
9760
9752
|
gl_FragColor = c * alpha;
|
|
9761
9753
|
}`
|
|
9762
9754
|
}));
|
|
9763
|
-
__decorateClass$
|
|
9755
|
+
__decorateClass$m([
|
|
9764
9756
|
property()
|
|
9765
9757
|
], exports.ColorAdjustEffect.prototype, "saturation", 2);
|
|
9766
|
-
__decorateClass$
|
|
9758
|
+
__decorateClass$m([
|
|
9767
9759
|
property()
|
|
9768
9760
|
], exports.ColorAdjustEffect.prototype, "contrast", 2);
|
|
9769
|
-
__decorateClass$
|
|
9761
|
+
__decorateClass$m([
|
|
9770
9762
|
property()
|
|
9771
9763
|
], exports.ColorAdjustEffect.prototype, "brightness", 2);
|
|
9772
|
-
__decorateClass$
|
|
9764
|
+
__decorateClass$m([
|
|
9773
9765
|
property()
|
|
9774
9766
|
], exports.ColorAdjustEffect.prototype, "red", 2);
|
|
9775
|
-
__decorateClass$
|
|
9767
|
+
__decorateClass$m([
|
|
9776
9768
|
property()
|
|
9777
9769
|
], exports.ColorAdjustEffect.prototype, "green", 2);
|
|
9778
|
-
__decorateClass$
|
|
9770
|
+
__decorateClass$m([
|
|
9779
9771
|
property()
|
|
9780
9772
|
], exports.ColorAdjustEffect.prototype, "blue", 2);
|
|
9781
|
-
__decorateClass$
|
|
9773
|
+
__decorateClass$m([
|
|
9782
9774
|
property()
|
|
9783
9775
|
], exports.ColorAdjustEffect.prototype, "alpha", 2);
|
|
9784
|
-
__decorateClass$
|
|
9776
|
+
__decorateClass$m([
|
|
9785
9777
|
property()
|
|
9786
9778
|
], exports.ColorAdjustEffect.prototype, "gamma", 2);
|
|
9787
|
-
exports.ColorAdjustEffect = __decorateClass$
|
|
9779
|
+
exports.ColorAdjustEffect = __decorateClass$m([
|
|
9788
9780
|
customNode("ColorAdjustEffect")
|
|
9789
9781
|
], exports.ColorAdjustEffect);
|
|
9790
9782
|
|
|
9791
|
-
var __defProp$
|
|
9792
|
-
var __getOwnPropDesc$
|
|
9793
|
-
var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$
|
|
9794
|
-
var __decorateClass$
|
|
9795
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
9783
|
+
var __defProp$l = Object.defineProperty;
|
|
9784
|
+
var __getOwnPropDesc$l = Object.getOwnPropertyDescriptor;
|
|
9785
|
+
var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$l(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9786
|
+
var __decorateClass$l = (decorators, target, key, kind) => {
|
|
9787
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$l(target, key) : target;
|
|
9796
9788
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
9797
9789
|
if (decorator = decorators[i])
|
|
9798
9790
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
9799
|
-
if (kind && result) __defProp$
|
|
9791
|
+
if (kind && result) __defProp$l(target, key, result);
|
|
9800
9792
|
return result;
|
|
9801
9793
|
};
|
|
9802
9794
|
var __publicField$e = (obj, key, value) => __defNormalProp$e(obj, key + "" , value);
|
|
@@ -9876,22 +9868,22 @@ void main(void) {
|
|
|
9876
9868
|
);
|
|
9877
9869
|
}`
|
|
9878
9870
|
}));
|
|
9879
|
-
__decorateClass$
|
|
9871
|
+
__decorateClass$l([
|
|
9880
9872
|
property({ default: "" })
|
|
9881
9873
|
], exports.ColorFilterEffect.prototype, "filter", 2);
|
|
9882
|
-
exports.ColorFilterEffect = __decorateClass$
|
|
9874
|
+
exports.ColorFilterEffect = __decorateClass$l([
|
|
9883
9875
|
customNode("ColorFilterEffect")
|
|
9884
9876
|
], exports.ColorFilterEffect);
|
|
9885
9877
|
|
|
9886
|
-
var __defProp$
|
|
9887
|
-
var __getOwnPropDesc$
|
|
9888
|
-
var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$
|
|
9889
|
-
var __decorateClass$
|
|
9890
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
9878
|
+
var __defProp$k = Object.defineProperty;
|
|
9879
|
+
var __getOwnPropDesc$k = Object.getOwnPropertyDescriptor;
|
|
9880
|
+
var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9881
|
+
var __decorateClass$k = (decorators, target, key, kind) => {
|
|
9882
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$k(target, key) : target;
|
|
9891
9883
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
9892
9884
|
if (decorator = decorators[i])
|
|
9893
9885
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
9894
|
-
if (kind && result) __defProp$
|
|
9886
|
+
if (kind && result) __defProp$k(target, key, result);
|
|
9895
9887
|
return result;
|
|
9896
9888
|
};
|
|
9897
9889
|
var __publicField$d = (obj, key, value) => __defNormalProp$d(obj, key + "" , value);
|
|
@@ -9965,25 +9957,25 @@ void main(void) {
|
|
|
9965
9957
|
gl_FragColor = vec4(mix(color.rgb, mask.rgb, color.a * mask.a), color.a);
|
|
9966
9958
|
}`
|
|
9967
9959
|
}));
|
|
9968
|
-
__decorateClass$
|
|
9960
|
+
__decorateClass$k([
|
|
9969
9961
|
property()
|
|
9970
9962
|
], exports.ColorOverlayEffect.prototype, "colors", 2);
|
|
9971
|
-
__decorateClass$
|
|
9963
|
+
__decorateClass$k([
|
|
9972
9964
|
property()
|
|
9973
9965
|
], exports.ColorOverlayEffect.prototype, "alpha", 2);
|
|
9974
|
-
exports.ColorOverlayEffect = __decorateClass$
|
|
9966
|
+
exports.ColorOverlayEffect = __decorateClass$k([
|
|
9975
9967
|
customNode("ColorOverlayEffect")
|
|
9976
9968
|
], exports.ColorOverlayEffect);
|
|
9977
9969
|
|
|
9978
|
-
var __defProp$
|
|
9979
|
-
var __getOwnPropDesc$
|
|
9980
|
-
var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$
|
|
9981
|
-
var __decorateClass$
|
|
9982
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
9970
|
+
var __defProp$j = Object.defineProperty;
|
|
9971
|
+
var __getOwnPropDesc$j = Object.getOwnPropertyDescriptor;
|
|
9972
|
+
var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9973
|
+
var __decorateClass$j = (decorators, target, key, kind) => {
|
|
9974
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$j(target, key) : target;
|
|
9983
9975
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
9984
9976
|
if (decorator = decorators[i])
|
|
9985
9977
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
9986
|
-
if (kind && result) __defProp$
|
|
9978
|
+
if (kind && result) __defProp$j(target, key, result);
|
|
9987
9979
|
return result;
|
|
9988
9980
|
};
|
|
9989
9981
|
var __publicField$c = (obj, key, value) => __defNormalProp$c(obj, key + "" , value);
|
|
@@ -10048,25 +10040,25 @@ void main(void) {
|
|
|
10048
10040
|
gl_FragColor = color;
|
|
10049
10041
|
}`
|
|
10050
10042
|
}));
|
|
10051
|
-
__decorateClass$
|
|
10043
|
+
__decorateClass$j([
|
|
10052
10044
|
property()
|
|
10053
10045
|
], exports.ColorRemoveEffect.prototype, "colors", 2);
|
|
10054
|
-
__decorateClass$
|
|
10046
|
+
__decorateClass$j([
|
|
10055
10047
|
property()
|
|
10056
10048
|
], exports.ColorRemoveEffect.prototype, "epsilon", 2);
|
|
10057
|
-
exports.ColorRemoveEffect = __decorateClass$
|
|
10049
|
+
exports.ColorRemoveEffect = __decorateClass$j([
|
|
10058
10050
|
customNode("ColorRemoveEffect")
|
|
10059
10051
|
], exports.ColorRemoveEffect);
|
|
10060
10052
|
|
|
10061
|
-
var __defProp$
|
|
10062
|
-
var __getOwnPropDesc$
|
|
10063
|
-
var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$
|
|
10064
|
-
var __decorateClass$
|
|
10065
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
10053
|
+
var __defProp$i = Object.defineProperty;
|
|
10054
|
+
var __getOwnPropDesc$i = Object.getOwnPropertyDescriptor;
|
|
10055
|
+
var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10056
|
+
var __decorateClass$i = (decorators, target, key, kind) => {
|
|
10057
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$i(target, key) : target;
|
|
10066
10058
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
10067
10059
|
if (decorator = decorators[i])
|
|
10068
10060
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
10069
|
-
if (kind && result) __defProp$
|
|
10061
|
+
if (kind && result) __defProp$i(target, key, result);
|
|
10070
10062
|
return result;
|
|
10071
10063
|
};
|
|
10072
10064
|
var __publicField$b = (obj, key, value) => __defNormalProp$b(obj, key + "" , value);
|
|
@@ -10153,25 +10145,25 @@ void main(void) {
|
|
|
10153
10145
|
}
|
|
10154
10146
|
}`
|
|
10155
10147
|
}));
|
|
10156
|
-
__decorateClass$
|
|
10148
|
+
__decorateClass$i([
|
|
10157
10149
|
property()
|
|
10158
10150
|
], exports.ColorReplaceEffect.prototype, "colors", 2);
|
|
10159
|
-
__decorateClass$
|
|
10151
|
+
__decorateClass$i([
|
|
10160
10152
|
property()
|
|
10161
10153
|
], exports.ColorReplaceEffect.prototype, "epsilon", 2);
|
|
10162
|
-
exports.ColorReplaceEffect = __decorateClass$
|
|
10154
|
+
exports.ColorReplaceEffect = __decorateClass$i([
|
|
10163
10155
|
customNode("ColorReplaceEffect")
|
|
10164
10156
|
], exports.ColorReplaceEffect);
|
|
10165
10157
|
|
|
10166
|
-
var __defProp$
|
|
10167
|
-
var __getOwnPropDesc$
|
|
10168
|
-
var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$
|
|
10169
|
-
var __decorateClass$
|
|
10170
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
10158
|
+
var __defProp$h = Object.defineProperty;
|
|
10159
|
+
var __getOwnPropDesc$h = Object.getOwnPropertyDescriptor;
|
|
10160
|
+
var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10161
|
+
var __decorateClass$h = (decorators, target, key, kind) => {
|
|
10162
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$h(target, key) : target;
|
|
10171
10163
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
10172
10164
|
if (decorator = decorators[i])
|
|
10173
10165
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
10174
|
-
if (kind && result) __defProp$
|
|
10166
|
+
if (kind && result) __defProp$h(target, key, result);
|
|
10175
10167
|
return result;
|
|
10176
10168
|
};
|
|
10177
10169
|
var __publicField$a = (obj, key, value) => __defNormalProp$a(obj, key + "" , value);
|
|
@@ -10217,22 +10209,22 @@ void main(void) {
|
|
|
10217
10209
|
gl_FragColor = vec4(color.rgb * alpha, alpha);
|
|
10218
10210
|
}`
|
|
10219
10211
|
}));
|
|
10220
|
-
__decorateClass$
|
|
10212
|
+
__decorateClass$h([
|
|
10221
10213
|
property()
|
|
10222
10214
|
], exports.EmbossEffect.prototype, "strength", 2);
|
|
10223
|
-
exports.EmbossEffect = __decorateClass$
|
|
10215
|
+
exports.EmbossEffect = __decorateClass$h([
|
|
10224
10216
|
customNode("EmbossEffect")
|
|
10225
10217
|
], exports.EmbossEffect);
|
|
10226
10218
|
|
|
10227
|
-
var __defProp$
|
|
10228
|
-
var __getOwnPropDesc$
|
|
10229
|
-
var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$
|
|
10230
|
-
var __decorateClass$
|
|
10231
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
10219
|
+
var __defProp$g = Object.defineProperty;
|
|
10220
|
+
var __getOwnPropDesc$g = Object.getOwnPropertyDescriptor;
|
|
10221
|
+
var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10222
|
+
var __decorateClass$g = (decorators, target, key, kind) => {
|
|
10223
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$g(target, key) : target;
|
|
10232
10224
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
10233
10225
|
if (decorator = decorators[i])
|
|
10234
10226
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
10235
|
-
if (kind && result) __defProp$
|
|
10227
|
+
if (kind && result) __defProp$g(target, key, result);
|
|
10236
10228
|
return result;
|
|
10237
10229
|
};
|
|
10238
10230
|
var __publicField$9 = (obj, key, value) => __defNormalProp$9(obj, key + "" , value);
|
|
@@ -10414,46 +10406,46 @@ void main(void) {
|
|
|
10414
10406
|
gl_FragColor.a = texture2D(sampler, coord).a;
|
|
10415
10407
|
}`
|
|
10416
10408
|
}));
|
|
10417
|
-
__decorateClass$
|
|
10409
|
+
__decorateClass$g([
|
|
10418
10410
|
property()
|
|
10419
10411
|
], exports.GlitchEffect.prototype, "slices", 2);
|
|
10420
|
-
__decorateClass$
|
|
10412
|
+
__decorateClass$g([
|
|
10421
10413
|
property()
|
|
10422
10414
|
], exports.GlitchEffect.prototype, "sampleSize", 2);
|
|
10423
|
-
__decorateClass$
|
|
10415
|
+
__decorateClass$g([
|
|
10424
10416
|
property()
|
|
10425
10417
|
], exports.GlitchEffect.prototype, "offset", 2);
|
|
10426
|
-
__decorateClass$
|
|
10418
|
+
__decorateClass$g([
|
|
10427
10419
|
property()
|
|
10428
10420
|
], exports.GlitchEffect.prototype, "direction", 2);
|
|
10429
|
-
__decorateClass$
|
|
10421
|
+
__decorateClass$g([
|
|
10430
10422
|
property()
|
|
10431
10423
|
], exports.GlitchEffect.prototype, "fillMode", 2);
|
|
10432
|
-
__decorateClass$
|
|
10424
|
+
__decorateClass$g([
|
|
10433
10425
|
property()
|
|
10434
10426
|
], exports.GlitchEffect.prototype, "seed", 2);
|
|
10435
|
-
__decorateClass$
|
|
10427
|
+
__decorateClass$g([
|
|
10436
10428
|
property()
|
|
10437
10429
|
], exports.GlitchEffect.prototype, "red", 2);
|
|
10438
|
-
__decorateClass$
|
|
10430
|
+
__decorateClass$g([
|
|
10439
10431
|
property()
|
|
10440
10432
|
], exports.GlitchEffect.prototype, "green", 2);
|
|
10441
|
-
__decorateClass$
|
|
10433
|
+
__decorateClass$g([
|
|
10442
10434
|
property()
|
|
10443
10435
|
], exports.GlitchEffect.prototype, "blue", 2);
|
|
10444
|
-
exports.GlitchEffect = __decorateClass$
|
|
10436
|
+
exports.GlitchEffect = __decorateClass$g([
|
|
10445
10437
|
customNode("GlitchEffect")
|
|
10446
10438
|
], exports.GlitchEffect);
|
|
10447
10439
|
|
|
10448
|
-
var __defProp$
|
|
10449
|
-
var __getOwnPropDesc$
|
|
10450
|
-
var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$
|
|
10451
|
-
var __decorateClass$
|
|
10452
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
10440
|
+
var __defProp$f = Object.defineProperty;
|
|
10441
|
+
var __getOwnPropDesc$f = Object.getOwnPropertyDescriptor;
|
|
10442
|
+
var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10443
|
+
var __decorateClass$f = (decorators, target, key, kind) => {
|
|
10444
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$f(target, key) : target;
|
|
10453
10445
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
10454
10446
|
if (decorator = decorators[i])
|
|
10455
10447
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
10456
|
-
if (kind && result) __defProp$
|
|
10448
|
+
if (kind && result) __defProp$f(target, key, result);
|
|
10457
10449
|
return result;
|
|
10458
10450
|
};
|
|
10459
10451
|
var __publicField$8 = (obj, key, value) => __defNormalProp$8(obj, key + "" , value);
|
|
@@ -10615,37 +10607,37 @@ void main(void) {
|
|
|
10615
10607
|
gl_FragColor = vec4(color.rgb + mist.rgb, color.a);
|
|
10616
10608
|
}`
|
|
10617
10609
|
}));
|
|
10618
|
-
__decorateClass$
|
|
10610
|
+
__decorateClass$f([
|
|
10619
10611
|
property()
|
|
10620
10612
|
], exports.GodrayEffect.prototype, "angle", 2);
|
|
10621
|
-
__decorateClass$
|
|
10613
|
+
__decorateClass$f([
|
|
10622
10614
|
property()
|
|
10623
10615
|
], exports.GodrayEffect.prototype, "gain", 2);
|
|
10624
|
-
__decorateClass$
|
|
10616
|
+
__decorateClass$f([
|
|
10625
10617
|
property()
|
|
10626
10618
|
], exports.GodrayEffect.prototype, "lacunarity", 2);
|
|
10627
|
-
__decorateClass$
|
|
10619
|
+
__decorateClass$f([
|
|
10628
10620
|
property()
|
|
10629
10621
|
], exports.GodrayEffect.prototype, "parallel", 2);
|
|
10630
|
-
__decorateClass$
|
|
10622
|
+
__decorateClass$f([
|
|
10631
10623
|
property()
|
|
10632
10624
|
], exports.GodrayEffect.prototype, "center", 2);
|
|
10633
|
-
__decorateClass$
|
|
10625
|
+
__decorateClass$f([
|
|
10634
10626
|
property()
|
|
10635
10627
|
], exports.GodrayEffect.prototype, "alpha", 2);
|
|
10636
|
-
exports.GodrayEffect = __decorateClass$
|
|
10628
|
+
exports.GodrayEffect = __decorateClass$f([
|
|
10637
10629
|
customNode("GodrayEffect")
|
|
10638
10630
|
], exports.GodrayEffect);
|
|
10639
10631
|
|
|
10640
|
-
var __defProp$
|
|
10641
|
-
var __getOwnPropDesc$
|
|
10642
|
-
var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$
|
|
10643
|
-
var __decorateClass$
|
|
10644
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
10632
|
+
var __defProp$e = Object.defineProperty;
|
|
10633
|
+
var __getOwnPropDesc$e = Object.getOwnPropertyDescriptor;
|
|
10634
|
+
var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10635
|
+
var __decorateClass$e = (decorators, target, key, kind) => {
|
|
10636
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$e(target, key) : target;
|
|
10645
10637
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
10646
10638
|
if (decorator = decorators[i])
|
|
10647
10639
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
10648
|
-
if (kind && result) __defProp$
|
|
10640
|
+
if (kind && result) __defProp$e(target, key, result);
|
|
10649
10641
|
return result;
|
|
10650
10642
|
};
|
|
10651
10643
|
var __publicField$7 = (obj, key, value) => __defNormalProp$7(obj, key + "" , value);
|
|
@@ -10730,19 +10722,19 @@ void main(void) {
|
|
|
10730
10722
|
gl_FragColor = color;
|
|
10731
10723
|
}`
|
|
10732
10724
|
}));
|
|
10733
|
-
exports.KawaseEffect = __decorateClass$
|
|
10725
|
+
exports.KawaseEffect = __decorateClass$e([
|
|
10734
10726
|
customNode("KawaseEffect")
|
|
10735
10727
|
], exports.KawaseEffect);
|
|
10736
10728
|
|
|
10737
|
-
var __defProp$
|
|
10738
|
-
var __getOwnPropDesc$
|
|
10739
|
-
var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$
|
|
10740
|
-
var __decorateClass$
|
|
10741
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
10729
|
+
var __defProp$d = Object.defineProperty;
|
|
10730
|
+
var __getOwnPropDesc$d = Object.getOwnPropertyDescriptor;
|
|
10731
|
+
var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10732
|
+
var __decorateClass$d = (decorators, target, key, kind) => {
|
|
10733
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$d(target, key) : target;
|
|
10742
10734
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
10743
10735
|
if (decorator = decorators[i])
|
|
10744
10736
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
10745
|
-
if (kind && result) __defProp$
|
|
10737
|
+
if (kind && result) __defProp$d(target, key, result);
|
|
10746
10738
|
return result;
|
|
10747
10739
|
};
|
|
10748
10740
|
var __publicField$6 = (obj, key, value) => __defNormalProp$6(obj, key + "" , value);
|
|
@@ -10784,27 +10776,27 @@ void main() {
|
|
|
10784
10776
|
gl_FragColor = mix(src2Color, src1Color, mixPercent);
|
|
10785
10777
|
}`
|
|
10786
10778
|
}));
|
|
10787
|
-
exports.LeftEraseEffect = __decorateClass$
|
|
10779
|
+
exports.LeftEraseEffect = __decorateClass$d([
|
|
10788
10780
|
customNode("LeftEraseEffect")
|
|
10789
10781
|
], exports.LeftEraseEffect);
|
|
10790
10782
|
|
|
10791
|
-
var __defProp$
|
|
10792
|
-
var __getOwnPropDesc$
|
|
10793
|
-
var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$
|
|
10794
|
-
var __decorateClass$
|
|
10795
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
10783
|
+
var __defProp$c = Object.defineProperty;
|
|
10784
|
+
var __getOwnPropDesc$c = Object.getOwnPropertyDescriptor;
|
|
10785
|
+
var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10786
|
+
var __decorateClass$c = (decorators, target, key, kind) => {
|
|
10787
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$c(target, key) : target;
|
|
10796
10788
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
10797
10789
|
if (decorator = decorators[i])
|
|
10798
10790
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
10799
|
-
if (kind && result) __defProp$
|
|
10791
|
+
if (kind && result) __defProp$c(target, key, result);
|
|
10800
10792
|
return result;
|
|
10801
10793
|
};
|
|
10802
10794
|
var __publicField$5 = (obj, key, value) => __defNormalProp$5(obj, key + "" , value);
|
|
10803
10795
|
exports.MaskEffect = class MaskEffect extends exports.Effect {
|
|
10804
10796
|
texture;
|
|
10805
|
-
constructor(
|
|
10797
|
+
constructor(properties, children = []) {
|
|
10806
10798
|
super();
|
|
10807
|
-
this.setProperties(
|
|
10799
|
+
this.setProperties(properties).append(children);
|
|
10808
10800
|
}
|
|
10809
10801
|
async load() {
|
|
10810
10802
|
this.texture = undefined;
|
|
@@ -10870,25 +10862,25 @@ void main(void) {
|
|
|
10870
10862
|
}
|
|
10871
10863
|
}`
|
|
10872
10864
|
}));
|
|
10873
|
-
__decorateClass$
|
|
10865
|
+
__decorateClass$c([
|
|
10874
10866
|
protectedProperty()
|
|
10875
10867
|
], exports.MaskEffect.prototype, "texture", 2);
|
|
10876
|
-
__decorateClass$
|
|
10868
|
+
__decorateClass$c([
|
|
10877
10869
|
property({ default: "" })
|
|
10878
10870
|
], exports.MaskEffect.prototype, "src", 2);
|
|
10879
|
-
exports.MaskEffect = __decorateClass$
|
|
10871
|
+
exports.MaskEffect = __decorateClass$c([
|
|
10880
10872
|
customNode("MaskEffect")
|
|
10881
10873
|
], exports.MaskEffect);
|
|
10882
10874
|
|
|
10883
|
-
var __defProp$
|
|
10884
|
-
var __getOwnPropDesc$
|
|
10885
|
-
var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$
|
|
10886
|
-
var __decorateClass$
|
|
10887
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
10875
|
+
var __defProp$b = Object.defineProperty;
|
|
10876
|
+
var __getOwnPropDesc$b = Object.getOwnPropertyDescriptor;
|
|
10877
|
+
var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10878
|
+
var __decorateClass$b = (decorators, target, key, kind) => {
|
|
10879
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$b(target, key) : target;
|
|
10888
10880
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
10889
10881
|
if (decorator = decorators[i])
|
|
10890
10882
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
10891
|
-
if (kind && result) __defProp$
|
|
10883
|
+
if (kind && result) __defProp$b(target, key, result);
|
|
10892
10884
|
return result;
|
|
10893
10885
|
};
|
|
10894
10886
|
var __publicField$4 = (obj, key, value) => __defNormalProp$4(obj, key + "" , value);
|
|
@@ -10945,22 +10937,22 @@ void main(void) {
|
|
|
10945
10937
|
gl_FragColor = texture2D(sampler, coord);
|
|
10946
10938
|
}`
|
|
10947
10939
|
}));
|
|
10948
|
-
__decorateClass$
|
|
10940
|
+
__decorateClass$b([
|
|
10949
10941
|
property()
|
|
10950
10942
|
], exports.PixelateEffect.prototype, "size", 2);
|
|
10951
|
-
exports.PixelateEffect = __decorateClass$
|
|
10943
|
+
exports.PixelateEffect = __decorateClass$b([
|
|
10952
10944
|
customNode("PixelateEffect")
|
|
10953
10945
|
], exports.PixelateEffect);
|
|
10954
10946
|
|
|
10955
|
-
var __defProp$
|
|
10956
|
-
var __getOwnPropDesc$
|
|
10957
|
-
var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$
|
|
10958
|
-
var __decorateClass$
|
|
10959
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
10947
|
+
var __defProp$a = Object.defineProperty;
|
|
10948
|
+
var __getOwnPropDesc$a = Object.getOwnPropertyDescriptor;
|
|
10949
|
+
var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10950
|
+
var __decorateClass$a = (decorators, target, key, kind) => {
|
|
10951
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$a(target, key) : target;
|
|
10960
10952
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
10961
10953
|
if (decorator = decorators[i])
|
|
10962
10954
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
10963
|
-
if (kind && result) __defProp$
|
|
10955
|
+
if (kind && result) __defProp$a(target, key, result);
|
|
10964
10956
|
return result;
|
|
10965
10957
|
};
|
|
10966
10958
|
var __publicField$3 = (obj, key, value) => __defNormalProp$3(obj, key + "" , value);
|
|
@@ -11013,19 +11005,19 @@ void main(void) {
|
|
|
11013
11005
|
gl_FragColor = sample;
|
|
11014
11006
|
}`
|
|
11015
11007
|
}));
|
|
11016
|
-
exports.ShadowEffect = __decorateClass$
|
|
11008
|
+
exports.ShadowEffect = __decorateClass$a([
|
|
11017
11009
|
customNode("ShadowEffect")
|
|
11018
11010
|
], exports.ShadowEffect);
|
|
11019
11011
|
|
|
11020
|
-
var __defProp$
|
|
11021
|
-
var __getOwnPropDesc$
|
|
11022
|
-
var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$
|
|
11023
|
-
var __decorateClass$
|
|
11024
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
11012
|
+
var __defProp$9 = Object.defineProperty;
|
|
11013
|
+
var __getOwnPropDesc$9 = Object.getOwnPropertyDescriptor;
|
|
11014
|
+
var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
11015
|
+
var __decorateClass$9 = (decorators, target, key, kind) => {
|
|
11016
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$9(target, key) : target;
|
|
11025
11017
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
11026
11018
|
if (decorator = decorators[i])
|
|
11027
11019
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
11028
|
-
if (kind && result) __defProp$
|
|
11020
|
+
if (kind && result) __defProp$9(target, key, result);
|
|
11029
11021
|
return result;
|
|
11030
11022
|
};
|
|
11031
11023
|
var __publicField$2 = (obj, key, value) => __defNormalProp$2(obj, key + "" , value);
|
|
@@ -11121,19 +11113,19 @@ void main(void) {
|
|
|
11121
11113
|
gl_FragColor = color;
|
|
11122
11114
|
}`
|
|
11123
11115
|
}));
|
|
11124
|
-
exports.TiltShiftEffect = __decorateClass$
|
|
11116
|
+
exports.TiltShiftEffect = __decorateClass$9([
|
|
11125
11117
|
customNode("TiltShiftEffect")
|
|
11126
11118
|
], exports.TiltShiftEffect);
|
|
11127
11119
|
|
|
11128
|
-
var __defProp$
|
|
11129
|
-
var __getOwnPropDesc$
|
|
11130
|
-
var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$
|
|
11131
|
-
var __decorateClass$
|
|
11132
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
11120
|
+
var __defProp$8 = Object.defineProperty;
|
|
11121
|
+
var __getOwnPropDesc$8 = Object.getOwnPropertyDescriptor;
|
|
11122
|
+
var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
11123
|
+
var __decorateClass$8 = (decorators, target, key, kind) => {
|
|
11124
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$8(target, key) : target;
|
|
11133
11125
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
11134
11126
|
if (decorator = decorators[i])
|
|
11135
11127
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
11136
|
-
if (kind && result) __defProp$
|
|
11128
|
+
if (kind && result) __defProp$8(target, key, result);
|
|
11137
11129
|
return result;
|
|
11138
11130
|
};
|
|
11139
11131
|
var __publicField$1 = (obj, key, value) => __defNormalProp$1(obj, key + "" , value);
|
|
@@ -11216,19 +11208,19 @@ void main(void) {
|
|
|
11216
11208
|
gl_FragColor = texture2D(sampler, coord);
|
|
11217
11209
|
}`
|
|
11218
11210
|
}));
|
|
11219
|
-
exports.TwistEffect = __decorateClass$
|
|
11211
|
+
exports.TwistEffect = __decorateClass$8([
|
|
11220
11212
|
customNode("TwistEffect")
|
|
11221
11213
|
], exports.TwistEffect);
|
|
11222
11214
|
|
|
11223
|
-
var __defProp$
|
|
11224
|
-
var __getOwnPropDesc$
|
|
11225
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp$
|
|
11226
|
-
var __decorateClass$
|
|
11227
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
11215
|
+
var __defProp$7 = Object.defineProperty;
|
|
11216
|
+
var __getOwnPropDesc$7 = Object.getOwnPropertyDescriptor;
|
|
11217
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
11218
|
+
var __decorateClass$7 = (decorators, target, key, kind) => {
|
|
11219
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$7(target, key) : target;
|
|
11228
11220
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
11229
11221
|
if (decorator = decorators[i])
|
|
11230
11222
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
11231
|
-
if (kind && result) __defProp$
|
|
11223
|
+
if (kind && result) __defProp$7(target, key, result);
|
|
11232
11224
|
return result;
|
|
11233
11225
|
};
|
|
11234
11226
|
var __publicField = (obj, key, value) => __defNormalProp(obj, key + "" , value);
|
|
@@ -11334,42 +11326,69 @@ void main() {
|
|
|
11334
11326
|
gl_FragColor = color;
|
|
11335
11327
|
}`
|
|
11336
11328
|
}));
|
|
11337
|
-
__decorateClass$
|
|
11329
|
+
__decorateClass$7([
|
|
11338
11330
|
property()
|
|
11339
11331
|
], exports.ZoomBlurEffect.prototype, "center", 2);
|
|
11340
|
-
__decorateClass$
|
|
11332
|
+
__decorateClass$7([
|
|
11341
11333
|
property()
|
|
11342
11334
|
], exports.ZoomBlurEffect.prototype, "innerRadius", 2);
|
|
11343
|
-
__decorateClass$
|
|
11335
|
+
__decorateClass$7([
|
|
11344
11336
|
property()
|
|
11345
11337
|
], exports.ZoomBlurEffect.prototype, "radius", 2);
|
|
11346
|
-
__decorateClass$
|
|
11338
|
+
__decorateClass$7([
|
|
11347
11339
|
property()
|
|
11348
11340
|
], exports.ZoomBlurEffect.prototype, "strength", 2);
|
|
11349
|
-
exports.ZoomBlurEffect = __decorateClass$
|
|
11341
|
+
exports.ZoomBlurEffect = __decorateClass$7([
|
|
11350
11342
|
customNode("ZoomBlurEffect")
|
|
11351
11343
|
], exports.ZoomBlurEffect);
|
|
11352
11344
|
|
|
11353
|
-
var __defProp$
|
|
11354
|
-
var __getOwnPropDesc$
|
|
11355
|
-
var __decorateClass$
|
|
11356
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
11345
|
+
var __defProp$6 = Object.defineProperty;
|
|
11346
|
+
var __getOwnPropDesc$6 = Object.getOwnPropertyDescriptor;
|
|
11347
|
+
var __decorateClass$6 = (decorators, target, key, kind) => {
|
|
11348
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$6(target, key) : target;
|
|
11357
11349
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
11358
11350
|
if (decorator = decorators[i])
|
|
11359
11351
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
11360
|
-
if (kind && result) __defProp$
|
|
11352
|
+
if (kind && result) __defProp$6(target, key, result);
|
|
11361
11353
|
return result;
|
|
11362
11354
|
};
|
|
11363
11355
|
exports.Control = class Control extends exports.CanvasItem {
|
|
11364
11356
|
constructor(properties, children = []) {
|
|
11365
11357
|
super();
|
|
11358
|
+
this._parentUpdateRect = this._parentUpdateRect.bind(this);
|
|
11366
11359
|
this.setProperties(properties);
|
|
11367
11360
|
this.append(children);
|
|
11368
11361
|
}
|
|
11362
|
+
_parented(parent) {
|
|
11363
|
+
super._parented(parent);
|
|
11364
|
+
parent.on("updateRect", this._parentUpdateRect);
|
|
11365
|
+
}
|
|
11366
|
+
_unparented(oldParent) {
|
|
11367
|
+
super._unparented(oldParent);
|
|
11368
|
+
oldParent.off("updateRect", this._parentUpdateRect);
|
|
11369
|
+
}
|
|
11370
|
+
_parentUpdateRect() {
|
|
11371
|
+
const rect = this._parent.getRect();
|
|
11372
|
+
this.style.left = rect.left;
|
|
11373
|
+
this.style.top = rect.top;
|
|
11374
|
+
this.style.width = rect.width;
|
|
11375
|
+
this.style.height = rect.height;
|
|
11376
|
+
}
|
|
11369
11377
|
_input(event, key) {
|
|
11370
11378
|
super._input(event, key);
|
|
11371
11379
|
this._guiInput(event, key);
|
|
11372
11380
|
}
|
|
11381
|
+
_updateStyleProperty(key, value, oldValue, declaration) {
|
|
11382
|
+
super._updateStyleProperty(key, value, oldValue, declaration);
|
|
11383
|
+
switch (key) {
|
|
11384
|
+
case "width":
|
|
11385
|
+
case "height":
|
|
11386
|
+
case "left":
|
|
11387
|
+
case "top":
|
|
11388
|
+
this.emit("updateRect");
|
|
11389
|
+
break;
|
|
11390
|
+
}
|
|
11391
|
+
}
|
|
11373
11392
|
// eslint-disable-next-line unused-imports/no-unused-vars
|
|
11374
11393
|
_guiInput(event, key) {
|
|
11375
11394
|
}
|
|
@@ -11390,18 +11409,73 @@ exports.Control = class Control extends exports.CanvasItem {
|
|
|
11390
11409
|
return new Rect2(left, top, width, height);
|
|
11391
11410
|
}
|
|
11392
11411
|
};
|
|
11393
|
-
exports.Control = __decorateClass$
|
|
11412
|
+
exports.Control = __decorateClass$6([
|
|
11394
11413
|
customNode("Control")
|
|
11395
11414
|
], exports.Control);
|
|
11396
11415
|
|
|
11397
|
-
var __defProp$
|
|
11398
|
-
var __getOwnPropDesc$
|
|
11399
|
-
var __decorateClass$
|
|
11400
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
11416
|
+
var __defProp$5 = Object.defineProperty;
|
|
11417
|
+
var __getOwnPropDesc$5 = Object.getOwnPropertyDescriptor;
|
|
11418
|
+
var __decorateClass$5 = (decorators, target, key, kind) => {
|
|
11419
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$5(target, key) : target;
|
|
11401
11420
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
11402
11421
|
if (decorator = decorators[i])
|
|
11403
11422
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
11404
|
-
if (kind && result) __defProp$
|
|
11423
|
+
if (kind && result) __defProp$5(target, key, result);
|
|
11424
|
+
return result;
|
|
11425
|
+
};
|
|
11426
|
+
exports.Range = class Range extends exports.Control {
|
|
11427
|
+
constructor(properties, children = []) {
|
|
11428
|
+
super();
|
|
11429
|
+
this.setProperties(properties).append(children);
|
|
11430
|
+
}
|
|
11431
|
+
_updateProperty(key, value, oldValue, declaration) {
|
|
11432
|
+
super._updateProperty(key, value, oldValue, declaration);
|
|
11433
|
+
switch (key) {
|
|
11434
|
+
case "allowGreater":
|
|
11435
|
+
case "allowLesser":
|
|
11436
|
+
case "page":
|
|
11437
|
+
case "minValue":
|
|
11438
|
+
case "maxValue":
|
|
11439
|
+
case "step":
|
|
11440
|
+
case "value":
|
|
11441
|
+
this.requestRedraw();
|
|
11442
|
+
break;
|
|
11443
|
+
}
|
|
11444
|
+
}
|
|
11445
|
+
};
|
|
11446
|
+
__decorateClass$5([
|
|
11447
|
+
property({ default: false })
|
|
11448
|
+
], exports.Range.prototype, "allowGreater", 2);
|
|
11449
|
+
__decorateClass$5([
|
|
11450
|
+
property({ default: false })
|
|
11451
|
+
], exports.Range.prototype, "allowLesser", 2);
|
|
11452
|
+
__decorateClass$5([
|
|
11453
|
+
property({ default: 1 })
|
|
11454
|
+
], exports.Range.prototype, "page", 2);
|
|
11455
|
+
__decorateClass$5([
|
|
11456
|
+
property({ default: 0 })
|
|
11457
|
+
], exports.Range.prototype, "minValue", 2);
|
|
11458
|
+
__decorateClass$5([
|
|
11459
|
+
property({ default: 100 })
|
|
11460
|
+
], exports.Range.prototype, "maxValue", 2);
|
|
11461
|
+
__decorateClass$5([
|
|
11462
|
+
property({ default: 0.01 })
|
|
11463
|
+
], exports.Range.prototype, "step", 2);
|
|
11464
|
+
__decorateClass$5([
|
|
11465
|
+
property({ default: 0 })
|
|
11466
|
+
], exports.Range.prototype, "value", 2);
|
|
11467
|
+
exports.Range = __decorateClass$5([
|
|
11468
|
+
customNode("Range")
|
|
11469
|
+
], exports.Range);
|
|
11470
|
+
|
|
11471
|
+
var __defProp$4 = Object.defineProperty;
|
|
11472
|
+
var __getOwnPropDesc$4 = Object.getOwnPropertyDescriptor;
|
|
11473
|
+
var __decorateClass$4 = (decorators, target, key, kind) => {
|
|
11474
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$4(target, key) : target;
|
|
11475
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
11476
|
+
if (decorator = decorators[i])
|
|
11477
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
11478
|
+
if (kind && result) __defProp$4(target, key, result);
|
|
11405
11479
|
return result;
|
|
11406
11480
|
};
|
|
11407
11481
|
exports.Ruler = class Ruler extends exports.Control {
|
|
@@ -11414,7 +11488,6 @@ exports.Ruler = class Ruler extends exports.Control {
|
|
|
11414
11488
|
_updateProperty(key, value, oldValue, declaration) {
|
|
11415
11489
|
super._updateProperty(key, value, oldValue, declaration);
|
|
11416
11490
|
switch (key) {
|
|
11417
|
-
case "pixelRatio":
|
|
11418
11491
|
case "offsetX":
|
|
11419
11492
|
case "offsetY":
|
|
11420
11493
|
case "thickness":
|
|
@@ -11423,20 +11496,27 @@ exports.Ruler = class Ruler extends exports.Control {
|
|
|
11423
11496
|
case "markBackgroundColor":
|
|
11424
11497
|
case "markColor":
|
|
11425
11498
|
case "gap":
|
|
11499
|
+
case "scale":
|
|
11426
11500
|
this.requestRedraw();
|
|
11427
11501
|
break;
|
|
11428
11502
|
}
|
|
11429
11503
|
}
|
|
11430
|
-
|
|
11431
|
-
super.
|
|
11432
|
-
|
|
11504
|
+
_updateStyleProperty(key, value, oldValue, declaration) {
|
|
11505
|
+
super._updateStyleProperty(key, value, oldValue, declaration);
|
|
11506
|
+
switch (key) {
|
|
11507
|
+
case "width":
|
|
11508
|
+
case "height":
|
|
11509
|
+
this.texture[key] = value;
|
|
11510
|
+
this.requestRedraw();
|
|
11511
|
+
break;
|
|
11512
|
+
}
|
|
11433
11513
|
}
|
|
11434
11514
|
_drawTexture() {
|
|
11435
|
-
const { width, height } = this.size;
|
|
11436
|
-
this.style.width = width;
|
|
11437
|
-
this.style.height = height;
|
|
11438
11515
|
const {
|
|
11439
|
-
|
|
11516
|
+
width,
|
|
11517
|
+
height
|
|
11518
|
+
} = this.style;
|
|
11519
|
+
const {
|
|
11440
11520
|
offsetX,
|
|
11441
11521
|
offsetY,
|
|
11442
11522
|
thickness,
|
|
@@ -11444,14 +11524,13 @@ exports.Ruler = class Ruler extends exports.Control {
|
|
|
11444
11524
|
markBackgroundColor,
|
|
11445
11525
|
markColor,
|
|
11446
11526
|
color,
|
|
11447
|
-
gap: _gap
|
|
11527
|
+
gap: _gap,
|
|
11528
|
+
scale: _scale
|
|
11448
11529
|
} = this;
|
|
11449
|
-
const _scale = 1;
|
|
11450
11530
|
const canvas = this.texture.source;
|
|
11451
|
-
canvas.width = Math.max(1, Math.ceil(width * pixelRatio));
|
|
11452
|
-
canvas.height = Math.max(1, Math.ceil(height * pixelRatio));
|
|
11453
11531
|
const ctx = canvas.getContext("2d");
|
|
11454
|
-
ctx.
|
|
11532
|
+
ctx.reset();
|
|
11533
|
+
ctx.scale(this.texture.pixelRatio, this.texture.pixelRatio);
|
|
11455
11534
|
const x = Math.round(offsetX);
|
|
11456
11535
|
const y = Math.round(offsetY);
|
|
11457
11536
|
ctx.beginPath();
|
|
@@ -11533,7 +11612,7 @@ exports.Ruler = class Ruler extends exports.Control {
|
|
|
11533
11612
|
ctx.stroke();
|
|
11534
11613
|
this.texture.requestUpload();
|
|
11535
11614
|
}
|
|
11536
|
-
|
|
11615
|
+
_draw() {
|
|
11537
11616
|
this._drawTexture();
|
|
11538
11617
|
const texture = this.texture;
|
|
11539
11618
|
if (texture?.valid) {
|
|
@@ -11542,41 +11621,120 @@ exports.Ruler = class Ruler extends exports.Control {
|
|
|
11542
11621
|
this.style.width / texture.width,
|
|
11543
11622
|
this.style.height / texture.height
|
|
11544
11623
|
);
|
|
11545
|
-
|
|
11624
|
+
this.context.rect(0, 0, texture.width, texture.height);
|
|
11625
|
+
this.context.fill();
|
|
11546
11626
|
}
|
|
11547
11627
|
}
|
|
11548
11628
|
};
|
|
11549
|
-
__decorateClass$
|
|
11550
|
-
property({ default: 2 })
|
|
11551
|
-
], exports.Ruler.prototype, "pixelRatio", 2);
|
|
11552
|
-
__decorateClass$2([
|
|
11629
|
+
__decorateClass$4([
|
|
11553
11630
|
property({ default: 0 })
|
|
11554
11631
|
], exports.Ruler.prototype, "offsetX", 2);
|
|
11555
|
-
__decorateClass$
|
|
11632
|
+
__decorateClass$4([
|
|
11556
11633
|
property({ default: 0 })
|
|
11557
11634
|
], exports.Ruler.prototype, "offsetY", 2);
|
|
11558
|
-
__decorateClass$
|
|
11635
|
+
__decorateClass$4([
|
|
11559
11636
|
property({ default: 20 })
|
|
11560
11637
|
], exports.Ruler.prototype, "thickness", 2);
|
|
11561
|
-
__decorateClass$
|
|
11638
|
+
__decorateClass$4([
|
|
11562
11639
|
property({ default: 3 })
|
|
11563
11640
|
], exports.Ruler.prototype, "markHeight", 2);
|
|
11564
|
-
__decorateClass$
|
|
11641
|
+
__decorateClass$4([
|
|
11565
11642
|
property({ default: "#b2b6bc" })
|
|
11566
11643
|
], exports.Ruler.prototype, "color", 2);
|
|
11567
|
-
__decorateClass$
|
|
11644
|
+
__decorateClass$4([
|
|
11568
11645
|
property({ default: "#f9f9fa" })
|
|
11569
11646
|
], exports.Ruler.prototype, "markBackgroundColor", 2);
|
|
11570
|
-
__decorateClass$
|
|
11647
|
+
__decorateClass$4([
|
|
11571
11648
|
property({ default: "#b2b6bc" })
|
|
11572
11649
|
], exports.Ruler.prototype, "markColor", 2);
|
|
11573
|
-
__decorateClass$
|
|
11650
|
+
__decorateClass$4([
|
|
11574
11651
|
property({ default: 300 })
|
|
11575
11652
|
], exports.Ruler.prototype, "gap", 2);
|
|
11576
|
-
|
|
11653
|
+
__decorateClass$4([
|
|
11654
|
+
property({ default: 1 })
|
|
11655
|
+
], exports.Ruler.prototype, "scale", 2);
|
|
11656
|
+
exports.Ruler = __decorateClass$4([
|
|
11577
11657
|
customNode("Ruler")
|
|
11578
11658
|
], exports.Ruler);
|
|
11579
11659
|
|
|
11660
|
+
var __defProp$3 = Object.defineProperty;
|
|
11661
|
+
var __getOwnPropDesc$3 = Object.getOwnPropertyDescriptor;
|
|
11662
|
+
var __decorateClass$3 = (decorators, target, key, kind) => {
|
|
11663
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$3(target, key) : target;
|
|
11664
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
11665
|
+
if (decorator = decorators[i])
|
|
11666
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
11667
|
+
if (kind && result) __defProp$3(target, key, result);
|
|
11668
|
+
return result;
|
|
11669
|
+
};
|
|
11670
|
+
exports.ScrollBar = class ScrollBar extends exports.Range {
|
|
11671
|
+
constructor(properties, children = []) {
|
|
11672
|
+
super();
|
|
11673
|
+
this.setProperties(properties).append(children);
|
|
11674
|
+
}
|
|
11675
|
+
_updateStyleProperty(key, value, oldValue, declaration) {
|
|
11676
|
+
super._updateStyleProperty(key, value, oldValue, declaration);
|
|
11677
|
+
switch (key) {
|
|
11678
|
+
case "width":
|
|
11679
|
+
case "height":
|
|
11680
|
+
case "left":
|
|
11681
|
+
case "top":
|
|
11682
|
+
this.requestRedraw();
|
|
11683
|
+
break;
|
|
11684
|
+
}
|
|
11685
|
+
}
|
|
11686
|
+
_guiInput(event, key) {
|
|
11687
|
+
super._guiInput(event, key);
|
|
11688
|
+
}
|
|
11689
|
+
_draw() {
|
|
11690
|
+
let left, top, width, height, radii;
|
|
11691
|
+
if (this.direction === "vertical") {
|
|
11692
|
+
width = 10;
|
|
11693
|
+
height = this.style.height * (this.page / (this.maxValue - this.minValue));
|
|
11694
|
+
left = this.style.left + this.style.width - width;
|
|
11695
|
+
top = this.style.height * (this.value / (this.maxValue - this.minValue));
|
|
11696
|
+
radii = width / 2;
|
|
11697
|
+
} else {
|
|
11698
|
+
width = this.style.width * (this.page / (this.maxValue - this.minValue));
|
|
11699
|
+
height = 10;
|
|
11700
|
+
left = this.style.width * (this.value / (this.maxValue - this.minValue));
|
|
11701
|
+
top = this.style.top + this.style.height - height;
|
|
11702
|
+
radii = height / 2;
|
|
11703
|
+
}
|
|
11704
|
+
this.context.roundRect(left, top, width, height, radii);
|
|
11705
|
+
this.context.fillStyle = 34;
|
|
11706
|
+
this.context.fill();
|
|
11707
|
+
}
|
|
11708
|
+
};
|
|
11709
|
+
__decorateClass$3([
|
|
11710
|
+
property({ default: "vertical" })
|
|
11711
|
+
], exports.ScrollBar.prototype, "direction", 2);
|
|
11712
|
+
exports.ScrollBar = __decorateClass$3([
|
|
11713
|
+
customNode("ScrollBar")
|
|
11714
|
+
], exports.ScrollBar);
|
|
11715
|
+
|
|
11716
|
+
var __defProp$2 = Object.defineProperty;
|
|
11717
|
+
var __getOwnPropDesc$2 = Object.getOwnPropertyDescriptor;
|
|
11718
|
+
var __decorateClass$2 = (decorators, target, key, kind) => {
|
|
11719
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$2(target, key) : target;
|
|
11720
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
11721
|
+
if (decorator = decorators[i])
|
|
11722
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
11723
|
+
if (kind && result) __defProp$2(target, key, result);
|
|
11724
|
+
return result;
|
|
11725
|
+
};
|
|
11726
|
+
exports.XScrollBar = class XScrollBar extends exports.ScrollBar {
|
|
11727
|
+
constructor(properties, children = []) {
|
|
11728
|
+
super();
|
|
11729
|
+
this.setProperties(properties).append(children);
|
|
11730
|
+
}
|
|
11731
|
+
};
|
|
11732
|
+
exports.XScrollBar = __decorateClass$2([
|
|
11733
|
+
customNode("XScrollBar", {
|
|
11734
|
+
direction: "horizontal"
|
|
11735
|
+
})
|
|
11736
|
+
], exports.XScrollBar);
|
|
11737
|
+
|
|
11580
11738
|
var __defProp$1 = Object.defineProperty;
|
|
11581
11739
|
var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor;
|
|
11582
11740
|
var __decorateClass$1 = (decorators, target, key, kind) => {
|
|
@@ -11587,12 +11745,17 @@ var __decorateClass$1 = (decorators, target, key, kind) => {
|
|
|
11587
11745
|
if (kind && result) __defProp$1(target, key, result);
|
|
11588
11746
|
return result;
|
|
11589
11747
|
};
|
|
11590
|
-
exports.
|
|
11591
|
-
|
|
11748
|
+
exports.YScrollBar = class YScrollBar extends exports.ScrollBar {
|
|
11749
|
+
constructor(properties, children = []) {
|
|
11750
|
+
super();
|
|
11751
|
+
this.setProperties(properties).append(children);
|
|
11752
|
+
}
|
|
11592
11753
|
};
|
|
11593
|
-
exports.
|
|
11594
|
-
customNode("
|
|
11595
|
-
|
|
11754
|
+
exports.YScrollBar = __decorateClass$1([
|
|
11755
|
+
customNode("YScrollBar", {
|
|
11756
|
+
direction: "vertical"
|
|
11757
|
+
})
|
|
11758
|
+
], exports.YScrollBar);
|
|
11596
11759
|
|
|
11597
11760
|
var __defProp = Object.defineProperty;
|
|
11598
11761
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -11619,10 +11782,10 @@ exports.Scaler = class Scaler extends exports.Node {
|
|
|
11619
11782
|
_updateProperty(key, value, oldValue, declaration) {
|
|
11620
11783
|
super._updateProperty(key, value, oldValue, declaration);
|
|
11621
11784
|
switch (key) {
|
|
11622
|
-
case "
|
|
11785
|
+
case "value":
|
|
11623
11786
|
case "min":
|
|
11624
11787
|
case "max": {
|
|
11625
|
-
this.
|
|
11788
|
+
this.value = clamp(this.minValue, this.value, this.maxValue);
|
|
11626
11789
|
this._updateScale();
|
|
11627
11790
|
break;
|
|
11628
11791
|
}
|
|
@@ -11631,9 +11794,9 @@ exports.Scaler = class Scaler extends exports.Node {
|
|
|
11631
11794
|
_updateScale() {
|
|
11632
11795
|
const target = this.target;
|
|
11633
11796
|
if (target) {
|
|
11634
|
-
target.style.scaleX = this.
|
|
11635
|
-
target.style.scaleY = this.
|
|
11636
|
-
this.emit("updateScale", this.
|
|
11797
|
+
target.style.scaleX = this.value;
|
|
11798
|
+
target.style.scaleY = this.value;
|
|
11799
|
+
this.emit("updateScale", this.value);
|
|
11637
11800
|
}
|
|
11638
11801
|
}
|
|
11639
11802
|
_onWheel(e) {
|
|
@@ -11646,7 +11809,7 @@ exports.Scaler = class Scaler extends exports.Node {
|
|
|
11646
11809
|
e.preventDefault();
|
|
11647
11810
|
let distance = e.deltaY / (e.ctrlKey ? 1 : 100);
|
|
11648
11811
|
distance *= -0.015;
|
|
11649
|
-
this.
|
|
11812
|
+
this.value += distance;
|
|
11650
11813
|
}
|
|
11651
11814
|
}
|
|
11652
11815
|
_input(event, key) {
|
|
@@ -11660,13 +11823,13 @@ exports.Scaler = class Scaler extends exports.Node {
|
|
|
11660
11823
|
};
|
|
11661
11824
|
__decorateClass([
|
|
11662
11825
|
property({ default: 1 })
|
|
11663
|
-
], exports.Scaler.prototype, "
|
|
11826
|
+
], exports.Scaler.prototype, "value", 2);
|
|
11664
11827
|
__decorateClass([
|
|
11665
11828
|
property({ default: 0.05 })
|
|
11666
|
-
], exports.Scaler.prototype, "
|
|
11829
|
+
], exports.Scaler.prototype, "minValue", 2);
|
|
11667
11830
|
__decorateClass([
|
|
11668
11831
|
property({ default: 10 })
|
|
11669
|
-
], exports.Scaler.prototype, "
|
|
11832
|
+
], exports.Scaler.prototype, "maxValue", 2);
|
|
11670
11833
|
exports.Scaler = __decorateClass([
|
|
11671
11834
|
customNode("Scaler", {
|
|
11672
11835
|
processMode: "disabled",
|
|
@@ -12008,7 +12171,7 @@ class Assets {
|
|
|
12008
12171
|
}
|
|
12009
12172
|
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());
|
|
12010
12173
|
|
|
12011
|
-
class CanvasEditor extends exports.
|
|
12174
|
+
class CanvasEditor extends exports.Control {
|
|
12012
12175
|
name = "CanvasEditor";
|
|
12013
12176
|
hover = new exports.Node2D({
|
|
12014
12177
|
name: "hover",
|
|
@@ -12041,36 +12204,55 @@ class CanvasEditor extends exports.CanvasItem {
|
|
|
12041
12204
|
scaler = new exports.Scaler({
|
|
12042
12205
|
internalMode: "back"
|
|
12043
12206
|
}).on("updateScale", (scale) => {
|
|
12044
|
-
this.ruler.
|
|
12207
|
+
this.ruler.scale = scale;
|
|
12208
|
+
const scrollHeight = this.drawboard.style.height * scale;
|
|
12209
|
+
const scrollWidth = this.drawboard.style.width * scale;
|
|
12210
|
+
if (scrollHeight > this.style.height) {
|
|
12211
|
+
this.yScrollBar.style.visibility = "visible";
|
|
12212
|
+
this.yScrollBar.maxValue = scrollHeight;
|
|
12213
|
+
this.yScrollBar.page = this.style.height;
|
|
12214
|
+
} else {
|
|
12215
|
+
this.yScrollBar.style.visibility = "hidden";
|
|
12216
|
+
}
|
|
12217
|
+
if (scrollWidth > this.style.width) {
|
|
12218
|
+
this.xScrollBar.style.visibility = "visible";
|
|
12219
|
+
this.xScrollBar.maxValue = scrollWidth;
|
|
12220
|
+
this.xScrollBar.page = this.style.width;
|
|
12221
|
+
} else {
|
|
12222
|
+
this.xScrollBar.style.visibility = "hidden";
|
|
12223
|
+
}
|
|
12045
12224
|
});
|
|
12046
|
-
xScrollBar = new exports.
|
|
12047
|
-
internalMode: "back"
|
|
12225
|
+
xScrollBar = new exports.XScrollBar({
|
|
12226
|
+
internalMode: "back",
|
|
12227
|
+
style: {
|
|
12228
|
+
visibility: "hidden"
|
|
12229
|
+
}
|
|
12048
12230
|
});
|
|
12049
|
-
yScrollBar = new exports.
|
|
12050
|
-
internalMode: "back"
|
|
12231
|
+
yScrollBar = new exports.YScrollBar({
|
|
12232
|
+
internalMode: "back",
|
|
12233
|
+
style: {
|
|
12234
|
+
visibility: "hidden"
|
|
12235
|
+
}
|
|
12051
12236
|
});
|
|
12052
12237
|
drawboard = new exports.Node2D({
|
|
12053
12238
|
name: "drawboard",
|
|
12054
12239
|
style: {
|
|
12055
|
-
left: 100,
|
|
12056
|
-
top: 100,
|
|
12057
12240
|
width: 500,
|
|
12058
12241
|
height: 500,
|
|
12059
12242
|
backgroundColor: 4294967295,
|
|
12060
12243
|
overflow: "hidden",
|
|
12061
|
-
|
|
12062
|
-
borderWidth: 2,
|
|
12063
|
-
pointerEvents: "none",
|
|
12064
|
-
transformOrigin: "left top"
|
|
12244
|
+
pointerEvents: "none"
|
|
12065
12245
|
}
|
|
12066
12246
|
}).append(
|
|
12067
|
-
this.scaler
|
|
12247
|
+
this.scaler,
|
|
12248
|
+
new exports.ShadowEffect({
|
|
12249
|
+
internalMode: "back"
|
|
12250
|
+
})
|
|
12068
12251
|
);
|
|
12069
12252
|
ruler = new exports.Ruler({
|
|
12070
12253
|
name: "ruler",
|
|
12071
12254
|
offsetX: 100,
|
|
12072
|
-
offsetY: 100
|
|
12073
|
-
inheritSize: true
|
|
12255
|
+
offsetY: 100
|
|
12074
12256
|
}).append(
|
|
12075
12257
|
this.drawboard,
|
|
12076
12258
|
this.hover,
|
|
@@ -12087,10 +12269,22 @@ class CanvasEditor extends exports.CanvasItem {
|
|
|
12087
12269
|
this._onPointermove = this._onPointermove.bind(this);
|
|
12088
12270
|
this._onPointerup = this._onPointerup.bind(this);
|
|
12089
12271
|
this.append(this.ruler);
|
|
12090
|
-
this.inheritSize = true;
|
|
12091
12272
|
}
|
|
12092
|
-
|
|
12093
|
-
super.
|
|
12273
|
+
_updateStyleProperty(key, value, oldValue, declaration) {
|
|
12274
|
+
super._updateStyleProperty(key, value, oldValue, declaration);
|
|
12275
|
+
switch (key) {
|
|
12276
|
+
case "width":
|
|
12277
|
+
this.drawboard.style.left = (this.style.width - this.drawboard.style.width) / 2;
|
|
12278
|
+
this.ruler.offsetX = this.drawboard.style.left;
|
|
12279
|
+
break;
|
|
12280
|
+
case "height":
|
|
12281
|
+
this.drawboard.style.top = (this.style.height - this.drawboard.style.height) / 2;
|
|
12282
|
+
this.ruler.offsetY = this.drawboard.style.top;
|
|
12283
|
+
break;
|
|
12284
|
+
}
|
|
12285
|
+
}
|
|
12286
|
+
_guiInput(event, key) {
|
|
12287
|
+
super._guiInput(event, key);
|
|
12094
12288
|
switch (key) {
|
|
12095
12289
|
case "pointerdown":
|
|
12096
12290
|
this._onPointerdown(event);
|