@visactor/vrender 1.0.12 → 1.0.13

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.es.js CHANGED
@@ -4609,6 +4609,34 @@ class GradientParser {
4609
4609
  }
4610
4610
  return c;
4611
4611
  }
4612
+ static processColorStops(colorStops) {
4613
+ if (!colorStops || 0 === colorStops.length) return [];
4614
+ if (colorStops.some(item => item.length)) {
4615
+ const stops = colorStops.map(item => ({
4616
+ color: item.value,
4617
+ offset: item.length ? parseFloat(item.length.value) / 100 : -1
4618
+ }));
4619
+ stops[0].offset < 0 && (stops[0].offset = 0), stops[stops.length - 1].offset < 0 && (stops[stops.length - 1].offset = 1);
4620
+ for (let i = 1; i < stops.length - 1; i++) if (stops[i].offset < 0) {
4621
+ const prevWithOffsetIdx = i - 1;
4622
+ let nextWithOffsetIdx = i + 1;
4623
+ for (; nextWithOffsetIdx < stops.length && stops[nextWithOffsetIdx].offset < 0;) nextWithOffsetIdx++;
4624
+ const startOffset = stops[prevWithOffsetIdx].offset,
4625
+ endOffset = stops[nextWithOffsetIdx].offset,
4626
+ unspecCount = nextWithOffsetIdx - prevWithOffsetIdx;
4627
+ for (let j = 1; j < unspecCount; j++) stops[prevWithOffsetIdx + j].offset = startOffset + (endOffset - startOffset) * j / unspecCount;
4628
+ i = nextWithOffsetIdx - 1;
4629
+ }
4630
+ return stops;
4631
+ }
4632
+ return colorStops.map((item, index) => {
4633
+ const offset = colorStops.length > 1 ? index / (colorStops.length - 1) : 0;
4634
+ return {
4635
+ color: item.value,
4636
+ offset: offset
4637
+ };
4638
+ });
4639
+ }
4612
4640
  static ParseConic(datum) {
4613
4641
  const {
4614
4642
  orientation: orientation,
@@ -4622,10 +4650,7 @@ class GradientParser {
4622
4650
  y: .5,
4623
4651
  startAngle: sa,
4624
4652
  endAngle: sa + pi2,
4625
- stops: colorStops.map(item => ({
4626
- color: item.value,
4627
- offset: parseFloat(item.length.value) / 100
4628
- }))
4653
+ stops: GradientParser.processColorStops(colorStops)
4629
4654
  };
4630
4655
  }
4631
4656
  static ParseRadial(datum) {
@@ -4640,10 +4665,7 @@ class GradientParser {
4640
4665
  y1: .5,
4641
4666
  r0: 0,
4642
4667
  r1: 1,
4643
- stops: colorStops.map(item => ({
4644
- color: item.value,
4645
- offset: parseFloat(item.length.value) / 100
4646
- }))
4668
+ stops: GradientParser.processColorStops(colorStops)
4647
4669
  };
4648
4670
  }
4649
4671
  static ParseLinear(datum) {
@@ -4665,10 +4687,7 @@ class GradientParser {
4665
4687
  y0: y0,
4666
4688
  x1: x1,
4667
4689
  y1: y1,
4668
- stops: colorStops.map(item => ({
4669
- color: item.value,
4670
- offset: parseFloat(item.length.value) / 100
4671
- }))
4690
+ stops: GradientParser.processColorStops(colorStops)
4672
4691
  };
4673
4692
  }
4674
4693
  }
@@ -12397,7 +12416,7 @@ class RichText extends Graphic {
12397
12416
  case "right":
12398
12417
  deltaX = -aabbBounds.width();
12399
12418
  }
12400
- return aabbBounds.translate(deltaX, deltaY), application.graphicService.updateTempAABBBounds(aabbBounds), null == attribute.forceBoundsHeight && null == attribute.forceBoundsWidth || application.graphicService.updateHTMLTextAABBBounds(attribute, richtextTheme, aabbBounds), this.widthWithoutTransform = aabbBounds.x2 - aabbBounds.x1, this.heightWithoutTransform = aabbBounds.y2 - aabbBounds.y1, application.graphicService.transformAABBBounds(attribute, aabbBounds, richtextTheme, !1, this), 0 === aabbBounds.width() && 0 === aabbBounds.height() && aabbBounds.clear(), aabbBounds;
12419
+ return height || ("middle" === this.verticalDirection ? deltaY -= aabbBounds.height() / 2 : "bottom" === this.verticalDirection && (deltaY -= aabbBounds.height())), aabbBounds.translate(deltaX, deltaY), application.graphicService.updateTempAABBBounds(aabbBounds), null == attribute.forceBoundsHeight && null == attribute.forceBoundsWidth || application.graphicService.updateHTMLTextAABBBounds(attribute, richtextTheme, aabbBounds), this.widthWithoutTransform = aabbBounds.x2 - aabbBounds.x1, this.heightWithoutTransform = aabbBounds.y2 - aabbBounds.y1, application.graphicService.transformAABBBounds(attribute, aabbBounds, richtextTheme, !1, this), 0 === aabbBounds.width() && 0 === aabbBounds.height() && aabbBounds.clear(), aabbBounds;
12401
12420
  }
12402
12421
  needUpdateTags(keys) {
12403
12422
  return super.needUpdateTags(keys, RICHTEXT_UPDATE_TAG_KEY);
@@ -19161,6 +19180,7 @@ class RichTextEditPlugin {
19161
19180
  }));
19162
19181
  }
19163
19182
  tryShowInputBounds() {
19183
+ var _a, _b;
19164
19184
  if (!this.currRt || !this.focusing) return;
19165
19185
  const {
19166
19186
  editOptions = {}
@@ -19176,6 +19196,8 @@ class RichTextEditPlugin {
19176
19196
  this.shadowBounds = this.shadowBounds || createRect({}), this.shadowBounds.setAttributes({
19177
19197
  x: 0,
19178
19198
  y: 0,
19199
+ scaleX: 1 / (null !== (_a = this.currRt.attribute.scaleX) && void 0 !== _a ? _a : 1),
19200
+ scaleY: 1 / (null !== (_b = this.currRt.attribute.scaleY) && void 0 !== _b ? _b : 1),
19179
19201
  width: width,
19180
19202
  height: height,
19181
19203
  fill: !1,
@@ -19277,7 +19299,9 @@ class RichTextEditPlugin {
19277
19299
  y2 = getRichTextBounds(Object.assign(Object.assign({}, target.attribute), {
19278
19300
  textConfig: [{
19279
19301
  text: "a"
19280
- }]
19302
+ }],
19303
+ scaleX: 1,
19304
+ scaleY: 1
19281
19305
  })).height();
19282
19306
  this.startCursorPos = {
19283
19307
  x: x,
@@ -19313,7 +19337,10 @@ class RichTextEditPlugin {
19313
19337
  textConfig: [{
19314
19338
  text: "a"
19315
19339
  }]
19316
- })), b = getRichTextBounds(attr)), "middle" === textBaseline ? dy = -b.height() / 2 : "bottom" === textBaseline && (dy = -b.height()), this.editLine && this.editLine.setAttributes({
19340
+ })), b = getRichTextBounds(Object.assign(Object.assign({}, attr), {
19341
+ scaleX: 1,
19342
+ scaleY: 1
19343
+ }))), "middle" === textBaseline ? dy = -b.height() / 2 : "bottom" === textBaseline && (dy = -b.height()), this.editLine && this.editLine.setAttributes({
19317
19344
  dy: dy
19318
19345
  }), this.editBg && this.editBg.setAttributes({
19319
19346
  dy: dy
@@ -19510,9 +19537,15 @@ class RichTextEditPlugin {
19510
19537
  } = rt.attribute;
19511
19538
  let dy = 0;
19512
19539
  if ("middle" === textBaseline) {
19513
- dy = getRichTextBounds(rt.attribute).height() / 2;
19540
+ dy = getRichTextBounds(Object.assign(Object.assign({}, rt.attribute), {
19541
+ scaleX: 1,
19542
+ scaleY: 1
19543
+ })).height() / 2;
19514
19544
  } else if ("bottom" === textBaseline) {
19515
- dy = getRichTextBounds(rt.attribute).height();
19545
+ dy = getRichTextBounds(Object.assign(Object.assign({}, rt.attribute), {
19546
+ scaleX: 1,
19547
+ scaleY: 1
19548
+ })).height();
19516
19549
  }
19517
19550
  return p1.y += dy, p1;
19518
19551
  }
@@ -30497,8 +30530,6 @@ class WaitStep extends Step {
30497
30530
  }
30498
30531
  onStart() {
30499
30532
  super.onStart();
30500
- }
30501
- onFirstRun() {
30502
30533
  const fromProps = this.getFromProps();
30503
30534
  this.target.setAttributes(fromProps);
30504
30535
  }
@@ -35143,11 +35174,1280 @@ class StreamLight extends ACustomAnimate {
35143
35174
  }
35144
35175
  }
35145
35176
 
