@visactor/vrender-animate 1.0.0-alpha.2 → 1.0.0-alpha.21
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/cjs/animate-extension.d.ts +3 -2
- package/cjs/animate-extension.js +5 -2
- package/cjs/animate-extension.js.map +1 -1
- package/cjs/animate.d.ts +1 -0
- package/cjs/animate.js +8 -5
- package/cjs/animate.js.map +1 -1
- package/cjs/config/morphing.d.ts +2 -0
- package/cjs/config/morphing.js +9 -0
- package/cjs/config/morphing.js.map +1 -0
- package/cjs/custom/clip-graphic.js +1 -1
- package/cjs/custom/clip-graphic.js.map +1 -1
- package/cjs/custom/clip.d.ts +1 -0
- package/cjs/custom/clip.js +9 -1
- package/cjs/custom/clip.js.map +1 -1
- package/cjs/custom/common.d.ts +0 -1
- package/cjs/custom/common.js +6 -9
- package/cjs/custom/common.js.map +1 -1
- package/cjs/custom/fade.js +7 -2
- package/cjs/custom/fade.js.map +1 -1
- package/cjs/custom/{from-to.js → fromTo.js} +6 -9
- package/cjs/custom/fromTo.js.map +1 -0
- package/cjs/custom/{group-fade.js → groupFade.js} +4 -3
- package/cjs/custom/groupFade.js.map +1 -0
- package/cjs/custom/growAngle.js +3 -2
- package/cjs/custom/growAngle.js.map +1 -1
- package/cjs/custom/growCenter.js +1 -1
- package/cjs/custom/growCenter.js.map +1 -1
- package/cjs/custom/growHeight.js +5 -5
- package/cjs/custom/growHeight.js.map +1 -1
- package/cjs/custom/growPoints.js +22 -21
- package/cjs/custom/growPoints.js.map +1 -1
- package/cjs/custom/growRadius.js +1 -1
- package/cjs/custom/growRadius.js.map +1 -1
- package/cjs/custom/growWidth.js +1 -1
- package/cjs/custom/growWidth.js.map +1 -1
- package/cjs/custom/morphing.d.ts +51 -0
- package/cjs/custom/morphing.js +298 -0
- package/cjs/custom/morphing.js.map +1 -0
- package/cjs/custom/motionPath.d.ts +21 -0
- package/cjs/custom/motionPath.js +31 -0
- package/cjs/custom/motionPath.js.map +1 -0
- package/cjs/custom/move.d.ts +4 -0
- package/cjs/custom/move.js +11 -11
- package/cjs/custom/move.js.map +1 -1
- package/cjs/custom/register.d.ts +27 -0
- package/cjs/custom/register.js +394 -4
- package/cjs/custom/register.js.map +1 -1
- package/cjs/custom/richtext/input-richtext.d.ts +4 -2
- package/cjs/custom/richtext/input-richtext.js +20 -10
- package/cjs/custom/richtext/input-richtext.js.map +1 -1
- package/cjs/custom/richtext/slide-richtext.js +1 -1
- package/cjs/custom/rotate.js +2 -1
- package/cjs/custom/rotate.js.map +1 -1
- package/cjs/custom/scale.js +7 -7
- package/cjs/custom/scale.js.map +1 -1
- package/cjs/custom/story.d.ts +68 -0
- package/cjs/custom/story.js +149 -3
- package/cjs/custom/story.js.map +1 -1
- package/cjs/custom/streamLight.d.ts +27 -0
- package/cjs/custom/streamLight.js +161 -0
- package/cjs/custom/streamLight.js.map +1 -0
- package/cjs/custom/tag-points.js +4 -1
- package/cjs/custom/tag-points.js.map +1 -1
- package/cjs/custom/update.js +2 -3
- package/cjs/custom/update.js.map +1 -1
- package/cjs/executor/animate-executor.d.ts +1 -1
- package/cjs/executor/animate-executor.js +69 -63
- package/cjs/executor/animate-executor.js.map +1 -1
- package/cjs/index.d.ts +3 -2
- package/cjs/index.js +34 -14
- package/cjs/index.js.map +1 -1
- package/cjs/state/animation-states-registry.js +18 -0
- package/cjs/state/animation-states-registry.js.map +1 -1
- package/cjs/step.d.ts +2 -0
- package/cjs/step.js +10 -2
- package/cjs/step.js.map +1 -1
- package/cjs/ticker/default-ticker.d.ts +3 -2
- package/cjs/ticker/default-ticker.js +9 -6
- package/cjs/ticker/default-ticker.js.map +1 -1
- package/cjs/ticker/manual-ticker.d.ts +6 -1
- package/cjs/ticker/manual-ticker.js +26 -4
- package/cjs/ticker/manual-ticker.js.map +1 -1
- package/cjs/timeline.d.ts +13 -5
- package/cjs/timeline.js +31 -18
- package/cjs/timeline.js.map +1 -1
- package/cjs/utils/transform.d.ts +2 -0
- package/cjs/utils/transform.js +10 -0
- package/cjs/utils/transform.js.map +1 -0
- package/dist/index.es.js +1374 -186
- package/es/animate-extension.d.ts +3 -2
- package/es/animate-extension.js +5 -2
- package/es/animate-extension.js.map +1 -1
- package/es/animate.d.ts +1 -0
- package/es/animate.js +8 -5
- package/es/animate.js.map +1 -1
- package/es/config/morphing.d.ts +2 -0
- package/es/config/morphing.js +5 -0
- package/es/config/morphing.js.map +1 -0
- package/es/custom/clip-graphic.js +1 -1
- package/es/custom/clip-graphic.js.map +1 -1
- package/es/custom/clip.d.ts +1 -0
- package/es/custom/clip.js +9 -1
- package/es/custom/clip.js.map +1 -1
- package/es/custom/common.d.ts +0 -1
- package/es/custom/common.js +6 -9
- package/es/custom/common.js.map +1 -1
- package/es/custom/fade.js +7 -2
- package/es/custom/fade.js.map +1 -1
- package/es/custom/{from-to.js → fromTo.js} +6 -9
- package/es/custom/fromTo.js.map +1 -0
- package/es/custom/{group-fade.js → groupFade.js} +4 -3
- package/es/custom/groupFade.js.map +1 -0
- package/es/custom/growAngle.js +3 -2
- package/es/custom/growAngle.js.map +1 -1
- package/es/custom/growCenter.js +1 -1
- package/es/custom/growCenter.js.map +1 -1
- package/es/custom/growHeight.js +5 -5
- package/es/custom/growHeight.js.map +1 -1
- package/es/custom/growPoints.js +22 -21
- package/es/custom/growPoints.js.map +1 -1
- package/es/custom/growRadius.js +1 -1
- package/es/custom/growRadius.js.map +1 -1
- package/es/custom/growWidth.js +1 -1
- package/es/custom/growWidth.js.map +1 -1
- package/es/custom/morphing.d.ts +51 -0
- package/es/custom/morphing.js +289 -0
- package/es/custom/morphing.js.map +1 -0
- package/es/custom/motionPath.d.ts +21 -0
- package/es/custom/motionPath.js +23 -0
- package/es/custom/motionPath.js.map +1 -0
- package/es/custom/move.d.ts +4 -0
- package/es/custom/move.js +10 -10
- package/es/custom/move.js.map +1 -1
- package/es/custom/register.d.ts +27 -0
- package/es/custom/register.js +15 -5
- package/es/custom/register.js.map +1 -1
- package/es/custom/richtext/input-richtext.d.ts +4 -2
- package/es/custom/richtext/input-richtext.js +20 -10
- package/es/custom/richtext/input-richtext.js.map +1 -1
- package/es/custom/richtext/slide-richtext.js +1 -1
- package/es/custom/rotate.js +2 -1
- package/es/custom/rotate.js.map +1 -1
- package/es/custom/scale.js +7 -7
- package/es/custom/scale.js.map +1 -1
- package/es/custom/story.d.ts +68 -0
- package/es/custom/story.js +142 -1
- package/es/custom/story.js.map +1 -1
- package/es/custom/streamLight.d.ts +27 -0
- package/es/custom/streamLight.js +157 -0
- package/es/custom/streamLight.js.map +1 -0
- package/es/custom/tag-points.js +4 -1
- package/es/custom/tag-points.js.map +1 -1
- package/es/custom/update.js +2 -3
- package/es/custom/update.js.map +1 -1
- package/es/executor/animate-executor.d.ts +1 -1
- package/es/executor/animate-executor.js +68 -61
- package/es/executor/animate-executor.js.map +1 -1
- package/es/index.d.ts +3 -2
- package/es/index.js +4 -2
- package/es/index.js.map +1 -1
- package/es/state/animation-states-registry.js +18 -0
- package/es/state/animation-states-registry.js.map +1 -1
- package/es/step.d.ts +2 -0
- package/es/step.js +10 -2
- package/es/step.js.map +1 -1
- package/es/ticker/default-ticker.d.ts +3 -2
- package/es/ticker/default-ticker.js +9 -6
- package/es/ticker/default-ticker.js.map +1 -1
- package/es/ticker/manual-ticker.d.ts +6 -1
- package/es/ticker/manual-ticker.js +27 -3
- package/es/ticker/manual-ticker.js.map +1 -1
- package/es/timeline.d.ts +13 -5
- package/es/timeline.js +32 -17
- package/es/timeline.js.map +1 -1
- package/es/utils/transform.d.ts +2 -0
- package/es/utils/transform.js +4 -0
- package/es/utils/transform.js.map +1 -0
- package/package.json +5 -5
- package/cjs/custom/from-to.js.map +0 -1
- package/cjs/custom/group-fade.js.map +0 -1
- package/es/custom/from-to.js.map +0 -1
- package/es/custom/group-fade.js.map +0 -1
- /package/cjs/custom/{from-to.d.ts → fromTo.d.ts} +0 -0
- /package/cjs/custom/{group-fade.d.ts → groupFade.d.ts} +0 -0
- /package/es/custom/{from-to.d.ts → fromTo.d.ts} +0 -0
- /package/es/custom/{group-fade.d.ts → groupFade.d.ts} +0 -0
package/es/custom/story.js
CHANGED
|
@@ -4,6 +4,8 @@ import { ACustomAnimate } from "./custom-animate";
|
|
|
4
4
|
|
|
5
5
|
import { AnimateExecutor } from "../executor/animate-executor";
|
|
6
6
|
|
|
7
|
+
import { interpolateColor } from "@visactor/vrender-core";
|
|
8
|
+
|
|
7
9
|
export class StoryFadeIn extends FadeIn {}
|
|
8
10
|
|
|
9
11
|
export class SlideIn extends ACustomAnimate {
|
|
@@ -94,6 +96,97 @@ export class SpinIn extends ACustomAnimate {
|
|
|
94
96
|
}
|
|
95
97
|
}
|
|
96
98
|
|
|
99
|
+
export class StrokeIn extends ACustomAnimate {
|
|
100
|
+
constructor(from, to, duration, easing, params) {
|
|
101
|
+
super(from, to, duration, easing, params), this.perimeter = 0, this.originalAttributes = {};
|
|
102
|
+
}
|
|
103
|
+
onBind() {
|
|
104
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
|
105
|
+
if (super.onBind(), this.originalAttributes = Object.assign({}, this.target.getAttributes()),
|
|
106
|
+
"rect" === this.target.type) {
|
|
107
|
+
const attr = this.target.attribute, width = null !== (_a = attr.width) && void 0 !== _a ? _a : 100, height = null !== (_b = attr.height) && void 0 !== _b ? _b : 100;
|
|
108
|
+
this.perimeter = 2 * (width + height);
|
|
109
|
+
} else if ("circle" === this.target.type) {
|
|
110
|
+
const radius = null !== (_c = this.target.attribute.radius) && void 0 !== _c ? _c : 50;
|
|
111
|
+
this.perimeter = 2 * Math.PI * radius;
|
|
112
|
+
} else if ("ellipse" === this.target.type) {
|
|
113
|
+
const attr = this.target.attribute, radiusX = null !== (_d = attr.radiusX) && void 0 !== _d ? _d : 50, radiusY = null !== (_e = attr.radiusY) && void 0 !== _e ? _e : 50;
|
|
114
|
+
this.perimeter = 2 * Math.PI * Math.sqrt((radiusX * radiusX + radiusY * radiusY) / 2);
|
|
115
|
+
} else this.perimeter = 1e3;
|
|
116
|
+
const lineWidth = null !== (_g = null === (_f = this.params) || void 0 === _f ? void 0 : _f.lineWidth) && void 0 !== _g ? _g : 2, strokeColor = null !== (_j = null === (_h = this.params) || void 0 === _h ? void 0 : _h.strokeColor) && void 0 !== _j ? _j : "black", fromOpacity = null !== (_l = null === (_k = this.params) || void 0 === _k ? void 0 : _k.fromOpacity) && void 0 !== _l ? _l : 1, dashLength = null !== (_o = null === (_m = this.params) || void 0 === _m ? void 0 : _m.dashLength) && void 0 !== _o ? _o : this.perimeter, showFill = null !== (_q = null === (_p = this.params) || void 0 === _p ? void 0 : _p.showFill) && void 0 !== _q && _q, fillOpacity = null !== (_s = null === (_r = this.params) || void 0 === _r ? void 0 : _r.fillOpacity) && void 0 !== _s ? _s : 0;
|
|
117
|
+
this.from = {
|
|
118
|
+
lineDash: [ dashLength, dashLength ],
|
|
119
|
+
lineDashOffset: dashLength,
|
|
120
|
+
lineWidth: lineWidth,
|
|
121
|
+
stroke: strokeColor,
|
|
122
|
+
strokeOpacity: fromOpacity
|
|
123
|
+
}, this.to = {
|
|
124
|
+
lineDash: [ dashLength, dashLength ],
|
|
125
|
+
lineDashOffset: 0,
|
|
126
|
+
lineWidth: lineWidth,
|
|
127
|
+
stroke: strokeColor,
|
|
128
|
+
strokeOpacity: fromOpacity
|
|
129
|
+
}, showFill ? (this.from.fillOpacity = fillOpacity, this.to.fillOpacity = null !== (_t = this.originalAttributes.fillOpacity) && void 0 !== _t ? _t : 1) : (this.from.fillOpacity = 0,
|
|
130
|
+
this.to.fillOpacity = 0), this.propKeys = [ "lineDash", "lineDashOffset", "lineWidth", "stroke", "strokeOpacity", "fillOpacity" ],
|
|
131
|
+
this.props = this.to, this.target.setAttributes(this.from);
|
|
132
|
+
}
|
|
133
|
+
onUpdate(end, ratio, out) {
|
|
134
|
+
var _a;
|
|
135
|
+
const attribute = this.target.attribute;
|
|
136
|
+
attribute.lineDashOffset = this.from.lineDashOffset + (this.to.lineDashOffset - this.from.lineDashOffset) * ratio,
|
|
137
|
+
(null === (_a = this.params) || void 0 === _a ? void 0 : _a.showFill) && (attribute.fillOpacity = this.from.fillOpacity + (this.to.fillOpacity - this.from.fillOpacity) * ratio);
|
|
138
|
+
}
|
|
139
|
+
onEnd() {
|
|
140
|
+
var _a;
|
|
141
|
+
if (super.onEnd(), !(null === (_a = this.params) || void 0 === _a ? void 0 : _a.showFill)) {
|
|
142
|
+
const originalAttrs = Object.assign({}, this.originalAttributes);
|
|
143
|
+
originalAttrs.fillOpacity = 0, this.target.setAttributes(originalAttrs);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
export class StrokeOut extends ACustomAnimate {
|
|
149
|
+
constructor(from, to, duration, easing, params) {
|
|
150
|
+
super(from, to, duration, easing, params), this.perimeter = 0, this.originalAttributes = {};
|
|
151
|
+
}
|
|
152
|
+
onFirstRun() {
|
|
153
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
154
|
+
if (this.originalAttributes = Object.assign({}, this.target.getAttributes()), "rect" === this.target.type) {
|
|
155
|
+
const attr = this.target.attribute, width = null !== (_a = attr.width) && void 0 !== _a ? _a : 100, height = null !== (_b = attr.height) && void 0 !== _b ? _b : 100;
|
|
156
|
+
this.perimeter = 2 * (width + height);
|
|
157
|
+
} else if ("circle" === this.target.type) {
|
|
158
|
+
const radius = null !== (_c = this.target.attribute.radius) && void 0 !== _c ? _c : 50;
|
|
159
|
+
this.perimeter = 2 * Math.PI * radius;
|
|
160
|
+
} else if ("ellipse" === this.target.type) {
|
|
161
|
+
const attr = this.target.attribute, radiusX = null !== (_d = attr.radiusX) && void 0 !== _d ? _d : 50, radiusY = null !== (_e = attr.radiusY) && void 0 !== _e ? _e : 50;
|
|
162
|
+
this.perimeter = 2 * Math.PI * Math.sqrt((radiusX * radiusX + radiusY * radiusY) / 2);
|
|
163
|
+
} else this.perimeter = 1e3;
|
|
164
|
+
const lineWidth = null !== (_g = null === (_f = this.params) || void 0 === _f ? void 0 : _f.lineWidth) && void 0 !== _g ? _g : 2, strokeColor = null !== (_j = null === (_h = this.params) || void 0 === _h ? void 0 : _h.strokeColor) && void 0 !== _j ? _j : "black", fromOpacity = null !== (_l = null === (_k = this.params) || void 0 === _k ? void 0 : _k.fromOpacity) && void 0 !== _l ? _l : 1, dashLength = null !== (_o = null === (_m = this.params) || void 0 === _m ? void 0 : _m.dashLength) && void 0 !== _o ? _o : this.perimeter, showFill = null !== (_q = null === (_p = this.params) || void 0 === _p ? void 0 : _p.showFill) && void 0 !== _q && _q;
|
|
165
|
+
this.from = {
|
|
166
|
+
lineDash: [ dashLength, dashLength ],
|
|
167
|
+
lineDashOffset: 0,
|
|
168
|
+
lineWidth: lineWidth,
|
|
169
|
+
stroke: strokeColor,
|
|
170
|
+
strokeOpacity: fromOpacity
|
|
171
|
+
}, this.to = {
|
|
172
|
+
lineDash: [ dashLength, dashLength ],
|
|
173
|
+
lineDashOffset: -dashLength,
|
|
174
|
+
lineWidth: lineWidth,
|
|
175
|
+
stroke: strokeColor,
|
|
176
|
+
strokeOpacity: fromOpacity
|
|
177
|
+
}, showFill ? (this.from.fillOpacity = null !== (_r = this.originalAttributes.fillOpacity) && void 0 !== _r ? _r : 1,
|
|
178
|
+
this.to.fillOpacity = 0) : (this.from.fillOpacity = 0, this.to.fillOpacity = 0),
|
|
179
|
+
this.propKeys = [ "lineDash", "lineDashOffset", "lineWidth", "stroke", "strokeOpacity", "fillOpacity" ],
|
|
180
|
+
this.props = this.to, this.target.setAttributes(this.from);
|
|
181
|
+
}
|
|
182
|
+
onUpdate(end, ratio, out) {
|
|
183
|
+
var _a;
|
|
184
|
+
const attribute = this.target.attribute;
|
|
185
|
+
attribute.lineDashOffset = this.from.lineDashOffset + (this.to.lineDashOffset - this.from.lineDashOffset) * ratio,
|
|
186
|
+
(null === (_a = this.params) || void 0 === _a ? void 0 : _a.showFill) && (attribute.fillOpacity = this.from.fillOpacity + (this.to.fillOpacity - this.from.fillOpacity) * ratio);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
97
190
|
export class MoveScaleIn extends ACustomAnimate {
|
|
98
191
|
constructor(from, to, duration, easing, params) {
|
|
99
192
|
var _a;
|
|
@@ -324,4 +417,52 @@ export class MoveRotateOut extends ACustomAnimate {
|
|
|
324
417
|
});
|
|
325
418
|
}
|
|
326
419
|
onUpdate(end, ratio, out) {}
|
|
327
|
-
}
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
export class PulseAnimate extends ACustomAnimate {
|
|
423
|
+
constructor(from, to, duration, easing, params) {
|
|
424
|
+
super(from, to, duration, easing, params), this.originalAttributes = {}, this.pulseCount = 3,
|
|
425
|
+
this.pulseOpacity = .3, this.pulseScale = 1.05, this.pulseColor = null, this.pulseColorIntensity = .2,
|
|
426
|
+
this.strokeOnly = !1, this.fillOnly = !1, this.useScale = !0, this.useOpacity = !0,
|
|
427
|
+
this.useStroke = !0, this.useFill = !0, this.useColor = !1, this.originalFill = null,
|
|
428
|
+
this.originalStroke = null, void 0 !== (null == params ? void 0 : params.pulseCount) && (this.pulseCount = params.pulseCount),
|
|
429
|
+
void 0 !== (null == params ? void 0 : params.pulseScale) && (this.pulseScale = params.pulseScale),
|
|
430
|
+
void 0 !== (null == params ? void 0 : params.pulseColor) && (this.pulseColor = params.pulseColor),
|
|
431
|
+
void 0 !== (null == params ? void 0 : params.pulseColorIntensity) && (this.pulseColorIntensity = params.pulseColorIntensity),
|
|
432
|
+
void 0 !== (null == params ? void 0 : params.strokeOnly) && (this.strokeOnly = params.strokeOnly),
|
|
433
|
+
void 0 !== (null == params ? void 0 : params.fillOnly) && (this.fillOnly = params.fillOnly),
|
|
434
|
+
void 0 !== (null == params ? void 0 : params.useScale) && (this.useScale = params.useScale),
|
|
435
|
+
void 0 !== (null == params ? void 0 : params.useOpacity) && (this.useOpacity = params.useOpacity),
|
|
436
|
+
void 0 !== (null == params ? void 0 : params.useStroke) && (this.useStroke = params.useStroke),
|
|
437
|
+
void 0 !== (null == params ? void 0 : params.useFill) && (this.useFill = params.useFill),
|
|
438
|
+
void 0 !== (null == params ? void 0 : params.useColor) && (this.useColor = params.useColor);
|
|
439
|
+
}
|
|
440
|
+
onBind() {
|
|
441
|
+
super.onBind(), this.originalAttributes = Object.assign({}, this.target.getAttributes()),
|
|
442
|
+
this.useColor && (this.originalFill = this.originalAttributes.fill || null, this.originalStroke = this.originalAttributes.stroke || null,
|
|
443
|
+
this.pulseColor || (this.fillOnly && this.originalFill ? this.pulseColor = this.originalFill : this.strokeOnly && this.originalStroke ? this.pulseColor = this.originalStroke : this.originalFill ? this.pulseColor = this.originalFill : this.originalStroke ? this.pulseColor = this.originalStroke : this.pulseColor = "#FFFFFF"));
|
|
444
|
+
}
|
|
445
|
+
onUpdate(end, ratio, out) {
|
|
446
|
+
const angle = ratio * Math.PI * this.pulseCount, pulseValue = Math.abs(Math.sin(angle)), attribute = this.target.attribute;
|
|
447
|
+
if (this.useOpacity) {
|
|
448
|
+
const opacity = 1 + (this.pulseOpacity - 1) * pulseValue;
|
|
449
|
+
this.useStroke && (attribute.strokeOpacity = (this.originalAttributes.strokeOpacity || 1) * opacity),
|
|
450
|
+
this.useFill && (attribute.fillOpacity = (this.originalAttributes.fillOpacity || 1) * opacity);
|
|
451
|
+
}
|
|
452
|
+
if (this.useScale) {
|
|
453
|
+
const scale = 1 + (this.pulseScale - 1) * pulseValue;
|
|
454
|
+
attribute.scaleX = (this.originalAttributes.scaleX || 1) * scale, attribute.scaleY = (this.originalAttributes.scaleY || 1) * scale;
|
|
455
|
+
}
|
|
456
|
+
this.useColor && this.pulseColor && this.applyColorPulse(attribute, pulseValue),
|
|
457
|
+
this.target.addUpdateShapeAndBoundsTag(), this.target.addUpdatePositionTag();
|
|
458
|
+
}
|
|
459
|
+
applyColorPulse(attribute, pulseValue) {
|
|
460
|
+
const colorRatio = this.pulseColorIntensity * pulseValue;
|
|
461
|
+
this.useFill && this.originalFill && this.pulseColor && (attribute.fill = interpolateColor(this.originalFill, this.pulseColor, colorRatio, !0)),
|
|
462
|
+
this.useStroke && this.originalStroke && this.pulseColor && (attribute.stroke = interpolateColor(this.originalStroke, this.pulseColor, colorRatio, !0));
|
|
463
|
+
}
|
|
464
|
+
onEnd() {
|
|
465
|
+
super.onEnd(), this.target.setAttributes(this.originalAttributes);
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
//# sourceMappingURL=story.js.map
|
package/es/custom/story.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/custom/story.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAE/D,MAAM,OAAO,WAAY,SAAQ,MAAM;CAAG;AA0B1C,MAAM,OAAO,OAAQ,SAAQ,cAAsC;IAMjE,YAAY,IAAU,EAAE,EAAQ,EAAE,QAAgB,EAAE,MAAkB,EAAE,MAA+B;QACrG,KAAK,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5C,CAAC;IAED,MAAM;;QACJ,KAAK,CAAC,MAAM,EAAE,CAAC;QAEf,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,iBAAiB,EAAE,CAAC;QAE9C,MAAM,SAAS,GAAG,CAAC,MAAA,IAAI,CAAC,MAAM,0CAAE,SAAiD,KAAI,OAAO,CAAC;QAC7F,MAAM,QAAQ,GAAG,CAAA,MAAA,IAAI,CAAC,MAAM,0CAAE,QAAQ,KAAI,EAAE,CAAC;QAC7C,MAAM,WAAW,GAAG,MAAA,MAAA,IAAI,CAAC,MAAM,0CAAE,WAAW,mCAAI,CAAC,CAAC;Q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YACd,MAAM,EAAE,OAAO;YACf,gBAAgB,EAAE;gBAChB,SAAS,EAAE,CAAA,MAAA,IAAI,CAAC,MAAM,0CAAE,SAAS,KAAI,IAAI,CAAC,EAAE;gBAC5C,SAAS,EAAE,CAAA,MAAA,IAAI,CAAC,MAAM,0CAAE,SAAS,KAAI,GAAG;gBACxC,WAAW,EAAE,CAAC;gBACd,SAAS,EAAE,CAAC;aACb;YACD,QAAQ,EAAE,IAAI,CAAC,eAAe;YAC9B,MAAM,EAAE,IAAI,CAAC,MAAM;SACpB,CAAC,CAAC;QAGH,QAAQ,CAAC,OAAO,CAAC;YACf,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,QAAQ;YAChB,gBAAgB,EAAE;gBAChB,SAAS,EAAE,CAAA,MAAA,IAAI,CAAC,MAAM,0CAAE,cAAc,KAAI,OAAO;gBACjD,QAAQ,EAAE,CAAA,MAAA,IAAI,CAAC,MAAM,0CAAE,aAAa,KAAI,EAAE;gBAC1C,WAAW,EAAE,CAAC;aACf;YACD,QAAQ,EAAE,IAAI,CAAC,gBAAgB;YAC/B,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,KAAK,EAAE,IAAI,CAAC,eAAe;SAC5B,CAAC,CAAC;IACL,CAAC;IAED,QAAQ,CAAC,GAAY,EAAE,KAAa,EAAE,GAAwB;IAE9D,CAAC;CACF","file":"story.js","sourcesContent":["import { FadeIn } from './fade';\nimport type { EasingType } from '@visactor/vrender-core';\nimport { ACustomAnimate } from './custom-animate';\nimport { AnimateExecutor } from '../executor/animate-executor';\n\nexport class StoryFadeIn extends FadeIn {}\n\n// 滑动动画的参数接口\nexport interface ISlideAnimationOptions {\n direction?: 'top' | 'bottom' | 'left' | 'right';\n distance?: number;\n fromOpacity?: number; // 透明度初始值,默认0\n}\n\n// 缩放动画的参数接口\nexport interface IGrowAnimationOptions {\n fromScale?: number;\n direction?: 'x' | 'y' | 'xy';\n fromOpacity?: number; // 透明度初始值,默认0\n}\n\n// 旋转动画的参数接口\nexport interface ISpinAnimationOptions {\n fromAngle?: number;\n fromScale?: number;\n fromOpacity?: number; // 透明度初始值,默认0\n}\n\n/**\n * 滑动入场动画,包括从上到下,从下到上,从左到右,从右到左的位置,以及透明度属性插值\n */\nexport class SlideIn extends ACustomAnimate<Record<string, number>> {\n declare valid: boolean;\n declare propKeys: string[];\n declare from: Record<string, number>;\n declare to: Record<string, number>;\n\n constructor(from: null, to: null, duration: number, easing: EasingType, params?: ISlideAnimationOptions) {\n super(from, to, duration, easing, params);\n }\n\n onBind(): void {\n super.onBind();\n // 用于入场的时候设置属性\n const attrs = this.target.getFinalAttribute();\n\n const direction = (this.params?.direction as 'top' | 'bottom' | 'left' | 'right') || 'right';\n const distance = this.params?.distance || 50;\n const fromOpacity = this.params?.fromOpacity ?? 0; // 使用透明度初始值参数\n\n // 初始化from和to对象\n const from: Record<string, number> = { opacity: fromOpacity, baseOpacity: fromOpacity };\n const to: Record<string, number> = { opacity: 1, baseOpacity: 1 };\n\n // 根据方向设置对应的属性\n if (direction === 'top') {\n from.y = (attrs.y ?? 0) - distance;\n to.y = attrs.y ?? 0;\n this.propKeys = ['opacity', 'baseOpacity', 'y'];\n } else if (direction === 'bottom') {\n from.y = (attrs.y ?? 0) + distance;\n to.y = attrs.y ?? 0;\n this.propKeys = ['opacity', 'baseOpacity', 'y'];\n } else if (direction === 'left') {\n from.x = (attrs.x ?? 0) - distance;\n to.x = attrs.x ?? 0;\n this.propKeys = ['opacity', 'baseOpacity', 'x'];\n } else {\n // right\n from.x = (attrs.x ?? 0) + distance;\n to.x = attrs.x ?? 0;\n this.propKeys = ['opacity', 'baseOpacity', 'x'];\n }\n\n this.from = from;\n this.to = to;\n this.props = to;\n\n // 将初始属性应用到目标对象\n this.target.setAttributes(from as any);\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n const attribute: Record<string, any> = this.target.attribute;\n this.propKeys.forEach(key => {\n attribute[key] = this.from[key] + (this.to[key] - this.from[key]) * ratio;\n });\n this.target.addUpdatePositionTag();\n this.target.addUpdateShapeAndBoundsTag();\n }\n}\n\n/**\n * 缩放入场动画,包括scaleX、scaleY属性从某个比例缩放到1,该比例可以小于1也可以大于1,以及透明度属性插值\n */\nexport class GrowIn extends ACustomAnimate<Record<string, number>> {\n declare valid: boolean;\n declare propKeys: string[];\n declare from: Record<string, number>;\n declare to: Record<string, number>;\n\n constructor(from: null, to: null, duration: number, easing: EasingType, params?: IGrowAnimationOptions) {\n super(from, to, duration, easing, params);\n }\n\n onBind(): void {\n super.onBind();\n // 用于入场的时候设置属性\n const attrs = this.target.getFinalAttribute();\n\n const fromScale = this.params?.fromScale ?? 0;\n const direction = this.params?.direction || 'xy';\n const fromOpacity = this.params?.fromOpacity ?? 0; // 使用透明度初始值参数\n\n // 初始化from和to对象\n const from: Record<string, number> = { opacity: fromOpacity, baseOpacity: fromOpacity };\n const to: Record<string, number> = { opacity: 1, baseOpacity: 1 };\n this.propKeys = ['opacity', 'baseOpacity'];\n\n // 根据方向设置对应的缩放属性\n if (direction === 'x' || direction === 'xy') {\n from.scaleX = fromScale;\n to.scaleX = attrs.scaleX ?? 1;\n this.propKeys.push('scaleX');\n }\n\n if (direction === 'y' || direction === 'xy') {\n from.scaleY = fromScale;\n to.scaleY = attrs.scaleY ?? 1;\n this.propKeys.push('scaleY');\n }\n\n this.from = from;\n this.to = to;\n this.props = to;\n\n // 将初始属性应用到目标对象\n this.target.setAttributes(from as any);\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n const attribute: Record<string, any> = this.target.attribute;\n this.propKeys.forEach(key => {\n attribute[key] = this.from[key] + (this.to[key] - this.from[key]) * ratio;\n });\n this.target.addUpdatePositionTag();\n this.target.addUpdateShapeAndBoundsTag();\n }\n}\n\n/**\n * 旋转入场动画,包括rotate属性从某个角度度旋转到0,以及缩放属性从某个比例缩放到1,该比例可以小于1也可以大于1\n */\nexport class SpinIn extends ACustomAnimate<Record<string, number>> {\n declare valid: boolean;\n declare propKeys: string[];\n declare from: Record<string, number>;\n declare to: Record<string, number>;\n\n constructor(from: null, to: null, duration: number, easing: EasingType, params?: ISpinAnimationOptions) {\n super(from, to, duration, easing, params);\n }\n\n onBind(): void {\n super.onBind();\n // 用于入场的时候设置属性\n const attrs = this.target.getFinalAttribute();\n\n const fromAngle = this.params?.fromAngle ?? Math.PI * 2; // 默认旋转一圈\n const fromScale = this.params?.fromScale ?? 0;\n const fromOpacity = this.params?.fromOpacity ?? 0; // 使用透明度初始值参数\n\n // 初始化from和to对象\n const from: Record<string, number> = {\n opacity: fromOpacity,\n baseOpacity: fromOpacity,\n angle: fromAngle,\n scaleX: fromScale,\n scaleY: fromScale\n };\n\n const to: Record<string, number> = {\n opacity: 1,\n baseOpacity: 1,\n angle: attrs.angle ?? 0,\n scaleX: attrs.scaleX ?? 1,\n scaleY: attrs.scaleY ?? 1\n };\n\n this.propKeys = ['opacity', 'baseOpacity', 'angle', 'scaleX', 'scaleY'];\n this.from = from;\n this.to = to;\n this.props = to;\n\n // 将初始属性应用到目标对象\n this.target.setAttributes(from as any);\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n const attribute: Record<string, any> = this.target.attribute;\n this.propKeys.forEach(key => {\n attribute[key] = this.from[key] + (this.to[key] - this.from[key]) * ratio;\n });\n this.target.addUpdatePositionTag();\n this.target.addUpdateShapeAndBoundsTag();\n }\n}\n\n// 复合动画的参数接口\nexport interface IMoveScaleAnimationOptions {\n slideDirection?: 'top' | 'bottom' | 'left' | 'right';\n slideDistance?: number;\n fromScale?: number;\n scaleDirection?: 'x' | 'y' | 'xy';\n slideRatio?: number; // 滑动动画占总时长的比例,默认0.5\n fromOpacity?: number; // 透明度初始值,默认0\n}\n\n/**\n * 移动+缩放入场动画\n * 先走SlideIn,然后走GrowIn\n */\nexport class MoveScaleIn extends ACustomAnimate<any> {\n declare valid: boolean;\n private readonly slideInDuration: number;\n private readonly growInDuration: number;\n\n constructor(from: null, to: null, duration: number, easing: EasingType, params?: IMoveScaleAnimationOptions) {\n super(from, to, duration, easing, params);\n const slideRatio = params?.slideRatio ?? 0.5;\n this.slideInDuration = duration * slideRatio;\n this.growInDuration = duration * (1 - slideRatio);\n }\n\n onBind(): void {\n super.onBind();\n // 创建AnimateExecutor来运行序列动画\n const executor = new AnimateExecutor(this.target);\n\n // 第一步:滑动入场(包含透明度变化)\n executor.execute({\n type: 'custom',\n custom: SlideIn,\n customParameters: {\n direction: this.params?.slideDirection || 'right',\n distance: this.params?.slideDistance || 50,\n fromOpacity: this.params?.fromOpacity ?? 0\n },\n duration: this.slideInDuration,\n easing: this.easing\n });\n\n // 第二步:缩放入场(不包含透明度变化)\n executor.execute({\n type: 'custom',\n custom: GrowIn,\n customParameters: {\n fromScale: this.params?.fromScale || 0.5,\n direction: this.params?.scaleDirection || 'xy',\n fromOpacity: 1 // 设置初始透明度为1,使第二阶段不进行透明度插值\n },\n duration: this.growInDuration,\n easing: this.easing,\n delay: this.slideInDuration // 等第一步完成后再开始\n });\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n // 动画逻辑由子动画处理\n }\n}\n\n// 移动旋转动画的参数接口\nexport interface IMoveRotateAnimationOptions {\n slideDirection?: 'top' | 'bottom' | 'left' | 'right';\n slideDistance?: number;\n fromAngle?: number;\n fromScale?: number;\n slideRatio?: number; // 滑动动画占总时长的比例,默认0.5\n fromOpacity?: number; // 透明度初始值,默认0\n}\n\n/**\n * 移动+旋转入场动画\n * 先走SlideIn,然后走SpinIn\n */\nexport class MoveRotateIn extends ACustomAnimate<any> {\n declare valid: boolean;\n private readonly slideInDuration: number;\n private readonly spinInDuration: number;\n\n constructor(from: null, to: null, duration: number, easing: EasingType, params?: IMoveRotateAnimationOptions) {\n super(from, to, duration, easing, params);\n const slideRatio = params?.slideRatio ?? 0.5;\n this.slideInDuration = duration * slideRatio;\n this.spinInDuration = duration * (1 - slideRatio);\n }\n\n onBind(): void {\n super.onBind();\n // 创建AnimateExecutor来运行序列动画\n const executor = new AnimateExecutor(this.target);\n\n // 第一步:滑动入场(包含透明度变化)\n executor.execute({\n type: 'custom',\n custom: SlideIn,\n customParameters: {\n direction: this.params?.slideDirection || 'right',\n distance: this.params?.slideDistance || 50,\n fromOpacity: this.params?.fromOpacity ?? 0\n },\n duration: this.slideInDuration,\n easing: this.easing\n });\n\n // 第二步:旋转入场(不包含透明度变化)\n executor.execute({\n type: 'custom',\n custom: SpinIn,\n customParameters: {\n fromAngle: this.params?.fromAngle || Math.PI,\n fromScale: this.params?.fromScale || 0.5,\n fromOpacity: 1 // 设置初始透明度为1,使第二阶段不进行透明度插值\n },\n duration: this.spinInDuration,\n easing: this.easing,\n delay: this.slideInDuration // 等第一步完成后再开始\n });\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n // 动画逻辑由子动画处理\n }\n}\n\n/**\n * 滑动出场动画,包括从当前位置滑动到指定方向,以及透明度属性插值\n */\nexport class SlideOut extends ACustomAnimate<Record<string, number>> {\n declare valid: boolean;\n declare propKeys: string[];\n declare from: Record<string, number>;\n declare to: Record<string, number>;\n\n constructor(\n from: null,\n to: null,\n duration: number,\n easing: EasingType,\n params?: ISlideAnimationOptions & { toOpacity?: number }\n ) {\n super(from, to, duration, easing, params);\n }\n\n onFirstRun(): void {\n // 用于出场的时候设置属性\n const attrs = this.target.getAttributes();\n\n const direction = (this.params?.direction as 'top' | 'bottom' | 'left' | 'right') || 'right';\n const distance = this.params?.distance || 50;\n const fromOpacity = this.params?.fromOpacity ?? 1; // 使用透明度初始值参数\n const toOpacity = this.params?.toOpacity ?? 0; // 使用目标透明度参数\n\n // 初始化from和to对象\n const from: Record<string, number> = { opacity: fromOpacity, baseOpacity: fromOpacity };\n const to: Record<string, number> = { opacity: toOpacity, baseOpacity: toOpacity };\n\n // 根据方向设置对应的属性\n if (direction === 'top') {\n from.y = attrs.y ?? 0;\n to.y = (attrs.y ?? 0) - distance;\n this.propKeys = ['opacity', 'baseOpacity', 'y'];\n } else if (direction === 'bottom') {\n from.y = attrs.y ?? 0;\n to.y = (attrs.y ?? 0) + distance;\n this.propKeys = ['opacity', 'baseOpacity', 'y'];\n } else if (direction === 'left') {\n from.x = attrs.x ?? 0;\n to.x = (attrs.x ?? 0) - distance;\n this.propKeys = ['opacity', 'baseOpacity', 'x'];\n } else {\n // right\n from.x = attrs.x ?? 0;\n to.x = (attrs.x ?? 0) + distance;\n this.propKeys = ['opacity', 'baseOpacity', 'x'];\n }\n\n this.from = from;\n this.to = to;\n this.props = to;\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n const attribute: Record<string, any> = this.target.attribute;\n this.propKeys.forEach(key => {\n attribute[key] = this.from[key] + (this.to[key] - this.from[key]) * ratio;\n });\n this.target.addUpdatePositionTag();\n this.target.addUpdateShapeAndBoundsTag();\n }\n}\n\n/**\n * 缩放出场动画,包括scaleX、scaleY属性从当前比例缩放到指定比例,以及透明度属性插值\n */\nexport class GrowOut extends ACustomAnimate<Record<string, number>> {\n declare valid: boolean;\n declare propKeys: string[];\n declare from: Record<string, number>;\n declare to: Record<string, number>;\n\n constructor(\n from: null,\n to: null,\n duration: number,\n easing: EasingType,\n params?: IGrowAnimationOptions & { toOpacity?: number }\n ) {\n super(from, to, duration, easing, params);\n }\n\n onFirstRun(): void {\n // 用于出场的时候设置属性\n const attrs = this.target.getAttributes();\n\n const toScale = this.params?.fromScale ?? 0; // 使用fromScale作为目标比例\n const direction = this.params?.direction || 'xy';\n const fromOpacity = this.params?.fromOpacity ?? 1; // 使用透明度初始值参数\n const toOpacity = this.params?.toOpacity ?? 0; // 使用目标透明度参数\n\n // 初始化from和to对象\n const from: Record<string, number> = { opacity: fromOpacity, baseOpacity: fromOpacity };\n const to: Record<string, number> = { opacity: toOpacity, baseOpacity: toOpacity };\n this.propKeys = ['opacity', 'baseOpacity'];\n\n // 根据方向设置对应的缩放属性\n if (direction === 'x' || direction === 'xy') {\n from.scaleX = attrs.scaleX ?? 1;\n to.scaleX = toScale;\n this.propKeys.push('scaleX');\n }\n\n if (direction === 'y' || direction === 'xy') {\n from.scaleY = attrs.scaleY ?? 1;\n to.scaleY = toScale;\n this.propKeys.push('scaleY');\n }\n\n this.from = from;\n this.to = to;\n this.props = to;\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n const attribute: Record<string, any> = this.target.attribute;\n this.propKeys.forEach(key => {\n attribute[key] = this.from[key] + (this.to[key] - this.from[key]) * ratio;\n });\n this.target.addUpdatePositionTag();\n this.target.addUpdateShapeAndBoundsTag();\n }\n}\n\n/**\n * 旋转出场动画,包括rotate属性从当前角度旋转到指定角度,以及缩放属性从当前比例缩放到指定比例\n */\nexport class SpinOut extends ACustomAnimate<Record<string, number>> {\n declare valid: boolean;\n declare propKeys: string[];\n declare from: Record<string, number>;\n declare to: Record<string, number>;\n\n constructor(\n from: null,\n to: null,\n duration: number,\n easing: EasingType,\n params?: ISpinAnimationOptions & { toOpacity?: number }\n ) {\n super(from, to, duration, easing, params);\n }\n\n onFirstRun(): void {\n // 用于出场的时候设置属性\n const attrs = this.target.getAttributes();\n\n const toAngle = this.params?.fromAngle ?? Math.PI * 2; // 默认旋转一圈\n const toScale = this.params?.fromScale ?? 0;\n const fromOpacity = this.params?.fromOpacity ?? 1; // 使用透明度初始值参数\n const toOpacity = this.params?.toOpacity ?? 0; // 使用目标透明度参数\n\n // 初始化from和to对象\n const from: Record<string, number> = {\n opacity: fromOpacity,\n baseOpacity: fromOpacity,\n angle: attrs.angle ?? 0,\n scaleX: attrs.scaleX ?? 1,\n scaleY: attrs.scaleY ?? 1\n };\n\n const to: Record<string, number> = {\n opacity: toOpacity,\n baseOpacity: toOpacity,\n angle: toAngle,\n scaleX: toScale,\n scaleY: toScale\n };\n\n this.propKeys = ['opacity', 'baseOpacity', 'angle', 'scaleX', 'scaleY'];\n this.from = from;\n this.to = to;\n this.props = to;\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n const attribute: Record<string, any> = this.target.attribute;\n this.propKeys.forEach(key => {\n attribute[key] = this.from[key] + (this.to[key] - this.from[key]) * ratio;\n });\n this.target.addUpdatePositionTag();\n this.target.addUpdateShapeAndBoundsTag();\n }\n}\n\n/**\n * 移动+缩放出场动画\n * 先走GrowOut,然后走SlideOut\n */\nexport class MoveScaleOut extends ACustomAnimate<any> {\n declare valid: boolean;\n private readonly growOutDuration: number;\n private readonly slideOutDuration: number;\n\n constructor(from: null, to: null, duration: number, easing: EasingType, params?: IMoveScaleAnimationOptions) {\n super(from, to, duration, easing, params);\n const slideRatio = params?.slideRatio ?? 0.5;\n this.growOutDuration = duration * (1 - slideRatio);\n this.slideOutDuration = duration * slideRatio;\n }\n\n onFirstRun(): void {\n // 创建AnimateExecutor来运行序列动画\n const executor = new AnimateExecutor(this.target);\n\n // 第一步:缩放出场(不包含透明度变化)\n executor.execute({\n type: 'custom',\n custom: GrowOut,\n customParameters: {\n fromScale: this.params?.fromScale || 0.5,\n direction: this.params?.scaleDirection || 'xy',\n fromOpacity: 1, // 保持透明度为1,不做变化\n toOpacity: 1 // 确保第一阶段不改变透明度\n },\n duration: this.growOutDuration,\n easing: this.easing\n });\n\n // 第二步:滑动出场(包含透明度变化)\n executor.execute({\n type: 'custom',\n custom: SlideOut,\n customParameters: {\n direction: this.params?.slideDirection || 'right',\n distance: this.params?.slideDistance || 50,\n fromOpacity: 1 // 起始透明度为1\n },\n duration: this.slideOutDuration,\n easing: this.easing,\n delay: this.growOutDuration // 等第一步完成后再开始\n });\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n // 动画逻辑由子动画处理\n }\n}\n\n/**\n * 移动+旋转出场动画\n * 先走SpinOut,然后走SlideOut\n */\nexport class MoveRotateOut extends ACustomAnimate<any> {\n declare valid: boolean;\n private readonly spinOutDuration: number;\n private readonly slideOutDuration: number;\n\n constructor(from: null, to: null, duration: number, easing: EasingType, params?: IMoveRotateAnimationOptions) {\n super(from, to, duration, easing, params);\n const slideRatio = params?.slideRatio ?? 0.5;\n this.spinOutDuration = duration * (1 - slideRatio);\n this.slideOutDuration = duration * slideRatio;\n }\n\n onFirstRun(): void {\n // 创建AnimateExecutor来运行序列动画\n const executor = new AnimateExecutor(this.target);\n\n // 第一步:旋转出场(不包含透明度变化)\n executor.execute({\n type: 'custom',\n custom: SpinOut,\n customParameters: {\n fromAngle: this.params?.fromAngle || Math.PI,\n fromScale: this.params?.fromScale || 0.5,\n fromOpacity: 1, // 保持透明度为1,不做变化\n toOpacity: 1 // 确保第一阶段不改变透明度\n },\n duration: this.spinOutDuration,\n easing: this.easing\n });\n\n // 第二步:滑动出场(包含透明度变化)\n executor.execute({\n type: 'custom',\n custom: SlideOut,\n customParameters: {\n direction: this.params?.slideDirection || 'right',\n distance: this.params?.slideDistance || 50,\n fromOpacity: 1 // 起始透明度为1\n },\n duration: this.slideOutDuration,\n easing: this.easing,\n delay: this.spinOutDuration // 等第一步完成后再开始\n });\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n // 动画逻辑由子动画处理\n }\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/custom/story.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAyB,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAEjF,MAAM,OAAO,WAAY,SAAQ,MAAM;CAAG;AAoD1C,MAAM,OAAO,OAAQ,SAAQ,cAAsC;IAMjE,YAAY,IAAU,EAAE,EAAQ,EAAE,QAAgB,EAAE,MAAkB,EAAE,MAA+B;QACrG,KAAK,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5C,CAAC;IAED,MAAM;;QACJ,KAAK,CAAC,MAAM,EAAE,CAAC;QAEf,MAAM,KAAK,GAAG,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AM,GAAG,CAAC,IAAI,CAAC,kBAAkB,CAAC,MAAM,IAAI,CAAC,CAAC,GAAG,KAAK,CAAC;YACjE,SAAS,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,kBAAkB,CAAC,MAAM,IAAI,CAAC,CAAC,GAAG,KAAK,CAAC;SAClE;QAGD,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,UAAU,EAAE;YACpC,IAAI,CAAC,eAAe,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;SAC7C;QAGD,IAAI,CAAC,MAAM,CAAC,0BAA0B,EAAE,CAAC;QACzC,IAAI,CAAC,MAAM,CAAC,oBAAoB,EAAE,CAAC;IACrC,CAAC;IAGO,eAAe,CAAC,SAA8B,EAAE,UAAkB;QAExE,MAAM,UAAU,GAAG,IAAI,CAAC,mBAAmB,GAAG,UAAU,CAAC;QAGzD,IAAI,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,UAAU,EAAE;YACxD,SAAS,CAAC,IAAI,GAAG,gBAAgB,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,UAAU,EAAE,UAAU,EAAE,IAAI,CAAC,CAAC;SACzF;QAGD,IAAI,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,cAAc,IAAI,IAAI,CAAC,UAAU,EAAE;YAC5D,SAAS,CAAC,MAAM,GAAG,gBAAgB,CAAC,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,UAAU,EAAE,UAAU,EAAE,IAAI,CAAC,CAAC;SAC7F;IACH,CAAC;IAED,KAAK;QACH,KAAK,CAAC,KAAK,EAAE,CAAC;QAEd,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;IACrD,CAAC;CACF","file":"story.js","sourcesContent":["import { FadeIn } from './fade';\nimport type { EasingType, IGraphicAttribute } from '@visactor/vrender-core';\nimport { ACustomAnimate } from './custom-animate';\nimport { AnimateExecutor } from '../executor/animate-executor';\nimport { ColorStore, ColorType, interpolateColor } from '@visactor/vrender-core';\n\nexport class StoryFadeIn extends FadeIn {}\n\n// 滑动动画的参数接口\nexport interface ISlideAnimationOptions {\n direction?: 'top' | 'bottom' | 'left' | 'right';\n distance?: number;\n fromOpacity?: number; // 透明度初始值,默认0\n}\n\n// 缩放动画的参数接口\nexport interface IGrowAnimationOptions {\n fromScale?: number;\n direction?: 'x' | 'y' | 'xy';\n fromOpacity?: number; // 透明度初始值,默认0\n}\n\n// 旋转动画的参数接口\nexport interface ISpinAnimationOptions {\n fromAngle?: number;\n fromScale?: number;\n fromOpacity?: number; // 透明度初始值,默认0\n}\n\n// 描边动画的参数接口\nexport interface IStrokeAnimationOptions {\n lineWidth?: number; // 描边宽度,默认2\n strokeColor?: string; // 描边颜色,默认黑色\n fromOpacity?: number; // 透明度初始值,默认1\n dashLength?: number; // 虚线长度,默认为元素周长\n showFill?: boolean; // 是否显示填充,默认false\n fillOpacity?: number; // 填充透明度,仅当showFill为true时有效\n}\n\n// 脉冲/强调动画的参数接口\nexport interface IPulseAnimationOptions {\n pulseCount?: number; // 脉冲次数\n pulseOpacity?: number; // 脉冲透明度,默认0.3\n pulseScale?: number; // 缩放比例,默认1.05\n pulseColor?: string; // 脉冲颜色,默认为元素自身颜色\n pulseColorIntensity?: number; // 脉冲颜色强度,0-1,默认0.2\n strokeOnly?: boolean; // 是否只应用于描边,默认false\n fillOnly?: boolean; // 是否只应用于填充,默认false\n useScale?: boolean; // 是否使用缩放效果,默认true\n useOpacity?: boolean; // 是否使用透明度效果,默认true\n useColor?: boolean; // 是否使用颜色效果,默认false\n useStroke?: boolean; // 是否使用描边效果,默认true\n useFill?: boolean; // 是否使用填充效果,默认true\n}\n\n/**\n * 滑动入场动画,包括从上到下,从下到上,从左到右,从右到左的位置,以及透明度属性插值\n */\nexport class SlideIn extends ACustomAnimate<Record<string, number>> {\n declare valid: boolean;\n declare propKeys: string[];\n declare from: Record<string, number>;\n declare to: Record<string, number>;\n\n constructor(from: null, to: null, duration: number, easing: EasingType, params?: ISlideAnimationOptions) {\n super(from, to, duration, easing, params);\n }\n\n onBind(): void {\n super.onBind();\n // 用于入场的时候设置属性\n const attrs = this.target.getFinalAttribute();\n\n const direction = (this.params?.direction as 'top' | 'bottom' | 'left' | 'right') || 'right';\n const distance = this.params?.distance || 50;\n const fromOpacity = this.params?.fromOpacity ?? 0; // 使用透明度初始值参数\n\n // 初始化from和to对象\n const from: Record<string, number> = { opacity: fromOpacity, baseOpacity: fromOpacity };\n const to: Record<string, number> = { opacity: 1, baseOpacity: 1 };\n\n // 根据方向设置对应的属性\n if (direction === 'top') {\n from.y = (attrs.y ?? 0) - distance;\n to.y = attrs.y ?? 0;\n this.propKeys = ['opacity', 'baseOpacity', 'y'];\n } else if (direction === 'bottom') {\n from.y = (attrs.y ?? 0) + distance;\n to.y = attrs.y ?? 0;\n this.propKeys = ['opacity', 'baseOpacity', 'y'];\n } else if (direction === 'left') {\n from.x = (attrs.x ?? 0) - distance;\n to.x = attrs.x ?? 0;\n this.propKeys = ['opacity', 'baseOpacity', 'x'];\n } else {\n // right\n from.x = (attrs.x ?? 0) + distance;\n to.x = attrs.x ?? 0;\n this.propKeys = ['opacity', 'baseOpacity', 'x'];\n }\n\n this.from = from;\n this.to = to;\n this.props = to;\n\n // 将初始属性应用到目标对象\n this.target.setAttributes(from as any);\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n const attribute: Record<string, any> = this.target.attribute;\n this.propKeys.forEach(key => {\n attribute[key] = this.from[key] + (this.to[key] - this.from[key]) * ratio;\n });\n this.target.addUpdatePositionTag();\n this.target.addUpdateShapeAndBoundsTag();\n }\n}\n\n/**\n * 缩放入场动画,包括scaleX、scaleY属性从某个比例缩放到1,该比例可以小于1也可以大于1,以及透明度属性插值\n */\nexport class GrowIn extends ACustomAnimate<Record<string, number>> {\n declare valid: boolean;\n declare propKeys: string[];\n declare from: Record<string, number>;\n declare to: Record<string, number>;\n\n constructor(from: null, to: null, duration: number, easing: EasingType, params?: IGrowAnimationOptions) {\n super(from, to, duration, easing, params);\n }\n\n onBind(): void {\n super.onBind();\n // 用于入场的时候设置属性\n const attrs = this.target.getFinalAttribute();\n\n const fromScale = this.params?.fromScale ?? 0;\n const direction = this.params?.direction || 'xy';\n const fromOpacity = this.params?.fromOpacity ?? 0; // 使用透明度初始值参数\n\n // 初始化from和to对象\n const from: Record<string, number> = { opacity: fromOpacity, baseOpacity: fromOpacity };\n const to: Record<string, number> = { opacity: 1, baseOpacity: 1 };\n this.propKeys = ['opacity', 'baseOpacity'];\n\n // 根据方向设置对应的缩放属性\n if (direction === 'x' || direction === 'xy') {\n from.scaleX = fromScale;\n to.scaleX = attrs.scaleX ?? 1;\n this.propKeys.push('scaleX');\n }\n\n if (direction === 'y' || direction === 'xy') {\n from.scaleY = fromScale;\n to.scaleY = attrs.scaleY ?? 1;\n this.propKeys.push('scaleY');\n }\n\n this.from = from;\n this.to = to;\n this.props = to;\n\n // 将初始属性应用到目标对象\n this.target.setAttributes(from as any);\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n const attribute: Record<string, any> = this.target.attribute;\n this.propKeys.forEach(key => {\n attribute[key] = this.from[key] + (this.to[key] - this.from[key]) * ratio;\n });\n this.target.addUpdatePositionTag();\n this.target.addUpdateShapeAndBoundsTag();\n }\n}\n\n/**\n * 旋转入场动画,包括rotate属性从某个角度度旋转到0,以及缩放属性从某个比例缩放到1,该比例可以小于1也可以大于1\n */\nexport class SpinIn extends ACustomAnimate<Record<string, number>> {\n declare valid: boolean;\n declare propKeys: string[];\n declare from: Record<string, number>;\n declare to: Record<string, number>;\n\n constructor(from: null, to: null, duration: number, easing: EasingType, params?: ISpinAnimationOptions) {\n super(from, to, duration, easing, params);\n }\n\n onBind(): void {\n super.onBind();\n // 用于入场的时候设置属性\n const attrs = this.target.getFinalAttribute();\n\n const fromAngle = this.params?.fromAngle ?? Math.PI * 2; // 默认旋转一圈\n const fromScale = this.params?.fromScale ?? 0;\n const fromOpacity = this.params?.fromOpacity ?? 0; // 使用透明度初始值参数\n\n // 初始化from和to对象\n const from: Record<string, number> = {\n opacity: fromOpacity,\n baseOpacity: fromOpacity,\n angle: fromAngle,\n scaleX: fromScale,\n scaleY: fromScale\n };\n\n const to: Record<string, number> = {\n opacity: 1,\n baseOpacity: 1,\n angle: attrs.angle ?? 0,\n scaleX: attrs.scaleX ?? 1,\n scaleY: attrs.scaleY ?? 1\n };\n\n this.propKeys = ['opacity', 'baseOpacity', 'angle', 'scaleX', 'scaleY'];\n this.from = from;\n this.to = to;\n this.props = to;\n\n // 将初始属性应用到目标对象\n this.target.setAttributes(from as any);\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n const attribute: Record<string, any> = this.target.attribute;\n this.propKeys.forEach(key => {\n attribute[key] = this.from[key] + (this.to[key] - this.from[key]) * ratio;\n });\n this.target.addUpdatePositionTag();\n this.target.addUpdateShapeAndBoundsTag();\n }\n}\n\n/**\n * 描边入场动画,使用lineDashOffset实现描边效果\n * 通过调整虚线偏移量,创建线条逐渐显示的动画效果\n */\nexport class StrokeIn extends ACustomAnimate<Record<string, any>> {\n declare valid: boolean;\n declare propKeys: string[];\n declare from: Record<string, any>;\n declare to: Record<string, any>;\n private perimeter: number = 0;\n private originalAttributes: Record<string, any> = {};\n\n constructor(from: null, to: null, duration: number, easing: EasingType, params?: IStrokeAnimationOptions) {\n super(from, to, duration, easing, params);\n }\n\n onBind(): void {\n super.onBind();\n // 保存原始属性\n this.originalAttributes = { ...this.target.getAttributes() };\n\n // 获取图形周长\n if (this.target.type === 'rect') {\n const attr = this.target.attribute as any;\n const width = attr.width ?? 100;\n const height = attr.height ?? 100;\n this.perimeter = 2 * (width + height);\n } else if (this.target.type === 'circle') {\n const attr = this.target.attribute as any;\n const radius = attr.radius ?? 50;\n this.perimeter = 2 * Math.PI * radius;\n } else if (this.target.type === 'ellipse') {\n const attr = this.target.attribute as any;\n const radiusX = attr.radiusX ?? 50;\n const radiusY = attr.radiusY ?? 50;\n // 椭圆周长近似计算\n this.perimeter = 2 * Math.PI * Math.sqrt((radiusX * radiusX + radiusY * radiusY) / 2);\n } else {\n // 对于其他形状,使用默认值\n this.perimeter = 1000;\n }\n\n const lineWidth = this.params?.lineWidth ?? 2;\n const strokeColor = this.params?.strokeColor ?? 'black';\n const fromOpacity = this.params?.fromOpacity ?? 1;\n const dashLength = this.params?.dashLength ?? this.perimeter;\n const showFill = this.params?.showFill ?? false;\n const fillOpacity = this.params?.fillOpacity ?? 0;\n\n // 设置初始状态\n this.from = {\n lineDash: [dashLength, dashLength],\n lineDashOffset: dashLength,\n lineWidth,\n stroke: strokeColor,\n strokeOpacity: fromOpacity\n };\n\n // 设置目标状态\n this.to = {\n lineDash: [dashLength, dashLength],\n lineDashOffset: 0,\n lineWidth,\n stroke: strokeColor,\n strokeOpacity: fromOpacity\n };\n\n // 如果需要显示填充,添加填充相关属性\n if (showFill) {\n this.from.fillOpacity = fillOpacity;\n this.to.fillOpacity = this.originalAttributes.fillOpacity ?? 1;\n } else {\n this.from.fillOpacity = 0;\n this.to.fillOpacity = 0;\n }\n\n this.propKeys = ['lineDash', 'lineDashOffset', 'lineWidth', 'stroke', 'strokeOpacity', 'fillOpacity'];\n this.props = this.to;\n\n // 应用初始属性\n this.target.setAttributes(this.from);\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n const attribute: Record<string, any> = this.target.attribute;\n\n // 更新lineDashOffset\n attribute.lineDashOffset = this.from.lineDashOffset + (this.to.lineDashOffset - this.from.lineDashOffset) * ratio;\n\n // 更新fillOpacity (如果需要显示填充)\n if (this.params?.showFill) {\n attribute.fillOpacity = this.from.fillOpacity + (this.to.fillOpacity - this.from.fillOpacity) * ratio;\n }\n }\n\n onEnd(): void {\n super.onEnd();\n // 动画结束后,是否要恢复原始属性\n if (!this.params?.showFill) {\n // 如果不显示填充,恢复原始的stroke属性但保持fillOpacity为0\n const originalAttrs = { ...this.originalAttributes };\n originalAttrs.fillOpacity = 0;\n this.target.setAttributes(originalAttrs);\n }\n }\n}\n\n/**\n * 描边出场动画,使用lineDashOffset实现描边消失效果\n */\nexport class StrokeOut extends ACustomAnimate<Record<string, any>> {\n declare valid: boolean;\n declare propKeys: string[];\n declare from: Record<string, any>;\n declare to: Record<string, any>;\n private perimeter: number = 0;\n private originalAttributes: Record<string, any> = {};\n\n constructor(from: null, to: null, duration: number, easing: EasingType, params?: IStrokeAnimationOptions) {\n super(from, to, duration, easing, params);\n }\n\n onFirstRun(): void {\n // 保存原始属性\n this.originalAttributes = { ...this.target.getAttributes() };\n\n // 获取图形周长\n if (this.target.type === 'rect') {\n const attr = this.target.attribute as any;\n const width = attr.width ?? 100;\n const height = attr.height ?? 100;\n this.perimeter = 2 * (width + height);\n } else if (this.target.type === 'circle') {\n const attr = this.target.attribute as any;\n const radius = attr.radius ?? 50;\n this.perimeter = 2 * Math.PI * radius;\n } else if (this.target.type === 'ellipse') {\n const attr = this.target.attribute as any;\n const radiusX = attr.radiusX ?? 50;\n const radiusY = attr.radiusY ?? 50;\n // 椭圆周长近似计算\n this.perimeter = 2 * Math.PI * Math.sqrt((radiusX * radiusX + radiusY * radiusY) / 2);\n } else {\n // 对于其他形状,使用默认值\n this.perimeter = 1000;\n }\n\n const lineWidth = this.params?.lineWidth ?? 2;\n const strokeColor = this.params?.strokeColor ?? 'black';\n const fromOpacity = this.params?.fromOpacity ?? 1;\n const dashLength = this.params?.dashLength ?? this.perimeter;\n const showFill = this.params?.showFill ?? false;\n\n // 设置初始状态 - 完全显示的描边\n this.from = {\n lineDash: [dashLength, dashLength],\n lineDashOffset: 0,\n lineWidth,\n stroke: strokeColor,\n strokeOpacity: fromOpacity\n };\n\n // 设置目标状态 - 完全消失的描边\n this.to = {\n lineDash: [dashLength, dashLength],\n lineDashOffset: -dashLength,\n lineWidth,\n stroke: strokeColor,\n strokeOpacity: fromOpacity\n };\n\n // 处理填充\n if (showFill) {\n this.from.fillOpacity = this.originalAttributes.fillOpacity ?? 1;\n this.to.fillOpacity = 0;\n } else {\n this.from.fillOpacity = 0;\n this.to.fillOpacity = 0;\n }\n\n this.propKeys = ['lineDash', 'lineDashOffset', 'lineWidth', 'stroke', 'strokeOpacity', 'fillOpacity'];\n this.props = this.to;\n\n // 应用初始属性\n this.target.setAttributes(this.from);\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n const attribute: Record<string, any> = this.target.attribute;\n\n // 更新lineDashOffset\n attribute.lineDashOffset = this.from.lineDashOffset + (this.to.lineDashOffset - this.from.lineDashOffset) * ratio;\n\n // 更新fillOpacity (如果有)\n if (this.params?.showFill) {\n attribute.fillOpacity = this.from.fillOpacity + (this.to.fillOpacity - this.from.fillOpacity) * ratio;\n }\n }\n}\n\n// 复合动画的参数接口\nexport interface IMoveScaleAnimationOptions {\n slideDirection?: 'top' | 'bottom' | 'left' | 'right';\n slideDistance?: number;\n fromScale?: number;\n scaleDirection?: 'x' | 'y' | 'xy';\n slideRatio?: number; // 滑动动画占总时长的比例,默认0.5\n fromOpacity?: number; // 透明度初始值,默认0\n}\n\n/**\n * 移动+缩放入场动画\n * 先走SlideIn,然后走GrowIn\n */\nexport class MoveScaleIn extends ACustomAnimate<any> {\n declare valid: boolean;\n private readonly slideInDuration: number;\n private readonly growInDuration: number;\n\n constructor(from: null, to: null, duration: number, easing: EasingType, params?: IMoveScaleAnimationOptions) {\n super(from, to, duration, easing, params);\n const slideRatio = params?.slideRatio ?? 0.5;\n this.slideInDuration = duration * slideRatio;\n this.growInDuration = duration * (1 - slideRatio);\n }\n\n onBind(): void {\n super.onBind();\n // 创建AnimateExecutor来运行序列动画\n const executor = new AnimateExecutor(this.target);\n\n // 第一步:滑动入场(包含透明度变化)\n executor.execute({\n type: 'custom',\n custom: SlideIn,\n customParameters: {\n direction: this.params?.slideDirection || 'right',\n distance: this.params?.slideDistance || 50,\n fromOpacity: this.params?.fromOpacity ?? 0\n },\n duration: this.slideInDuration,\n easing: this.easing\n });\n\n // 第二步:缩放入场(不包含透明度变化)\n executor.execute({\n type: 'custom',\n custom: GrowIn,\n customParameters: {\n fromScale: this.params?.fromScale || 0.5,\n direction: this.params?.scaleDirection || 'xy',\n fromOpacity: 1 // 设置初始透明度为1,使第二阶段不进行透明度插值\n },\n duration: this.growInDuration,\n easing: this.easing,\n delay: this.slideInDuration // 等第一步完成后再开始\n });\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n // 动画逻辑由子动画处理\n }\n}\n\n// 移动旋转动画的参数接口\nexport interface IMoveRotateAnimationOptions {\n slideDirection?: 'top' | 'bottom' | 'left' | 'right';\n slideDistance?: number;\n fromAngle?: number;\n fromScale?: number;\n slideRatio?: number; // 滑动动画占总时长的比例,默认0.5\n fromOpacity?: number; // 透明度初始值,默认0\n}\n\n/**\n * 移动+旋转入场动画\n * 先走SlideIn,然后走SpinIn\n */\nexport class MoveRotateIn extends ACustomAnimate<any> {\n declare valid: boolean;\n private readonly slideInDuration: number;\n private readonly spinInDuration: number;\n\n constructor(from: null, to: null, duration: number, easing: EasingType, params?: IMoveRotateAnimationOptions) {\n super(from, to, duration, easing, params);\n const slideRatio = params?.slideRatio ?? 0.5;\n this.slideInDuration = duration * slideRatio;\n this.spinInDuration = duration * (1 - slideRatio);\n }\n\n onBind(): void {\n super.onBind();\n // 创建AnimateExecutor来运行序列动画\n const executor = new AnimateExecutor(this.target);\n\n // 第一步:滑动入场(包含透明度变化)\n executor.execute({\n type: 'custom',\n custom: SlideIn,\n customParameters: {\n direction: this.params?.slideDirection || 'right',\n distance: this.params?.slideDistance || 50,\n fromOpacity: this.params?.fromOpacity ?? 0\n },\n duration: this.slideInDuration,\n easing: this.easing\n });\n\n // 第二步:旋转入场(不包含透明度变化)\n executor.execute({\n type: 'custom',\n custom: SpinIn,\n customParameters: {\n fromAngle: this.params?.fromAngle || Math.PI,\n fromScale: this.params?.fromScale || 0.5,\n fromOpacity: 1 // 设置初始透明度为1,使第二阶段不进行透明度插值\n },\n duration: this.spinInDuration,\n easing: this.easing,\n delay: this.slideInDuration // 等第一步完成后再开始\n });\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n // 动画逻辑由子动画处理\n }\n}\n\n/**\n * 滑动出场动画,包括从当前位置滑动到指定方向,以及透明度属性插值\n */\nexport class SlideOut extends ACustomAnimate<Record<string, number>> {\n declare valid: boolean;\n declare propKeys: string[];\n declare from: Record<string, number>;\n declare to: Record<string, number>;\n\n constructor(\n from: null,\n to: null,\n duration: number,\n easing: EasingType,\n params?: ISlideAnimationOptions & { toOpacity?: number }\n ) {\n super(from, to, duration, easing, params);\n }\n\n onFirstRun(): void {\n // 用于出场的时候设置属性\n const attrs = this.target.getAttributes();\n\n const direction = (this.params?.direction as 'top' | 'bottom' | 'left' | 'right') || 'right';\n const distance = this.params?.distance || 50;\n const fromOpacity = this.params?.fromOpacity ?? 1; // 使用透明度初始值参数\n const toOpacity = this.params?.toOpacity ?? 0; // 使用目标透明度参数\n\n // 初始化from和to对象\n const from: Record<string, number> = { opacity: fromOpacity, baseOpacity: fromOpacity };\n const to: Record<string, number> = { opacity: toOpacity, baseOpacity: toOpacity };\n\n // 根据方向设置对应的属性\n if (direction === 'top') {\n from.y = attrs.y ?? 0;\n to.y = (attrs.y ?? 0) - distance;\n this.propKeys = ['opacity', 'baseOpacity', 'y'];\n } else if (direction === 'bottom') {\n from.y = attrs.y ?? 0;\n to.y = (attrs.y ?? 0) + distance;\n this.propKeys = ['opacity', 'baseOpacity', 'y'];\n } else if (direction === 'left') {\n from.x = attrs.x ?? 0;\n to.x = (attrs.x ?? 0) - distance;\n this.propKeys = ['opacity', 'baseOpacity', 'x'];\n } else {\n // right\n from.x = attrs.x ?? 0;\n to.x = (attrs.x ?? 0) + distance;\n this.propKeys = ['opacity', 'baseOpacity', 'x'];\n }\n\n this.from = from;\n this.to = to;\n this.props = to;\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n const attribute: Record<string, any> = this.target.attribute;\n this.propKeys.forEach(key => {\n attribute[key] = this.from[key] + (this.to[key] - this.from[key]) * ratio;\n });\n this.target.addUpdatePositionTag();\n this.target.addUpdateShapeAndBoundsTag();\n }\n}\n\n/**\n * 缩放出场动画,包括scaleX、scaleY属性从当前比例缩放到指定比例,以及透明度属性插值\n */\nexport class GrowOut extends ACustomAnimate<Record<string, number>> {\n declare valid: boolean;\n declare propKeys: string[];\n declare from: Record<string, number>;\n declare to: Record<string, number>;\n\n constructor(\n from: null,\n to: null,\n duration: number,\n easing: EasingType,\n params?: IGrowAnimationOptions & { toOpacity?: number }\n ) {\n super(from, to, duration, easing, params);\n }\n\n onFirstRun(): void {\n // 用于出场的时候设置属性\n const attrs = this.target.getAttributes();\n\n const toScale = this.params?.fromScale ?? 0; // 使用fromScale作为目标比例\n const direction = this.params?.direction || 'xy';\n const fromOpacity = this.params?.fromOpacity ?? 1; // 使用透明度初始值参数\n const toOpacity = this.params?.toOpacity ?? 0; // 使用目标透明度参数\n\n // 初始化from和to对象\n const from: Record<string, number> = { opacity: fromOpacity, baseOpacity: fromOpacity };\n const to: Record<string, number> = { opacity: toOpacity, baseOpacity: toOpacity };\n this.propKeys = ['opacity', 'baseOpacity'];\n\n // 根据方向设置对应的缩放属性\n if (direction === 'x' || direction === 'xy') {\n from.scaleX = attrs.scaleX ?? 1;\n to.scaleX = toScale;\n this.propKeys.push('scaleX');\n }\n\n if (direction === 'y' || direction === 'xy') {\n from.scaleY = attrs.scaleY ?? 1;\n to.scaleY = toScale;\n this.propKeys.push('scaleY');\n }\n\n this.from = from;\n this.to = to;\n this.props = to;\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n const attribute: Record<string, any> = this.target.attribute;\n this.propKeys.forEach(key => {\n attribute[key] = this.from[key] + (this.to[key] - this.from[key]) * ratio;\n });\n this.target.addUpdatePositionTag();\n this.target.addUpdateShapeAndBoundsTag();\n }\n}\n\n/**\n * 旋转出场动画,包括rotate属性从当前角度旋转到指定角度,以及缩放属性从当前比例缩放到指定比例\n */\nexport class SpinOut extends ACustomAnimate<Record<string, number>> {\n declare valid: boolean;\n declare propKeys: string[];\n declare from: Record<string, number>;\n declare to: Record<string, number>;\n\n constructor(\n from: null,\n to: null,\n duration: number,\n easing: EasingType,\n params?: ISpinAnimationOptions & { toOpacity?: number }\n ) {\n super(from, to, duration, easing, params);\n }\n\n onFirstRun(): void {\n // 用于出场的时候设置属性\n const attrs = this.target.getAttributes();\n\n const toAngle = this.params?.fromAngle ?? Math.PI * 2; // 默认旋转一圈\n const toScale = this.params?.fromScale ?? 0;\n const fromOpacity = this.params?.fromOpacity ?? 1; // 使用透明度初始值参数\n const toOpacity = this.params?.toOpacity ?? 0; // 使用目标透明度参数\n\n // 初始化from和to对象\n const from: Record<string, number> = {\n opacity: fromOpacity,\n baseOpacity: fromOpacity,\n angle: attrs.angle ?? 0,\n scaleX: attrs.scaleX ?? 1,\n scaleY: attrs.scaleY ?? 1\n };\n\n const to: Record<string, number> = {\n opacity: toOpacity,\n baseOpacity: toOpacity,\n angle: toAngle,\n scaleX: toScale,\n scaleY: toScale\n };\n\n this.propKeys = ['opacity', 'baseOpacity', 'angle', 'scaleX', 'scaleY'];\n this.from = from;\n this.to = to;\n this.props = to;\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n const attribute: Record<string, any> = this.target.attribute;\n this.propKeys.forEach(key => {\n attribute[key] = this.from[key] + (this.to[key] - this.from[key]) * ratio;\n });\n this.target.addUpdatePositionTag();\n this.target.addUpdateShapeAndBoundsTag();\n }\n}\n\n/**\n * 移动+缩放出场动画\n * 先走GrowOut,然后走SlideOut\n */\nexport class MoveScaleOut extends ACustomAnimate<any> {\n declare valid: boolean;\n private readonly growOutDuration: number;\n private readonly slideOutDuration: number;\n\n constructor(from: null, to: null, duration: number, easing: EasingType, params?: IMoveScaleAnimationOptions) {\n super(from, to, duration, easing, params);\n const slideRatio = params?.slideRatio ?? 0.5;\n this.growOutDuration = duration * (1 - slideRatio);\n this.slideOutDuration = duration * slideRatio;\n }\n\n onFirstRun(): void {\n // 创建AnimateExecutor来运行序列动画\n const executor = new AnimateExecutor(this.target);\n\n // 第一步:缩放出场(不包含透明度变化)\n executor.execute({\n type: 'custom',\n custom: GrowOut,\n customParameters: {\n fromScale: this.params?.fromScale || 0.5,\n direction: this.params?.scaleDirection || 'xy',\n fromOpacity: 1, // 保持透明度为1,不做变化\n toOpacity: 1 // 确保第一阶段不改变透明度\n },\n duration: this.growOutDuration,\n easing: this.easing\n });\n\n // 第二步:滑动出场(包含透明度变化)\n executor.execute({\n type: 'custom',\n custom: SlideOut,\n customParameters: {\n direction: this.params?.slideDirection || 'right',\n distance: this.params?.slideDistance || 50,\n fromOpacity: 1 // 起始透明度为1\n },\n duration: this.slideOutDuration,\n easing: this.easing,\n delay: this.growOutDuration // 等第一步完成后再开始\n });\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n // 动画逻辑由子动画处理\n }\n}\n\n/**\n * 移动+旋转出场动画\n * 先走SpinOut,然后走SlideOut\n */\nexport class MoveRotateOut extends ACustomAnimate<any> {\n declare valid: boolean;\n private readonly spinOutDuration: number;\n private readonly slideOutDuration: number;\n\n constructor(from: null, to: null, duration: number, easing: EasingType, params?: IMoveRotateAnimationOptions) {\n super(from, to, duration, easing, params);\n const slideRatio = params?.slideRatio ?? 0.5;\n this.spinOutDuration = duration * (1 - slideRatio);\n this.slideOutDuration = duration * slideRatio;\n }\n\n onFirstRun(): void {\n // 创建AnimateExecutor来运行序列动画\n const executor = new AnimateExecutor(this.target);\n\n // 第一步:旋转出场(不包含透明度变化)\n executor.execute({\n type: 'custom',\n custom: SpinOut,\n customParameters: {\n fromAngle: this.params?.fromAngle || Math.PI,\n fromScale: this.params?.fromScale || 0.5,\n fromOpacity: 1, // 保持透明度为1,不做变化\n toOpacity: 1 // 确保第一阶段不改变透明度\n },\n duration: this.spinOutDuration,\n easing: this.easing\n });\n\n // 第二步:滑动出场(包含透明度变化)\n executor.execute({\n type: 'custom',\n custom: SlideOut,\n customParameters: {\n direction: this.params?.slideDirection || 'right',\n distance: this.params?.slideDistance || 50,\n fromOpacity: 1 // 起始透明度为1\n },\n duration: this.slideOutDuration,\n easing: this.easing,\n delay: this.spinOutDuration // 等第一步完成后再开始\n });\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n // 动画逻辑由子动画处理\n }\n}\n\n/**\n * 脉冲/强调动画,通过循环变化透明度、颜色和缩放来吸引注意力\n */\nexport class PulseAnimate extends ACustomAnimate<Record<string, any>> {\n declare valid: boolean;\n private originalAttributes: Record<string, any> = {};\n private pulseCount: number = 3; // 默认3次脉冲\n private pulseOpacity: number = 0.3;\n private pulseScale: number = 1.05;\n private pulseColor: string | null = null;\n private pulseColorIntensity: number = 0.2;\n private strokeOnly: boolean = false;\n private fillOnly: boolean = false;\n private useScale: boolean = true;\n private useOpacity: boolean = true;\n private useStroke: boolean = true;\n private useFill: boolean = true;\n private useColor: boolean = false;\n private originalFill: string | null = null;\n private originalStroke: string | null = null;\n\n constructor(from: null, to: null, duration: number, easing: EasingType, params?: IPulseAnimationOptions) {\n super(from, to, duration, easing, params);\n\n // 配置脉冲参数\n if (params?.pulseCount !== undefined) {\n this.pulseCount = params.pulseCount;\n }\n if (params?.pulseScale !== undefined) {\n this.pulseScale = params.pulseScale;\n }\n if (params?.pulseColor !== undefined) {\n this.pulseColor = params.pulseColor;\n }\n if (params?.pulseColorIntensity !== undefined) {\n this.pulseColorIntensity = params.pulseColorIntensity;\n }\n if (params?.strokeOnly !== undefined) {\n this.strokeOnly = params.strokeOnly;\n }\n if (params?.fillOnly !== undefined) {\n this.fillOnly = params.fillOnly;\n }\n if (params?.useScale !== undefined) {\n this.useScale = params.useScale;\n }\n if (params?.useOpacity !== undefined) {\n this.useOpacity = params.useOpacity;\n }\n if (params?.useStroke !== undefined) {\n this.useStroke = params.useStroke;\n }\n if (params?.useFill !== undefined) {\n this.useFill = params.useFill;\n }\n if (params?.useColor !== undefined) {\n this.useColor = params.useColor;\n }\n }\n\n onBind(): void {\n super.onBind();\n // 保存原始属性\n this.originalAttributes = { ...this.target.getAttributes() };\n\n // 保存颜色相关的属性\n if (this.useColor) {\n this.originalFill = this.originalAttributes.fill || null;\n this.originalStroke = this.originalAttributes.stroke || null;\n\n // 如果没有指定脉冲颜色,使用元素自身的颜色\n if (!this.pulseColor) {\n if (this.fillOnly && this.originalFill) {\n this.pulseColor = this.originalFill;\n } else if (this.strokeOnly && this.originalStroke) {\n this.pulseColor = this.originalStroke;\n } else if (this.originalFill) {\n this.pulseColor = this.originalFill;\n } else if (this.originalStroke) {\n this.pulseColor = this.originalStroke;\n } else {\n this.pulseColor = '#FFFFFF'; // 默认白色\n }\n }\n }\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n // 使用ratio计算脉冲效果\n // ratio从0到1表示整个动画的进度\n\n // 计算脉冲值:通过将单个进度映射到多个脉冲周期\n // 将0-1的ratio映射到0到pulseCount*2*PI的角度,用于sin函数\n const angle = ratio * Math.PI * this.pulseCount;\n // 将sin值(-1到1)映射到0到1的范围\n const pulseValue = Math.abs(Math.sin(angle));\n\n // 应用属性\n const attribute: Record<string, any> = this.target.attribute;\n\n // 应用透明度 pulse\n if (this.useOpacity) {\n // 确保即使是最小值也是基于原始透明度的百分比\n const opacity = 1 + (this.pulseOpacity - 1) * pulseValue;\n if (this.useStroke) {\n attribute.strokeOpacity = (this.originalAttributes.strokeOpacity || 1) * opacity;\n }\n if (this.useFill) {\n attribute.fillOpacity = (this.originalAttributes.fillOpacity || 1) * opacity;\n }\n }\n\n // 应用缩放脉冲\n if (this.useScale) {\n // 计算缩放比例: 从1到pulseScale之间变化\n const scale = 1 + (this.pulseScale - 1) * pulseValue;\n attribute.scaleX = (this.originalAttributes.scaleX || 1) * scale;\n attribute.scaleY = (this.originalAttributes.scaleY || 1) * scale;\n }\n\n // 应用颜色脉冲\n if (this.useColor && this.pulseColor) {\n this.applyColorPulse(attribute, pulseValue);\n }\n\n // 确保更新渲染\n this.target.addUpdateShapeAndBoundsTag();\n this.target.addUpdatePositionTag();\n }\n\n // 应用颜色脉冲\n private applyColorPulse(attribute: Record<string, any>, pulseValue: number): void {\n // 根据pulseColorIntensity调整颜色变化强度\n const colorRatio = this.pulseColorIntensity * pulseValue;\n\n // 应用填充颜色脉冲\n if (this.useFill && this.originalFill && this.pulseColor) {\n attribute.fill = interpolateColor(this.originalFill, this.pulseColor, colorRatio, true);\n }\n\n // 应用描边颜色脉冲\n if (this.useStroke && this.originalStroke && this.pulseColor) {\n attribute.stroke = interpolateColor(this.originalStroke, this.pulseColor, colorRatio, true);\n }\n }\n\n onEnd(): void {\n super.onEnd();\n // 恢复原始属性\n this.target.setAttributes(this.originalAttributes);\n }\n}\n"]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { EasingType, IArea, ICurve, ICustomPath2D, IGraphic, ILine, ILineAttribute, IRect, IRectAttribute } from '@visactor/vrender-core';
|
|
2
|
+
import { ACustomAnimate } from './custom-animate';
|
|
3
|
+
import type { IPoint } from '@visactor/vutils';
|
|
4
|
+
export declare class StreamLight extends ACustomAnimate<any> {
|
|
5
|
+
valid: boolean;
|
|
6
|
+
target: IGraphic;
|
|
7
|
+
rect: IRect;
|
|
8
|
+
line: ILine;
|
|
9
|
+
area: IArea;
|
|
10
|
+
constructor(from: any, to: any, duration: number, easing: EasingType, params?: {
|
|
11
|
+
attribute?: Partial<IRectAttribute | ILineAttribute>;
|
|
12
|
+
streamLength?: number;
|
|
13
|
+
isHorizontal?: boolean;
|
|
14
|
+
});
|
|
15
|
+
getEndProps(): Record<string, any>;
|
|
16
|
+
onStart(): void;
|
|
17
|
+
onStartLineOrArea(type: 'line' | 'area'): void;
|
|
18
|
+
onStartRect(): void;
|
|
19
|
+
onBind(): void;
|
|
20
|
+
onEnd(): void;
|
|
21
|
+
onUpdate(end: boolean, ratio: number, out: Record<string, any>): void;
|
|
22
|
+
protected onUpdateRect(end: boolean, ratio: number, out: Record<string, any>): void;
|
|
23
|
+
protected onUpdateLineOrArea(end: boolean, ratio: number, out: Record<string, any>): void;
|
|
24
|
+
protected _onUpdateLineOrAreaWithCache(customPath: ICustomPath2D, g: ILine | IArea, end: boolean, ratio: number, out: Record<string, any>): void;
|
|
25
|
+
protected _updateCurves(customPath: ICustomPath2D, curves: ICurve<IPoint>[], totalLen: number, ratio: number): void;
|
|
26
|
+
protected _onUpdateLineWithoutCache(customPath: ICustomPath2D, line: ILine, end: boolean, ratio: number, out: Record<string, any>): void;
|
|
27
|
+
}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { application, AttributeUpdateType, CustomPath2D, divideCubic } from "@visactor/vrender-core";
|
|
2
|
+
|
|
3
|
+
import { ACustomAnimate } from "./custom-animate";
|
|
4
|
+
|
|
5
|
+
import { PointService } from "@visactor/vutils";
|
|
6
|
+
|
|
7
|
+
export class StreamLight extends ACustomAnimate {
|
|
8
|
+
constructor(from, to, duration, easing, params) {
|
|
9
|
+
super(from, to, duration, easing, params);
|
|
10
|
+
}
|
|
11
|
+
getEndProps() {
|
|
12
|
+
return {};
|
|
13
|
+
}
|
|
14
|
+
onStart() {
|
|
15
|
+
this.target && ("rect" === this.target.type ? this.onStartRect() : "line" === this.target.type ? this.onStartLineOrArea("line") : "area" === this.target.type && this.onStartLineOrArea("area"));
|
|
16
|
+
}
|
|
17
|
+
onStartLineOrArea(type) {
|
|
18
|
+
var _a;
|
|
19
|
+
const root = this.target.attachShadow(), line = application.graphicService.creator[type](Object.assign({}, null === (_a = this.params) || void 0 === _a ? void 0 : _a.attribute));
|
|
20
|
+
this[type] = line, line.pathProxy = new CustomPath2D, root.add(line);
|
|
21
|
+
}
|
|
22
|
+
onStartRect() {
|
|
23
|
+
var _a, _b, _c;
|
|
24
|
+
const root = this.target.attachShadow(), isHorizontal = null === (_b = null === (_a = this.params) || void 0 === _a ? void 0 : _a.isHorizontal) || void 0 === _b || _b, sizeAttr = isHorizontal ? "height" : "width", otherSizeAttr = isHorizontal ? "width" : "height", size = this.target.AABBBounds[sizeAttr](), y = isHorizontal ? 0 : this.target.AABBBounds.y1, rect = application.graphicService.creator.rect(Object.assign(Object.assign({
|
|
25
|
+
[sizeAttr]: size,
|
|
26
|
+
fill: "#bcdeff",
|
|
27
|
+
shadowBlur: 30,
|
|
28
|
+
shadowColor: "#bcdeff"
|
|
29
|
+
}, null === (_c = this.params) || void 0 === _c ? void 0 : _c.attribute), {
|
|
30
|
+
x: 0,
|
|
31
|
+
y: y,
|
|
32
|
+
[otherSizeAttr]: 0
|
|
33
|
+
}));
|
|
34
|
+
this.rect = rect, root.add(rect);
|
|
35
|
+
}
|
|
36
|
+
onBind() {}
|
|
37
|
+
onEnd() {
|
|
38
|
+
this.target.detachShadow();
|
|
39
|
+
}
|
|
40
|
+
onUpdate(end, ratio, out) {
|
|
41
|
+
return this.rect ? this.onUpdateRect(end, ratio, out) : this.line || this.area ? this.onUpdateLineOrArea(end, ratio, out) : void 0;
|
|
42
|
+
}
|
|
43
|
+
onUpdateRect(end, ratio, out) {
|
|
44
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
45
|
+
const isHorizontal = null === (_b = null === (_a = this.params) || void 0 === _a ? void 0 : _a.isHorizontal) || void 0 === _b || _b, parentAttr = this.target.attribute;
|
|
46
|
+
if (isHorizontal) {
|
|
47
|
+
const parentWidth = null !== (_d = null !== (_c = parentAttr.width) && void 0 !== _c ? _c : Math.abs(parentAttr.x1 - parentAttr.x)) && void 0 !== _d ? _d : 250, streamLength = null !== (_f = null === (_e = this.params) || void 0 === _e ? void 0 : _e.streamLength) && void 0 !== _f ? _f : parentWidth, maxLength = null !== (_j = null === (_h = null === (_g = this.params) || void 0 === _g ? void 0 : _g.attribute) || void 0 === _h ? void 0 : _h.width) && void 0 !== _j ? _j : 60, startX = -maxLength, currentX = startX + (streamLength - startX) * ratio, x = Math.max(currentX, 0), w = Math.min(Math.min(currentX + maxLength, maxLength), streamLength - currentX), width = w + x > parentWidth ? Math.max(parentWidth - x, 0) : w;
|
|
48
|
+
this.rect.setAttributes({
|
|
49
|
+
x: x,
|
|
50
|
+
width: width,
|
|
51
|
+
dx: Math.min(parentAttr.x1 - parentAttr.x, 0)
|
|
52
|
+
}, !1, {
|
|
53
|
+
type: AttributeUpdateType.ANIMATE_PLAY,
|
|
54
|
+
animationState: {
|
|
55
|
+
ratio: ratio,
|
|
56
|
+
end: end
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
} else {
|
|
60
|
+
const parentHeight = null !== (_l = null !== (_k = parentAttr.height) && void 0 !== _k ? _k : Math.abs(parentAttr.y1 - parentAttr.y)) && void 0 !== _l ? _l : 250, streamLength = null !== (_o = null === (_m = this.params) || void 0 === _m ? void 0 : _m.streamLength) && void 0 !== _o ? _o : parentHeight, maxLength = null !== (_r = null === (_q = null === (_p = this.params) || void 0 === _p ? void 0 : _p.attribute) || void 0 === _q ? void 0 : _q.height) && void 0 !== _r ? _r : 60, currentY = parentHeight - (streamLength + maxLength) * ratio;
|
|
61
|
+
let y = Math.min(currentY, parentHeight);
|
|
62
|
+
const h = Math.min(parentHeight - currentY, maxLength);
|
|
63
|
+
let height;
|
|
64
|
+
y <= 0 ? (height = Math.max(y + h, 0), y = 0) : height = h, this.rect.setAttributes({
|
|
65
|
+
y: y,
|
|
66
|
+
height: height,
|
|
67
|
+
dy: Math.min(parentAttr.y1 - parentAttr.y, 0)
|
|
68
|
+
}, !1, {
|
|
69
|
+
type: AttributeUpdateType.ANIMATE_PLAY,
|
|
70
|
+
animationState: {
|
|
71
|
+
ratio: ratio,
|
|
72
|
+
end: end
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
onUpdateLineOrArea(end, ratio, out) {
|
|
78
|
+
const target = this.line || this.area;
|
|
79
|
+
if (!target) return;
|
|
80
|
+
const customPath = target.pathProxy, targetLine = this.target;
|
|
81
|
+
targetLine.cache || targetLine.cacheArea ? this._onUpdateLineOrAreaWithCache(customPath, targetLine, end, ratio, out) : this._onUpdateLineWithoutCache(customPath, targetLine, end, ratio, out);
|
|
82
|
+
const targetAttrs = targetLine.attribute;
|
|
83
|
+
target.setAttributes(Object.assign({
|
|
84
|
+
stroke: targetAttrs.stroke
|
|
85
|
+
}, target.attribute)), target.addUpdateBoundTag();
|
|
86
|
+
}
|
|
87
|
+
_onUpdateLineOrAreaWithCache(customPath, g, end, ratio, out) {
|
|
88
|
+
var _a, _b;
|
|
89
|
+
if (customPath.clear(), "line" === g.type) {
|
|
90
|
+
let cache = g.cache;
|
|
91
|
+
Array.isArray(cache) || (cache = [ cache ]);
|
|
92
|
+
const totalLen = cache.reduce(((l, c) => l + c.getLength()), 0), curves = [];
|
|
93
|
+
return cache.forEach((c => {
|
|
94
|
+
c.curves.forEach((ci => curves.push(ci)));
|
|
95
|
+
})), this._updateCurves(customPath, curves, totalLen, ratio);
|
|
96
|
+
}
|
|
97
|
+
if ("area" === g.type && (null === (_b = null === (_a = g.cacheArea) || void 0 === _a ? void 0 : _a.top) || void 0 === _b ? void 0 : _b.curves)) {
|
|
98
|
+
const cache = g.cacheArea, totalLen = cache.top.curves.reduce(((a, b) => a + b.getLength()), 0);
|
|
99
|
+
return this._updateCurves(customPath, cache.top.curves, totalLen, ratio);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
_updateCurves(customPath, curves, totalLen, ratio) {
|
|
103
|
+
var _a, _b;
|
|
104
|
+
const startLen = totalLen * ratio, endLen = Math.min(startLen + (null !== (_b = null === (_a = this.params) || void 0 === _a ? void 0 : _a.streamLength) && void 0 !== _b ? _b : 10), totalLen);
|
|
105
|
+
let lastLen = 0, start = !1;
|
|
106
|
+
for (let i = 0; i < curves.length; i++) if (!1 !== curves[i].defined) {
|
|
107
|
+
const curveItem = curves[i], len = curveItem.getLength(), startPercent = 1 - (lastLen + len - startLen) / len;
|
|
108
|
+
let curveForStart, endPercent = 1 - (lastLen + len - endLen) / len;
|
|
109
|
+
if (lastLen < startLen && lastLen + len > startLen) if (start = !0, curveItem.p2 && curveItem.p3) {
|
|
110
|
+
const [_, curve2] = divideCubic(curveItem, startPercent);
|
|
111
|
+
customPath.moveTo(curve2.p0.x, curve2.p0.y), curveForStart = curve2;
|
|
112
|
+
} else {
|
|
113
|
+
const p = curveItem.getPointAt(startPercent);
|
|
114
|
+
customPath.moveTo(p.x, p.y);
|
|
115
|
+
}
|
|
116
|
+
if (lastLen < endLen && lastLen + len > endLen) {
|
|
117
|
+
if (curveItem.p2 && curveItem.p3) {
|
|
118
|
+
curveForStart && (endPercent = (endLen - startLen) / curveForStart.getLength());
|
|
119
|
+
const [curve1] = divideCubic(curveForStart || curveItem, endPercent);
|
|
120
|
+
customPath.bezierCurveTo(curve1.p1.x, curve1.p1.y, curve1.p2.x, curve1.p2.y, curve1.p3.x, curve1.p3.y);
|
|
121
|
+
} else {
|
|
122
|
+
const p = curveItem.getPointAt(endPercent);
|
|
123
|
+
customPath.lineTo(p.x, p.y);
|
|
124
|
+
}
|
|
125
|
+
break;
|
|
126
|
+
}
|
|
127
|
+
if (start) if (curveItem.p2 && curveItem.p3) {
|
|
128
|
+
const curve = curveForStart || curveItem;
|
|
129
|
+
customPath.bezierCurveTo(curve.p1.x, curve.p1.y, curve.p2.x, curve.p2.y, curve.p3.x, curve.p3.y);
|
|
130
|
+
} else customPath.lineTo(curveItem.p1.x, curveItem.p1.y);
|
|
131
|
+
lastLen += len;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
_onUpdateLineWithoutCache(customPath, line, end, ratio, out) {
|
|
135
|
+
var _a, _b;
|
|
136
|
+
const {points: points, curveType: curveType} = line.attribute;
|
|
137
|
+
if (!points || points.length < 2 || "linear" !== curveType) return;
|
|
138
|
+
let totalLen = 0;
|
|
139
|
+
for (let i = 1; i < points.length; i++) totalLen += PointService.distancePP(points[i], points[i - 1]);
|
|
140
|
+
const startLen = totalLen * ratio, endLen = Math.min(startLen + (null !== (_b = null === (_a = this.params) || void 0 === _a ? void 0 : _a.streamLength) && void 0 !== _b ? _b : 10), totalLen), nextPoints = [];
|
|
141
|
+
let lastLen = 0;
|
|
142
|
+
for (let i = 1; i < points.length; i++) {
|
|
143
|
+
const len = PointService.distancePP(points[i], points[i - 1]);
|
|
144
|
+
if (lastLen < startLen && lastLen + len > startLen && nextPoints.push(PointService.pointAtPP(points[i - 1], points[i], 1 - (lastLen + len - startLen) / len)),
|
|
145
|
+
lastLen < endLen && lastLen + len > endLen) {
|
|
146
|
+
nextPoints.push(PointService.pointAtPP(points[i - 1], points[i], 1 - (lastLen + len - endLen) / len));
|
|
147
|
+
break;
|
|
148
|
+
}
|
|
149
|
+
nextPoints.length && nextPoints.push(points[i]), lastLen += len;
|
|
150
|
+
}
|
|
151
|
+
if (nextPoints.length && !(nextPoints.length < 2)) {
|
|
152
|
+
customPath.clear(), customPath.moveTo(nextPoints[0].x, nextPoints[0].y);
|
|
153
|
+
for (let i = 1; i < nextPoints.length; i++) customPath.lineTo(nextPoints[i].x, nextPoints[i].y);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
//# sourceMappingURL=streamLight.js.map
|