modern-canvas 0.4.22 → 0.4.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +594 -296
- package/dist/index.d.cts +108 -37
- package/dist/index.d.mts +108 -37
- package/dist/index.d.ts +108 -37
- package/dist/index.js +42 -42
- package/dist/index.mjs +590 -297
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { colord, extend } from 'colord';
|
|
2
2
|
import namesPlugin from 'colord/plugins/names';
|
|
3
|
+
import { Path2D, Path2DSet, svgToDOM, svgToPath2DSet, Matrix3 as Matrix3$1, svgPathCommandsAddToPath2D } from 'modern-path2d';
|
|
3
4
|
import { getDefaultStyle } from 'modern-idoc';
|
|
4
|
-
import { Path2D } from 'modern-path2d';
|
|
5
|
-
import { loadYoga, BoxSizing, PositionType, Edge, Overflow, Gutter, Justify, Wrap, FlexDirection, Display, Direction, Align } from 'yoga-layout/load';
|
|
6
5
|
import { Text, textDefaultStyle } from 'modern-text';
|
|
6
|
+
import { loadYoga, BoxSizing, PositionType, Edge, Overflow, Gutter, Justify, Wrap, FlexDirection, Display, Direction, Align } from 'yoga-layout/load';
|
|
7
7
|
|
|
8
8
|
const PI = Math.PI;
|
|
9
9
|
const PI_2 = PI * 2;
|
|
@@ -2149,13 +2149,13 @@ class Vector3 extends Vector {
|
|
|
2149
2149
|
}
|
|
2150
2150
|
}
|
|
2151
2151
|
|
|
2152
|
-
var __defProp$
|
|
2153
|
-
var __decorateClass$
|
|
2152
|
+
var __defProp$O = Object.defineProperty;
|
|
2153
|
+
var __decorateClass$W = (decorators, target, key, kind) => {
|
|
2154
2154
|
var result = void 0 ;
|
|
2155
2155
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
2156
2156
|
if (decorator = decorators[i])
|
|
2157
2157
|
result = (decorator(target, key, result) ) || result;
|
|
2158
|
-
if (result) __defProp$
|
|
2158
|
+
if (result) __defProp$O(target, key, result);
|
|
2159
2159
|
return result;
|
|
2160
2160
|
};
|
|
2161
2161
|
class MainLoop extends CoreObject {
|
|
@@ -2198,10 +2198,10 @@ class MainLoop extends CoreObject {
|
|
|
2198
2198
|
this.stop();
|
|
2199
2199
|
}
|
|
2200
2200
|
}
|
|
2201
|
-
__decorateClass$
|
|
2201
|
+
__decorateClass$W([
|
|
2202
2202
|
property({ default: 24 })
|
|
2203
2203
|
], MainLoop.prototype, "fps");
|
|
2204
|
-
__decorateClass$
|
|
2204
|
+
__decorateClass$W([
|
|
2205
2205
|
property({ default: 1 })
|
|
2206
2206
|
], MainLoop.prototype, "speed");
|
|
2207
2207
|
|
|
@@ -4503,13 +4503,13 @@ class Geometry extends Resource {
|
|
|
4503
4503
|
}
|
|
4504
4504
|
}
|
|
4505
4505
|
|
|
4506
|
-
var __defProp$
|
|
4507
|
-
var __decorateClass$
|
|
4506
|
+
var __defProp$N = Object.defineProperty;
|
|
4507
|
+
var __decorateClass$V = (decorators, target, key, kind) => {
|
|
4508
4508
|
var result = void 0 ;
|
|
4509
4509
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
4510
4510
|
if (decorator = decorators[i])
|
|
4511
4511
|
result = (decorator(target, key, result) ) || result;
|
|
4512
|
-
if (result) __defProp$
|
|
4512
|
+
if (result) __defProp$N(target, key, result);
|
|
4513
4513
|
return result;
|
|
4514
4514
|
};
|
|
4515
4515
|
class IndexBuffer extends Resource {
|
|
@@ -4553,20 +4553,20 @@ class IndexBuffer extends Resource {
|
|
|
4553
4553
|
return result;
|
|
4554
4554
|
}
|
|
4555
4555
|
}
|
|
4556
|
-
__decorateClass$
|
|
4556
|
+
__decorateClass$V([
|
|
4557
4557
|
protectedProperty({ default: null })
|
|
4558
4558
|
], IndexBuffer.prototype, "data");
|
|
4559
|
-
__decorateClass$
|
|
4559
|
+
__decorateClass$V([
|
|
4560
4560
|
protectedProperty({ default: false })
|
|
4561
4561
|
], IndexBuffer.prototype, "dynamic");
|
|
4562
4562
|
|
|
4563
|
-
var __defProp$
|
|
4564
|
-
var __decorateClass$
|
|
4563
|
+
var __defProp$M = Object.defineProperty;
|
|
4564
|
+
var __decorateClass$U = (decorators, target, key, kind) => {
|
|
4565
4565
|
var result = void 0 ;
|
|
4566
4566
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
4567
4567
|
if (decorator = decorators[i])
|
|
4568
4568
|
result = (decorator(target, key, result) ) || result;
|
|
4569
|
-
if (result) __defProp$
|
|
4569
|
+
if (result) __defProp$M(target, key, result);
|
|
4570
4570
|
return result;
|
|
4571
4571
|
};
|
|
4572
4572
|
class VertexBuffer extends Resource {
|
|
@@ -4610,20 +4610,20 @@ class VertexBuffer extends Resource {
|
|
|
4610
4610
|
return result;
|
|
4611
4611
|
}
|
|
4612
4612
|
}
|
|
4613
|
-
__decorateClass$
|
|
4613
|
+
__decorateClass$U([
|
|
4614
4614
|
protectedProperty({ default: null })
|
|
4615
4615
|
], VertexBuffer.prototype, "data");
|
|
4616
|
-
__decorateClass$
|
|
4616
|
+
__decorateClass$U([
|
|
4617
4617
|
protectedProperty({ default: false })
|
|
4618
4618
|
], VertexBuffer.prototype, "dynamic");
|
|
4619
4619
|
|
|
4620
|
-
var __defProp$
|
|
4621
|
-
var __decorateClass$
|
|
4620
|
+
var __defProp$L = Object.defineProperty;
|
|
4621
|
+
var __decorateClass$T = (decorators, target, key, kind) => {
|
|
4622
4622
|
var result = void 0 ;
|
|
4623
4623
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
4624
4624
|
if (decorator = decorators[i])
|
|
4625
4625
|
result = (decorator(target, key, result) ) || result;
|
|
4626
|
-
if (result) __defProp$
|
|
4626
|
+
if (result) __defProp$L(target, key, result);
|
|
4627
4627
|
return result;
|
|
4628
4628
|
};
|
|
4629
4629
|
class VertexAttribute extends Resource {
|
|
@@ -4660,25 +4660,25 @@ class VertexAttribute extends Resource {
|
|
|
4660
4660
|
return result;
|
|
4661
4661
|
}
|
|
4662
4662
|
}
|
|
4663
|
-
__decorateClass$
|
|
4663
|
+
__decorateClass$T([
|
|
4664
4664
|
protectedProperty()
|
|
4665
4665
|
], VertexAttribute.prototype, "buffer");
|
|
4666
|
-
__decorateClass$
|
|
4666
|
+
__decorateClass$T([
|
|
4667
4667
|
protectedProperty({ default: 0 })
|
|
4668
4668
|
], VertexAttribute.prototype, "size");
|
|
4669
|
-
__decorateClass$
|
|
4669
|
+
__decorateClass$T([
|
|
4670
4670
|
protectedProperty({ default: false })
|
|
4671
4671
|
], VertexAttribute.prototype, "normalized");
|
|
4672
|
-
__decorateClass$
|
|
4672
|
+
__decorateClass$T([
|
|
4673
4673
|
protectedProperty({ default: "float" })
|
|
4674
4674
|
], VertexAttribute.prototype, "type");
|
|
4675
|
-
__decorateClass$
|
|
4675
|
+
__decorateClass$T([
|
|
4676
4676
|
protectedProperty()
|
|
4677
4677
|
], VertexAttribute.prototype, "stride");
|
|
4678
|
-
__decorateClass$
|
|
4678
|
+
__decorateClass$T([
|
|
4679
4679
|
protectedProperty()
|
|
4680
4680
|
], VertexAttribute.prototype, "offset");
|
|
4681
|
-
__decorateClass$
|
|
4681
|
+
__decorateClass$T([
|
|
4682
4682
|
protectedProperty()
|
|
4683
4683
|
], VertexAttribute.prototype, "divisor");
|
|
4684
4684
|
|
|
@@ -4922,13 +4922,13 @@ class UvGeometry extends Geometry {
|
|
|
4922
4922
|
}
|
|
4923
4923
|
}
|
|
4924
4924
|
|
|
4925
|
-
var __defProp$
|
|
4926
|
-
var __decorateClass$
|
|
4925
|
+
var __defProp$K = Object.defineProperty;
|
|
4926
|
+
var __decorateClass$S = (decorators, target, key, kind) => {
|
|
4927
4927
|
var result = void 0 ;
|
|
4928
4928
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
4929
4929
|
if (decorator = decorators[i])
|
|
4930
4930
|
result = (decorator(target, key, result) ) || result;
|
|
4931
|
-
if (result) __defProp$
|
|
4931
|
+
if (result) __defProp$K(target, key, result);
|
|
4932
4932
|
return result;
|
|
4933
4933
|
};
|
|
4934
4934
|
class Texture2D extends Resource {
|
|
@@ -5054,22 +5054,22 @@ class Texture2D extends Resource {
|
|
|
5054
5054
|
}
|
|
5055
5055
|
}
|
|
5056
5056
|
}
|
|
5057
|
-
__decorateClass$
|
|
5057
|
+
__decorateClass$S([
|
|
5058
5058
|
protectedProperty()
|
|
5059
5059
|
], Texture2D.prototype, "source");
|
|
5060
|
-
__decorateClass$
|
|
5060
|
+
__decorateClass$S([
|
|
5061
5061
|
property({ default: 0 })
|
|
5062
5062
|
], Texture2D.prototype, "width");
|
|
5063
|
-
__decorateClass$
|
|
5063
|
+
__decorateClass$S([
|
|
5064
5064
|
property({ default: 0 })
|
|
5065
5065
|
], Texture2D.prototype, "height");
|
|
5066
|
-
__decorateClass$
|
|
5066
|
+
__decorateClass$S([
|
|
5067
5067
|
property({ default: "linear" })
|
|
5068
5068
|
], Texture2D.prototype, "filterMode");
|
|
5069
|
-
__decorateClass$
|
|
5069
|
+
__decorateClass$S([
|
|
5070
5070
|
property({ default: "clamp_to_edge" })
|
|
5071
5071
|
], Texture2D.prototype, "wrapMode");
|
|
5072
|
-
__decorateClass$
|
|
5072
|
+
__decorateClass$S([
|
|
5073
5073
|
property({ default: 1 })
|
|
5074
5074
|
], Texture2D.prototype, "pixelRatio");
|
|
5075
5075
|
|
|
@@ -5099,13 +5099,13 @@ class AnimatedTexture extends Resource {
|
|
|
5099
5099
|
}
|
|
5100
5100
|
}
|
|
5101
5101
|
|
|
5102
|
-
var __defProp$
|
|
5103
|
-
var __decorateClass$
|
|
5102
|
+
var __defProp$J = Object.defineProperty;
|
|
5103
|
+
var __decorateClass$R = (decorators, target, key, kind) => {
|
|
5104
5104
|
var result = void 0 ;
|
|
5105
5105
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
5106
5106
|
if (decorator = decorators[i])
|
|
5107
5107
|
result = (decorator(target, key, result) ) || result;
|
|
5108
|
-
if (result) __defProp$
|
|
5108
|
+
if (result) __defProp$J(target, key, result);
|
|
5109
5109
|
return result;
|
|
5110
5110
|
};
|
|
5111
5111
|
class CanvasTexture extends Texture2D {
|
|
@@ -5124,7 +5124,7 @@ class CanvasTexture extends Texture2D {
|
|
|
5124
5124
|
super._updateProperty(key, value, oldValue, declaration);
|
|
5125
5125
|
}
|
|
5126
5126
|
}
|
|
5127
|
-
__decorateClass$
|
|
5127
|
+
__decorateClass$R([
|
|
5128
5128
|
property({ default: 2 })
|
|
5129
5129
|
], CanvasTexture.prototype, "pixelRatio");
|
|
5130
5130
|
|
|
@@ -5286,13 +5286,13 @@ class PixelsTexture extends Texture2D {
|
|
|
5286
5286
|
}
|
|
5287
5287
|
}
|
|
5288
5288
|
|
|
5289
|
-
var __defProp$
|
|
5290
|
-
var __decorateClass$
|
|
5289
|
+
var __defProp$I = Object.defineProperty;
|
|
5290
|
+
var __decorateClass$Q = (decorators, target, key, kind) => {
|
|
5291
5291
|
var result = void 0 ;
|
|
5292
5292
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
5293
5293
|
if (decorator = decorators[i])
|
|
5294
5294
|
result = (decorator(target, key, result) ) || result;
|
|
5295
|
-
if (result) __defProp$
|
|
5295
|
+
if (result) __defProp$I(target, key, result);
|
|
5296
5296
|
return result;
|
|
5297
5297
|
};
|
|
5298
5298
|
function resolveOptions(options) {
|
|
@@ -5536,10 +5536,10 @@ const _VideoTexture = class _VideoTexture extends Texture2D {
|
|
|
5536
5536
|
}
|
|
5537
5537
|
}
|
|
5538
5538
|
};
|
|
5539
|
-
__decorateClass$
|
|
5539
|
+
__decorateClass$Q([
|
|
5540
5540
|
protectedProperty({ default: true })
|
|
5541
5541
|
], _VideoTexture.prototype, "autoUpdate");
|
|
5542
|
-
__decorateClass$
|
|
5542
|
+
__decorateClass$Q([
|
|
5543
5543
|
protectedProperty({ default: 0 })
|
|
5544
5544
|
], _VideoTexture.prototype, "fps");
|
|
5545
5545
|
let VideoTexture = _VideoTexture;
|
|
@@ -5548,14 +5548,14 @@ class ViewportTexture extends PixelsTexture {
|
|
|
5548
5548
|
//
|
|
5549
5549
|
}
|
|
5550
5550
|
|
|
5551
|
-
var __defProp$
|
|
5551
|
+
var __defProp$H = Object.defineProperty;
|
|
5552
5552
|
var __getOwnPropDesc$I = Object.getOwnPropertyDescriptor;
|
|
5553
|
-
var __decorateClass$
|
|
5553
|
+
var __decorateClass$P = (decorators, target, key, kind) => {
|
|
5554
5554
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$I(target, key) : target;
|
|
5555
5555
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
5556
5556
|
if (decorator = decorators[i])
|
|
5557
5557
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
5558
|
-
if (kind && result) __defProp$
|
|
5558
|
+
if (kind && result) __defProp$H(target, key, result);
|
|
5559
5559
|
return result;
|
|
5560
5560
|
};
|
|
5561
5561
|
const tagUidMap = {};
|
|
@@ -5732,11 +5732,9 @@ let Node = class extends CoreObject {
|
|
|
5732
5732
|
}
|
|
5733
5733
|
}
|
|
5734
5734
|
_update(changed) {
|
|
5735
|
-
this._tree?.log(this.name, "updating");
|
|
5736
5735
|
super._update(changed);
|
|
5737
5736
|
}
|
|
5738
5737
|
_updateProperty(key, value, oldValue, declaration) {
|
|
5739
|
-
this._tree?.log(this.name, `updating [${String(key)}]`);
|
|
5740
5738
|
super._updateProperty(key, value, oldValue, declaration);
|
|
5741
5739
|
}
|
|
5742
5740
|
_onTreeEnter(tree) {
|
|
@@ -6060,36 +6058,36 @@ let Node = class extends CoreObject {
|
|
|
6060
6058
|
return node;
|
|
6061
6059
|
}
|
|
6062
6060
|
};
|
|
6063
|
-
__decorateClass$
|
|
6061
|
+
__decorateClass$P([
|
|
6064
6062
|
protectedProperty()
|
|
6065
6063
|
], Node.prototype, "name", 2);
|
|
6066
|
-
__decorateClass$
|
|
6064
|
+
__decorateClass$P([
|
|
6067
6065
|
property()
|
|
6068
6066
|
], Node.prototype, "mask", 2);
|
|
6069
|
-
__decorateClass$
|
|
6067
|
+
__decorateClass$P([
|
|
6070
6068
|
property({ default: "inherit" })
|
|
6071
6069
|
], Node.prototype, "processMode", 2);
|
|
6072
|
-
__decorateClass$
|
|
6070
|
+
__decorateClass$P([
|
|
6073
6071
|
property({ default: "default" })
|
|
6074
6072
|
], Node.prototype, "processSortMode", 2);
|
|
6075
|
-
__decorateClass$
|
|
6073
|
+
__decorateClass$P([
|
|
6076
6074
|
property({ default: "inherit" })
|
|
6077
6075
|
], Node.prototype, "renderMode", 2);
|
|
6078
|
-
__decorateClass$
|
|
6076
|
+
__decorateClass$P([
|
|
6079
6077
|
property({ default: "default" })
|
|
6080
6078
|
], Node.prototype, "internalMode", 2);
|
|
6081
|
-
Node = __decorateClass$
|
|
6079
|
+
Node = __decorateClass$P([
|
|
6082
6080
|
customNode("Node")
|
|
6083
6081
|
], Node);
|
|
6084
6082
|
|
|
6085
|
-
var __defProp$
|
|
6083
|
+
var __defProp$G = Object.defineProperty;
|
|
6086
6084
|
var __getOwnPropDesc$H = Object.getOwnPropertyDescriptor;
|
|
6087
|
-
var __decorateClass$
|
|
6085
|
+
var __decorateClass$O = (decorators, target, key, kind) => {
|
|
6088
6086
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$H(target, key) : target;
|
|
6089
6087
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6090
6088
|
if (decorator = decorators[i])
|
|
6091
6089
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
6092
|
-
if (kind && result) __defProp$
|
|
6090
|
+
if (kind && result) __defProp$G(target, key, result);
|
|
6093
6091
|
return result;
|
|
6094
6092
|
};
|
|
6095
6093
|
let TimelineNode = class extends Node {
|
|
@@ -6149,30 +6147,30 @@ let TimelineNode = class extends Node {
|
|
|
6149
6147
|
this._updateCurrentTime();
|
|
6150
6148
|
}
|
|
6151
6149
|
};
|
|
6152
|
-
__decorateClass$
|
|
6150
|
+
__decorateClass$O([
|
|
6153
6151
|
property({ default: 0 })
|
|
6154
6152
|
], TimelineNode.prototype, "delay", 2);
|
|
6155
|
-
__decorateClass$
|
|
6153
|
+
__decorateClass$O([
|
|
6156
6154
|
property({ default: 0 })
|
|
6157
6155
|
], TimelineNode.prototype, "duration", 2);
|
|
6158
|
-
__decorateClass$
|
|
6156
|
+
__decorateClass$O([
|
|
6159
6157
|
property({ default: false })
|
|
6160
6158
|
], TimelineNode.prototype, "paused", 2);
|
|
6161
|
-
__decorateClass$
|
|
6159
|
+
__decorateClass$O([
|
|
6162
6160
|
protectedProperty()
|
|
6163
6161
|
], TimelineNode.prototype, "insideTimeRange", 2);
|
|
6164
|
-
TimelineNode = __decorateClass$
|
|
6162
|
+
TimelineNode = __decorateClass$O([
|
|
6165
6163
|
customNode("TimelineNode")
|
|
6166
6164
|
], TimelineNode);
|
|
6167
6165
|
|
|
6168
|
-
var __defProp$
|
|
6166
|
+
var __defProp$F = Object.defineProperty;
|
|
6169
6167
|
var __getOwnPropDesc$G = Object.getOwnPropertyDescriptor;
|
|
6170
|
-
var __decorateClass$
|
|
6168
|
+
var __decorateClass$N = (decorators, target, key, kind) => {
|
|
6171
6169
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$G(target, key) : target;
|
|
6172
6170
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6173
6171
|
if (decorator = decorators[i])
|
|
6174
6172
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
6175
|
-
if (kind && result) __defProp$
|
|
6173
|
+
if (kind && result) __defProp$F(target, key, result);
|
|
6176
6174
|
return result;
|
|
6177
6175
|
};
|
|
6178
6176
|
let Viewport = class extends Node {
|
|
@@ -6310,30 +6308,30 @@ let Viewport = class extends Node {
|
|
|
6310
6308
|
return this._projection.toArray(transpose);
|
|
6311
6309
|
}
|
|
6312
6310
|
};
|
|
6313
|
-
__decorateClass$
|
|
6311
|
+
__decorateClass$N([
|
|
6314
6312
|
property({ default: 0 })
|
|
6315
6313
|
], Viewport.prototype, "x", 2);
|
|
6316
|
-
__decorateClass$
|
|
6314
|
+
__decorateClass$N([
|
|
6317
6315
|
property({ default: 0 })
|
|
6318
6316
|
], Viewport.prototype, "y", 2);
|
|
6319
|
-
__decorateClass$
|
|
6317
|
+
__decorateClass$N([
|
|
6320
6318
|
property({ default: 0 })
|
|
6321
6319
|
], Viewport.prototype, "width", 2);
|
|
6322
|
-
__decorateClass$
|
|
6320
|
+
__decorateClass$N([
|
|
6323
6321
|
property({ default: 0 })
|
|
6324
6322
|
], Viewport.prototype, "height", 2);
|
|
6325
|
-
Viewport = __decorateClass$
|
|
6323
|
+
Viewport = __decorateClass$N([
|
|
6326
6324
|
customNode("Viewport")
|
|
6327
6325
|
], Viewport);
|
|
6328
6326
|
|
|
6329
|
-
var __defProp$
|
|
6327
|
+
var __defProp$E = Object.defineProperty;
|
|
6330
6328
|
var __getOwnPropDesc$F = Object.getOwnPropertyDescriptor;
|
|
6331
|
-
var __decorateClass$
|
|
6329
|
+
var __decorateClass$M = (decorators, target, key, kind) => {
|
|
6332
6330
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$F(target, key) : target;
|
|
6333
6331
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6334
6332
|
if (decorator = decorators[i])
|
|
6335
6333
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
6336
|
-
if (kind && result) __defProp$
|
|
6334
|
+
if (kind && result) __defProp$E(target, key, result);
|
|
6337
6335
|
return result;
|
|
6338
6336
|
};
|
|
6339
6337
|
let Effect = class extends TimelineNode {
|
|
@@ -6574,31 +6572,31 @@ let Effect = class extends TimelineNode {
|
|
|
6574
6572
|
}
|
|
6575
6573
|
}
|
|
6576
6574
|
};
|
|
6577
|
-
__decorateClass$
|
|
6575
|
+
__decorateClass$M([
|
|
6578
6576
|
protectedProperty()
|
|
6579
6577
|
], Effect.prototype, "material", 2);
|
|
6580
|
-
__decorateClass$
|
|
6578
|
+
__decorateClass$M([
|
|
6581
6579
|
property()
|
|
6582
6580
|
], Effect.prototype, "effectMode", 2);
|
|
6583
|
-
__decorateClass$
|
|
6581
|
+
__decorateClass$M([
|
|
6584
6582
|
property({ default: "" })
|
|
6585
6583
|
], Effect.prototype, "glsl", 2);
|
|
6586
|
-
__decorateClass$
|
|
6584
|
+
__decorateClass$M([
|
|
6587
6585
|
property({ default: "" })
|
|
6588
6586
|
], Effect.prototype, "glslSrc", 2);
|
|
6589
|
-
Effect = __decorateClass$
|
|
6587
|
+
Effect = __decorateClass$M([
|
|
6590
6588
|
customNode("Effect")
|
|
6591
6589
|
], Effect);
|
|
6592
6590
|
|
|
6593
|
-
var __defProp$
|
|
6591
|
+
var __defProp$D = Object.defineProperty;
|
|
6594
6592
|
var __getOwnPropDesc$E = Object.getOwnPropertyDescriptor;
|
|
6595
|
-
var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$
|
|
6596
|
-
var __decorateClass$
|
|
6593
|
+
var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$D(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6594
|
+
var __decorateClass$L = (decorators, target, key, kind) => {
|
|
6597
6595
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$E(target, key) : target;
|
|
6598
6596
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6599
6597
|
if (decorator = decorators[i])
|
|
6600
6598
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
6601
|
-
if (kind && result) __defProp$
|
|
6599
|
+
if (kind && result) __defProp$D(target, key, result);
|
|
6602
6600
|
return result;
|
|
6603
6601
|
};
|
|
6604
6602
|
var __publicField$i = (obj, key, value) => __defNormalProp$i(obj, key + "" , value);
|
|
@@ -6658,43 +6656,43 @@ void main(void) {
|
|
|
6658
6656
|
gl_FragColor = c * alpha;
|
|
6659
6657
|
}`
|
|
6660
6658
|
}));
|
|
6661
|
-
__decorateClass$
|
|
6659
|
+
__decorateClass$L([
|
|
6662
6660
|
property({ default: 1 })
|
|
6663
6661
|
], ColorAdjustEffect.prototype, "saturation", 2);
|
|
6664
|
-
__decorateClass$
|
|
6662
|
+
__decorateClass$L([
|
|
6665
6663
|
property({ default: 1 })
|
|
6666
6664
|
], ColorAdjustEffect.prototype, "contrast", 2);
|
|
6667
|
-
__decorateClass$
|
|
6665
|
+
__decorateClass$L([
|
|
6668
6666
|
property({ default: 1 })
|
|
6669
6667
|
], ColorAdjustEffect.prototype, "brightness", 2);
|
|
6670
|
-
__decorateClass$
|
|
6668
|
+
__decorateClass$L([
|
|
6671
6669
|
property({ default: 1 })
|
|
6672
6670
|
], ColorAdjustEffect.prototype, "red", 2);
|
|
6673
|
-
__decorateClass$
|
|
6671
|
+
__decorateClass$L([
|
|
6674
6672
|
property({ default: 1 })
|
|
6675
6673
|
], ColorAdjustEffect.prototype, "green", 2);
|
|
6676
|
-
__decorateClass$
|
|
6674
|
+
__decorateClass$L([
|
|
6677
6675
|
property({ default: 1 })
|
|
6678
6676
|
], ColorAdjustEffect.prototype, "blue", 2);
|
|
6679
|
-
__decorateClass$
|
|
6677
|
+
__decorateClass$L([
|
|
6680
6678
|
property({ default: 1 })
|
|
6681
6679
|
], ColorAdjustEffect.prototype, "alpha", 2);
|
|
6682
|
-
__decorateClass$
|
|
6680
|
+
__decorateClass$L([
|
|
6683
6681
|
property({ default: 1 })
|
|
6684
6682
|
], ColorAdjustEffect.prototype, "gamma", 2);
|
|
6685
|
-
ColorAdjustEffect = __decorateClass$
|
|
6683
|
+
ColorAdjustEffect = __decorateClass$L([
|
|
6686
6684
|
customNode("ColorAdjustEffect")
|
|
6687
6685
|
], ColorAdjustEffect);
|
|
6688
6686
|
|
|
6689
|
-
var __defProp$
|
|
6687
|
+
var __defProp$C = Object.defineProperty;
|
|
6690
6688
|
var __getOwnPropDesc$D = Object.getOwnPropertyDescriptor;
|
|
6691
|
-
var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$
|
|
6692
|
-
var __decorateClass$
|
|
6689
|
+
var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$C(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6690
|
+
var __decorateClass$K = (decorators, target, key, kind) => {
|
|
6693
6691
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$D(target, key) : target;
|
|
6694
6692
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6695
6693
|
if (decorator = decorators[i])
|
|
6696
6694
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
6697
|
-
if (kind && result) __defProp$
|
|
6695
|
+
if (kind && result) __defProp$C(target, key, result);
|
|
6698
6696
|
return result;
|
|
6699
6697
|
};
|
|
6700
6698
|
var __publicField$h = (obj, key, value) => __defNormalProp$h(obj, key + "" , value);
|
|
@@ -6774,22 +6772,22 @@ void main(void) {
|
|
|
6774
6772
|
);
|
|
6775
6773
|
}`
|
|
6776
6774
|
}));
|
|
6777
|
-
__decorateClass$
|
|
6775
|
+
__decorateClass$K([
|
|
6778
6776
|
property()
|
|
6779
6777
|
], ColorFilterEffect.prototype, "filter", 2);
|
|
6780
|
-
ColorFilterEffect = __decorateClass$
|
|
6778
|
+
ColorFilterEffect = __decorateClass$K([
|
|
6781
6779
|
customNode("ColorFilterEffect")
|
|
6782
6780
|
], ColorFilterEffect);
|
|
6783
6781
|
|
|
6784
|
-
var __defProp$
|
|
6782
|
+
var __defProp$B = Object.defineProperty;
|
|
6785
6783
|
var __getOwnPropDesc$C = Object.getOwnPropertyDescriptor;
|
|
6786
|
-
var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$
|
|
6787
|
-
var __decorateClass$
|
|
6784
|
+
var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$B(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6785
|
+
var __decorateClass$J = (decorators, target, key, kind) => {
|
|
6788
6786
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$C(target, key) : target;
|
|
6789
6787
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6790
6788
|
if (decorator = decorators[i])
|
|
6791
6789
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
6792
|
-
if (kind && result) __defProp$
|
|
6790
|
+
if (kind && result) __defProp$B(target, key, result);
|
|
6793
6791
|
return result;
|
|
6794
6792
|
};
|
|
6795
6793
|
var __publicField$g = (obj, key, value) => __defNormalProp$g(obj, key + "" , value);
|
|
@@ -6865,25 +6863,25 @@ void main(void) {
|
|
|
6865
6863
|
gl_FragColor = vec4(mix(color.rgb, mask.rgb, color.a * mask.a), color.a);
|
|
6866
6864
|
}`
|
|
6867
6865
|
}));
|
|
6868
|
-
__decorateClass$
|
|
6866
|
+
__decorateClass$J([
|
|
6869
6867
|
property({ default: [] })
|
|
6870
6868
|
], ColorOverlayEffect.prototype, "colors", 2);
|
|
6871
|
-
__decorateClass$
|
|
6869
|
+
__decorateClass$J([
|
|
6872
6870
|
property({ default: 0.5 })
|
|
6873
6871
|
], ColorOverlayEffect.prototype, "alpha", 2);
|
|
6874
|
-
ColorOverlayEffect = __decorateClass$
|
|
6872
|
+
ColorOverlayEffect = __decorateClass$J([
|
|
6875
6873
|
customNode("ColorOverlayEffect")
|
|
6876
6874
|
], ColorOverlayEffect);
|
|
6877
6875
|
|
|
6878
|
-
var __defProp$
|
|
6876
|
+
var __defProp$A = Object.defineProperty;
|
|
6879
6877
|
var __getOwnPropDesc$B = Object.getOwnPropertyDescriptor;
|
|
6880
|
-
var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$
|
|
6881
|
-
var __decorateClass$
|
|
6878
|
+
var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$A(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6879
|
+
var __decorateClass$I = (decorators, target, key, kind) => {
|
|
6882
6880
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$B(target, key) : target;
|
|
6883
6881
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6884
6882
|
if (decorator = decorators[i])
|
|
6885
6883
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
6886
|
-
if (kind && result) __defProp$
|
|
6884
|
+
if (kind && result) __defProp$A(target, key, result);
|
|
6887
6885
|
return result;
|
|
6888
6886
|
};
|
|
6889
6887
|
var __publicField$f = (obj, key, value) => __defNormalProp$f(obj, key + "" , value);
|
|
@@ -6950,25 +6948,25 @@ void main(void) {
|
|
|
6950
6948
|
gl_FragColor = color;
|
|
6951
6949
|
}`
|
|
6952
6950
|
}));
|
|
6953
|
-
__decorateClass$
|
|
6951
|
+
__decorateClass$I([
|
|
6954
6952
|
property({ default: [] })
|
|
6955
6953
|
], ColorRemoveEffect.prototype, "colors", 2);
|
|
6956
|
-
__decorateClass$
|
|
6954
|
+
__decorateClass$I([
|
|
6957
6955
|
property({ default: 0.5 })
|
|
6958
6956
|
], ColorRemoveEffect.prototype, "epsilon", 2);
|
|
6959
|
-
ColorRemoveEffect = __decorateClass$
|
|
6957
|
+
ColorRemoveEffect = __decorateClass$I([
|
|
6960
6958
|
customNode("ColorRemoveEffect")
|
|
6961
6959
|
], ColorRemoveEffect);
|
|
6962
6960
|
|
|
6963
|
-
var __defProp$
|
|
6961
|
+
var __defProp$z = Object.defineProperty;
|
|
6964
6962
|
var __getOwnPropDesc$A = Object.getOwnPropertyDescriptor;
|
|
6965
|
-
var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$
|
|
6966
|
-
var __decorateClass$
|
|
6963
|
+
var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6964
|
+
var __decorateClass$H = (decorators, target, key, kind) => {
|
|
6967
6965
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$A(target, key) : target;
|
|
6968
6966
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6969
6967
|
if (decorator = decorators[i])
|
|
6970
6968
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
6971
|
-
if (kind && result) __defProp$
|
|
6969
|
+
if (kind && result) __defProp$z(target, key, result);
|
|
6972
6970
|
return result;
|
|
6973
6971
|
};
|
|
6974
6972
|
var __publicField$e = (obj, key, value) => __defNormalProp$e(obj, key + "" , value);
|
|
@@ -7057,13 +7055,13 @@ void main(void) {
|
|
|
7057
7055
|
}
|
|
7058
7056
|
}`
|
|
7059
7057
|
}));
|
|
7060
|
-
__decorateClass$
|
|
7058
|
+
__decorateClass$H([
|
|
7061
7059
|
property({ default: [] })
|
|
7062
7060
|
], ColorReplaceEffect.prototype, "colors", 2);
|
|
7063
|
-
__decorateClass$
|
|
7061
|
+
__decorateClass$H([
|
|
7064
7062
|
property({ default: 0.05 })
|
|
7065
7063
|
], ColorReplaceEffect.prototype, "epsilon", 2);
|
|
7066
|
-
ColorReplaceEffect = __decorateClass$
|
|
7064
|
+
ColorReplaceEffect = __decorateClass$H([
|
|
7067
7065
|
customNode("ColorReplaceEffect")
|
|
7068
7066
|
], ColorReplaceEffect);
|
|
7069
7067
|
|
|
@@ -7203,6 +7201,7 @@ class CanvasContext extends Path2D {
|
|
|
7203
7201
|
}
|
|
7204
7202
|
if (vertices.length && oldTexture !== draw.texture && !oldTexture?.is(draw.texture)) {
|
|
7205
7203
|
push(draw.type);
|
|
7204
|
+
texture = draw.texture;
|
|
7206
7205
|
}
|
|
7207
7206
|
const start = vertices.length;
|
|
7208
7207
|
if (draw.type === "fill") {
|
|
@@ -7230,14 +7229,14 @@ class CanvasContext extends Path2D {
|
|
|
7230
7229
|
}
|
|
7231
7230
|
}
|
|
7232
7231
|
|
|
7233
|
-
var __defProp$
|
|
7232
|
+
var __defProp$y = Object.defineProperty;
|
|
7234
7233
|
var __getOwnPropDesc$z = Object.getOwnPropertyDescriptor;
|
|
7235
|
-
var __decorateClass$
|
|
7234
|
+
var __decorateClass$G = (decorators, target, key, kind) => {
|
|
7236
7235
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$z(target, key) : target;
|
|
7237
7236
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7238
7237
|
if (decorator = decorators[i])
|
|
7239
7238
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7240
|
-
if (kind && result) __defProp$
|
|
7239
|
+
if (kind && result) __defProp$y(target, key, result);
|
|
7241
7240
|
return result;
|
|
7242
7241
|
};
|
|
7243
7242
|
let CanvasItem = class extends TimelineNode {
|
|
@@ -7399,19 +7398,19 @@ let CanvasItem = class extends TimelineNode {
|
|
|
7399
7398
|
super._render(renderer);
|
|
7400
7399
|
}
|
|
7401
7400
|
};
|
|
7402
|
-
__decorateClass$
|
|
7401
|
+
__decorateClass$G([
|
|
7403
7402
|
property()
|
|
7404
7403
|
], CanvasItem.prototype, "modulate", 2);
|
|
7405
|
-
__decorateClass$
|
|
7404
|
+
__decorateClass$G([
|
|
7406
7405
|
property()
|
|
7407
7406
|
], CanvasItem.prototype, "blendMode", 2);
|
|
7408
|
-
__decorateClass$
|
|
7407
|
+
__decorateClass$G([
|
|
7409
7408
|
protectedProperty({ default: true })
|
|
7410
7409
|
], CanvasItem.prototype, "visible", 2);
|
|
7411
|
-
__decorateClass$
|
|
7410
|
+
__decorateClass$G([
|
|
7412
7411
|
protectedProperty({ default: 1 })
|
|
7413
7412
|
], CanvasItem.prototype, "opacity", 2);
|
|
7414
|
-
CanvasItem = __decorateClass$
|
|
7413
|
+
CanvasItem = __decorateClass$G([
|
|
7415
7414
|
customNode("CanvasItem")
|
|
7416
7415
|
], CanvasItem);
|
|
7417
7416
|
|
|
@@ -7441,14 +7440,14 @@ class RenderStack {
|
|
|
7441
7440
|
}
|
|
7442
7441
|
}
|
|
7443
7442
|
|
|
7444
|
-
var __defProp$
|
|
7443
|
+
var __defProp$x = Object.defineProperty;
|
|
7445
7444
|
var __getOwnPropDesc$y = Object.getOwnPropertyDescriptor;
|
|
7446
|
-
var __decorateClass$
|
|
7445
|
+
var __decorateClass$F = (decorators, target, key, kind) => {
|
|
7447
7446
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$y(target, key) : target;
|
|
7448
7447
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7449
7448
|
if (decorator = decorators[i])
|
|
7450
7449
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7451
|
-
if (kind && result) __defProp$
|
|
7450
|
+
if (kind && result) __defProp$x(target, key, result);
|
|
7452
7451
|
return result;
|
|
7453
7452
|
};
|
|
7454
7453
|
let Timeline = class extends Node {
|
|
@@ -7493,29 +7492,29 @@ let Timeline = class extends Node {
|
|
|
7493
7492
|
this.addTime(delta);
|
|
7494
7493
|
}
|
|
7495
7494
|
};
|
|
7496
|
-
__decorateClass$
|
|
7495
|
+
__decorateClass$F([
|
|
7497
7496
|
property({ default: 0 })
|
|
7498
7497
|
], Timeline.prototype, "startTime", 2);
|
|
7499
|
-
__decorateClass$
|
|
7498
|
+
__decorateClass$F([
|
|
7500
7499
|
property({ default: 0 })
|
|
7501
7500
|
], Timeline.prototype, "currentTime", 2);
|
|
7502
|
-
__decorateClass$
|
|
7501
|
+
__decorateClass$F([
|
|
7503
7502
|
property({ default: Number.MAX_SAFE_INTEGER })
|
|
7504
7503
|
], Timeline.prototype, "endTime", 2);
|
|
7505
|
-
__decorateClass$
|
|
7504
|
+
__decorateClass$F([
|
|
7506
7505
|
property({ default: false })
|
|
7507
7506
|
], Timeline.prototype, "loop", 2);
|
|
7508
|
-
Timeline = __decorateClass$
|
|
7507
|
+
Timeline = __decorateClass$F([
|
|
7509
7508
|
customNode("Timeline")
|
|
7510
7509
|
], Timeline);
|
|
7511
7510
|
|
|
7512
|
-
var __defProp$
|
|
7513
|
-
var __decorateClass$
|
|
7511
|
+
var __defProp$w = Object.defineProperty;
|
|
7512
|
+
var __decorateClass$E = (decorators, target, key, kind) => {
|
|
7514
7513
|
var result = void 0 ;
|
|
7515
7514
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7516
7515
|
if (decorator = decorators[i])
|
|
7517
7516
|
result = (decorator(target, key, result) ) || result;
|
|
7518
|
-
if (result) __defProp$
|
|
7517
|
+
if (result) __defProp$w(target, key, result);
|
|
7519
7518
|
return result;
|
|
7520
7519
|
};
|
|
7521
7520
|
class SceneTree extends MainLoop {
|
|
@@ -7588,18 +7587,18 @@ class SceneTree extends MainLoop {
|
|
|
7588
7587
|
this.input.removeEventListeners();
|
|
7589
7588
|
}
|
|
7590
7589
|
}
|
|
7591
|
-
__decorateClass$
|
|
7590
|
+
__decorateClass$E([
|
|
7592
7591
|
property({ default: false })
|
|
7593
7592
|
], SceneTree.prototype, "processPaused");
|
|
7594
|
-
__decorateClass$
|
|
7593
|
+
__decorateClass$E([
|
|
7595
7594
|
property()
|
|
7596
7595
|
], SceneTree.prototype, "backgroundColor");
|
|
7597
|
-
__decorateClass$
|
|
7596
|
+
__decorateClass$E([
|
|
7598
7597
|
protectedProperty({ default: false })
|
|
7599
7598
|
], SceneTree.prototype, "debug");
|
|
7600
7599
|
|
|
7601
7600
|
var __getOwnPropDesc$x = Object.getOwnPropertyDescriptor;
|
|
7602
|
-
var __decorateClass$
|
|
7601
|
+
var __decorateClass$D = (decorators, target, key, kind) => {
|
|
7603
7602
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$x(target, key) : target;
|
|
7604
7603
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7605
7604
|
if (decorator = decorators[i])
|
|
@@ -7612,7 +7611,7 @@ let Transition = class extends Effect {
|
|
|
7612
7611
|
this.setProperties(properties).append(children);
|
|
7613
7612
|
}
|
|
7614
7613
|
};
|
|
7615
|
-
Transition = __decorateClass$
|
|
7614
|
+
Transition = __decorateClass$D([
|
|
7616
7615
|
customNode("Transition", {
|
|
7617
7616
|
effectMode: "transition",
|
|
7618
7617
|
processMode: "pausable",
|
|
@@ -7620,15 +7619,15 @@ Transition = __decorateClass$A([
|
|
|
7620
7619
|
})
|
|
7621
7620
|
], Transition);
|
|
7622
7621
|
|
|
7623
|
-
var __defProp$
|
|
7622
|
+
var __defProp$v = Object.defineProperty;
|
|
7624
7623
|
var __getOwnPropDesc$w = Object.getOwnPropertyDescriptor;
|
|
7625
|
-
var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$
|
|
7626
|
-
var __decorateClass$
|
|
7624
|
+
var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7625
|
+
var __decorateClass$C = (decorators, target, key, kind) => {
|
|
7627
7626
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$w(target, key) : target;
|
|
7628
7627
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7629
7628
|
if (decorator = decorators[i])
|
|
7630
7629
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7631
|
-
if (kind && result) __defProp$
|
|
7630
|
+
if (kind && result) __defProp$v(target, key, result);
|
|
7632
7631
|
return result;
|
|
7633
7632
|
};
|
|
7634
7633
|
var __publicField$d = (obj, key, value) => __defNormalProp$d(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
@@ -7734,25 +7733,25 @@ void main(void) {
|
|
|
7734
7733
|
}`,
|
|
7735
7734
|
frag: frag$2
|
|
7736
7735
|
}));
|
|
7737
|
-
__decorateClass$
|
|
7736
|
+
__decorateClass$C([
|
|
7738
7737
|
property({ default: 4 })
|
|
7739
7738
|
], GaussianBlurEffect.prototype, "strength", 2);
|
|
7740
|
-
__decorateClass$
|
|
7739
|
+
__decorateClass$C([
|
|
7741
7740
|
property({ default: 3 })
|
|
7742
7741
|
], GaussianBlurEffect.prototype, "quality", 2);
|
|
7743
|
-
GaussianBlurEffect = __decorateClass$
|
|
7742
|
+
GaussianBlurEffect = __decorateClass$C([
|
|
7744
7743
|
customNode("GaussianBlurEffect")
|
|
7745
7744
|
], GaussianBlurEffect);
|
|
7746
7745
|
|
|
7747
|
-
var __defProp$
|
|
7746
|
+
var __defProp$u = Object.defineProperty;
|
|
7748
7747
|
var __getOwnPropDesc$v = Object.getOwnPropertyDescriptor;
|
|
7749
|
-
var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$
|
|
7750
|
-
var __decorateClass$
|
|
7748
|
+
var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7749
|
+
var __decorateClass$B = (decorators, target, key, kind) => {
|
|
7751
7750
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$v(target, key) : target;
|
|
7752
7751
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7753
7752
|
if (decorator = decorators[i])
|
|
7754
7753
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7755
|
-
if (kind && result) __defProp$
|
|
7754
|
+
if (kind && result) __defProp$u(target, key, result);
|
|
7756
7755
|
return result;
|
|
7757
7756
|
};
|
|
7758
7757
|
var __publicField$c = (obj, key, value) => __defNormalProp$c(obj, key + "" , value);
|
|
@@ -7816,34 +7815,34 @@ void main(void) {
|
|
|
7816
7815
|
gl_FragColor = sample;
|
|
7817
7816
|
}`
|
|
7818
7817
|
}));
|
|
7819
|
-
__decorateClass$
|
|
7818
|
+
__decorateClass$B([
|
|
7820
7819
|
property({ default: 0 })
|
|
7821
7820
|
], DropShadowEffect.prototype, "color", 2);
|
|
7822
|
-
__decorateClass$
|
|
7821
|
+
__decorateClass$B([
|
|
7823
7822
|
property({ default: 4 })
|
|
7824
7823
|
], DropShadowEffect.prototype, "blur", 2);
|
|
7825
|
-
__decorateClass$
|
|
7824
|
+
__decorateClass$B([
|
|
7826
7825
|
property({ default: 4 })
|
|
7827
7826
|
], DropShadowEffect.prototype, "offsetX", 2);
|
|
7828
|
-
__decorateClass$
|
|
7827
|
+
__decorateClass$B([
|
|
7829
7828
|
property({ default: 4 })
|
|
7830
7829
|
], DropShadowEffect.prototype, "offsetY", 2);
|
|
7831
|
-
__decorateClass$
|
|
7830
|
+
__decorateClass$B([
|
|
7832
7831
|
property({ default: false })
|
|
7833
7832
|
], DropShadowEffect.prototype, "shadowOnly", 2);
|
|
7834
|
-
DropShadowEffect = __decorateClass$
|
|
7833
|
+
DropShadowEffect = __decorateClass$B([
|
|
7835
7834
|
customNode("DropShadowEffect")
|
|
7836
7835
|
], DropShadowEffect);
|
|
7837
7836
|
|
|
7838
|
-
var __defProp$
|
|
7837
|
+
var __defProp$t = Object.defineProperty;
|
|
7839
7838
|
var __getOwnPropDesc$u = Object.getOwnPropertyDescriptor;
|
|
7840
|
-
var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$
|
|
7841
|
-
var __decorateClass$
|
|
7839
|
+
var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$t(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7840
|
+
var __decorateClass$A = (decorators, target, key, kind) => {
|
|
7842
7841
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$u(target, key) : target;
|
|
7843
7842
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7844
7843
|
if (decorator = decorators[i])
|
|
7845
7844
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7846
|
-
if (kind && result) __defProp$
|
|
7845
|
+
if (kind && result) __defProp$t(target, key, result);
|
|
7847
7846
|
return result;
|
|
7848
7847
|
};
|
|
7849
7848
|
var __publicField$b = (obj, key, value) => __defNormalProp$b(obj, key + "" , value);
|
|
@@ -7888,22 +7887,22 @@ void main(void) {
|
|
|
7888
7887
|
gl_FragColor = vec4(color.rgb * alpha, alpha);
|
|
7889
7888
|
}`
|
|
7890
7889
|
}));
|
|
7891
|
-
__decorateClass$
|
|
7890
|
+
__decorateClass$A([
|
|
7892
7891
|
property({ default: 5 })
|
|
7893
7892
|
], EmbossEffect.prototype, "strength", 2);
|
|
7894
|
-
EmbossEffect = __decorateClass$
|
|
7893
|
+
EmbossEffect = __decorateClass$A([
|
|
7895
7894
|
customNode("EmbossEffect")
|
|
7896
7895
|
], EmbossEffect);
|
|
7897
7896
|
|
|
7898
|
-
var __defProp$
|
|
7897
|
+
var __defProp$s = Object.defineProperty;
|
|
7899
7898
|
var __getOwnPropDesc$t = Object.getOwnPropertyDescriptor;
|
|
7900
|
-
var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$
|
|
7901
|
-
var __decorateClass$
|
|
7899
|
+
var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$s(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7900
|
+
var __decorateClass$z = (decorators, target, key, kind) => {
|
|
7902
7901
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$t(target, key) : target;
|
|
7903
7902
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7904
7903
|
if (decorator = decorators[i])
|
|
7905
7904
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7906
|
-
if (kind && result) __defProp$
|
|
7905
|
+
if (kind && result) __defProp$s(target, key, result);
|
|
7907
7906
|
return result;
|
|
7908
7907
|
};
|
|
7909
7908
|
var __publicField$a = (obj, key, value) => __defNormalProp$a(obj, key + "" , value);
|
|
@@ -8077,46 +8076,46 @@ void main(void) {
|
|
|
8077
8076
|
gl_FragColor.a = texture2D(sampler, coord).a;
|
|
8078
8077
|
}`
|
|
8079
8078
|
}));
|
|
8080
|
-
__decorateClass$
|
|
8079
|
+
__decorateClass$z([
|
|
8081
8080
|
property({ default: 10 })
|
|
8082
8081
|
], GlitchEffect.prototype, "slices", 2);
|
|
8083
|
-
__decorateClass$
|
|
8082
|
+
__decorateClass$z([
|
|
8084
8083
|
property({ default: 512 })
|
|
8085
8084
|
], GlitchEffect.prototype, "sampleSize", 2);
|
|
8086
|
-
__decorateClass$
|
|
8085
|
+
__decorateClass$z([
|
|
8087
8086
|
property({ default: 100 })
|
|
8088
8087
|
], GlitchEffect.prototype, "offset", 2);
|
|
8089
|
-
__decorateClass$
|
|
8088
|
+
__decorateClass$z([
|
|
8090
8089
|
property({ default: 0 })
|
|
8091
8090
|
], GlitchEffect.prototype, "direction", 2);
|
|
8092
|
-
__decorateClass$
|
|
8091
|
+
__decorateClass$z([
|
|
8093
8092
|
property({ default: 2 })
|
|
8094
8093
|
], GlitchEffect.prototype, "fillMode", 2);
|
|
8095
|
-
__decorateClass$
|
|
8094
|
+
__decorateClass$z([
|
|
8096
8095
|
property({ default: 0 })
|
|
8097
8096
|
], GlitchEffect.prototype, "seed", 2);
|
|
8098
|
-
__decorateClass$
|
|
8097
|
+
__decorateClass$z([
|
|
8099
8098
|
property({ default: [2, 2] })
|
|
8100
8099
|
], GlitchEffect.prototype, "red", 2);
|
|
8101
|
-
__decorateClass$
|
|
8100
|
+
__decorateClass$z([
|
|
8102
8101
|
property({ default: [-10, 4] })
|
|
8103
8102
|
], GlitchEffect.prototype, "green", 2);
|
|
8104
|
-
__decorateClass$
|
|
8103
|
+
__decorateClass$z([
|
|
8105
8104
|
property({ default: [10, -4] })
|
|
8106
8105
|
], GlitchEffect.prototype, "blue", 2);
|
|
8107
|
-
GlitchEffect = __decorateClass$
|
|
8106
|
+
GlitchEffect = __decorateClass$z([
|
|
8108
8107
|
customNode("GlitchEffect")
|
|
8109
8108
|
], GlitchEffect);
|
|
8110
8109
|
|
|
8111
|
-
var __defProp$
|
|
8110
|
+
var __defProp$r = Object.defineProperty;
|
|
8112
8111
|
var __getOwnPropDesc$s = Object.getOwnPropertyDescriptor;
|
|
8113
|
-
var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$
|
|
8114
|
-
var __decorateClass$
|
|
8112
|
+
var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$r(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8113
|
+
var __decorateClass$y = (decorators, target, key, kind) => {
|
|
8115
8114
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$s(target, key) : target;
|
|
8116
8115
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
8117
8116
|
if (decorator = decorators[i])
|
|
8118
8117
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8119
|
-
if (kind && result) __defProp$
|
|
8118
|
+
if (kind && result) __defProp$r(target, key, result);
|
|
8120
8119
|
return result;
|
|
8121
8120
|
};
|
|
8122
8121
|
var __publicField$9 = (obj, key, value) => __defNormalProp$9(obj, key + "" , value);
|
|
@@ -8294,39 +8293,39 @@ void main(void) {
|
|
|
8294
8293
|
gl_FragColor = vec4(color.rgb + mist.rgb, color.a);
|
|
8295
8294
|
}`
|
|
8296
8295
|
}));
|
|
8297
|
-
__decorateClass$
|
|
8296
|
+
__decorateClass$y([
|
|
8298
8297
|
property({ default: 0 })
|
|
8299
8298
|
], GodrayEffect.prototype, "time", 2);
|
|
8300
|
-
__decorateClass$
|
|
8299
|
+
__decorateClass$y([
|
|
8301
8300
|
property({ default: 30 })
|
|
8302
8301
|
], GodrayEffect.prototype, "angle", 2);
|
|
8303
|
-
__decorateClass$
|
|
8302
|
+
__decorateClass$y([
|
|
8304
8303
|
property({ default: 0.5 })
|
|
8305
8304
|
], GodrayEffect.prototype, "gain", 2);
|
|
8306
|
-
__decorateClass$
|
|
8305
|
+
__decorateClass$y([
|
|
8307
8306
|
property({ default: 2.5 })
|
|
8308
8307
|
], GodrayEffect.prototype, "lacunarity", 2);
|
|
8309
|
-
__decorateClass$
|
|
8308
|
+
__decorateClass$y([
|
|
8310
8309
|
property({ default: true })
|
|
8311
8310
|
], GodrayEffect.prototype, "parallel", 2);
|
|
8312
|
-
__decorateClass$
|
|
8311
|
+
__decorateClass$y([
|
|
8313
8312
|
property({ default: [0, 0] })
|
|
8314
8313
|
], GodrayEffect.prototype, "center", 2);
|
|
8315
|
-
__decorateClass$
|
|
8314
|
+
__decorateClass$y([
|
|
8316
8315
|
property({ default: 1 })
|
|
8317
8316
|
], GodrayEffect.prototype, "alpha", 2);
|
|
8318
|
-
GodrayEffect = __decorateClass$
|
|
8317
|
+
GodrayEffect = __decorateClass$y([
|
|
8319
8318
|
customNode("GodrayEffect")
|
|
8320
8319
|
], GodrayEffect);
|
|
8321
8320
|
|
|
8322
|
-
var __defProp$
|
|
8321
|
+
var __defProp$q = Object.defineProperty;
|
|
8323
8322
|
var __getOwnPropDesc$r = Object.getOwnPropertyDescriptor;
|
|
8324
|
-
var __decorateClass$
|
|
8323
|
+
var __decorateClass$x = (decorators, target, key, kind) => {
|
|
8325
8324
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$r(target, key) : target;
|
|
8326
8325
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
8327
8326
|
if (decorator = decorators[i])
|
|
8328
8327
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8329
|
-
if (kind && result) __defProp$
|
|
8328
|
+
if (kind && result) __defProp$q(target, key, result);
|
|
8330
8329
|
return result;
|
|
8331
8330
|
};
|
|
8332
8331
|
const frag$1 = `varying vec2 vUv;
|
|
@@ -8417,28 +8416,28 @@ void main() {
|
|
|
8417
8416
|
});
|
|
8418
8417
|
}
|
|
8419
8418
|
};
|
|
8420
|
-
__decorateClass$
|
|
8419
|
+
__decorateClass$x([
|
|
8421
8420
|
property({ default: 4 })
|
|
8422
8421
|
], KawaseBlurEffect.prototype, "strength", 2);
|
|
8423
|
-
__decorateClass$
|
|
8422
|
+
__decorateClass$x([
|
|
8424
8423
|
property({ default: 3 })
|
|
8425
8424
|
], KawaseBlurEffect.prototype, "quality", 2);
|
|
8426
|
-
__decorateClass$
|
|
8425
|
+
__decorateClass$x([
|
|
8427
8426
|
property({ default: [1, 1] })
|
|
8428
8427
|
], KawaseBlurEffect.prototype, "pixelSize", 2);
|
|
8429
|
-
KawaseBlurEffect = __decorateClass$
|
|
8428
|
+
KawaseBlurEffect = __decorateClass$x([
|
|
8430
8429
|
customNode("KawaseBlurEffect")
|
|
8431
8430
|
], KawaseBlurEffect);
|
|
8432
8431
|
|
|
8433
|
-
var __defProp$
|
|
8432
|
+
var __defProp$p = Object.defineProperty;
|
|
8434
8433
|
var __getOwnPropDesc$q = Object.getOwnPropertyDescriptor;
|
|
8435
|
-
var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$
|
|
8436
|
-
var __decorateClass$
|
|
8434
|
+
var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$p(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8435
|
+
var __decorateClass$w = (decorators, target, key, kind) => {
|
|
8437
8436
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$q(target, key) : target;
|
|
8438
8437
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
8439
8438
|
if (decorator = decorators[i])
|
|
8440
8439
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8441
|
-
if (kind && result) __defProp$
|
|
8440
|
+
if (kind && result) __defProp$p(target, key, result);
|
|
8442
8441
|
return result;
|
|
8443
8442
|
};
|
|
8444
8443
|
var __publicField$8 = (obj, key, value) => __defNormalProp$8(obj, key + "" , value);
|
|
@@ -8527,25 +8526,25 @@ void main(void) {
|
|
|
8527
8526
|
}
|
|
8528
8527
|
}`
|
|
8529
8528
|
}));
|
|
8530
|
-
__decorateClass$
|
|
8529
|
+
__decorateClass$w([
|
|
8531
8530
|
protectedProperty()
|
|
8532
8531
|
], MaskEffect.prototype, "texture", 2);
|
|
8533
|
-
__decorateClass$
|
|
8532
|
+
__decorateClass$w([
|
|
8534
8533
|
property({ default: "" })
|
|
8535
8534
|
], MaskEffect.prototype, "src", 2);
|
|
8536
|
-
MaskEffect = __decorateClass$
|
|
8535
|
+
MaskEffect = __decorateClass$w([
|
|
8537
8536
|
customNode("MaskEffect")
|
|
8538
8537
|
], MaskEffect);
|
|
8539
8538
|
|
|
8540
|
-
var __defProp$
|
|
8539
|
+
var __defProp$o = Object.defineProperty;
|
|
8541
8540
|
var __getOwnPropDesc$p = Object.getOwnPropertyDescriptor;
|
|
8542
|
-
var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$
|
|
8543
|
-
var __decorateClass$
|
|
8541
|
+
var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$o(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8542
|
+
var __decorateClass$v = (decorators, target, key, kind) => {
|
|
8544
8543
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$p(target, key) : target;
|
|
8545
8544
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
8546
8545
|
if (decorator = decorators[i])
|
|
8547
8546
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8548
|
-
if (kind && result) __defProp$
|
|
8547
|
+
if (kind && result) __defProp$o(target, key, result);
|
|
8549
8548
|
return result;
|
|
8550
8549
|
};
|
|
8551
8550
|
var __publicField$7 = (obj, key, value) => __defNormalProp$7(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
@@ -8633,40 +8632,40 @@ void main() {
|
|
|
8633
8632
|
};
|
|
8634
8633
|
__publicField$7(OutlineEffect, "MIN_SAMPLES", 1);
|
|
8635
8634
|
__publicField$7(OutlineEffect, "MAX_SAMPLES", 100);
|
|
8636
|
-
__decorateClass$
|
|
8635
|
+
__decorateClass$v([
|
|
8637
8636
|
property({ default: 0 })
|
|
8638
8637
|
], OutlineEffect.prototype, "color", 2);
|
|
8639
|
-
__decorateClass$
|
|
8638
|
+
__decorateClass$v([
|
|
8640
8639
|
property({ default: 1 })
|
|
8641
8640
|
], OutlineEffect.prototype, "width", 2);
|
|
8642
|
-
__decorateClass$
|
|
8641
|
+
__decorateClass$v([
|
|
8643
8642
|
property({ default: "solid" })
|
|
8644
8643
|
], OutlineEffect.prototype, "style", 2);
|
|
8645
|
-
__decorateClass$
|
|
8644
|
+
__decorateClass$v([
|
|
8646
8645
|
property()
|
|
8647
8646
|
], OutlineEffect.prototype, "image", 2);
|
|
8648
|
-
__decorateClass$
|
|
8647
|
+
__decorateClass$v([
|
|
8649
8648
|
property({ default: 1 })
|
|
8650
8649
|
], OutlineEffect.prototype, "opacity", 2);
|
|
8651
|
-
__decorateClass$
|
|
8650
|
+
__decorateClass$v([
|
|
8652
8651
|
property({ default: 0.1 })
|
|
8653
8652
|
], OutlineEffect.prototype, "quality", 2);
|
|
8654
|
-
__decorateClass$
|
|
8653
|
+
__decorateClass$v([
|
|
8655
8654
|
property({ default: false })
|
|
8656
8655
|
], OutlineEffect.prototype, "knockout", 2);
|
|
8657
|
-
OutlineEffect = __decorateClass$
|
|
8656
|
+
OutlineEffect = __decorateClass$v([
|
|
8658
8657
|
customNode("OutlineEffect")
|
|
8659
8658
|
], OutlineEffect);
|
|
8660
8659
|
|
|
8661
|
-
var __defProp$
|
|
8660
|
+
var __defProp$n = Object.defineProperty;
|
|
8662
8661
|
var __getOwnPropDesc$o = Object.getOwnPropertyDescriptor;
|
|
8663
|
-
var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$
|
|
8664
|
-
var __decorateClass$
|
|
8662
|
+
var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8663
|
+
var __decorateClass$u = (decorators, target, key, kind) => {
|
|
8665
8664
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$o(target, key) : target;
|
|
8666
8665
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
8667
8666
|
if (decorator = decorators[i])
|
|
8668
8667
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8669
|
-
if (kind && result) __defProp$
|
|
8668
|
+
if (kind && result) __defProp$n(target, key, result);
|
|
8670
8669
|
return result;
|
|
8671
8670
|
};
|
|
8672
8671
|
var __publicField$6 = (obj, key, value) => __defNormalProp$6(obj, key + "" , value);
|
|
@@ -8722,22 +8721,22 @@ void main(void) {
|
|
|
8722
8721
|
gl_FragColor = texture2D(sampler, coord);
|
|
8723
8722
|
}`
|
|
8724
8723
|
}));
|
|
8725
|
-
__decorateClass$
|
|
8724
|
+
__decorateClass$u([
|
|
8726
8725
|
property({ default: 10 })
|
|
8727
8726
|
], PixelateEffect.prototype, "strength", 2);
|
|
8728
|
-
PixelateEffect = __decorateClass$
|
|
8727
|
+
PixelateEffect = __decorateClass$u([
|
|
8729
8728
|
customNode("PixelateEffect")
|
|
8730
8729
|
], PixelateEffect);
|
|
8731
8730
|
|
|
8732
|
-
var __defProp$
|
|
8731
|
+
var __defProp$m = Object.defineProperty;
|
|
8733
8732
|
var __getOwnPropDesc$n = Object.getOwnPropertyDescriptor;
|
|
8734
|
-
var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$
|
|
8735
|
-
var __decorateClass$
|
|
8733
|
+
var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8734
|
+
var __decorateClass$t = (decorators, target, key, kind) => {
|
|
8736
8735
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$n(target, key) : target;
|
|
8737
8736
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
8738
8737
|
if (decorator = decorators[i])
|
|
8739
8738
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8740
|
-
if (kind && result) __defProp$
|
|
8739
|
+
if (kind && result) __defProp$m(target, key, result);
|
|
8741
8740
|
return result;
|
|
8742
8741
|
};
|
|
8743
8742
|
var __publicField$5 = (obj, key, value) => __defNormalProp$5(obj, key + "" , value);
|
|
@@ -8850,35 +8849,181 @@ void main() {
|
|
|
8850
8849
|
gl_FragColor = color;
|
|
8851
8850
|
}`
|
|
8852
8851
|
}));
|
|
8853
|
-
__decorateClass$
|
|
8852
|
+
__decorateClass$t([
|
|
8854
8853
|
property()
|
|
8855
8854
|
], ZoomBlurEffect.prototype, "center", 2);
|
|
8856
|
-
__decorateClass$
|
|
8855
|
+
__decorateClass$t([
|
|
8857
8856
|
property({ default: 20 })
|
|
8858
8857
|
], ZoomBlurEffect.prototype, "innerRadius", 2);
|
|
8859
|
-
__decorateClass$
|
|
8858
|
+
__decorateClass$t([
|
|
8860
8859
|
property({ default: -1 })
|
|
8861
8860
|
], ZoomBlurEffect.prototype, "radius", 2);
|
|
8862
|
-
__decorateClass$
|
|
8861
|
+
__decorateClass$t([
|
|
8863
8862
|
property({ default: 0.1 })
|
|
8864
8863
|
], ZoomBlurEffect.prototype, "strength", 2);
|
|
8865
|
-
ZoomBlurEffect = __decorateClass$
|
|
8864
|
+
ZoomBlurEffect = __decorateClass$t([
|
|
8866
8865
|
customNode("ZoomBlurEffect")
|
|
8867
8866
|
], ZoomBlurEffect);
|
|
8868
8867
|
|
|
8869
|
-
var __defProp$
|
|
8870
|
-
var __decorateClass$
|
|
8868
|
+
var __defProp$l = Object.defineProperty;
|
|
8869
|
+
var __decorateClass$s = (decorators, target, key, kind) => {
|
|
8871
8870
|
var result = void 0 ;
|
|
8872
8871
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
8873
8872
|
if (decorator = decorators[i])
|
|
8874
8873
|
result = (decorator(target, key, result) ) || result;
|
|
8875
|
-
if (result) __defProp$
|
|
8874
|
+
if (result) __defProp$l(target, key, result);
|
|
8875
|
+
return result;
|
|
8876
|
+
};
|
|
8877
|
+
class BaseElement2DFill extends CoreObject {
|
|
8878
|
+
constructor(parent, properties) {
|
|
8879
|
+
super();
|
|
8880
|
+
this.parent = parent;
|
|
8881
|
+
this.setProperties(properties);
|
|
8882
|
+
}
|
|
8883
|
+
_image;
|
|
8884
|
+
_updateProperty(key, value, oldValue, declaration) {
|
|
8885
|
+
super._updateProperty(key, value, oldValue, declaration);
|
|
8886
|
+
switch (key) {
|
|
8887
|
+
case "color":
|
|
8888
|
+
case "dpi":
|
|
8889
|
+
case "rotateWithShape":
|
|
8890
|
+
case "tile":
|
|
8891
|
+
this.parent.requestRedraw();
|
|
8892
|
+
break;
|
|
8893
|
+
case "image":
|
|
8894
|
+
this._updateImage();
|
|
8895
|
+
break;
|
|
8896
|
+
}
|
|
8897
|
+
}
|
|
8898
|
+
async loadImage() {
|
|
8899
|
+
if (this.image && this.image !== "none") {
|
|
8900
|
+
return await assets.texture.load(this.image);
|
|
8901
|
+
}
|
|
8902
|
+
}
|
|
8903
|
+
async _updateImage() {
|
|
8904
|
+
this._image = await this.loadImage();
|
|
8905
|
+
this.parent.requestRedraw();
|
|
8906
|
+
}
|
|
8907
|
+
canDraw() {
|
|
8908
|
+
return Boolean(
|
|
8909
|
+
this._image || this.color
|
|
8910
|
+
);
|
|
8911
|
+
}
|
|
8912
|
+
draw() {
|
|
8913
|
+
const ctx = this.parent.context;
|
|
8914
|
+
if (this._image) {
|
|
8915
|
+
const { width, height } = this.parent.size;
|
|
8916
|
+
ctx.textureTransform = new Transform2D().scale(1 / width, 1 / height);
|
|
8917
|
+
ctx.fillStyle = this._image;
|
|
8918
|
+
} else {
|
|
8919
|
+
ctx.fillStyle = this.color;
|
|
8920
|
+
}
|
|
8921
|
+
ctx.fill();
|
|
8922
|
+
}
|
|
8923
|
+
}
|
|
8924
|
+
__decorateClass$s([
|
|
8925
|
+
property()
|
|
8926
|
+
], BaseElement2DFill.prototype, "color");
|
|
8927
|
+
__decorateClass$s([
|
|
8928
|
+
property()
|
|
8929
|
+
], BaseElement2DFill.prototype, "image");
|
|
8930
|
+
__decorateClass$s([
|
|
8931
|
+
property()
|
|
8932
|
+
], BaseElement2DFill.prototype, "dpi");
|
|
8933
|
+
__decorateClass$s([
|
|
8934
|
+
property()
|
|
8935
|
+
], BaseElement2DFill.prototype, "rotateWithShape");
|
|
8936
|
+
__decorateClass$s([
|
|
8937
|
+
property()
|
|
8938
|
+
], BaseElement2DFill.prototype, "tile");
|
|
8939
|
+
|
|
8940
|
+
var __defProp$k = Object.defineProperty;
|
|
8941
|
+
var __decorateClass$r = (decorators, target, key, kind) => {
|
|
8942
|
+
var result = void 0 ;
|
|
8943
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
8944
|
+
if (decorator = decorators[i])
|
|
8945
|
+
result = (decorator(target, key, result) ) || result;
|
|
8946
|
+
if (result) __defProp$k(target, key, result);
|
|
8947
|
+
return result;
|
|
8948
|
+
};
|
|
8949
|
+
class BaseElement2DGeometry extends CoreObject {
|
|
8950
|
+
constructor(parent, properties) {
|
|
8951
|
+
super();
|
|
8952
|
+
this.parent = parent;
|
|
8953
|
+
this.setProperties(properties);
|
|
8954
|
+
this._updatePath2DSet();
|
|
8955
|
+
}
|
|
8956
|
+
_path2DSet = new Path2DSet();
|
|
8957
|
+
_updateProperty(key, value, oldValue, declaration) {
|
|
8958
|
+
super._updateProperty(key, value, oldValue, declaration);
|
|
8959
|
+
switch (key) {
|
|
8960
|
+
case "svg":
|
|
8961
|
+
case "data":
|
|
8962
|
+
case "viewBox":
|
|
8963
|
+
this._updatePath2DSet();
|
|
8964
|
+
this.parent.requestRedraw();
|
|
8965
|
+
break;
|
|
8966
|
+
}
|
|
8967
|
+
}
|
|
8968
|
+
_updatePath2DSet() {
|
|
8969
|
+
let viewBox;
|
|
8970
|
+
if (this.svg) {
|
|
8971
|
+
const dom = svgToDOM(this.svg);
|
|
8972
|
+
this._path2DSet = svgToPath2DSet(dom);
|
|
8973
|
+
viewBox = this._path2DSet.viewBox ?? this.viewBox;
|
|
8974
|
+
} else {
|
|
8975
|
+
viewBox = this.viewBox;
|
|
8976
|
+
this.data.forEach((path, i) => {
|
|
8977
|
+
const { data, ...style } = path;
|
|
8978
|
+
const path2D = new Path2D();
|
|
8979
|
+
path2D.style = style;
|
|
8980
|
+
path2D.addData(data);
|
|
8981
|
+
this._path2DSet.paths[i] = path2D;
|
|
8982
|
+
});
|
|
8983
|
+
}
|
|
8984
|
+
const [x, y, w, h] = viewBox;
|
|
8985
|
+
this._path2DSet.paths.forEach((path) => {
|
|
8986
|
+
path.applyTransform(new Matrix3$1().translate(-x, -y).scale(1 / w, 1 / h));
|
|
8987
|
+
});
|
|
8988
|
+
}
|
|
8989
|
+
draw() {
|
|
8990
|
+
const ctx = this.parent.context;
|
|
8991
|
+
const { width, height } = this.parent.size;
|
|
8992
|
+
this._path2DSet.paths.forEach((path) => {
|
|
8993
|
+
svgPathCommandsAddToPath2D(
|
|
8994
|
+
path.clone().applyTransform(new Matrix3$1().scale(width, height)).toCommands(),
|
|
8995
|
+
ctx
|
|
8996
|
+
);
|
|
8997
|
+
});
|
|
8998
|
+
}
|
|
8999
|
+
}
|
|
9000
|
+
__decorateClass$r([
|
|
9001
|
+
property()
|
|
9002
|
+
], BaseElement2DGeometry.prototype, "name");
|
|
9003
|
+
__decorateClass$r([
|
|
9004
|
+
property()
|
|
9005
|
+
], BaseElement2DGeometry.prototype, "svg");
|
|
9006
|
+
__decorateClass$r([
|
|
9007
|
+
property({ default: [0, 0, 1, 1] })
|
|
9008
|
+
], BaseElement2DGeometry.prototype, "viewBox");
|
|
9009
|
+
__decorateClass$r([
|
|
9010
|
+
property({ default: [{ data: "M0,0L0,1L1,1L1,0Z" }] })
|
|
9011
|
+
], BaseElement2DGeometry.prototype, "data");
|
|
9012
|
+
|
|
9013
|
+
var __defProp$j = Object.defineProperty;
|
|
9014
|
+
var __decorateClass$q = (decorators, target, key, kind) => {
|
|
9015
|
+
var result = void 0 ;
|
|
9016
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
9017
|
+
if (decorator = decorators[i])
|
|
9018
|
+
result = (decorator(target, key, result) ) || result;
|
|
9019
|
+
if (result) __defProp$j(target, key, result);
|
|
8876
9020
|
return result;
|
|
8877
9021
|
};
|
|
8878
9022
|
class BaseElement2DOutline extends CoreObject {
|
|
8879
|
-
constructor(parent) {
|
|
9023
|
+
constructor(parent, properties) {
|
|
8880
9024
|
super();
|
|
8881
9025
|
this.parent = parent;
|
|
9026
|
+
this.setProperties(properties);
|
|
8882
9027
|
}
|
|
8883
9028
|
_updateProperty(key, value, oldValue, declaration) {
|
|
8884
9029
|
super._updateProperty(key, value, oldValue, declaration);
|
|
@@ -8888,55 +9033,52 @@ class BaseElement2DOutline extends CoreObject {
|
|
|
8888
9033
|
case "style":
|
|
8889
9034
|
case "image":
|
|
8890
9035
|
case "opacity":
|
|
8891
|
-
this.
|
|
9036
|
+
this.parent.requestRedraw();
|
|
8892
9037
|
break;
|
|
8893
9038
|
}
|
|
8894
9039
|
}
|
|
8895
|
-
|
|
8896
|
-
|
|
8897
|
-
|
|
8898
|
-
|
|
8899
|
-
|
|
8900
|
-
|
|
8901
|
-
|
|
8902
|
-
|
|
8903
|
-
|
|
8904
|
-
|
|
8905
|
-
if (effect) {
|
|
8906
|
-
this.parent.removeChild(effect);
|
|
8907
|
-
}
|
|
8908
|
-
}
|
|
9040
|
+
canDraw() {
|
|
9041
|
+
return Boolean(
|
|
9042
|
+
this.width || this.color
|
|
9043
|
+
);
|
|
9044
|
+
}
|
|
9045
|
+
draw() {
|
|
9046
|
+
const ctx = this.parent.context;
|
|
9047
|
+
ctx.lineWidth = this.width;
|
|
9048
|
+
ctx.strokeStyle = this.color;
|
|
9049
|
+
ctx.stroke();
|
|
8909
9050
|
}
|
|
8910
9051
|
}
|
|
8911
|
-
__decorateClass$
|
|
8912
|
-
property({ default:
|
|
9052
|
+
__decorateClass$q([
|
|
9053
|
+
property({ default: 0 })
|
|
8913
9054
|
], BaseElement2DOutline.prototype, "color");
|
|
8914
|
-
__decorateClass$
|
|
9055
|
+
__decorateClass$q([
|
|
8915
9056
|
property({ default: 0 })
|
|
8916
9057
|
], BaseElement2DOutline.prototype, "width");
|
|
8917
|
-
__decorateClass$
|
|
9058
|
+
__decorateClass$q([
|
|
8918
9059
|
property({ default: "solid" })
|
|
8919
9060
|
], BaseElement2DOutline.prototype, "style");
|
|
8920
|
-
__decorateClass$
|
|
9061
|
+
__decorateClass$q([
|
|
8921
9062
|
property()
|
|
8922
9063
|
], BaseElement2DOutline.prototype, "image");
|
|
8923
|
-
__decorateClass$
|
|
9064
|
+
__decorateClass$q([
|
|
8924
9065
|
property({ default: 1 })
|
|
8925
9066
|
], BaseElement2DOutline.prototype, "opacity");
|
|
8926
9067
|
|
|
8927
|
-
var __defProp$
|
|
8928
|
-
var __decorateClass$
|
|
9068
|
+
var __defProp$i = Object.defineProperty;
|
|
9069
|
+
var __decorateClass$p = (decorators, target, key, kind) => {
|
|
8929
9070
|
var result = void 0 ;
|
|
8930
9071
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
8931
9072
|
if (decorator = decorators[i])
|
|
8932
9073
|
result = (decorator(target, key, result) ) || result;
|
|
8933
|
-
if (result) __defProp$
|
|
9074
|
+
if (result) __defProp$i(target, key, result);
|
|
8934
9075
|
return result;
|
|
8935
9076
|
};
|
|
8936
9077
|
class BaseElement2DShadow extends CoreObject {
|
|
8937
|
-
constructor(parent) {
|
|
9078
|
+
constructor(parent, properties) {
|
|
8938
9079
|
super();
|
|
8939
9080
|
this.parent = parent;
|
|
9081
|
+
this.setProperties(properties);
|
|
8940
9082
|
}
|
|
8941
9083
|
_updateProperty(key, value, oldValue, declaration) {
|
|
8942
9084
|
super._updateProperty(key, value, oldValue, declaration);
|
|
@@ -8965,16 +9107,16 @@ class BaseElement2DShadow extends CoreObject {
|
|
|
8965
9107
|
}
|
|
8966
9108
|
}
|
|
8967
9109
|
}
|
|
8968
|
-
__decorateClass$
|
|
9110
|
+
__decorateClass$p([
|
|
8969
9111
|
property({ default: "#000000" })
|
|
8970
9112
|
], BaseElement2DShadow.prototype, "color");
|
|
8971
|
-
__decorateClass$
|
|
9113
|
+
__decorateClass$p([
|
|
8972
9114
|
property({ default: 0 })
|
|
8973
9115
|
], BaseElement2DShadow.prototype, "blur");
|
|
8974
|
-
__decorateClass$
|
|
9116
|
+
__decorateClass$p([
|
|
8975
9117
|
property({ default: 0 })
|
|
8976
9118
|
], BaseElement2DShadow.prototype, "offsetY");
|
|
8977
|
-
__decorateClass$
|
|
9119
|
+
__decorateClass$p([
|
|
8978
9120
|
property({ default: 0 })
|
|
8979
9121
|
], BaseElement2DShadow.prototype, "offsetX");
|
|
8980
9122
|
|
|
@@ -9012,6 +9154,93 @@ for (const key in defaultStyles$1) {
|
|
|
9012
9154
|
});
|
|
9013
9155
|
}
|
|
9014
9156
|
|
|
9157
|
+
var __defProp$h = Object.defineProperty;
|
|
9158
|
+
var __decorateClass$o = (decorators, target, key, kind) => {
|
|
9159
|
+
var result = void 0 ;
|
|
9160
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
9161
|
+
if (decorator = decorators[i])
|
|
9162
|
+
result = (decorator(target, key, result) ) || result;
|
|
9163
|
+
if (result) __defProp$h(target, key, result);
|
|
9164
|
+
return result;
|
|
9165
|
+
};
|
|
9166
|
+
class BaseElement2DText extends CoreObject {
|
|
9167
|
+
constructor(parent, properties) {
|
|
9168
|
+
super();
|
|
9169
|
+
this.parent = parent;
|
|
9170
|
+
this.setProperties(properties);
|
|
9171
|
+
}
|
|
9172
|
+
effects;
|
|
9173
|
+
measureDom;
|
|
9174
|
+
fonts;
|
|
9175
|
+
texture = new CanvasTexture();
|
|
9176
|
+
text = new Text();
|
|
9177
|
+
measureResult;
|
|
9178
|
+
_updateProperty(key, value, oldValue, declaration) {
|
|
9179
|
+
super._updateProperty(key, value, oldValue, declaration);
|
|
9180
|
+
switch (key) {
|
|
9181
|
+
case "content":
|
|
9182
|
+
case "effects":
|
|
9183
|
+
case "measureDom":
|
|
9184
|
+
case "fonts":
|
|
9185
|
+
case "split":
|
|
9186
|
+
this.parent.requestRedraw();
|
|
9187
|
+
break;
|
|
9188
|
+
}
|
|
9189
|
+
}
|
|
9190
|
+
_updateText() {
|
|
9191
|
+
this.text.style = this.parent.style.toJSON();
|
|
9192
|
+
this.text.content = this.content ?? "";
|
|
9193
|
+
this.text.effects = this.effects;
|
|
9194
|
+
this.text.fonts = this.fonts;
|
|
9195
|
+
this.text.measureDom = this.measureDom;
|
|
9196
|
+
this.text.requestUpdate();
|
|
9197
|
+
}
|
|
9198
|
+
measure() {
|
|
9199
|
+
this._updateText();
|
|
9200
|
+
return this.text.measure();
|
|
9201
|
+
}
|
|
9202
|
+
updateMeasure() {
|
|
9203
|
+
this.measureResult = this.measure();
|
|
9204
|
+
const textWidth = this.measureResult.boundingBox.width;
|
|
9205
|
+
const textHeight = this.measureResult.boundingBox.height;
|
|
9206
|
+
const { left, top, width, height = textHeight } = this.parent.style;
|
|
9207
|
+
this.parent.position.x = left + Math.min(0, ((width || textWidth) - textWidth) / 2);
|
|
9208
|
+
this.parent.position.y = top + Math.min(0, ((height || textHeight) - textHeight) / 2);
|
|
9209
|
+
this.parent.size.width = textWidth;
|
|
9210
|
+
this.parent.size.height = textHeight;
|
|
9211
|
+
return this;
|
|
9212
|
+
}
|
|
9213
|
+
canDraw() {
|
|
9214
|
+
return Boolean(
|
|
9215
|
+
this.content && this.texture?.valid
|
|
9216
|
+
);
|
|
9217
|
+
}
|
|
9218
|
+
draw() {
|
|
9219
|
+
const ctx = this.parent.context;
|
|
9220
|
+
this.text.render({
|
|
9221
|
+
pixelRatio: this.texture.pixelRatio,
|
|
9222
|
+
view: this.texture.source
|
|
9223
|
+
});
|
|
9224
|
+
this.texture.requestUpload();
|
|
9225
|
+
const { width, height } = this.parent.size;
|
|
9226
|
+
ctx.fillStyle = this.texture;
|
|
9227
|
+
ctx.textureTransform = new Transform2D().scale(1 / width, 1 / height);
|
|
9228
|
+
ctx.fill();
|
|
9229
|
+
}
|
|
9230
|
+
}
|
|
9231
|
+
__decorateClass$o([
|
|
9232
|
+
property({ default: "" })
|
|
9233
|
+
], BaseElement2DText.prototype, "content");
|
|
9234
|
+
__decorateClass$o([
|
|
9235
|
+
property()
|
|
9236
|
+
], BaseElement2DText.prototype, "effects");
|
|
9237
|
+
__decorateClass$o([
|
|
9238
|
+
protectedProperty()
|
|
9239
|
+
], BaseElement2DText.prototype, "measureDom");
|
|
9240
|
+
__decorateClass$o([
|
|
9241
|
+
protectedProperty()
|
|
9242
|
+
], BaseElement2DText.prototype, "fonts");
|
|
9243
|
+
|
|
9015
9244
|
var __getOwnPropDesc$m = Object.getOwnPropertyDescriptor;
|
|
9016
9245
|
var __decorateClass$n = (decorators, target, key, kind) => {
|
|
9017
9246
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$m(target, key) : target;
|
|
@@ -9119,8 +9348,41 @@ let BaseElement2D = class extends Node2D {
|
|
|
9119
9348
|
this._style?.off("updateProperty", cb);
|
|
9120
9349
|
this._style = style;
|
|
9121
9350
|
}
|
|
9122
|
-
|
|
9123
|
-
|
|
9351
|
+
_text = new BaseElement2DText(this);
|
|
9352
|
+
get text() {
|
|
9353
|
+
return this._text;
|
|
9354
|
+
}
|
|
9355
|
+
set text(value) {
|
|
9356
|
+
this._text.setProperties(value);
|
|
9357
|
+
}
|
|
9358
|
+
_geometry = new BaseElement2DGeometry(this);
|
|
9359
|
+
get geometry() {
|
|
9360
|
+
return this._geometry;
|
|
9361
|
+
}
|
|
9362
|
+
set geometry(value) {
|
|
9363
|
+
this._geometry.setProperties(value);
|
|
9364
|
+
}
|
|
9365
|
+
_fill = new BaseElement2DFill(this);
|
|
9366
|
+
get fill() {
|
|
9367
|
+
return this._fill;
|
|
9368
|
+
}
|
|
9369
|
+
set fill(value) {
|
|
9370
|
+
this._fill.setProperties(value);
|
|
9371
|
+
}
|
|
9372
|
+
_outline = new BaseElement2DOutline(this);
|
|
9373
|
+
get outline() {
|
|
9374
|
+
return this._outline;
|
|
9375
|
+
}
|
|
9376
|
+
set outline(value) {
|
|
9377
|
+
this._outline.setProperties(value);
|
|
9378
|
+
}
|
|
9379
|
+
_shadow = new BaseElement2DShadow(this);
|
|
9380
|
+
get shadow() {
|
|
9381
|
+
return this._shadow;
|
|
9382
|
+
}
|
|
9383
|
+
set shadow(value) {
|
|
9384
|
+
this._shadow.setProperties(value);
|
|
9385
|
+
}
|
|
9124
9386
|
constructor(properties, nodes = []) {
|
|
9125
9387
|
super();
|
|
9126
9388
|
this._updateStyleProperty = this._updateStyleProperty.bind(this);
|
|
@@ -9129,10 +9391,21 @@ let BaseElement2D = class extends Node2D {
|
|
|
9129
9391
|
}
|
|
9130
9392
|
setProperties(properties) {
|
|
9131
9393
|
if (properties) {
|
|
9132
|
-
const {
|
|
9394
|
+
const {
|
|
9395
|
+
style,
|
|
9396
|
+
text,
|
|
9397
|
+
geometry,
|
|
9398
|
+
fill,
|
|
9399
|
+
outline,
|
|
9400
|
+
shadow,
|
|
9401
|
+
...restProperties
|
|
9402
|
+
} = properties;
|
|
9133
9403
|
style && this.style.setProperties(style);
|
|
9134
|
-
|
|
9404
|
+
text && this.text.setProperties(text);
|
|
9405
|
+
geometry && this.geometry.setProperties(geometry);
|
|
9406
|
+
fill && this.fill.setProperties(fill);
|
|
9135
9407
|
outline && this.outline.setProperties(outline);
|
|
9408
|
+
shadow && this.shadow.setProperties(shadow);
|
|
9136
9409
|
super.setProperties(restProperties);
|
|
9137
9410
|
}
|
|
9138
9411
|
return this;
|
|
@@ -9285,10 +9558,34 @@ let BaseElement2D = class extends Node2D {
|
|
|
9285
9558
|
}
|
|
9286
9559
|
_draw() {
|
|
9287
9560
|
super._draw();
|
|
9288
|
-
|
|
9289
|
-
this.
|
|
9290
|
-
|
|
9291
|
-
|
|
9561
|
+
let flag = false;
|
|
9562
|
+
if (this.text.canDraw()) {
|
|
9563
|
+
this.text.updateMeasure();
|
|
9564
|
+
}
|
|
9565
|
+
if (this.fill.canDraw()) {
|
|
9566
|
+
this._tree?.log(this.name, "draw fill");
|
|
9567
|
+
this.geometry.draw();
|
|
9568
|
+
this.fill.draw();
|
|
9569
|
+
flag = true;
|
|
9570
|
+
}
|
|
9571
|
+
if (this.outline.canDraw()) {
|
|
9572
|
+
this._tree?.log(this.name, "draw outline");
|
|
9573
|
+
this.geometry.draw();
|
|
9574
|
+
this.outline.draw();
|
|
9575
|
+
flag = true;
|
|
9576
|
+
}
|
|
9577
|
+
if (this.text.canDraw()) {
|
|
9578
|
+
this._tree?.log(this.name, "draw text");
|
|
9579
|
+
this._drawBoundingRect();
|
|
9580
|
+
this.text.draw();
|
|
9581
|
+
flag = true;
|
|
9582
|
+
}
|
|
9583
|
+
if (!flag) {
|
|
9584
|
+
this._drawBackground();
|
|
9585
|
+
this._drawContent();
|
|
9586
|
+
this._drawBorder();
|
|
9587
|
+
this._drawOutline();
|
|
9588
|
+
}
|
|
9292
9589
|
}
|
|
9293
9590
|
_drawBackground() {
|
|
9294
9591
|
const texture = this._backgroundImage;
|
|
@@ -9360,13 +9657,6 @@ let BaseElement2D = class extends Node2D {
|
|
|
9360
9657
|
this._input(event, key);
|
|
9361
9658
|
}
|
|
9362
9659
|
}
|
|
9363
|
-
_pointerEntering = false;
|
|
9364
|
-
_pointerEntered() {
|
|
9365
|
-
this._pointerEntering = true;
|
|
9366
|
-
}
|
|
9367
|
-
_pointerExited() {
|
|
9368
|
-
if (this._pointerEntering) ;
|
|
9369
|
-
}
|
|
9370
9660
|
// eslint-disable-next-line unused-imports/no-unused-vars
|
|
9371
9661
|
_pointerInput(point, key) {
|
|
9372
9662
|
const { width, height } = this.size;
|
|
@@ -9399,8 +9689,11 @@ let BaseElement2D = class extends Node2D {
|
|
|
9399
9689
|
...json,
|
|
9400
9690
|
props: {
|
|
9401
9691
|
style: this.style.toJSON(),
|
|
9402
|
-
|
|
9692
|
+
text: this.text.toJSON(),
|
|
9693
|
+
geometry: this.geometry.toJSON(),
|
|
9694
|
+
fill: this.fill.toJSON(),
|
|
9403
9695
|
outline: this.outline.toJSON(),
|
|
9696
|
+
shadow: this.shadow.toJSON(),
|
|
9404
9697
|
...json.props
|
|
9405
9698
|
}
|
|
9406
9699
|
};
|
|
@@ -10065,12 +10358,12 @@ let Image2D = class extends Element2D {
|
|
|
10065
10358
|
__decorateClass$i([
|
|
10066
10359
|
protectedProperty()
|
|
10067
10360
|
], Image2D.prototype, "texture", 2);
|
|
10068
|
-
__decorateClass$i([
|
|
10069
|
-
property()
|
|
10070
|
-
], Image2D.prototype, "srcRect", 2);
|
|
10071
10361
|
__decorateClass$i([
|
|
10072
10362
|
property({ default: "" })
|
|
10073
10363
|
], Image2D.prototype, "src", 2);
|
|
10364
|
+
__decorateClass$i([
|
|
10365
|
+
property()
|
|
10366
|
+
], Image2D.prototype, "srcRect", 2);
|
|
10074
10367
|
__decorateClass$i([
|
|
10075
10368
|
property({ default: false })
|
|
10076
10369
|
], Image2D.prototype, "gif", 2);
|
|
@@ -10170,7 +10463,7 @@ let Text2D = class extends TextureRect2D {
|
|
|
10170
10463
|
measureDom;
|
|
10171
10464
|
fonts;
|
|
10172
10465
|
texture = new CanvasTexture();
|
|
10173
|
-
|
|
10466
|
+
_baseText = new Text();
|
|
10174
10467
|
measureResult;
|
|
10175
10468
|
_subTextsCount = 0;
|
|
10176
10469
|
constructor(properties, children = []) {
|
|
@@ -10197,12 +10490,12 @@ let Text2D = class extends TextureRect2D {
|
|
|
10197
10490
|
}
|
|
10198
10491
|
}
|
|
10199
10492
|
_updateText() {
|
|
10200
|
-
this.
|
|
10201
|
-
this.
|
|
10202
|
-
this.
|
|
10203
|
-
this.
|
|
10204
|
-
this.
|
|
10205
|
-
this.
|
|
10493
|
+
this._baseText.style = this.style.toJSON();
|
|
10494
|
+
this._baseText.content = this.content ?? "";
|
|
10495
|
+
this._baseText.effects = this.effects;
|
|
10496
|
+
this._baseText.fonts = this.fonts;
|
|
10497
|
+
this._baseText.measureDom = this.measureDom;
|
|
10498
|
+
this._baseText.requestUpdate();
|
|
10206
10499
|
}
|
|
10207
10500
|
_updateStyleProperty(key, value, oldValue) {
|
|
10208
10501
|
switch (key) {
|
|
@@ -10255,7 +10548,7 @@ let Text2D = class extends TextureRect2D {
|
|
|
10255
10548
|
}
|
|
10256
10549
|
measure() {
|
|
10257
10550
|
this._updateText();
|
|
10258
|
-
return this.
|
|
10551
|
+
return this._baseText.measure();
|
|
10259
10552
|
}
|
|
10260
10553
|
updateMeasure() {
|
|
10261
10554
|
this.measureResult = this.measure();
|
|
@@ -10307,7 +10600,7 @@ let Text2D = class extends TextureRect2D {
|
|
|
10307
10600
|
if (onText2DRender) {
|
|
10308
10601
|
onText2DRender();
|
|
10309
10602
|
} else {
|
|
10310
|
-
this.
|
|
10603
|
+
this._baseText.render({
|
|
10311
10604
|
pixelRatio: this.texture.pixelRatio,
|
|
10312
10605
|
view: this.texture.source
|
|
10313
10606
|
});
|
|
@@ -13619,4 +13912,4 @@ async function render(options) {
|
|
|
13619
13912
|
});
|
|
13620
13913
|
}
|
|
13621
13914
|
|
|
13622
|
-
export { AnimatedTexture, Animation, Assets, Audio, AudioPipeline, AudioProcessor, AudioSpectrum, AudioWaveform, BaseElement2D, BaseElement2DStyle, CanvasContext, CanvasItem, CanvasItemEditor, CanvasTexture, Color, ColorAdjustEffect, ColorFilterEffect, ColorMatrix, ColorOverlayEffect, ColorRemoveEffect, ColorReplaceEffect, ColorTexture, Control, CoreObject, DEG_TO_RAD, DEVICE_PIXEL_RATIO, DropShadowEffect, Effect, EffectMaterial, Element2D, Element2DStyle, EmbossEffect, Engine, EventEmitter, FlexElement2D, FlexElement2DStyle, FlexLayout, FontLoader, GIFLoader, GaussianBlurEffect, Geometry, GlitchEffect, GodrayEffect, Graphics2D, HTMLAudio, HTMLAudioContext, HTMLSound, IN_BROWSER, Image2D, ImageTexture, IndexBuffer, Input, InputEvent, JSONLoader, KawaseBlurEffect, KawaseTransition, LeftEraseTransition, Loader, Lottie2D, LottieLoader, MainLoop, MaskEffect, Material, Matrix, Matrix2, Matrix3, Matrix4, MouseInputEvent, Node, Node2D, OutlineEffect, 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, Text2D, TextLoader, Texture2D, TextureLoader, TextureRect2D, Ticker, TiltShiftTransition, Timeline, TimelineNode, Transform2D, TransformRect2D, 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, clampFrag, createHTMLCanvas, createNode, crossOrigin, cubicBezier, curves, customNode, customNodes, defaultOptions, defineProperty, determineCrossOrigin, ease, easeIn, easeInOut, easeOut, frag$1 as frag, getDeclarations, getDefaultCssPropertyValue, isCanvasElement, isElementNode, isImageElement, isPow2, isVideoElement, isWebgl2, lerp, linear, log2, mapWebGLBlendModes, nextPow2, nextTick, parseCSSFilter, parseCSSTransform, parseCSSTransformOrigin, parseCssFunctions, parseCssProperty, property, protectedProperty, render, timingFunctions, uid };
|
|
13915
|
+
export { AnimatedTexture, Animation, Assets, Audio, AudioPipeline, AudioProcessor, AudioSpectrum, AudioWaveform, BaseElement2D, BaseElement2DFill, BaseElement2DGeometry, BaseElement2DOutline, BaseElement2DShadow, BaseElement2DStyle, BaseElement2DText, CanvasContext, CanvasItem, CanvasItemEditor, CanvasTexture, Color, ColorAdjustEffect, ColorFilterEffect, ColorMatrix, ColorOverlayEffect, ColorRemoveEffect, ColorReplaceEffect, ColorTexture, Control, CoreObject, DEG_TO_RAD, DEVICE_PIXEL_RATIO, DropShadowEffect, Effect, EffectMaterial, Element2D, Element2DStyle, EmbossEffect, Engine, EventEmitter, FlexElement2D, FlexElement2DStyle, FlexLayout, FontLoader, GIFLoader, GaussianBlurEffect, Geometry, GlitchEffect, GodrayEffect, Graphics2D, HTMLAudio, HTMLAudioContext, HTMLSound, IN_BROWSER, Image2D, ImageTexture, IndexBuffer, Input, InputEvent, JSONLoader, KawaseBlurEffect, KawaseTransition, LeftEraseTransition, Loader, Lottie2D, LottieLoader, MainLoop, MaskEffect, Material, Matrix, Matrix2, Matrix3, Matrix4, MouseInputEvent, Node, Node2D, OutlineEffect, 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, Text2D, TextLoader, Texture2D, TextureLoader, TextureRect2D, Ticker, TiltShiftTransition, Timeline, TimelineNode, Transform2D, TransformRect2D, 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, clampFrag, createHTMLCanvas, createNode, crossOrigin, cubicBezier, curves, customNode, customNodes, defaultOptions, defineProperty, determineCrossOrigin, ease, easeIn, easeInOut, easeOut, frag$1 as frag, getDeclarations, getDefaultCssPropertyValue, isCanvasElement, isElementNode, isImageElement, isPow2, isVideoElement, isWebgl2, lerp, linear, log2, mapWebGLBlendModes, nextPow2, nextTick, parseCSSFilter, parseCSSTransform, parseCSSTransformOrigin, parseCssFunctions, parseCssProperty, property, protectedProperty, render, timingFunctions, uid };
|