35177
+ class DisappearAnimateBase extends AStageAnimate {
35178
+ constructor(from, to, duration, easing, params) {
35179
+ super(from, to, duration, easing, params), this.webglCanvas = null, this.gl = null, this.program = null, this.currentAnimationRatio = 0, this.animationTime = 0;
35180
+ }
35181
+ onUpdate(end, ratio, out) {
35182
+ super.onUpdate(end, ratio, out), this.currentAnimationRatio = ratio, this.animationTime = ratio * Math.PI * 2;
35183
+ }
35184
+ getAnimationTime() {
35185
+ return this.currentAnimationRatio > 0 ? this.animationTime : Date.now() / 1e3;
35186
+ }
35187
+ getDurationFromParent() {
35188
+ return this.duration || 1e3;
35189
+ }
35190
+ initWebGL(canvas) {
35191
+ try {
35192
+ if (this.webglCanvas = vglobal.createCanvas({
35193
+ width: canvas.width,
35194
+ height: canvas.height,
35195
+ dpr: vglobal.devicePixelRatio
35196
+ }), !this.webglCanvas) return console.warn("WebGL canvas creation failed"), !1;
35197
+ this.webglCanvas.style.width = canvas.style.width || `${canvas.width}px`, this.webglCanvas.style.height = canvas.style.height || `${canvas.height}px`;
35198
+ let glContext = null;
35199
+ try {
35200
+ glContext = this.webglCanvas.getContext("webgl"), glContext || (glContext = this.webglCanvas.getContext("experimental-webgl"));
35201
+ } catch (e) {
35202
+ console.warn("Failed to get WebGL context:", e);
35203
+ }
35204
+ if (this.gl = glContext, !this.gl) return console.warn("WebGL not supported"), !1;
35205
+ const shaders = this.getShaderSources();
35206
+ return this.program = this.createShaderProgram(shaders.vertex, shaders.fragment), null !== this.program;
35207
+ } catch (error) {
35208
+ return console.warn("Failed to initialize WebGL:", error), !1;
35209
+ }
35210
+ }
35211
+ createShaderProgram(vertexSource, fragmentSource) {
35212
+ if (!this.gl) return null;
35213
+ const vertexShader = this.createShader(this.gl.VERTEX_SHADER, vertexSource),
35214
+ fragmentShader = this.createShader(this.gl.FRAGMENT_SHADER, fragmentSource);
35215
+ if (!vertexShader || !fragmentShader) return null;
35216
+ const program = this.gl.createProgram();
35217
+ return program ? (this.gl.attachShader(program, vertexShader), this.gl.attachShader(program, fragmentShader), this.gl.linkProgram(program), this.gl.getProgramParameter(program, this.gl.LINK_STATUS) ? program : (console.error("Shader program link error:", this.gl.getProgramInfoLog(program)), null)) : null;
35218
+ }
35219
+ createShader(type, source) {
35220
+ if (!this.gl) return null;
35221
+ const shader = this.gl.createShader(type);
35222
+ return shader ? (this.gl.shaderSource(shader, source), this.gl.compileShader(shader), this.gl.getShaderParameter(shader, this.gl.COMPILE_STATUS) ? shader : (console.error("Shader compile error:", this.gl.getShaderInfoLog(shader)), this.gl.deleteShader(shader), null)) : null;
35223
+ }
35224
+ setupWebGLState(canvas) {
35225
+ this.gl && this.webglCanvas && (this.webglCanvas.width === canvas.width && this.webglCanvas.height === canvas.height || (this.webglCanvas.width = canvas.width, this.webglCanvas.height = canvas.height), this.gl.viewport(0, 0, this.webglCanvas.width, this.webglCanvas.height), this.gl.clearColor(0, 0, 0, 0), this.gl.clear(this.gl.COLOR_BUFFER_BIT));
35226
+ }
35227
+ createFullScreenQuad() {
35228
+ if (!this.gl) return null;
35229
+ const vertices = new Float32Array([-1, -1, 0, 1, 1, -1, 1, 1, -1, 1, 0, 0, 1, 1, 1, 0]),
35230
+ vertexBuffer = this.gl.createBuffer();
35231
+ return this.gl.bindBuffer(this.gl.ARRAY_BUFFER, vertexBuffer), this.gl.bufferData(this.gl.ARRAY_BUFFER, vertices, this.gl.STATIC_DRAW), vertexBuffer;
35232
+ }
35233
+ createTextureFromCanvas(canvas) {
35234
+ if (!this.gl) return null;
35235
+ const texture = this.gl.createTexture();
35236
+ return this.gl.activeTexture(this.gl.TEXTURE0), this.gl.bindTexture(this.gl.TEXTURE_2D, texture), this.gl.texImage2D(this.gl.TEXTURE_2D, 0, this.gl.RGBA, this.gl.RGBA, this.gl.UNSIGNED_BYTE, canvas), this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_WRAP_S, this.gl.CLAMP_TO_EDGE), this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_WRAP_T, this.gl.CLAMP_TO_EDGE), this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_MIN_FILTER, this.gl.LINEAR), this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_MAG_FILTER, this.gl.LINEAR), texture;
35237
+ }
35238
+ setupVertexAttributes() {
35239
+ if (!this.gl || !this.program) return;
35240
+ const positionLocation = this.gl.getAttribLocation(this.program, "a_position"),
35241
+ texCoordLocation = this.gl.getAttribLocation(this.program, "a_texCoord");
35242
+ this.gl.enableVertexAttribArray(positionLocation), this.gl.vertexAttribPointer(positionLocation, 2, this.gl.FLOAT, !1, 16, 0), this.gl.enableVertexAttribArray(texCoordLocation), this.gl.vertexAttribPointer(texCoordLocation, 2, this.gl.FLOAT, !1, 16, 8);
35243
+ }
35244
+ createOutputCanvas(canvas) {
35245
+ const outputCanvas = vglobal.createCanvas({
35246
+ width: canvas.width,
35247
+ height: canvas.height,
35248
+ dpr: vglobal.devicePixelRatio
35249
+ }),
35250
+ ctx = outputCanvas.getContext("2d");
35251
+ return ctx ? (ctx.clearRect(0, 0, canvas.width, canvas.height), ctx.drawImage(canvas, 0, 0), {
35252
+ canvas: outputCanvas,
35253
+ ctx: ctx
35254
+ }) : null;
35255
+ }
35256
+ getShaderSources() {
35257
+ return null;
35258
+ }
35259
+ applyWebGLEffect(canvas) {
35260
+ return null;
35261
+ }
35262
+ applyCanvas2DEffect(canvas) {
35263
+ return null;
35264
+ }
35265
+ supportsWebGL() {
35266
+ return null !== this.getShaderSources();
35267
+ }
35268
+ supportsCanvas2D() {
35269
+ return this.applyCanvas2DEffect !== DisappearAnimateBase.prototype.applyCanvas2DEffect;
35270
+ }
35271
+ release() {
35272
+ super.release(), this.gl && (this.program && (this.gl.deleteProgram(this.program), this.program = null), this.gl = null), this.webglCanvas && (this.webglCanvas = null), this.currentAnimationRatio = 0, this.animationTime = 0;
35273
+ }
35274
+ afterStageRender(stage, canvas) {
35275
+ let result = null;
35276
+ if (this.supportsWebGL() && (this.gl || this.initWebGL(canvas) || console.warn("WebGL初始化失败,尝试Canvas 2D回退"), this.gl)) {
35277
+ if (result = this.applyWebGLEffect(canvas), result) return result;
35278
+ console.warn("WebGL特效执行失败,尝试Canvas 2D回退");
35279
+ }
35280
+ if (this.supportsCanvas2D()) {
35281
+ if (result = this.applyCanvas2DEffect(canvas), result) return result;
35282
+ console.warn("Canvas 2D特效执行失败");
35283
+ }
35284
+ return this.supportsWebGL() || this.supportsCanvas2D() || console.error(`特效类 ${this.constructor.name} 未实现任何渲染方法。请实现 applyWebGLEffect 或 applyCanvas2DEffect 方法。`), canvas;
35285
+ }
35286
+ }
35287
+
35288
+ class Canvas2DEffectBase extends DisappearAnimateBase {
35289
+ constructor(from, to, duration, easing, params) {
35290
+ super(from, to, duration, easing, params);
35291
+ }
35292
+ getShaderSources() {
35293
+ return null;
35294
+ }
35295
+ applyWebGLEffect(canvas) {
35296
+ return null;
35297
+ }
35298
+ }
35299
+ class HybridEffectBase extends DisappearAnimateBase {
35300
+ constructor(from, to, duration, easing, params) {
35301
+ super(from, to, duration, easing, params);
35302
+ }
35303
+ getShaderSources() {
35304
+ return null;
35305
+ }
35306
+ applyWebGLEffect(canvas) {
35307
+ return null;
35308
+ }
35309
+ applyCanvas2DEffect(canvas) {
35310
+ return null;
35311
+ }
35312
+ supportsWebGL() {
35313
+ return this.getShaderSources !== HybridEffectBase.prototype.getShaderSources && null !== this.getShaderSources();
35314
+ }
35315
+ supportsCanvas2D() {
35316
+ return this.applyCanvas2DEffect !== HybridEffectBase.prototype.applyCanvas2DEffect;
35317
+ }
35318
+ afterStageRender(stage, canvas) {
35319
+ var _a, _b;
35320
+ let result = null;
35321
+ if (!1 !== (null === (_b = null === (_a = this.params) || void 0 === _a ? void 0 : _a.options) || void 0 === _b ? void 0 : _b.useWebGL)) {
35322
+ if (this.supportsWebGL() && (this.gl || this.initWebGL(canvas) || console.warn("WebGL初始化失败,尝试Canvas 2D回退"), this.gl)) {
35323
+ if (result = this.applyWebGLEffect(canvas), result) return result;
35324
+ console.warn("WebGL特效执行失败,尝试Canvas 2D回退");
35325
+ }
35326
+ if (this.supportsCanvas2D()) {
35327
+ if (result = this.applyCanvas2DEffect(canvas), result) return result;
35328
+ console.warn("Canvas 2D特效执行失败");
35329
+ }
35330
+ } else if (this.supportsCanvas2D()) {
35331
+ if (result = this.applyCanvas2DEffect(canvas), result) return result;
35332
+ console.warn("Canvas 2D特效执行失败");
35333
+ } else console.warn(`${this.constructor.name}: useWebGL=false 但未实现Canvas 2D方法`);
35334
+ return this.supportsWebGL() || this.supportsCanvas2D() || console.error(`特效类 ${this.constructor.name} 未实现任何渲染方法。请实现 applyWebGLEffect 或 applyCanvas2DEffect 方法。`), canvas;
35335
+ }
35336
+ }
35337
+
35338
+ class ImageProcessUtils {
35339
+ static createTempCanvas(width, height, dpr) {
35340
+ return vglobal.createCanvas({
35341
+ width: width,
35342
+ height: height,
35343
+ dpr: dpr || vglobal.devicePixelRatio
35344
+ });
35345
+ }
35346
+ static cloneImageData(imageData) {
35347
+ const clonedData = new Uint8ClampedArray(imageData.data);
35348
+ return new ImageData(clonedData, imageData.width, imageData.height);
35349
+ }
35350
+ static lerp(start, end, t) {
35351
+ return start * (1 - t) + end * t;
35352
+ }
35353
+ static smoothstep(edge0, edge1, x) {
35354
+ const t = Math.max(0, Math.min(1, (x - edge0) / (edge1 - edge0)));
35355
+ return t * t * (3 - 2 * t);
35356
+ }
35357
+ static distance(x1, y1, x2, y2) {
35358
+ const dx = x2 - x1,
35359
+ dy = y2 - y1;
35360
+ return Math.sqrt(dx * dx + dy * dy);
35361
+ }
35362
+ static normalizeAngle(angle) {
35363
+ return (angle + Math.PI) / (2 * Math.PI);
35364
+ }
35365
+ static pixelNoise(x, y, pixelSize) {
35366
+ if (pixelSize <= 0) return 0;
35367
+ const gridX = Math.floor(x / pixelSize) * pixelSize,
35368
+ gridY = Math.floor(y / pixelSize) * pixelSize,
35369
+ n = 43758.5453 * Math.sin(12.9898 * gridX + 78.233 * gridY);
35370
+ return n - Math.floor(n);
35371
+ }
35372
+ static generateNoiseTexture(width, height) {
35373
+ const data = new Uint8Array(width * height);
35374
+ for (let i = 0; i < data.length; i++) data[i] = Math.floor(256 * Math.random());
35375
+ return data;
35376
+ }
35377
+ static applyCSSFilter(canvas, filter) {
35378
+ const outputCanvas = this.createTempCanvas(canvas.width, canvas.height),
35379
+ ctx = outputCanvas.getContext("2d");
35380
+ return ctx ? (ctx.filter = filter, ctx.drawImage(canvas, 0, 0), ctx.filter = "none", outputCanvas) : canvas;
35381
+ }
35382
+ static extractChannel(imageData, channelIndex) {
35383
+ const {
35384
+ data: data,
35385
+ width: width,
35386
+ height: height
35387
+ } = imageData,
35388
+ channelData = new Uint8ClampedArray(data.length);
35389
+ for (let i = 0; i < data.length; i += 4) channelData[i] = 0, channelData[i + 1] = 0, channelData[i + 2] = 0, channelData[i + 3] = data[i + 3], channelIndex >= 0 && channelIndex <= 2 && (channelData[i + channelIndex] = data[i + channelIndex]);
35390
+ return new ImageData(channelData, width, height);
35391
+ }
35392
+ static blendImageData(imageData1, imageData2, ratio) {
35393
+ const {
35394
+ data: data1,
35395
+ width: width,
35396
+ height: height
35397
+ } = imageData1,
35398
+ {
35399
+ data: data2
35400
+ } = imageData2,
35401
+ result = new Uint8ClampedArray(data1.length);
35402
+ for (let i = 0; i < data1.length; i += 4) result[i] = Math.round(this.lerp(data1[i], data2[i], ratio)), result[i + 1] = Math.round(this.lerp(data1[i + 1], data2[i + 1], ratio)), result[i + 2] = Math.round(this.lerp(data1[i + 2], data2[i + 2], ratio)), result[i + 3] = Math.round(this.lerp(data1[i + 3], data2[i + 3], ratio));
35403
+ return new ImageData(result, width, height);
35404
+ }
35405
+ static getLuminance(r, g, b) {
35406
+ return .299 * r + .587 * g + .114 * b;
35407
+ }
35408
+ static applySepiaToPixel(r, g, b) {
35409
+ return [Math.min(255, .393 * r + .769 * g + .189 * b), Math.min(255, .349 * r + .686 * g + .168 * b), Math.min(255, .272 * r + .534 * g + .131 * b)];
35410
+ }
35411
+ static calculateDynamicStrength(baseStrength, animationTime) {
35412
+ return baseStrength * (animationTime / (2 * Math.PI));
35413
+ }
35414
+ }
35415
+ class ShaderLibrary {}
35416
+ ShaderLibrary.STANDARD_VERTEX_SHADER = "\n attribute vec2 a_position;\n attribute vec2 a_texCoord;\n varying vec2 v_texCoord;\n\n void main() {\n gl_Position = vec4(a_position, 0.0, 1.0);\n v_texCoord = a_texCoord;\n }\n ", ShaderLibrary.SHADER_FUNCTIONS = "\n // 亮度计算函数\n float luminance(vec3 color) {\n return dot(color, vec3(0.299, 0.587, 0.114));\n }\n\n // 褐色调函数\n vec3 sepia(vec3 color) {\n float r = color.r * 0.393 + color.g * 0.769 + color.b * 0.189;\n float g = color.r * 0.349 + color.g * 0.686 + color.b * 0.168;\n float b = color.r * 0.272 + color.g * 0.534 + color.b * 0.131;\n return vec3(r, g, b);\n }\n\n // 线性插值函数\n float lerp(float a, float b, float t) {\n return a * (1.0 - t) + b * t;\n }\n\n\n // 简单噪声函数\n float pixelNoise(vec2 coord, float pixelSize) {\n vec2 gridCoord = floor(coord / pixelSize) * pixelSize;\n return fract(sin(dot(gridCoord, vec2(12.9898, 78.233))) * 43758.5453123);\n }\n\n // 动态强度计算\n float calculateDynamicStrength(float baseStrength, float time) {\n return baseStrength * (time / 6.28318531); // 2π\n }\n ";
35417
+
35418
+ class Dissolve extends HybridEffectBase {
35419
+ constructor(from, to, duration, easing, params) {
35420
+ var _a, _b, _c, _d;
35421
+ super(from, to, duration, easing, params), this.noiseData = null;
35422
+ const rawNoiseScale = null === (_a = null == params ? void 0 : params.options) || void 0 === _a ? void 0 : _a.noiseScale,
35423
+ clampedNoiseScale = void 0 !== rawNoiseScale ? Math.max(0, Math.floor(rawNoiseScale)) : 8;
35424
+ this.dissolveConfig = {
35425
+ dissolveType: (null === (_b = null == params ? void 0 : params.options) || void 0 === _b ? void 0 : _b.dissolveType) || "outward",
35426
+ useWebGL: void 0 === (null === (_c = null == params ? void 0 : params.options) || void 0 === _c ? void 0 : _c.useWebGL) || params.options.useWebGL,
35427
+ noiseScale: clampedNoiseScale,
35428
+ fadeEdge: void 0 === (null === (_d = null == params ? void 0 : params.options) || void 0 === _d ? void 0 : _d.fadeEdge) || params.options.fadeEdge
35429
+ };
35430
+ }
35431
+ getShaderSources() {
35432
+ return {
35433
+ vertex: ShaderLibrary.STANDARD_VERTEX_SHADER,
35434
+ fragment: `\n precision mediump float;\n uniform sampler2D u_texture;\n uniform sampler2D u_noiseTexture;\n uniform float u_time;\n uniform int u_dissolveType;\n uniform vec2 u_resolution;\n uniform float u_noiseScale;\n uniform bool u_fadeEdge;\n varying vec2 v_texCoord;\n\n ${ShaderLibrary.SHADER_FUNCTIONS}\n\n // 向外溶解函数\n float outwardDissolve(vec2 uv, float time, float pixelSize, vec2 resolution) {\n vec2 center = vec2(0.5, 0.5);\n float distFromCenter = length(uv - center);\n float maxDist = length(vec2(0.5, 0.5));\n\n // 归一化距离 (0为中心,1为边缘)\n float normalizedDist = distFromCenter / maxDist;\n\n // 向外溶解:从边缘开始溶解,time控制溶解进度\n // 增加安全边距,确保动画结束时完全溶解\n float edgeThreshold = 1.2 - time * 1.5;\n\n // 当pixelSize > 0时添加颗粒效果\n if (pixelSize > 0.0) {\n // 添加基于像素大小的噪声,让边缘呈现颗粒状\n vec2 pixelCoord = uv * resolution; // 转换为像素坐标\n float noiseValue = pixelNoise(pixelCoord, pixelSize);\n float noiseInfluence = (noiseValue - 0.5) * 0.4; // 增强噪声影响\n edgeThreshold += noiseInfluence;\n return normalizedDist > edgeThreshold ? 0.0 : 1.0;\n } else {\n // 平滑溶解:根据fadeEdge决定是否使用渐变\n if (u_fadeEdge) {\n // 柔和边缘:返回渐变值\n float fadeWidth = 0.15; // 渐变宽度\n return 1.0 - smoothstep(edgeThreshold - fadeWidth, edgeThreshold, normalizedDist);\n } else {\n // 硬边缘:返回0或1\n return normalizedDist > edgeThreshold ? 0.0 : 1.0;\n }\n }\n }\n\n // 向内溶解函数\n float inwardDissolve(vec2 uv, float time, float pixelSize, vec2 resolution) {\n vec2 center = vec2(0.5, 0.5);\n float distFromCenter = length(uv - center);\n float maxDist = length(vec2(0.5, 0.5));\n\n float normalizedDist = distFromCenter / maxDist;\n\n // 向内溶解:从中心开始溶解,time控制溶解进度\n // 增加系数,确保动画结束时完全溶解\n float centerThreshold = time * 1.4;\n\n // 当pixelSize > 0时添加颗粒效果\n if (pixelSize > 0.0) {\n vec2 pixelCoord = uv * resolution;\n float noiseValue = pixelNoise(pixelCoord, pixelSize);\n float noiseInfluence = (noiseValue - 0.5) * 0.4;\n centerThreshold += noiseInfluence;\n return normalizedDist < centerThreshold ? 0.0 : 1.0;\n } else {\n // 平滑溶解:根据fadeEdge决定是否使用渐变\n if (u_fadeEdge) {\n // 柔和边缘:返回渐变值\n float fadeWidth = 0.15; // 渐变宽度\n return smoothstep(centerThreshold, centerThreshold + fadeWidth, normalizedDist);\n } else {\n // 硬边缘:返回0或1\n return normalizedDist < centerThreshold ? 0.0 : 1.0;\n }\n }\n }\n\n // 径向溶解函数\n float radialDissolve(vec2 uv, float time, float pixelSize, vec2 resolution) {\n vec2 center = vec2(0.5, 0.5);\n float angle = atan(uv.y - center.y, uv.x - center.x);\n float normalizedAngle = (angle + 3.14159) / (2.0 * 3.14159);\n\n // 径向溶解:按角度顺序溶解,time控制溶解进度\n // 增加系数,确保动画结束时完全溶解\n float angleThreshold = time * 1.2;\n\n // 当pixelSize > 0时添加颗粒效果\n if (pixelSize > 0.0) {\n vec2 pixelCoord = uv * resolution;\n float noiseValue = pixelNoise(pixelCoord, pixelSize);\n float noiseInfluence = (noiseValue - 0.5) * 0.3;\n angleThreshold += noiseInfluence;\n return normalizedAngle < angleThreshold ? 0.0 : 1.0;\n } else {\n // 平滑溶解:根据fadeEdge决定是否使用渐变\n if (u_fadeEdge) {\n // 柔和边缘:返回渐变值\n float fadeWidth = 0.08; // 渐变宽度\n return smoothstep(angleThreshold, angleThreshold + fadeWidth, normalizedAngle);\n } else {\n // 硬边缘:返回0或1\n return normalizedAngle < angleThreshold ? 0.0 : 1.0;\n }\n }\n }\n\n // 从左到右溶解函数\n float leftToRightDissolve(vec2 uv, float time, float pixelSize, vec2 resolution) {\n // 左到右溶解:从x=0开始向x=1溶解\n float dissolvePosition = time * 1.2; // 增加系数确保完全溶解\n\n // 当pixelSize > 0时添加颗粒效果\n if (pixelSize > 0.0) {\n vec2 pixelCoord = uv * resolution;\n float noiseValue = pixelNoise(pixelCoord, pixelSize);\n float noiseInfluence = (noiseValue - 0.5) * 0.3;\n dissolvePosition += noiseInfluence;\n return uv.x < dissolvePosition ? 0.0 : 1.0;\n } else {\n // 平滑溶解:根据fadeEdge决定是否使用渐变\n if (u_fadeEdge) {\n // 柔和边缘:返回渐变值\n float fadeWidth = 0.08; // 渐变宽度\n return smoothstep(dissolvePosition, dissolvePosition + fadeWidth, uv.x);\n } else {\n // 硬边缘:返回0或1\n return uv.x < dissolvePosition ? 0.0 : 1.0;\n }\n }\n }\n\n // 从右到左溶解函数\n float rightToLeftDissolve(vec2 uv, float time, float pixelSize, vec2 resolution) {\n // 右到左溶解:从x=1开始向x=0溶解\n float dissolvePosition = 1.0 - time * 1.2; // 增加系数确保完全溶解\n\n // 当pixelSize > 0时添加颗粒效果\n if (pixelSize > 0.0) {\n vec2 pixelCoord = uv * resolution;\n float noiseValue = pixelNoise(pixelCoord, pixelSize);\n float noiseInfluence = (noiseValue - 0.5) * 0.3;\n dissolvePosition += noiseInfluence;\n return uv.x > dissolvePosition ? 0.0 : 1.0;\n } else {\n // 平滑溶解:根据fadeEdge决定是否使用渐变\n if (u_fadeEdge) {\n // 柔和边缘:返回渐变值\n float fadeWidth = 0.08; // 渐变宽度\n return smoothstep(dissolvePosition - fadeWidth, dissolvePosition, uv.x);\n } else {\n // 硬边缘:返回0或1\n return uv.x > dissolvePosition ? 0.0 : 1.0;\n }\n }\n }\n\n // 从上到下溶解函数\n float topToBottomDissolve(vec2 uv, float time, float pixelSize, vec2 resolution) {\n // 上到下溶解:从y=0开始向y=1溶解\n float dissolvePosition = time * 1.2; // 增加系数确保完全溶解\n\n // 当pixelSize > 0时添加颗粒效果\n if (pixelSize > 0.0) {\n vec2 pixelCoord = uv * resolution;\n float noiseValue = pixelNoise(pixelCoord, pixelSize);\n float noiseInfluence = (noiseValue - 0.5) * 0.3;\n dissolvePosition += noiseInfluence;\n return uv.y < dissolvePosition ? 0.0 : 1.0;\n } else {\n // 平滑溶解:根据fadeEdge决定是否使用渐变\n if (u_fadeEdge) {\n // 柔和边缘:返回渐变值\n float fadeWidth = 0.08; // 渐变宽度\n return smoothstep(dissolvePosition, dissolvePosition + fadeWidth, uv.y);\n } else {\n // 硬边缘:返回0或1\n return uv.y < dissolvePosition ? 0.0 : 1.0;\n }\n }\n }\n\n // 从下到上溶解函数\n float bottomToTopDissolve(vec2 uv, float time, float pixelSize, vec2 resolution) {\n // 下到上溶解:从y=1开始向y=0溶解\n float dissolvePosition = 1.0 - time * 1.2; // 增加系数确保完全溶解\n\n // 当pixelSize > 0时添加颗粒效果\n if (pixelSize > 0.0) {\n vec2 pixelCoord = uv * resolution;\n float noiseValue = pixelNoise(pixelCoord, pixelSize);\n float noiseInfluence = (noiseValue - 0.5) * 0.3;\n dissolvePosition += noiseInfluence;\n return uv.y > dissolvePosition ? 0.0 : 1.0;\n } else {\n // 平滑溶解:根据fadeEdge决定是否使用渐变\n if (u_fadeEdge) {\n // 柔和边缘:返回渐变值\n float fadeWidth = 0.08; // 渐变宽度\n return smoothstep(dissolvePosition - fadeWidth, dissolvePosition, uv.y);\n } else {\n // 硬边缘:返回0或1\n return uv.y > dissolvePosition ? 0.0 : 1.0;\n }\n }\n }\n\n void main() {\n vec2 uv = v_texCoord;\n vec4 texColor = texture2D(u_texture, uv);\n\n float alpha = 1.0;\n\n // 根据溶解类型选择对应的溶解函数\n if (u_dissolveType == 0) {\n alpha = outwardDissolve(uv, u_time, u_noiseScale, u_resolution);\n } else if (u_dissolveType == 1) {\n alpha = inwardDissolve(uv, u_time, u_noiseScale, u_resolution);\n } else if (u_dissolveType == 2) {\n alpha = radialDissolve(uv, u_time, u_noiseScale, u_resolution);\n } else if (u_dissolveType == 3) {\n alpha = leftToRightDissolve(uv, u_time, u_noiseScale, u_resolution);\n } else if (u_dissolveType == 4) {\n alpha = rightToLeftDissolve(uv, u_time, u_noiseScale, u_resolution);\n } else if (u_dissolveType == 5) {\n alpha = topToBottomDissolve(uv, u_time, u_noiseScale, u_resolution);\n } else if (u_dissolveType == 6) {\n alpha = bottomToTopDissolve(uv, u_time, u_noiseScale, u_resolution);\n }\n\n gl_FragColor = vec4(texColor.rgb, texColor.a * alpha);\n }\n `
35435
+ };
35436
+ }
35437
+ applyWebGLEffect(canvas) {
35438
+ if (!this.gl || !this.program || !this.webglCanvas) return canvas;
35439
+ this.setupWebGLState(canvas);
35440
+ const texture = this.createTextureFromCanvas(canvas);
35441
+ if (!texture) return canvas;
35442
+ this.noiseData || (this.noiseData = ImageProcessUtils.generateNoiseTexture(256, 256));
35443
+ const noiseTexture = this.gl.createTexture();
35444
+ this.gl.activeTexture(this.gl.TEXTURE1), this.gl.bindTexture(this.gl.TEXTURE_2D, noiseTexture), this.gl.texImage2D(this.gl.TEXTURE_2D, 0, this.gl.LUMINANCE, 256, 256, 0, this.gl.LUMINANCE, this.gl.UNSIGNED_BYTE, this.noiseData), this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_WRAP_S, this.gl.REPEAT), this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_WRAP_T, this.gl.REPEAT), this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_MIN_FILTER, this.gl.LINEAR), this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_MAG_FILTER, this.gl.LINEAR);
35445
+ const vertexBuffer = this.createFullScreenQuad();
35446
+ return vertexBuffer ? (this.gl.useProgram(this.program), this.setupVertexAttributes(), this.setUniforms(), this.gl.enable(this.gl.BLEND), this.gl.blendFunc(this.gl.SRC_ALPHA, this.gl.ONE_MINUS_SRC_ALPHA), this.gl.drawArrays(this.gl.TRIANGLE_STRIP, 0, 4), this.gl.deleteTexture(texture), this.gl.deleteTexture(noiseTexture), this.gl.deleteBuffer(vertexBuffer), this.webglCanvas) : canvas;
35447
+ }
35448
+ setUniforms() {
35449
+ if (!this.gl || !this.program || !this.webglCanvas) return;
35450
+ const textureLocation = this.gl.getUniformLocation(this.program, "u_texture"),
35451
+ noiseTextureLocation = this.gl.getUniformLocation(this.program, "u_noiseTexture"),
35452
+ timeLocation = this.gl.getUniformLocation(this.program, "u_time"),
35453
+ dissolveTypeLocation = this.gl.getUniformLocation(this.program, "u_dissolveType"),
35454
+ resolutionLocation = this.gl.getUniformLocation(this.program, "u_resolution"),
35455
+ noiseScaleLocation = this.gl.getUniformLocation(this.program, "u_noiseScale"),
35456
+ fadeEdgeLocation = this.gl.getUniformLocation(this.program, "u_fadeEdge");
35457
+ this.gl.uniform1i(textureLocation, 0), this.gl.uniform1i(noiseTextureLocation, 1), this.gl.uniform1f(timeLocation, this.currentAnimationRatio), this.gl.uniform2f(resolutionLocation, this.webglCanvas.width, this.webglCanvas.height), this.gl.uniform1f(noiseScaleLocation, this.dissolveConfig.noiseScale), this.gl.uniform1i(fadeEdgeLocation, this.dissolveConfig.fadeEdge ? 1 : 0);
35458
+ this.gl.uniform1i(dissolveTypeLocation, {
35459
+ outward: 0,
35460
+ inward: 1,
35461
+ radial: 2,
35462
+ leftToRight: 3,
35463
+ rightToLeft: 4,
35464
+ topToBottom: 5,
35465
+ bottomToTop: 6
35466
+ }[this.dissolveConfig.dissolveType] || 0);
35467
+ }
35468
+ applyCanvas2DEffect(canvas) {
35469
+ const outputCanvas = this.createOutputCanvas(canvas);
35470
+ if (!outputCanvas) return canvas;
35471
+ const {
35472
+ canvas: outputCanvasElement,
35473
+ ctx: ctx
35474
+ } = outputCanvas,
35475
+ imageData = ctx.getImageData(0, 0, canvas.width, canvas.height),
35476
+ progress = this.currentAnimationRatio;
35477
+ let dissolvedImageData;
35478
+ switch (this.dissolveConfig.dissolveType) {
35479
+ case "outward":
35480
+ dissolvedImageData = this.applyOutwardDissolve(imageData, progress);
35481
+ break;
35482
+ case "inward":
35483
+ dissolvedImageData = this.applyInwardDissolve(imageData, progress);
35484
+ break;
35485
+ case "radial":
35486
+ dissolvedImageData = this.applyRadialDissolve(imageData, progress);
35487
+ break;
35488
+ case "leftToRight":
35489
+ dissolvedImageData = this.applyLeftToRightDissolve(imageData, progress);
35490
+ break;
35491
+ case "rightToLeft":
35492
+ dissolvedImageData = this.applyRightToLeftDissolve(imageData, progress);
35493
+ break;
35494
+ case "topToBottom":
35495
+ dissolvedImageData = this.applyTopToBottomDissolve(imageData, progress);
35496
+ break;
35497
+ case "bottomToTop":
35498
+ dissolvedImageData = this.applyBottomToTopDissolve(imageData, progress);
35499
+ break;
35500
+ default:
35501
+ dissolvedImageData = imageData;
35502
+ }
35503
+ return ctx.putImageData(dissolvedImageData, 0, 0), outputCanvasElement;
35504
+ }
35505
+ applyOutwardDissolve(imageData, progress) {
35506
+ const {
35507
+ data: data,
35508
+ width: width,
35509
+ height: height
35510
+ } = imageData,
35511
+ result = new Uint8ClampedArray(data.length);
35512
+ result.set(data);
35513
+ const centerX = width / 2,
35514
+ centerY = height / 2,
35515
+ maxDist = Math.sqrt(centerX * centerX + centerY * centerY),
35516
+ pixelSize = this.dissolveConfig.noiseScale;
35517
+ for (let y = 0; y < height; y++) for (let x = 0; x < width; x++) {
35518
+ const dx = x - centerX,
35519
+ dy = y - centerY,
35520
+ normalizedDist = Math.sqrt(dx * dx + dy * dy) / maxDist;
35521
+ let dissolveThreshold = 1.2 - 1.4 * progress,
35522
+ alpha = 1;
35523
+ if (pixelSize > 0) {
35524
+ dissolveThreshold += .4 * (ImageProcessUtils.pixelNoise(x, y, pixelSize) - .5), alpha = normalizedDist > dissolveThreshold ? 0 : 1;
35525
+ } else if (this.dissolveConfig.fadeEdge) {
35526
+ const fadeStart = dissolveThreshold - .15;
35527
+ alpha = normalizedDist < fadeStart ? 1 : normalizedDist > dissolveThreshold ? 0 : 1 - (normalizedDist - fadeStart) / (dissolveThreshold - fadeStart);
35528
+ } else alpha = normalizedDist > dissolveThreshold ? 0 : 1;
35529
+ const index = 4 * (y * width + x);
35530
+ result[index + 3] = Math.floor(result[index + 3] * alpha);
35531
+ }
35532
+ return new ImageData(result, width, height);
35533
+ }
35534
+ applyInwardDissolve(imageData, progress) {
35535
+ const {
35536
+ data: data,
35537
+ width: width,
35538
+ height: height
35539
+ } = imageData,
35540
+ result = new Uint8ClampedArray(data.length);
35541
+ result.set(data);
35542
+ const centerX = width / 2,
35543
+ centerY = height / 2,
35544
+ maxDist = Math.sqrt(centerX * centerX + centerY * centerY),
35545
+ pixelSize = this.dissolveConfig.noiseScale;
35546
+ for (let y = 0; y < height; y++) for (let x = 0; x < width; x++) {
35547
+ const dx = x - centerX,
35548
+ dy = y - centerY,
35549
+ normalizedDist = Math.sqrt(dx * dx + dy * dy) / maxDist;
35550
+ let dissolveThreshold = 1.4 * progress,
35551
+ alpha = 1;
35552
+ if (pixelSize > 0) {
35553
+ dissolveThreshold += .4 * (ImageProcessUtils.pixelNoise(x, y, pixelSize) - .5), alpha = normalizedDist < dissolveThreshold ? 0 : 1;
35554
+ } else if (this.dissolveConfig.fadeEdge) {
35555
+ const fadeEnd = dissolveThreshold + .15;
35556
+ alpha = normalizedDist < dissolveThreshold ? 0 : normalizedDist > fadeEnd ? 1 : (normalizedDist - dissolveThreshold) / (fadeEnd - dissolveThreshold);
35557
+ } else alpha = normalizedDist < dissolveThreshold ? 0 : 1;
35558
+ const index = 4 * (y * width + x);
35559
+ result[index + 3] = Math.floor(result[index + 3] * alpha);
35560
+ }
35561
+ return new ImageData(result, width, height);
35562
+ }
35563
+ applyRadialDissolve(imageData, progress) {
35564
+ const {
35565
+ data: data,
35566
+ width: width,
35567
+ height: height
35568
+ } = imageData,
35569
+ result = new Uint8ClampedArray(data.length);
35570
+ result.set(data);
35571
+ const centerX = width / 2,
35572
+ centerY = height / 2,
35573
+ pixelSize = this.dissolveConfig.noiseScale;
35574
+ for (let y = 0; y < height; y++) for (let x = 0; x < width; x++) {
35575
+ const dx = x - centerX,
35576
+ dy = y - centerY,
35577
+ normalizedAngle = (Math.atan2(dy, dx) + Math.PI) / (2 * Math.PI);
35578
+ let dissolveThreshold = 1.2 * progress,
35579
+ alpha = 1;
35580
+ if (pixelSize > 0) {
35581
+ dissolveThreshold += .3 * (ImageProcessUtils.pixelNoise(x, y, pixelSize) - .5), alpha = normalizedAngle < dissolveThreshold ? 0 : 1;
35582
+ } else if (this.dissolveConfig.fadeEdge) {
35583
+ const fadeEnd = dissolveThreshold + .08;
35584
+ alpha = normalizedAngle < dissolveThreshold ? 0 : normalizedAngle > fadeEnd ? 1 : (normalizedAngle - dissolveThreshold) / (fadeEnd - dissolveThreshold);
35585
+ } else alpha = normalizedAngle < dissolveThreshold ? 0 : 1;
35586
+ const index = 4 * (y * width + x);
35587
+ result[index + 3] = Math.floor(result[index + 3] * alpha);
35588
+ }
35589
+ return new ImageData(result, width, height);
35590
+ }
35591
+ applyLeftToRightDissolve(imageData, progress) {
35592
+ const {
35593
+ data: data,
35594
+ width: width,
35595
+ height: height
35596
+ } = imageData,
35597
+ result = new Uint8ClampedArray(data.length);
35598
+ result.set(data);
35599
+ const pixelSize = this.dissolveConfig.noiseScale;
35600
+ for (let y = 0; y < height; y++) for (let x = 0; x < width; x++) {
35601
+ const normalizedX = x / width;
35602
+ let dissolveThreshold = 1.2 * progress,
35603
+ alpha = 1;
35604
+ if (pixelSize > 0) {
35605
+ dissolveThreshold += .3 * (ImageProcessUtils.pixelNoise(x, y, pixelSize) - .5), alpha = normalizedX < dissolveThreshold ? 0 : 1;
35606
+ } else if (this.dissolveConfig.fadeEdge) {
35607
+ const fadeEnd = dissolveThreshold + .08;
35608
+ alpha = normalizedX < dissolveThreshold ? 0 : normalizedX > fadeEnd ? 1 : (normalizedX - dissolveThreshold) / (fadeEnd - dissolveThreshold);
35609
+ } else alpha = normalizedX < dissolveThreshold ? 0 : 1;
35610
+ const index = 4 * (y * width + x);
35611
+ result[index + 3] = Math.floor(result[index + 3] * alpha);
35612
+ }
35613
+ return new ImageData(result, width, height);
35614
+ }
35615
+ applyRightToLeftDissolve(imageData, progress) {
35616
+ const {
35617
+ data: data,
35618
+ width: width,
35619
+ height: height
35620
+ } = imageData,
35621
+ result = new Uint8ClampedArray(data.length);
35622
+ result.set(data);
35623
+ const pixelSize = this.dissolveConfig.noiseScale;
35624
+ for (let y = 0; y < height; y++) for (let x = 0; x < width; x++) {
35625
+ const normalizedX = x / width;
35626
+ let dissolveThreshold = 1 - 1.2 * progress,
35627
+ alpha = 1;
35628
+ if (pixelSize > 0) {
35629
+ dissolveThreshold += .3 * (ImageProcessUtils.pixelNoise(x, y, pixelSize) - .5), alpha = normalizedX > dissolveThreshold ? 0 : 1;
35630
+ } else if (this.dissolveConfig.fadeEdge) {
35631
+ const fadeStart = dissolveThreshold - .08;
35632
+ alpha = normalizedX < fadeStart ? 1 : normalizedX > dissolveThreshold ? 0 : 1 - (normalizedX - fadeStart) / (dissolveThreshold - fadeStart);
35633
+ } else alpha = normalizedX > dissolveThreshold ? 0 : 1;
35634
+ const index = 4 * (y * width + x);
35635
+ result[index + 3] = Math.floor(result[index + 3] * alpha);
35636
+ }
35637
+ return new ImageData(result, width, height);
35638
+ }
35639
+ applyTopToBottomDissolve(imageData, progress) {
35640
+ const {
35641
+ data: data,
35642
+ width: width,
35643
+ height: height
35644
+ } = imageData,
35645
+ result = new Uint8ClampedArray(data.length);
35646
+ result.set(data);
35647
+ const pixelSize = this.dissolveConfig.noiseScale;
35648
+ for (let y = 0; y < height; y++) for (let x = 0; x < width; x++) {
35649
+ const normalizedY = y / height;
35650
+ let dissolveThreshold = 1.2 * progress,
35651
+ alpha = 1;
35652
+ if (pixelSize > 0) {
35653
+ dissolveThreshold += .3 * (ImageProcessUtils.pixelNoise(x, y, pixelSize) - .5), alpha = normalizedY < dissolveThreshold ? 0 : 1;
35654
+ } else if (this.dissolveConfig.fadeEdge) {
35655
+ const fadeEnd = dissolveThreshold + .08;
35656
+ alpha = normalizedY < dissolveThreshold ? 0 : normalizedY > fadeEnd ? 1 : (normalizedY - dissolveThreshold) / (fadeEnd - dissolveThreshold);
35657
+ } else alpha = normalizedY < dissolveThreshold ? 0 : 1;
35658
+ const index = 4 * (y * width + x);
35659
+ result[index + 3] = Math.floor(result[index + 3] * alpha);
35660
+ }
35661
+ return new ImageData(result, width, height);
35662
+ }
35663
+ applyBottomToTopDissolve(imageData, progress) {
35664
+ const {
35665
+ data: data,
35666
+ width: width,
35667
+ height: height
35668
+ } = imageData,
35669
+ result = new Uint8ClampedArray(data.length);
35670
+ result.set(data);
35671
+ const pixelSize = this.dissolveConfig.noiseScale;
35672
+ for (let y = 0; y < height; y++) for (let x = 0; x < width; x++) {
35673
+ const normalizedY = y / height;
35674
+ let dissolveThreshold = 1 - 1.2 * progress,
35675
+ alpha = 1;
35676
+ if (pixelSize > 0) {
35677
+ dissolveThreshold += .3 * (ImageProcessUtils.pixelNoise(x, y, pixelSize) - .5), alpha = normalizedY > dissolveThreshold ? 0 : 1;
35678
+ } else if (this.dissolveConfig.fadeEdge) {
35679
+ const fadeStart = dissolveThreshold - .08;
35680
+ alpha = normalizedY < fadeStart ? 1 : normalizedY > dissolveThreshold ? 0 : 1 - (normalizedY - fadeStart) / (dissolveThreshold - fadeStart);
35681
+ } else alpha = normalizedY > dissolveThreshold ? 0 : 1;
35682
+ const index = 4 * (y * width + x);
35683
+ result[index + 3] = Math.floor(result[index + 3] * alpha);
35684
+ }
35685
+ return new ImageData(result, width, height);
35686
+ }
35687
+ }
35688
+
35689
+ class Grayscale extends HybridEffectBase {
35690
+ constructor(from, to, duration, easing, params) {
35691
+ var _a, _b, _c;
35692
+ super(from, to, duration, easing, params);
35693
+ const rawStrength = void 0 !== (null === (_a = null == params ? void 0 : params.options) || void 0 === _a ? void 0 : _a.strength) ? params.options.strength : 1,
35694
+ clampedStrength = Math.max(0, Math.min(1, rawStrength));
35695
+ this.colorConfig = {
35696
+ effectType: (null === (_b = null == params ? void 0 : params.options) || void 0 === _b ? void 0 : _b.effectType) || "grayscale",
35697
+ strength: clampedStrength,
35698
+ useWebGL: void 0 === (null === (_c = null == params ? void 0 : params.options) || void 0 === _c ? void 0 : _c.useWebGL) || params.options.useWebGL
35699
+ };
35700
+ }
35701
+ getShaderSources() {
35702
+ return {
35703
+ vertex: ShaderLibrary.STANDARD_VERTEX_SHADER,
35704
+ fragment: `\n precision mediump float;\n uniform sampler2D u_texture;\n uniform float u_time;\n uniform float u_strength;\n uniform int u_effectType;\n uniform vec2 u_resolution;\n varying vec2 v_texCoord;\n\n ${ShaderLibrary.SHADER_FUNCTIONS}\n\n void main() {\n vec2 uv = v_texCoord;\n vec4 originalColor = texture2D(u_texture, uv);\n vec3 color = originalColor.rgb;\n\n // 计算动态强度\n float dynamicStrength = calculateDynamicStrength(u_strength, u_time);\n\n if (u_effectType == 0) {\n // 灰度效果\n float gray = luminance(color);\n vec3 grayColor = vec3(gray);\n color = mix(color, grayColor, dynamicStrength);\n } else if (u_effectType == 1) {\n // 褐色调效果\n vec3 sepiaColor = sepia(color);\n color = mix(color, sepiaColor, dynamicStrength);\n }\n\n gl_FragColor = vec4(color, originalColor.a);\n }\n `
35705
+ };
35706
+ }
35707
+ applyWebGLEffect(canvas) {
35708
+ if (!this.gl || !this.program || !this.webglCanvas) return null;
35709
+ this.setupWebGLState(canvas);
35710
+ const texture = this.createTextureFromCanvas(canvas);
35711
+ if (!texture) return null;
35712
+ const vertexBuffer = this.createFullScreenQuad();
35713
+ if (!vertexBuffer) return this.gl.deleteTexture(texture), null;
35714
+ try {
35715
+ return this.gl.useProgram(this.program), this.setupVertexAttributes(), this.setColorUniforms(), this.gl.drawArrays(this.gl.TRIANGLE_STRIP, 0, 4), this.webglCanvas;
35716
+ } finally {
35717
+ this.gl.deleteTexture(texture), this.gl.deleteBuffer(vertexBuffer);
35718
+ }
35719
+ }
35720
+ setColorUniforms() {
35721
+ if (!this.gl || !this.program) return;
35722
+ const currentTime = this.getAnimationTime(),
35723
+ timeLocation = this.gl.getUniformLocation(this.program, "u_time"),
35724
+ strengthLocation = this.gl.getUniformLocation(this.program, "u_strength"),
35725
+ effectTypeLocation = this.gl.getUniformLocation(this.program, "u_effectType"),
35726
+ resolutionLocation = this.gl.getUniformLocation(this.program, "u_resolution");
35727
+ this.gl.uniform1f(timeLocation, currentTime), this.gl.uniform1f(strengthLocation, this.colorConfig.strength), this.gl.uniform2f(resolutionLocation, this.webglCanvas.width, this.webglCanvas.height);
35728
+ this.gl.uniform1i(effectTypeLocation, {
35729
+ grayscale: 0,
35730
+ sepia: 1
35731
+ }[this.colorConfig.effectType] || 0);
35732
+ }
35733
+ applyCanvas2DEffect(canvas) {
35734
+ if (this.colorConfig.strength <= 0) {
35735
+ const outputCanvas = this.createOutputCanvas(canvas);
35736
+ return outputCanvas ? outputCanvas.canvas : null;
35737
+ }
35738
+ if (this.canUseCSSFilter()) return this.applyCSSFilter(canvas);
35739
+ const outputCanvas = this.createOutputCanvas(canvas);
35740
+ if (!outputCanvas) return null;
35741
+ const {
35742
+ ctx: ctx
35743
+ } = outputCanvas;
35744
+ try {
35745
+ const imageData = ctx.getImageData(0, 0, canvas.width, canvas.height),
35746
+ currentTime = this.getAnimationTime();
35747
+ let processedImageData;
35748
+ switch (this.colorConfig.effectType) {
35749
+ case "grayscale":
35750
+ default:
35751
+ processedImageData = this.applyGrayscaleEffect(imageData, this.colorConfig.strength, currentTime);
35752
+ break;
35753
+ case "sepia":
35754
+ processedImageData = this.applySepiaEffect(imageData, this.colorConfig.strength, currentTime);
35755
+ }
35756
+ return ctx.clearRect(0, 0, canvas.width, canvas.height), ctx.putImageData(processedImageData, 0, 0), outputCanvas.canvas;
35757
+ } catch (error) {
35758
+ return console.warn("Canvas 2D color effect failed:", error), null;
35759
+ }
35760
+ }
35761
+ canUseCSSFilter() {
35762
+ var _a;
35763
+ return !!window.useFilterAPI && "undefined" != typeof CSS && (null === (_a = CSS.supports) || void 0 === _a ? void 0 : _a.call(CSS, "filter", "grayscale(1)"));
35764
+ }
35765
+ applyCSSFilter(canvas) {
35766
+ try {
35767
+ const outputCanvas = ImageProcessUtils.createTempCanvas(canvas.width, canvas.height),
35768
+ ctx = outputCanvas.getContext("2d");
35769
+ if (!ctx) return null;
35770
+ const currentTime = this.getAnimationTime(),
35771
+ dynamicStrength = ImageProcessUtils.calculateDynamicStrength(this.colorConfig.strength, currentTime);
35772
+ let filterValue = "";
35773
+ return "grayscale" === this.colorConfig.effectType ? filterValue = `grayscale(${Math.min(1, dynamicStrength)})` : "sepia" === this.colorConfig.effectType && (filterValue = `sepia(${Math.min(1, dynamicStrength)})`), ctx.filter = filterValue, ctx.drawImage(canvas, 0, 0), ctx.filter = "none", outputCanvas;
35774
+ } catch (error) {
35775
+ return console.warn("CSS Filter API failed, falling back to pixel processing:", error), null;
35776
+ }
35777
+ }
35778
+ applyGrayscaleEffect(imageData, strength, time) {
35779
+ const {
35780
+ data: data,
35781
+ width: width,
35782
+ height: height
35783
+ } = imageData,
35784
+ result = new Uint8ClampedArray(data.length),
35785
+ dynamicStrength = ImageProcessUtils.calculateDynamicStrength(strength, time);
35786
+ for (let i = 0; i < data.length; i += 4) {
35787
+ const r = data[i],
35788
+ g = data[i + 1],
35789
+ b = data[i + 2],
35790
+ a = data[i + 3],
35791
+ gray = ImageProcessUtils.getLuminance(r, g, b);
35792
+ result[i] = Math.round(ImageProcessUtils.lerp(r, gray, dynamicStrength)), result[i + 1] = Math.round(ImageProcessUtils.lerp(g, gray, dynamicStrength)), result[i + 2] = Math.round(ImageProcessUtils.lerp(b, gray, dynamicStrength)), result[i + 3] = a;
35793
+ }
35794
+ return new ImageData(result, width, height);
35795
+ }
35796
+ applySepiaEffect(imageData, strength, time) {
35797
+ const {
35798
+ data: data,
35799
+ width: width,
35800
+ height: height
35801
+ } = imageData,
35802
+ result = new Uint8ClampedArray(data.length),
35803
+ dynamicStrength = ImageProcessUtils.calculateDynamicStrength(strength, time);
35804
+ for (let i = 0; i < data.length; i += 4) {
35805
+ const r = data[i],
35806
+ g = data[i + 1],
35807
+ b = data[i + 2],
35808
+ a = data[i + 3],
35809
+ [sepiaR, sepiaG, sepiaB] = ImageProcessUtils.applySepiaToPixel(r, g, b);
35810
+ result[i] = Math.round(ImageProcessUtils.lerp(r, sepiaR, dynamicStrength)), result[i + 1] = Math.round(ImageProcessUtils.lerp(g, sepiaG, dynamicStrength)), result[i + 2] = Math.round(ImageProcessUtils.lerp(b, sepiaB, dynamicStrength)), result[i + 3] = a;
35811
+ }
35812
+ return new ImageData(result, width, height);
35813
+ }
35814
+ afterStageRender(stage, canvas) {
35815
+ if (this.canUseCSSFilter() && this.colorConfig.strength > 0) {
35816
+ const cssResult = this.applyCSSFilter(canvas);
35817
+ if (cssResult) return cssResult;
35818
+ }
35819
+ return super.afterStageRender(stage, canvas);
35820
+ }
35821
+ }
35822
+
35823
+ class Distortion extends HybridEffectBase {
35824
+ constructor(from, to, duration, easing, params) {
35825
+ var _a, _b, _c;
35826
+ super(from, to, duration, easing, params), this.distortionConfig = {
35827
+ distortionType: (null === (_a = null == params ? void 0 : params.options) || void 0 === _a ? void 0 : _a.distortionType) || "wave",
35828
+ strength: (null === (_b = null == params ? void 0 : params.options) || void 0 === _b ? void 0 : _b.strength) || .3,
35829
+ useWebGL: void 0 === (null === (_c = null == params ? void 0 : params.options) || void 0 === _c ? void 0 : _c.useWebGL) || params.options.useWebGL
35830
+ };
35831
+ }
35832
+ getShaderSources() {
35833
+ return {
35834
+ vertex: "\n attribute vec2 a_position;\n attribute vec2 a_texCoord;\n varying vec2 v_texCoord;\n\n void main() {\n gl_Position = vec4(a_position, 0.0, 1.0);\n v_texCoord = a_texCoord;\n }\n ",
35835
+ fragment: "\n precision mediump float;\n uniform sampler2D u_texture;\n uniform float u_time;\n uniform float u_strength;\n uniform int u_distortionType;\n uniform vec2 u_resolution;\n varying vec2 v_texCoord;\n\n // 波浪扭曲函数\n vec2 wave(vec2 uv, float time, float strength) {\n float waveX = sin(uv.y * 10.0 + time * 3.0) * strength * 0.1;\n float waveY = sin(uv.x * 10.0 + time * 2.0) * strength * 0.1;\n return uv + vec2(waveX, waveY);\n }\n\n // 涟漪扭曲函数\n vec2 ripple(vec2 uv, float time, float strength) {\n vec2 center = vec2(0.5, 0.5);\n float distance = length(uv - center);\n float ripple = sin(distance * 20.0 - time * 5.0) * strength * 0.1;\n vec2 direction = normalize(uv - center);\n return uv + direction * ripple;\n }\n\n // 漩涡扭曲函数\n vec2 swirl(vec2 uv, float time, float strength) {\n vec2 center = vec2(0.5, 0.5);\n vec2 delta = uv - center;\n float dist = length(delta);\n float originalAngle = atan(delta.y, delta.x);\n float rotationAngle = dist * strength * time * 2.0;\n float finalAngle = originalAngle + rotationAngle;\n return center + dist * vec2(cos(finalAngle), sin(finalAngle));\n }\n\n void main() {\n vec2 uv = v_texCoord;\n\n // 根据扭曲类型应用相应变换\n if (u_distortionType == 0) {\n uv = wave(uv, u_time, u_strength);\n } else if (u_distortionType == 1) {\n uv = ripple(uv, u_time, u_strength);\n } else if (u_distortionType == 2) {\n uv = swirl(uv, u_time, u_strength);\n }\n\n // 边界检查\n if (uv.x < 0.0 || uv.x > 1.0 || uv.y < 0.0 || uv.y > 1.0) {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);\n } else {\n gl_FragColor = texture2D(u_texture, uv);\n }\n }\n "
35836
+ };
35837
+ }
35838
+ applyWebGLEffect(canvas) {
35839
+ if (!this.gl || !this.program || !this.webglCanvas) return null;
35840
+ this.setupWebGLState(canvas);
35841
+ const texture = this.createTextureFromCanvas(canvas);
35842
+ if (!texture) return null;
35843
+ const vertexBuffer = this.createFullScreenQuad();
35844
+ if (!vertexBuffer) return this.gl.deleteTexture(texture), null;
35845
+ try {
35846
+ return this.gl.useProgram(this.program), this.setupVertexAttributes(), this.setDistortionUniforms(), this.gl.drawArrays(this.gl.TRIANGLE_STRIP, 0, 4), this.webglCanvas;
35847
+ } finally {
35848
+ this.gl.deleteTexture(texture), this.gl.deleteBuffer(vertexBuffer);
35849
+ }
35850
+ }
35851
+ setDistortionUniforms() {
35852
+ if (!this.gl || !this.program) return;
35853
+ const currentTime = this.getAnimationTime(),
35854
+ timeLocation = this.gl.getUniformLocation(this.program, "u_time"),
35855
+ strengthLocation = this.gl.getUniformLocation(this.program, "u_strength"),
35856
+ distortionTypeLocation = this.gl.getUniformLocation(this.program, "u_distortionType"),
35857
+ resolutionLocation = this.gl.getUniformLocation(this.program, "u_resolution");
35858
+ this.gl.uniform1f(timeLocation, currentTime), this.gl.uniform1f(strengthLocation, this.distortionConfig.strength), this.gl.uniform2f(resolutionLocation, this.webglCanvas.width, this.webglCanvas.height);
35859
+ this.gl.uniform1i(distortionTypeLocation, {
35860
+ wave: 0,
35861
+ ripple: 1,
35862
+ swirl: 2
35863
+ }[this.distortionConfig.distortionType] || 0);
35864
+ }
35865
+ applyCanvas2DEffect(canvas) {
35866
+ const outputCanvas = this.createOutputCanvas(canvas);
35867
+ if (!outputCanvas) return null;
35868
+ const {
35869
+ ctx: ctx
35870
+ } = outputCanvas;
35871
+ try {
35872
+ const imageData = ctx.getImageData(0, 0, canvas.width, canvas.height),
35873
+ currentTime = this.getAnimationTime();
35874
+ let distortedImageData;
35875
+ switch (this.distortionConfig.distortionType) {
35876
+ case "wave":
35877
+ distortedImageData = this.applyWaveDistortion(imageData, this.distortionConfig.strength, currentTime);
35878
+ break;
35879
+ case "ripple":
35880
+ distortedImageData = this.applyRippleDistortion(imageData, this.distortionConfig.strength, currentTime);
35881
+ break;
35882
+ case "swirl":
35883
+ distortedImageData = this.applySwirlDistortion(imageData, this.distortionConfig.strength, currentTime);
35884
+ break;
35885
+ default:
35886
+ distortedImageData = imageData;
35887
+ }
35888
+ return ctx.clearRect(0, 0, canvas.width, canvas.height), ctx.putImageData(distortedImageData, 0, 0), outputCanvas.canvas;
35889
+ } catch (error) {
35890
+ return console.warn("Canvas 2D distortion effect failed:", error), null;
35891
+ }
35892
+ }
35893
+ applyWaveDistortion(imageData, strength, time) {
35894
+ const {
35895
+ data: data,
35896
+ width: width,
35897
+ height: height
35898
+ } = imageData,
35899
+ result = new Uint8ClampedArray(data.length);
35900
+ for (let y = 0; y < height; y++) for (let x = 0; x < width; x++) {
35901
+ const waveX = Math.sin(.1 * y + 3 * time) * strength * 20,
35902
+ waveY = Math.sin(.1 * x + 2 * time) * strength * 20,
35903
+ sourceX = Math.round(x - waveX),
35904
+ sourceY = Math.round(y - waveY),
35905
+ targetIndex = 4 * (y * width + x);
35906
+ if (sourceX >= 0 && sourceX < width && sourceY >= 0 && sourceY < height) {
35907
+ const sourceIndex = 4 * (sourceY * width + sourceX);
35908
+ result[targetIndex] = data[sourceIndex], result[targetIndex + 1] = data[sourceIndex + 1], result[targetIndex + 2] = data[sourceIndex + 2], result[targetIndex + 3] = data[sourceIndex + 3];
35909
+ } else result[targetIndex + 3] = 0;
35910
+ }
35911
+ return new ImageData(result, width, height);
35912
+ }
35913
+ applyRippleDistortion(imageData, strength, time) {
35914
+ const {
35915
+ data: data,
35916
+ width: width,
35917
+ height: height
35918
+ } = imageData,
35919
+ result = new Uint8ClampedArray(data.length),
35920
+ centerX = width / 2,
35921
+ centerY = height / 2;
35922
+ for (let y = 0; y < height; y++) for (let x = 0; x < width; x++) {
35923
+ const dx = x - centerX,
35924
+ dy = y - centerY,
35925
+ distance = Math.sqrt(dx * dx + dy * dy),
35926
+ ripple = Math.sin(.2 * distance - 5 * time) * strength * 10,
35927
+ angle = Math.atan2(dy, dx),
35928
+ sourceX = Math.round(x - Math.cos(angle) * ripple),
35929
+ sourceY = Math.round(y - Math.sin(angle) * ripple),
35930
+ targetIndex = 4 * (y * width + x);
35931
+ if (sourceX >= 0 && sourceX < width && sourceY >= 0 && sourceY < height) {
35932
+ const sourceIndex = 4 * (sourceY * width + sourceX);
35933
+ result[targetIndex] = data[sourceIndex], result[targetIndex + 1] = data[sourceIndex + 1], result[targetIndex + 2] = data[sourceIndex + 2], result[targetIndex + 3] = data[sourceIndex + 3];
35934
+ } else result[targetIndex + 3] = 0;
35935
+ }
35936
+ return new ImageData(result, width, height);
35937
+ }
35938
+ applySwirlDistortion(imageData, strength, time) {
35939
+ const {
35940
+ data: data,
35941
+ width: width,
35942
+ height: height
35943
+ } = imageData,
35944
+ result = new Uint8ClampedArray(data.length),
35945
+ centerX = width / 2,
35946
+ centerY = height / 2;
35947
+ for (let y = 0; y < height; y++) for (let x = 0; x < width; x++) {
35948
+ const dx = x - centerX,
35949
+ dy = y - centerY,
35950
+ distance = Math.sqrt(dx * dx + dy * dy),
35951
+ finalAngle = Math.atan2(dy, dx) + distance * strength * time * .02,
35952
+ sourceX = Math.round(centerX + distance * Math.cos(finalAngle)),
35953
+ sourceY = Math.round(centerY + distance * Math.sin(finalAngle)),
35954
+ targetIndex = 4 * (y * width + x);
35955
+ if (sourceX >= 0 && sourceX < width && sourceY >= 0 && sourceY < height) {
35956
+ const sourceIndex = 4 * (sourceY * width + sourceX);
35957
+ result[targetIndex] = data[sourceIndex], result[targetIndex + 1] = data[sourceIndex + 1], result[targetIndex + 2] = data[sourceIndex + 2], result[targetIndex + 3] = data[sourceIndex + 3];
35958
+ } else result[targetIndex + 3] = 0;
35959
+ }
35960
+ return new ImageData(result, width, height);
35961
+ }
35962
+ afterStageRender(stage, canvas) {
35963
+ return this.distortionConfig.strength <= 0 ? canvas : super.afterStageRender(stage, canvas);
35964
+ }
35965
+ }
35966
+
35967
+ class Particle extends HybridEffectBase {
35968
+ constructor(from, to, duration, easing, params) {
35969
+ var _a, _b, _c, _d, _e;
35970
+ super(from, to, duration, easing, params), this.particles = [], this.positionBuffer = null, this.colorBuffer = null, this.particleConfig = {
35971
+ effectType: (null === (_a = null == params ? void 0 : params.options) || void 0 === _a ? void 0 : _a.effectType) || "gravity",
35972
+ count: (null === (_b = null == params ? void 0 : params.options) || void 0 === _b ? void 0 : _b.count) || 4e3,
35973
+ size: (null === (_c = null == params ? void 0 : params.options) || void 0 === _c ? void 0 : _c.size) || 20,
35974
+ strength: (null === (_d = null == params ? void 0 : params.options) || void 0 === _d ? void 0 : _d.strength) || 1.5,
35975
+ useWebGL: void 0 === (null === (_e = null == params ? void 0 : params.options) || void 0 === _e ? void 0 : _e.useWebGL) || params.options.useWebGL
35976
+ };
35977
+ }
35978
+ getShaderSources() {
35979
+ return {
35980
+ vertex: "\n attribute vec2 a_position;\n attribute vec4 a_color;\n attribute float a_size;\n\n uniform vec2 u_resolution;\n uniform float u_time;\n uniform float u_forceStrength;\n uniform int u_effectType;\n\n varying vec4 v_color;\n\n void main() {\n // 将像素坐标转换为剪辑空间坐标\n vec2 clipSpace = ((a_position / u_resolution) * 2.0) - 1.0;\n clipSpace.y = -clipSpace.y; // 翻转Y轴\n\n gl_Position = vec4(clipSpace, 0.0, 1.0);\n gl_PointSize = a_size;\n v_color = a_color;\n }\n ",
35981
+ fragment: "\n precision mediump float;\n varying vec4 v_color;\n\n void main() {\n // 创建圆形粒子\n vec2 coord = gl_PointCoord - vec2(0.5);\n float distance = length(coord);\n\n if (distance > 0.5) {\n discard;\n }\n\n // 保持原始颜色,只调整透明度渐变\n gl_FragColor = vec4(v_color.rgb, v_color.a);\n }\n "
35982
+ };
35983
+ }
35984
+ applyWebGLEffect(canvas) {
35985
+ if (!this.gl || !this.program || !this.webglCanvas) return null;
35986
+ this.setupWebGLState(canvas), 0 === this.particles.length && this.extractParticles(canvas), this.updateParticles(canvas);
35987
+ const gl = this.gl;
35988
+ return gl.enable(gl.BLEND), gl.blendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA), gl.useProgram(this.program), this.prepareAndDrawParticles(gl), this.webglCanvas;
35989
+ }
35990
+ applyCanvas2DEffect(canvas) {
35991
+ const output = this.createOutputCanvas(canvas);
35992
+ if (!output) return null;
35993
+ const {
35994
+ canvas: outputCanvas,
35995
+ ctx: ctx
35996
+ } = output,
35997
+ progress = this.currentAnimationRatio;
35998
+ switch (this.particleConfig.effectType) {
35999
+ case "explode":
36000
+ this.applyCanvas2DExplode(ctx, canvas, progress);
36001
+ break;
36002
+ case "gravity":
36003
+ this.applyCanvas2DGravity(ctx, canvas, progress);
36004
+ break;
36005
+ case "vortex":
36006
+ this.applyCanvas2DVortex(ctx, canvas, progress);
36007
+ break;
36008
+ default:
36009
+ ctx.globalAlpha = Math.max(0, 1 - progress), ctx.drawImage(canvas, 0, 0);
36010
+ }
36011
+ return outputCanvas;
36012
+ }
36013
+ extractParticles(canvas) {
36014
+ const tempCanvas = ImageProcessUtils.createTempCanvas(canvas.width, canvas.height, 1),
36015
+ tempCtx = tempCanvas.getContext("2d");
36016
+ if (!tempCtx) return;
36017
+ tempCtx.drawImage(canvas, 0, 0, tempCanvas.width, tempCanvas.height);
36018
+ const data = tempCtx.getImageData(0, 0, tempCanvas.width, tempCanvas.height).data;
36019
+ this.particles = [];
36020
+ const step = Math.max(1, Math.floor(Math.sqrt(tempCanvas.width * tempCanvas.height / (1.5 * this.particleConfig.count))));
36021
+ for (let y = 0; y < tempCanvas.height; y += step) for (let x = 0; x < tempCanvas.width; x += step) {
36022
+ const index = 4 * (y * tempCanvas.width + x),
36023
+ r = data[index],
36024
+ g = data[index + 1],
36025
+ b = data[index + 2],
36026
+ a = data[index + 3];
36027
+ if (a > 5) {
36028
+ const realX = x / tempCanvas.width * canvas.width,
36029
+ realY = y / tempCanvas.height * canvas.height,
36030
+ particle = {
36031
+ x: realX,
36032
+ y: realY,
36033
+ originX: realX,
36034
+ originY: realY,
36035
+ vx: 0,
36036
+ vy: 0,
36037
+ r: r / 255,
36038
+ g: g / 255,
36039
+ b: b / 255,
36040
+ a: Math.max(.6, a / 255),
36041
+ life: 1,
36042
+ size: this.particleConfig.size * (1 + .5 * Math.random())
36043
+ };
36044
+ this.particles.push(particle);
36045
+ }
36046
+ }
36047
+ }
36048
+ updateParticles(canvas) {
36049
+ const centerX = canvas.width / 2,
36050
+ centerY = canvas.height / 2,
36051
+ progress = this.currentAnimationRatio,
36052
+ duration = this.getDurationFromParent(),
36053
+ isShortAnimation = duration < 2e3,
36054
+ timeMultiplier = isShortAnimation ? Math.max(1.5, 3e3 / duration) : 1,
36055
+ intensityBoost = isShortAnimation ? Math.min(2, 2e3 / duration) : 1;
36056
+ this.particles.forEach(particle => {
36057
+ const dx = particle.x - centerX,
36058
+ dy = particle.y - centerY,
36059
+ distance = Math.sqrt(dx * dx + dy * dy),
36060
+ angle = Math.atan2(dy, dx);
36061
+ this.applyParticleForces(particle, angle, distance, progress, intensityBoost, canvas), this.updateParticleProperties(particle, progress, isShortAnimation, timeMultiplier, intensityBoost);
36062
+ });
36063
+ }
36064
+ applyParticleForces(particle, angle, distance, progress, intensityBoost, canvas) {
36065
+ const time = this.getAnimationTime();
36066
+ switch (this.particleConfig.effectType) {
36067
+ case "explode":
36068
+ const explodeIntensity = progress * this.particleConfig.strength * intensityBoost * 5;
36069
+ particle.vx += Math.cos(angle) * explodeIntensity, particle.vy += Math.sin(angle) * explodeIntensity;
36070
+ break;
36071
+ case "gravity":
36072
+ this.applyGravityEffect(particle, progress, intensityBoost, canvas, time);
36073
+ break;
36074
+ case "vortex":
36075
+ this.applyVortexEffect(particle, progress, intensityBoost, canvas, angle, distance);
36076
+ }
36077
+ }
36078
+ applyGravityEffect(particle, progress, intensityBoost, canvas, time) {
36079
+ const gravityThreshold = (particle.originX + .7 * particle.originY) / (canvas.width + canvas.height) * .8;
36080
+ if (progress > gravityThreshold) {
36081
+ const gravityProgress = (progress - gravityThreshold) / (1 - gravityThreshold),
36082
+ gravityForce = this.particleConfig.strength * gravityProgress * gravityProgress * 12 * intensityBoost;
36083
+ particle.vy += gravityForce;
36084
+ const turbulence = Math.sin(3 * time + .02 * particle.originX) * Math.cos(2 * time + .015 * particle.originY);
36085
+ particle.vx += turbulence * this.particleConfig.strength * 2 * intensityBoost;
36086
+ }
36087
+ }
36088
+ applyVortexEffect(particle, progress, intensityBoost, canvas, angle, distance) {
36089
+ const centerX = canvas.width / 2,
36090
+ centerY = canvas.height / 2,
36091
+ spiralAngle = angle + progress * Math.PI * .8,
36092
+ targetRadius = distance + progress * Math.max(canvas.width, canvas.height) * .7 * 1.8,
36093
+ targetX = centerX + Math.cos(spiralAngle) * targetRadius,
36094
+ targetY = centerY + Math.sin(spiralAngle) * targetRadius,
36095
+ baseForce = progress * this.particleConfig.strength * .08 * intensityBoost;
36096
+ particle.vx += (targetX - particle.x) * baseForce, particle.vy += (targetY - particle.y) * baseForce;
36097
+ }
36098
+ updateParticleProperties(particle, progress, isShortAnimation, timeMultiplier, intensityBoost) {
36099
+ const dragCoeff = isShortAnimation ? .99 : .98;
36100
+ if (particle.vx *= dragCoeff, particle.vy *= dragCoeff, particle.x += particle.vx, particle.y += particle.vy, isShortAnimation) {
36101
+ const lifeDecayRate = Math.max(.1, .5 / timeMultiplier);
36102
+ particle.life = Math.max(0, 1 - progress * lifeDecayRate), particle.a = Math.max(.2, particle.life * Math.min(1, 1.2 * particle.a)), particle.size = Math.max(.7 * this.particleConfig.size, this.particleConfig.size * (.5 + .5 * particle.life));
36103
+ } else particle.life = Math.max(0, 1 - .2 * progress), particle.a = Math.max(.1, particle.life * Math.min(1, 1.5 * particle.a)), particle.size = Math.max(.5 * this.particleConfig.size, this.particleConfig.size * (.3 + .7 * particle.life));
36104
+ }
36105
+ prepareAndDrawParticles(gl) {
36106
+ const positions = new Float32Array(2 * this.particles.length),
36107
+ colors = new Float32Array(4 * this.particles.length),
36108
+ sizes = new Float32Array(this.particles.length);
36109
+ this.particles.forEach((particle, i) => {
36110
+ positions[2 * i] = particle.x, positions[2 * i + 1] = particle.y, colors[4 * i] = particle.r, colors[4 * i + 1] = particle.g, colors[4 * i + 2] = particle.b, colors[4 * i + 3] = Math.max(.1, particle.a), sizes[i] = Math.max(6, 1.5 * particle.size);
36111
+ }), this.updateParticleBuffers(gl, positions, colors, sizes), this.setParticleUniforms(gl), gl.drawArrays(gl.POINTS, 0, this.particles.length), this.cleanupTempBuffers(gl);
36112
+ }
36113
+ updateParticleBuffers(gl, positions, colors, sizes) {
36114
+ this.positionBuffer || (this.positionBuffer = gl.createBuffer()), gl.bindBuffer(gl.ARRAY_BUFFER, this.positionBuffer), gl.bufferData(gl.ARRAY_BUFFER, positions, gl.DYNAMIC_DRAW);
36115
+ const positionLocation = gl.getAttribLocation(this.program, "a_position");
36116
+ gl.enableVertexAttribArray(positionLocation), gl.vertexAttribPointer(positionLocation, 2, gl.FLOAT, !1, 0, 0), this.colorBuffer || (this.colorBuffer = gl.createBuffer()), gl.bindBuffer(gl.ARRAY_BUFFER, this.colorBuffer), gl.bufferData(gl.ARRAY_BUFFER, colors, gl.DYNAMIC_DRAW);
36117
+ const colorLocation = gl.getAttribLocation(this.program, "a_color");
36118
+ gl.enableVertexAttribArray(colorLocation), gl.vertexAttribPointer(colorLocation, 4, gl.FLOAT, !1, 0, 0);
36119
+ const sizeBuffer = gl.createBuffer();
36120
+ gl.bindBuffer(gl.ARRAY_BUFFER, sizeBuffer), gl.bufferData(gl.ARRAY_BUFFER, sizes, gl.DYNAMIC_DRAW);
36121
+ const sizeLocation = gl.getAttribLocation(this.program, "a_size");
36122
+ gl.enableVertexAttribArray(sizeLocation), gl.vertexAttribPointer(sizeLocation, 1, gl.FLOAT, !1, 0, 0), this._tempSizeBuffer = sizeBuffer;
36123
+ }
36124
+ setParticleUniforms(gl) {
36125
+ const resolutionLocation = gl.getUniformLocation(this.program, "u_resolution"),
36126
+ timeLocation = gl.getUniformLocation(this.program, "u_time"),
36127
+ forceStrengthLocation = gl.getUniformLocation(this.program, "u_forceStrength"),
36128
+ effectTypeLocation = gl.getUniformLocation(this.program, "u_effectType");
36129
+ gl.uniform2f(resolutionLocation, this.webglCanvas.width, this.webglCanvas.height), gl.uniform1f(timeLocation, this.getAnimationTime()), gl.uniform1f(forceStrengthLocation, this.particleConfig.strength);
36130
+ gl.uniform1i(effectTypeLocation, {
36131
+ explode: 0,
36132
+ vortex: 1,
36133
+ gravity: 2
36134
+ }[this.particleConfig.effectType] || 0);
36135
+ }
36136
+ cleanupTempBuffers(gl) {
36137
+ const tempSizeBuffer = this._tempSizeBuffer;
36138
+ tempSizeBuffer && (gl.deleteBuffer(tempSizeBuffer), delete this._tempSizeBuffer);
36139
+ }
36140
+ applyCanvas2DExplode(ctx, canvas, progress) {
36141
+ const centerX = canvas.width / 2,
36142
+ centerY = canvas.height / 2;
36143
+ ctx.save(), ctx.globalAlpha = Math.max(0, 1 - progress), ctx.translate(centerX, centerY);
36144
+ const scale = 1 + .5 * progress;
36145
+ ctx.scale(scale, scale), ctx.translate(-centerX, -centerY), ctx.drawImage(canvas, 0, 0), ctx.restore();
36146
+ }
36147
+ applyCanvas2DGravity(ctx, canvas, progress) {
36148
+ ctx.save(), ctx.globalAlpha = Math.max(0, 1 - progress);
36149
+ const offsetY = progress * canvas.height * .3;
36150
+ ctx.drawImage(canvas, 0, offsetY), ctx.restore();
36151
+ }
36152
+ applyCanvas2DVortex(ctx, canvas, progress) {
36153
+ const centerX = canvas.width / 2,
36154
+ centerY = canvas.height / 2;
36155
+ ctx.save(), ctx.globalAlpha = Math.max(0, 1 - progress), ctx.translate(centerX, centerY), ctx.rotate(progress * Math.PI * 2), ctx.translate(-centerX, -centerY), ctx.drawImage(canvas, 0, 0), ctx.restore();
36156
+ }
36157
+ }
36158
+
36159
+ class Glitch extends Canvas2DEffectBase {
36160
+ constructor(from, to, duration, easing, params) {
36161
+ var _a, _b;
36162
+ super(from, to, duration, easing, params), this.glitchConfig = {
36163
+ effectType: (null === (_a = null == params ? void 0 : params.options) || void 0 === _a ? void 0 : _a.effectType) || "rgb-shift",
36164
+ intensity: void 0 !== (null === (_b = null == params ? void 0 : params.options) || void 0 === _b ? void 0 : _b.intensity) ? params.options.intensity : .5
36165
+ };
36166
+ }
36167
+ applyCanvas2DEffect(canvas) {
36168
+ if (this.glitchConfig.intensity <= 0) {
36169
+ const outputCanvas = this.createOutputCanvas(canvas);
36170
+ return outputCanvas ? outputCanvas.canvas : null;
36171
+ }
36172
+ try {
36173
+ switch (this.glitchConfig.effectType) {
36174
+ case "rgb-shift":
36175
+ default:
36176
+ return this.applyRGBShiftGlitch(canvas);
36177
+ case "digital-distortion":
36178
+ return this.applyDigitalDistortionGlitch(canvas);
36179
+ case "scan-lines":
36180
+ return this.applyScanLineGlitch(canvas);
36181
+ case "data-corruption":
36182
+ return this.applyDataCorruptionGlitch(canvas);
36183
+ }
36184
+ } catch (error) {
36185
+ return console.warn("Glitch effect failed:", error), null;
36186
+ }
36187
+ }
36188
+ applyRGBShiftGlitch(canvas) {
36189
+ const outputCanvas = this.createOutputCanvas(canvas);
36190
+ if (!outputCanvas) return null;
36191
+ const {
36192
+ ctx: ctx
36193
+ } = outputCanvas;
36194
+ try {
36195
+ ctx.clearRect(0, 0, canvas.width, canvas.height);
36196
+ const dynamicIntensity = ImageProcessUtils.calculateDynamicStrength(this.glitchConfig.intensity, this.getAnimationTime()),
36197
+ maxOffset = Math.floor(20 * dynamicIntensity),
36198
+ redOffset = this.generateRandomOffset(maxOffset),
36199
+ greenOffset = this.generateRandomOffset(maxOffset, .3),
36200
+ blueOffset = this.generateRandomOffset(-maxOffset),
36201
+ tempCanvas = ImageProcessUtils.createTempCanvas(canvas.width, canvas.height),
36202
+ tempCtx = tempCanvas.getContext("2d");
36203
+ tempCtx.drawImage(canvas, 0, 0);
36204
+ const originalImageData = tempCtx.getImageData(0, 0, canvas.width, canvas.height),
36205
+ redChannelData = ImageProcessUtils.extractChannel(originalImageData, 0),
36206
+ greenChannelData = ImageProcessUtils.extractChannel(originalImageData, 1),
36207
+ blueChannelData = ImageProcessUtils.extractChannel(originalImageData, 2);
36208
+ return ctx.globalCompositeOperation = "screen", tempCtx.clearRect(0, 0, canvas.width, canvas.height), tempCtx.putImageData(redChannelData, 0, 0), ctx.drawImage(tempCanvas, redOffset.x, redOffset.y), tempCtx.clearRect(0, 0, canvas.width, canvas.height), tempCtx.putImageData(greenChannelData, 0, 0), ctx.drawImage(tempCanvas, greenOffset.x, greenOffset.y), tempCtx.clearRect(0, 0, canvas.width, canvas.height), tempCtx.putImageData(blueChannelData, 0, 0), ctx.drawImage(tempCanvas, blueOffset.x, blueOffset.y), ctx.globalCompositeOperation = "source-over", outputCanvas.canvas;
36209
+ } catch (error) {
36210
+ return console.warn("RGB shift glitch failed:", error), null;
36211
+ }
36212
+ }
36213
+ applyDigitalDistortionGlitch(canvas) {
36214
+ const outputCanvas = this.createOutputCanvas(canvas);
36215
+ if (!outputCanvas) return null;
36216
+ const {
36217
+ ctx: ctx
36218
+ } = outputCanvas;
36219
+ try {
36220
+ const imageData = ctx.getImageData(0, 0, canvas.width, canvas.height),
36221
+ dynamicIntensity = ImageProcessUtils.calculateDynamicStrength(this.glitchConfig.intensity, this.getAnimationTime()),
36222
+ distortedImageData = this.processDigitalDistortion(imageData, dynamicIntensity);
36223
+ return ctx.clearRect(0, 0, canvas.width, canvas.height), ctx.putImageData(distortedImageData, 0, 0), outputCanvas.canvas;
36224
+ } catch (error) {
36225
+ return console.warn("Digital distortion glitch failed:", error), null;
36226
+ }
36227
+ }
36228
+ applyScanLineGlitch(canvas) {
36229
+ const outputCanvas = this.createOutputCanvas(canvas);
36230
+ if (!outputCanvas) return null;
36231
+ const {
36232
+ ctx: ctx
36233
+ } = outputCanvas;
36234
+ try {
36235
+ const dynamicIntensity = ImageProcessUtils.calculateDynamicStrength(this.glitchConfig.intensity, this.getAnimationTime()),
36236
+ lineSpacing = Math.max(2, Math.floor(10 - 8 * dynamicIntensity));
36237
+ ctx.globalCompositeOperation = "multiply";
36238
+ for (let y = 0; y < canvas.height; y += lineSpacing) if (Math.random() < dynamicIntensity) {
36239
+ const opacity = .1 + .4 * dynamicIntensity;
36240
+ ctx.fillStyle = `rgba(0, 0, 0, ${opacity})`, ctx.fillRect(0, y, canvas.width, 1);
36241
+ }
36242
+ ctx.globalCompositeOperation = "screen";
36243
+ const brightLineCount = Math.floor(20 * dynamicIntensity);
36244
+ for (let i = 0; i < brightLineCount; i++) {
36245
+ const y = Math.random() * canvas.height,
36246
+ opacity = .3 * dynamicIntensity;
36247
+ ctx.fillStyle = `rgba(255, 255, 255, ${opacity})`, ctx.fillRect(0, Math.floor(y), canvas.width, 1);
36248
+ }
36249
+ return ctx.globalCompositeOperation = "source-over", outputCanvas.canvas;
36250
+ } catch (error) {
36251
+ return console.warn("Scan line glitch failed:", error), null;
36252
+ }
36253
+ }
36254
+ applyDataCorruptionGlitch(canvas) {
36255
+ const outputCanvas = this.createOutputCanvas(canvas);
36256
+ if (!outputCanvas) return null;
36257
+ const {
36258
+ ctx: ctx
36259
+ } = outputCanvas;
36260
+ try {
36261
+ const imageData = ctx.getImageData(0, 0, canvas.width, canvas.height),
36262
+ dynamicIntensity = ImageProcessUtils.calculateDynamicStrength(this.glitchConfig.intensity, this.getAnimationTime()),
36263
+ corruptedImageData = this.processDataCorruption(imageData, dynamicIntensity);
36264
+ return ctx.clearRect(0, 0, canvas.width, canvas.height), ctx.putImageData(corruptedImageData, 0, 0), outputCanvas.canvas;
36265
+ } catch (error) {
36266
+ return console.warn("Data corruption glitch failed:", error), null;
36267
+ }
36268
+ }
36269
+ generateRandomOffset(maxOffset, scale = 1) {
36270
+ return {
36271
+ x: (Math.random() - .5) * maxOffset,
36272
+ y: (Math.random() - .5) * maxOffset * scale
36273
+ };
36274
+ }
36275
+ processDigitalDistortion(imageData, intensity) {
36276
+ const {
36277
+ data: data,
36278
+ width: width,
36279
+ height: height
36280
+ } = imageData,
36281
+ result = new Uint8ClampedArray(data),
36282
+ sliceCount = Math.floor(20 * intensity) + 5,
36283
+ sliceHeight = Math.floor(height / sliceCount);
36284
+ for (let i = 0; i < sliceCount; i++) if (Math.random() < intensity) {
36285
+ const y = i * sliceHeight,
36286
+ sliceEnd = Math.min(y + sliceHeight, height),
36287
+ offset = Math.floor((Math.random() - .5) * width * intensity * .1);
36288
+ this.shiftSliceHorizontal(result, width, height, y, sliceEnd, offset);
36289
+ }
36290
+ const noiseIntensity = .3 * intensity;
36291
+ for (let i = 0; i < data.length; i += 4) Math.random() < noiseIntensity && (result[i] = 255 * Math.random(), result[i + 1] = 255 * Math.random(), result[i + 2] = 255 * Math.random());
36292
+ return new ImageData(result, width, height);
36293
+ }
36294
+ shiftSliceHorizontal(data, width, height, startY, endY, offset) {
36295
+ const tempRow = new Uint8ClampedArray(4 * width);
36296
+ for (let y = startY; y < endY; y++) {
36297
+ const rowStart = y * width * 4;
36298
+ for (let x = 0; x < 4 * width; x++) tempRow[x] = data[rowStart + x];
36299
+ for (let x = 0; x < width; x++) {
36300
+ const targetIndex = rowStart + 4 * x,
36301
+ sourceIndex = 4 * ((x - offset + width) % width);
36302
+ data[targetIndex] = tempRow[sourceIndex], data[targetIndex + 1] = tempRow[sourceIndex + 1], data[targetIndex + 2] = tempRow[sourceIndex + 2], data[targetIndex + 3] = tempRow[sourceIndex + 3];
36303
+ }
36304
+ }
36305
+ }
36306
+ processDataCorruption(imageData, intensity) {
36307
+ const {
36308
+ data: data,
36309
+ width: width,
36310
+ height: height
36311
+ } = imageData,
36312
+ result = new Uint8ClampedArray(data),
36313
+ stripeCount = Math.floor(15 * intensity) + 5;
36314
+ for (let i = 0; i < stripeCount; i++) if (Math.random() < intensity) {
36315
+ const x = Math.floor(Math.random() * width),
36316
+ stripeWidth = Math.floor(5 * Math.random()) + 1,
36317
+ color = Math.random() < .5 ? 0 : 255;
36318
+ for (let y = 0; y < height; y++) for (let dx = 0; dx < stripeWidth && x + dx < width; dx++) {
36319
+ const index = 4 * (y * width + x + dx);
36320
+ result[index] = color, result[index + 1] = color, result[index + 2] = color;
36321
+ }
36322
+ }
36323
+ const corruptionCount = Math.floor(20 * intensity);
36324
+ for (let i = 0; i < corruptionCount; i++) {
36325
+ const blockX = Math.floor(Math.random() * width),
36326
+ blockY = Math.floor(Math.random() * height),
36327
+ blockW = Math.floor(20 * Math.random()) + 5,
36328
+ blockH = Math.floor(10 * Math.random()) + 2;
36329
+ this.corruptBlock(result, width, height, blockX, blockY, blockW, blockH);
36330
+ }
36331
+ return new ImageData(result, width, height);
36332
+ }
36333
+ corruptBlock(data, width, height, x, y, w, h) {
36334
+ for (let dy = 0; dy < h && y + dy < height; dy++) for (let dx = 0; dx < w && x + dx < width; dx++) {
36335
+ const index = 4 * ((y + dy) * width + (x + dx));
36336
+ Math.random() < .7 && (data[index] = 255 * Math.random(), data[index + 1] = 255 * Math.random(), data[index + 2] = 255 * Math.random());
36337
+ }
36338
+ }
36339
+ }
36340
+
36341
+ class GaussianBlur extends AStageAnimate {
36342
+ constructor(from, to, duration, easing, params) {
36343
+ var _a, _b;
36344
+ super(from, to, duration, easing, params), this.blurConfig = {
36345
+ blurRadius: (null === (_a = null == params ? void 0 : params.options) || void 0 === _a ? void 0 : _a.blurRadius) || 8,
36346
+ useOptimizedBlur: void 0 === (null === (_b = null == params ? void 0 : params.options) || void 0 === _b ? void 0 : _b.useOptimizedBlur) || params.options.useOptimizedBlur
36347
+ };
36348
+ }
36349
+ applyCSSBlur(canvas, radius) {
36350
+ const c = vglobal.createCanvas({
36351
+ width: canvas.width,
36352
+ height: canvas.height,
36353
+ dpr: vglobal.devicePixelRatio
36354
+ }),
36355
+ ctx = c.getContext("2d");
36356
+ return ctx ? (ctx.filter = `blur(${radius}px)`, ctx.drawImage(canvas, 0, 0), ctx.filter = "none", c) : canvas;
36357
+ }
36358
+ applyDownsampleBlur(imageData, radius) {
36359
+ const {
36360
+ width: width,
36361
+ height: height
36362
+ } = imageData,
36363
+ downsample = Math.max(1, Math.floor(radius / 2)),
36364
+ smallWidth = Math.floor(width / downsample),
36365
+ smallHeight = Math.floor(height / downsample),
36366
+ tempCanvas = vglobal.createCanvas({
36367
+ width: smallWidth,
36368
+ height: smallHeight,
36369
+ dpr: 1
36370
+ }),
36371
+ tempCtx = tempCanvas.getContext("2d");
36372
+ if (!tempCtx) return imageData;
36373
+ const originalCanvas = vglobal.createCanvas({
36374
+ width: width,
36375
+ height: height,
36376
+ dpr: 1
36377
+ }),
36378
+ originalCtx = originalCanvas.getContext("2d");
36379
+ return originalCtx ? (originalCtx.putImageData(imageData, 0, 0), tempCtx.drawImage(originalCanvas, 0, 0, smallWidth, smallHeight), tempCtx.filter = `blur(${radius / downsample}px)`, tempCtx.drawImage(tempCanvas, 0, 0), tempCtx.filter = "none", originalCtx.clearRect(0, 0, width, height), originalCtx.drawImage(tempCanvas, 0, 0, width, height), originalCtx.getImageData(0, 0, width, height)) : imageData;
36380
+ }
36381
+ afterStageRender(stage, canvas) {
36382
+ if (this.blurConfig.blurRadius <= 0) return canvas;
36383
+ let result;
36384
+ if (this.blurConfig.useOptimizedBlur) result = this.applyCSSBlur(canvas, this.blurConfig.blurRadius);else {
36385
+ const c = vglobal.createCanvas({
36386
+ width: canvas.width,
36387
+ height: canvas.height,
36388
+ dpr: vglobal.devicePixelRatio
36389
+ }),
36390
+ ctx = c.getContext("2d");
36391
+ if (!ctx) return !1;
36392
+ ctx.clearRect(0, 0, canvas.width, canvas.height), ctx.drawImage(canvas, 0, 0);
36393
+ const imageData = ctx.getImageData(0, 0, canvas.width, canvas.height),
36394
+ blurredImageData = this.applyDownsampleBlur(imageData, this.blurConfig.blurRadius);
36395
+ ctx.putImageData(blurredImageData, 0, 0), result = c;
36396
+ }
36397
+ const ctx = result.getContext("2d");
36398
+ return ctx && (ctx.globalCompositeOperation = "overlay", ctx.fillStyle = "rgba(255, 255, 255, 0.1)", ctx.fillRect(0, 0, result.width, result.height), ctx.globalCompositeOperation = "source-over"), result;
36399
+ }
36400
+ }
36401
+
36402
+ class Pixelation extends DisappearAnimateBase {
36403
+ constructor(from, to, duration, easing, params) {
36404
+ var _a, _b;
36405
+ super(from, to, duration, easing, params), this.pixelationConfig = {
36406
+ maxPixelSize: (null === (_a = null == params ? void 0 : params.options) || void 0 === _a ? void 0 : _a.maxPixelSize) || 20,
36407
+ method: (null === (_b = null == params ? void 0 : params.options) || void 0 === _b ? void 0 : _b.method) || "out"
36408
+ };
36409
+ }
36410
+ applyDownsamplePixelation(canvas, pixelSize) {
36411
+ if (pixelSize <= 1) return canvas;
36412
+ const {
36413
+ width: width,
36414
+ height: height
36415
+ } = canvas,
36416
+ smallWidth = Math.ceil(width / pixelSize),
36417
+ smallHeight = Math.ceil(height / pixelSize),
36418
+ smallCanvas = vglobal.createCanvas({
36419
+ width: smallWidth,
36420
+ height: smallHeight,
36421
+ dpr: 1
36422
+ }),
36423
+ smallCtx = smallCanvas.getContext("2d");
36424
+ if (!smallCtx) return canvas;
36425
+ const outputCanvas = vglobal.createCanvas({
36426
+ width: width,
36427
+ height: height,
36428
+ dpr: vglobal.devicePixelRatio
36429
+ }),
36430
+ outputCtx = outputCanvas.getContext("2d");
36431
+ return outputCtx ? (smallCtx.imageSmoothingEnabled = !1, outputCtx.imageSmoothingEnabled = !1, smallCtx.drawImage(canvas, 0, 0, smallWidth, smallHeight), outputCtx.drawImage(smallCanvas, 0, 0, width, height), outputCanvas) : canvas;
36432
+ }
36433
+ updateAnimationProgress() {
36434
+ if ("in" === this.pixelationConfig.method) {
36435
+ return this.pixelationConfig.maxPixelSize - this.currentAnimationRatio * (this.pixelationConfig.maxPixelSize - 1);
36436
+ }
36437
+ return 1 + this.currentAnimationRatio * (this.pixelationConfig.maxPixelSize - 1);
36438
+ }
36439
+ afterStageRender(stage, canvas) {
36440
+ const currentPixelSize = this.updateAnimationProgress();
36441
+ if (currentPixelSize <= 1) return canvas;
36442
+ return this.applyDownsamplePixelation(canvas, currentPixelSize);
36443
+ }
36444
+ }
36445
+
35146
36446
  const registerCustomAnimate = () => {
35147
- AnimateExecutor.registerBuiltInAnimate("increaseCount", IncreaseCount), AnimateExecutor.registerBuiltInAnimate("fromTo", FromTo), AnimateExecutor.registerBuiltInAnimate("scaleIn", ScaleIn), AnimateExecutor.registerBuiltInAnimate("scaleOut", ScaleOut), AnimateExecutor.registerBuiltInAnimate("growHeightIn", GrowHeightIn), AnimateExecutor.registerBuiltInAnimate("growHeightOut", GrowHeightOut), AnimateExecutor.registerBuiltInAnimate("growWidthIn", GrowWidthIn), AnimateExecutor.registerBuiltInAnimate("growWidthOut", GrowWidthOut), AnimateExecutor.registerBuiltInAnimate("growCenterIn", GrowCenterIn), AnimateExecutor.registerBuiltInAnimate("growCenterOut", GrowCenterOut), AnimateExecutor.registerBuiltInAnimate("clipIn", ClipIn), AnimateExecutor.registerBuiltInAnimate("clipOut", ClipOut), AnimateExecutor.registerBuiltInAnimate("fadeIn", FadeIn), AnimateExecutor.registerBuiltInAnimate("fadeOut", FadeOut), AnimateExecutor.registerBuiltInAnimate("growPointsIn", GrowPointsIn), AnimateExecutor.registerBuiltInAnimate("growPointsOut", GrowPointsOut), AnimateExecutor.registerBuiltInAnimate("growPointsXIn", GrowPointsXIn), AnimateExecutor.registerBuiltInAnimate("growPointsXOut", GrowPointsXOut), AnimateExecutor.registerBuiltInAnimate("growPointsYIn", GrowPointsYIn), AnimateExecutor.registerBuiltInAnimate("growPointsYOut", GrowPointsYOut), AnimateExecutor.registerBuiltInAnimate("growAngleIn", GrowAngleIn), AnimateExecutor.registerBuiltInAnimate("growAngleOut", GrowAngleOut), AnimateExecutor.registerBuiltInAnimate("growRadiusIn", GrowRadiusIn), AnimateExecutor.registerBuiltInAnimate("growRadiusOut", GrowRadiusOut), AnimateExecutor.registerBuiltInAnimate("moveIn", MoveIn), AnimateExecutor.registerBuiltInAnimate("moveOut", MoveOut), AnimateExecutor.registerBuiltInAnimate("rotateIn", RotateIn), AnimateExecutor.registerBuiltInAnimate("rotateOut", RotateOut), AnimateExecutor.registerBuiltInAnimate("update", Update), AnimateExecutor.registerBuiltInAnimate("state", State), AnimateExecutor.registerBuiltInAnimate("labelItemAppear", LabelItemAppear), AnimateExecutor.registerBuiltInAnimate("labelItemDisappear", LabelItemDisappear), AnimateExecutor.registerBuiltInAnimate("poptipAppear", PoptipAppear), AnimateExecutor.registerBuiltInAnimate("poptipDisappear", PoptipDisappear), AnimateExecutor.registerBuiltInAnimate("inputText", InputText), AnimateExecutor.registerBuiltInAnimate("inputRichText", InputRichText), AnimateExecutor.registerBuiltInAnimate("outputRichText", OutputRichText), AnimateExecutor.registerBuiltInAnimate("slideRichText", SlideRichText), AnimateExecutor.registerBuiltInAnimate("slideOutRichText", SlideOutRichText), AnimateExecutor.registerBuiltInAnimate("slideIn", SlideIn), AnimateExecutor.registerBuiltInAnimate("growIn", GrowIn), AnimateExecutor.registerBuiltInAnimate("spinIn", SpinIn), AnimateExecutor.registerBuiltInAnimate("moveScaleIn", MoveScaleIn), AnimateExecutor.registerBuiltInAnimate("moveRotateIn", MoveRotateIn), AnimateExecutor.registerBuiltInAnimate("strokeIn", StrokeIn), AnimateExecutor.registerBuiltInAnimate("slideOut", SlideOut), AnimateExecutor.registerBuiltInAnimate("growOut", GrowOut), AnimateExecutor.registerBuiltInAnimate("spinOut", SpinOut), AnimateExecutor.registerBuiltInAnimate("moveScaleOut", MoveScaleOut), AnimateExecutor.registerBuiltInAnimate("moveRotateOut", MoveRotateOut), AnimateExecutor.registerBuiltInAnimate("strokeOut", StrokeOut), AnimateExecutor.registerBuiltInAnimate("pulse", PulseAnimate), AnimateExecutor.registerBuiltInAnimate("MotionPath", MotionPath), AnimateExecutor.registerBuiltInAnimate("streamLight", StreamLight);
36447
+ AnimateExecutor.registerBuiltInAnimate("increaseCount", IncreaseCount), AnimateExecutor.registerBuiltInAnimate("fromTo", FromTo), AnimateExecutor.registerBuiltInAnimate("scaleIn", ScaleIn), AnimateExecutor.registerBuiltInAnimate("scaleOut", ScaleOut), AnimateExecutor.registerBuiltInAnimate("growHeightIn", GrowHeightIn), AnimateExecutor.registerBuiltInAnimate("growHeightOut", GrowHeightOut), AnimateExecutor.registerBuiltInAnimate("growWidthIn", GrowWidthIn), AnimateExecutor.registerBuiltInAnimate("growWidthOut", GrowWidthOut), AnimateExecutor.registerBuiltInAnimate("growCenterIn", GrowCenterIn), AnimateExecutor.registerBuiltInAnimate("growCenterOut", GrowCenterOut), AnimateExecutor.registerBuiltInAnimate("clipIn", ClipIn), AnimateExecutor.registerBuiltInAnimate("clipOut", ClipOut), AnimateExecutor.registerBuiltInAnimate("fadeIn", FadeIn), AnimateExecutor.registerBuiltInAnimate("fadeOut", FadeOut), AnimateExecutor.registerBuiltInAnimate("growPointsIn", GrowPointsIn), AnimateExecutor.registerBuiltInAnimate("growPointsOut", GrowPointsOut), AnimateExecutor.registerBuiltInAnimate("growPointsXIn", GrowPointsXIn), AnimateExecutor.registerBuiltInAnimate("growPointsXOut", GrowPointsXOut), AnimateExecutor.registerBuiltInAnimate("growPointsYIn", GrowPointsYIn), AnimateExecutor.registerBuiltInAnimate("growPointsYOut", GrowPointsYOut), AnimateExecutor.registerBuiltInAnimate("growAngleIn", GrowAngleIn), AnimateExecutor.registerBuiltInAnimate("growAngleOut", GrowAngleOut), AnimateExecutor.registerBuiltInAnimate("growRadiusIn", GrowRadiusIn), AnimateExecutor.registerBuiltInAnimate("growRadiusOut", GrowRadiusOut), AnimateExecutor.registerBuiltInAnimate("moveIn", MoveIn), AnimateExecutor.registerBuiltInAnimate("moveOut", MoveOut), AnimateExecutor.registerBuiltInAnimate("rotateIn", RotateIn), AnimateExecutor.registerBuiltInAnimate("rotateOut", RotateOut), AnimateExecutor.registerBuiltInAnimate("update", Update), AnimateExecutor.registerBuiltInAnimate("state", State), AnimateExecutor.registerBuiltInAnimate("labelItemAppear", LabelItemAppear), AnimateExecutor.registerBuiltInAnimate("labelItemDisappear", LabelItemDisappear), AnimateExecutor.registerBuiltInAnimate("poptipAppear", PoptipAppear), AnimateExecutor.registerBuiltInAnimate("poptipDisappear", PoptipDisappear), AnimateExecutor.registerBuiltInAnimate("inputText", InputText), AnimateExecutor.registerBuiltInAnimate("inputRichText", InputRichText), AnimateExecutor.registerBuiltInAnimate("outputRichText", OutputRichText), AnimateExecutor.registerBuiltInAnimate("slideRichText", SlideRichText), AnimateExecutor.registerBuiltInAnimate("slideOutRichText", SlideOutRichText), AnimateExecutor.registerBuiltInAnimate("slideIn", SlideIn), AnimateExecutor.registerBuiltInAnimate("growIn", GrowIn), AnimateExecutor.registerBuiltInAnimate("spinIn", SpinIn), AnimateExecutor.registerBuiltInAnimate("moveScaleIn", MoveScaleIn), AnimateExecutor.registerBuiltInAnimate("moveRotateIn", MoveRotateIn), AnimateExecutor.registerBuiltInAnimate("strokeIn", StrokeIn), AnimateExecutor.registerBuiltInAnimate("slideOut", SlideOut), AnimateExecutor.registerBuiltInAnimate("growOut", GrowOut), AnimateExecutor.registerBuiltInAnimate("spinOut", SpinOut), AnimateExecutor.registerBuiltInAnimate("moveScaleOut", MoveScaleOut), AnimateExecutor.registerBuiltInAnimate("moveRotateOut", MoveRotateOut), AnimateExecutor.registerBuiltInAnimate("strokeOut", StrokeOut), AnimateExecutor.registerBuiltInAnimate("pulse", PulseAnimate), AnimateExecutor.registerBuiltInAnimate("MotionPath", MotionPath), AnimateExecutor.registerBuiltInAnimate("streamLight", StreamLight), AnimateExecutor.registerBuiltInAnimate("dissolve", Dissolve), AnimateExecutor.registerBuiltInAnimate("grayscale", Grayscale), AnimateExecutor.registerBuiltInAnimate("distortion", Distortion), AnimateExecutor.registerBuiltInAnimate("particle", Particle), AnimateExecutor.registerBuiltInAnimate("glitch", Glitch), AnimateExecutor.registerBuiltInAnimate("gaussianBlur", GaussianBlur), AnimateExecutor.registerBuiltInAnimate("pixelation", Pixelation);
35148
36448
  };
