modern-canvas 0.2.5 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/index.cjs +1575 -568
- package/dist/index.d.cts +229 -14
- package/dist/index.d.mts +229 -14
- package/dist/index.d.ts +229 -14
- package/dist/index.js +40 -39
- package/dist/index.mjs +1574 -568
- package/package.json +13 -12
package/dist/index.mjs
CHANGED
|
@@ -3,6 +3,7 @@ import namesPlugin from 'colord/plugins/names';
|
|
|
3
3
|
import { Path2D, CurvePath } from 'modern-path2d';
|
|
4
4
|
import { getDefaultTransformStyle, getDefaultTextStyle } from 'modern-idoc';
|
|
5
5
|
import { textDefaultStyle, Text } from 'modern-text';
|
|
6
|
+
import { Align, Display, Direction, FlexDirection, Wrap, Justify, Overflow, PositionType, BoxSizing, loadYoga, Edge, Gutter } from 'yoga-layout/load';
|
|
6
7
|
|
|
7
8
|
const PI = Math.PI;
|
|
8
9
|
const PI_2 = PI * 2;
|
|
@@ -477,12 +478,12 @@ class CoreObject extends EventEmitter {
|
|
|
477
478
|
_performUpdate() {
|
|
478
479
|
if (!this._updating)
|
|
479
480
|
return;
|
|
480
|
-
this.
|
|
481
|
+
this._update(this._updatedProperties);
|
|
481
482
|
this._updatedProperties = /* @__PURE__ */ new Map();
|
|
482
483
|
this._updating = false;
|
|
483
484
|
}
|
|
484
485
|
// eslint-disable-next-line unused-imports/no-unused-vars
|
|
485
|
-
|
|
486
|
+
_update(changed) {
|
|
486
487
|
}
|
|
487
488
|
// eslint-disable-next-line unused-imports/no-unused-vars
|
|
488
489
|
_updateProperty(key, value, oldValue, declaration) {
|
|
@@ -2198,13 +2199,13 @@ class Vector3 extends Vector {
|
|
|
2198
2199
|
}
|
|
2199
2200
|
}
|
|
2200
2201
|
|
|
2201
|
-
var __defProp$
|
|
2202
|
-
var __decorateClass$
|
|
2202
|
+
var __defProp$O = Object.defineProperty;
|
|
2203
|
+
var __decorateClass$O = (decorators, target, key, kind) => {
|
|
2203
2204
|
var result = undefined ;
|
|
2204
2205
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
2205
2206
|
if (decorator = decorators[i])
|
|
2206
2207
|
result = (decorator(target, key, result) ) || result;
|
|
2207
|
-
if (result) __defProp$
|
|
2208
|
+
if (result) __defProp$O(target, key, result);
|
|
2208
2209
|
return result;
|
|
2209
2210
|
};
|
|
2210
2211
|
class MainLoop extends CoreObject {
|
|
@@ -2245,10 +2246,10 @@ class MainLoop extends CoreObject {
|
|
|
2245
2246
|
}
|
|
2246
2247
|
}
|
|
2247
2248
|
}
|
|
2248
|
-
__decorateClass$
|
|
2249
|
+
__decorateClass$O([
|
|
2249
2250
|
property({ default: 24 })
|
|
2250
2251
|
], MainLoop.prototype, "fps");
|
|
2251
|
-
__decorateClass$
|
|
2252
|
+
__decorateClass$O([
|
|
2252
2253
|
property({ default: 1 })
|
|
2253
2254
|
], MainLoop.prototype, "speed");
|
|
2254
2255
|
|
|
@@ -4392,13 +4393,13 @@ class Geometry extends Resource {
|
|
|
4392
4393
|
}
|
|
4393
4394
|
}
|
|
4394
4395
|
|
|
4395
|
-
var __defProp$
|
|
4396
|
-
var __decorateClass$
|
|
4396
|
+
var __defProp$N = Object.defineProperty;
|
|
4397
|
+
var __decorateClass$N = (decorators, target, key, kind) => {
|
|
4397
4398
|
var result = undefined ;
|
|
4398
4399
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
4399
4400
|
if (decorator = decorators[i])
|
|
4400
4401
|
result = (decorator(target, key, result) ) || result;
|
|
4401
|
-
if (result) __defProp$
|
|
4402
|
+
if (result) __defProp$N(target, key, result);
|
|
4402
4403
|
return result;
|
|
4403
4404
|
};
|
|
4404
4405
|
class IndexBuffer extends Resource {
|
|
@@ -4442,20 +4443,20 @@ class IndexBuffer extends Resource {
|
|
|
4442
4443
|
return result;
|
|
4443
4444
|
}
|
|
4444
4445
|
}
|
|
4445
|
-
__decorateClass$
|
|
4446
|
+
__decorateClass$N([
|
|
4446
4447
|
protectedProperty({ default: null })
|
|
4447
4448
|
], IndexBuffer.prototype, "data");
|
|
4448
|
-
__decorateClass$
|
|
4449
|
+
__decorateClass$N([
|
|
4449
4450
|
protectedProperty({ default: false })
|
|
4450
4451
|
], IndexBuffer.prototype, "dynamic");
|
|
4451
4452
|
|
|
4452
|
-
var __defProp$
|
|
4453
|
-
var __decorateClass$
|
|
4453
|
+
var __defProp$M = Object.defineProperty;
|
|
4454
|
+
var __decorateClass$M = (decorators, target, key, kind) => {
|
|
4454
4455
|
var result = undefined ;
|
|
4455
4456
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
4456
4457
|
if (decorator = decorators[i])
|
|
4457
4458
|
result = (decorator(target, key, result) ) || result;
|
|
4458
|
-
if (result) __defProp$
|
|
4459
|
+
if (result) __defProp$M(target, key, result);
|
|
4459
4460
|
return result;
|
|
4460
4461
|
};
|
|
4461
4462
|
class VertexBuffer extends Resource {
|
|
@@ -4499,20 +4500,20 @@ class VertexBuffer extends Resource {
|
|
|
4499
4500
|
return result;
|
|
4500
4501
|
}
|
|
4501
4502
|
}
|
|
4502
|
-
__decorateClass$
|
|
4503
|
+
__decorateClass$M([
|
|
4503
4504
|
protectedProperty({ default: null })
|
|
4504
4505
|
], VertexBuffer.prototype, "data");
|
|
4505
|
-
__decorateClass$
|
|
4506
|
+
__decorateClass$M([
|
|
4506
4507
|
protectedProperty({ default: false })
|
|
4507
4508
|
], VertexBuffer.prototype, "dynamic");
|
|
4508
4509
|
|
|
4509
|
-
var __defProp$
|
|
4510
|
-
var __decorateClass$
|
|
4510
|
+
var __defProp$L = Object.defineProperty;
|
|
4511
|
+
var __decorateClass$L = (decorators, target, key, kind) => {
|
|
4511
4512
|
var result = undefined ;
|
|
4512
4513
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
4513
4514
|
if (decorator = decorators[i])
|
|
4514
4515
|
result = (decorator(target, key, result) ) || result;
|
|
4515
|
-
if (result) __defProp$
|
|
4516
|
+
if (result) __defProp$L(target, key, result);
|
|
4516
4517
|
return result;
|
|
4517
4518
|
};
|
|
4518
4519
|
class VertexAttribute extends Resource {
|
|
@@ -4549,25 +4550,25 @@ class VertexAttribute extends Resource {
|
|
|
4549
4550
|
return result;
|
|
4550
4551
|
}
|
|
4551
4552
|
}
|
|
4552
|
-
__decorateClass$
|
|
4553
|
+
__decorateClass$L([
|
|
4553
4554
|
protectedProperty()
|
|
4554
4555
|
], VertexAttribute.prototype, "buffer");
|
|
4555
|
-
__decorateClass$
|
|
4556
|
+
__decorateClass$L([
|
|
4556
4557
|
protectedProperty({ default: 0 })
|
|
4557
4558
|
], VertexAttribute.prototype, "size");
|
|
4558
|
-
__decorateClass$
|
|
4559
|
+
__decorateClass$L([
|
|
4559
4560
|
protectedProperty({ default: false })
|
|
4560
4561
|
], VertexAttribute.prototype, "normalized");
|
|
4561
|
-
__decorateClass$
|
|
4562
|
+
__decorateClass$L([
|
|
4562
4563
|
protectedProperty({ default: "float" })
|
|
4563
4564
|
], VertexAttribute.prototype, "type");
|
|
4564
|
-
__decorateClass$
|
|
4565
|
+
__decorateClass$L([
|
|
4565
4566
|
protectedProperty()
|
|
4566
4567
|
], VertexAttribute.prototype, "stride");
|
|
4567
|
-
__decorateClass$
|
|
4568
|
+
__decorateClass$L([
|
|
4568
4569
|
protectedProperty()
|
|
4569
4570
|
], VertexAttribute.prototype, "offset");
|
|
4570
|
-
__decorateClass$
|
|
4571
|
+
__decorateClass$L([
|
|
4571
4572
|
protectedProperty()
|
|
4572
4573
|
], VertexAttribute.prototype, "divisor");
|
|
4573
4574
|
|
|
@@ -4817,13 +4818,13 @@ class UvGeometry extends Geometry {
|
|
|
4817
4818
|
}
|
|
4818
4819
|
}
|
|
4819
4820
|
|
|
4820
|
-
var __defProp$
|
|
4821
|
-
var __decorateClass$
|
|
4821
|
+
var __defProp$K = Object.defineProperty;
|
|
4822
|
+
var __decorateClass$K = (decorators, target, key, kind) => {
|
|
4822
4823
|
var result = undefined ;
|
|
4823
4824
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
4824
4825
|
if (decorator = decorators[i])
|
|
4825
4826
|
result = (decorator(target, key, result) ) || result;
|
|
4826
|
-
if (result) __defProp$
|
|
4827
|
+
if (result) __defProp$K(target, key, result);
|
|
4827
4828
|
return result;
|
|
4828
4829
|
};
|
|
4829
4830
|
const style2DFilterDefault = {
|
|
@@ -5040,76 +5041,76 @@ class CanvasItemStyle extends Resource {
|
|
|
5040
5041
|
return m;
|
|
5041
5042
|
}
|
|
5042
5043
|
}
|
|
5043
|
-
__decorateClass$
|
|
5044
|
+
__decorateClass$K([
|
|
5044
5045
|
property({ default: "none" })
|
|
5045
5046
|
], CanvasItemStyle.prototype, "backgroundColor");
|
|
5046
|
-
__decorateClass$
|
|
5047
|
+
__decorateClass$K([
|
|
5047
5048
|
property({ default: "none" })
|
|
5048
5049
|
], CanvasItemStyle.prototype, "backgroundImage");
|
|
5049
|
-
__decorateClass$
|
|
5050
|
+
__decorateClass$K([
|
|
5050
5051
|
property({ default: "none" })
|
|
5051
5052
|
], CanvasItemStyle.prototype, "filter");
|
|
5052
|
-
__decorateClass$
|
|
5053
|
+
__decorateClass$K([
|
|
5053
5054
|
property({ default: "inherit" })
|
|
5054
5055
|
], CanvasItemStyle.prototype, "direction");
|
|
5055
|
-
__decorateClass$
|
|
5056
|
+
__decorateClass$K([
|
|
5056
5057
|
property({ default: "none" })
|
|
5057
5058
|
], CanvasItemStyle.prototype, "boxShadow");
|
|
5058
|
-
__decorateClass$
|
|
5059
|
+
__decorateClass$K([
|
|
5059
5060
|
property({ default: "none" })
|
|
5060
5061
|
], CanvasItemStyle.prototype, "maskImage");
|
|
5061
|
-
__decorateClass$
|
|
5062
|
+
__decorateClass$K([
|
|
5062
5063
|
property({ default: 1 })
|
|
5063
5064
|
], CanvasItemStyle.prototype, "opacity");
|
|
5064
|
-
__decorateClass$
|
|
5065
|
+
__decorateClass$K([
|
|
5065
5066
|
property({ default: 0 })
|
|
5066
5067
|
], CanvasItemStyle.prototype, "borderWidth");
|
|
5067
|
-
__decorateClass$
|
|
5068
|
+
__decorateClass$K([
|
|
5068
5069
|
property({ default: 0 })
|
|
5069
5070
|
], CanvasItemStyle.prototype, "borderRadius");
|
|
5070
|
-
__decorateClass$
|
|
5071
|
+
__decorateClass$K([
|
|
5071
5072
|
property({ default: "#000000" })
|
|
5072
5073
|
], CanvasItemStyle.prototype, "borderColor");
|
|
5073
|
-
__decorateClass$
|
|
5074
|
+
__decorateClass$K([
|
|
5074
5075
|
property({ default: "none" })
|
|
5075
5076
|
], CanvasItemStyle.prototype, "borderStyle");
|
|
5076
|
-
__decorateClass$
|
|
5077
|
+
__decorateClass$K([
|
|
5077
5078
|
property({ default: 0 })
|
|
5078
5079
|
], CanvasItemStyle.prototype, "outlineWidth");
|
|
5079
|
-
__decorateClass$
|
|
5080
|
+
__decorateClass$K([
|
|
5080
5081
|
property({ default: 0 })
|
|
5081
5082
|
], CanvasItemStyle.prototype, "outlineOffset");
|
|
5082
|
-
__decorateClass$
|
|
5083
|
+
__decorateClass$K([
|
|
5083
5084
|
property({ default: "#000000" })
|
|
5084
5085
|
], CanvasItemStyle.prototype, "outlineColor");
|
|
5085
|
-
__decorateClass$
|
|
5086
|
+
__decorateClass$K([
|
|
5086
5087
|
property({ default: "none" })
|
|
5087
5088
|
], CanvasItemStyle.prototype, "outlineStyle");
|
|
5088
|
-
__decorateClass$
|
|
5089
|
+
__decorateClass$K([
|
|
5089
5090
|
property({ default: "visible" })
|
|
5090
5091
|
], CanvasItemStyle.prototype, "visibility");
|
|
5091
|
-
__decorateClass$
|
|
5092
|
+
__decorateClass$K([
|
|
5092
5093
|
property({ default: "visible" })
|
|
5093
5094
|
], CanvasItemStyle.prototype, "overflow");
|
|
5094
|
-
__decorateClass$
|
|
5095
|
+
__decorateClass$K([
|
|
5095
5096
|
property({ default: "auto" })
|
|
5096
5097
|
], CanvasItemStyle.prototype, "pointerEvents");
|
|
5097
|
-
const transformStyle = getDefaultTransformStyle();
|
|
5098
|
-
for (const key in transformStyle) {
|
|
5099
|
-
defineProperty(CanvasItemStyle, key, { default: transformStyle[key] });
|
|
5098
|
+
const transformStyle$1 = getDefaultTransformStyle();
|
|
5099
|
+
for (const key in transformStyle$1) {
|
|
5100
|
+
defineProperty(CanvasItemStyle, key, { default: transformStyle$1[key] });
|
|
5100
5101
|
}
|
|
5101
|
-
const textStyle = getDefaultTextStyle();
|
|
5102
|
-
for (const key in textStyle) {
|
|
5103
|
-
defineProperty(CanvasItemStyle, key, { default: textStyle[key] });
|
|
5102
|
+
const textStyle$1 = getDefaultTextStyle();
|
|
5103
|
+
for (const key in textStyle$1) {
|
|
5104
|
+
defineProperty(CanvasItemStyle, key, { default: textStyle$1[key] });
|
|
5104
5105
|
}
|
|
5105
5106
|
|
|
5106
|
-
var __defProp$
|
|
5107
|
-
var __decorateClass$
|
|
5107
|
+
var __defProp$J = Object.defineProperty;
|
|
5108
|
+
var __decorateClass$J = (decorators, target, key, kind) => {
|
|
5108
5109
|
var result = undefined ;
|
|
5109
5110
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
5110
5111
|
if (decorator = decorators[i])
|
|
5111
5112
|
result = (decorator(target, key, result) ) || result;
|
|
5112
|
-
if (result) __defProp$
|
|
5113
|
+
if (result) __defProp$J(target, key, result);
|
|
5113
5114
|
return result;
|
|
5114
5115
|
};
|
|
5115
5116
|
class Texture2D extends Resource {
|
|
@@ -5235,32 +5236,32 @@ class Texture2D extends Resource {
|
|
|
5235
5236
|
}
|
|
5236
5237
|
}
|
|
5237
5238
|
}
|
|
5238
|
-
__decorateClass$
|
|
5239
|
+
__decorateClass$J([
|
|
5239
5240
|
protectedProperty()
|
|
5240
5241
|
], Texture2D.prototype, "source");
|
|
5241
|
-
__decorateClass$
|
|
5242
|
+
__decorateClass$J([
|
|
5242
5243
|
property({ default: 0 })
|
|
5243
5244
|
], Texture2D.prototype, "width");
|
|
5244
|
-
__decorateClass$
|
|
5245
|
+
__decorateClass$J([
|
|
5245
5246
|
property({ default: 0 })
|
|
5246
5247
|
], Texture2D.prototype, "height");
|
|
5247
|
-
__decorateClass$
|
|
5248
|
+
__decorateClass$J([
|
|
5248
5249
|
property({ default: "linear" })
|
|
5249
5250
|
], Texture2D.prototype, "filterMode");
|
|
5250
|
-
__decorateClass$
|
|
5251
|
+
__decorateClass$J([
|
|
5251
5252
|
property({ default: "clamp_to_edge" })
|
|
5252
5253
|
], Texture2D.prototype, "wrapMode");
|
|
5253
|
-
__decorateClass$
|
|
5254
|
+
__decorateClass$J([
|
|
5254
5255
|
property({ default: 1 })
|
|
5255
5256
|
], Texture2D.prototype, "pixelRatio");
|
|
5256
5257
|
|
|
5257
|
-
var __defProp$
|
|
5258
|
-
var __decorateClass$
|
|
5258
|
+
var __defProp$I = Object.defineProperty;
|
|
5259
|
+
var __decorateClass$I = (decorators, target, key, kind) => {
|
|
5259
5260
|
var result = undefined ;
|
|
5260
5261
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
5261
5262
|
if (decorator = decorators[i])
|
|
5262
5263
|
result = (decorator(target, key, result) ) || result;
|
|
5263
|
-
if (result) __defProp$
|
|
5264
|
+
if (result) __defProp$I(target, key, result);
|
|
5264
5265
|
return result;
|
|
5265
5266
|
};
|
|
5266
5267
|
class CanvasTexture extends Texture2D {
|
|
@@ -5279,7 +5280,7 @@ class CanvasTexture extends Texture2D {
|
|
|
5279
5280
|
super._updateProperty(key, value, oldValue, declaration);
|
|
5280
5281
|
}
|
|
5281
5282
|
}
|
|
5282
|
-
__decorateClass$
|
|
5283
|
+
__decorateClass$I([
|
|
5283
5284
|
property({ default: 2 })
|
|
5284
5285
|
], CanvasTexture.prototype, "pixelRatio");
|
|
5285
5286
|
|
|
@@ -5437,13 +5438,13 @@ class PixelsTexture extends Texture2D {
|
|
|
5437
5438
|
}
|
|
5438
5439
|
}
|
|
5439
5440
|
|
|
5440
|
-
var __defProp$
|
|
5441
|
-
var __decorateClass$
|
|
5441
|
+
var __defProp$H = Object.defineProperty;
|
|
5442
|
+
var __decorateClass$H = (decorators, target, key, kind) => {
|
|
5442
5443
|
var result = undefined ;
|
|
5443
5444
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
5444
5445
|
if (decorator = decorators[i])
|
|
5445
5446
|
result = (decorator(target, key, result) ) || result;
|
|
5446
|
-
if (result) __defProp$
|
|
5447
|
+
if (result) __defProp$H(target, key, result);
|
|
5447
5448
|
return result;
|
|
5448
5449
|
};
|
|
5449
5450
|
function resolveOptions(options) {
|
|
@@ -5687,10 +5688,10 @@ const _VideoTexture = class _VideoTexture extends Texture2D {
|
|
|
5687
5688
|
}
|
|
5688
5689
|
}
|
|
5689
5690
|
};
|
|
5690
|
-
__decorateClass$
|
|
5691
|
+
__decorateClass$H([
|
|
5691
5692
|
protectedProperty({ default: true })
|
|
5692
5693
|
], _VideoTexture.prototype, "autoUpdate");
|
|
5693
|
-
__decorateClass$
|
|
5694
|
+
__decorateClass$H([
|
|
5694
5695
|
protectedProperty({ default: 0 })
|
|
5695
5696
|
], _VideoTexture.prototype, "fps");
|
|
5696
5697
|
let VideoTexture = _VideoTexture;
|
|
@@ -5860,18 +5861,25 @@ class CanvasContext extends Path2D {
|
|
|
5860
5861
|
}
|
|
5861
5862
|
}
|
|
5862
5863
|
|
|
5863
|
-
var __defProp$
|
|
5864
|
-
var __getOwnPropDesc$
|
|
5865
|
-
var __decorateClass$
|
|
5866
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
5864
|
+
var __defProp$G = Object.defineProperty;
|
|
5865
|
+
var __getOwnPropDesc$E = Object.getOwnPropertyDescriptor;
|
|
5866
|
+
var __decorateClass$G = (decorators, target, key, kind) => {
|
|
5867
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$E(target, key) : target;
|
|
5867
5868
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
5868
5869
|
if (decorator = decorators[i])
|
|
5869
5870
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
5870
|
-
if (kind && result) __defProp$
|
|
5871
|
+
if (kind && result) __defProp$G(target, key, result);
|
|
5871
5872
|
return result;
|
|
5872
5873
|
};
|
|
5874
|
+
const tagUidMap = {};
|
|
5875
|
+
function getTagUid(tag) {
|
|
5876
|
+
let uid = tagUidMap[tag] ?? 0;
|
|
5877
|
+
uid++;
|
|
5878
|
+
tagUidMap[tag] = uid;
|
|
5879
|
+
return uid;
|
|
5880
|
+
}
|
|
5873
5881
|
let Node = class extends CoreObject {
|
|
5874
|
-
name = `${this.tag}:${
|
|
5882
|
+
name = `${this.tag}:${getTagUid(this.tag)}`;
|
|
5875
5883
|
mask;
|
|
5876
5884
|
_readyed = false;
|
|
5877
5885
|
constructor(properties, children = []) {
|
|
@@ -5882,7 +5890,8 @@ let Node = class extends CoreObject {
|
|
|
5882
5890
|
this._onUnparented = this._onUnparented.bind(this);
|
|
5883
5891
|
this._onReady = this._onReady.bind(this);
|
|
5884
5892
|
this._onProcess = this._onProcess.bind(this);
|
|
5885
|
-
this.setProperties(properties).append(children)
|
|
5893
|
+
this.setProperties(properties).append(children);
|
|
5894
|
+
this.on("treeEnter", this._onTreeEnter).on("treeExit", this._onTreeExit).on("parented", this._onParented).on("unparented", this._onUnparented).on("ready", this._onReady).on("process", this._onProcess);
|
|
5886
5895
|
}
|
|
5887
5896
|
/** Name */
|
|
5888
5897
|
getName() {
|
|
@@ -5915,12 +5924,12 @@ let Node = class extends CoreObject {
|
|
|
5915
5924
|
setTree(tree) {
|
|
5916
5925
|
const oldTree = this._tree;
|
|
5917
5926
|
if (tree !== oldTree) {
|
|
5927
|
+
if (oldTree) {
|
|
5928
|
+
this.emit("treeExit", oldTree);
|
|
5929
|
+
}
|
|
5930
|
+
this._tree = tree;
|
|
5918
5931
|
if (tree) {
|
|
5919
|
-
this._tree = tree;
|
|
5920
5932
|
this.emit("treeEnter", tree);
|
|
5921
|
-
} else if (oldTree) {
|
|
5922
|
-
this.emit("treeExit", oldTree);
|
|
5923
|
-
this._tree = tree;
|
|
5924
5933
|
}
|
|
5925
5934
|
for (let len = this._children.length, i = 0; i < len; i++) {
|
|
5926
5935
|
const node = this._children[i];
|
|
@@ -6069,7 +6078,7 @@ let Node = class extends CoreObject {
|
|
|
6069
6078
|
if (this.mask instanceof Node) {
|
|
6070
6079
|
if (!this.getNode("__$mask")) {
|
|
6071
6080
|
this.mask.processMode = "disabled";
|
|
6072
|
-
this.
|
|
6081
|
+
this.appendChild(this.mask, "front");
|
|
6073
6082
|
}
|
|
6074
6083
|
} else {
|
|
6075
6084
|
const mask = this.getNode("__$mask");
|
|
@@ -6135,42 +6144,41 @@ let Node = class extends CoreObject {
|
|
|
6135
6144
|
this._parent.moveChild(sibling, this.getIndex(true) + 1);
|
|
6136
6145
|
return this;
|
|
6137
6146
|
}
|
|
6138
|
-
append(...
|
|
6139
|
-
let
|
|
6140
|
-
if (Array.isArray(
|
|
6141
|
-
|
|
6147
|
+
append(...nodes) {
|
|
6148
|
+
let _nodes;
|
|
6149
|
+
if (Array.isArray(nodes[0])) {
|
|
6150
|
+
_nodes = nodes[0];
|
|
6142
6151
|
} else {
|
|
6143
|
-
|
|
6152
|
+
_nodes = nodes;
|
|
6144
6153
|
}
|
|
6145
|
-
|
|
6146
|
-
this.
|
|
6154
|
+
_nodes.forEach((node) => {
|
|
6155
|
+
this.appendChild(node);
|
|
6147
6156
|
});
|
|
6148
|
-
return this;
|
|
6149
6157
|
}
|
|
6150
|
-
|
|
6151
|
-
if (this.is(
|
|
6152
|
-
return
|
|
6158
|
+
appendChild(node, internalMode = node.internalMode) {
|
|
6159
|
+
if (this.is(node) || node.hasParent()) {
|
|
6160
|
+
return node;
|
|
6153
6161
|
}
|
|
6154
6162
|
switch (internalMode) {
|
|
6155
6163
|
case "default":
|
|
6156
6164
|
case "front": {
|
|
6157
6165
|
const targetMode = internalMode === "default" ? "back" : "front";
|
|
6158
|
-
const index = this._children.findIndex((
|
|
6166
|
+
const index = this._children.findIndex((node2) => node2.internalMode === targetMode);
|
|
6159
6167
|
if (index > -1) {
|
|
6160
|
-
this._children.splice(index, 0,
|
|
6168
|
+
this._children.splice(index, 0, node);
|
|
6161
6169
|
} else {
|
|
6162
|
-
this._children.push(
|
|
6170
|
+
this._children.push(node);
|
|
6163
6171
|
}
|
|
6164
6172
|
break;
|
|
6165
6173
|
}
|
|
6166
6174
|
case "back":
|
|
6167
|
-
this._children.push(
|
|
6175
|
+
this._children.push(node);
|
|
6168
6176
|
break;
|
|
6169
6177
|
}
|
|
6170
|
-
|
|
6171
|
-
|
|
6172
|
-
this.emit("
|
|
6173
|
-
return
|
|
6178
|
+
node.internalMode = internalMode;
|
|
6179
|
+
node.setParent(this);
|
|
6180
|
+
this.emit("appendChild", node);
|
|
6181
|
+
return node;
|
|
6174
6182
|
}
|
|
6175
6183
|
moveChild(child, toIndex, internalMode = child.internalMode) {
|
|
6176
6184
|
if (this.is(child) || child.hasParent() && !this.is(child.parent)) {
|
|
@@ -6201,7 +6209,7 @@ let Node = class extends CoreObject {
|
|
|
6201
6209
|
return false;
|
|
6202
6210
|
}
|
|
6203
6211
|
});
|
|
6204
|
-
maxIndex = maxIndex > -1 ? minIndex + maxIndex : Math.max(0, this._children.length
|
|
6212
|
+
maxIndex = maxIndex > -1 ? minIndex + maxIndex : Math.max(0, this._children.length);
|
|
6205
6213
|
const newIndex = clamp(minIndex, toIndex > -1 ? toIndex : maxIndex, maxIndex);
|
|
6206
6214
|
if (newIndex !== oldIndex) {
|
|
6207
6215
|
if (oldIndex > -1) {
|
|
@@ -6216,7 +6224,7 @@ let Node = class extends CoreObject {
|
|
|
6216
6224
|
if (oldIndex > -1) {
|
|
6217
6225
|
this.emit("moveChild", child, newIndex, oldIndex);
|
|
6218
6226
|
} else {
|
|
6219
|
-
this.emit("
|
|
6227
|
+
this.emit("appendChild", child);
|
|
6220
6228
|
}
|
|
6221
6229
|
}
|
|
6222
6230
|
return this;
|
|
@@ -6228,7 +6236,7 @@ let Node = class extends CoreObject {
|
|
|
6228
6236
|
child.setParent(undefined);
|
|
6229
6237
|
this.emit("removeChild", child, index);
|
|
6230
6238
|
}
|
|
6231
|
-
return
|
|
6239
|
+
return child;
|
|
6232
6240
|
}
|
|
6233
6241
|
removeChildren() {
|
|
6234
6242
|
this.getChildren().forEach((child) => this.removeChild(child));
|
|
@@ -6288,37 +6296,37 @@ let Node = class extends CoreObject {
|
|
|
6288
6296
|
const { tag, props, children } = JSON;
|
|
6289
6297
|
const NodeClass = customNodes.get(tag) ?? Node;
|
|
6290
6298
|
const node = new NodeClass(props);
|
|
6291
|
-
children?.forEach((child) => node.
|
|
6299
|
+
children?.forEach((child) => node.appendChild(this.parse(child)));
|
|
6292
6300
|
return node;
|
|
6293
6301
|
}
|
|
6294
6302
|
};
|
|
6295
|
-
__decorateClass$
|
|
6303
|
+
__decorateClass$G([
|
|
6296
6304
|
property()
|
|
6297
6305
|
], Node.prototype, "name", 2);
|
|
6298
|
-
__decorateClass$
|
|
6306
|
+
__decorateClass$G([
|
|
6299
6307
|
property()
|
|
6300
6308
|
], Node.prototype, "mask", 2);
|
|
6301
|
-
__decorateClass$
|
|
6309
|
+
__decorateClass$G([
|
|
6302
6310
|
property({ default: "inherit" })
|
|
6303
6311
|
], Node.prototype, "processMode", 2);
|
|
6304
|
-
__decorateClass$
|
|
6312
|
+
__decorateClass$G([
|
|
6305
6313
|
property({ default: "inherit" })
|
|
6306
6314
|
], Node.prototype, "renderMode", 2);
|
|
6307
|
-
__decorateClass$
|
|
6315
|
+
__decorateClass$G([
|
|
6308
6316
|
property({ default: "default" })
|
|
6309
6317
|
], Node.prototype, "internalMode", 2);
|
|
6310
|
-
Node = __decorateClass$
|
|
6318
|
+
Node = __decorateClass$G([
|
|
6311
6319
|
customNode("Node")
|
|
6312
6320
|
], Node);
|
|
6313
6321
|
|
|
6314
|
-
var __defProp$
|
|
6315
|
-
var __getOwnPropDesc$
|
|
6316
|
-
var __decorateClass$
|
|
6317
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
6322
|
+
var __defProp$F = Object.defineProperty;
|
|
6323
|
+
var __getOwnPropDesc$D = Object.getOwnPropertyDescriptor;
|
|
6324
|
+
var __decorateClass$F = (decorators, target, key, kind) => {
|
|
6325
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$D(target, key) : target;
|
|
6318
6326
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6319
6327
|
if (decorator = decorators[i])
|
|
6320
6328
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
6321
|
-
if (kind && result) __defProp$
|
|
6329
|
+
if (kind && result) __defProp$F(target, key, result);
|
|
6322
6330
|
return result;
|
|
6323
6331
|
};
|
|
6324
6332
|
let TimelineNode = class extends Node {
|
|
@@ -6377,27 +6385,27 @@ let TimelineNode = class extends Node {
|
|
|
6377
6385
|
super._process(delta);
|
|
6378
6386
|
}
|
|
6379
6387
|
};
|
|
6380
|
-
__decorateClass$
|
|
6388
|
+
__decorateClass$F([
|
|
6381
6389
|
property({ default: 0 })
|
|
6382
6390
|
], TimelineNode.prototype, "delay", 2);
|
|
6383
|
-
__decorateClass$
|
|
6391
|
+
__decorateClass$F([
|
|
6384
6392
|
property({ default: 0 })
|
|
6385
6393
|
], TimelineNode.prototype, "duration", 2);
|
|
6386
|
-
__decorateClass$
|
|
6394
|
+
__decorateClass$F([
|
|
6387
6395
|
property({ default: false })
|
|
6388
6396
|
], TimelineNode.prototype, "paused", 2);
|
|
6389
|
-
TimelineNode = __decorateClass$
|
|
6397
|
+
TimelineNode = __decorateClass$F([
|
|
6390
6398
|
customNode("TimelineNode")
|
|
6391
6399
|
], TimelineNode);
|
|
6392
6400
|
|
|
6393
|
-
var __defProp$
|
|
6394
|
-
var __getOwnPropDesc$
|
|
6395
|
-
var __decorateClass$
|
|
6396
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
6401
|
+
var __defProp$E = Object.defineProperty;
|
|
6402
|
+
var __getOwnPropDesc$C = Object.getOwnPropertyDescriptor;
|
|
6403
|
+
var __decorateClass$E = (decorators, target, key, kind) => {
|
|
6404
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$C(target, key) : target;
|
|
6397
6405
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6398
6406
|
if (decorator = decorators[i])
|
|
6399
6407
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
6400
|
-
if (kind && result) __defProp$
|
|
6408
|
+
if (kind && result) __defProp$E(target, key, result);
|
|
6401
6409
|
return result;
|
|
6402
6410
|
};
|
|
6403
6411
|
let Viewport = class extends Node {
|
|
@@ -6535,30 +6543,30 @@ let Viewport = class extends Node {
|
|
|
6535
6543
|
return this._projection.toArray(transpose);
|
|
6536
6544
|
}
|
|
6537
6545
|
};
|
|
6538
|
-
__decorateClass$
|
|
6546
|
+
__decorateClass$E([
|
|
6539
6547
|
property({ default: 0 })
|
|
6540
6548
|
], Viewport.prototype, "x", 2);
|
|
6541
|
-
__decorateClass$
|
|
6549
|
+
__decorateClass$E([
|
|
6542
6550
|
property({ default: 0 })
|
|
6543
6551
|
], Viewport.prototype, "y", 2);
|
|
6544
|
-
__decorateClass$
|
|
6552
|
+
__decorateClass$E([
|
|
6545
6553
|
property({ default: 0 })
|
|
6546
6554
|
], Viewport.prototype, "width", 2);
|
|
6547
|
-
__decorateClass$
|
|
6555
|
+
__decorateClass$E([
|
|
6548
6556
|
property({ default: 0 })
|
|
6549
6557
|
], Viewport.prototype, "height", 2);
|
|
6550
|
-
Viewport = __decorateClass$
|
|
6558
|
+
Viewport = __decorateClass$E([
|
|
6551
6559
|
customNode("Viewport")
|
|
6552
6560
|
], Viewport);
|
|
6553
6561
|
|
|
6554
|
-
var __defProp$
|
|
6555
|
-
var __getOwnPropDesc$
|
|
6556
|
-
var __decorateClass$
|
|
6557
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
6562
|
+
var __defProp$D = Object.defineProperty;
|
|
6563
|
+
var __getOwnPropDesc$B = Object.getOwnPropertyDescriptor;
|
|
6564
|
+
var __decorateClass$D = (decorators, target, key, kind) => {
|
|
6565
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$B(target, key) : target;
|
|
6558
6566
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6559
6567
|
if (decorator = decorators[i])
|
|
6560
6568
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
6561
|
-
if (kind && result) __defProp$
|
|
6569
|
+
if (kind && result) __defProp$D(target, key, result);
|
|
6562
6570
|
return result;
|
|
6563
6571
|
};
|
|
6564
6572
|
let Effect = class extends TimelineNode {
|
|
@@ -6795,34 +6803,34 @@ let Effect = class extends TimelineNode {
|
|
|
6795
6803
|
}
|
|
6796
6804
|
}
|
|
6797
6805
|
};
|
|
6798
|
-
__decorateClass$
|
|
6806
|
+
__decorateClass$D([
|
|
6799
6807
|
protectedProperty()
|
|
6800
6808
|
], Effect.prototype, "material", 2);
|
|
6801
|
-
__decorateClass$
|
|
6809
|
+
__decorateClass$D([
|
|
6802
6810
|
property()
|
|
6803
6811
|
], Effect.prototype, "effectMode", 2);
|
|
6804
|
-
__decorateClass$
|
|
6812
|
+
__decorateClass$D([
|
|
6805
6813
|
property({ default: "" })
|
|
6806
6814
|
], Effect.prototype, "glsl", 2);
|
|
6807
|
-
__decorateClass$
|
|
6815
|
+
__decorateClass$D([
|
|
6808
6816
|
property({ default: "" })
|
|
6809
6817
|
], Effect.prototype, "glslSrc", 2);
|
|
6810
|
-
Effect = __decorateClass$
|
|
6818
|
+
Effect = __decorateClass$D([
|
|
6811
6819
|
customNode("Effect")
|
|
6812
6820
|
], Effect);
|
|
6813
6821
|
|
|
6814
|
-
var __defProp$
|
|
6815
|
-
var __getOwnPropDesc$
|
|
6816
|
-
var __defNormalProp$
|
|
6817
|
-
var __decorateClass$
|
|
6818
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
6822
|
+
var __defProp$C = Object.defineProperty;
|
|
6823
|
+
var __getOwnPropDesc$A = Object.getOwnPropertyDescriptor;
|
|
6824
|
+
var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$C(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6825
|
+
var __decorateClass$C = (decorators, target, key, kind) => {
|
|
6826
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$A(target, key) : target;
|
|
6819
6827
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6820
6828
|
if (decorator = decorators[i])
|
|
6821
6829
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
6822
|
-
if (kind && result) __defProp$
|
|
6830
|
+
if (kind && result) __defProp$C(target, key, result);
|
|
6823
6831
|
return result;
|
|
6824
6832
|
};
|
|
6825
|
-
var __publicField$
|
|
6833
|
+
var __publicField$i = (obj, key, value) => __defNormalProp$i(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
6826
6834
|
const vertX = `attribute vec2 position;
|
|
6827
6835
|
attribute vec2 uv;
|
|
6828
6836
|
varying vec2 vUv[9];
|
|
@@ -6908,36 +6916,36 @@ let BlurEffect = class extends Effect {
|
|
|
6908
6916
|
});
|
|
6909
6917
|
}
|
|
6910
6918
|
};
|
|
6911
|
-
__publicField$
|
|
6919
|
+
__publicField$i(BlurEffect, "materialX", new Material({
|
|
6912
6920
|
vert: vertX,
|
|
6913
6921
|
frag
|
|
6914
6922
|
}));
|
|
6915
|
-
__publicField$
|
|
6923
|
+
__publicField$i(BlurEffect, "materialY", new Material({
|
|
6916
6924
|
vert: vertY,
|
|
6917
6925
|
frag
|
|
6918
6926
|
}));
|
|
6919
|
-
__decorateClass$
|
|
6927
|
+
__decorateClass$C([
|
|
6920
6928
|
property({ default: 8 })
|
|
6921
6929
|
], BlurEffect.prototype, "strength", 2);
|
|
6922
|
-
__decorateClass$
|
|
6930
|
+
__decorateClass$C([
|
|
6923
6931
|
property({ default: 4 })
|
|
6924
6932
|
], BlurEffect.prototype, "quality", 2);
|
|
6925
|
-
BlurEffect = __decorateClass$
|
|
6933
|
+
BlurEffect = __decorateClass$C([
|
|
6926
6934
|
customNode("BlurEffect")
|
|
6927
6935
|
], BlurEffect);
|
|
6928
6936
|
|
|
6929
|
-
var __defProp$
|
|
6930
|
-
var __getOwnPropDesc$
|
|
6931
|
-
var __defNormalProp$
|
|
6932
|
-
var __decorateClass$
|
|
6933
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
6937
|
+
var __defProp$B = Object.defineProperty;
|
|
6938
|
+
var __getOwnPropDesc$z = Object.getOwnPropertyDescriptor;
|
|
6939
|
+
var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$B(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6940
|
+
var __decorateClass$B = (decorators, target, key, kind) => {
|
|
6941
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$z(target, key) : target;
|
|
6934
6942
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6935
6943
|
if (decorator = decorators[i])
|
|
6936
6944
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
6937
|
-
if (kind && result) __defProp$
|
|
6945
|
+
if (kind && result) __defProp$B(target, key, result);
|
|
6938
6946
|
return result;
|
|
6939
6947
|
};
|
|
6940
|
-
var __publicField$
|
|
6948
|
+
var __publicField$h = (obj, key, value) => __defNormalProp$h(obj, key + "" , value);
|
|
6941
6949
|
let ColorAdjustEffect = class extends Effect {
|
|
6942
6950
|
saturation = 1;
|
|
6943
6951
|
contrast = 1;
|
|
@@ -6963,7 +6971,7 @@ let ColorAdjustEffect = class extends Effect {
|
|
|
6963
6971
|
});
|
|
6964
6972
|
}
|
|
6965
6973
|
};
|
|
6966
|
-
__publicField$
|
|
6974
|
+
__publicField$h(ColorAdjustEffect, "material", new Material({
|
|
6967
6975
|
vert: `precision mediump float;
|
|
6968
6976
|
attribute vec2 position;
|
|
6969
6977
|
attribute vec2 uv;
|
|
@@ -6998,46 +7006,46 @@ void main(void) {
|
|
|
6998
7006
|
gl_FragColor = c * alpha;
|
|
6999
7007
|
}`
|
|
7000
7008
|
}));
|
|
7001
|
-
__decorateClass$
|
|
7009
|
+
__decorateClass$B([
|
|
7002
7010
|
property()
|
|
7003
7011
|
], ColorAdjustEffect.prototype, "saturation", 2);
|
|
7004
|
-
__decorateClass$
|
|
7012
|
+
__decorateClass$B([
|
|
7005
7013
|
property()
|
|
7006
7014
|
], ColorAdjustEffect.prototype, "contrast", 2);
|
|
7007
|
-
__decorateClass$
|
|
7015
|
+
__decorateClass$B([
|
|
7008
7016
|
property()
|
|
7009
7017
|
], ColorAdjustEffect.prototype, "brightness", 2);
|
|
7010
|
-
__decorateClass$
|
|
7018
|
+
__decorateClass$B([
|
|
7011
7019
|
property()
|
|
7012
7020
|
], ColorAdjustEffect.prototype, "red", 2);
|
|
7013
|
-
__decorateClass$
|
|
7021
|
+
__decorateClass$B([
|
|
7014
7022
|
property()
|
|
7015
7023
|
], ColorAdjustEffect.prototype, "green", 2);
|
|
7016
|
-
__decorateClass$
|
|
7024
|
+
__decorateClass$B([
|
|
7017
7025
|
property()
|
|
7018
7026
|
], ColorAdjustEffect.prototype, "blue", 2);
|
|
7019
|
-
__decorateClass$
|
|
7027
|
+
__decorateClass$B([
|
|
7020
7028
|
property()
|
|
7021
7029
|
], ColorAdjustEffect.prototype, "alpha", 2);
|
|
7022
|
-
__decorateClass$
|
|
7030
|
+
__decorateClass$B([
|
|
7023
7031
|
property()
|
|
7024
7032
|
], ColorAdjustEffect.prototype, "gamma", 2);
|
|
7025
|
-
ColorAdjustEffect = __decorateClass$
|
|
7033
|
+
ColorAdjustEffect = __decorateClass$B([
|
|
7026
7034
|
customNode("ColorAdjustEffect")
|
|
7027
7035
|
], ColorAdjustEffect);
|
|
7028
7036
|
|
|
7029
|
-
var __defProp$
|
|
7030
|
-
var __getOwnPropDesc$
|
|
7031
|
-
var __defNormalProp$
|
|
7032
|
-
var __decorateClass$
|
|
7033
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
7037
|
+
var __defProp$A = Object.defineProperty;
|
|
7038
|
+
var __getOwnPropDesc$y = Object.getOwnPropertyDescriptor;
|
|
7039
|
+
var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$A(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7040
|
+
var __decorateClass$A = (decorators, target, key, kind) => {
|
|
7041
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$y(target, key) : target;
|
|
7034
7042
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7035
7043
|
if (decorator = decorators[i])
|
|
7036
7044
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7037
|
-
if (kind && result) __defProp$
|
|
7045
|
+
if (kind && result) __defProp$A(target, key, result);
|
|
7038
7046
|
return result;
|
|
7039
7047
|
};
|
|
7040
|
-
var __publicField$
|
|
7048
|
+
var __publicField$g = (obj, key, value) => __defNormalProp$g(obj, key + "" , value);
|
|
7041
7049
|
let ColorFilterEffect = class extends Effect {
|
|
7042
7050
|
_colorMatrix = new ColorMatrix();
|
|
7043
7051
|
constructor(properties) {
|
|
@@ -7087,7 +7095,7 @@ let ColorFilterEffect = class extends Effect {
|
|
|
7087
7095
|
});
|
|
7088
7096
|
}
|
|
7089
7097
|
};
|
|
7090
|
-
__publicField$
|
|
7098
|
+
__publicField$g(ColorFilterEffect, "material", new Material({
|
|
7091
7099
|
vert: `precision mediump float;
|
|
7092
7100
|
attribute vec2 position;
|
|
7093
7101
|
attribute vec2 uv;
|
|
@@ -7114,25 +7122,25 @@ void main(void) {
|
|
|
7114
7122
|
);
|
|
7115
7123
|
}`
|
|
7116
7124
|
}));
|
|
7117
|
-
__decorateClass$
|
|
7125
|
+
__decorateClass$A([
|
|
7118
7126
|
property({ default: "" })
|
|
7119
7127
|
], ColorFilterEffect.prototype, "filter", 2);
|
|
7120
|
-
ColorFilterEffect = __decorateClass$
|
|
7128
|
+
ColorFilterEffect = __decorateClass$A([
|
|
7121
7129
|
customNode("ColorFilterEffect")
|
|
7122
7130
|
], ColorFilterEffect);
|
|
7123
7131
|
|
|
7124
|
-
var __defProp$
|
|
7125
|
-
var __getOwnPropDesc$
|
|
7126
|
-
var __defNormalProp$
|
|
7127
|
-
var __decorateClass$
|
|
7128
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
7132
|
+
var __defProp$z = Object.defineProperty;
|
|
7133
|
+
var __getOwnPropDesc$x = Object.getOwnPropertyDescriptor;
|
|
7134
|
+
var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7135
|
+
var __decorateClass$z = (decorators, target, key, kind) => {
|
|
7136
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$x(target, key) : target;
|
|
7129
7137
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7130
7138
|
if (decorator = decorators[i])
|
|
7131
7139
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7132
|
-
if (kind && result) __defProp$
|
|
7140
|
+
if (kind && result) __defProp$z(target, key, result);
|
|
7133
7141
|
return result;
|
|
7134
7142
|
};
|
|
7135
|
-
var __publicField$
|
|
7143
|
+
var __publicField$f = (obj, key, value) => __defNormalProp$f(obj, key + "" , value);
|
|
7136
7144
|
const MAX_COLORS$1 = 50;
|
|
7137
7145
|
let ColorOverlayEffect = class extends Effect {
|
|
7138
7146
|
colors = [];
|
|
@@ -7156,7 +7164,7 @@ let ColorOverlayEffect = class extends Effect {
|
|
|
7156
7164
|
});
|
|
7157
7165
|
}
|
|
7158
7166
|
};
|
|
7159
|
-
__publicField$
|
|
7167
|
+
__publicField$f(ColorOverlayEffect, "material", new Material({
|
|
7160
7168
|
vert: `precision mediump float;
|
|
7161
7169
|
attribute vec2 position;
|
|
7162
7170
|
attribute vec2 uv;
|
|
@@ -7203,28 +7211,28 @@ void main(void) {
|
|
|
7203
7211
|
gl_FragColor = vec4(mix(color.rgb, mask.rgb, color.a * mask.a), color.a);
|
|
7204
7212
|
}`
|
|
7205
7213
|
}));
|
|
7206
|
-
__decorateClass$
|
|
7214
|
+
__decorateClass$z([
|
|
7207
7215
|
property()
|
|
7208
7216
|
], ColorOverlayEffect.prototype, "colors", 2);
|
|
7209
|
-
__decorateClass$
|
|
7217
|
+
__decorateClass$z([
|
|
7210
7218
|
property()
|
|
7211
7219
|
], ColorOverlayEffect.prototype, "alpha", 2);
|
|
7212
|
-
ColorOverlayEffect = __decorateClass$
|
|
7220
|
+
ColorOverlayEffect = __decorateClass$z([
|
|
7213
7221
|
customNode("ColorOverlayEffect")
|
|
7214
7222
|
], ColorOverlayEffect);
|
|
7215
7223
|
|
|
7216
|
-
var __defProp$
|
|
7217
|
-
var __getOwnPropDesc$
|
|
7218
|
-
var __defNormalProp$
|
|
7219
|
-
var __decorateClass$
|
|
7220
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
7224
|
+
var __defProp$y = Object.defineProperty;
|
|
7225
|
+
var __getOwnPropDesc$w = Object.getOwnPropertyDescriptor;
|
|
7226
|
+
var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7227
|
+
var __decorateClass$y = (decorators, target, key, kind) => {
|
|
7228
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$w(target, key) : target;
|
|
7221
7229
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7222
7230
|
if (decorator = decorators[i])
|
|
7223
7231
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7224
|
-
if (kind && result) __defProp$
|
|
7232
|
+
if (kind && result) __defProp$y(target, key, result);
|
|
7225
7233
|
return result;
|
|
7226
7234
|
};
|
|
7227
|
-
var __publicField$
|
|
7235
|
+
var __publicField$e = (obj, key, value) => __defNormalProp$e(obj, key + "" , value);
|
|
7228
7236
|
let ColorRemoveEffect = class extends Effect {
|
|
7229
7237
|
colors = [];
|
|
7230
7238
|
epsilon = 0.5;
|
|
@@ -7253,7 +7261,7 @@ let ColorRemoveEffect = class extends Effect {
|
|
|
7253
7261
|
});
|
|
7254
7262
|
}
|
|
7255
7263
|
};
|
|
7256
|
-
__publicField$
|
|
7264
|
+
__publicField$e(ColorRemoveEffect, "material", new Material({
|
|
7257
7265
|
vert: `precision mediump float;
|
|
7258
7266
|
attribute vec2 position;
|
|
7259
7267
|
attribute vec2 uv;
|
|
@@ -7286,28 +7294,28 @@ void main(void) {
|
|
|
7286
7294
|
gl_FragColor = color;
|
|
7287
7295
|
}`
|
|
7288
7296
|
}));
|
|
7289
|
-
__decorateClass$
|
|
7297
|
+
__decorateClass$y([
|
|
7290
7298
|
property()
|
|
7291
7299
|
], ColorRemoveEffect.prototype, "colors", 2);
|
|
7292
|
-
__decorateClass$
|
|
7300
|
+
__decorateClass$y([
|
|
7293
7301
|
property()
|
|
7294
7302
|
], ColorRemoveEffect.prototype, "epsilon", 2);
|
|
7295
|
-
ColorRemoveEffect = __decorateClass$
|
|
7303
|
+
ColorRemoveEffect = __decorateClass$y([
|
|
7296
7304
|
customNode("ColorRemoveEffect")
|
|
7297
7305
|
], ColorRemoveEffect);
|
|
7298
7306
|
|
|
7299
|
-
var __defProp$
|
|
7300
|
-
var __getOwnPropDesc$
|
|
7301
|
-
var __defNormalProp$
|
|
7302
|
-
var __decorateClass$
|
|
7303
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
7307
|
+
var __defProp$x = Object.defineProperty;
|
|
7308
|
+
var __getOwnPropDesc$v = Object.getOwnPropertyDescriptor;
|
|
7309
|
+
var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$x(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7310
|
+
var __decorateClass$x = (decorators, target, key, kind) => {
|
|
7311
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$v(target, key) : target;
|
|
7304
7312
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7305
7313
|
if (decorator = decorators[i])
|
|
7306
7314
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7307
|
-
if (kind && result) __defProp$
|
|
7315
|
+
if (kind && result) __defProp$x(target, key, result);
|
|
7308
7316
|
return result;
|
|
7309
7317
|
};
|
|
7310
|
-
var __publicField$
|
|
7318
|
+
var __publicField$d = (obj, key, value) => __defNormalProp$d(obj, key + "" , value);
|
|
7311
7319
|
const MAX_COLORS = 50;
|
|
7312
7320
|
let ColorReplaceEffect = class extends Effect {
|
|
7313
7321
|
colors = [];
|
|
@@ -7351,7 +7359,7 @@ let ColorReplaceEffect = class extends Effect {
|
|
|
7351
7359
|
});
|
|
7352
7360
|
}
|
|
7353
7361
|
};
|
|
7354
|
-
__publicField$
|
|
7362
|
+
__publicField$d(ColorReplaceEffect, "material", new Material({
|
|
7355
7363
|
vert: `precision mediump float;
|
|
7356
7364
|
attribute vec2 position;
|
|
7357
7365
|
attribute vec2 uv;
|
|
@@ -7391,28 +7399,28 @@ void main(void) {
|
|
|
7391
7399
|
}
|
|
7392
7400
|
}`
|
|
7393
7401
|
}));
|
|
7394
|
-
__decorateClass$
|
|
7402
|
+
__decorateClass$x([
|
|
7395
7403
|
property()
|
|
7396
7404
|
], ColorReplaceEffect.prototype, "colors", 2);
|
|
7397
|
-
__decorateClass$
|
|
7405
|
+
__decorateClass$x([
|
|
7398
7406
|
property()
|
|
7399
7407
|
], ColorReplaceEffect.prototype, "epsilon", 2);
|
|
7400
|
-
ColorReplaceEffect = __decorateClass$
|
|
7408
|
+
ColorReplaceEffect = __decorateClass$x([
|
|
7401
7409
|
customNode("ColorReplaceEffect")
|
|
7402
7410
|
], ColorReplaceEffect);
|
|
7403
7411
|
|
|
7404
|
-
var __defProp$
|
|
7405
|
-
var __getOwnPropDesc$
|
|
7406
|
-
var __defNormalProp$
|
|
7407
|
-
var __decorateClass$
|
|
7408
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
7412
|
+
var __defProp$w = Object.defineProperty;
|
|
7413
|
+
var __getOwnPropDesc$u = Object.getOwnPropertyDescriptor;
|
|
7414
|
+
var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$w(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7415
|
+
var __decorateClass$w = (decorators, target, key, kind) => {
|
|
7416
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$u(target, key) : target;
|
|
7409
7417
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7410
7418
|
if (decorator = decorators[i])
|
|
7411
7419
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7412
|
-
if (kind && result) __defProp$
|
|
7420
|
+
if (kind && result) __defProp$w(target, key, result);
|
|
7413
7421
|
return result;
|
|
7414
7422
|
};
|
|
7415
|
-
var __publicField$
|
|
7423
|
+
var __publicField$c = (obj, key, value) => __defNormalProp$c(obj, key + "" , value);
|
|
7416
7424
|
let EmbossEffect = class extends Effect {
|
|
7417
7425
|
strength;
|
|
7418
7426
|
constructor(strength = 5) {
|
|
@@ -7429,7 +7437,7 @@ let EmbossEffect = class extends Effect {
|
|
|
7429
7437
|
});
|
|
7430
7438
|
}
|
|
7431
7439
|
};
|
|
7432
|
-
__publicField$
|
|
7440
|
+
__publicField$c(EmbossEffect, "material", new Material({
|
|
7433
7441
|
vert: `precision mediump float;
|
|
7434
7442
|
attribute vec2 position;
|
|
7435
7443
|
attribute vec2 uv;
|
|
@@ -7455,25 +7463,25 @@ void main(void) {
|
|
|
7455
7463
|
gl_FragColor = vec4(color.rgb * alpha, alpha);
|
|
7456
7464
|
}`
|
|
7457
7465
|
}));
|
|
7458
|
-
__decorateClass$
|
|
7466
|
+
__decorateClass$w([
|
|
7459
7467
|
property()
|
|
7460
7468
|
], EmbossEffect.prototype, "strength", 2);
|
|
7461
|
-
EmbossEffect = __decorateClass$
|
|
7469
|
+
EmbossEffect = __decorateClass$w([
|
|
7462
7470
|
customNode("EmbossEffect")
|
|
7463
7471
|
], EmbossEffect);
|
|
7464
7472
|
|
|
7465
|
-
var __defProp$
|
|
7466
|
-
var __getOwnPropDesc$
|
|
7467
|
-
var __defNormalProp$
|
|
7468
|
-
var __decorateClass$
|
|
7469
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
7473
|
+
var __defProp$v = Object.defineProperty;
|
|
7474
|
+
var __getOwnPropDesc$t = Object.getOwnPropertyDescriptor;
|
|
7475
|
+
var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7476
|
+
var __decorateClass$v = (decorators, target, key, kind) => {
|
|
7477
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$t(target, key) : target;
|
|
7470
7478
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7471
7479
|
if (decorator = decorators[i])
|
|
7472
7480
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7473
|
-
if (kind && result) __defProp$
|
|
7481
|
+
if (kind && result) __defProp$v(target, key, result);
|
|
7474
7482
|
return result;
|
|
7475
7483
|
};
|
|
7476
|
-
var __publicField$
|
|
7484
|
+
var __publicField$b = (obj, key, value) => __defNormalProp$b(obj, key + "" , value);
|
|
7477
7485
|
let GlitchEffect = class extends Effect {
|
|
7478
7486
|
_canvas;
|
|
7479
7487
|
_texture;
|
|
@@ -7547,7 +7555,7 @@ let GlitchEffect = class extends Effect {
|
|
|
7547
7555
|
});
|
|
7548
7556
|
}
|
|
7549
7557
|
};
|
|
7550
|
-
__publicField$
|
|
7558
|
+
__publicField$b(GlitchEffect, "material", new Material({
|
|
7551
7559
|
vert: `precision mediump float;
|
|
7552
7560
|
attribute vec2 position;
|
|
7553
7561
|
attribute vec2 uv;
|
|
@@ -7652,49 +7660,49 @@ void main(void) {
|
|
|
7652
7660
|
gl_FragColor.a = texture2D(sampler, coord).a;
|
|
7653
7661
|
}`
|
|
7654
7662
|
}));
|
|
7655
|
-
__decorateClass$
|
|
7663
|
+
__decorateClass$v([
|
|
7656
7664
|
property()
|
|
7657
7665
|
], GlitchEffect.prototype, "slices", 2);
|
|
7658
|
-
__decorateClass$
|
|
7666
|
+
__decorateClass$v([
|
|
7659
7667
|
property()
|
|
7660
7668
|
], GlitchEffect.prototype, "sampleSize", 2);
|
|
7661
|
-
__decorateClass$
|
|
7669
|
+
__decorateClass$v([
|
|
7662
7670
|
property()
|
|
7663
7671
|
], GlitchEffect.prototype, "offset", 2);
|
|
7664
|
-
__decorateClass$
|
|
7672
|
+
__decorateClass$v([
|
|
7665
7673
|
property()
|
|
7666
7674
|
], GlitchEffect.prototype, "direction", 2);
|
|
7667
|
-
__decorateClass$
|
|
7675
|
+
__decorateClass$v([
|
|
7668
7676
|
property()
|
|
7669
7677
|
], GlitchEffect.prototype, "fillMode", 2);
|
|
7670
|
-
__decorateClass$
|
|
7678
|
+
__decorateClass$v([
|
|
7671
7679
|
property()
|
|
7672
7680
|
], GlitchEffect.prototype, "seed", 2);
|
|
7673
|
-
__decorateClass$
|
|
7681
|
+
__decorateClass$v([
|
|
7674
7682
|
property()
|
|
7675
7683
|
], GlitchEffect.prototype, "red", 2);
|
|
7676
|
-
__decorateClass$
|
|
7684
|
+
__decorateClass$v([
|
|
7677
7685
|
property()
|
|
7678
7686
|
], GlitchEffect.prototype, "green", 2);
|
|
7679
|
-
__decorateClass$
|
|
7687
|
+
__decorateClass$v([
|
|
7680
7688
|
property()
|
|
7681
7689
|
], GlitchEffect.prototype, "blue", 2);
|
|
7682
|
-
GlitchEffect = __decorateClass$
|
|
7690
|
+
GlitchEffect = __decorateClass$v([
|
|
7683
7691
|
customNode("GlitchEffect")
|
|
7684
7692
|
], GlitchEffect);
|
|
7685
7693
|
|
|
7686
|
-
var __defProp$
|
|
7687
|
-
var __getOwnPropDesc$
|
|
7688
|
-
var __defNormalProp$
|
|
7689
|
-
var __decorateClass$
|
|
7690
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
7694
|
+
var __defProp$u = Object.defineProperty;
|
|
7695
|
+
var __getOwnPropDesc$s = Object.getOwnPropertyDescriptor;
|
|
7696
|
+
var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7697
|
+
var __decorateClass$u = (decorators, target, key, kind) => {
|
|
7698
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$s(target, key) : target;
|
|
7691
7699
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7692
7700
|
if (decorator = decorators[i])
|
|
7693
7701
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7694
|
-
if (kind && result) __defProp$
|
|
7702
|
+
if (kind && result) __defProp$u(target, key, result);
|
|
7695
7703
|
return result;
|
|
7696
7704
|
};
|
|
7697
|
-
var __publicField$
|
|
7705
|
+
var __publicField$a = (obj, key, value) => __defNormalProp$a(obj, key + "" , value);
|
|
7698
7706
|
let GodrayEffect = class extends Effect {
|
|
7699
7707
|
angle = 30;
|
|
7700
7708
|
gain = 0.5;
|
|
@@ -7719,7 +7727,7 @@ let GodrayEffect = class extends Effect {
|
|
|
7719
7727
|
});
|
|
7720
7728
|
}
|
|
7721
7729
|
};
|
|
7722
|
-
__publicField$
|
|
7730
|
+
__publicField$a(GodrayEffect, "material", new Material({
|
|
7723
7731
|
vert: `precision mediump float;
|
|
7724
7732
|
attribute vec2 position;
|
|
7725
7733
|
attribute vec2 uv;
|
|
@@ -7853,40 +7861,40 @@ void main(void) {
|
|
|
7853
7861
|
gl_FragColor = vec4(color.rgb + mist.rgb, color.a);
|
|
7854
7862
|
}`
|
|
7855
7863
|
}));
|
|
7856
|
-
__decorateClass$
|
|
7864
|
+
__decorateClass$u([
|
|
7857
7865
|
property()
|
|
7858
7866
|
], GodrayEffect.prototype, "angle", 2);
|
|
7859
|
-
__decorateClass$
|
|
7867
|
+
__decorateClass$u([
|
|
7860
7868
|
property()
|
|
7861
7869
|
], GodrayEffect.prototype, "gain", 2);
|
|
7862
|
-
__decorateClass$
|
|
7870
|
+
__decorateClass$u([
|
|
7863
7871
|
property()
|
|
7864
7872
|
], GodrayEffect.prototype, "lacunarity", 2);
|
|
7865
|
-
__decorateClass$
|
|
7873
|
+
__decorateClass$u([
|
|
7866
7874
|
property()
|
|
7867
7875
|
], GodrayEffect.prototype, "parallel", 2);
|
|
7868
|
-
__decorateClass$
|
|
7876
|
+
__decorateClass$u([
|
|
7869
7877
|
property()
|
|
7870
7878
|
], GodrayEffect.prototype, "center", 2);
|
|
7871
|
-
__decorateClass$
|
|
7879
|
+
__decorateClass$u([
|
|
7872
7880
|
property()
|
|
7873
7881
|
], GodrayEffect.prototype, "alpha", 2);
|
|
7874
|
-
GodrayEffect = __decorateClass$
|
|
7882
|
+
GodrayEffect = __decorateClass$u([
|
|
7875
7883
|
customNode("GodrayEffect")
|
|
7876
7884
|
], GodrayEffect);
|
|
7877
7885
|
|
|
7878
|
-
var __defProp$
|
|
7879
|
-
var __getOwnPropDesc$
|
|
7880
|
-
var __defNormalProp$
|
|
7881
|
-
var __decorateClass$
|
|
7882
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
7886
|
+
var __defProp$t = Object.defineProperty;
|
|
7887
|
+
var __getOwnPropDesc$r = Object.getOwnPropertyDescriptor;
|
|
7888
|
+
var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$t(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7889
|
+
var __decorateClass$t = (decorators, target, key, kind) => {
|
|
7890
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$r(target, key) : target;
|
|
7883
7891
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7884
7892
|
if (decorator = decorators[i])
|
|
7885
7893
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7886
|
-
if (kind && result) __defProp$
|
|
7894
|
+
if (kind && result) __defProp$t(target, key, result);
|
|
7887
7895
|
return result;
|
|
7888
7896
|
};
|
|
7889
|
-
var __publicField$
|
|
7897
|
+
var __publicField$9 = (obj, key, value) => __defNormalProp$9(obj, key + "" , value);
|
|
7890
7898
|
let MaskEffect = class extends Effect {
|
|
7891
7899
|
texture;
|
|
7892
7900
|
constructor(properties, children = []) {
|
|
@@ -7924,7 +7932,7 @@ let MaskEffect = class extends Effect {
|
|
|
7924
7932
|
}
|
|
7925
7933
|
}
|
|
7926
7934
|
};
|
|
7927
|
-
__publicField$
|
|
7935
|
+
__publicField$9(MaskEffect, "material", new Material({
|
|
7928
7936
|
vert: `precision mediump float;
|
|
7929
7937
|
attribute vec2 position;
|
|
7930
7938
|
attribute vec2 uv;
|
|
@@ -7957,28 +7965,28 @@ void main(void) {
|
|
|
7957
7965
|
}
|
|
7958
7966
|
}`
|
|
7959
7967
|
}));
|
|
7960
|
-
__decorateClass$
|
|
7968
|
+
__decorateClass$t([
|
|
7961
7969
|
protectedProperty()
|
|
7962
7970
|
], MaskEffect.prototype, "texture", 2);
|
|
7963
|
-
__decorateClass$
|
|
7971
|
+
__decorateClass$t([
|
|
7964
7972
|
property({ default: "" })
|
|
7965
7973
|
], MaskEffect.prototype, "src", 2);
|
|
7966
|
-
MaskEffect = __decorateClass$
|
|
7974
|
+
MaskEffect = __decorateClass$t([
|
|
7967
7975
|
customNode("MaskEffect")
|
|
7968
7976
|
], MaskEffect);
|
|
7969
7977
|
|
|
7970
|
-
var __defProp$
|
|
7971
|
-
var __getOwnPropDesc$
|
|
7972
|
-
var __defNormalProp$
|
|
7973
|
-
var __decorateClass$
|
|
7974
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
7978
|
+
var __defProp$s = Object.defineProperty;
|
|
7979
|
+
var __getOwnPropDesc$q = Object.getOwnPropertyDescriptor;
|
|
7980
|
+
var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$s(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7981
|
+
var __decorateClass$s = (decorators, target, key, kind) => {
|
|
7982
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$q(target, key) : target;
|
|
7975
7983
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7976
7984
|
if (decorator = decorators[i])
|
|
7977
7985
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7978
|
-
if (kind && result) __defProp$
|
|
7986
|
+
if (kind && result) __defProp$s(target, key, result);
|
|
7979
7987
|
return result;
|
|
7980
7988
|
};
|
|
7981
|
-
var __publicField$
|
|
7989
|
+
var __publicField$8 = (obj, key, value) => __defNormalProp$8(obj, key + "" , value);
|
|
7982
7990
|
let PixelateEffect = class extends Effect {
|
|
7983
7991
|
size;
|
|
7984
7992
|
constructor(size = 10) {
|
|
@@ -7995,7 +8003,7 @@ let PixelateEffect = class extends Effect {
|
|
|
7995
8003
|
});
|
|
7996
8004
|
}
|
|
7997
8005
|
};
|
|
7998
|
-
__publicField$
|
|
8006
|
+
__publicField$8(PixelateEffect, "material", new Material({
|
|
7999
8007
|
vert: `precision mediump float;
|
|
8000
8008
|
attribute vec2 position;
|
|
8001
8009
|
attribute vec2 uv;
|
|
@@ -8032,25 +8040,25 @@ void main(void) {
|
|
|
8032
8040
|
gl_FragColor = texture2D(sampler, coord);
|
|
8033
8041
|
}`
|
|
8034
8042
|
}));
|
|
8035
|
-
__decorateClass$
|
|
8043
|
+
__decorateClass$s([
|
|
8036
8044
|
property()
|
|
8037
8045
|
], PixelateEffect.prototype, "size", 2);
|
|
8038
|
-
PixelateEffect = __decorateClass$
|
|
8046
|
+
PixelateEffect = __decorateClass$s([
|
|
8039
8047
|
customNode("PixelateEffect")
|
|
8040
8048
|
], PixelateEffect);
|
|
8041
8049
|
|
|
8042
|
-
var __defProp$
|
|
8043
|
-
var __getOwnPropDesc$
|
|
8044
|
-
var __defNormalProp$
|
|
8045
|
-
var __decorateClass$
|
|
8046
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
8050
|
+
var __defProp$r = Object.defineProperty;
|
|
8051
|
+
var __getOwnPropDesc$p = Object.getOwnPropertyDescriptor;
|
|
8052
|
+
var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$r(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8053
|
+
var __decorateClass$r = (decorators, target, key, kind) => {
|
|
8054
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$p(target, key) : target;
|
|
8047
8055
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
8048
8056
|
if (decorator = decorators[i])
|
|
8049
8057
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8050
|
-
if (kind && result) __defProp$
|
|
8058
|
+
if (kind && result) __defProp$r(target, key, result);
|
|
8051
8059
|
return result;
|
|
8052
8060
|
};
|
|
8053
|
-
var __publicField$
|
|
8061
|
+
var __publicField$7 = (obj, key, value) => __defNormalProp$7(obj, key + "" , value);
|
|
8054
8062
|
let ShadowEffect = class extends Effect {
|
|
8055
8063
|
blur = new BlurEffect();
|
|
8056
8064
|
viewport3 = new Viewport();
|
|
@@ -8077,7 +8085,7 @@ let ShadowEffect = class extends Effect {
|
|
|
8077
8085
|
});
|
|
8078
8086
|
}
|
|
8079
8087
|
};
|
|
8080
|
-
__publicField$
|
|
8088
|
+
__publicField$7(ShadowEffect, "material", new Material({
|
|
8081
8089
|
vert: `precision mediump float;
|
|
8082
8090
|
attribute vec2 position;
|
|
8083
8091
|
attribute vec2 uv;
|
|
@@ -8100,22 +8108,22 @@ void main(void) {
|
|
|
8100
8108
|
gl_FragColor = sample;
|
|
8101
8109
|
}`
|
|
8102
8110
|
}));
|
|
8103
|
-
ShadowEffect = __decorateClass$
|
|
8111
|
+
ShadowEffect = __decorateClass$r([
|
|
8104
8112
|
customNode("ShadowEffect")
|
|
8105
8113
|
], ShadowEffect);
|
|
8106
8114
|
|
|
8107
|
-
var __defProp$
|
|
8108
|
-
var __getOwnPropDesc$
|
|
8109
|
-
var __defNormalProp$
|
|
8110
|
-
var __decorateClass$
|
|
8111
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
8115
|
+
var __defProp$q = Object.defineProperty;
|
|
8116
|
+
var __getOwnPropDesc$o = Object.getOwnPropertyDescriptor;
|
|
8117
|
+
var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8118
|
+
var __decorateClass$q = (decorators, target, key, kind) => {
|
|
8119
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$o(target, key) : target;
|
|
8112
8120
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
8113
8121
|
if (decorator = decorators[i])
|
|
8114
8122
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8115
|
-
if (kind && result) __defProp$
|
|
8123
|
+
if (kind && result) __defProp$q(target, key, result);
|
|
8116
8124
|
return result;
|
|
8117
8125
|
};
|
|
8118
|
-
var __publicField$
|
|
8126
|
+
var __publicField$6 = (obj, key, value) => __defNormalProp$6(obj, key + "" , value);
|
|
8119
8127
|
let ZoomBlurEffect = class extends Effect {
|
|
8120
8128
|
center;
|
|
8121
8129
|
innerRadius = 20;
|
|
@@ -8134,7 +8142,7 @@ let ZoomBlurEffect = class extends Effect {
|
|
|
8134
8142
|
});
|
|
8135
8143
|
}
|
|
8136
8144
|
};
|
|
8137
|
-
__publicField$
|
|
8145
|
+
__publicField$6(ZoomBlurEffect, "material", new Material({
|
|
8138
8146
|
vert: `attribute vec2 position;
|
|
8139
8147
|
attribute vec2 uv;
|
|
8140
8148
|
varying vec2 vUv;
|
|
@@ -8218,30 +8226,30 @@ void main() {
|
|
|
8218
8226
|
gl_FragColor = color;
|
|
8219
8227
|
}`
|
|
8220
8228
|
}));
|
|
8221
|
-
__decorateClass$
|
|
8229
|
+
__decorateClass$q([
|
|
8222
8230
|
property()
|
|
8223
8231
|
], ZoomBlurEffect.prototype, "center", 2);
|
|
8224
|
-
__decorateClass$
|
|
8232
|
+
__decorateClass$q([
|
|
8225
8233
|
property()
|
|
8226
8234
|
], ZoomBlurEffect.prototype, "innerRadius", 2);
|
|
8227
|
-
__decorateClass$
|
|
8235
|
+
__decorateClass$q([
|
|
8228
8236
|
property()
|
|
8229
8237
|
], ZoomBlurEffect.prototype, "radius", 2);
|
|
8230
|
-
__decorateClass$
|
|
8238
|
+
__decorateClass$q([
|
|
8231
8239
|
property()
|
|
8232
8240
|
], ZoomBlurEffect.prototype, "strength", 2);
|
|
8233
|
-
ZoomBlurEffect = __decorateClass$
|
|
8241
|
+
ZoomBlurEffect = __decorateClass$q([
|
|
8234
8242
|
customNode("ZoomBlurEffect")
|
|
8235
8243
|
], ZoomBlurEffect);
|
|
8236
8244
|
|
|
8237
|
-
var __defProp$
|
|
8238
|
-
var __getOwnPropDesc$
|
|
8239
|
-
var __decorateClass$
|
|
8240
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
8245
|
+
var __defProp$p = Object.defineProperty;
|
|
8246
|
+
var __getOwnPropDesc$n = Object.getOwnPropertyDescriptor;
|
|
8247
|
+
var __decorateClass$p = (decorators, target, key, kind) => {
|
|
8248
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$n(target, key) : target;
|
|
8241
8249
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
8242
8250
|
if (decorator = decorators[i])
|
|
8243
8251
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8244
|
-
if (kind && result) __defProp$
|
|
8252
|
+
if (kind && result) __defProp$p(target, key, result);
|
|
8245
8253
|
return result;
|
|
8246
8254
|
};
|
|
8247
8255
|
let CanvasItem = class extends TimelineNode {
|
|
@@ -8333,7 +8341,7 @@ let CanvasItem = class extends TimelineNode {
|
|
|
8333
8341
|
if (this.style.boxShadow !== "none") {
|
|
8334
8342
|
const node = this.getNode(nodePath);
|
|
8335
8343
|
if (node) ; else {
|
|
8336
|
-
this.
|
|
8344
|
+
this.appendChild(new ShadowEffect(), "back");
|
|
8337
8345
|
}
|
|
8338
8346
|
} else {
|
|
8339
8347
|
const node = this.getNode(nodePath);
|
|
@@ -8350,7 +8358,7 @@ let CanvasItem = class extends TimelineNode {
|
|
|
8350
8358
|
if (node) {
|
|
8351
8359
|
node.src = maskImage;
|
|
8352
8360
|
} else {
|
|
8353
|
-
this.
|
|
8361
|
+
this.appendChild(new MaskEffect({ src: maskImage }), "back");
|
|
8354
8362
|
}
|
|
8355
8363
|
} else {
|
|
8356
8364
|
const node = this.getNode(nodePath);
|
|
@@ -8536,17 +8544,17 @@ let CanvasItem = class extends TimelineNode {
|
|
|
8536
8544
|
};
|
|
8537
8545
|
}
|
|
8538
8546
|
};
|
|
8539
|
-
__decorateClass$
|
|
8547
|
+
__decorateClass$p([
|
|
8540
8548
|
property()
|
|
8541
8549
|
], CanvasItem.prototype, "modulate", 2);
|
|
8542
|
-
__decorateClass$
|
|
8550
|
+
__decorateClass$p([
|
|
8543
8551
|
property()
|
|
8544
8552
|
], CanvasItem.prototype, "blendMode", 2);
|
|
8545
|
-
CanvasItem = __decorateClass$
|
|
8553
|
+
CanvasItem = __decorateClass$p([
|
|
8546
8554
|
customNode("CanvasItem")
|
|
8547
8555
|
], CanvasItem);
|
|
8548
8556
|
|
|
8549
|
-
class RenderStack
|
|
8557
|
+
class RenderStack {
|
|
8550
8558
|
currentCall;
|
|
8551
8559
|
calls = [];
|
|
8552
8560
|
createCall(renderable) {
|
|
@@ -8572,14 +8580,14 @@ class RenderStack extends Node {
|
|
|
8572
8580
|
}
|
|
8573
8581
|
}
|
|
8574
8582
|
|
|
8575
|
-
var __defProp$
|
|
8576
|
-
var __getOwnPropDesc$
|
|
8577
|
-
var __decorateClass$
|
|
8578
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
8583
|
+
var __defProp$o = Object.defineProperty;
|
|
8584
|
+
var __getOwnPropDesc$m = Object.getOwnPropertyDescriptor;
|
|
8585
|
+
var __decorateClass$o = (decorators, target, key, kind) => {
|
|
8586
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$m(target, key) : target;
|
|
8579
8587
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
8580
8588
|
if (decorator = decorators[i])
|
|
8581
8589
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8582
|
-
if (kind && result) __defProp$
|
|
8590
|
+
if (kind && result) __defProp$o(target, key, result);
|
|
8583
8591
|
return result;
|
|
8584
8592
|
};
|
|
8585
8593
|
let Timeline = class extends Node {
|
|
@@ -8624,29 +8632,29 @@ let Timeline = class extends Node {
|
|
|
8624
8632
|
this.addTime(delta);
|
|
8625
8633
|
}
|
|
8626
8634
|
};
|
|
8627
|
-
__decorateClass$
|
|
8635
|
+
__decorateClass$o([
|
|
8628
8636
|
property({ default: 0 })
|
|
8629
8637
|
], Timeline.prototype, "startTime", 2);
|
|
8630
|
-
__decorateClass$
|
|
8638
|
+
__decorateClass$o([
|
|
8631
8639
|
property({ default: 0 })
|
|
8632
8640
|
], Timeline.prototype, "currentTime", 2);
|
|
8633
|
-
__decorateClass$
|
|
8641
|
+
__decorateClass$o([
|
|
8634
8642
|
property({ default: Number.MAX_SAFE_INTEGER })
|
|
8635
8643
|
], Timeline.prototype, "endTime", 2);
|
|
8636
|
-
__decorateClass$
|
|
8644
|
+
__decorateClass$o([
|
|
8637
8645
|
property({ default: false })
|
|
8638
8646
|
], Timeline.prototype, "loop", 2);
|
|
8639
|
-
Timeline = __decorateClass$
|
|
8647
|
+
Timeline = __decorateClass$o([
|
|
8640
8648
|
customNode("Timeline")
|
|
8641
8649
|
], Timeline);
|
|
8642
8650
|
|
|
8643
|
-
var __defProp$
|
|
8644
|
-
var __decorateClass$
|
|
8651
|
+
var __defProp$n = Object.defineProperty;
|
|
8652
|
+
var __decorateClass$n = (decorators, target, key, kind) => {
|
|
8645
8653
|
var result = undefined ;
|
|
8646
8654
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
8647
8655
|
if (decorator = decorators[i])
|
|
8648
8656
|
result = (decorator(target, key, result) ) || result;
|
|
8649
|
-
if (result) __defProp$
|
|
8657
|
+
if (result) __defProp$n(target, key, result);
|
|
8650
8658
|
return result;
|
|
8651
8659
|
};
|
|
8652
8660
|
class SceneTree extends MainLoop {
|
|
@@ -8707,21 +8715,21 @@ class SceneTree extends MainLoop {
|
|
|
8707
8715
|
renderer.texture.unbind(texture);
|
|
8708
8716
|
}
|
|
8709
8717
|
}
|
|
8710
|
-
__decorateClass$
|
|
8718
|
+
__decorateClass$n([
|
|
8711
8719
|
property({ default: false })
|
|
8712
8720
|
], SceneTree.prototype, "paused");
|
|
8713
|
-
__decorateClass$
|
|
8721
|
+
__decorateClass$n([
|
|
8714
8722
|
property()
|
|
8715
8723
|
], SceneTree.prototype, "backgroundColor");
|
|
8716
8724
|
|
|
8717
|
-
var __defProp$
|
|
8718
|
-
var __getOwnPropDesc$
|
|
8719
|
-
var __decorateClass$
|
|
8720
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
8725
|
+
var __defProp$m = Object.defineProperty;
|
|
8726
|
+
var __getOwnPropDesc$l = Object.getOwnPropertyDescriptor;
|
|
8727
|
+
var __decorateClass$m = (decorators, target, key, kind) => {
|
|
8728
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$l(target, key) : target;
|
|
8721
8729
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
8722
8730
|
if (decorator = decorators[i])
|
|
8723
8731
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8724
|
-
if (kind && result) __defProp$
|
|
8732
|
+
if (kind && result) __defProp$m(target, key, result);
|
|
8725
8733
|
return result;
|
|
8726
8734
|
};
|
|
8727
8735
|
let Transition = class extends Effect {
|
|
@@ -8730,7 +8738,7 @@ let Transition = class extends Effect {
|
|
|
8730
8738
|
this.setProperties(properties).append(children);
|
|
8731
8739
|
}
|
|
8732
8740
|
};
|
|
8733
|
-
Transition = __decorateClass$
|
|
8741
|
+
Transition = __decorateClass$m([
|
|
8734
8742
|
customNode("Transition", {
|
|
8735
8743
|
effectMode: "transition",
|
|
8736
8744
|
processMode: "pausable",
|
|
@@ -8738,14 +8746,14 @@ Transition = __decorateClass$k([
|
|
|
8738
8746
|
})
|
|
8739
8747
|
], Transition);
|
|
8740
8748
|
|
|
8741
|
-
var __defProp$
|
|
8742
|
-
var __getOwnPropDesc$
|
|
8743
|
-
var __decorateClass$
|
|
8744
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
8749
|
+
var __defProp$l = Object.defineProperty;
|
|
8750
|
+
var __getOwnPropDesc$k = Object.getOwnPropertyDescriptor;
|
|
8751
|
+
var __decorateClass$l = (decorators, target, key, kind) => {
|
|
8752
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$k(target, key) : target;
|
|
8745
8753
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
8746
8754
|
if (decorator = decorators[i])
|
|
8747
8755
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8748
|
-
if (kind && result) __defProp$
|
|
8756
|
+
if (kind && result) __defProp$l(target, key, result);
|
|
8749
8757
|
return result;
|
|
8750
8758
|
};
|
|
8751
8759
|
let Node2D = class extends CanvasItem {
|
|
@@ -8886,18 +8894,18 @@ let Node2D = class extends CanvasItem {
|
|
|
8886
8894
|
);
|
|
8887
8895
|
}
|
|
8888
8896
|
};
|
|
8889
|
-
Node2D = __decorateClass$
|
|
8897
|
+
Node2D = __decorateClass$l([
|
|
8890
8898
|
customNode("Node2D")
|
|
8891
8899
|
], Node2D);
|
|
8892
8900
|
|
|
8893
|
-
var __defProp$
|
|
8894
|
-
var __getOwnPropDesc$
|
|
8895
|
-
var __decorateClass$
|
|
8896
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
8901
|
+
var __defProp$k = Object.defineProperty;
|
|
8902
|
+
var __getOwnPropDesc$j = Object.getOwnPropertyDescriptor;
|
|
8903
|
+
var __decorateClass$k = (decorators, target, key, kind) => {
|
|
8904
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$j(target, key) : target;
|
|
8897
8905
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
8898
8906
|
if (decorator = decorators[i])
|
|
8899
8907
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8900
|
-
if (kind && result) __defProp$
|
|
8908
|
+
if (kind && result) __defProp$k(target, key, result);
|
|
8901
8909
|
return result;
|
|
8902
8910
|
};
|
|
8903
8911
|
function proxy(options) {
|
|
@@ -8942,61 +8950,61 @@ let Graphics2D = class extends Node2D {
|
|
|
8942
8950
|
return this;
|
|
8943
8951
|
}
|
|
8944
8952
|
};
|
|
8945
|
-
__decorateClass$
|
|
8953
|
+
__decorateClass$k([
|
|
8946
8954
|
proxy()
|
|
8947
8955
|
], Graphics2D.prototype, "lineCap", 2);
|
|
8948
|
-
__decorateClass$
|
|
8956
|
+
__decorateClass$k([
|
|
8949
8957
|
proxy()
|
|
8950
8958
|
], Graphics2D.prototype, "lineJoin", 2);
|
|
8951
|
-
__decorateClass$
|
|
8959
|
+
__decorateClass$k([
|
|
8952
8960
|
proxy()
|
|
8953
8961
|
], Graphics2D.prototype, "fillStyle", 2);
|
|
8954
|
-
__decorateClass$
|
|
8962
|
+
__decorateClass$k([
|
|
8955
8963
|
proxy()
|
|
8956
8964
|
], Graphics2D.prototype, "strokeStyle", 2);
|
|
8957
|
-
__decorateClass$
|
|
8965
|
+
__decorateClass$k([
|
|
8958
8966
|
proxy()
|
|
8959
8967
|
], Graphics2D.prototype, "lineWidth", 2);
|
|
8960
|
-
__decorateClass$
|
|
8968
|
+
__decorateClass$k([
|
|
8961
8969
|
proxy()
|
|
8962
8970
|
], Graphics2D.prototype, "miterLimit", 2);
|
|
8963
|
-
__decorateClass$
|
|
8971
|
+
__decorateClass$k([
|
|
8964
8972
|
proxy({ method: true })
|
|
8965
8973
|
], Graphics2D.prototype, "rect", 2);
|
|
8966
|
-
__decorateClass$
|
|
8974
|
+
__decorateClass$k([
|
|
8967
8975
|
proxy({ method: true, redraw: true })
|
|
8968
8976
|
], Graphics2D.prototype, "fillRect", 2);
|
|
8969
|
-
__decorateClass$
|
|
8977
|
+
__decorateClass$k([
|
|
8970
8978
|
proxy({ method: true, redraw: true })
|
|
8971
8979
|
], Graphics2D.prototype, "strokeRect", 2);
|
|
8972
|
-
__decorateClass$
|
|
8980
|
+
__decorateClass$k([
|
|
8973
8981
|
proxy({ method: true })
|
|
8974
8982
|
], Graphics2D.prototype, "roundRect", 2);
|
|
8975
|
-
__decorateClass$
|
|
8983
|
+
__decorateClass$k([
|
|
8976
8984
|
proxy({ method: true })
|
|
8977
8985
|
], Graphics2D.prototype, "ellipse", 2);
|
|
8978
|
-
__decorateClass$
|
|
8986
|
+
__decorateClass$k([
|
|
8979
8987
|
proxy({ method: true })
|
|
8980
8988
|
], Graphics2D.prototype, "arc", 2);
|
|
8981
|
-
__decorateClass$
|
|
8989
|
+
__decorateClass$k([
|
|
8982
8990
|
proxy({ method: true })
|
|
8983
8991
|
], Graphics2D.prototype, "beginPath", 2);
|
|
8984
|
-
__decorateClass$
|
|
8992
|
+
__decorateClass$k([
|
|
8985
8993
|
proxy({ method: true })
|
|
8986
8994
|
], Graphics2D.prototype, "moveTo", 2);
|
|
8987
|
-
__decorateClass$
|
|
8995
|
+
__decorateClass$k([
|
|
8988
8996
|
proxy({ method: true })
|
|
8989
8997
|
], Graphics2D.prototype, "lineTo", 2);
|
|
8990
|
-
__decorateClass$
|
|
8998
|
+
__decorateClass$k([
|
|
8991
8999
|
proxy({ method: true })
|
|
8992
9000
|
], Graphics2D.prototype, "closePath", 2);
|
|
8993
|
-
__decorateClass$
|
|
9001
|
+
__decorateClass$k([
|
|
8994
9002
|
proxy({ method: true, redraw: true })
|
|
8995
9003
|
], Graphics2D.prototype, "fill", 2);
|
|
8996
|
-
__decorateClass$
|
|
9004
|
+
__decorateClass$k([
|
|
8997
9005
|
proxy({ method: true, redraw: true })
|
|
8998
9006
|
], Graphics2D.prototype, "stroke", 2);
|
|
8999
|
-
Graphics2D = __decorateClass$
|
|
9007
|
+
Graphics2D = __decorateClass$k([
|
|
9000
9008
|
customNode("Graphics2D")
|
|
9001
9009
|
], Graphics2D);
|
|
9002
9010
|
|
|
@@ -9026,14 +9034,14 @@ class Image2DResource extends Resource {
|
|
|
9026
9034
|
}
|
|
9027
9035
|
}
|
|
9028
9036
|
|
|
9029
|
-
var __defProp$
|
|
9030
|
-
var __getOwnPropDesc$
|
|
9031
|
-
var __decorateClass$
|
|
9032
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
9037
|
+
var __defProp$j = Object.defineProperty;
|
|
9038
|
+
var __getOwnPropDesc$i = Object.getOwnPropertyDescriptor;
|
|
9039
|
+
var __decorateClass$j = (decorators, target, key, kind) => {
|
|
9040
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$i(target, key) : target;
|
|
9033
9041
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
9034
9042
|
if (decorator = decorators[i])
|
|
9035
9043
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
9036
|
-
if (kind && result) __defProp$
|
|
9044
|
+
if (kind && result) __defProp$j(target, key, result);
|
|
9037
9045
|
return result;
|
|
9038
9046
|
};
|
|
9039
9047
|
let Image2D = class extends Node2D {
|
|
@@ -9153,16 +9161,16 @@ let Image2D = class extends Node2D {
|
|
|
9153
9161
|
}
|
|
9154
9162
|
}
|
|
9155
9163
|
};
|
|
9156
|
-
__decorateClass$
|
|
9164
|
+
__decorateClass$j([
|
|
9157
9165
|
protectedProperty()
|
|
9158
9166
|
], Image2D.prototype, "resource", 2);
|
|
9159
|
-
__decorateClass$
|
|
9167
|
+
__decorateClass$j([
|
|
9160
9168
|
property({ default: false })
|
|
9161
9169
|
], Image2D.prototype, "gif", 2);
|
|
9162
|
-
__decorateClass$
|
|
9170
|
+
__decorateClass$j([
|
|
9163
9171
|
property({ default: "" })
|
|
9164
9172
|
], Image2D.prototype, "src", 2);
|
|
9165
|
-
Image2D = __decorateClass$
|
|
9173
|
+
Image2D = __decorateClass$j([
|
|
9166
9174
|
customNode("Image2D")
|
|
9167
9175
|
], Image2D);
|
|
9168
9176
|
|
|
@@ -9180,14 +9188,14 @@ class TextureRect2D extends Node2D {
|
|
|
9180
9188
|
}
|
|
9181
9189
|
}
|
|
9182
9190
|
|
|
9183
|
-
var __defProp$
|
|
9184
|
-
var __getOwnPropDesc$
|
|
9185
|
-
var __decorateClass$
|
|
9186
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
9191
|
+
var __defProp$i = Object.defineProperty;
|
|
9192
|
+
var __getOwnPropDesc$h = Object.getOwnPropertyDescriptor;
|
|
9193
|
+
var __decorateClass$i = (decorators, target, key, kind) => {
|
|
9194
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$h(target, key) : target;
|
|
9187
9195
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
9188
9196
|
if (decorator = decorators[i])
|
|
9189
9197
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
9190
|
-
if (kind && result) __defProp$
|
|
9198
|
+
if (kind && result) __defProp$i(target, key, result);
|
|
9191
9199
|
return result;
|
|
9192
9200
|
};
|
|
9193
9201
|
let Lottie2D = class extends TextureRect2D {
|
|
@@ -9230,21 +9238,21 @@ let Lottie2D = class extends TextureRect2D {
|
|
|
9230
9238
|
super._process(delta);
|
|
9231
9239
|
}
|
|
9232
9240
|
};
|
|
9233
|
-
__decorateClass$
|
|
9241
|
+
__decorateClass$i([
|
|
9234
9242
|
property({ default: "" })
|
|
9235
9243
|
], Lottie2D.prototype, "src", 2);
|
|
9236
|
-
Lottie2D = __decorateClass$
|
|
9244
|
+
Lottie2D = __decorateClass$i([
|
|
9237
9245
|
customNode("Lottie2D")
|
|
9238
9246
|
], Lottie2D);
|
|
9239
9247
|
|
|
9240
|
-
var __defProp$
|
|
9241
|
-
var __getOwnPropDesc$
|
|
9242
|
-
var __decorateClass$
|
|
9243
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
9248
|
+
var __defProp$h = Object.defineProperty;
|
|
9249
|
+
var __getOwnPropDesc$g = Object.getOwnPropertyDescriptor;
|
|
9250
|
+
var __decorateClass$h = (decorators, target, key, kind) => {
|
|
9251
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$g(target, key) : target;
|
|
9244
9252
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
9245
9253
|
if (decorator = decorators[i])
|
|
9246
9254
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
9247
|
-
if (kind && result) __defProp$
|
|
9255
|
+
if (kind && result) __defProp$h(target, key, result);
|
|
9248
9256
|
return result;
|
|
9249
9257
|
};
|
|
9250
9258
|
const textStyles = new Set(Object.keys(textDefaultStyle));
|
|
@@ -9345,7 +9353,7 @@ let Text2D = class extends TextureRect2D {
|
|
|
9345
9353
|
result.paragraphs.forEach((p) => {
|
|
9346
9354
|
p.fragments.forEach((f) => {
|
|
9347
9355
|
f.characters.forEach((c) => {
|
|
9348
|
-
this.
|
|
9356
|
+
this.appendChild(
|
|
9349
9357
|
new Text2D({
|
|
9350
9358
|
content: c.content,
|
|
9351
9359
|
style: {
|
|
@@ -9382,33 +9390,33 @@ let Text2D = class extends TextureRect2D {
|
|
|
9382
9390
|
}
|
|
9383
9391
|
}
|
|
9384
9392
|
};
|
|
9385
|
-
__decorateClass$
|
|
9393
|
+
__decorateClass$h([
|
|
9386
9394
|
property({ default: false })
|
|
9387
9395
|
], Text2D.prototype, "split", 2);
|
|
9388
|
-
__decorateClass$
|
|
9396
|
+
__decorateClass$h([
|
|
9389
9397
|
property({ default: "" })
|
|
9390
9398
|
], Text2D.prototype, "content", 2);
|
|
9391
|
-
__decorateClass$
|
|
9399
|
+
__decorateClass$h([
|
|
9392
9400
|
property()
|
|
9393
9401
|
], Text2D.prototype, "effects", 2);
|
|
9394
|
-
__decorateClass$
|
|
9402
|
+
__decorateClass$h([
|
|
9395
9403
|
protectedProperty()
|
|
9396
9404
|
], Text2D.prototype, "measureDom", 2);
|
|
9397
|
-
__decorateClass$
|
|
9405
|
+
__decorateClass$h([
|
|
9398
9406
|
protectedProperty()
|
|
9399
9407
|
], Text2D.prototype, "fonts", 2);
|
|
9400
|
-
Text2D = __decorateClass$
|
|
9408
|
+
Text2D = __decorateClass$h([
|
|
9401
9409
|
customNode("Text2D")
|
|
9402
9410
|
], Text2D);
|
|
9403
9411
|
|
|
9404
|
-
var __defProp$
|
|
9405
|
-
var __getOwnPropDesc$
|
|
9406
|
-
var __decorateClass$
|
|
9407
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
9412
|
+
var __defProp$g = Object.defineProperty;
|
|
9413
|
+
var __getOwnPropDesc$f = Object.getOwnPropertyDescriptor;
|
|
9414
|
+
var __decorateClass$g = (decorators, target, key, kind) => {
|
|
9415
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$f(target, key) : target;
|
|
9408
9416
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
9409
9417
|
if (decorator = decorators[i])
|
|
9410
9418
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
9411
|
-
if (kind && result) __defProp$
|
|
9419
|
+
if (kind && result) __defProp$g(target, key, result);
|
|
9412
9420
|
return result;
|
|
9413
9421
|
};
|
|
9414
9422
|
let Video2D = class extends TextureRect2D {
|
|
@@ -9461,21 +9469,21 @@ let Video2D = class extends TextureRect2D {
|
|
|
9461
9469
|
super._process(delta);
|
|
9462
9470
|
}
|
|
9463
9471
|
};
|
|
9464
|
-
__decorateClass$
|
|
9472
|
+
__decorateClass$g([
|
|
9465
9473
|
property({ default: "" })
|
|
9466
9474
|
], Video2D.prototype, "src", 2);
|
|
9467
|
-
Video2D = __decorateClass$
|
|
9475
|
+
Video2D = __decorateClass$g([
|
|
9468
9476
|
customNode("Video2D")
|
|
9469
9477
|
], Video2D);
|
|
9470
9478
|
|
|
9471
|
-
var __defProp$
|
|
9472
|
-
var __getOwnPropDesc$
|
|
9473
|
-
var __decorateClass$
|
|
9474
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
9479
|
+
var __defProp$f = Object.defineProperty;
|
|
9480
|
+
var __getOwnPropDesc$e = Object.getOwnPropertyDescriptor;
|
|
9481
|
+
var __decorateClass$f = (decorators, target, key, kind) => {
|
|
9482
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$e(target, key) : target;
|
|
9475
9483
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
9476
9484
|
if (decorator = decorators[i])
|
|
9477
9485
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
9478
|
-
if (kind && result) __defProp$
|
|
9486
|
+
if (kind && result) __defProp$f(target, key, result);
|
|
9479
9487
|
return result;
|
|
9480
9488
|
};
|
|
9481
9489
|
const linear = (amount) => amount;
|
|
@@ -9794,19 +9802,19 @@ let Animation = class extends TimelineNode {
|
|
|
9794
9802
|
});
|
|
9795
9803
|
}
|
|
9796
9804
|
};
|
|
9797
|
-
__decorateClass$
|
|
9805
|
+
__decorateClass$f([
|
|
9798
9806
|
property({ default: "parent" })
|
|
9799
9807
|
], Animation.prototype, "effectMode", 2);
|
|
9800
|
-
__decorateClass$
|
|
9808
|
+
__decorateClass$f([
|
|
9801
9809
|
property({ default: false })
|
|
9802
9810
|
], Animation.prototype, "loop", 2);
|
|
9803
|
-
__decorateClass$
|
|
9811
|
+
__decorateClass$f([
|
|
9804
9812
|
property({ default: [] })
|
|
9805
9813
|
], Animation.prototype, "keyframes", 2);
|
|
9806
|
-
__decorateClass$
|
|
9814
|
+
__decorateClass$f([
|
|
9807
9815
|
property()
|
|
9808
9816
|
], Animation.prototype, "easing", 2);
|
|
9809
|
-
Animation = __decorateClass$
|
|
9817
|
+
Animation = __decorateClass$f([
|
|
9810
9818
|
customNode("Animation", {
|
|
9811
9819
|
renderMode: "disabled",
|
|
9812
9820
|
processMode: "pausable",
|
|
@@ -10689,18 +10697,18 @@ class WebAudio extends AudioPipeline {
|
|
|
10689
10697
|
}
|
|
10690
10698
|
}
|
|
10691
10699
|
|
|
10692
|
-
var __defProp$
|
|
10693
|
-
var __getOwnPropDesc$
|
|
10694
|
-
var __defNormalProp$
|
|
10695
|
-
var __decorateClass$
|
|
10696
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
10700
|
+
var __defProp$e = Object.defineProperty;
|
|
10701
|
+
var __getOwnPropDesc$d = Object.getOwnPropertyDescriptor;
|
|
10702
|
+
var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10703
|
+
var __decorateClass$e = (decorators, target, key, kind) => {
|
|
10704
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$d(target, key) : target;
|
|
10697
10705
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
10698
10706
|
if (decorator = decorators[i])
|
|
10699
10707
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
10700
|
-
if (kind && result) __defProp$
|
|
10708
|
+
if (kind && result) __defProp$e(target, key, result);
|
|
10701
10709
|
return result;
|
|
10702
10710
|
};
|
|
10703
|
-
var __publicField$
|
|
10711
|
+
var __publicField$5 = (obj, key, value) => __defNormalProp$5(obj, key + "" , value);
|
|
10704
10712
|
let Audio = class extends TimelineNode {
|
|
10705
10713
|
_sounds = [];
|
|
10706
10714
|
/** PlatformAudio */
|
|
@@ -10904,8 +10912,8 @@ let Audio = class extends TimelineNode {
|
|
|
10904
10912
|
}, 100);
|
|
10905
10913
|
}
|
|
10906
10914
|
};
|
|
10907
|
-
__publicField$
|
|
10908
|
-
Audio = __decorateClass$
|
|
10915
|
+
__publicField$5(Audio, "_soundPool", []);
|
|
10916
|
+
Audio = __decorateClass$e([
|
|
10909
10917
|
customNode("Audio")
|
|
10910
10918
|
], Audio);
|
|
10911
10919
|
|
|
@@ -10913,14 +10921,14 @@ class AudioSpectrum extends Node2D {
|
|
|
10913
10921
|
//
|
|
10914
10922
|
}
|
|
10915
10923
|
|
|
10916
|
-
var __defProp$
|
|
10917
|
-
var __getOwnPropDesc$
|
|
10918
|
-
var __decorateClass$
|
|
10919
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
10924
|
+
var __defProp$d = Object.defineProperty;
|
|
10925
|
+
var __getOwnPropDesc$c = Object.getOwnPropertyDescriptor;
|
|
10926
|
+
var __decorateClass$d = (decorators, target, key, kind) => {
|
|
10927
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$c(target, key) : target;
|
|
10920
10928
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
10921
10929
|
if (decorator = decorators[i])
|
|
10922
10930
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
10923
|
-
if (kind && result) __defProp$
|
|
10931
|
+
if (kind && result) __defProp$d(target, key, result);
|
|
10924
10932
|
return result;
|
|
10925
10933
|
};
|
|
10926
10934
|
let AudioWaveform = class extends Node2D {
|
|
@@ -11014,27 +11022,27 @@ let AudioWaveform = class extends Node2D {
|
|
|
11014
11022
|
}
|
|
11015
11023
|
}
|
|
11016
11024
|
};
|
|
11017
|
-
__decorateClass$
|
|
11025
|
+
__decorateClass$d([
|
|
11018
11026
|
property()
|
|
11019
11027
|
], AudioWaveform.prototype, "src", 2);
|
|
11020
|
-
__decorateClass$
|
|
11028
|
+
__decorateClass$d([
|
|
11021
11029
|
property()
|
|
11022
11030
|
], AudioWaveform.prototype, "gap", 2);
|
|
11023
|
-
__decorateClass$
|
|
11031
|
+
__decorateClass$d([
|
|
11024
11032
|
property()
|
|
11025
11033
|
], AudioWaveform.prototype, "color", 2);
|
|
11026
|
-
AudioWaveform = __decorateClass$
|
|
11034
|
+
AudioWaveform = __decorateClass$d([
|
|
11027
11035
|
customNode("AudioWaveform")
|
|
11028
11036
|
], AudioWaveform);
|
|
11029
11037
|
|
|
11030
|
-
var __defProp$
|
|
11031
|
-
var __getOwnPropDesc$
|
|
11032
|
-
var __decorateClass$
|
|
11033
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
11038
|
+
var __defProp$c = Object.defineProperty;
|
|
11039
|
+
var __getOwnPropDesc$b = Object.getOwnPropertyDescriptor;
|
|
11040
|
+
var __decorateClass$c = (decorators, target, key, kind) => {
|
|
11041
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$b(target, key) : target;
|
|
11034
11042
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
11035
11043
|
if (decorator = decorators[i])
|
|
11036
11044
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
11037
|
-
if (kind && result) __defProp$
|
|
11045
|
+
if (kind && result) __defProp$c(target, key, result);
|
|
11038
11046
|
return result;
|
|
11039
11047
|
};
|
|
11040
11048
|
let Control = class extends CanvasItem {
|
|
@@ -11094,18 +11102,18 @@ let Control = class extends CanvasItem {
|
|
|
11094
11102
|
return new Rect2(left, top, width, height);
|
|
11095
11103
|
}
|
|
11096
11104
|
};
|
|
11097
|
-
Control = __decorateClass$
|
|
11105
|
+
Control = __decorateClass$c([
|
|
11098
11106
|
customNode("Control")
|
|
11099
11107
|
], Control);
|
|
11100
11108
|
|
|
11101
|
-
var __defProp$
|
|
11102
|
-
var __getOwnPropDesc$
|
|
11103
|
-
var __decorateClass$
|
|
11104
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
11109
|
+
var __defProp$b = Object.defineProperty;
|
|
11110
|
+
var __getOwnPropDesc$a = Object.getOwnPropertyDescriptor;
|
|
11111
|
+
var __decorateClass$b = (decorators, target, key, kind) => {
|
|
11112
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$a(target, key) : target;
|
|
11105
11113
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
11106
11114
|
if (decorator = decorators[i])
|
|
11107
11115
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
11108
|
-
if (kind && result) __defProp$
|
|
11116
|
+
if (kind && result) __defProp$b(target, key, result);
|
|
11109
11117
|
return result;
|
|
11110
11118
|
};
|
|
11111
11119
|
let Range = class extends Control {
|
|
@@ -11128,39 +11136,39 @@ let Range = class extends Control {
|
|
|
11128
11136
|
}
|
|
11129
11137
|
}
|
|
11130
11138
|
};
|
|
11131
|
-
__decorateClass$
|
|
11139
|
+
__decorateClass$b([
|
|
11132
11140
|
property({ default: false })
|
|
11133
11141
|
], Range.prototype, "allowGreater", 2);
|
|
11134
|
-
__decorateClass$
|
|
11142
|
+
__decorateClass$b([
|
|
11135
11143
|
property({ default: false })
|
|
11136
11144
|
], Range.prototype, "allowLesser", 2);
|
|
11137
|
-
__decorateClass$
|
|
11145
|
+
__decorateClass$b([
|
|
11138
11146
|
property({ default: 1 })
|
|
11139
11147
|
], Range.prototype, "page", 2);
|
|
11140
|
-
__decorateClass$
|
|
11148
|
+
__decorateClass$b([
|
|
11141
11149
|
property({ default: 0 })
|
|
11142
11150
|
], Range.prototype, "minValue", 2);
|
|
11143
|
-
__decorateClass$
|
|
11151
|
+
__decorateClass$b([
|
|
11144
11152
|
property({ default: 100 })
|
|
11145
11153
|
], Range.prototype, "maxValue", 2);
|
|
11146
|
-
__decorateClass$
|
|
11154
|
+
__decorateClass$b([
|
|
11147
11155
|
property({ default: 0.01 })
|
|
11148
11156
|
], Range.prototype, "step", 2);
|
|
11149
|
-
__decorateClass$
|
|
11157
|
+
__decorateClass$b([
|
|
11150
11158
|
property({ default: 0 })
|
|
11151
11159
|
], Range.prototype, "value", 2);
|
|
11152
|
-
Range = __decorateClass$
|
|
11160
|
+
Range = __decorateClass$b([
|
|
11153
11161
|
customNode("Range")
|
|
11154
11162
|
], Range);
|
|
11155
11163
|
|
|
11156
|
-
var __defProp$
|
|
11157
|
-
var __getOwnPropDesc$
|
|
11158
|
-
var __decorateClass$
|
|
11159
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
11164
|
+
var __defProp$a = Object.defineProperty;
|
|
11165
|
+
var __getOwnPropDesc$9 = Object.getOwnPropertyDescriptor;
|
|
11166
|
+
var __decorateClass$a = (decorators, target, key, kind) => {
|
|
11167
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$9(target, key) : target;
|
|
11160
11168
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
11161
11169
|
if (decorator = decorators[i])
|
|
11162
11170
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
11163
|
-
if (kind && result) __defProp$
|
|
11171
|
+
if (kind && result) __defProp$a(target, key, result);
|
|
11164
11172
|
return result;
|
|
11165
11173
|
};
|
|
11166
11174
|
let Ruler = class extends Control {
|
|
@@ -11311,45 +11319,45 @@ let Ruler = class extends Control {
|
|
|
11311
11319
|
}
|
|
11312
11320
|
}
|
|
11313
11321
|
};
|
|
11314
|
-
__decorateClass$
|
|
11322
|
+
__decorateClass$a([
|
|
11315
11323
|
property({ default: 0 })
|
|
11316
11324
|
], Ruler.prototype, "offsetX", 2);
|
|
11317
|
-
__decorateClass$
|
|
11325
|
+
__decorateClass$a([
|
|
11318
11326
|
property({ default: 0 })
|
|
11319
11327
|
], Ruler.prototype, "offsetY", 2);
|
|
11320
|
-
__decorateClass$
|
|
11328
|
+
__decorateClass$a([
|
|
11321
11329
|
property({ default: 20 })
|
|
11322
11330
|
], Ruler.prototype, "thickness", 2);
|
|
11323
|
-
__decorateClass$
|
|
11331
|
+
__decorateClass$a([
|
|
11324
11332
|
property({ default: 3 })
|
|
11325
11333
|
], Ruler.prototype, "markHeight", 2);
|
|
11326
|
-
__decorateClass$
|
|
11334
|
+
__decorateClass$a([
|
|
11327
11335
|
property({ default: "#b2b6bc" })
|
|
11328
11336
|
], Ruler.prototype, "color", 2);
|
|
11329
|
-
__decorateClass$
|
|
11337
|
+
__decorateClass$a([
|
|
11330
11338
|
property({ default: "#f9f9fa" })
|
|
11331
11339
|
], Ruler.prototype, "markBackgroundColor", 2);
|
|
11332
|
-
__decorateClass$
|
|
11340
|
+
__decorateClass$a([
|
|
11333
11341
|
property({ default: "#b2b6bc" })
|
|
11334
11342
|
], Ruler.prototype, "markColor", 2);
|
|
11335
|
-
__decorateClass$
|
|
11343
|
+
__decorateClass$a([
|
|
11336
11344
|
property({ default: 300 })
|
|
11337
11345
|
], Ruler.prototype, "gap", 2);
|
|
11338
|
-
__decorateClass$
|
|
11346
|
+
__decorateClass$a([
|
|
11339
11347
|
property({ default: 1 })
|
|
11340
11348
|
], Ruler.prototype, "scale", 2);
|
|
11341
|
-
Ruler = __decorateClass$
|
|
11349
|
+
Ruler = __decorateClass$a([
|
|
11342
11350
|
customNode("Ruler")
|
|
11343
11351
|
], Ruler);
|
|
11344
11352
|
|
|
11345
|
-
var __defProp$
|
|
11346
|
-
var __getOwnPropDesc$
|
|
11347
|
-
var __decorateClass$
|
|
11348
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
11353
|
+
var __defProp$9 = Object.defineProperty;
|
|
11354
|
+
var __getOwnPropDesc$8 = Object.getOwnPropertyDescriptor;
|
|
11355
|
+
var __decorateClass$9 = (decorators, target, key, kind) => {
|
|
11356
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$8(target, key) : target;
|
|
11349
11357
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
11350
11358
|
if (decorator = decorators[i])
|
|
11351
11359
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
11352
|
-
if (kind && result) __defProp$
|
|
11360
|
+
if (kind && result) __defProp$9(target, key, result);
|
|
11353
11361
|
return result;
|
|
11354
11362
|
};
|
|
11355
11363
|
let ScrollBar = class extends Range {
|
|
@@ -11391,21 +11399,21 @@ let ScrollBar = class extends Range {
|
|
|
11391
11399
|
this.context.fill();
|
|
11392
11400
|
}
|
|
11393
11401
|
};
|
|
11394
|
-
__decorateClass$
|
|
11402
|
+
__decorateClass$9([
|
|
11395
11403
|
property({ default: "vertical" })
|
|
11396
11404
|
], ScrollBar.prototype, "direction", 2);
|
|
11397
|
-
ScrollBar = __decorateClass$
|
|
11405
|
+
ScrollBar = __decorateClass$9([
|
|
11398
11406
|
customNode("ScrollBar")
|
|
11399
11407
|
], ScrollBar);
|
|
11400
11408
|
|
|
11401
|
-
var __defProp$
|
|
11402
|
-
var __getOwnPropDesc$
|
|
11403
|
-
var __decorateClass$
|
|
11404
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
11409
|
+
var __defProp$8 = Object.defineProperty;
|
|
11410
|
+
var __getOwnPropDesc$7 = Object.getOwnPropertyDescriptor;
|
|
11411
|
+
var __decorateClass$8 = (decorators, target, key, kind) => {
|
|
11412
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$7(target, key) : target;
|
|
11405
11413
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
11406
11414
|
if (decorator = decorators[i])
|
|
11407
11415
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
11408
|
-
if (kind && result) __defProp$
|
|
11416
|
+
if (kind && result) __defProp$8(target, key, result);
|
|
11409
11417
|
return result;
|
|
11410
11418
|
};
|
|
11411
11419
|
let XScrollBar = class extends ScrollBar {
|
|
@@ -11414,20 +11422,20 @@ let XScrollBar = class extends ScrollBar {
|
|
|
11414
11422
|
this.setProperties(properties).append(children);
|
|
11415
11423
|
}
|
|
11416
11424
|
};
|
|
11417
|
-
XScrollBar = __decorateClass$
|
|
11425
|
+
XScrollBar = __decorateClass$8([
|
|
11418
11426
|
customNode("XScrollBar", {
|
|
11419
11427
|
direction: "horizontal"
|
|
11420
11428
|
})
|
|
11421
11429
|
], XScrollBar);
|
|
11422
11430
|
|
|
11423
|
-
var __defProp$
|
|
11424
|
-
var __getOwnPropDesc$
|
|
11425
|
-
var __decorateClass$
|
|
11426
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$
|
|
11431
|
+
var __defProp$7 = Object.defineProperty;
|
|
11432
|
+
var __getOwnPropDesc$6 = Object.getOwnPropertyDescriptor;
|
|
11433
|
+
var __decorateClass$7 = (decorators, target, key, kind) => {
|
|
11434
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$6(target, key) : target;
|
|
11427
11435
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
11428
11436
|
if (decorator = decorators[i])
|
|
11429
11437
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
11430
|
-
if (kind && result) __defProp$
|
|
11438
|
+
if (kind && result) __defProp$7(target, key, result);
|
|
11431
11439
|
return result;
|
|
11432
11440
|
};
|
|
11433
11441
|
let YScrollBar = class extends ScrollBar {
|
|
@@ -11436,94 +11444,1089 @@ let YScrollBar = class extends ScrollBar {
|
|
|
11436
11444
|
this.setProperties(properties).append(children);
|
|
11437
11445
|
}
|
|
11438
11446
|
};
|
|
11439
|
-
YScrollBar = __decorateClass$
|
|
11447
|
+
YScrollBar = __decorateClass$7([
|
|
11440
11448
|
customNode("YScrollBar", {
|
|
11441
11449
|
direction: "vertical"
|
|
11442
11450
|
})
|
|
11443
11451
|
], YScrollBar);
|
|
11444
11452
|
|
|
11445
|
-
var __defProp$
|
|
11446
|
-
var
|
|
11447
|
-
var
|
|
11448
|
-
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$4(target, key) : target;
|
|
11453
|
+
var __defProp$6 = Object.defineProperty;
|
|
11454
|
+
var __decorateClass$6 = (decorators, target, key, kind) => {
|
|
11455
|
+
var result = undefined ;
|
|
11449
11456
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
11450
11457
|
if (decorator = decorators[i])
|
|
11451
|
-
result = (
|
|
11452
|
-
if (
|
|
11458
|
+
result = (decorator(target, key, result) ) || result;
|
|
11459
|
+
if (result) __defProp$6(target, key, result);
|
|
11453
11460
|
return result;
|
|
11454
11461
|
};
|
|
11455
|
-
|
|
11456
|
-
|
|
11457
|
-
|
|
11458
|
-
return this.parent;
|
|
11459
|
-
}
|
|
11460
|
-
return undefined;
|
|
11461
|
-
}
|
|
11462
|
-
constructor(properties, children = []) {
|
|
11462
|
+
class ElementStyle extends Resource {
|
|
11463
|
+
_backgroundColor = new Color();
|
|
11464
|
+
constructor(properties) {
|
|
11463
11465
|
super();
|
|
11464
11466
|
this.setProperties(properties);
|
|
11465
|
-
this.append(children);
|
|
11466
11467
|
}
|
|
11467
11468
|
_updateProperty(key, value, oldValue, declaration) {
|
|
11468
11469
|
super._updateProperty(key, value, oldValue, declaration);
|
|
11469
11470
|
switch (key) {
|
|
11470
|
-
case "
|
|
11471
|
-
|
|
11472
|
-
case "max": {
|
|
11473
|
-
this.value = clamp(this.minValue, this.value, this.maxValue);
|
|
11474
|
-
this._updateScale();
|
|
11471
|
+
case "backgroundColor":
|
|
11472
|
+
this._backgroundColor.value = this.backgroundColor === "none" ? undefined : this.backgroundColor;
|
|
11475
11473
|
break;
|
|
11476
|
-
}
|
|
11477
11474
|
}
|
|
11478
11475
|
}
|
|
11479
|
-
|
|
11480
|
-
|
|
11481
|
-
if (target) {
|
|
11482
|
-
target.style.scaleX = this.value;
|
|
11483
|
-
target.style.scaleY = this.value;
|
|
11484
|
-
this.emit("updateScale", this.value);
|
|
11485
|
-
}
|
|
11476
|
+
canPointeEvents() {
|
|
11477
|
+
return this.pointerEvents !== "none";
|
|
11486
11478
|
}
|
|
11487
|
-
|
|
11488
|
-
|
|
11489
|
-
if (!target)
|
|
11490
|
-
return;
|
|
11491
|
-
e.preventDefault();
|
|
11492
|
-
const isTouchPad = e.wheelDeltaY ? Math.abs(Math.abs(e.wheelDeltaY) - Math.abs(3 * e.deltaY)) < 3 : e.deltaMode === 0;
|
|
11493
|
-
if (!isTouchPad && e.ctrlKey) {
|
|
11494
|
-
e.preventDefault();
|
|
11495
|
-
let distance = e.deltaY / (e.ctrlKey ? 1 : 100);
|
|
11496
|
-
distance *= -0.015;
|
|
11497
|
-
this.value += distance;
|
|
11498
|
-
}
|
|
11479
|
+
getComputedOpacity() {
|
|
11480
|
+
return clamp(0, this.opacity, 1);
|
|
11499
11481
|
}
|
|
11500
|
-
|
|
11501
|
-
|
|
11502
|
-
|
|
11503
|
-
|
|
11504
|
-
|
|
11505
|
-
|
|
11482
|
+
getComputedBackgroundColor() {
|
|
11483
|
+
return this._backgroundColor;
|
|
11484
|
+
}
|
|
11485
|
+
async loadBackgroundImage() {
|
|
11486
|
+
if (this.backgroundImage !== "none") {
|
|
11487
|
+
return await assets.texture.load(this.backgroundImage);
|
|
11506
11488
|
}
|
|
11507
11489
|
}
|
|
11508
|
-
|
|
11509
|
-
|
|
11510
|
-
|
|
11511
|
-
|
|
11512
|
-
|
|
11513
|
-
|
|
11514
|
-
|
|
11515
|
-
|
|
11516
|
-
|
|
11517
|
-
|
|
11518
|
-
|
|
11519
|
-
|
|
11520
|
-
|
|
11521
|
-
|
|
11522
|
-
|
|
11523
|
-
|
|
11524
|
-
|
|
11525
|
-
|
|
11526
|
-
|
|
11490
|
+
getComputedTransformOrigin() {
|
|
11491
|
+
const [originX, originY = originX] = this.transformOrigin.split(" ");
|
|
11492
|
+
return [originX, originY].map((val) => {
|
|
11493
|
+
val = val.trim();
|
|
11494
|
+
switch (val) {
|
|
11495
|
+
case "left":
|
|
11496
|
+
case "top":
|
|
11497
|
+
return 0;
|
|
11498
|
+
case "center":
|
|
11499
|
+
return 0.5;
|
|
11500
|
+
case "right":
|
|
11501
|
+
case "bottom":
|
|
11502
|
+
return 1;
|
|
11503
|
+
default:
|
|
11504
|
+
return Number(val);
|
|
11505
|
+
}
|
|
11506
|
+
});
|
|
11507
|
+
}
|
|
11508
|
+
_defaultFilter = {
|
|
11509
|
+
"brightness": 1,
|
|
11510
|
+
"contrast": 1,
|
|
11511
|
+
"grayscale": 0,
|
|
11512
|
+
"hue-rotate": 0,
|
|
11513
|
+
"invert": 0,
|
|
11514
|
+
"opacity": 1,
|
|
11515
|
+
"saturate": 1,
|
|
11516
|
+
"sepia": 0
|
|
11517
|
+
};
|
|
11518
|
+
getComputedFilter() {
|
|
11519
|
+
let filter = {};
|
|
11520
|
+
if (this.filter === "none") {
|
|
11521
|
+
return filter;
|
|
11522
|
+
}
|
|
11523
|
+
filter = parseCssFunctions(this.filter).reduce((filter2, { name, args }) => {
|
|
11524
|
+
filter2[name] = args[0].normalizedIntValue;
|
|
11525
|
+
return filter2;
|
|
11526
|
+
}, filter);
|
|
11527
|
+
Object.keys(this._defaultFilter).forEach((name) => {
|
|
11528
|
+
filter[name] = filter[name] ?? this._defaultFilter[name];
|
|
11529
|
+
});
|
|
11530
|
+
return filter;
|
|
11531
|
+
}
|
|
11532
|
+
getComputedFilterColorMatrix() {
|
|
11533
|
+
const m = new ColorMatrix();
|
|
11534
|
+
const filter = this.getComputedFilter();
|
|
11535
|
+
for (const name in filter) {
|
|
11536
|
+
const value = filter[name];
|
|
11537
|
+
switch (name) {
|
|
11538
|
+
case "hue-rotate":
|
|
11539
|
+
m.hueRotate(value * PI_2);
|
|
11540
|
+
break;
|
|
11541
|
+
case "saturate":
|
|
11542
|
+
m.saturate(value);
|
|
11543
|
+
break;
|
|
11544
|
+
case "brightness":
|
|
11545
|
+
m.brightness(value);
|
|
11546
|
+
break;
|
|
11547
|
+
case "contrast":
|
|
11548
|
+
m.contrast(value);
|
|
11549
|
+
break;
|
|
11550
|
+
case "invert":
|
|
11551
|
+
m.invert(value);
|
|
11552
|
+
break;
|
|
11553
|
+
case "sepia":
|
|
11554
|
+
m.sepia(value);
|
|
11555
|
+
break;
|
|
11556
|
+
case "opacity":
|
|
11557
|
+
m.opacity(value);
|
|
11558
|
+
break;
|
|
11559
|
+
case "grayscale":
|
|
11560
|
+
m.grayscale(value);
|
|
11561
|
+
break;
|
|
11562
|
+
}
|
|
11563
|
+
}
|
|
11564
|
+
return m;
|
|
11565
|
+
}
|
|
11566
|
+
}
|
|
11567
|
+
__decorateClass$6([
|
|
11568
|
+
property({ default: "none" })
|
|
11569
|
+
], ElementStyle.prototype, "backgroundColor");
|
|
11570
|
+
__decorateClass$6([
|
|
11571
|
+
property({ default: "none" })
|
|
11572
|
+
], ElementStyle.prototype, "backgroundImage");
|
|
11573
|
+
__decorateClass$6([
|
|
11574
|
+
property({ default: "none" })
|
|
11575
|
+
], ElementStyle.prototype, "filter");
|
|
11576
|
+
__decorateClass$6([
|
|
11577
|
+
property({ default: "none" })
|
|
11578
|
+
], ElementStyle.prototype, "boxShadow");
|
|
11579
|
+
__decorateClass$6([
|
|
11580
|
+
property({ default: "none" })
|
|
11581
|
+
], ElementStyle.prototype, "maskImage");
|
|
11582
|
+
__decorateClass$6([
|
|
11583
|
+
property({ default: 1 })
|
|
11584
|
+
], ElementStyle.prototype, "opacity");
|
|
11585
|
+
__decorateClass$6([
|
|
11586
|
+
property({ default: 0 })
|
|
11587
|
+
], ElementStyle.prototype, "borderRadius");
|
|
11588
|
+
__decorateClass$6([
|
|
11589
|
+
property({ default: "#000000" })
|
|
11590
|
+
], ElementStyle.prototype, "borderColor");
|
|
11591
|
+
__decorateClass$6([
|
|
11592
|
+
property({ default: "none" })
|
|
11593
|
+
], ElementStyle.prototype, "borderStyle");
|
|
11594
|
+
__decorateClass$6([
|
|
11595
|
+
property({ default: 0 })
|
|
11596
|
+
], ElementStyle.prototype, "outlineWidth");
|
|
11597
|
+
__decorateClass$6([
|
|
11598
|
+
property({ default: 0 })
|
|
11599
|
+
], ElementStyle.prototype, "outlineOffset");
|
|
11600
|
+
__decorateClass$6([
|
|
11601
|
+
property({ default: "#000000" })
|
|
11602
|
+
], ElementStyle.prototype, "outlineColor");
|
|
11603
|
+
__decorateClass$6([
|
|
11604
|
+
property({ default: "none" })
|
|
11605
|
+
], ElementStyle.prototype, "outlineStyle");
|
|
11606
|
+
__decorateClass$6([
|
|
11607
|
+
property({ default: "visible" })
|
|
11608
|
+
], ElementStyle.prototype, "visibility");
|
|
11609
|
+
__decorateClass$6([
|
|
11610
|
+
property({ default: "visible" })
|
|
11611
|
+
], ElementStyle.prototype, "overflow");
|
|
11612
|
+
__decorateClass$6([
|
|
11613
|
+
property({ default: "auto" })
|
|
11614
|
+
], ElementStyle.prototype, "pointerEvents");
|
|
11615
|
+
__decorateClass$6([
|
|
11616
|
+
property()
|
|
11617
|
+
], ElementStyle.prototype, "alignContent");
|
|
11618
|
+
__decorateClass$6([
|
|
11619
|
+
property()
|
|
11620
|
+
], ElementStyle.prototype, "alignItems");
|
|
11621
|
+
__decorateClass$6([
|
|
11622
|
+
property()
|
|
11623
|
+
], ElementStyle.prototype, "alignSelf");
|
|
11624
|
+
__decorateClass$6([
|
|
11625
|
+
property()
|
|
11626
|
+
], ElementStyle.prototype, "borderTop");
|
|
11627
|
+
__decorateClass$6([
|
|
11628
|
+
property()
|
|
11629
|
+
], ElementStyle.prototype, "borderLeft");
|
|
11630
|
+
__decorateClass$6([
|
|
11631
|
+
property()
|
|
11632
|
+
], ElementStyle.prototype, "borderRight");
|
|
11633
|
+
__decorateClass$6([
|
|
11634
|
+
property()
|
|
11635
|
+
], ElementStyle.prototype, "borderBottom");
|
|
11636
|
+
__decorateClass$6([
|
|
11637
|
+
property()
|
|
11638
|
+
], ElementStyle.prototype, "borderWidth");
|
|
11639
|
+
__decorateClass$6([
|
|
11640
|
+
property()
|
|
11641
|
+
], ElementStyle.prototype, "border");
|
|
11642
|
+
__decorateClass$6([
|
|
11643
|
+
property()
|
|
11644
|
+
], ElementStyle.prototype, "direction");
|
|
11645
|
+
__decorateClass$6([
|
|
11646
|
+
property()
|
|
11647
|
+
], ElementStyle.prototype, "display");
|
|
11648
|
+
__decorateClass$6([
|
|
11649
|
+
property()
|
|
11650
|
+
], ElementStyle.prototype, "flex");
|
|
11651
|
+
__decorateClass$6([
|
|
11652
|
+
property()
|
|
11653
|
+
], ElementStyle.prototype, "flexBasis");
|
|
11654
|
+
__decorateClass$6([
|
|
11655
|
+
property()
|
|
11656
|
+
], ElementStyle.prototype, "flexDirection");
|
|
11657
|
+
__decorateClass$6([
|
|
11658
|
+
property()
|
|
11659
|
+
], ElementStyle.prototype, "flexGrow");
|
|
11660
|
+
__decorateClass$6([
|
|
11661
|
+
property()
|
|
11662
|
+
], ElementStyle.prototype, "flexShrink");
|
|
11663
|
+
__decorateClass$6([
|
|
11664
|
+
property()
|
|
11665
|
+
], ElementStyle.prototype, "flexWrap");
|
|
11666
|
+
__decorateClass$6([
|
|
11667
|
+
property()
|
|
11668
|
+
], ElementStyle.prototype, "height");
|
|
11669
|
+
__decorateClass$6([
|
|
11670
|
+
property()
|
|
11671
|
+
], ElementStyle.prototype, "justifyContent");
|
|
11672
|
+
__decorateClass$6([
|
|
11673
|
+
property()
|
|
11674
|
+
], ElementStyle.prototype, "gap");
|
|
11675
|
+
__decorateClass$6([
|
|
11676
|
+
property()
|
|
11677
|
+
], ElementStyle.prototype, "marginTop");
|
|
11678
|
+
__decorateClass$6([
|
|
11679
|
+
property()
|
|
11680
|
+
], ElementStyle.prototype, "marginLeft");
|
|
11681
|
+
__decorateClass$6([
|
|
11682
|
+
property()
|
|
11683
|
+
], ElementStyle.prototype, "marginRight");
|
|
11684
|
+
__decorateClass$6([
|
|
11685
|
+
property()
|
|
11686
|
+
], ElementStyle.prototype, "marginBottom");
|
|
11687
|
+
__decorateClass$6([
|
|
11688
|
+
property()
|
|
11689
|
+
], ElementStyle.prototype, "margin");
|
|
11690
|
+
__decorateClass$6([
|
|
11691
|
+
property()
|
|
11692
|
+
], ElementStyle.prototype, "maxHeight");
|
|
11693
|
+
__decorateClass$6([
|
|
11694
|
+
property()
|
|
11695
|
+
], ElementStyle.prototype, "maxWidth");
|
|
11696
|
+
__decorateClass$6([
|
|
11697
|
+
property()
|
|
11698
|
+
], ElementStyle.prototype, "minHeight");
|
|
11699
|
+
__decorateClass$6([
|
|
11700
|
+
property()
|
|
11701
|
+
], ElementStyle.prototype, "minWidth");
|
|
11702
|
+
__decorateClass$6([
|
|
11703
|
+
property()
|
|
11704
|
+
], ElementStyle.prototype, "paddingTop");
|
|
11705
|
+
__decorateClass$6([
|
|
11706
|
+
property()
|
|
11707
|
+
], ElementStyle.prototype, "paddingLeft");
|
|
11708
|
+
__decorateClass$6([
|
|
11709
|
+
property()
|
|
11710
|
+
], ElementStyle.prototype, "paddingRight");
|
|
11711
|
+
__decorateClass$6([
|
|
11712
|
+
property()
|
|
11713
|
+
], ElementStyle.prototype, "paddingBottom");
|
|
11714
|
+
__decorateClass$6([
|
|
11715
|
+
property()
|
|
11716
|
+
], ElementStyle.prototype, "padding");
|
|
11717
|
+
__decorateClass$6([
|
|
11718
|
+
property()
|
|
11719
|
+
], ElementStyle.prototype, "top");
|
|
11720
|
+
__decorateClass$6([
|
|
11721
|
+
property()
|
|
11722
|
+
], ElementStyle.prototype, "bottom");
|
|
11723
|
+
__decorateClass$6([
|
|
11724
|
+
property()
|
|
11725
|
+
], ElementStyle.prototype, "left");
|
|
11726
|
+
__decorateClass$6([
|
|
11727
|
+
property()
|
|
11728
|
+
], ElementStyle.prototype, "right");
|
|
11729
|
+
__decorateClass$6([
|
|
11730
|
+
property()
|
|
11731
|
+
], ElementStyle.prototype, "position");
|
|
11732
|
+
__decorateClass$6([
|
|
11733
|
+
property()
|
|
11734
|
+
], ElementStyle.prototype, "boxSizing");
|
|
11735
|
+
__decorateClass$6([
|
|
11736
|
+
property()
|
|
11737
|
+
], ElementStyle.prototype, "width");
|
|
11738
|
+
const transformStyle = getDefaultTransformStyle();
|
|
11739
|
+
for (const key in transformStyle) {
|
|
11740
|
+
defineProperty(ElementStyle, key, { default: transformStyle[key] });
|
|
11741
|
+
}
|
|
11742
|
+
const textStyle = getDefaultTextStyle();
|
|
11743
|
+
for (const key in textStyle) {
|
|
11744
|
+
defineProperty(ElementStyle, key, { default: textStyle[key] });
|
|
11745
|
+
}
|
|
11746
|
+
|
|
11747
|
+
var __defProp$5 = Object.defineProperty;
|
|
11748
|
+
var __getOwnPropDesc$5 = Object.getOwnPropertyDescriptor;
|
|
11749
|
+
var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
11750
|
+
var __decorateClass$5 = (decorators, target, key, kind) => {
|
|
11751
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$5(target, key) : target;
|
|
11752
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
11753
|
+
if (decorator = decorators[i])
|
|
11754
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
11755
|
+
if (kind && result) __defProp$5(target, key, result);
|
|
11756
|
+
return result;
|
|
11757
|
+
};
|
|
11758
|
+
var __publicField$4 = (obj, key, value) => __defNormalProp$4(obj, key + "" , value);
|
|
11759
|
+
const alignMap = {
|
|
11760
|
+
"auto": Align.Auto,
|
|
11761
|
+
"flex-start": Align.FlexStart,
|
|
11762
|
+
"center": Align.Center,
|
|
11763
|
+
"flex-end": Align.FlexEnd,
|
|
11764
|
+
"stretch": Align.Stretch,
|
|
11765
|
+
"baseline": Align.Baseline,
|
|
11766
|
+
"space-between": Align.SpaceBetween,
|
|
11767
|
+
"space-around": Align.SpaceAround,
|
|
11768
|
+
"space-evenly": Align.SpaceEvenly
|
|
11769
|
+
};
|
|
11770
|
+
const displayMap = {
|
|
11771
|
+
none: Display.None,
|
|
11772
|
+
flex: Display.Flex,
|
|
11773
|
+
contents: Display.Contents
|
|
11774
|
+
};
|
|
11775
|
+
const directionMap = {
|
|
11776
|
+
inherit: Direction.Inherit,
|
|
11777
|
+
ltr: Direction.LTR,
|
|
11778
|
+
rtl: Direction.RTL
|
|
11779
|
+
};
|
|
11780
|
+
const flexDirectionMap = {
|
|
11781
|
+
"column": FlexDirection.Column,
|
|
11782
|
+
"column-reverse": FlexDirection.ColumnReverse,
|
|
11783
|
+
"row": FlexDirection.Row,
|
|
11784
|
+
"row-reverse": FlexDirection.RowReverse
|
|
11785
|
+
};
|
|
11786
|
+
const flexWrapMap = {
|
|
11787
|
+
"no-wrap": Wrap.NoWrap,
|
|
11788
|
+
"wrap": Wrap.Wrap,
|
|
11789
|
+
"Wrap-reverse": Wrap.WrapReverse
|
|
11790
|
+
};
|
|
11791
|
+
const justifyMap = {
|
|
11792
|
+
"flex-start": Justify.FlexStart,
|
|
11793
|
+
"center": Justify.Center,
|
|
11794
|
+
"flex-end": Justify.FlexEnd,
|
|
11795
|
+
"space-between": Justify.SpaceBetween,
|
|
11796
|
+
"space-around": Justify.SpaceAround,
|
|
11797
|
+
"space-evenly": Justify.SpaceEvenly
|
|
11798
|
+
};
|
|
11799
|
+
const overflowMap = {
|
|
11800
|
+
visible: Overflow.Visible,
|
|
11801
|
+
hidden: Overflow.Hidden,
|
|
11802
|
+
scroll: Overflow.Scroll
|
|
11803
|
+
};
|
|
11804
|
+
const positionTypeMap = {
|
|
11805
|
+
static: PositionType.Static,
|
|
11806
|
+
relative: PositionType.Relative,
|
|
11807
|
+
absolute: PositionType.Absolute
|
|
11808
|
+
};
|
|
11809
|
+
const boxSizingMap = {
|
|
11810
|
+
"border-box": BoxSizing.BorderBox,
|
|
11811
|
+
"content-box": BoxSizing.ContentBox
|
|
11812
|
+
};
|
|
11813
|
+
let Element = class extends Node {
|
|
11814
|
+
static async loadLayoutEngine() {
|
|
11815
|
+
this.layoutEngine = await loadYoga();
|
|
11816
|
+
}
|
|
11817
|
+
get style() {
|
|
11818
|
+
return this._style;
|
|
11819
|
+
}
|
|
11820
|
+
set style(style) {
|
|
11821
|
+
const cb = (...args) => {
|
|
11822
|
+
this.emit("updateStyleProperty", ...args);
|
|
11823
|
+
this._updateStyleProperty(args[0], args[1], args[2], args[3]);
|
|
11824
|
+
};
|
|
11825
|
+
style.on("updateProperty", cb);
|
|
11826
|
+
this._style?.off("updateProperty", cb);
|
|
11827
|
+
this._style = style;
|
|
11828
|
+
}
|
|
11829
|
+
_layout = Element.layoutEngine.Node.create();
|
|
11830
|
+
transform = new Transform2D();
|
|
11831
|
+
_parentTransformDirtyId;
|
|
11832
|
+
opacity = 1;
|
|
11833
|
+
visible = true;
|
|
11834
|
+
_parentOpacity;
|
|
11835
|
+
_parentVisible;
|
|
11836
|
+
_modulate = new Color(4294967295);
|
|
11837
|
+
_backgroundImage;
|
|
11838
|
+
context = new CanvasContext();
|
|
11839
|
+
_resetContext = true;
|
|
11840
|
+
_redrawing = false;
|
|
11841
|
+
_reflowing = false;
|
|
11842
|
+
_repainting = false;
|
|
11843
|
+
_originalBatchables = [];
|
|
11844
|
+
_layoutedBatchables = [];
|
|
11845
|
+
_batchables = [];
|
|
11846
|
+
constructor(properties, children = []) {
|
|
11847
|
+
super();
|
|
11848
|
+
this._updateStyleProperty = this._updateStyleProperty.bind(this);
|
|
11849
|
+
this.style = new ElementStyle();
|
|
11850
|
+
this.setProperties(properties).append(children);
|
|
11851
|
+
}
|
|
11852
|
+
setProperties(properties) {
|
|
11853
|
+
if (properties) {
|
|
11854
|
+
const { style, ...restProperties } = properties;
|
|
11855
|
+
style && this.style.setProperties(style);
|
|
11856
|
+
super.setProperties(restProperties);
|
|
11857
|
+
}
|
|
11858
|
+
return this;
|
|
11859
|
+
}
|
|
11860
|
+
_parented(parent) {
|
|
11861
|
+
super._parented(parent);
|
|
11862
|
+
if (parent._layout && this._layout) {
|
|
11863
|
+
parent._layout.insertChild(
|
|
11864
|
+
this._layout,
|
|
11865
|
+
parent._layout.getChildCount()
|
|
11866
|
+
);
|
|
11867
|
+
}
|
|
11868
|
+
}
|
|
11869
|
+
_unparented(oldParent) {
|
|
11870
|
+
super._unparented(oldParent);
|
|
11871
|
+
if (oldParent._layout && this._layout) {
|
|
11872
|
+
oldParent._layout.removeChild(this._layout);
|
|
11873
|
+
}
|
|
11874
|
+
}
|
|
11875
|
+
_updateProperty(key, value, oldValue, declaration) {
|
|
11876
|
+
super._updateProperty(key, value, oldValue, declaration);
|
|
11877
|
+
switch (key) {
|
|
11878
|
+
case "modulate":
|
|
11879
|
+
this._modulate.value = value;
|
|
11880
|
+
this.requestRepaint();
|
|
11881
|
+
break;
|
|
11882
|
+
case "blendMode":
|
|
11883
|
+
return this.requestRepaint();
|
|
11884
|
+
}
|
|
11885
|
+
}
|
|
11886
|
+
// eslint-disable-next-line unused-imports/no-unused-vars
|
|
11887
|
+
_updateStyleProperty(key, value, oldValue, declaration) {
|
|
11888
|
+
switch (key) {
|
|
11889
|
+
/** layout */
|
|
11890
|
+
case "alignContent":
|
|
11891
|
+
this._layout.setAlignContent(alignMap[this.style.alignContent]);
|
|
11892
|
+
break;
|
|
11893
|
+
case "alignItems":
|
|
11894
|
+
this._layout.setAlignItems(alignMap[this.style.alignItems]);
|
|
11895
|
+
break;
|
|
11896
|
+
case "alignSelf":
|
|
11897
|
+
this._layout.setAlignSelf(alignMap[this.style.alignSelf]);
|
|
11898
|
+
break;
|
|
11899
|
+
case "aspectRatio":
|
|
11900
|
+
this._layout.setAspectRatio(value);
|
|
11901
|
+
break;
|
|
11902
|
+
case "borderTop":
|
|
11903
|
+
this._layout.setBorder(Edge.Top, this.style.borderWidth);
|
|
11904
|
+
break;
|
|
11905
|
+
case "borderBottom":
|
|
11906
|
+
this._layout.setBorder(Edge.Bottom, this.style.borderWidth);
|
|
11907
|
+
break;
|
|
11908
|
+
case "borderLeft":
|
|
11909
|
+
this._layout.setBorder(Edge.Left, this.style.borderWidth);
|
|
11910
|
+
break;
|
|
11911
|
+
case "borderRight":
|
|
11912
|
+
this._layout.setBorder(Edge.Right, this.style.borderWidth);
|
|
11913
|
+
break;
|
|
11914
|
+
case "border":
|
|
11915
|
+
this._layout.setBorder(Edge.All, this.style.borderWidth);
|
|
11916
|
+
break;
|
|
11917
|
+
case "direction":
|
|
11918
|
+
this._layout.setDirection(directionMap[this.style.direction]);
|
|
11919
|
+
break;
|
|
11920
|
+
case "display":
|
|
11921
|
+
this._layout.setDisplay(displayMap[this.style.display]);
|
|
11922
|
+
break;
|
|
11923
|
+
case "flex":
|
|
11924
|
+
this._layout.setFlex(this.style.flex);
|
|
11925
|
+
break;
|
|
11926
|
+
case "flexBasis":
|
|
11927
|
+
this._layout.setFlexBasis(this.style.flexBasis);
|
|
11928
|
+
break;
|
|
11929
|
+
case "flexDirection":
|
|
11930
|
+
this._layout.setFlexDirection(flexDirectionMap[this.style.flexDirection]);
|
|
11931
|
+
break;
|
|
11932
|
+
case "flexGrow":
|
|
11933
|
+
this._layout.setFlexGrow(this.style.flexGrow);
|
|
11934
|
+
break;
|
|
11935
|
+
case "flexShrink":
|
|
11936
|
+
this._layout.setFlexShrink(this.style.flexShrink);
|
|
11937
|
+
break;
|
|
11938
|
+
case "flexWrap":
|
|
11939
|
+
this._layout.setFlexWrap(flexWrapMap[this.style.flexWrap]);
|
|
11940
|
+
break;
|
|
11941
|
+
case "height":
|
|
11942
|
+
this._layout.setHeight(this.style.height);
|
|
11943
|
+
break;
|
|
11944
|
+
case "justifyContent":
|
|
11945
|
+
this._layout.setJustifyContent(justifyMap[this.style.justifyContent]);
|
|
11946
|
+
break;
|
|
11947
|
+
case "gap":
|
|
11948
|
+
this._layout.setGap(Gutter.All, this.style.gap);
|
|
11949
|
+
break;
|
|
11950
|
+
case "marginTop":
|
|
11951
|
+
this._layout.setMargin(Edge.Top, this.style.marginTop);
|
|
11952
|
+
break;
|
|
11953
|
+
case "marginBottom":
|
|
11954
|
+
this._layout.setMargin(Edge.Top, this.style.marginBottom);
|
|
11955
|
+
break;
|
|
11956
|
+
case "marginLeft":
|
|
11957
|
+
this._layout.setMargin(Edge.Left, this.style.marginLeft);
|
|
11958
|
+
break;
|
|
11959
|
+
case "marginRight":
|
|
11960
|
+
this._layout.setMargin(Edge.Top, this.style.marginRight);
|
|
11961
|
+
break;
|
|
11962
|
+
case "margin":
|
|
11963
|
+
this._layout.setMargin(Edge.All, this.style.margin);
|
|
11964
|
+
break;
|
|
11965
|
+
case "maxHeight":
|
|
11966
|
+
this._layout.setMaxHeight(this.style.maxHeight);
|
|
11967
|
+
break;
|
|
11968
|
+
case "maxWidth":
|
|
11969
|
+
this._layout.setMaxWidth(this.style.maxWidth);
|
|
11970
|
+
break;
|
|
11971
|
+
// setDirtiedFunc(dirtiedFunc: DirtiedFunction | null): void;
|
|
11972
|
+
// setMeasureFunc(measureFunc: MeasureFunction | null): void;
|
|
11973
|
+
case "minHeight":
|
|
11974
|
+
this._layout.setMinHeight(this.style.minHeight);
|
|
11975
|
+
break;
|
|
11976
|
+
case "minWidth":
|
|
11977
|
+
this._layout.setMinWidth(this.style.minWidth);
|
|
11978
|
+
break;
|
|
11979
|
+
case "overflow":
|
|
11980
|
+
this._layout.setOverflow(overflowMap[this.style.overflow]);
|
|
11981
|
+
break;
|
|
11982
|
+
case "paddingTop":
|
|
11983
|
+
this._layout.setPadding(Edge.Top, this.style.paddingTop);
|
|
11984
|
+
break;
|
|
11985
|
+
case "paddingBottom":
|
|
11986
|
+
this._layout.setPadding(Edge.Bottom, this.style.paddingBottom);
|
|
11987
|
+
break;
|
|
11988
|
+
case "paddingLeft":
|
|
11989
|
+
this._layout.setPadding(Edge.Left, this.style.paddingLeft);
|
|
11990
|
+
break;
|
|
11991
|
+
case "paddingRight":
|
|
11992
|
+
this._layout.setPadding(Edge.Right, this.style.paddingRight);
|
|
11993
|
+
break;
|
|
11994
|
+
case "padding":
|
|
11995
|
+
this._layout.setPadding(Edge.All, this.style.padding);
|
|
11996
|
+
break;
|
|
11997
|
+
case "top":
|
|
11998
|
+
this._layout.setPosition(Edge.Top, this.style.top);
|
|
11999
|
+
break;
|
|
12000
|
+
case "bottom":
|
|
12001
|
+
this._layout.setPosition(Edge.Bottom, this.style.bottom);
|
|
12002
|
+
break;
|
|
12003
|
+
case "left":
|
|
12004
|
+
this._layout.setPosition(Edge.Left, this.style.left);
|
|
12005
|
+
break;
|
|
12006
|
+
case "right":
|
|
12007
|
+
this._layout.setPosition(Edge.Right, this.style.right);
|
|
12008
|
+
break;
|
|
12009
|
+
case "position":
|
|
12010
|
+
this._layout.setPositionType(positionTypeMap[this.style.position]);
|
|
12011
|
+
break;
|
|
12012
|
+
case "boxSizing":
|
|
12013
|
+
this._layout.setBoxSizing(boxSizingMap[this.style.boxSizing]);
|
|
12014
|
+
break;
|
|
12015
|
+
case "width":
|
|
12016
|
+
this._layout.setWidth(this.style.width);
|
|
12017
|
+
break;
|
|
12018
|
+
case "scaleX":
|
|
12019
|
+
case "scaleY":
|
|
12020
|
+
case "rotate":
|
|
12021
|
+
case "transform":
|
|
12022
|
+
case "transformOrigin":
|
|
12023
|
+
this._updateTransform();
|
|
12024
|
+
break;
|
|
12025
|
+
/** draw */
|
|
12026
|
+
case "backgroundColor":
|
|
12027
|
+
this._updateBackgroundColor();
|
|
12028
|
+
break;
|
|
12029
|
+
case "backgroundImage":
|
|
12030
|
+
this._updateBackgroundImage();
|
|
12031
|
+
break;
|
|
12032
|
+
case "opacity":
|
|
12033
|
+
this._updateOpacity();
|
|
12034
|
+
break;
|
|
12035
|
+
case "visibility":
|
|
12036
|
+
this._updateVisible();
|
|
12037
|
+
break;
|
|
12038
|
+
case "filter":
|
|
12039
|
+
this.requestRepaint();
|
|
12040
|
+
break;
|
|
12041
|
+
case "boxShadow":
|
|
12042
|
+
this._updateBoxShadow();
|
|
12043
|
+
break;
|
|
12044
|
+
case "maskImage":
|
|
12045
|
+
this._updateMaskImage();
|
|
12046
|
+
break;
|
|
12047
|
+
case "borderRadius":
|
|
12048
|
+
this.requestRedraw();
|
|
12049
|
+
break;
|
|
12050
|
+
}
|
|
12051
|
+
}
|
|
12052
|
+
_updateBoxShadow() {
|
|
12053
|
+
const nodePath = "__$style.shadow";
|
|
12054
|
+
if (this.style.boxShadow !== "none") {
|
|
12055
|
+
const node = this.getNode(nodePath);
|
|
12056
|
+
if (node) ; else {
|
|
12057
|
+
this.appendChild(new ShadowEffect(), "back");
|
|
12058
|
+
}
|
|
12059
|
+
} else {
|
|
12060
|
+
const node = this.getNode(nodePath);
|
|
12061
|
+
if (node) {
|
|
12062
|
+
this.removeChild(node);
|
|
12063
|
+
}
|
|
12064
|
+
}
|
|
12065
|
+
}
|
|
12066
|
+
_updateMaskImage() {
|
|
12067
|
+
const nodePath = "__$style.maskImage";
|
|
12068
|
+
const maskImage = this.style.maskImage;
|
|
12069
|
+
if (maskImage && maskImage !== "none") {
|
|
12070
|
+
const node = this.getNode(nodePath);
|
|
12071
|
+
if (node) {
|
|
12072
|
+
node.src = maskImage;
|
|
12073
|
+
} else {
|
|
12074
|
+
this.appendChild(new MaskEffect({ src: maskImage }), "back");
|
|
12075
|
+
}
|
|
12076
|
+
} else {
|
|
12077
|
+
const node = this.getNode(nodePath);
|
|
12078
|
+
if (node) {
|
|
12079
|
+
this.removeChild(node);
|
|
12080
|
+
}
|
|
12081
|
+
}
|
|
12082
|
+
}
|
|
12083
|
+
_updateBackgroundColor() {
|
|
12084
|
+
const backgroundColor = this.style.getComputedBackgroundColor();
|
|
12085
|
+
if (this._originalBatchables.length) {
|
|
12086
|
+
this.requestRepaint();
|
|
12087
|
+
} else if (backgroundColor.a > 0) {
|
|
12088
|
+
this.requestRedraw();
|
|
12089
|
+
}
|
|
12090
|
+
}
|
|
12091
|
+
async _updateBackgroundImage() {
|
|
12092
|
+
this._backgroundImage = await this.style.loadBackgroundImage();
|
|
12093
|
+
this.requestRedraw();
|
|
12094
|
+
}
|
|
12095
|
+
_updateOpacity() {
|
|
12096
|
+
const opacity = this.style.getComputedOpacity() * (this.getParent()?.opacity ?? 1);
|
|
12097
|
+
if (this.opacity !== opacity) {
|
|
12098
|
+
this.opacity = opacity;
|
|
12099
|
+
this.requestRepaint();
|
|
12100
|
+
}
|
|
12101
|
+
}
|
|
12102
|
+
_updateVisible() {
|
|
12103
|
+
this.visible = this.style.visibility === "visible" && (this.getParent()?.visible ?? true);
|
|
12104
|
+
}
|
|
12105
|
+
_updateTransform() {
|
|
12106
|
+
this.calculateLayout(undefined, undefined, Direction.LTR);
|
|
12107
|
+
const layout = this._layout.getComputedLayout();
|
|
12108
|
+
const { left, top, width, height } = layout;
|
|
12109
|
+
const {
|
|
12110
|
+
scaleX,
|
|
12111
|
+
scaleY,
|
|
12112
|
+
rotate
|
|
12113
|
+
} = this.style;
|
|
12114
|
+
const t3d = new Transform2D(false);
|
|
12115
|
+
const t2d = new Transform2D(false).scale(scaleX, scaleY).translate(left, top).rotate(rotate * DEG_TO_RAD);
|
|
12116
|
+
const _t3d = new Transform2D();
|
|
12117
|
+
parseCssFunctions(
|
|
12118
|
+
!this.style.transform || this.style.transform === "none" ? "" : this.style.transform,
|
|
12119
|
+
{ width, height }
|
|
12120
|
+
).forEach(({ name, args }) => {
|
|
12121
|
+
const values = args.map((arg) => arg.normalizedIntValue);
|
|
12122
|
+
_t3d.identity();
|
|
12123
|
+
switch (name) {
|
|
12124
|
+
case "translate":
|
|
12125
|
+
_t3d.translate(values[0] * width, (values[1] ?? values[0]) * height);
|
|
12126
|
+
break;
|
|
12127
|
+
case "translateX":
|
|
12128
|
+
_t3d.translateX(values[0] * width);
|
|
12129
|
+
break;
|
|
12130
|
+
case "translateY":
|
|
12131
|
+
_t3d.translateY(values[0] * height);
|
|
12132
|
+
break;
|
|
12133
|
+
case "translateZ":
|
|
12134
|
+
_t3d.translateZ(values[0]);
|
|
12135
|
+
break;
|
|
12136
|
+
case "translate3d":
|
|
12137
|
+
_t3d.translate3d(
|
|
12138
|
+
values[0] * width,
|
|
12139
|
+
(values[1] ?? values[0]) * height,
|
|
12140
|
+
values[2] ?? values[1] ?? values[0]
|
|
12141
|
+
);
|
|
12142
|
+
break;
|
|
12143
|
+
case "scale":
|
|
12144
|
+
_t3d.scale(values[0], values[1] ?? values[0]);
|
|
12145
|
+
break;
|
|
12146
|
+
case "scaleX":
|
|
12147
|
+
_t3d.scaleX(values[0]);
|
|
12148
|
+
break;
|
|
12149
|
+
case "scaleY":
|
|
12150
|
+
_t3d.scaleY(values[0]);
|
|
12151
|
+
break;
|
|
12152
|
+
case "scale3d":
|
|
12153
|
+
_t3d.scale3d(values[0], values[1] ?? values[0], values[2] ?? values[1] ?? values[0]);
|
|
12154
|
+
break;
|
|
12155
|
+
case "rotate":
|
|
12156
|
+
_t3d.rotate(values[0] * PI_2);
|
|
12157
|
+
break;
|
|
12158
|
+
case "rotateX":
|
|
12159
|
+
_t3d.rotateX(values[0] * PI_2);
|
|
12160
|
+
break;
|
|
12161
|
+
case "rotateY":
|
|
12162
|
+
_t3d.rotateY(values[0] * PI_2);
|
|
12163
|
+
break;
|
|
12164
|
+
case "rotateZ":
|
|
12165
|
+
_t3d.rotateZ(values[0] * PI_2);
|
|
12166
|
+
break;
|
|
12167
|
+
case "rotate3d":
|
|
12168
|
+
_t3d.rotate3d(
|
|
12169
|
+
values[0] * PI_2,
|
|
12170
|
+
(values[1] ?? values[0]) * PI_2,
|
|
12171
|
+
(values[2] ?? values[1] ?? values[0]) * PI_2,
|
|
12172
|
+
(values[3] ?? values[2] ?? values[1] ?? values[0]) * PI_2
|
|
12173
|
+
);
|
|
12174
|
+
break;
|
|
12175
|
+
case "skew":
|
|
12176
|
+
_t3d.skew(values[0], values[0] ?? values[1]);
|
|
12177
|
+
break;
|
|
12178
|
+
case "skewX":
|
|
12179
|
+
_t3d.skewX(values[0]);
|
|
12180
|
+
break;
|
|
12181
|
+
case "skewY":
|
|
12182
|
+
_t3d.skewY(values[0]);
|
|
12183
|
+
break;
|
|
12184
|
+
case "matrix":
|
|
12185
|
+
_t3d.set(values);
|
|
12186
|
+
break;
|
|
12187
|
+
}
|
|
12188
|
+
t3d.multiply(_t3d);
|
|
12189
|
+
});
|
|
12190
|
+
t2d.update();
|
|
12191
|
+
t3d.update();
|
|
12192
|
+
const t2dArr = t2d.toArray();
|
|
12193
|
+
const t3dArr = t3d.toArray();
|
|
12194
|
+
const t3dT2dArr = [
|
|
12195
|
+
t3dArr[0] * t2dArr[0] + t3dArr[3] * t2dArr[1],
|
|
12196
|
+
t3dArr[1] * t2dArr[0] + t3dArr[4] * t2dArr[1],
|
|
12197
|
+
t3dArr[2] * t2dArr[0] + t3dArr[5] * t2dArr[1] + t2dArr[2],
|
|
12198
|
+
t3dArr[0] * t2dArr[3] + t3dArr[3] * t2dArr[4],
|
|
12199
|
+
t3dArr[1] * t2dArr[3] + t3dArr[4] * t2dArr[4],
|
|
12200
|
+
t3dArr[2] * t2dArr[3] + t3dArr[5] * t2dArr[4] + t2dArr[5],
|
|
12201
|
+
0,
|
|
12202
|
+
0,
|
|
12203
|
+
1
|
|
12204
|
+
];
|
|
12205
|
+
const [originX, originY] = this.style.getComputedTransformOrigin();
|
|
12206
|
+
const offsetX = originX * width;
|
|
12207
|
+
const offsetY = originY * height;
|
|
12208
|
+
t3dT2dArr[2] += t3dT2dArr[0] * -offsetX + t3dT2dArr[1] * -offsetY + offsetX;
|
|
12209
|
+
t3dT2dArr[5] += t3dT2dArr[3] * -offsetX + t3dT2dArr[4] * -offsetY + offsetY;
|
|
12210
|
+
const parent = this.getParent();
|
|
12211
|
+
const parentTransform = parent?.transform;
|
|
12212
|
+
this._parentTransformDirtyId = parentTransform?.dirtyId;
|
|
12213
|
+
let transform;
|
|
12214
|
+
if (parentTransform) {
|
|
12215
|
+
const pt = parentTransform.toArray();
|
|
12216
|
+
transform = [
|
|
12217
|
+
t3dT2dArr[0] * pt[0] + t3dT2dArr[3] * pt[1],
|
|
12218
|
+
t3dT2dArr[1] * pt[0] + t3dT2dArr[4] * pt[1],
|
|
12219
|
+
t3dT2dArr[2] * pt[0] + t3dT2dArr[5] * pt[1] + pt[2],
|
|
12220
|
+
t3dT2dArr[0] * pt[3] + t3dT2dArr[3] * pt[4],
|
|
12221
|
+
t3dT2dArr[1] * pt[3] + t3dT2dArr[4] * pt[4],
|
|
12222
|
+
t3dT2dArr[2] * pt[3] + t3dT2dArr[5] * pt[4] + pt[5],
|
|
12223
|
+
0,
|
|
12224
|
+
0,
|
|
12225
|
+
1
|
|
12226
|
+
];
|
|
12227
|
+
} else {
|
|
12228
|
+
transform = t3dT2dArr;
|
|
12229
|
+
}
|
|
12230
|
+
this.transform.set(transform);
|
|
12231
|
+
this._updateOverflow();
|
|
12232
|
+
this.requestRedraw();
|
|
12233
|
+
}
|
|
12234
|
+
getRect() {
|
|
12235
|
+
const [a, c, tx, b, d, ty] = this.transform.toArray();
|
|
12236
|
+
const width = this._layout.getComputedWidth() ?? 0;
|
|
12237
|
+
const height = this._layout.getComputedHeight() ?? 0;
|
|
12238
|
+
return new Rect2(
|
|
12239
|
+
tx,
|
|
12240
|
+
ty,
|
|
12241
|
+
a * width + c * height,
|
|
12242
|
+
b * width + d * height
|
|
12243
|
+
);
|
|
12244
|
+
}
|
|
12245
|
+
_updateOverflow() {
|
|
12246
|
+
if (this.style.overflow === "hidden") {
|
|
12247
|
+
const rect = this.getRect();
|
|
12248
|
+
this.mask = {
|
|
12249
|
+
x: rect.x,
|
|
12250
|
+
y: rect.y,
|
|
12251
|
+
width: rect.width,
|
|
12252
|
+
height: rect.height
|
|
12253
|
+
};
|
|
12254
|
+
} else {
|
|
12255
|
+
this.mask = undefined;
|
|
12256
|
+
}
|
|
12257
|
+
}
|
|
12258
|
+
show() {
|
|
12259
|
+
this.style.visibility = "visible";
|
|
12260
|
+
}
|
|
12261
|
+
hide() {
|
|
12262
|
+
this.style.visibility = "hidden";
|
|
12263
|
+
}
|
|
12264
|
+
isVisibleInTree() {
|
|
12265
|
+
return this.opacity > 0 && this.visible;
|
|
12266
|
+
}
|
|
12267
|
+
canRender() {
|
|
12268
|
+
return super.canRender() && this.isVisibleInTree();
|
|
12269
|
+
}
|
|
12270
|
+
requestRedraw() {
|
|
12271
|
+
this._redrawing = true;
|
|
12272
|
+
}
|
|
12273
|
+
requestReflow() {
|
|
12274
|
+
this._reflowing = true;
|
|
12275
|
+
}
|
|
12276
|
+
requestRepaint() {
|
|
12277
|
+
this._repainting = true;
|
|
12278
|
+
}
|
|
12279
|
+
_process(delta) {
|
|
12280
|
+
const parent = this.getParent();
|
|
12281
|
+
if (this._parentVisible !== parent?.visible) {
|
|
12282
|
+
this._parentVisible = parent?.visible;
|
|
12283
|
+
this._updateVisible();
|
|
12284
|
+
}
|
|
12285
|
+
if (this._parentOpacity !== parent?.opacity) {
|
|
12286
|
+
this._parentOpacity = parent?.opacity;
|
|
12287
|
+
this._updateOpacity();
|
|
12288
|
+
}
|
|
12289
|
+
if (this._layout.hasNewLayout() || parent?.transform?.dirtyId !== this._parentTransformDirtyId) {
|
|
12290
|
+
this._layout.markLayoutSeen();
|
|
12291
|
+
this._updateTransform();
|
|
12292
|
+
}
|
|
12293
|
+
super._process(delta);
|
|
12294
|
+
}
|
|
12295
|
+
_transformVertices(vertices) {
|
|
12296
|
+
const [a, c, tx, b, d, ty] = this.transform.toArray();
|
|
12297
|
+
const newVertices = vertices.slice();
|
|
12298
|
+
for (let len = vertices.length, i = 0; i < len; i += 2) {
|
|
12299
|
+
const x = vertices[i];
|
|
12300
|
+
const y = vertices[i + 1];
|
|
12301
|
+
newVertices[i] = a * x + c * y + tx;
|
|
12302
|
+
newVertices[i + 1] = b * x + d * y + ty;
|
|
12303
|
+
}
|
|
12304
|
+
return newVertices;
|
|
12305
|
+
}
|
|
12306
|
+
_draw() {
|
|
12307
|
+
this._drawBackground();
|
|
12308
|
+
this._drawContent();
|
|
12309
|
+
this._drawBorder();
|
|
12310
|
+
this._drawOutline();
|
|
12311
|
+
}
|
|
12312
|
+
_drawBackground() {
|
|
12313
|
+
const texture = this._backgroundImage;
|
|
12314
|
+
if (texture?.valid) {
|
|
12315
|
+
this.context.fillStyle = texture;
|
|
12316
|
+
this.context.textureTransform = new Transform2D().scale(
|
|
12317
|
+
this._layout.getComputedWidth() / texture.width,
|
|
12318
|
+
this._layout.getComputedHeight() / texture.height
|
|
12319
|
+
);
|
|
12320
|
+
this._fillBoundingRect();
|
|
12321
|
+
}
|
|
12322
|
+
}
|
|
12323
|
+
_drawContent() {
|
|
12324
|
+
this._fillBoundingRect();
|
|
12325
|
+
}
|
|
12326
|
+
_drawBorder() {
|
|
12327
|
+
if (this.style.borderWidth && this.style.borderStyle !== "none") {
|
|
12328
|
+
this.context.lineWidth = this.style.borderWidth;
|
|
12329
|
+
this.context.strokeStyle = this.style.borderColor;
|
|
12330
|
+
this._strokeBoundingRect();
|
|
12331
|
+
}
|
|
12332
|
+
}
|
|
12333
|
+
_drawOutline() {
|
|
12334
|
+
if (this.style.outlineWidth && this.style.outlineColor !== "none") {
|
|
12335
|
+
this.context.lineWidth = this.style.outlineWidth;
|
|
12336
|
+
this.context.strokeStyle = this.style.outlineColor;
|
|
12337
|
+
this._strokeBoundingRect();
|
|
12338
|
+
}
|
|
12339
|
+
}
|
|
12340
|
+
_drawBoundingRect() {
|
|
12341
|
+
const { borderRadius } = this.style;
|
|
12342
|
+
const width = this._layout.getComputedWidth();
|
|
12343
|
+
const height = this._layout.getComputedHeight();
|
|
12344
|
+
if (width && height) {
|
|
12345
|
+
if (borderRadius) {
|
|
12346
|
+
this.context.roundRect(0, 0, width, height, borderRadius);
|
|
12347
|
+
} else {
|
|
12348
|
+
this.context.rect(0, 0, width, height);
|
|
12349
|
+
}
|
|
12350
|
+
}
|
|
12351
|
+
}
|
|
12352
|
+
_fillBoundingRect() {
|
|
12353
|
+
this._drawBoundingRect();
|
|
12354
|
+
this.context.fill();
|
|
12355
|
+
}
|
|
12356
|
+
_strokeBoundingRect() {
|
|
12357
|
+
this._drawBoundingRect();
|
|
12358
|
+
this.context.stroke();
|
|
12359
|
+
}
|
|
12360
|
+
_relayout(batchables) {
|
|
12361
|
+
return this._reflow(batchables);
|
|
12362
|
+
}
|
|
12363
|
+
_reflow(batchables) {
|
|
12364
|
+
return this._repaint(
|
|
12365
|
+
batchables.map((batchable) => {
|
|
12366
|
+
return {
|
|
12367
|
+
...batchable,
|
|
12368
|
+
vertices: this._transformVertices(batchable.vertices)
|
|
12369
|
+
};
|
|
12370
|
+
})
|
|
12371
|
+
);
|
|
12372
|
+
}
|
|
12373
|
+
_repaint(batchables) {
|
|
12374
|
+
const colorMatrix = this.style.getComputedFilterColorMatrix();
|
|
12375
|
+
return batchables.map((batchable) => {
|
|
12376
|
+
return {
|
|
12377
|
+
...batchable,
|
|
12378
|
+
backgroundColor: this.style.getComputedBackgroundColor().abgr,
|
|
12379
|
+
modulate: this._modulate.toArgb(this.opacity, true),
|
|
12380
|
+
colorMatrix: colorMatrix.toMatrix4().toArray(true),
|
|
12381
|
+
colorMatrixOffset: colorMatrix.toVector4().toArray(),
|
|
12382
|
+
blendMode: this.blendMode
|
|
12383
|
+
};
|
|
12384
|
+
});
|
|
12385
|
+
}
|
|
12386
|
+
calculateLayout(width, height, direction) {
|
|
12387
|
+
const parent = this.getParent();
|
|
12388
|
+
if (parent?.calculateLayout) {
|
|
12389
|
+
parent.calculateLayout(width, height, direction);
|
|
12390
|
+
} else {
|
|
12391
|
+
this._layout.calculateLayout(width, height, direction);
|
|
12392
|
+
}
|
|
12393
|
+
}
|
|
12394
|
+
_render(renderer) {
|
|
12395
|
+
let batchables;
|
|
12396
|
+
if (this._redrawing) {
|
|
12397
|
+
this.emit("draw");
|
|
12398
|
+
this._draw();
|
|
12399
|
+
this._originalBatchables = this.context.toBatchables();
|
|
12400
|
+
this._layoutedBatchables = this._relayout(this._originalBatchables);
|
|
12401
|
+
batchables = this._layoutedBatchables;
|
|
12402
|
+
if (this._resetContext) {
|
|
12403
|
+
this.context.reset();
|
|
12404
|
+
}
|
|
12405
|
+
} else if (this._reflowing) {
|
|
12406
|
+
this._layoutedBatchables = this._reflow(this._originalBatchables);
|
|
12407
|
+
batchables = this._layoutedBatchables;
|
|
12408
|
+
} else if (this._repainting) {
|
|
12409
|
+
batchables = this._repaint(this._layoutedBatchables);
|
|
12410
|
+
}
|
|
12411
|
+
if (batchables) {
|
|
12412
|
+
this._batchables = batchables;
|
|
12413
|
+
this._redrawing = false;
|
|
12414
|
+
this._reflowing = false;
|
|
12415
|
+
this._repainting = false;
|
|
12416
|
+
}
|
|
12417
|
+
this._batchables.forEach((batchable) => {
|
|
12418
|
+
batchable.texture?.upload(renderer);
|
|
12419
|
+
renderer.batch2D.render({
|
|
12420
|
+
...batchable,
|
|
12421
|
+
texture: batchable.texture?._glTexture(renderer)
|
|
12422
|
+
});
|
|
12423
|
+
});
|
|
12424
|
+
super._render(renderer);
|
|
12425
|
+
}
|
|
12426
|
+
toJSON() {
|
|
12427
|
+
const json = super.toJSON();
|
|
12428
|
+
return {
|
|
12429
|
+
...json,
|
|
12430
|
+
props: {
|
|
12431
|
+
style: this.style.toJSON(),
|
|
12432
|
+
...json.props
|
|
12433
|
+
}
|
|
12434
|
+
};
|
|
12435
|
+
}
|
|
12436
|
+
};
|
|
12437
|
+
__publicField$4(Element, "layoutEngine");
|
|
12438
|
+
__decorateClass$5([
|
|
12439
|
+
property()
|
|
12440
|
+
], Element.prototype, "modulate", 2);
|
|
12441
|
+
__decorateClass$5([
|
|
12442
|
+
property()
|
|
12443
|
+
], Element.prototype, "blendMode", 2);
|
|
12444
|
+
Element = __decorateClass$5([
|
|
12445
|
+
customNode("Element")
|
|
12446
|
+
], Element);
|
|
12447
|
+
|
|
12448
|
+
var __defProp$4 = Object.defineProperty;
|
|
12449
|
+
var __getOwnPropDesc$4 = Object.getOwnPropertyDescriptor;
|
|
12450
|
+
var __decorateClass$4 = (decorators, target, key, kind) => {
|
|
12451
|
+
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$4(target, key) : target;
|
|
12452
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
12453
|
+
if (decorator = decorators[i])
|
|
12454
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
12455
|
+
if (kind && result) __defProp$4(target, key, result);
|
|
12456
|
+
return result;
|
|
12457
|
+
};
|
|
12458
|
+
let Scaler = class extends Node {
|
|
12459
|
+
get target() {
|
|
12460
|
+
if (this.parent?.style) {
|
|
12461
|
+
return this.parent;
|
|
12462
|
+
}
|
|
12463
|
+
return undefined;
|
|
12464
|
+
}
|
|
12465
|
+
constructor(properties, children = []) {
|
|
12466
|
+
super();
|
|
12467
|
+
this.setProperties(properties);
|
|
12468
|
+
this.append(children);
|
|
12469
|
+
}
|
|
12470
|
+
_updateProperty(key, value, oldValue, declaration) {
|
|
12471
|
+
super._updateProperty(key, value, oldValue, declaration);
|
|
12472
|
+
switch (key) {
|
|
12473
|
+
case "value":
|
|
12474
|
+
case "min":
|
|
12475
|
+
case "max": {
|
|
12476
|
+
this.value = clamp(this.minValue, this.value, this.maxValue);
|
|
12477
|
+
this._updateScale();
|
|
12478
|
+
break;
|
|
12479
|
+
}
|
|
12480
|
+
}
|
|
12481
|
+
}
|
|
12482
|
+
_updateScale() {
|
|
12483
|
+
const target = this.target;
|
|
12484
|
+
if (target) {
|
|
12485
|
+
target.style.scaleX = this.value;
|
|
12486
|
+
target.style.scaleY = this.value;
|
|
12487
|
+
this.emit("updateScale", this.value);
|
|
12488
|
+
}
|
|
12489
|
+
}
|
|
12490
|
+
_onWheel(e) {
|
|
12491
|
+
const target = this.target;
|
|
12492
|
+
if (!target)
|
|
12493
|
+
return;
|
|
12494
|
+
e.preventDefault();
|
|
12495
|
+
const isTouchPad = e.wheelDeltaY ? Math.abs(Math.abs(e.wheelDeltaY) - Math.abs(3 * e.deltaY)) < 3 : e.deltaMode === 0;
|
|
12496
|
+
if (!isTouchPad && e.ctrlKey) {
|
|
12497
|
+
e.preventDefault();
|
|
12498
|
+
let distance = e.deltaY / (e.ctrlKey ? 1 : 100);
|
|
12499
|
+
distance *= -0.015;
|
|
12500
|
+
this.value += distance;
|
|
12501
|
+
}
|
|
12502
|
+
}
|
|
12503
|
+
_input(event, key) {
|
|
12504
|
+
super._input(event, key);
|
|
12505
|
+
switch (key) {
|
|
12506
|
+
case "wheel":
|
|
12507
|
+
this._onWheel(event);
|
|
12508
|
+
break;
|
|
12509
|
+
}
|
|
12510
|
+
}
|
|
12511
|
+
};
|
|
12512
|
+
__decorateClass$4([
|
|
12513
|
+
property({ default: 1 })
|
|
12514
|
+
], Scaler.prototype, "value", 2);
|
|
12515
|
+
__decorateClass$4([
|
|
12516
|
+
property({ default: 0.05 })
|
|
12517
|
+
], Scaler.prototype, "minValue", 2);
|
|
12518
|
+
__decorateClass$4([
|
|
12519
|
+
property({ default: 10 })
|
|
12520
|
+
], Scaler.prototype, "maxValue", 2);
|
|
12521
|
+
Scaler = __decorateClass$4([
|
|
12522
|
+
customNode("Scaler", {
|
|
12523
|
+
processMode: "disabled",
|
|
12524
|
+
renderMode: "disabled"
|
|
12525
|
+
})
|
|
12526
|
+
], Scaler);
|
|
12527
|
+
|
|
12528
|
+
var __defProp$3 = Object.defineProperty;
|
|
12529
|
+
var __getOwnPropDesc$3 = Object.getOwnPropertyDescriptor;
|
|
11527
12530
|
var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
11528
12531
|
var __decorateClass$3 = (decorators, target, key, kind) => {
|
|
11529
12532
|
var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$3(target, key) : target;
|
|
@@ -12214,8 +13217,7 @@ class Assets {
|
|
|
12214
13217
|
}
|
|
12215
13218
|
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());
|
|
12216
13219
|
|
|
12217
|
-
class
|
|
12218
|
-
name = "CanvasEditor";
|
|
13220
|
+
class CanvasItemEditor extends Control {
|
|
12219
13221
|
hover = new Node2D({
|
|
12220
13222
|
name: "hover",
|
|
12221
13223
|
internalMode: "back",
|
|
@@ -12248,22 +13250,7 @@ class CanvasEditor extends Control {
|
|
|
12248
13250
|
internalMode: "back"
|
|
12249
13251
|
}).on("updateScale", (scale) => {
|
|
12250
13252
|
this.ruler.scale = scale;
|
|
12251
|
-
|
|
12252
|
-
const scrollWidth = this.drawboard.style.width * scale;
|
|
12253
|
-
if (scrollHeight > this.style.height) {
|
|
12254
|
-
this.yScrollBar.style.visibility = "visible";
|
|
12255
|
-
this.yScrollBar.maxValue = scrollHeight;
|
|
12256
|
-
this.yScrollBar.page = this.style.height;
|
|
12257
|
-
} else {
|
|
12258
|
-
this.yScrollBar.style.visibility = "hidden";
|
|
12259
|
-
}
|
|
12260
|
-
if (scrollWidth > this.style.width) {
|
|
12261
|
-
this.xScrollBar.style.visibility = "visible";
|
|
12262
|
-
this.xScrollBar.maxValue = scrollWidth;
|
|
12263
|
-
this.xScrollBar.page = this.style.width;
|
|
12264
|
-
} else {
|
|
12265
|
-
this.xScrollBar.style.visibility = "hidden";
|
|
12266
|
-
}
|
|
13253
|
+
this._updateScrollbars();
|
|
12267
13254
|
});
|
|
12268
13255
|
xScrollBar = new XScrollBar({
|
|
12269
13256
|
internalMode: "back",
|
|
@@ -12287,20 +13274,20 @@ class CanvasEditor extends Control {
|
|
|
12287
13274
|
pointerEvents: "none",
|
|
12288
13275
|
boxShadow: "2px 2px 2px 1px rgba(0, 0, 0, 0.2)"
|
|
12289
13276
|
}
|
|
12290
|
-
}
|
|
13277
|
+
}, [
|
|
12291
13278
|
this.scaler
|
|
12292
|
-
);
|
|
13279
|
+
]);
|
|
12293
13280
|
ruler = new Ruler({
|
|
12294
13281
|
name: "ruler",
|
|
12295
13282
|
offsetX: 100,
|
|
12296
13283
|
offsetY: 100
|
|
12297
|
-
}
|
|
13284
|
+
}, [
|
|
12298
13285
|
this.drawboard,
|
|
12299
13286
|
this.hover,
|
|
12300
13287
|
this.selectionRect,
|
|
12301
13288
|
this.xScrollBar,
|
|
12302
13289
|
this.yScrollBar
|
|
12303
|
-
);
|
|
13290
|
+
]);
|
|
12304
13291
|
_pointerStart;
|
|
12305
13292
|
_pointerOffset;
|
|
12306
13293
|
selected;
|
|
@@ -12386,6 +13373,25 @@ class CanvasEditor extends Control {
|
|
|
12386
13373
|
this.hover.style.visibility = "hidden";
|
|
12387
13374
|
}
|
|
12388
13375
|
}
|
|
13376
|
+
_updateScrollbars() {
|
|
13377
|
+
const scale = this.ruler.scale;
|
|
13378
|
+
const scrollHeight = this.drawboard.style.height * scale;
|
|
13379
|
+
const scrollWidth = this.drawboard.style.width * scale;
|
|
13380
|
+
if (scrollHeight > this.style.height) {
|
|
13381
|
+
this.yScrollBar.style.visibility = "visible";
|
|
13382
|
+
this.yScrollBar.maxValue = scrollHeight;
|
|
13383
|
+
this.yScrollBar.page = this.style.height;
|
|
13384
|
+
} else {
|
|
13385
|
+
this.yScrollBar.style.visibility = "hidden";
|
|
13386
|
+
}
|
|
13387
|
+
if (scrollWidth > this.style.width) {
|
|
13388
|
+
this.xScrollBar.style.visibility = "visible";
|
|
13389
|
+
this.xScrollBar.maxValue = scrollWidth;
|
|
13390
|
+
this.xScrollBar.page = this.style.width;
|
|
13391
|
+
} else {
|
|
13392
|
+
this.xScrollBar.style.visibility = "hidden";
|
|
13393
|
+
}
|
|
13394
|
+
}
|
|
12389
13395
|
}
|
|
12390
13396
|
|
|
12391
13397
|
const defaultOptions = {
|
|
@@ -12579,9 +13585,9 @@ async function performRender(options) {
|
|
|
12579
13585
|
engine.resize(width, height);
|
|
12580
13586
|
(Array.isArray(data) ? data : [data]).forEach((v) => {
|
|
12581
13587
|
if (v instanceof Node) {
|
|
12582
|
-
root.
|
|
13588
|
+
root.appendChild(v);
|
|
12583
13589
|
} else {
|
|
12584
|
-
root.
|
|
13590
|
+
root.appendChild(Node.parse(v));
|
|
12585
13591
|
}
|
|
12586
13592
|
});
|
|
12587
13593
|
await engine.waitUntilLoad();
|
|
@@ -12594,4 +13600,4 @@ async function render(options) {
|
|
|
12594
13600
|
});
|
|
12595
13601
|
}
|
|
12596
13602
|
|
|
12597
|
-
export { Animation, Assets, Audio, AudioPipeline, AudioProcessor, AudioSpectrum, AudioWaveform, BlurEffect, CanvasContext,
|
|
13603
|
+
export { Animation, Assets, Audio, AudioPipeline, AudioProcessor, AudioSpectrum, AudioWaveform, BlurEffect, CanvasContext, CanvasItem, CanvasItemEditor, CanvasItemStyle, CanvasTexture, Color, ColorAdjustEffect, ColorFilterEffect, ColorMatrix, ColorOverlayEffect, ColorRemoveEffect, ColorReplaceEffect, ColorTexture, Control, CoreObject, DEG_TO_RAD, DEVICE_PIXEL_RATIO, Effect, EffectMaterial, Element, ElementStyle, EmbossEffect, Engine, EventEmitter, FontLoader, Geometry, GifLoader, GlitchEffect, GodrayEffect, Graphics2D, HTMLAudio, HTMLAudioContext, HTMLSound, IN_BROWSER, Image2D, Image2DResource, ImageTexture, IndexBuffer, Input, InputEvent, JsonLoader, KawaseTransition, LeftEraseTransition, Loader, Lottie2D, LottieLoader, MainLoop, MaskEffect, Material, Matrix, Matrix2, Matrix3, Matrix4, MouseInputEvent, Node, Node2D, PI, PI_2, PixelateEffect, PixelsTexture, PointerInputEvent, Projection2D, QuadGeometry, QuadUvGeometry, RAD_TO_DEG, Range, RawWeakMap, Rect2, RefCounted, Renderer, Resource, Ruler, SUPPORTS_AUDIO_CONTEXT, SUPPORTS_CLICK_EVENTS, SUPPORTS_CREATE_IMAGE_BITMAP, SUPPORTS_IMAGE_BITMAP, SUPPORTS_MOUSE_EVENTS, SUPPORTS_OFFLINE_AUDIO_CONTEXT, SUPPORTS_POINTER_EVENTS, SUPPORTS_RESIZE_OBSERVER, SUPPORTS_TOUCH_EVENTS, SUPPORTS_WEBGL2, SUPPORTS_WEBKIT_AUDIO_CONTEXT, SUPPORTS_WEBKIT_OFFLINE_AUDIO_CONTEXT, SUPPORTS_WEB_AUDIO, SUPPORTS_WHEEL_EVENTS, Scaler, SceneTree, ScrollBar, ShadowEffect, Text2D, TextLoader, Texture2D, TextureLoader, TextureRect2D, Ticker, TiltShiftTransition, Timeline, TimelineNode, Transform2D, Transition, TwistTransition, UvGeometry, UvMaterial, Vector, Vector2, Vector3, Vector4, VertexAttribute, VertexBuffer, Video2D, VideoLoader, VideoTexture, Viewport, ViewportTexture, WebAudio, WebAudioContext, WebGLBatch2DModule, WebGLBlendMode, WebGLBufferModule, WebGLFramebufferModule, WebGLMaskModule, WebGLModule, WebGLProgramModule, WebGLRenderer, WebGLScissorModule, WebGLState, WebGLStateModule, WebGLStencilModule, WebGLTextureModule, WebGLVertexArrayModule, WebGLViewportModule, WebSound, WheelInputEvent, XScrollBar, YScrollBar, ZoomBlurEffect, assets, clamp, createHTMLCanvas, createNode, crossOrigin, cubicBezier, curves, customNode, customNodes, defaultOptions, defineProperty, determineCrossOrigin, ease, easeIn, easeInOut, easeOut, getDeclarations, getDefaultCssPropertyValue, isCanvasElement, isElementNode, isImageElement, isPow2, isVideoElement, isWebgl2, lerp, linear, log2, mapWebGLBlendModes, nextPow2, nextTick, parseCssFunctions, parseCssProperty, property, protectedProperty, render, timingFunctions, uid };
|