modern-canvas 0.4.21 → 0.4.22
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 +607 -519
- package/dist/index.d.cts +71 -48
- package/dist/index.d.mts +71 -48
- package/dist/index.d.ts +71 -48
- package/dist/index.js +127 -127
- package/dist/index.mjs +608 -520
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2149,13 +2149,13 @@ class Vector3 extends Vector {
|
|
|
2149
2149
|
}
|
|
2150
2150
|
}
|
|
2151
2151
|
|
|
2152
|
-
var __defProp$
|
|
2153
|
-
var __decorateClass$
|
|
2152
|
+
var __defProp$L = Object.defineProperty;
|
|
2153
|
+
var __decorateClass$T = (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$L(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$T([
|
|
2202
2202
|
property({ default: 24 })
|
|
2203
2203
|
], MainLoop.prototype, "fps");
|
|
2204
|
-
__decorateClass$
|
|
2204
|
+
__decorateClass$T([
|
|
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$K = Object.defineProperty;
|
|
4507
|
+
var __decorateClass$S = (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$K(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$S([
|
|
4557
4557
|
protectedProperty({ default: null })
|
|
4558
4558
|
], IndexBuffer.prototype, "data");
|
|
4559
|
-
__decorateClass$
|
|
4559
|
+
__decorateClass$S([
|
|
4560
4560
|
protectedProperty({ default: false })
|
|
4561
4561
|
], IndexBuffer.prototype, "dynamic");
|
|
4562
4562
|
|
|
4563
|
-
var __defProp$
|
|
4564
|
-
var __decorateClass$
|
|
4563
|
+
var __defProp$J = Object.defineProperty;
|
|
4564
|
+
var __decorateClass$R = (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$J(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$R([
|
|
4614
4614
|
protectedProperty({ default: null })
|
|
4615
4615
|
], VertexBuffer.prototype, "data");
|
|
4616
|
-
__decorateClass$
|
|
4616
|
+
__decorateClass$R([
|
|
4617
4617
|
protectedProperty({ default: false })
|
|
4618
4618
|
], VertexBuffer.prototype, "dynamic");
|
|
4619
4619
|
|
|
4620
|
-
var __defProp$
|
|
4621
|
-
var __decorateClass$
|
|
4620
|
+
var __defProp$I = Object.defineProperty;
|
|
4621
|
+
var __decorateClass$Q = (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$I(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$Q([
|
|
4664
4664
|
protectedProperty()
|
|
4665
4665
|
], VertexAttribute.prototype, "buffer");
|
|
4666
|
-
__decorateClass$
|
|
4666
|
+
__decorateClass$Q([
|
|
4667
4667
|
protectedProperty({ default: 0 })
|
|
4668
4668
|
], VertexAttribute.prototype, "size");
|
|
4669
|
-
__decorateClass$
|
|
4669
|
+
__decorateClass$Q([
|
|
4670
4670
|
protectedProperty({ default: false })
|
|
4671
4671
|
], VertexAttribute.prototype, "normalized");
|
|
4672
|
-
__decorateClass$
|
|
4672
|
+
__decorateClass$Q([
|
|
4673
4673
|
protectedProperty({ default: "float" })
|
|
4674
4674
|
], VertexAttribute.prototype, "type");
|
|
4675
|
-
__decorateClass$
|
|
4675
|
+
__decorateClass$Q([
|
|
4676
4676
|
protectedProperty()
|
|
4677
4677
|
], VertexAttribute.prototype, "stride");
|
|
4678
|
-
__decorateClass$
|
|
4678
|
+
__decorateClass$Q([
|
|
4679
4679
|
protectedProperty()
|
|
4680
4680
|
], VertexAttribute.prototype, "offset");
|
|
4681
|
-
__decorateClass$
|
|
4681
|
+
__decorateClass$Q([
|
|
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$H = Object.defineProperty;
|
|
4926
|
+
var __decorateClass$P = (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$H(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$P([
|
|
5058
5058
|
protectedProperty()
|
|
5059
5059
|
], Texture2D.prototype, "source");
|
|
5060
|
-
__decorateClass$
|
|
5060
|
+
__decorateClass$P([
|
|
5061
5061
|
property({ default: 0 })
|
|
5062
5062
|
], Texture2D.prototype, "width");
|
|
5063
|
-
__decorateClass$
|
|
5063
|
+
__decorateClass$P([
|
|
5064
5064
|
property({ default: 0 })
|
|
5065
5065
|
], Texture2D.prototype, "height");
|
|
5066
|
-
__decorateClass$
|
|
5066
|
+
__decorateClass$P([
|
|
5067
5067
|
property({ default: "linear" })
|
|
5068
5068
|
], Texture2D.prototype, "filterMode");
|
|
5069
|
-
__decorateClass$
|
|
5069
|
+
__decorateClass$P([
|
|
5070
5070
|
property({ default: "clamp_to_edge" })
|
|
5071
5071
|
], Texture2D.prototype, "wrapMode");
|
|
5072
|
-
__decorateClass$
|
|
5072
|
+
__decorateClass$P([
|
|
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$G = Object.defineProperty;
|
|
5103
|
+
var __decorateClass$O = (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$G(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$O([
|
|
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$F = Object.defineProperty;
|
|
5290
|
+
var __decorateClass$N = (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$F(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$N([
|
|
5540
5540
|
protectedProperty({ default: true })
|
|
5541
5541
|
], _VideoTexture.prototype, "autoUpdate");
|
|
5542
|
-
__decorateClass$
|
|
5542
|
+
__decorateClass$N([
|
|
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$E = Object.defineProperty;
|
|
5552
5552
|
var __getOwnPropDesc$I = Object.getOwnPropertyDescriptor;
|
|
5553
|
-
var __decorateClass$
|
|
5553
|
+
var __decorateClass$M = (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$E(target, key, result);
|
|
5559
5559
|
return result;
|
|
5560
5560
|
};
|
|
5561
5561
|
const tagUidMap = {};
|
|
@@ -6060,36 +6060,36 @@ let Node = class extends CoreObject {
|
|
|
6060
6060
|
return node;
|
|
6061
6061
|
}
|
|
6062
6062
|
};
|
|
6063
|
-
__decorateClass$
|
|
6063
|
+
__decorateClass$M([
|
|
6064
6064
|
protectedProperty()
|
|
6065
6065
|
], Node.prototype, "name", 2);
|
|
6066
|
-
__decorateClass$
|
|
6066
|
+
__decorateClass$M([
|
|
6067
6067
|
property()
|
|
6068
6068
|
], Node.prototype, "mask", 2);
|
|
6069
|
-
__decorateClass$
|
|
6069
|
+
__decorateClass$M([
|
|
6070
6070
|
property({ default: "inherit" })
|
|
6071
6071
|
], Node.prototype, "processMode", 2);
|
|
6072
|
-
__decorateClass$
|
|
6072
|
+
__decorateClass$M([
|
|
6073
6073
|
property({ default: "default" })
|
|
6074
6074
|
], Node.prototype, "processSortMode", 2);
|
|
6075
|
-
__decorateClass$
|
|
6075
|
+
__decorateClass$M([
|
|
6076
6076
|
property({ default: "inherit" })
|
|
6077
6077
|
], Node.prototype, "renderMode", 2);
|
|
6078
|
-
__decorateClass$
|
|
6078
|
+
__decorateClass$M([
|
|
6079
6079
|
property({ default: "default" })
|
|
6080
6080
|
], Node.prototype, "internalMode", 2);
|
|
6081
|
-
Node = __decorateClass$
|
|
6081
|
+
Node = __decorateClass$M([
|
|
6082
6082
|
customNode("Node")
|
|
6083
6083
|
], Node);
|
|
6084
6084
|
|
|
6085
|
-
var __defProp$
|
|
6085
|
+
var __defProp$D = Object.defineProperty;
|
|
6086
6086
|
var __getOwnPropDesc$H = Object.getOwnPropertyDescriptor;
|
|
6087
|
-
var __decorateClass$
|
|
6087
|
+
var __decorateClass$L = (decorators, target, key, kind) => {
|
|
6088
6088
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$H(target, key) : target;
|
|
6089
6089
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6090
6090
|
if (decorator = decorators[i])
|
|
6091
6091
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
6092
|
-
if (kind && result) __defProp$
|
|
6092
|
+
if (kind && result) __defProp$D(target, key, result);
|
|
6093
6093
|
return result;
|
|
6094
6094
|
};
|
|
6095
6095
|
let TimelineNode = class extends Node {
|
|
@@ -6149,30 +6149,30 @@ let TimelineNode = class extends Node {
|
|
|
6149
6149
|
this._updateCurrentTime();
|
|
6150
6150
|
}
|
|
6151
6151
|
};
|
|
6152
|
-
__decorateClass$
|
|
6152
|
+
__decorateClass$L([
|
|
6153
6153
|
property({ default: 0 })
|
|
6154
6154
|
], TimelineNode.prototype, "delay", 2);
|
|
6155
|
-
__decorateClass$
|
|
6155
|
+
__decorateClass$L([
|
|
6156
6156
|
property({ default: 0 })
|
|
6157
6157
|
], TimelineNode.prototype, "duration", 2);
|
|
6158
|
-
__decorateClass$
|
|
6158
|
+
__decorateClass$L([
|
|
6159
6159
|
property({ default: false })
|
|
6160
6160
|
], TimelineNode.prototype, "paused", 2);
|
|
6161
|
-
__decorateClass$
|
|
6161
|
+
__decorateClass$L([
|
|
6162
6162
|
protectedProperty()
|
|
6163
6163
|
], TimelineNode.prototype, "insideTimeRange", 2);
|
|
6164
|
-
TimelineNode = __decorateClass$
|
|
6164
|
+
TimelineNode = __decorateClass$L([
|
|
6165
6165
|
customNode("TimelineNode")
|
|
6166
6166
|
], TimelineNode);
|
|
6167
6167
|
|
|
6168
|
-
var __defProp$
|
|
6168
|
+
var __defProp$C = Object.defineProperty;
|
|
6169
6169
|
var __getOwnPropDesc$G = Object.getOwnPropertyDescriptor;
|
|
6170
|
-
var __decorateClass$
|
|
6170
|
+
var __decorateClass$K = (decorators, target, key, kind) => {
|
|
6171
6171
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$G(target, key) : target;
|
|
6172
6172
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6173
6173
|
if (decorator = decorators[i])
|
|
6174
6174
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
6175
|
-
if (kind && result) __defProp$
|
|
6175
|
+
if (kind && result) __defProp$C(target, key, result);
|
|
6176
6176
|
return result;
|
|
6177
6177
|
};
|
|
6178
6178
|
let Viewport = class extends Node {
|
|
@@ -6310,30 +6310,30 @@ let Viewport = class extends Node {
|
|
|
6310
6310
|
return this._projection.toArray(transpose);
|
|
6311
6311
|
}
|
|
6312
6312
|
};
|
|
6313
|
-
__decorateClass$
|
|
6313
|
+
__decorateClass$K([
|
|
6314
6314
|
property({ default: 0 })
|
|
6315
6315
|
], Viewport.prototype, "x", 2);
|
|
6316
|
-
__decorateClass$
|
|
6316
|
+
__decorateClass$K([
|
|
6317
6317
|
property({ default: 0 })
|
|
6318
6318
|
], Viewport.prototype, "y", 2);
|
|
6319
|
-
__decorateClass$
|
|
6319
|
+
__decorateClass$K([
|
|
6320
6320
|
property({ default: 0 })
|
|
6321
6321
|
], Viewport.prototype, "width", 2);
|
|
6322
|
-
__decorateClass$
|
|
6322
|
+
__decorateClass$K([
|
|
6323
6323
|
property({ default: 0 })
|
|
6324
6324
|
], Viewport.prototype, "height", 2);
|
|
6325
|
-
Viewport = __decorateClass$
|
|
6325
|
+
Viewport = __decorateClass$K([
|
|
6326
6326
|
customNode("Viewport")
|
|
6327
6327
|
], Viewport);
|
|
6328
6328
|
|
|
6329
|
-
var __defProp$
|
|
6329
|
+
var __defProp$B = Object.defineProperty;
|
|
6330
6330
|
var __getOwnPropDesc$F = Object.getOwnPropertyDescriptor;
|
|
6331
|
-
var __decorateClass$
|
|
6331
|
+
var __decorateClass$J = (decorators, target, key, kind) => {
|
|
6332
6332
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$F(target, key) : target;
|
|
6333
6333
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6334
6334
|
if (decorator = decorators[i])
|
|
6335
6335
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
6336
|
-
if (kind && result) __defProp$
|
|
6336
|
+
if (kind && result) __defProp$B(target, key, result);
|
|
6337
6337
|
return result;
|
|
6338
6338
|
};
|
|
6339
6339
|
let Effect = class extends TimelineNode {
|
|
@@ -6574,151 +6574,34 @@ let Effect = class extends TimelineNode {
|
|
|
6574
6574
|
}
|
|
6575
6575
|
}
|
|
6576
6576
|
};
|
|
6577
|
-
__decorateClass$
|
|
6577
|
+
__decorateClass$J([
|
|
6578
6578
|
protectedProperty()
|
|
6579
6579
|
], Effect.prototype, "material", 2);
|
|
6580
|
-
__decorateClass$
|
|
6580
|
+
__decorateClass$J([
|
|
6581
6581
|
property()
|
|
6582
6582
|
], Effect.prototype, "effectMode", 2);
|
|
6583
|
-
__decorateClass$
|
|
6583
|
+
__decorateClass$J([
|
|
6584
6584
|
property({ default: "" })
|
|
6585
6585
|
], Effect.prototype, "glsl", 2);
|
|
6586
|
-
__decorateClass$
|
|
6586
|
+
__decorateClass$J([
|
|
6587
6587
|
property({ default: "" })
|
|
6588
6588
|
], Effect.prototype, "glslSrc", 2);
|
|
6589
|
-
Effect = __decorateClass$
|
|
6589
|
+
Effect = __decorateClass$J([
|
|
6590
6590
|
customNode("Effect")
|
|
6591
6591
|
], Effect);
|
|
6592
6592
|
|
|
6593
|
-
var __defProp$
|
|
6593
|
+
var __defProp$A = Object.defineProperty;
|
|
6594
6594
|
var __getOwnPropDesc$E = Object.getOwnPropertyDescriptor;
|
|
6595
|
-
var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$
|
|
6596
|
-
var __decorateClass$
|
|
6595
|
+
var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$A(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6596
|
+
var __decorateClass$I = (decorators, target, key, kind) => {
|
|
6597
6597
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$E(target, key) : target;
|
|
6598
6598
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6599
6599
|
if (decorator = decorators[i])
|
|
6600
6600
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
6601
|
-
if (kind && result) __defProp$
|
|
6602
|
-
return result;
|
|
6603
|
-
};
|
|
6604
|
-
var __publicField$i = (obj, key, value) => __defNormalProp$i(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
6605
|
-
const frag$2 = `varying vec2 vUv[9];
|
|
6606
|
-
uniform sampler2D sampler;
|
|
6607
|
-
|
|
6608
|
-
void main(void) {
|
|
6609
|
-
gl_FragColor = vec4(0.0);
|
|
6610
|
-
float flag = 0.0;
|
|
6611
|
-
for (int i = 0; i < 9; i++) {
|
|
6612
|
-
vec2 uv = vUv[i];
|
|
6613
|
-
if (uv.x < 0.0 || uv.x > 1.0 || uv.y < 0.0 || uv.y > 1.0) {
|
|
6614
|
-
flag = 1.0;
|
|
6615
|
-
break;
|
|
6616
|
-
}
|
|
6617
|
-
}
|
|
6618
|
-
if (flag == 1.0) {
|
|
6619
|
-
gl_FragColor += texture2D(sampler, vUv[4]) * 0.028532;
|
|
6620
|
-
gl_FragColor += texture2D(sampler, vUv[4]) * 0.067234;
|
|
6621
|
-
gl_FragColor += texture2D(sampler, vUv[4]) * 0.124009;
|
|
6622
|
-
gl_FragColor += texture2D(sampler, vUv[4]) * 0.179044;
|
|
6623
|
-
gl_FragColor += texture2D(sampler, vUv[4]) * 0.20236;
|
|
6624
|
-
gl_FragColor += texture2D(sampler, vUv[4]) * 0.179044;
|
|
6625
|
-
gl_FragColor += texture2D(sampler, vUv[4]) * 0.124009;
|
|
6626
|
-
gl_FragColor += texture2D(sampler, vUv[4]) * 0.067234;
|
|
6627
|
-
gl_FragColor += texture2D(sampler, vUv[4]) * 0.028532;
|
|
6628
|
-
} else {
|
|
6629
|
-
gl_FragColor += texture2D(sampler, vUv[0]) * 0.028532;
|
|
6630
|
-
gl_FragColor += texture2D(sampler, vUv[1]) * 0.067234;
|
|
6631
|
-
gl_FragColor += texture2D(sampler, vUv[2]) * 0.124009;
|
|
6632
|
-
gl_FragColor += texture2D(sampler, vUv[3]) * 0.179044;
|
|
6633
|
-
gl_FragColor += texture2D(sampler, vUv[4]) * 0.20236;
|
|
6634
|
-
gl_FragColor += texture2D(sampler, vUv[5]) * 0.179044;
|
|
6635
|
-
gl_FragColor += texture2D(sampler, vUv[6]) * 0.124009;
|
|
6636
|
-
gl_FragColor += texture2D(sampler, vUv[7]) * 0.067234;
|
|
6637
|
-
gl_FragColor += texture2D(sampler, vUv[8]) * 0.028532;
|
|
6638
|
-
}
|
|
6639
|
-
}`;
|
|
6640
|
-
let BlurEffect = class extends Effect {
|
|
6641
|
-
constructor(properties, children = []) {
|
|
6642
|
-
super();
|
|
6643
|
-
this.setProperties(properties).append(children);
|
|
6644
|
-
}
|
|
6645
|
-
apply(renderer, source) {
|
|
6646
|
-
source.redraw(renderer, () => {
|
|
6647
|
-
QuadUvGeometry.draw(renderer, BlurEffect.materialX, {
|
|
6648
|
-
sampler: 0,
|
|
6649
|
-
strength: 1 / source.width * this.strength / this.quality
|
|
6650
|
-
});
|
|
6651
|
-
});
|
|
6652
|
-
source.redraw(renderer, () => {
|
|
6653
|
-
QuadUvGeometry.draw(renderer, BlurEffect.materialY, {
|
|
6654
|
-
sampler: 0,
|
|
6655
|
-
strength: 1 / source.height * this.strength / this.quality
|
|
6656
|
-
});
|
|
6657
|
-
});
|
|
6658
|
-
}
|
|
6659
|
-
};
|
|
6660
|
-
__publicField$i(BlurEffect, "materialX", new Material({
|
|
6661
|
-
vert: `attribute vec2 position;
|
|
6662
|
-
attribute vec2 uv;
|
|
6663
|
-
varying vec2 vUv[9];
|
|
6664
|
-
uniform float strength;
|
|
6665
|
-
|
|
6666
|
-
void main(void) {
|
|
6667
|
-
gl_Position = vec4(position, 0, 1);
|
|
6668
|
-
vUv[0] = uv + vec2(-4.0 * strength, 0.0);
|
|
6669
|
-
vUv[1] = uv + vec2(-3.0 * strength, 0.0);
|
|
6670
|
-
vUv[2] = uv + vec2(-2.0 * strength, 0.0);
|
|
6671
|
-
vUv[3] = uv + vec2(-1.0 * strength, 0.0);
|
|
6672
|
-
vUv[4] = uv + vec2(0.0 * strength, 0.0);
|
|
6673
|
-
vUv[5] = uv + vec2(1.0 * strength, 0.0);
|
|
6674
|
-
vUv[6] = uv + vec2(2.0 * strength, 0.0);
|
|
6675
|
-
vUv[7] = uv + vec2(3.0 * strength, 0.0);
|
|
6676
|
-
vUv[8] = uv + vec2(4.0 * strength, 0.0);
|
|
6677
|
-
}`,
|
|
6678
|
-
frag: frag$2
|
|
6679
|
-
}));
|
|
6680
|
-
__publicField$i(BlurEffect, "materialY", new Material({
|
|
6681
|
-
vert: `attribute vec2 position;
|
|
6682
|
-
attribute vec2 uv;
|
|
6683
|
-
uniform float strength;
|
|
6684
|
-
varying vec2 vUv[9];
|
|
6685
|
-
|
|
6686
|
-
void main(void) {
|
|
6687
|
-
gl_Position = vec4(position, 0, 1);
|
|
6688
|
-
vUv[0] = uv + vec2(0.0, -4.0 * strength);
|
|
6689
|
-
vUv[1] = uv + vec2(0.0, -3.0 * strength);
|
|
6690
|
-
vUv[2] = uv + vec2(0.0, -2.0 * strength);
|
|
6691
|
-
vUv[3] = uv + vec2(0.0, -1.0 * strength);
|
|
6692
|
-
vUv[4] = uv + vec2(0.0, 0.0 * strength);
|
|
6693
|
-
vUv[5] = uv + vec2(0.0, 1.0 * strength);
|
|
6694
|
-
vUv[6] = uv + vec2(0.0, 2.0 * strength);
|
|
6695
|
-
vUv[7] = uv + vec2(0.0, 3.0 * strength);
|
|
6696
|
-
vUv[8] = uv + vec2(0.0, 4.0 * strength);
|
|
6697
|
-
}`,
|
|
6698
|
-
frag: frag$2
|
|
6699
|
-
}));
|
|
6700
|
-
__decorateClass$G([
|
|
6701
|
-
property({ default: 4 })
|
|
6702
|
-
], BlurEffect.prototype, "strength", 2);
|
|
6703
|
-
__decorateClass$G([
|
|
6704
|
-
property({ default: 3 })
|
|
6705
|
-
], BlurEffect.prototype, "quality", 2);
|
|
6706
|
-
BlurEffect = __decorateClass$G([
|
|
6707
|
-
customNode("BlurEffect")
|
|
6708
|
-
], BlurEffect);
|
|
6709
|
-
|
|
6710
|
-
var __defProp$x = Object.defineProperty;
|
|
6711
|
-
var __getOwnPropDesc$D = Object.getOwnPropertyDescriptor;
|
|
6712
|
-
var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$x(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6713
|
-
var __decorateClass$F = (decorators, target, key, kind) => {
|
|
6714
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$D(target, key) : target;
|
|
6715
|
-
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6716
|
-
if (decorator = decorators[i])
|
|
6717
|
-
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
6718
|
-
if (kind && result) __defProp$x(target, key, result);
|
|
6601
|
+
if (kind && result) __defProp$A(target, key, result);
|
|
6719
6602
|
return result;
|
|
6720
6603
|
};
|
|
6721
|
-
var __publicField$
|
|
6604
|
+
var __publicField$i = (obj, key, value) => __defNormalProp$i(obj, key + "" , value);
|
|
6722
6605
|
let ColorAdjustEffect = class extends Effect {
|
|
6723
6606
|
constructor(properties, children = []) {
|
|
6724
6607
|
super();
|
|
@@ -6740,7 +6623,7 @@ let ColorAdjustEffect = class extends Effect {
|
|
|
6740
6623
|
});
|
|
6741
6624
|
}
|
|
6742
6625
|
};
|
|
6743
|
-
__publicField$
|
|
6626
|
+
__publicField$i(ColorAdjustEffect, "material", new Material({
|
|
6744
6627
|
vert: `precision mediump float;
|
|
6745
6628
|
attribute vec2 position;
|
|
6746
6629
|
attribute vec2 uv;
|
|
@@ -6775,46 +6658,46 @@ void main(void) {
|
|
|
6775
6658
|
gl_FragColor = c * alpha;
|
|
6776
6659
|
}`
|
|
6777
6660
|
}));
|
|
6778
|
-
__decorateClass$
|
|
6661
|
+
__decorateClass$I([
|
|
6779
6662
|
property({ default: 1 })
|
|
6780
6663
|
], ColorAdjustEffect.prototype, "saturation", 2);
|
|
6781
|
-
__decorateClass$
|
|
6664
|
+
__decorateClass$I([
|
|
6782
6665
|
property({ default: 1 })
|
|
6783
6666
|
], ColorAdjustEffect.prototype, "contrast", 2);
|
|
6784
|
-
__decorateClass$
|
|
6667
|
+
__decorateClass$I([
|
|
6785
6668
|
property({ default: 1 })
|
|
6786
6669
|
], ColorAdjustEffect.prototype, "brightness", 2);
|
|
6787
|
-
__decorateClass$
|
|
6670
|
+
__decorateClass$I([
|
|
6788
6671
|
property({ default: 1 })
|
|
6789
6672
|
], ColorAdjustEffect.prototype, "red", 2);
|
|
6790
|
-
__decorateClass$
|
|
6673
|
+
__decorateClass$I([
|
|
6791
6674
|
property({ default: 1 })
|
|
6792
6675
|
], ColorAdjustEffect.prototype, "green", 2);
|
|
6793
|
-
__decorateClass$
|
|
6676
|
+
__decorateClass$I([
|
|
6794
6677
|
property({ default: 1 })
|
|
6795
6678
|
], ColorAdjustEffect.prototype, "blue", 2);
|
|
6796
|
-
__decorateClass$
|
|
6679
|
+
__decorateClass$I([
|
|
6797
6680
|
property({ default: 1 })
|
|
6798
6681
|
], ColorAdjustEffect.prototype, "alpha", 2);
|
|
6799
|
-
__decorateClass$
|
|
6682
|
+
__decorateClass$I([
|
|
6800
6683
|
property({ default: 1 })
|
|
6801
6684
|
], ColorAdjustEffect.prototype, "gamma", 2);
|
|
6802
|
-
ColorAdjustEffect = __decorateClass$
|
|
6685
|
+
ColorAdjustEffect = __decorateClass$I([
|
|
6803
6686
|
customNode("ColorAdjustEffect")
|
|
6804
6687
|
], ColorAdjustEffect);
|
|
6805
6688
|
|
|
6806
|
-
var __defProp$
|
|
6807
|
-
var __getOwnPropDesc$
|
|
6808
|
-
var __defNormalProp$
|
|
6809
|
-
var __decorateClass$
|
|
6810
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
6689
|
+
var __defProp$z = Object.defineProperty;
|
|
6690
|
+
var __getOwnPropDesc$D = Object.getOwnPropertyDescriptor;
|
|
6691
|
+
var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6692
|
+
var __decorateClass$H = (decorators, target, key, kind) => {
|
|
6693
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$D(target, key) : target;
|
|
6811
6694
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6812
6695
|
if (decorator = decorators[i])
|
|
6813
6696
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
6814
|
-
if (kind && result) __defProp$
|
|
6697
|
+
if (kind && result) __defProp$z(target, key, result);
|
|
6815
6698
|
return result;
|
|
6816
6699
|
};
|
|
6817
|
-
var __publicField$
|
|
6700
|
+
var __publicField$h = (obj, key, value) => __defNormalProp$h(obj, key + "" , value);
|
|
6818
6701
|
let ColorFilterEffect = class extends Effect {
|
|
6819
6702
|
_colorMatrix = new ColorMatrix();
|
|
6820
6703
|
constructor(properties, children = []) {
|
|
@@ -6864,7 +6747,7 @@ let ColorFilterEffect = class extends Effect {
|
|
|
6864
6747
|
});
|
|
6865
6748
|
}
|
|
6866
6749
|
};
|
|
6867
|
-
__publicField$
|
|
6750
|
+
__publicField$h(ColorFilterEffect, "material", new Material({
|
|
6868
6751
|
vert: `precision mediump float;
|
|
6869
6752
|
attribute vec2 position;
|
|
6870
6753
|
attribute vec2 uv;
|
|
@@ -6891,25 +6774,25 @@ void main(void) {
|
|
|
6891
6774
|
);
|
|
6892
6775
|
}`
|
|
6893
6776
|
}));
|
|
6894
|
-
__decorateClass$
|
|
6777
|
+
__decorateClass$H([
|
|
6895
6778
|
property()
|
|
6896
6779
|
], ColorFilterEffect.prototype, "filter", 2);
|
|
6897
|
-
ColorFilterEffect = __decorateClass$
|
|
6780
|
+
ColorFilterEffect = __decorateClass$H([
|
|
6898
6781
|
customNode("ColorFilterEffect")
|
|
6899
6782
|
], ColorFilterEffect);
|
|
6900
6783
|
|
|
6901
|
-
var __defProp$
|
|
6902
|
-
var __getOwnPropDesc$
|
|
6903
|
-
var __defNormalProp$
|
|
6904
|
-
var __decorateClass$
|
|
6905
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
6784
|
+
var __defProp$y = Object.defineProperty;
|
|
6785
|
+
var __getOwnPropDesc$C = Object.getOwnPropertyDescriptor;
|
|
6786
|
+
var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6787
|
+
var __decorateClass$G = (decorators, target, key, kind) => {
|
|
6788
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$C(target, key) : target;
|
|
6906
6789
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6907
6790
|
if (decorator = decorators[i])
|
|
6908
6791
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
6909
|
-
if (kind && result) __defProp$
|
|
6792
|
+
if (kind && result) __defProp$y(target, key, result);
|
|
6910
6793
|
return result;
|
|
6911
6794
|
};
|
|
6912
|
-
var __publicField$
|
|
6795
|
+
var __publicField$g = (obj, key, value) => __defNormalProp$g(obj, key + "" , value);
|
|
6913
6796
|
const MAX_COLORS$1 = 50;
|
|
6914
6797
|
let ColorOverlayEffect = class extends Effect {
|
|
6915
6798
|
_color = new Color();
|
|
@@ -6935,7 +6818,7 @@ let ColorOverlayEffect = class extends Effect {
|
|
|
6935
6818
|
});
|
|
6936
6819
|
}
|
|
6937
6820
|
};
|
|
6938
|
-
__publicField$
|
|
6821
|
+
__publicField$g(ColorOverlayEffect, "material", new Material({
|
|
6939
6822
|
vert: `precision mediump float;
|
|
6940
6823
|
attribute vec2 position;
|
|
6941
6824
|
attribute vec2 uv;
|
|
@@ -6982,28 +6865,28 @@ void main(void) {
|
|
|
6982
6865
|
gl_FragColor = vec4(mix(color.rgb, mask.rgb, color.a * mask.a), color.a);
|
|
6983
6866
|
}`
|
|
6984
6867
|
}));
|
|
6985
|
-
__decorateClass$
|
|
6868
|
+
__decorateClass$G([
|
|
6986
6869
|
property({ default: [] })
|
|
6987
6870
|
], ColorOverlayEffect.prototype, "colors", 2);
|
|
6988
|
-
__decorateClass$
|
|
6871
|
+
__decorateClass$G([
|
|
6989
6872
|
property({ default: 0.5 })
|
|
6990
6873
|
], ColorOverlayEffect.prototype, "alpha", 2);
|
|
6991
|
-
ColorOverlayEffect = __decorateClass$
|
|
6874
|
+
ColorOverlayEffect = __decorateClass$G([
|
|
6992
6875
|
customNode("ColorOverlayEffect")
|
|
6993
6876
|
], ColorOverlayEffect);
|
|
6994
6877
|
|
|
6995
|
-
var __defProp$
|
|
6996
|
-
var __getOwnPropDesc$
|
|
6997
|
-
var __defNormalProp$
|
|
6998
|
-
var __decorateClass$
|
|
6999
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
6878
|
+
var __defProp$x = Object.defineProperty;
|
|
6879
|
+
var __getOwnPropDesc$B = Object.getOwnPropertyDescriptor;
|
|
6880
|
+
var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$x(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6881
|
+
var __decorateClass$F = (decorators, target, key, kind) => {
|
|
6882
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$B(target, key) : target;
|
|
7000
6883
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7001
6884
|
if (decorator = decorators[i])
|
|
7002
6885
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7003
|
-
if (kind && result) __defProp$
|
|
6886
|
+
if (kind && result) __defProp$x(target, key, result);
|
|
7004
6887
|
return result;
|
|
7005
6888
|
};
|
|
7006
|
-
var __publicField$
|
|
6889
|
+
var __publicField$f = (obj, key, value) => __defNormalProp$f(obj, key + "" , value);
|
|
7007
6890
|
let ColorRemoveEffect = class extends Effect {
|
|
7008
6891
|
_color = new Color();
|
|
7009
6892
|
constructor(properties, children = []) {
|
|
@@ -7034,7 +6917,7 @@ let ColorRemoveEffect = class extends Effect {
|
|
|
7034
6917
|
});
|
|
7035
6918
|
}
|
|
7036
6919
|
};
|
|
7037
|
-
__publicField$
|
|
6920
|
+
__publicField$f(ColorRemoveEffect, "material", new Material({
|
|
7038
6921
|
vert: `precision mediump float;
|
|
7039
6922
|
attribute vec2 position;
|
|
7040
6923
|
attribute vec2 uv;
|
|
@@ -7067,28 +6950,28 @@ void main(void) {
|
|
|
7067
6950
|
gl_FragColor = color;
|
|
7068
6951
|
}`
|
|
7069
6952
|
}));
|
|
7070
|
-
__decorateClass$
|
|
6953
|
+
__decorateClass$F([
|
|
7071
6954
|
property({ default: [] })
|
|
7072
6955
|
], ColorRemoveEffect.prototype, "colors", 2);
|
|
7073
|
-
__decorateClass$
|
|
6956
|
+
__decorateClass$F([
|
|
7074
6957
|
property({ default: 0.5 })
|
|
7075
6958
|
], ColorRemoveEffect.prototype, "epsilon", 2);
|
|
7076
|
-
ColorRemoveEffect = __decorateClass$
|
|
6959
|
+
ColorRemoveEffect = __decorateClass$F([
|
|
7077
6960
|
customNode("ColorRemoveEffect")
|
|
7078
6961
|
], ColorRemoveEffect);
|
|
7079
6962
|
|
|
7080
|
-
var __defProp$
|
|
7081
|
-
var __getOwnPropDesc$
|
|
7082
|
-
var __defNormalProp$
|
|
7083
|
-
var __decorateClass$
|
|
7084
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
6963
|
+
var __defProp$w = Object.defineProperty;
|
|
6964
|
+
var __getOwnPropDesc$A = Object.getOwnPropertyDescriptor;
|
|
6965
|
+
var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$w(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6966
|
+
var __decorateClass$E = (decorators, target, key, kind) => {
|
|
6967
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$A(target, key) : target;
|
|
7085
6968
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7086
6969
|
if (decorator = decorators[i])
|
|
7087
6970
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7088
|
-
if (kind && result) __defProp$
|
|
6971
|
+
if (kind && result) __defProp$w(target, key, result);
|
|
7089
6972
|
return result;
|
|
7090
6973
|
};
|
|
7091
|
-
var __publicField$
|
|
6974
|
+
var __publicField$e = (obj, key, value) => __defNormalProp$e(obj, key + "" , value);
|
|
7092
6975
|
const MAX_COLORS = 50;
|
|
7093
6976
|
let ColorReplaceEffect = class extends Effect {
|
|
7094
6977
|
_color = new Color();
|
|
@@ -7134,7 +7017,7 @@ let ColorReplaceEffect = class extends Effect {
|
|
|
7134
7017
|
});
|
|
7135
7018
|
}
|
|
7136
7019
|
};
|
|
7137
|
-
__publicField$
|
|
7020
|
+
__publicField$e(ColorReplaceEffect, "material", new Material({
|
|
7138
7021
|
vert: `precision mediump float;
|
|
7139
7022
|
attribute vec2 position;
|
|
7140
7023
|
attribute vec2 uv;
|
|
@@ -7174,13 +7057,13 @@ void main(void) {
|
|
|
7174
7057
|
}
|
|
7175
7058
|
}`
|
|
7176
7059
|
}));
|
|
7177
|
-
__decorateClass$
|
|
7060
|
+
__decorateClass$E([
|
|
7178
7061
|
property({ default: [] })
|
|
7179
7062
|
], ColorReplaceEffect.prototype, "colors", 2);
|
|
7180
|
-
__decorateClass$
|
|
7063
|
+
__decorateClass$E([
|
|
7181
7064
|
property({ default: 0.05 })
|
|
7182
7065
|
], ColorReplaceEffect.prototype, "epsilon", 2);
|
|
7183
|
-
ColorReplaceEffect = __decorateClass$
|
|
7066
|
+
ColorReplaceEffect = __decorateClass$E([
|
|
7184
7067
|
customNode("ColorReplaceEffect")
|
|
7185
7068
|
], ColorReplaceEffect);
|
|
7186
7069
|
|
|
@@ -7347,14 +7230,14 @@ class CanvasContext extends Path2D {
|
|
|
7347
7230
|
}
|
|
7348
7231
|
}
|
|
7349
7232
|
|
|
7350
|
-
var __defProp$
|
|
7351
|
-
var __getOwnPropDesc$
|
|
7352
|
-
var __decorateClass$
|
|
7353
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
7233
|
+
var __defProp$v = Object.defineProperty;
|
|
7234
|
+
var __getOwnPropDesc$z = Object.getOwnPropertyDescriptor;
|
|
7235
|
+
var __decorateClass$D = (decorators, target, key, kind) => {
|
|
7236
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$z(target, key) : target;
|
|
7354
7237
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7355
7238
|
if (decorator = decorators[i])
|
|
7356
7239
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7357
|
-
if (kind && result) __defProp$
|
|
7240
|
+
if (kind && result) __defProp$v(target, key, result);
|
|
7358
7241
|
return result;
|
|
7359
7242
|
};
|
|
7360
7243
|
let CanvasItem = class extends TimelineNode {
|
|
@@ -7516,19 +7399,19 @@ let CanvasItem = class extends TimelineNode {
|
|
|
7516
7399
|
super._render(renderer);
|
|
7517
7400
|
}
|
|
7518
7401
|
};
|
|
7519
|
-
__decorateClass$
|
|
7402
|
+
__decorateClass$D([
|
|
7520
7403
|
property()
|
|
7521
7404
|
], CanvasItem.prototype, "modulate", 2);
|
|
7522
|
-
__decorateClass$
|
|
7405
|
+
__decorateClass$D([
|
|
7523
7406
|
property()
|
|
7524
7407
|
], CanvasItem.prototype, "blendMode", 2);
|
|
7525
|
-
__decorateClass$
|
|
7408
|
+
__decorateClass$D([
|
|
7526
7409
|
protectedProperty({ default: true })
|
|
7527
7410
|
], CanvasItem.prototype, "visible", 2);
|
|
7528
|
-
__decorateClass$
|
|
7411
|
+
__decorateClass$D([
|
|
7529
7412
|
protectedProperty({ default: 1 })
|
|
7530
7413
|
], CanvasItem.prototype, "opacity", 2);
|
|
7531
|
-
CanvasItem = __decorateClass$
|
|
7414
|
+
CanvasItem = __decorateClass$D([
|
|
7532
7415
|
customNode("CanvasItem")
|
|
7533
7416
|
], CanvasItem);
|
|
7534
7417
|
|
|
@@ -7558,14 +7441,14 @@ class RenderStack {
|
|
|
7558
7441
|
}
|
|
7559
7442
|
}
|
|
7560
7443
|
|
|
7561
|
-
var __defProp$
|
|
7562
|
-
var __getOwnPropDesc$
|
|
7563
|
-
var __decorateClass$
|
|
7564
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
7444
|
+
var __defProp$u = Object.defineProperty;
|
|
7445
|
+
var __getOwnPropDesc$y = Object.getOwnPropertyDescriptor;
|
|
7446
|
+
var __decorateClass$C = (decorators, target, key, kind) => {
|
|
7447
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$y(target, key) : target;
|
|
7565
7448
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7566
7449
|
if (decorator = decorators[i])
|
|
7567
7450
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7568
|
-
if (kind && result) __defProp$
|
|
7451
|
+
if (kind && result) __defProp$u(target, key, result);
|
|
7569
7452
|
return result;
|
|
7570
7453
|
};
|
|
7571
7454
|
let Timeline = class extends Node {
|
|
@@ -7610,29 +7493,29 @@ let Timeline = class extends Node {
|
|
|
7610
7493
|
this.addTime(delta);
|
|
7611
7494
|
}
|
|
7612
7495
|
};
|
|
7613
|
-
__decorateClass$
|
|
7496
|
+
__decorateClass$C([
|
|
7614
7497
|
property({ default: 0 })
|
|
7615
7498
|
], Timeline.prototype, "startTime", 2);
|
|
7616
|
-
__decorateClass$
|
|
7499
|
+
__decorateClass$C([
|
|
7617
7500
|
property({ default: 0 })
|
|
7618
7501
|
], Timeline.prototype, "currentTime", 2);
|
|
7619
|
-
__decorateClass$
|
|
7502
|
+
__decorateClass$C([
|
|
7620
7503
|
property({ default: Number.MAX_SAFE_INTEGER })
|
|
7621
7504
|
], Timeline.prototype, "endTime", 2);
|
|
7622
|
-
__decorateClass$
|
|
7505
|
+
__decorateClass$C([
|
|
7623
7506
|
property({ default: false })
|
|
7624
7507
|
], Timeline.prototype, "loop", 2);
|
|
7625
|
-
Timeline = __decorateClass$
|
|
7508
|
+
Timeline = __decorateClass$C([
|
|
7626
7509
|
customNode("Timeline")
|
|
7627
7510
|
], Timeline);
|
|
7628
7511
|
|
|
7629
|
-
var __defProp$
|
|
7630
|
-
var __decorateClass$
|
|
7512
|
+
var __defProp$t = Object.defineProperty;
|
|
7513
|
+
var __decorateClass$B = (decorators, target, key, kind) => {
|
|
7631
7514
|
var result = void 0 ;
|
|
7632
7515
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7633
7516
|
if (decorator = decorators[i])
|
|
7634
7517
|
result = (decorator(target, key, result) ) || result;
|
|
7635
|
-
if (result) __defProp$
|
|
7518
|
+
if (result) __defProp$t(target, key, result);
|
|
7636
7519
|
return result;
|
|
7637
7520
|
};
|
|
7638
7521
|
class SceneTree extends MainLoop {
|
|
@@ -7705,19 +7588,19 @@ class SceneTree extends MainLoop {
|
|
|
7705
7588
|
this.input.removeEventListeners();
|
|
7706
7589
|
}
|
|
7707
7590
|
}
|
|
7708
|
-
__decorateClass$
|
|
7591
|
+
__decorateClass$B([
|
|
7709
7592
|
property({ default: false })
|
|
7710
7593
|
], SceneTree.prototype, "processPaused");
|
|
7711
|
-
__decorateClass$
|
|
7594
|
+
__decorateClass$B([
|
|
7712
7595
|
property()
|
|
7713
7596
|
], SceneTree.prototype, "backgroundColor");
|
|
7714
|
-
__decorateClass$
|
|
7597
|
+
__decorateClass$B([
|
|
7715
7598
|
protectedProperty({ default: false })
|
|
7716
7599
|
], SceneTree.prototype, "debug");
|
|
7717
7600
|
|
|
7718
|
-
var __getOwnPropDesc$
|
|
7719
|
-
var __decorateClass$
|
|
7720
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
7601
|
+
var __getOwnPropDesc$x = Object.getOwnPropertyDescriptor;
|
|
7602
|
+
var __decorateClass$A = (decorators, target, key, kind) => {
|
|
7603
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$x(target, key) : target;
|
|
7721
7604
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7722
7605
|
if (decorator = decorators[i])
|
|
7723
7606
|
result = (decorator(result)) || result;
|
|
@@ -7729,7 +7612,7 @@ let Transition = class extends Effect {
|
|
|
7729
7612
|
this.setProperties(properties).append(children);
|
|
7730
7613
|
}
|
|
7731
7614
|
};
|
|
7732
|
-
Transition = __decorateClass$
|
|
7615
|
+
Transition = __decorateClass$A([
|
|
7733
7616
|
customNode("Transition", {
|
|
7734
7617
|
effectMode: "transition",
|
|
7735
7618
|
processMode: "pausable",
|
|
@@ -7737,156 +7620,144 @@ Transition = __decorateClass$x([
|
|
|
7737
7620
|
})
|
|
7738
7621
|
], Transition);
|
|
7739
7622
|
|
|
7740
|
-
var __defProp$
|
|
7741
|
-
var __getOwnPropDesc$
|
|
7742
|
-
var
|
|
7743
|
-
|
|
7623
|
+
var __defProp$s = Object.defineProperty;
|
|
7624
|
+
var __getOwnPropDesc$w = Object.getOwnPropertyDescriptor;
|
|
7625
|
+
var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$s(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7626
|
+
var __decorateClass$z = (decorators, target, key, kind) => {
|
|
7627
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$w(target, key) : target;
|
|
7744
7628
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7745
7629
|
if (decorator = decorators[i])
|
|
7746
7630
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7747
|
-
if (kind && result) __defProp$
|
|
7631
|
+
if (kind && result) __defProp$s(target, key, result);
|
|
7748
7632
|
return result;
|
|
7749
7633
|
};
|
|
7750
|
-
|
|
7634
|
+
var __publicField$d = (obj, key, value) => __defNormalProp$d(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
7635
|
+
const frag$2 = `varying vec2 vUv[9];
|
|
7751
7636
|
uniform sampler2D sampler;
|
|
7752
|
-
uniform vec2 uOffset;
|
|
7753
7637
|
|
|
7754
7638
|
void main(void) {
|
|
7755
|
-
|
|
7756
|
-
|
|
7757
|
-
|
|
7758
|
-
|
|
7759
|
-
|
|
7760
|
-
|
|
7761
|
-
|
|
7762
|
-
}
|
|
7763
|
-
|
|
7764
|
-
|
|
7765
|
-
|
|
7766
|
-
|
|
7767
|
-
|
|
7768
|
-
|
|
7769
|
-
|
|
7770
|
-
|
|
7771
|
-
|
|
7772
|
-
|
|
7773
|
-
|
|
7774
|
-
|
|
7775
|
-
gl_FragColor
|
|
7639
|
+
gl_FragColor = vec4(0.0);
|
|
7640
|
+
float flag = 0.0;
|
|
7641
|
+
for (int i = 0; i < 9; i++) {
|
|
7642
|
+
vec2 uv = vUv[i];
|
|
7643
|
+
if (uv.x < 0.0 || uv.x > 1.0 || uv.y < 0.0 || uv.y > 1.0) {
|
|
7644
|
+
flag = 1.0;
|
|
7645
|
+
break;
|
|
7646
|
+
}
|
|
7647
|
+
}
|
|
7648
|
+
if (flag == 1.0) {
|
|
7649
|
+
gl_FragColor += texture2D(sampler, vUv[4]) * 0.028532;
|
|
7650
|
+
gl_FragColor += texture2D(sampler, vUv[4]) * 0.067234;
|
|
7651
|
+
gl_FragColor += texture2D(sampler, vUv[4]) * 0.124009;
|
|
7652
|
+
gl_FragColor += texture2D(sampler, vUv[4]) * 0.179044;
|
|
7653
|
+
gl_FragColor += texture2D(sampler, vUv[4]) * 0.20236;
|
|
7654
|
+
gl_FragColor += texture2D(sampler, vUv[4]) * 0.179044;
|
|
7655
|
+
gl_FragColor += texture2D(sampler, vUv[4]) * 0.124009;
|
|
7656
|
+
gl_FragColor += texture2D(sampler, vUv[4]) * 0.067234;
|
|
7657
|
+
gl_FragColor += texture2D(sampler, vUv[4]) * 0.028532;
|
|
7658
|
+
} else {
|
|
7659
|
+
gl_FragColor += texture2D(sampler, vUv[0]) * 0.028532;
|
|
7660
|
+
gl_FragColor += texture2D(sampler, vUv[1]) * 0.067234;
|
|
7661
|
+
gl_FragColor += texture2D(sampler, vUv[2]) * 0.124009;
|
|
7662
|
+
gl_FragColor += texture2D(sampler, vUv[3]) * 0.179044;
|
|
7663
|
+
gl_FragColor += texture2D(sampler, vUv[4]) * 0.20236;
|
|
7664
|
+
gl_FragColor += texture2D(sampler, vUv[5]) * 0.179044;
|
|
7665
|
+
gl_FragColor += texture2D(sampler, vUv[6]) * 0.124009;
|
|
7666
|
+
gl_FragColor += texture2D(sampler, vUv[7]) * 0.067234;
|
|
7667
|
+
gl_FragColor += texture2D(sampler, vUv[8]) * 0.028532;
|
|
7668
|
+
}
|
|
7776
7669
|
}`;
|
|
7777
|
-
let
|
|
7778
|
-
material;
|
|
7779
|
-
_kernels = [0];
|
|
7670
|
+
let GaussianBlurEffect = class extends Effect {
|
|
7780
7671
|
constructor(properties, children = []) {
|
|
7781
7672
|
super();
|
|
7782
|
-
this.material = new Material({
|
|
7783
|
-
vert: `precision mediump float;
|
|
7784
|
-
attribute vec2 position;
|
|
7785
|
-
attribute vec2 uv;
|
|
7786
|
-
varying vec2 vUv;
|
|
7787
|
-
void main() {
|
|
7788
|
-
gl_Position = vec4(position, 0.0, 1.0);
|
|
7789
|
-
vUv = uv;
|
|
7790
|
-
}`,
|
|
7791
|
-
frag: properties?.clamp ? clampFrag : frag$1
|
|
7792
|
-
});
|
|
7793
7673
|
this.setProperties(properties).append(children);
|
|
7794
|
-
this._generateKernels();
|
|
7795
|
-
}
|
|
7796
|
-
_updateProperty(key, value, oldValue, declaration) {
|
|
7797
|
-
super._updateProperty(key, value, oldValue, declaration);
|
|
7798
|
-
switch (key) {
|
|
7799
|
-
case "quality":
|
|
7800
|
-
case "strength":
|
|
7801
|
-
this._generateKernels();
|
|
7802
|
-
break;
|
|
7803
|
-
}
|
|
7804
|
-
}
|
|
7805
|
-
/** Auto generate kernels by blur & quality */
|
|
7806
|
-
_generateKernels() {
|
|
7807
|
-
const blur = Math.max(1, Math.round(this.strength));
|
|
7808
|
-
const quality = Math.max(1, Math.round(this.quality));
|
|
7809
|
-
const kernels = [blur];
|
|
7810
|
-
if (blur > 0) {
|
|
7811
|
-
let k = blur;
|
|
7812
|
-
const step = blur / quality;
|
|
7813
|
-
for (let i = 1; i < quality; i++) {
|
|
7814
|
-
k -= step;
|
|
7815
|
-
kernels.push(k);
|
|
7816
|
-
}
|
|
7817
|
-
}
|
|
7818
|
-
this._kernels = kernels;
|
|
7819
7674
|
}
|
|
7820
7675
|
apply(renderer, source) {
|
|
7821
|
-
const
|
|
7822
|
-
const
|
|
7823
|
-
|
|
7824
|
-
|
|
7825
|
-
offset = this._kernels[0] + 0.5;
|
|
7676
|
+
const sx = 1 / source.width;
|
|
7677
|
+
const sy = 1 / source.height;
|
|
7678
|
+
const quality = Math.max(this.quality, 1);
|
|
7679
|
+
for (let i = 0; i < quality; i++) {
|
|
7826
7680
|
source.redraw(renderer, () => {
|
|
7827
|
-
QuadUvGeometry.draw(renderer,
|
|
7681
|
+
QuadUvGeometry.draw(renderer, GaussianBlurEffect.materialX, {
|
|
7828
7682
|
sampler: 0,
|
|
7829
|
-
|
|
7830
|
-
offset * uvX,
|
|
7831
|
-
offset * uvY
|
|
7832
|
-
],
|
|
7833
|
-
uInputClamp: [0, 0, 1, 1]
|
|
7683
|
+
uStrength: sx * (this.strength / quality)
|
|
7834
7684
|
});
|
|
7835
7685
|
});
|
|
7836
|
-
}
|
|
7837
|
-
|
|
7838
|
-
|
|
7839
|
-
|
|
7840
|
-
|
|
7841
|
-
|
|
7842
|
-
sampler: 0,
|
|
7843
|
-
uOffset: [
|
|
7844
|
-
offset * uvX,
|
|
7845
|
-
offset * uvY
|
|
7846
|
-
],
|
|
7847
|
-
uInputClamp: [0, 0, 1, 1]
|
|
7848
|
-
});
|
|
7686
|
+
}
|
|
7687
|
+
for (let i = 0; i < quality; i++) {
|
|
7688
|
+
source.redraw(renderer, () => {
|
|
7689
|
+
QuadUvGeometry.draw(renderer, GaussianBlurEffect.materialY, {
|
|
7690
|
+
sampler: 0,
|
|
7691
|
+
uStrength: sy * (this.strength / quality)
|
|
7849
7692
|
});
|
|
7850
|
-
}
|
|
7851
|
-
offset = this._kernels[last] + 0.5;
|
|
7852
|
-
QuadUvGeometry.draw(renderer, this.material, {
|
|
7853
|
-
sampler: 0,
|
|
7854
|
-
uOffset: [
|
|
7855
|
-
offset * uvX,
|
|
7856
|
-
offset * uvY
|
|
7857
|
-
],
|
|
7858
|
-
uInputClamp: [0, 0, 1, 1]
|
|
7859
7693
|
});
|
|
7860
7694
|
}
|
|
7861
7695
|
}
|
|
7862
7696
|
};
|
|
7863
|
-
|
|
7697
|
+
__publicField$d(GaussianBlurEffect, "materialX", new Material({
|
|
7698
|
+
vert: `attribute vec2 position;
|
|
7699
|
+
attribute vec2 uv;
|
|
7700
|
+
uniform float uStrength;
|
|
7701
|
+
varying vec2 vUv[9];
|
|
7702
|
+
|
|
7703
|
+
void main(void) {
|
|
7704
|
+
gl_Position = vec4(position, 0, 1);
|
|
7705
|
+
vUv[0] = uv + vec2(-4.0 * uStrength, 0.0);
|
|
7706
|
+
vUv[1] = uv + vec2(-3.0 * uStrength, 0.0);
|
|
7707
|
+
vUv[2] = uv + vec2(-2.0 * uStrength, 0.0);
|
|
7708
|
+
vUv[3] = uv + vec2(-1.0 * uStrength, 0.0);
|
|
7709
|
+
vUv[4] = uv + vec2(0.0 * uStrength, 0.0);
|
|
7710
|
+
vUv[5] = uv + vec2(1.0 * uStrength, 0.0);
|
|
7711
|
+
vUv[6] = uv + vec2(2.0 * uStrength, 0.0);
|
|
7712
|
+
vUv[7] = uv + vec2(3.0 * uStrength, 0.0);
|
|
7713
|
+
vUv[8] = uv + vec2(4.0 * uStrength, 0.0);
|
|
7714
|
+
}`,
|
|
7715
|
+
frag: frag$2
|
|
7716
|
+
}));
|
|
7717
|
+
__publicField$d(GaussianBlurEffect, "materialY", new Material({
|
|
7718
|
+
vert: `attribute vec2 position;
|
|
7719
|
+
attribute vec2 uv;
|
|
7720
|
+
uniform float uStrength;
|
|
7721
|
+
varying vec2 vUv[9];
|
|
7722
|
+
|
|
7723
|
+
void main(void) {
|
|
7724
|
+
gl_Position = vec4(position, 0, 1);
|
|
7725
|
+
vUv[0] = uv + vec2(0.0, -4.0 * uStrength);
|
|
7726
|
+
vUv[1] = uv + vec2(0.0, -3.0 * uStrength);
|
|
7727
|
+
vUv[2] = uv + vec2(0.0, -2.0 * uStrength);
|
|
7728
|
+
vUv[3] = uv + vec2(0.0, -1.0 * uStrength);
|
|
7729
|
+
vUv[4] = uv + vec2(0.0, 0.0 * uStrength);
|
|
7730
|
+
vUv[5] = uv + vec2(0.0, 1.0 * uStrength);
|
|
7731
|
+
vUv[6] = uv + vec2(0.0, 2.0 * uStrength);
|
|
7732
|
+
vUv[7] = uv + vec2(0.0, 3.0 * uStrength);
|
|
7733
|
+
vUv[8] = uv + vec2(0.0, 4.0 * uStrength);
|
|
7734
|
+
}`,
|
|
7735
|
+
frag: frag$2
|
|
7736
|
+
}));
|
|
7737
|
+
__decorateClass$z([
|
|
7864
7738
|
property({ default: 4 })
|
|
7865
|
-
],
|
|
7866
|
-
__decorateClass$
|
|
7739
|
+
], GaussianBlurEffect.prototype, "strength", 2);
|
|
7740
|
+
__decorateClass$z([
|
|
7867
7741
|
property({ default: 3 })
|
|
7868
|
-
],
|
|
7869
|
-
__decorateClass$
|
|
7870
|
-
|
|
7871
|
-
],
|
|
7872
|
-
KawaseBlurEffect = __decorateClass$w([
|
|
7873
|
-
customNode("KawaseBlurEffect")
|
|
7874
|
-
], KawaseBlurEffect);
|
|
7742
|
+
], GaussianBlurEffect.prototype, "quality", 2);
|
|
7743
|
+
GaussianBlurEffect = __decorateClass$z([
|
|
7744
|
+
customNode("GaussianBlurEffect")
|
|
7745
|
+
], GaussianBlurEffect);
|
|
7875
7746
|
|
|
7876
|
-
var __defProp$
|
|
7877
|
-
var __getOwnPropDesc$
|
|
7878
|
-
var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$
|
|
7879
|
-
var __decorateClass$
|
|
7880
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
7747
|
+
var __defProp$r = Object.defineProperty;
|
|
7748
|
+
var __getOwnPropDesc$v = Object.getOwnPropertyDescriptor;
|
|
7749
|
+
var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$r(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7750
|
+
var __decorateClass$y = (decorators, target, key, kind) => {
|
|
7751
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$v(target, key) : target;
|
|
7881
7752
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7882
7753
|
if (decorator = decorators[i])
|
|
7883
7754
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7884
|
-
if (kind && result) __defProp$
|
|
7755
|
+
if (kind && result) __defProp$r(target, key, result);
|
|
7885
7756
|
return result;
|
|
7886
7757
|
};
|
|
7887
7758
|
var __publicField$c = (obj, key, value) => __defNormalProp$c(obj, key + "" , value);
|
|
7888
7759
|
let DropShadowEffect = class extends Effect {
|
|
7889
|
-
|
|
7760
|
+
blurEffect = new GaussianBlurEffect();
|
|
7890
7761
|
viewport3 = new Viewport();
|
|
7891
7762
|
_color = new Color();
|
|
7892
7763
|
constructor(properties, children = []) {
|
|
@@ -7899,16 +7770,14 @@ let DropShadowEffect = class extends Effect {
|
|
|
7899
7770
|
this._color.value = this.color;
|
|
7900
7771
|
QuadUvGeometry.draw(renderer, DropShadowEffect.material, {
|
|
7901
7772
|
sampler: 0,
|
|
7902
|
-
uAlpha: this.
|
|
7773
|
+
uAlpha: this._color.a,
|
|
7903
7774
|
uColor: this._color.toArray().slice(0, 3),
|
|
7904
|
-
uOffset: [-this.
|
|
7775
|
+
uOffset: [-this.offsetX, this.offsetY],
|
|
7905
7776
|
uInputSize: [source.width, source.height, 1 / source.width, 1 / source.height]
|
|
7906
7777
|
});
|
|
7907
7778
|
});
|
|
7908
|
-
this.
|
|
7909
|
-
this.
|
|
7910
|
-
this.kawaseBlurEffect.pixelSize = this.pixelSize;
|
|
7911
|
-
this.kawaseBlurEffect.apply(renderer, this.viewport3);
|
|
7779
|
+
this.blurEffect.strength = this.blur;
|
|
7780
|
+
this.blurEffect.apply(renderer, this.viewport3);
|
|
7912
7781
|
source.redraw(renderer, () => {
|
|
7913
7782
|
this.viewport3.texture.activate(renderer, 1);
|
|
7914
7783
|
QuadUvGeometry.draw(renderer, UvMaterial.instance, {
|
|
@@ -7947,40 +7816,34 @@ void main(void) {
|
|
|
7947
7816
|
gl_FragColor = sample;
|
|
7948
7817
|
}`
|
|
7949
7818
|
}));
|
|
7950
|
-
__decorateClass$
|
|
7951
|
-
property({ default: [4, 4] })
|
|
7952
|
-
], DropShadowEffect.prototype, "offset", 2);
|
|
7953
|
-
__decorateClass$v([
|
|
7819
|
+
__decorateClass$y([
|
|
7954
7820
|
property({ default: 0 })
|
|
7955
7821
|
], DropShadowEffect.prototype, "color", 2);
|
|
7956
|
-
__decorateClass$
|
|
7957
|
-
property({ default:
|
|
7958
|
-
], DropShadowEffect.prototype, "alpha", 2);
|
|
7959
|
-
__decorateClass$v([
|
|
7960
|
-
property({ default: false })
|
|
7961
|
-
], DropShadowEffect.prototype, "shadowOnly", 2);
|
|
7962
|
-
__decorateClass$v([
|
|
7963
|
-
property({ default: 2 })
|
|
7822
|
+
__decorateClass$y([
|
|
7823
|
+
property({ default: 4 })
|
|
7964
7824
|
], DropShadowEffect.prototype, "blur", 2);
|
|
7965
|
-
__decorateClass$
|
|
7825
|
+
__decorateClass$y([
|
|
7966
7826
|
property({ default: 4 })
|
|
7967
|
-
], DropShadowEffect.prototype, "
|
|
7968
|
-
__decorateClass$
|
|
7969
|
-
property({ default:
|
|
7970
|
-
], DropShadowEffect.prototype, "
|
|
7971
|
-
|
|
7827
|
+
], DropShadowEffect.prototype, "offsetX", 2);
|
|
7828
|
+
__decorateClass$y([
|
|
7829
|
+
property({ default: 4 })
|
|
7830
|
+
], DropShadowEffect.prototype, "offsetY", 2);
|
|
7831
|
+
__decorateClass$y([
|
|
7832
|
+
property({ default: false })
|
|
7833
|
+
], DropShadowEffect.prototype, "shadowOnly", 2);
|
|
7834
|
+
DropShadowEffect = __decorateClass$y([
|
|
7972
7835
|
customNode("DropShadowEffect")
|
|
7973
7836
|
], DropShadowEffect);
|
|
7974
7837
|
|
|
7975
|
-
var __defProp$
|
|
7976
|
-
var __getOwnPropDesc$
|
|
7977
|
-
var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$
|
|
7978
|
-
var __decorateClass$
|
|
7979
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
7838
|
+
var __defProp$q = Object.defineProperty;
|
|
7839
|
+
var __getOwnPropDesc$u = Object.getOwnPropertyDescriptor;
|
|
7840
|
+
var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7841
|
+
var __decorateClass$x = (decorators, target, key, kind) => {
|
|
7842
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$u(target, key) : target;
|
|
7980
7843
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7981
7844
|
if (decorator = decorators[i])
|
|
7982
7845
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7983
|
-
if (kind && result) __defProp$
|
|
7846
|
+
if (kind && result) __defProp$q(target, key, result);
|
|
7984
7847
|
return result;
|
|
7985
7848
|
};
|
|
7986
7849
|
var __publicField$b = (obj, key, value) => __defNormalProp$b(obj, key + "" , value);
|
|
@@ -8025,22 +7888,22 @@ void main(void) {
|
|
|
8025
7888
|
gl_FragColor = vec4(color.rgb * alpha, alpha);
|
|
8026
7889
|
}`
|
|
8027
7890
|
}));
|
|
8028
|
-
__decorateClass$
|
|
7891
|
+
__decorateClass$x([
|
|
8029
7892
|
property({ default: 5 })
|
|
8030
7893
|
], EmbossEffect.prototype, "strength", 2);
|
|
8031
|
-
EmbossEffect = __decorateClass$
|
|
7894
|
+
EmbossEffect = __decorateClass$x([
|
|
8032
7895
|
customNode("EmbossEffect")
|
|
8033
7896
|
], EmbossEffect);
|
|
8034
7897
|
|
|
8035
|
-
var __defProp$
|
|
8036
|
-
var __getOwnPropDesc$
|
|
8037
|
-
var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$
|
|
8038
|
-
var __decorateClass$
|
|
8039
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
7898
|
+
var __defProp$p = Object.defineProperty;
|
|
7899
|
+
var __getOwnPropDesc$t = Object.getOwnPropertyDescriptor;
|
|
7900
|
+
var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$p(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7901
|
+
var __decorateClass$w = (decorators, target, key, kind) => {
|
|
7902
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$t(target, key) : target;
|
|
8040
7903
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
8041
7904
|
if (decorator = decorators[i])
|
|
8042
7905
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8043
|
-
if (kind && result) __defProp$
|
|
7906
|
+
if (kind && result) __defProp$p(target, key, result);
|
|
8044
7907
|
return result;
|
|
8045
7908
|
};
|
|
8046
7909
|
var __publicField$a = (obj, key, value) => __defNormalProp$a(obj, key + "" , value);
|
|
@@ -8214,46 +8077,46 @@ void main(void) {
|
|
|
8214
8077
|
gl_FragColor.a = texture2D(sampler, coord).a;
|
|
8215
8078
|
}`
|
|
8216
8079
|
}));
|
|
8217
|
-
__decorateClass$
|
|
8080
|
+
__decorateClass$w([
|
|
8218
8081
|
property({ default: 10 })
|
|
8219
8082
|
], GlitchEffect.prototype, "slices", 2);
|
|
8220
|
-
__decorateClass$
|
|
8083
|
+
__decorateClass$w([
|
|
8221
8084
|
property({ default: 512 })
|
|
8222
8085
|
], GlitchEffect.prototype, "sampleSize", 2);
|
|
8223
|
-
__decorateClass$
|
|
8086
|
+
__decorateClass$w([
|
|
8224
8087
|
property({ default: 100 })
|
|
8225
8088
|
], GlitchEffect.prototype, "offset", 2);
|
|
8226
|
-
__decorateClass$
|
|
8089
|
+
__decorateClass$w([
|
|
8227
8090
|
property({ default: 0 })
|
|
8228
8091
|
], GlitchEffect.prototype, "direction", 2);
|
|
8229
|
-
__decorateClass$
|
|
8092
|
+
__decorateClass$w([
|
|
8230
8093
|
property({ default: 2 })
|
|
8231
8094
|
], GlitchEffect.prototype, "fillMode", 2);
|
|
8232
|
-
__decorateClass$
|
|
8095
|
+
__decorateClass$w([
|
|
8233
8096
|
property({ default: 0 })
|
|
8234
8097
|
], GlitchEffect.prototype, "seed", 2);
|
|
8235
|
-
__decorateClass$
|
|
8098
|
+
__decorateClass$w([
|
|
8236
8099
|
property({ default: [2, 2] })
|
|
8237
8100
|
], GlitchEffect.prototype, "red", 2);
|
|
8238
|
-
__decorateClass$
|
|
8101
|
+
__decorateClass$w([
|
|
8239
8102
|
property({ default: [-10, 4] })
|
|
8240
8103
|
], GlitchEffect.prototype, "green", 2);
|
|
8241
|
-
__decorateClass$
|
|
8104
|
+
__decorateClass$w([
|
|
8242
8105
|
property({ default: [10, -4] })
|
|
8243
8106
|
], GlitchEffect.prototype, "blue", 2);
|
|
8244
|
-
GlitchEffect = __decorateClass$
|
|
8107
|
+
GlitchEffect = __decorateClass$w([
|
|
8245
8108
|
customNode("GlitchEffect")
|
|
8246
8109
|
], GlitchEffect);
|
|
8247
8110
|
|
|
8248
|
-
var __defProp$
|
|
8249
|
-
var __getOwnPropDesc$
|
|
8250
|
-
var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$
|
|
8251
|
-
var __decorateClass$
|
|
8252
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
8111
|
+
var __defProp$o = Object.defineProperty;
|
|
8112
|
+
var __getOwnPropDesc$s = Object.getOwnPropertyDescriptor;
|
|
8113
|
+
var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$o(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8114
|
+
var __decorateClass$v = (decorators, target, key, kind) => {
|
|
8115
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$s(target, key) : target;
|
|
8253
8116
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
8254
8117
|
if (decorator = decorators[i])
|
|
8255
8118
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8256
|
-
if (kind && result) __defProp$
|
|
8119
|
+
if (kind && result) __defProp$o(target, key, result);
|
|
8257
8120
|
return result;
|
|
8258
8121
|
};
|
|
8259
8122
|
var __publicField$9 = (obj, key, value) => __defNormalProp$9(obj, key + "" , value);
|
|
@@ -8431,40 +8294,151 @@ void main(void) {
|
|
|
8431
8294
|
gl_FragColor = vec4(color.rgb + mist.rgb, color.a);
|
|
8432
8295
|
}`
|
|
8433
8296
|
}));
|
|
8434
|
-
__decorateClass$
|
|
8297
|
+
__decorateClass$v([
|
|
8435
8298
|
property({ default: 0 })
|
|
8436
8299
|
], GodrayEffect.prototype, "time", 2);
|
|
8437
|
-
__decorateClass$
|
|
8300
|
+
__decorateClass$v([
|
|
8438
8301
|
property({ default: 30 })
|
|
8439
8302
|
], GodrayEffect.prototype, "angle", 2);
|
|
8440
|
-
__decorateClass$
|
|
8303
|
+
__decorateClass$v([
|
|
8441
8304
|
property({ default: 0.5 })
|
|
8442
8305
|
], GodrayEffect.prototype, "gain", 2);
|
|
8443
|
-
__decorateClass$
|
|
8306
|
+
__decorateClass$v([
|
|
8444
8307
|
property({ default: 2.5 })
|
|
8445
8308
|
], GodrayEffect.prototype, "lacunarity", 2);
|
|
8446
|
-
__decorateClass$
|
|
8309
|
+
__decorateClass$v([
|
|
8447
8310
|
property({ default: true })
|
|
8448
8311
|
], GodrayEffect.prototype, "parallel", 2);
|
|
8449
|
-
__decorateClass$
|
|
8312
|
+
__decorateClass$v([
|
|
8450
8313
|
property({ default: [0, 0] })
|
|
8451
8314
|
], GodrayEffect.prototype, "center", 2);
|
|
8452
|
-
__decorateClass$
|
|
8315
|
+
__decorateClass$v([
|
|
8453
8316
|
property({ default: 1 })
|
|
8454
8317
|
], GodrayEffect.prototype, "alpha", 2);
|
|
8455
|
-
GodrayEffect = __decorateClass$
|
|
8318
|
+
GodrayEffect = __decorateClass$v([
|
|
8456
8319
|
customNode("GodrayEffect")
|
|
8457
8320
|
], GodrayEffect);
|
|
8458
8321
|
|
|
8459
|
-
var __defProp$
|
|
8322
|
+
var __defProp$n = Object.defineProperty;
|
|
8323
|
+
var __getOwnPropDesc$r = Object.getOwnPropertyDescriptor;
|
|
8324
|
+
var __decorateClass$u = (decorators, target, key, kind) => {
|
|
8325
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$r(target, key) : target;
|
|
8326
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
8327
|
+
if (decorator = decorators[i])
|
|
8328
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8329
|
+
if (kind && result) __defProp$n(target, key, result);
|
|
8330
|
+
return result;
|
|
8331
|
+
};
|
|
8332
|
+
const frag$1 = `varying vec2 vUv;
|
|
8333
|
+
uniform sampler2D sampler;
|
|
8334
|
+
uniform vec2 uOffset;
|
|
8335
|
+
|
|
8336
|
+
void main(void) {
|
|
8337
|
+
vec4 color = vec4(0.0);
|
|
8338
|
+
color += texture2D(sampler, vec2(vUv.x - uOffset.x, vUv.y + uOffset.y));
|
|
8339
|
+
color += texture2D(sampler, vec2(vUv.x + uOffset.x, vUv.y + uOffset.y));
|
|
8340
|
+
color += texture2D(sampler, vec2(vUv.x + uOffset.x, vUv.y - uOffset.y));
|
|
8341
|
+
color += texture2D(sampler, vec2(vUv.x - uOffset.x, vUv.y - uOffset.y));
|
|
8342
|
+
color *= 0.25;
|
|
8343
|
+
gl_FragColor = color;
|
|
8344
|
+
}`;
|
|
8345
|
+
const clampFrag = `precision highp float;
|
|
8346
|
+
varying vec2 vUv;
|
|
8347
|
+
uniform sampler2D sampler;
|
|
8348
|
+
uniform vec2 uOffset;
|
|
8349
|
+
uniform vec4 uInputClamp;
|
|
8350
|
+
void main(void) {
|
|
8351
|
+
vec4 color = vec4(0.0);
|
|
8352
|
+
color += texture2D(sampler, clamp(vec2(vUv.x - uOffset.x, vUv.y + uOffset.y), uInputClamp.xy, uInputClamp.zw));
|
|
8353
|
+
color += texture2D(sampler, clamp(vec2(vUv.x + uOffset.x, vUv.y + uOffset.y), uInputClamp.xy, uInputClamp.zw));
|
|
8354
|
+
color += texture2D(sampler, clamp(vec2(vUv.x + uOffset.x, vUv.y - uOffset.y), uInputClamp.xy, uInputClamp.zw));
|
|
8355
|
+
color += texture2D(sampler, clamp(vec2(vUv.x - uOffset.x, vUv.y - uOffset.y), uInputClamp.xy, uInputClamp.zw));
|
|
8356
|
+
color *= 0.25;
|
|
8357
|
+
gl_FragColor = color;
|
|
8358
|
+
}`;
|
|
8359
|
+
let KawaseBlurEffect = class extends Effect {
|
|
8360
|
+
material;
|
|
8361
|
+
_kernels = [0];
|
|
8362
|
+
constructor(properties, children = []) {
|
|
8363
|
+
super();
|
|
8364
|
+
this.material = new Material({
|
|
8365
|
+
vert: `precision mediump float;
|
|
8366
|
+
attribute vec2 position;
|
|
8367
|
+
attribute vec2 uv;
|
|
8368
|
+
varying vec2 vUv;
|
|
8369
|
+
void main() {
|
|
8370
|
+
gl_Position = vec4(position, 0.0, 1.0);
|
|
8371
|
+
vUv = uv;
|
|
8372
|
+
}`,
|
|
8373
|
+
frag: properties?.clamp ? clampFrag : frag$1
|
|
8374
|
+
});
|
|
8375
|
+
this.setProperties(properties).append(children);
|
|
8376
|
+
this._generateKernels();
|
|
8377
|
+
}
|
|
8378
|
+
_updateProperty(key, value, oldValue, declaration) {
|
|
8379
|
+
super._updateProperty(key, value, oldValue, declaration);
|
|
8380
|
+
switch (key) {
|
|
8381
|
+
case "quality":
|
|
8382
|
+
case "strength":
|
|
8383
|
+
this._generateKernels();
|
|
8384
|
+
break;
|
|
8385
|
+
}
|
|
8386
|
+
}
|
|
8387
|
+
/** Auto generate kernels by blur & quality */
|
|
8388
|
+
_generateKernels() {
|
|
8389
|
+
const blur = Math.max(1, Math.round(this.strength));
|
|
8390
|
+
const quality = Math.max(1, Math.round(this.quality));
|
|
8391
|
+
const kernels = [blur];
|
|
8392
|
+
if (blur > 0) {
|
|
8393
|
+
let k = blur;
|
|
8394
|
+
const step = blur / quality;
|
|
8395
|
+
for (let i = 1; i < quality; i++) {
|
|
8396
|
+
k -= step;
|
|
8397
|
+
kernels.push(k);
|
|
8398
|
+
}
|
|
8399
|
+
}
|
|
8400
|
+
this._kernels = kernels;
|
|
8401
|
+
}
|
|
8402
|
+
apply(renderer, source) {
|
|
8403
|
+
const uvX = this.pixelSize[0] / source.width;
|
|
8404
|
+
const uvY = this.pixelSize[1] / source.height;
|
|
8405
|
+
this._kernels.forEach((kernel) => {
|
|
8406
|
+
const offset = kernel + 0.5;
|
|
8407
|
+
source.redraw(renderer, () => {
|
|
8408
|
+
QuadUvGeometry.draw(renderer, this.material, {
|
|
8409
|
+
sampler: 0,
|
|
8410
|
+
uOffset: [
|
|
8411
|
+
offset * uvX,
|
|
8412
|
+
offset * uvY
|
|
8413
|
+
],
|
|
8414
|
+
uInputClamp: [0, 0, 1, 1]
|
|
8415
|
+
});
|
|
8416
|
+
});
|
|
8417
|
+
});
|
|
8418
|
+
}
|
|
8419
|
+
};
|
|
8420
|
+
__decorateClass$u([
|
|
8421
|
+
property({ default: 4 })
|
|
8422
|
+
], KawaseBlurEffect.prototype, "strength", 2);
|
|
8423
|
+
__decorateClass$u([
|
|
8424
|
+
property({ default: 3 })
|
|
8425
|
+
], KawaseBlurEffect.prototype, "quality", 2);
|
|
8426
|
+
__decorateClass$u([
|
|
8427
|
+
property({ default: [1, 1] })
|
|
8428
|
+
], KawaseBlurEffect.prototype, "pixelSize", 2);
|
|
8429
|
+
KawaseBlurEffect = __decorateClass$u([
|
|
8430
|
+
customNode("KawaseBlurEffect")
|
|
8431
|
+
], KawaseBlurEffect);
|
|
8432
|
+
|
|
8433
|
+
var __defProp$m = Object.defineProperty;
|
|
8460
8434
|
var __getOwnPropDesc$q = Object.getOwnPropertyDescriptor;
|
|
8461
|
-
var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$
|
|
8462
|
-
var __decorateClass$
|
|
8435
|
+
var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8436
|
+
var __decorateClass$t = (decorators, target, key, kind) => {
|
|
8463
8437
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$q(target, key) : target;
|
|
8464
8438
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
8465
8439
|
if (decorator = decorators[i])
|
|
8466
8440
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8467
|
-
if (kind && result) __defProp$
|
|
8441
|
+
if (kind && result) __defProp$m(target, key, result);
|
|
8468
8442
|
return result;
|
|
8469
8443
|
};
|
|
8470
8444
|
var __publicField$8 = (obj, key, value) => __defNormalProp$8(obj, key + "" , value);
|
|
@@ -8553,25 +8527,25 @@ void main(void) {
|
|
|
8553
8527
|
}
|
|
8554
8528
|
}`
|
|
8555
8529
|
}));
|
|
8556
|
-
__decorateClass$
|
|
8530
|
+
__decorateClass$t([
|
|
8557
8531
|
protectedProperty()
|
|
8558
8532
|
], MaskEffect.prototype, "texture", 2);
|
|
8559
|
-
__decorateClass$
|
|
8533
|
+
__decorateClass$t([
|
|
8560
8534
|
property({ default: "" })
|
|
8561
8535
|
], MaskEffect.prototype, "src", 2);
|
|
8562
|
-
MaskEffect = __decorateClass$
|
|
8536
|
+
MaskEffect = __decorateClass$t([
|
|
8563
8537
|
customNode("MaskEffect")
|
|
8564
8538
|
], MaskEffect);
|
|
8565
8539
|
|
|
8566
|
-
var __defProp$
|
|
8540
|
+
var __defProp$l = Object.defineProperty;
|
|
8567
8541
|
var __getOwnPropDesc$p = Object.getOwnPropertyDescriptor;
|
|
8568
|
-
var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$
|
|
8569
|
-
var __decorateClass$
|
|
8542
|
+
var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$l(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8543
|
+
var __decorateClass$s = (decorators, target, key, kind) => {
|
|
8570
8544
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$p(target, key) : target;
|
|
8571
8545
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
8572
8546
|
if (decorator = decorators[i])
|
|
8573
8547
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8574
|
-
if (kind && result) __defProp$
|
|
8548
|
+
if (kind && result) __defProp$l(target, key, result);
|
|
8575
8549
|
return result;
|
|
8576
8550
|
};
|
|
8577
8551
|
var __publicField$7 = (obj, key, value) => __defNormalProp$7(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
@@ -8645,11 +8619,11 @@ void main() {
|
|
|
8645
8619
|
QuadUvGeometry.draw(renderer, this.material, {
|
|
8646
8620
|
sampler: 0,
|
|
8647
8621
|
uThickness: [
|
|
8648
|
-
this.
|
|
8649
|
-
this.
|
|
8622
|
+
this.width / source.width,
|
|
8623
|
+
this.width / source.height
|
|
8650
8624
|
],
|
|
8651
8625
|
uColor: this._color.toArray().slice(0, 3),
|
|
8652
|
-
uAlpha: this.
|
|
8626
|
+
uAlpha: this.opacity !== 1 ? this.opacity : this._color.a,
|
|
8653
8627
|
uAngleStep: OutlineEffect.getAngleStep(this.quality),
|
|
8654
8628
|
uKnockout: this.knockout ? 1 : 0,
|
|
8655
8629
|
uInputClamp: [0, 0, 1, 1]
|
|
@@ -8659,34 +8633,40 @@ void main() {
|
|
|
8659
8633
|
};
|
|
8660
8634
|
__publicField$7(OutlineEffect, "MIN_SAMPLES", 1);
|
|
8661
8635
|
__publicField$7(OutlineEffect, "MAX_SAMPLES", 100);
|
|
8662
|
-
__decorateClass$
|
|
8663
|
-
property({ default: 1 })
|
|
8664
|
-
], OutlineEffect.prototype, "thickness", 2);
|
|
8665
|
-
__decorateClass$q([
|
|
8636
|
+
__decorateClass$s([
|
|
8666
8637
|
property({ default: 0 })
|
|
8667
8638
|
], OutlineEffect.prototype, "color", 2);
|
|
8668
|
-
__decorateClass$
|
|
8639
|
+
__decorateClass$s([
|
|
8669
8640
|
property({ default: 1 })
|
|
8670
|
-
], OutlineEffect.prototype, "
|
|
8671
|
-
__decorateClass$
|
|
8641
|
+
], OutlineEffect.prototype, "width", 2);
|
|
8642
|
+
__decorateClass$s([
|
|
8643
|
+
property({ default: "solid" })
|
|
8644
|
+
], OutlineEffect.prototype, "style", 2);
|
|
8645
|
+
__decorateClass$s([
|
|
8646
|
+
property()
|
|
8647
|
+
], OutlineEffect.prototype, "image", 2);
|
|
8648
|
+
__decorateClass$s([
|
|
8649
|
+
property({ default: 1 })
|
|
8650
|
+
], OutlineEffect.prototype, "opacity", 2);
|
|
8651
|
+
__decorateClass$s([
|
|
8672
8652
|
property({ default: 0.1 })
|
|
8673
8653
|
], OutlineEffect.prototype, "quality", 2);
|
|
8674
|
-
__decorateClass$
|
|
8654
|
+
__decorateClass$s([
|
|
8675
8655
|
property({ default: false })
|
|
8676
8656
|
], OutlineEffect.prototype, "knockout", 2);
|
|
8677
|
-
OutlineEffect = __decorateClass$
|
|
8657
|
+
OutlineEffect = __decorateClass$s([
|
|
8678
8658
|
customNode("OutlineEffect")
|
|
8679
8659
|
], OutlineEffect);
|
|
8680
8660
|
|
|
8681
|
-
var __defProp$
|
|
8661
|
+
var __defProp$k = Object.defineProperty;
|
|
8682
8662
|
var __getOwnPropDesc$o = Object.getOwnPropertyDescriptor;
|
|
8683
|
-
var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$
|
|
8684
|
-
var __decorateClass$
|
|
8663
|
+
var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8664
|
+
var __decorateClass$r = (decorators, target, key, kind) => {
|
|
8685
8665
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$o(target, key) : target;
|
|
8686
8666
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
8687
8667
|
if (decorator = decorators[i])
|
|
8688
8668
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8689
|
-
if (kind && result) __defProp$
|
|
8669
|
+
if (kind && result) __defProp$k(target, key, result);
|
|
8690
8670
|
return result;
|
|
8691
8671
|
};
|
|
8692
8672
|
var __publicField$6 = (obj, key, value) => __defNormalProp$6(obj, key + "" , value);
|
|
@@ -8742,22 +8722,22 @@ void main(void) {
|
|
|
8742
8722
|
gl_FragColor = texture2D(sampler, coord);
|
|
8743
8723
|
}`
|
|
8744
8724
|
}));
|
|
8745
|
-
__decorateClass$
|
|
8725
|
+
__decorateClass$r([
|
|
8746
8726
|
property({ default: 10 })
|
|
8747
8727
|
], PixelateEffect.prototype, "strength", 2);
|
|
8748
|
-
PixelateEffect = __decorateClass$
|
|
8728
|
+
PixelateEffect = __decorateClass$r([
|
|
8749
8729
|
customNode("PixelateEffect")
|
|
8750
8730
|
], PixelateEffect);
|
|
8751
8731
|
|
|
8752
|
-
var __defProp$
|
|
8732
|
+
var __defProp$j = Object.defineProperty;
|
|
8753
8733
|
var __getOwnPropDesc$n = Object.getOwnPropertyDescriptor;
|
|
8754
|
-
var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$
|
|
8755
|
-
var __decorateClass$
|
|
8734
|
+
var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8735
|
+
var __decorateClass$q = (decorators, target, key, kind) => {
|
|
8756
8736
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$n(target, key) : target;
|
|
8757
8737
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
8758
8738
|
if (decorator = decorators[i])
|
|
8759
8739
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8760
|
-
if (kind && result) __defProp$
|
|
8740
|
+
if (kind && result) __defProp$j(target, key, result);
|
|
8761
8741
|
return result;
|
|
8762
8742
|
};
|
|
8763
8743
|
var __publicField$5 = (obj, key, value) => __defNormalProp$5(obj, key + "" , value);
|
|
@@ -8766,11 +8746,18 @@ let ZoomBlurEffect = class extends Effect {
|
|
|
8766
8746
|
super();
|
|
8767
8747
|
this.setProperties(properties).append(children);
|
|
8768
8748
|
}
|
|
8769
|
-
apply(renderer, source) {
|
|
8749
|
+
apply(renderer, source, context) {
|
|
8750
|
+
let center = this.center;
|
|
8751
|
+
if (context.targetArea) {
|
|
8752
|
+
center = [
|
|
8753
|
+
(context.targetArea[0] + context.targetArea[2] / 2) * source.width,
|
|
8754
|
+
(context.targetArea[1] + context.targetArea[3] / 2) * source.height
|
|
8755
|
+
];
|
|
8756
|
+
}
|
|
8770
8757
|
source.redraw(renderer, () => {
|
|
8771
8758
|
QuadUvGeometry.draw(renderer, ZoomBlurEffect.material, {
|
|
8772
8759
|
sampler: 0,
|
|
8773
|
-
uCenter:
|
|
8760
|
+
uCenter: center ?? [source.width / 2, source.height / 2],
|
|
8774
8761
|
uInnerRadius: this.innerRadius,
|
|
8775
8762
|
uRadius: this.radius,
|
|
8776
8763
|
uStrength: this.strength,
|
|
@@ -8863,22 +8850,134 @@ void main() {
|
|
|
8863
8850
|
gl_FragColor = color;
|
|
8864
8851
|
}`
|
|
8865
8852
|
}));
|
|
8866
|
-
__decorateClass$
|
|
8853
|
+
__decorateClass$q([
|
|
8867
8854
|
property()
|
|
8868
8855
|
], ZoomBlurEffect.prototype, "center", 2);
|
|
8869
|
-
__decorateClass$
|
|
8856
|
+
__decorateClass$q([
|
|
8870
8857
|
property({ default: 20 })
|
|
8871
8858
|
], ZoomBlurEffect.prototype, "innerRadius", 2);
|
|
8872
|
-
__decorateClass$
|
|
8859
|
+
__decorateClass$q([
|
|
8873
8860
|
property({ default: -1 })
|
|
8874
8861
|
], ZoomBlurEffect.prototype, "radius", 2);
|
|
8875
|
-
__decorateClass$
|
|
8862
|
+
__decorateClass$q([
|
|
8876
8863
|
property({ default: 0.1 })
|
|
8877
8864
|
], ZoomBlurEffect.prototype, "strength", 2);
|
|
8878
|
-
ZoomBlurEffect = __decorateClass$
|
|
8865
|
+
ZoomBlurEffect = __decorateClass$q([
|
|
8879
8866
|
customNode("ZoomBlurEffect")
|
|
8880
8867
|
], ZoomBlurEffect);
|
|
8881
8868
|
|
|
8869
|
+
var __defProp$i = Object.defineProperty;
|
|
8870
|
+
var __decorateClass$p = (decorators, target, key, kind) => {
|
|
8871
|
+
var result = void 0 ;
|
|
8872
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
8873
|
+
if (decorator = decorators[i])
|
|
8874
|
+
result = (decorator(target, key, result) ) || result;
|
|
8875
|
+
if (result) __defProp$i(target, key, result);
|
|
8876
|
+
return result;
|
|
8877
|
+
};
|
|
8878
|
+
class BaseElement2DOutline extends CoreObject {
|
|
8879
|
+
constructor(parent) {
|
|
8880
|
+
super();
|
|
8881
|
+
this.parent = parent;
|
|
8882
|
+
}
|
|
8883
|
+
_updateProperty(key, value, oldValue, declaration) {
|
|
8884
|
+
super._updateProperty(key, value, oldValue, declaration);
|
|
8885
|
+
switch (key) {
|
|
8886
|
+
case "color":
|
|
8887
|
+
case "width":
|
|
8888
|
+
case "style":
|
|
8889
|
+
case "image":
|
|
8890
|
+
case "opacity":
|
|
8891
|
+
this.updateEffect();
|
|
8892
|
+
break;
|
|
8893
|
+
}
|
|
8894
|
+
}
|
|
8895
|
+
updateEffect() {
|
|
8896
|
+
const name = "__$outline";
|
|
8897
|
+
let effect = this.parent.getNode(name);
|
|
8898
|
+
if (this.width) {
|
|
8899
|
+
if (!effect) {
|
|
8900
|
+
effect = new OutlineEffect({ name });
|
|
8901
|
+
this.parent.appendChild(effect, "back");
|
|
8902
|
+
}
|
|
8903
|
+
effect.setProperties(this.getProperties());
|
|
8904
|
+
} else {
|
|
8905
|
+
if (effect) {
|
|
8906
|
+
this.parent.removeChild(effect);
|
|
8907
|
+
}
|
|
8908
|
+
}
|
|
8909
|
+
}
|
|
8910
|
+
}
|
|
8911
|
+
__decorateClass$p([
|
|
8912
|
+
property({ default: "#000000" })
|
|
8913
|
+
], BaseElement2DOutline.prototype, "color");
|
|
8914
|
+
__decorateClass$p([
|
|
8915
|
+
property({ default: 0 })
|
|
8916
|
+
], BaseElement2DOutline.prototype, "width");
|
|
8917
|
+
__decorateClass$p([
|
|
8918
|
+
property({ default: "solid" })
|
|
8919
|
+
], BaseElement2DOutline.prototype, "style");
|
|
8920
|
+
__decorateClass$p([
|
|
8921
|
+
property()
|
|
8922
|
+
], BaseElement2DOutline.prototype, "image");
|
|
8923
|
+
__decorateClass$p([
|
|
8924
|
+
property({ default: 1 })
|
|
8925
|
+
], BaseElement2DOutline.prototype, "opacity");
|
|
8926
|
+
|
|
8927
|
+
var __defProp$h = Object.defineProperty;
|
|
8928
|
+
var __decorateClass$o = (decorators, target, key, kind) => {
|
|
8929
|
+
var result = void 0 ;
|
|
8930
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
8931
|
+
if (decorator = decorators[i])
|
|
8932
|
+
result = (decorator(target, key, result) ) || result;
|
|
8933
|
+
if (result) __defProp$h(target, key, result);
|
|
8934
|
+
return result;
|
|
8935
|
+
};
|
|
8936
|
+
class BaseElement2DShadow extends CoreObject {
|
|
8937
|
+
constructor(parent) {
|
|
8938
|
+
super();
|
|
8939
|
+
this.parent = parent;
|
|
8940
|
+
}
|
|
8941
|
+
_updateProperty(key, value, oldValue, declaration) {
|
|
8942
|
+
super._updateProperty(key, value, oldValue, declaration);
|
|
8943
|
+
switch (key) {
|
|
8944
|
+
case "color":
|
|
8945
|
+
case "blur":
|
|
8946
|
+
case "offsetX":
|
|
8947
|
+
case "offsetY":
|
|
8948
|
+
this.updateEffect();
|
|
8949
|
+
break;
|
|
8950
|
+
}
|
|
8951
|
+
}
|
|
8952
|
+
updateEffect() {
|
|
8953
|
+
const name = "__$shadow";
|
|
8954
|
+
let effect = this.parent.getNode(name);
|
|
8955
|
+
if (this.blur || this.offsetX || this.offsetY) {
|
|
8956
|
+
if (!effect) {
|
|
8957
|
+
effect = new DropShadowEffect({ name });
|
|
8958
|
+
this.parent.appendChild(effect, "back");
|
|
8959
|
+
}
|
|
8960
|
+
effect.setProperties(this.getProperties());
|
|
8961
|
+
} else {
|
|
8962
|
+
if (effect) {
|
|
8963
|
+
this.parent.removeChild(effect);
|
|
8964
|
+
}
|
|
8965
|
+
}
|
|
8966
|
+
}
|
|
8967
|
+
}
|
|
8968
|
+
__decorateClass$o([
|
|
8969
|
+
property({ default: "#000000" })
|
|
8970
|
+
], BaseElement2DShadow.prototype, "color");
|
|
8971
|
+
__decorateClass$o([
|
|
8972
|
+
property({ default: 0 })
|
|
8973
|
+
], BaseElement2DShadow.prototype, "blur");
|
|
8974
|
+
__decorateClass$o([
|
|
8975
|
+
property({ default: 0 })
|
|
8976
|
+
], BaseElement2DShadow.prototype, "offsetY");
|
|
8977
|
+
__decorateClass$o([
|
|
8978
|
+
property({ default: 0 })
|
|
8979
|
+
], BaseElement2DShadow.prototype, "offsetX");
|
|
8980
|
+
|
|
8882
8981
|
class BaseElement2DStyle extends Resource {
|
|
8883
8982
|
_backgroundColor = new Color();
|
|
8884
8983
|
constructor(properties) {
|
|
@@ -9020,6 +9119,8 @@ let BaseElement2D = class extends Node2D {
|
|
|
9020
9119
|
this._style?.off("updateProperty", cb);
|
|
9021
9120
|
this._style = style;
|
|
9022
9121
|
}
|
|
9122
|
+
shadow = new BaseElement2DShadow(this);
|
|
9123
|
+
outline = new BaseElement2DOutline(this);
|
|
9023
9124
|
constructor(properties, nodes = []) {
|
|
9024
9125
|
super();
|
|
9025
9126
|
this._updateStyleProperty = this._updateStyleProperty.bind(this);
|
|
@@ -9028,8 +9129,10 @@ let BaseElement2D = class extends Node2D {
|
|
|
9028
9129
|
}
|
|
9029
9130
|
setProperties(properties) {
|
|
9030
9131
|
if (properties) {
|
|
9031
|
-
const { style, ...restProperties } = properties;
|
|
9132
|
+
const { style, shadow, outline, ...restProperties } = properties;
|
|
9032
9133
|
style && this.style.setProperties(style);
|
|
9134
|
+
shadow && this.shadow.setProperties(shadow);
|
|
9135
|
+
outline && this.outline.setProperties(outline);
|
|
9033
9136
|
super.setProperties(restProperties);
|
|
9034
9137
|
}
|
|
9035
9138
|
return this;
|
|
@@ -9086,9 +9189,6 @@ let BaseElement2D = class extends Node2D {
|
|
|
9086
9189
|
case "filter":
|
|
9087
9190
|
this.requestRepaint();
|
|
9088
9191
|
break;
|
|
9089
|
-
case "boxShadow":
|
|
9090
|
-
this._updateBoxShadow();
|
|
9091
|
-
break;
|
|
9092
9192
|
case "maskImage":
|
|
9093
9193
|
this._updateMaskImage();
|
|
9094
9194
|
break;
|
|
@@ -9097,20 +9197,6 @@ let BaseElement2D = class extends Node2D {
|
|
|
9097
9197
|
break;
|
|
9098
9198
|
}
|
|
9099
9199
|
}
|
|
9100
|
-
_updateBoxShadow() {
|
|
9101
|
-
const nodePath = "__$style.shadow";
|
|
9102
|
-
if (this.style.boxShadow !== "none") {
|
|
9103
|
-
const node = this.getNode(nodePath);
|
|
9104
|
-
if (node) ; else {
|
|
9105
|
-
this.appendChild(new DropShadowEffect({ name: nodePath }), "back");
|
|
9106
|
-
}
|
|
9107
|
-
} else {
|
|
9108
|
-
const node = this.getNode(nodePath);
|
|
9109
|
-
if (node) {
|
|
9110
|
-
this.removeChild(node);
|
|
9111
|
-
}
|
|
9112
|
-
}
|
|
9113
|
-
}
|
|
9114
9200
|
_updateMaskImage() {
|
|
9115
9201
|
const nodePath = "__$style.maskImage";
|
|
9116
9202
|
const maskImage = this.style.maskImage;
|
|
@@ -9313,6 +9399,8 @@ let BaseElement2D = class extends Node2D {
|
|
|
9313
9399
|
...json,
|
|
9314
9400
|
props: {
|
|
9315
9401
|
style: this.style.toJSON(),
|
|
9402
|
+
shadow: this.shadow.toJSON(),
|
|
9403
|
+
outline: this.outline.toJSON(),
|
|
9316
9404
|
...json.props
|
|
9317
9405
|
}
|
|
9318
9406
|
};
|
|
@@ -13531,4 +13619,4 @@ async function render(options) {
|
|
|
13531
13619
|
});
|
|
13532
13620
|
}
|
|
13533
13621
|
|
|
13534
|
-
export { AnimatedTexture, Animation, Assets, Audio, AudioPipeline, AudioProcessor, AudioSpectrum, AudioWaveform, BaseElement2D, BaseElement2DStyle,
|
|
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 };
|