35149
36449
 
35150
- const version = "1.0.12";
36450
+ const version = "1.0.13";
35151
36451
  preLoadAllModule();
35152
36452
  if (isBrowserEnv()) {
35153
36453
  loadBrowserEnv(container);
@@ -35183,4 +36483,4 @@ registerOrthoCamera();
35183
36483
  registerCustomAnimate();
35184
36484
  registerAnimate();
35185
36485
 
35186
- export { AComponentAnimate, ACustomAnimate, ARC3D_NUMBER_TYPE, ARC_NUMBER_TYPE, AREA_NUMBER_TYPE, AStageAnimate, AbstractGraphicRender, Animate, AnimateExecutor, AnimateMode, AnimateStatus, Step as AnimateStep, AnimateStepType, AnimationStateManager, AnimationStateStore, AnimationStates, AnimationTransitionRegistry, Application, Arc, Arc3d, Arc3dRender, ArcRender, ArcRenderContribution, Area, AreaRender, AreaRenderContribution, AttributeUpdateType, AutoEnablePlugins, BaseCanvas, BaseEnvContribution, BaseRender, BaseRenderContributionTime, BaseWindowHandlerContribution, Basis, BeforeRenderConstribution, BoundsContext, BoundsPicker, BrowserEnvContribution, CIRCLE_NUMBER_TYPE, Canvas3DDrawItemInterceptor, Canvas3DPickItemInterceptor, CanvasArc3dPicker, CanvasArcPicker, CanvasAreaPicker, CanvasCirclePicker, CanvasFactory, CanvasGifImagePicker, CanvasGlyphPicker, CanvasGroupPicker, CanvasImagePicker, CanvasLinePicker, CanvasLottiePicker, CanvasPathPicker, CanvasPickerContribution, CanvasPolygonPicker, CanvasPyramid3dPicker, CanvasRect3dPicker, CanvasRectPicker, CanvasRichTextPicker, CanvasStarPicker, CanvasSymbolPicker, CanvasTextLayout, CanvasTextPicker, Circle, CircleRender, CircleRenderContribution, ClipAngleAnimate, ClipDirectionAnimate, ClipGraphicAnimate, ClipIn, ClipOut, ClipRadiusAnimate, ColorInterpolate, ColorStore, ColorType, CommonDrawItemInterceptorContribution, CommonRenderContribution, ComponentAnimator, Container, ContainerModule, Context2dFactory, ContributionProvider, ContributionStore, CubicBezierCurve, CurveContext, CurveTypeEnum, CustomEvent, CustomPath2D, CustomSymbolClass, DEFAULT_TEXT_FONT_FAMILY, DebugDrawItemInterceptorContribution, DefaultArcAllocate, DefaultArcAttribute, DefaultArcRenderContribution, DefaultAreaAllocate, DefaultAreaAttribute, DefaultAreaTextureRenderContribution, DefaultAttribute, DefaultBaseBackgroundRenderContribution, DefaultBaseClipRenderAfterContribution, DefaultBaseClipRenderBeforeContribution, DefaultBaseInteractiveRenderContribution, DefaultBaseTextureRenderContribution, DefaultCanvasAllocate, DefaultCanvasArcRender, DefaultCanvasAreaRender, DefaultCanvasCircleRender, DefaultCanvasGroupRender, DefaultCanvasImageRender, DefaultCanvasLineRender, DefaultCanvasPathRender, DefaultCanvasPolygonRender, DefaultCanvasRectRender, DefaultCanvasSymbolRender, DefaultCanvasTextRender, DefaultCircleAllocate, DefaultCircleAttribute, DefaultCircleRenderContribution, DefaultConnectAttribute, DefaultDebugAttribute, DefaultFillStyle, DefaultGlobal, DefaultGlobalPickerService, DefaultGlyphAttribute, DefaultGraphicAllocate, DefaultGraphicMemoryManager, DefaultGraphicService, DefaultGraphicUtil, DefaultGroupAttribute, DefaultGroupBackgroundRenderContribution, DefaultImageAttribute, DefaultImageRenderContribution, DefaultLayerService, DefaultLayout, DefaultLineAllocate, DefaultLineAttribute, DefaultMat4Allocate, DefaultMatrixAllocate, DefaultPathAllocate, DefaultPathAttribute, DefaultPickService, DefaultPickStyle, DefaultPolygonAttribute, DefaultRect3dAttribute, DefaultRectAllocate, DefaultRectAttribute, DefaultRectRenderContribution, DefaultRenderService, DefaultRichTextAttribute, DefaultRichTextIconAttribute, DefaultStarAttribute, DefaultStrokeStyle, DefaultStyle, DefaultSymbolAllocate, DefaultSymbolAttribute, DefaultSymbolClipRangeStrokeRenderContribution, DefaultSymbolRenderContribution, DefaultTextAllocate, DefaultTextAttribute, DefaultTextMeasureContribution, DefaultTextStyle, DefaultTicker, DefaultTimeline, DefaultTransform, DefaultTransformUtil, DefaultWindow, Direction, DirectionalLight, DragNDrop, DrawContribution, DrawItemInterceptor, DynamicLayerHandlerContribution, Easing, Edge, EditModule, EmptyContext2d, EnvContribution, EventManager, EventSystem, EventTarget, FORMAT_ALL_TEXT_COMMAND, FORMAT_ELEMENT_COMMAND, FORMAT_TEXT_COMMAND, Factory, FadeIn, FadeOut, FederatedEvent, FederatedMouseEvent, FederatedPointerEvent, FederatedWheelEvent, FlexLayoutPlugin, Fragment, FromTo, GLYPH_NUMBER_TYPE, GRAPHIC_UPDATE_TAG_KEY, GROUP_NUMBER_TYPE, Generator, Gesture, GifImage, GlobalPickerService, Glyph, GlyphRender, Graphic, GraphicCreator$1 as GraphicCreator, GraphicPicker, GraphicRender, GraphicService, GraphicStateExtension, GraphicUtil, Group, GroupFadeIn, GroupFadeOut, GroupRender, GroupRenderContribution, GroupUpdateAABBBoundsMode, GrowAngleIn, GrowAngleOut, GrowCenterIn, GrowCenterOut, GrowHeightIn, GrowHeightOut, GrowIn, GrowOut, GrowPointsIn, GrowPointsOut, GrowPointsXIn, GrowPointsXOut, GrowPointsYIn, GrowPointsYOut, GrowRadiusIn, GrowRadiusOut, GrowWidthIn, GrowWidthOut, HtmlAttributePlugin, IContainPointMode, IMAGE_NUMBER_TYPE, Image$1 as Image, ImageRender, ImageRenderContribution, IncreaseCount, IncrementalDrawContribution, InputRichText, InputText, InteractiveDrawItemInterceptorContribution, InteractivePickItemInterceptorContribution, InteractiveSubRenderContribution, LINE_NUMBER_TYPE, LabelItemAppear, LabelItemDisappear, Layer, LayerService, Line$1 as Line, LineRender, Linear, LinearClosed, Lottie, ManualTicker, Mat4Allocate, MathArcPicker, MathAreaPicker, MathCirclePicker, MathGlyphPicker, MathImagePicker, MathLinePicker, MathPathPicker, MathPickerContribution, MathPolygonPicker, MathRectPicker, MathSymbolPicker, MathTextPicker, MatrixAllocate, MeasureModeEnum, MonotoneX, MonotoneY, MorphingPath, MotionPath, MoveIn, MoveOut, MoveRotateIn, MoveRotateOut, MoveScaleIn, MoveScaleOut, MultiToOneMorphingPath, NOWORK_ANIMATE_ATTR, Node, OrthoCamera, OutputRichText, PATH_NUMBER_TYPE, POLYGON_NUMBER_TYPE, PURE_STYLE_KEY, PYRAMID3D_NUMBER_TYPE, Path, PathRender, PathRenderContribution, PerformanceRAF, PickItemInterceptor, PickServiceInterceptor, PickerService, PluginService, Polygon, PolygonRender, PolygonRenderContribution, PoptipAppear, PoptipDisappear, PulseAnimate, Pyramid3d, Pyramid3dRender, REACT_TO_CANOPUS_EVENTS, REACT_TO_CANOPUS_EVENTS_LIST, RECT3D_NUMBER_TYPE, RECT_NUMBER_TYPE, RICHTEXT_NUMBER_TYPE, RafBasedSTO, ReactAttributePlugin, Rect, Rect3DRender, Rect3d, RectRender, RectRenderContribution, ReflectSegContext, RenderSelector, RenderService, ResourceLoader, RichText, RichTextEditPlugin, RichTextRender, RotateBySphereAnimate, RotateIn, RotateOut, STAR_NUMBER_TYPE, STATUS$1 as STATUS, SVG_ATTRIBUTE_MAP, SVG_ATTRIBUTE_MAP_KEYS, SVG_PARSE_ATTRIBUTE_MAP, SVG_PARSE_ATTRIBUTE_MAP_KEYS, SYMBOL_NUMBER_TYPE, ScaleIn, ScaleOut, SegContext, ShadowPickServiceInterceptorContribution, ShadowRoot, ShadowRootDrawItemInterceptorContribution, ShadowRootPickItemInterceptorContribution, SlideIn, SlideOut, SlideOutRichText, SlideRichText, SpinIn, SpinOut, SplitRectAfterRenderContribution, SplitRectBeforeRenderContribution, Stage, Star, StarRender, StarRenderContribution, State, StaticLayerHandlerContribution, Step$1 as Step, StepClosed, StreamLight, StrokeIn, StrokeOut, Symbol$1 as Symbol, SymbolRender, SymbolRenderContribution, TEXT_NUMBER_TYPE, TagPointsUpdate, Text, TextDirection, TextMeasureContribution, TextRender, TextRenderContribution, Theme, TransformUtil, Update, UpdateTag, VArc, VArc3d, VArea, VCircle, VGlobal, VGlyph, VGroup, VImage, VLine, VPath, VPolygon, VPyramid3d, VRect, VRect3d, VRichText, VSymbol, VText, VWindow, ViewTransform3dPlugin, VirtualLayerHandlerContribution, WILDCARD, WindowHandlerContribution, WrapText, XMLParser, _calculateLineHeight, _interpolateColor, _registerArc, addArcToBezierPath$1 as addArcToBezierPath, addAttributeToPrototype, alignBezierCurves, alignSubpath, alternatingWave, application, applyTransformOnBezierCurves, arc3dCanvasPickModule, arc3dModule, arcCanvasPickModule, arcMathPickModule, arcModule, areaCanvasPickModule, areaMathPickModule, areaModule, bezier, bezierCurversToPath, binarySplitPolygon, bindContributionProvider, bindContributionProviderNoSingletonScope, boundStroke, browserEnvModule, builtInSymbolStrMap, builtinSymbols, builtinSymbolsMap, calcLineCache, calculateArcCornerRadius, calculateLineHeight, canvasAllocate, centerToCorner, centroidOfSubpath, circleBounds, circleCanvasPickModule, circleMathPickModule, circleModule, clock, colorEqual, colorStringInterpolationToStr, columnCenterToEdge, columnEdgeToCenter, columnLeftToRight, columnRightToLeft, container, cornerTangents, cornerToCenter, createArc, createArc3d, createArea, createCanvasEventTransformer, createCircle, createColor, createComponentAnimator, createConicalGradient, createEventTransformer, createGifImage, createGlyph, createGroup, createImage, createImageElement$1 as createImageElement, createLine, createLottie, createMat4, createPath, createPolygon, createPyramid3d, createRect, createRect3d, createRectPath, createRichText, createShadowRoot, createStage, createStar, createSymbol, createText, createWrapText, cubicCalc, cubicLength, cubicPointAt, cubicSubdivide, decodeReactDom, defaultArcAllocate, defaultArcBackgroundRenderContribution, defaultArcRenderContribution, defaultArcTextureRenderContribution, defaultAreaAllocate, defaultBaseBackgroundRenderContribution, defaultBaseClipRenderAfterContribution, defaultBaseClipRenderBeforeContribution, defaultBaseTextureRenderContribution, defaultCircleAllocate, defaultCircleBackgroundRenderContribution, defaultCircleRenderContribution, defaultCircleTextureRenderContribution, defaultGraphicMemoryManager, defaultGroupBackgroundRenderContribution, defaultImageBackgroundRenderContribution, defaultImageRenderContribution, defaultLineAllocate, defaultPathAllocate, defaultRectAllocate, defaultRectBackgroundRenderContribution, defaultRectRenderContribution, defaultRectTextureRenderContribution, defaultStarBackgroundRenderContribution, defaultStarTextureRenderContribution, defaultSymbolAllocate, defaultSymbolBackgroundRenderContribution, defaultSymbolClipRangeStrokeRenderContribution, defaultSymbolRenderContribution, defaultSymbolTextureRenderContribution, defaultTextAllocate, diagonalCenterToEdge, diagonalTopLeftToBottomRight, diff, divideCubic, drawArc, drawArcPath$1 as drawArcPath, drawAreaSegments, drawIncrementalAreaSegments, drawIncrementalSegments, drawSegments, enumCommandMap, feishuEnvModule, fillVisible, findBestMorphingRotation, findConfigIndexByCursorIdx, findCursorIdxByConfigIndex, findNextGraphic, flatten_simplify, foreach, foreachAsync, genBasisSegments, genBasisTypeSegments, genLinearClosedSegments, genLinearClosedTypeSegments, genLinearSegments, genLinearTypeSegments, genMonotoneXSegments, genMonotoneXTypeSegments, genMonotoneYSegments, genMonotoneYTypeSegments, genNumberType, genStepClosedSegments, genStepSegments, genStepTypeSegments, generatorPathEasingFunc, getAttributeFromDefaultAttrList, getConicGradientAt, getCurrentEnv, getDefaultCharacterConfig, getExtraModelMatrix, getModelMatrix, getRichTextBounds, getScaledStroke, getTextBounds, getTheme, getThemeFromGroup, gifImageCanvasPickModule, gifImageModule, globalTheme, glyphCanvasPickModule, glyphMathPickModule, glyphModule, graphicCreator, graphicService, graphicUtil, harmonyEnvModule, identityMat4, imageCanvasPickModule, imageMathPickModule, imageModule, incrementalAddTo, initAllEnv, initBrowserEnv, initFeishuEnv, initHarmonyEnv, initLynxEnv, initNodeEnv, initTTEnv, initTaroEnv, initWxEnv, inject, injectable, interpolateColor, interpolateGradientConicalColor, interpolateGradientLinearColor, interpolateGradientRadialColor, interpolatePureColorArray, interpolatePureColorArrayToStr, intersect, isBrowserEnv, isNodeEnv, isSvg, isXML, jsx, layerService, lineCanvasPickModule, lineMathPickModule, lineModule, loadAllEnv, loadAllModule, loadBrowserEnv, loadFeishuEnv, loadHarmonyEnv, loadLynxEnv, loadNodeEnv, loadTTEnv, loadTaroEnv, loadWxEnv, lookAt, lottieCanvasPickModule, lottieModule, lynxEnvModule, mapToCanvasPointForCanvas, mat3Tomat4, mat4Allocate, matrixAllocate, morphPath, multiInject, multiToOneMorph, multiplyMat4Mat3, multiplyMat4Mat4, named, newThemeObj, nodeEnvModule, oneToMultiMorph, ortho, parsePadding, parseStroke, parseSvgPath, particleEffect, pathCanvasPickModule, pathMathPickModule, pathModule, pathToBezierCurves, point$3 as point, pointEqual, pointInterpolation, pointInterpolationHighPerformance, pointsEqual, pointsInterpolation, polygonCanvasPickModule, polygonMathPickModule, polygonModule, preLoadAllModule, pulseWave, pyramid3dCanvasPickModule, pyramid3dModule, quadCalc, quadLength, quadPointAt, rafBasedSto, randomOpacity, rect3dCanvasPickModule, rect3dModule, rectCanvasPickModule, rectFillVisible, rectMathPickModule, rectModule, rectStrokeVisible, recursiveCallBinarySplit, registerAnimate, registerArc, registerArc3d, registerArc3dGraphic, registerArcGraphic, registerArea, registerAreaGraphic, registerCircle, registerCircleGraphic, registerCustomAnimate, registerDirectionalLight, registerFlexLayoutPlugin, registerGifGraphic, registerGifImage, registerGlobalEventTransformer, registerGlyph, registerGlyphGraphic, registerGroup, registerGroupGraphic, registerHtmlAttributePlugin, registerImage, registerImageGraphic, registerLine, registerLineGraphic, registerOrthoCamera, registerPath, registerPathGraphic, registerPolygon, registerPolygonGraphic, registerPyramid3d, registerPyramid3dGraphic, registerReactAttributePlugin, registerRect, registerRect3d, registerRect3dGraphic, registerRectGraphic, registerRichtext, registerRichtextGraphic, registerShadowRoot, registerShadowRootGraphic, registerStar, registerStarGraphic, registerSymbol, registerSymbolGraphic, registerText, registerTextGraphic, registerViewTransform3dPlugin, registerWindowEventTransformer, registerWrapText, registerWrapTextGraphic, renderCommandList, renderService, rewriteProto, richTextMathPickModule, richtextCanvasPickModule, richtextModule, rippleEffect, rotateX, rotateY, rotateZ, rotationScan, roughModule, rowBottomToTop, rowCenterToEdge, rowEdgeToCenter, rowTopToBottom, runFill, runStroke, scaleMat4, segments, shouldUseMat4, snakeWave, snapLength, spiralEffect, splitArc, splitArea, splitCircle, splitLine, splitPath, splitPolygon, splitRect, splitToGrids, starModule, strCommandMap, strokeVisible, symbolCanvasPickModule, symbolMathPickModule, symbolModule, taroEnvModule, textAttributesToStyle, textCanvasPickModule, textDrawOffsetX, textDrawOffsetY, textLayoutOffsetY, textMathPickModule, textModule, transformMat4, transformPointForCanvas, transformUtil, transitionRegistry, translate, ttEnvModule, version, verticalLayout, vglobal, waitForAllSubLayers, wrapCanvas, wrapContext, wxEnvModule, xul };
36486
+ export { AComponentAnimate, ACustomAnimate, ARC3D_NUMBER_TYPE, ARC_NUMBER_TYPE, AREA_NUMBER_TYPE, AStageAnimate, AbstractGraphicRender, Animate, AnimateExecutor, AnimateMode, AnimateStatus, Step as AnimateStep, AnimateStepType, AnimationStateManager, AnimationStateStore, AnimationStates, AnimationTransitionRegistry, Application, Arc, Arc3d, Arc3dRender, ArcRender, ArcRenderContribution, Area, AreaRender, AreaRenderContribution, AttributeUpdateType, AutoEnablePlugins, BaseCanvas, BaseEnvContribution, BaseRender, BaseRenderContributionTime, BaseWindowHandlerContribution, Basis, BeforeRenderConstribution, BoundsContext, BoundsPicker, BrowserEnvContribution, CIRCLE_NUMBER_TYPE, Canvas3DDrawItemInterceptor, Canvas3DPickItemInterceptor, CanvasArc3dPicker, CanvasArcPicker, CanvasAreaPicker, CanvasCirclePicker, CanvasFactory, CanvasGifImagePicker, CanvasGlyphPicker, CanvasGroupPicker, CanvasImagePicker, CanvasLinePicker, CanvasLottiePicker, CanvasPathPicker, CanvasPickerContribution, CanvasPolygonPicker, CanvasPyramid3dPicker, CanvasRect3dPicker, CanvasRectPicker, CanvasRichTextPicker, CanvasStarPicker, CanvasSymbolPicker, CanvasTextLayout, CanvasTextPicker, Circle, CircleRender, CircleRenderContribution, ClipAngleAnimate, ClipDirectionAnimate, ClipGraphicAnimate, ClipIn, ClipOut, ClipRadiusAnimate, ColorInterpolate, ColorStore, ColorType, CommonDrawItemInterceptorContribution, CommonRenderContribution, ComponentAnimator, Container, ContainerModule, Context2dFactory, ContributionProvider, ContributionStore, CubicBezierCurve, CurveContext, CurveTypeEnum, CustomEvent, CustomPath2D, CustomSymbolClass, DEFAULT_TEXT_FONT_FAMILY, DebugDrawItemInterceptorContribution, DefaultArcAllocate, DefaultArcAttribute, DefaultArcRenderContribution, DefaultAreaAllocate, DefaultAreaAttribute, DefaultAreaTextureRenderContribution, DefaultAttribute, DefaultBaseBackgroundRenderContribution, DefaultBaseClipRenderAfterContribution, DefaultBaseClipRenderBeforeContribution, DefaultBaseInteractiveRenderContribution, DefaultBaseTextureRenderContribution, DefaultCanvasAllocate, DefaultCanvasArcRender, DefaultCanvasAreaRender, DefaultCanvasCircleRender, DefaultCanvasGroupRender, DefaultCanvasImageRender, DefaultCanvasLineRender, DefaultCanvasPathRender, DefaultCanvasPolygonRender, DefaultCanvasRectRender, DefaultCanvasSymbolRender, DefaultCanvasTextRender, DefaultCircleAllocate, DefaultCircleAttribute, DefaultCircleRenderContribution, DefaultConnectAttribute, DefaultDebugAttribute, DefaultFillStyle, DefaultGlobal, DefaultGlobalPickerService, DefaultGlyphAttribute, DefaultGraphicAllocate, DefaultGraphicMemoryManager, DefaultGraphicService, DefaultGraphicUtil, DefaultGroupAttribute, DefaultGroupBackgroundRenderContribution, DefaultImageAttribute, DefaultImageRenderContribution, DefaultLayerService, DefaultLayout, DefaultLineAllocate, DefaultLineAttribute, DefaultMat4Allocate, DefaultMatrixAllocate, DefaultPathAllocate, DefaultPathAttribute, DefaultPickService, DefaultPickStyle, DefaultPolygonAttribute, DefaultRect3dAttribute, DefaultRectAllocate, DefaultRectAttribute, DefaultRectRenderContribution, DefaultRenderService, DefaultRichTextAttribute, DefaultRichTextIconAttribute, DefaultStarAttribute, DefaultStrokeStyle, DefaultStyle, DefaultSymbolAllocate, DefaultSymbolAttribute, DefaultSymbolClipRangeStrokeRenderContribution, DefaultSymbolRenderContribution, DefaultTextAllocate, DefaultTextAttribute, DefaultTextMeasureContribution, DefaultTextStyle, DefaultTicker, DefaultTimeline, DefaultTransform, DefaultTransformUtil, DefaultWindow, Direction, DirectionalLight, Dissolve, Distortion, DragNDrop, DrawContribution, DrawItemInterceptor, DynamicLayerHandlerContribution, Easing, Edge, EditModule, EmptyContext2d, EnvContribution, EventManager, EventSystem, EventTarget, FORMAT_ALL_TEXT_COMMAND, FORMAT_ELEMENT_COMMAND, FORMAT_TEXT_COMMAND, Factory, FadeIn, FadeOut, FederatedEvent, FederatedMouseEvent, FederatedPointerEvent, FederatedWheelEvent, FlexLayoutPlugin, Fragment, FromTo, GLYPH_NUMBER_TYPE, GRAPHIC_UPDATE_TAG_KEY, GROUP_NUMBER_TYPE, GaussianBlur, Generator, Gesture, GifImage, Glitch, GlobalPickerService, Glyph, GlyphRender, GradientParser, Graphic, GraphicCreator$1 as GraphicCreator, GraphicPicker, GraphicRender, GraphicService, GraphicStateExtension, GraphicUtil, Grayscale, Group, GroupFadeIn, GroupFadeOut, GroupRender, GroupRenderContribution, GroupUpdateAABBBoundsMode, GrowAngleIn, GrowAngleOut, GrowCenterIn, GrowCenterOut, GrowHeightIn, GrowHeightOut, GrowIn, GrowOut, GrowPointsIn, GrowPointsOut, GrowPointsXIn, GrowPointsXOut, GrowPointsYIn, GrowPointsYOut, GrowRadiusIn, GrowRadiusOut, GrowWidthIn, GrowWidthOut, HtmlAttributePlugin, IContainPointMode, IMAGE_NUMBER_TYPE, Image$1 as Image, ImageRender, ImageRenderContribution, IncreaseCount, IncrementalDrawContribution, InputRichText, InputText, InteractiveDrawItemInterceptorContribution, InteractivePickItemInterceptorContribution, InteractiveSubRenderContribution, LINE_NUMBER_TYPE, LabelItemAppear, LabelItemDisappear, Layer, LayerService, Line$1 as Line, LineRender, Linear, LinearClosed, Lottie, ManualTicker, Mat4Allocate, MathArcPicker, MathAreaPicker, MathCirclePicker, MathGlyphPicker, MathImagePicker, MathLinePicker, MathPathPicker, MathPickerContribution, MathPolygonPicker, MathRectPicker, MathSymbolPicker, MathTextPicker, MatrixAllocate, MeasureModeEnum, MonotoneX, MonotoneY, MorphingPath, MotionPath, MoveIn, MoveOut, MoveRotateIn, MoveRotateOut, MoveScaleIn, MoveScaleOut, MultiToOneMorphingPath, NOWORK_ANIMATE_ATTR, Node, OrthoCamera, OutputRichText, PATH_NUMBER_TYPE, POLYGON_NUMBER_TYPE, PURE_STYLE_KEY, PYRAMID3D_NUMBER_TYPE, Particle, Path, PathRender, PathRenderContribution, PerformanceRAF, PickItemInterceptor, PickServiceInterceptor, PickerService, Pixelation, PluginService, Polygon, PolygonRender, PolygonRenderContribution, PoptipAppear, PoptipDisappear, PulseAnimate, Pyramid3d, Pyramid3dRender, REACT_TO_CANOPUS_EVENTS, REACT_TO_CANOPUS_EVENTS_LIST, RECT3D_NUMBER_TYPE, RECT_NUMBER_TYPE, RICHTEXT_NUMBER_TYPE, RafBasedSTO, ReactAttributePlugin, Rect, Rect3DRender, Rect3d, RectRender, RectRenderContribution, ReflectSegContext, RenderSelector, RenderService, ResourceLoader, RichText, RichTextEditPlugin, RichTextRender, RotateBySphereAnimate, RotateIn, RotateOut, STAR_NUMBER_TYPE, STATUS$1 as STATUS, SVG_ATTRIBUTE_MAP, SVG_ATTRIBUTE_MAP_KEYS, SVG_PARSE_ATTRIBUTE_MAP, SVG_PARSE_ATTRIBUTE_MAP_KEYS, SYMBOL_NUMBER_TYPE, ScaleIn, ScaleOut, SegContext, ShadowPickServiceInterceptorContribution, ShadowRoot, ShadowRootDrawItemInterceptorContribution, ShadowRootPickItemInterceptorContribution, SlideIn, SlideOut, SlideOutRichText, SlideRichText, SpinIn, SpinOut, SplitRectAfterRenderContribution, SplitRectBeforeRenderContribution, Stage, Star, StarRender, StarRenderContribution, State, StaticLayerHandlerContribution, Step$1 as Step, StepClosed, StreamLight, StrokeIn, StrokeOut, Symbol$1 as Symbol, SymbolRender, SymbolRenderContribution, TEXT_NUMBER_TYPE, TagPointsUpdate, Text, TextDirection, TextMeasureContribution, TextRender, TextRenderContribution, Theme, TransformUtil, Update, UpdateTag, VArc, VArc3d, VArea, VCircle, VGlobal, VGlyph, VGroup, VImage, VLine, VPath, VPolygon, VPyramid3d, VRect, VRect3d, VRichText, VSymbol, VText, VWindow, ViewTransform3dPlugin, VirtualLayerHandlerContribution, WILDCARD, WindowHandlerContribution, WrapText, XMLParser, _calculateLineHeight, _interpolateColor, _registerArc, addArcToBezierPath$1 as addArcToBezierPath, addAttributeToPrototype, alignBezierCurves, alignSubpath, alternatingWave, application, applyTransformOnBezierCurves, arc3dCanvasPickModule, arc3dModule, arcCanvasPickModule, arcMathPickModule, arcModule, areaCanvasPickModule, areaMathPickModule, areaModule, bezier, bezierCurversToPath, binarySplitPolygon, bindContributionProvider, bindContributionProviderNoSingletonScope, boundStroke, browserEnvModule, builtInSymbolStrMap, builtinSymbols, builtinSymbolsMap, calcLineCache, calculateArcCornerRadius, calculateLineHeight, canvasAllocate, centerToCorner, centroidOfSubpath, circleBounds, circleCanvasPickModule, circleMathPickModule, circleModule, clock, colorEqual, colorStringInterpolationToStr, columnCenterToEdge, columnEdgeToCenter, columnLeftToRight, columnRightToLeft, container, cornerTangents, cornerToCenter, createArc, createArc3d, createArea, createCanvasEventTransformer, createCircle, createColor, createComponentAnimator, createConicalGradient, createEventTransformer, createGifImage, createGlyph, createGroup, createImage, createImageElement$1 as createImageElement, createLine, createLottie, createMat4, createPath, createPolygon, createPyramid3d, createRect, createRect3d, createRectPath, createRichText, createShadowRoot, createStage, createStar, createSymbol, createText, createWrapText, cubicCalc, cubicLength, cubicPointAt, cubicSubdivide, decodeReactDom, defaultArcAllocate, defaultArcBackgroundRenderContribution, defaultArcRenderContribution, defaultArcTextureRenderContribution, defaultAreaAllocate, defaultBaseBackgroundRenderContribution, defaultBaseClipRenderAfterContribution, defaultBaseClipRenderBeforeContribution, defaultBaseTextureRenderContribution, defaultCircleAllocate, defaultCircleBackgroundRenderContribution, defaultCircleRenderContribution, defaultCircleTextureRenderContribution, defaultGraphicMemoryManager, defaultGroupBackgroundRenderContribution, defaultImageBackgroundRenderContribution, defaultImageRenderContribution, defaultLineAllocate, defaultPathAllocate, defaultRectAllocate, defaultRectBackgroundRenderContribution, defaultRectRenderContribution, defaultRectTextureRenderContribution, defaultStarBackgroundRenderContribution, defaultStarTextureRenderContribution, defaultSymbolAllocate, defaultSymbolBackgroundRenderContribution, defaultSymbolClipRangeStrokeRenderContribution, defaultSymbolRenderContribution, defaultSymbolTextureRenderContribution, defaultTextAllocate, diagonalCenterToEdge, diagonalTopLeftToBottomRight, diff, divideCubic, drawArc, drawArcPath$1 as drawArcPath, drawAreaSegments, drawIncrementalAreaSegments, drawIncrementalSegments, drawSegments, enumCommandMap, feishuEnvModule, fillVisible, findBestMorphingRotation, findConfigIndexByCursorIdx, findCursorIdxByConfigIndex, findNextGraphic, flatten_simplify, foreach, foreachAsync, genBasisSegments, genBasisTypeSegments, genLinearClosedSegments, genLinearClosedTypeSegments, genLinearSegments, genLinearTypeSegments, genMonotoneXSegments, genMonotoneXTypeSegments, genMonotoneYSegments, genMonotoneYTypeSegments, genNumberType, genStepClosedSegments, genStepSegments, genStepTypeSegments, generatorPathEasingFunc, getAttributeFromDefaultAttrList, getConicGradientAt, getCurrentEnv, getDefaultCharacterConfig, getExtraModelMatrix, getModelMatrix, getRichTextBounds, getScaledStroke, getTextBounds, getTheme, getThemeFromGroup, gifImageCanvasPickModule, gifImageModule, globalTheme, glyphCanvasPickModule, glyphMathPickModule, glyphModule, graphicCreator, graphicService, graphicUtil, harmonyEnvModule, identityMat4, imageCanvasPickModule, imageMathPickModule, imageModule, incrementalAddTo, initAllEnv, initBrowserEnv, initFeishuEnv, initHarmonyEnv, initLynxEnv, initNodeEnv, initTTEnv, initTaroEnv, initWxEnv, inject, injectable, interpolateColor, interpolateGradientConicalColor, interpolateGradientLinearColor, interpolateGradientRadialColor, interpolatePureColorArray, interpolatePureColorArrayToStr, intersect, isBrowserEnv, isNodeEnv, isSvg, isXML, jsx, layerService, lineCanvasPickModule, lineMathPickModule, lineModule, loadAllEnv, loadAllModule, loadBrowserEnv, loadFeishuEnv, loadHarmonyEnv, loadLynxEnv, loadNodeEnv, loadTTEnv, loadTaroEnv, loadWxEnv, lookAt, lottieCanvasPickModule, lottieModule, lynxEnvModule, mapToCanvasPointForCanvas, mat3Tomat4, mat4Allocate, matrixAllocate, morphPath, multiInject, multiToOneMorph, multiplyMat4Mat3, multiplyMat4Mat4, named, newThemeObj, nodeEnvModule, oneToMultiMorph, ortho, parsePadding, parseStroke, parseSvgPath, particleEffect, pathCanvasPickModule, pathMathPickModule, pathModule, pathToBezierCurves, point$3 as point, pointEqual, pointInterpolation, pointInterpolationHighPerformance, pointsEqual, pointsInterpolation, polygonCanvasPickModule, polygonMathPickModule, polygonModule, preLoadAllModule, pulseWave, pyramid3dCanvasPickModule, pyramid3dModule, quadCalc, quadLength, quadPointAt, rafBasedSto, randomOpacity, rect3dCanvasPickModule, rect3dModule, rectCanvasPickModule, rectFillVisible, rectMathPickModule, rectModule, rectStrokeVisible, recursiveCallBinarySplit, registerAnimate, registerArc, registerArc3d, registerArc3dGraphic, registerArcGraphic, registerArea, registerAreaGraphic, registerCircle, registerCircleGraphic, registerCustomAnimate, registerDirectionalLight, registerFlexLayoutPlugin, registerGifGraphic, registerGifImage, registerGlobalEventTransformer, registerGlyph, registerGlyphGraphic, registerGroup, registerGroupGraphic, registerHtmlAttributePlugin, registerImage, registerImageGraphic, registerLine, registerLineGraphic, registerOrthoCamera, registerPath, registerPathGraphic, registerPolygon, registerPolygonGraphic, registerPyramid3d, registerPyramid3dGraphic, registerReactAttributePlugin, registerRect, registerRect3d, registerRect3dGraphic, registerRectGraphic, registerRichtext, registerRichtextGraphic, registerShadowRoot, registerShadowRootGraphic, registerStar, registerStarGraphic, registerSymbol, registerSymbolGraphic, registerText, registerTextGraphic, registerViewTransform3dPlugin, registerWindowEventTransformer, registerWrapText, registerWrapTextGraphic, renderCommandList, renderService, rewriteProto, richTextMathPickModule, richtextCanvasPickModule, richtextModule, rippleEffect, rotateX, rotateY, rotateZ, rotationScan, roughModule, rowBottomToTop, rowCenterToEdge, rowEdgeToCenter, rowTopToBottom, runFill, runStroke, scaleMat4, segments, shouldUseMat4, snakeWave, snapLength, spiralEffect, splitArc, splitArea, splitCircle, splitLine, splitPath, splitPolygon, splitRect, splitToGrids, starModule, strCommandMap, strokeVisible, symbolCanvasPickModule, symbolMathPickModule, symbolModule, taroEnvModule, textAttributesToStyle, textCanvasPickModule, textDrawOffsetX, textDrawOffsetY, textLayoutOffsetY, textMathPickModule, textModule, transformMat4, transformPointForCanvas, transformUtil, transitionRegistry, translate, ttEnvModule, version, verticalLayout, vglobal, waitForAllSubLayers, wrapCanvas, wrapContext, wxEnvModule, xul };