@esotericsoftware/spine-canvas 4.2.2 → 4.2.3
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.
|
@@ -52,7 +52,6 @@ var spine = (() => {
|
|
|
52
52
|
IkConstraintTimeline: () => IkConstraintTimeline,
|
|
53
53
|
IntSet: () => IntSet,
|
|
54
54
|
Interpolation: () => Interpolation,
|
|
55
|
-
JitterEffect: () => JitterEffect,
|
|
56
55
|
MathUtils: () => MathUtils,
|
|
57
56
|
MeshAttachment: () => MeshAttachment,
|
|
58
57
|
MixBlend: () => MixBlend,
|
|
@@ -97,7 +96,6 @@ var spine = (() => {
|
|
|
97
96
|
SlotData: () => SlotData,
|
|
98
97
|
SpacingMode: () => SpacingMode,
|
|
99
98
|
StringSet: () => StringSet,
|
|
100
|
-
SwirlEffect: () => SwirlEffect,
|
|
101
99
|
Texture: () => Texture,
|
|
102
100
|
TextureAtlas: () => TextureAtlas,
|
|
103
101
|
TextureAtlasPage: () => TextureAtlasPage,
|
|
@@ -9180,58 +9178,6 @@ var spine = (() => {
|
|
|
9180
9178
|
}
|
|
9181
9179
|
})();
|
|
9182
9180
|
|
|
9183
|
-
// spine-core/src/vertexeffects/JitterEffect.ts
|
|
9184
|
-
var JitterEffect = class {
|
|
9185
|
-
constructor(jitterX, jitterY) {
|
|
9186
|
-
this.jitterX = 0;
|
|
9187
|
-
this.jitterY = 0;
|
|
9188
|
-
this.jitterX = jitterX;
|
|
9189
|
-
this.jitterY = jitterY;
|
|
9190
|
-
}
|
|
9191
|
-
begin(skeleton) {
|
|
9192
|
-
}
|
|
9193
|
-
transform(position, uv, light, dark) {
|
|
9194
|
-
position.x += MathUtils.randomTriangular(-this.jitterX, this.jitterY);
|
|
9195
|
-
position.y += MathUtils.randomTriangular(-this.jitterX, this.jitterY);
|
|
9196
|
-
}
|
|
9197
|
-
end() {
|
|
9198
|
-
}
|
|
9199
|
-
};
|
|
9200
|
-
|
|
9201
|
-
// spine-core/src/vertexeffects/SwirlEffect.ts
|
|
9202
|
-
var _SwirlEffect = class {
|
|
9203
|
-
constructor(radius) {
|
|
9204
|
-
this.centerX = 0;
|
|
9205
|
-
this.centerY = 0;
|
|
9206
|
-
this.radius = 0;
|
|
9207
|
-
this.angle = 0;
|
|
9208
|
-
this.worldX = 0;
|
|
9209
|
-
this.worldY = 0;
|
|
9210
|
-
this.radius = radius;
|
|
9211
|
-
}
|
|
9212
|
-
begin(skeleton) {
|
|
9213
|
-
this.worldX = skeleton.x + this.centerX;
|
|
9214
|
-
this.worldY = skeleton.y + this.centerY;
|
|
9215
|
-
}
|
|
9216
|
-
transform(position, uv, light, dark) {
|
|
9217
|
-
let radAngle = this.angle * MathUtils.degreesToRadians;
|
|
9218
|
-
let x = position.x - this.worldX;
|
|
9219
|
-
let y = position.y - this.worldY;
|
|
9220
|
-
let dist = Math.sqrt(x * x + y * y);
|
|
9221
|
-
if (dist < this.radius) {
|
|
9222
|
-
let theta = _SwirlEffect.interpolation.apply(0, radAngle, (this.radius - dist) / this.radius);
|
|
9223
|
-
let cos = Math.cos(theta);
|
|
9224
|
-
let sin = Math.sin(theta);
|
|
9225
|
-
position.x = cos * x - sin * y + this.worldX;
|
|
9226
|
-
position.y = sin * x + cos * y + this.worldY;
|
|
9227
|
-
}
|
|
9228
|
-
}
|
|
9229
|
-
end() {
|
|
9230
|
-
}
|
|
9231
|
-
};
|
|
9232
|
-
var SwirlEffect = _SwirlEffect;
|
|
9233
|
-
SwirlEffect.interpolation = new PowOut(2);
|
|
9234
|
-
|
|
9235
9181
|
// spine-canvas/src/CanvasTexture.ts
|
|
9236
9182
|
var CanvasTexture = class extends Texture {
|
|
9237
9183
|
constructor(image) {
|