@visactor/vrender-animate 0.22.4 → 0.22.12
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 +12 -5
- package/cjs/animate-extension.js +23 -12
- package/cjs/animate-extension.js.map +1 -1
- package/cjs/animate.d.ts +2 -5
- package/cjs/animate.js +23 -18
- package/cjs/animate.js.map +1 -1
- package/cjs/component/component-animate-extension.d.ts +1 -0
- package/cjs/component/component-animate-extension.js +1 -0
- package/cjs/component/component-animate-extension.js.map +1 -0
- package/cjs/component/component-animator.d.ts +22 -0
- package/cjs/component/component-animator.js +67 -0
- package/cjs/component/component-animator.js.map +1 -0
- package/cjs/component/index.d.ts +1 -0
- package/cjs/component/index.js +21 -0
- package/cjs/component/index.js.map +1 -0
- 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.d.ts +1 -1
- package/cjs/custom/clip-graphic.js +2 -2
- package/cjs/custom/clip-graphic.js.map +1 -1
- package/cjs/custom/clip.d.ts +2 -1
- package/cjs/custom/clip.js +9 -1
- package/cjs/custom/clip.js.map +1 -1
- package/cjs/custom/common.d.ts +1 -3
- package/cjs/custom/common.js +21 -17
- package/cjs/custom/common.js.map +1 -1
- package/cjs/custom/custom-animate.d.ts +7 -3
- package/cjs/custom/custom-animate.js +13 -2
- package/cjs/custom/custom-animate.js.map +1 -1
- package/cjs/custom/fade.d.ts +1 -1
- package/cjs/custom/fade.js +7 -2
- package/cjs/custom/fade.js.map +1 -1
- package/cjs/custom/fromTo.d.ts +10 -0
- package/cjs/custom/fromTo.js +42 -0
- package/cjs/custom/fromTo.js.map +1 -0
- package/cjs/custom/groupFade.d.ts +10 -0
- package/cjs/custom/groupFade.js +25 -0
- package/cjs/custom/groupFade.js.map +1 -0
- package/cjs/custom/growAngle.d.ts +10 -5
- package/cjs/custom/growAngle.js +38 -17
- package/cjs/custom/growAngle.js.map +1 -1
- package/cjs/custom/growCenter.d.ts +1 -2
- package/cjs/custom/growCenter.js +16 -10
- package/cjs/custom/growCenter.js.map +1 -1
- package/cjs/custom/growHeight.d.ts +1 -3
- package/cjs/custom/growHeight.js +19 -13
- package/cjs/custom/growHeight.js.map +1 -1
- package/cjs/custom/growPoints.d.ts +1 -2
- package/cjs/custom/growPoints.js +41 -36
- package/cjs/custom/growPoints.js.map +1 -1
- package/cjs/custom/growRadius.d.ts +4 -5
- package/cjs/custom/growRadius.js +22 -18
- package/cjs/custom/growRadius.js.map +1 -1
- package/cjs/custom/growWidth.d.ts +1 -3
- package/cjs/custom/growWidth.js +15 -9
- package/cjs/custom/growWidth.js.map +1 -1
- package/cjs/custom/input-text.d.ts +1 -2
- package/cjs/custom/input-text.js.map +1 -1
- package/cjs/custom/label-item-animate.d.ts +7 -0
- package/cjs/custom/label-item-animate.js +221 -0
- package/cjs/custom/label-item-animate.js.map +1 -0
- 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 +96 -0
- package/cjs/custom/move.js +133 -0
- package/cjs/custom/move.js.map +1 -0
- package/cjs/custom/number.d.ts +1 -2
- package/cjs/custom/number.js.map +1 -1
- package/cjs/custom/poptip-animate.d.ts +7 -0
- package/cjs/custom/poptip-animate.js +109 -0
- package/cjs/custom/poptip-animate.js.map +1 -0
- package/cjs/custom/register.d.ts +27 -0
- package/cjs/custom/register.js +418 -3
- package/cjs/custom/register.js.map +1 -1
- package/cjs/custom/richtext/input-richtext.d.ts +35 -0
- package/cjs/custom/richtext/input-richtext.js +80 -0
- package/cjs/custom/richtext/input-richtext.js.map +1 -0
- package/cjs/custom/richtext/output-richtext.d.ts +37 -0
- package/cjs/custom/richtext/output-richtext.js +94 -0
- package/cjs/custom/richtext/output-richtext.js.map +1 -0
- package/cjs/custom/richtext/slide-out-richtext.d.ts +38 -0
- package/cjs/custom/richtext/slide-out-richtext.js +146 -0
- package/cjs/custom/richtext/slide-out-richtext.js.map +1 -0
- package/cjs/custom/richtext/slide-richtext.d.ts +36 -0
- package/cjs/custom/richtext/slide-richtext.js +144 -0
- package/cjs/custom/richtext/slide-richtext.js.map +1 -0
- package/cjs/custom/rotate.d.ts +33 -0
- package/cjs/custom/rotate.js +79 -0
- package/cjs/custom/rotate.js.map +1 -0
- package/cjs/custom/scale.d.ts +6 -2
- package/cjs/custom/scale.js +32 -17
- package/cjs/custom/scale.js.map +1 -1
- package/cjs/custom/sphere.d.ts +2 -1
- package/cjs/custom/sphere.js +14 -5
- package/cjs/custom/sphere.js.map +1 -1
- package/cjs/custom/state.d.ts +1 -1
- package/cjs/custom/state.js +1 -1
- package/cjs/custom/state.js.map +1 -1
- package/cjs/custom/story.d.ts +196 -0
- package/cjs/custom/story.js +497 -0
- package/cjs/custom/story.js.map +1 -0
- 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.d.ts +2 -3
- package/cjs/custom/tag-points.js +20 -4
- package/cjs/custom/tag-points.js.map +1 -1
- package/cjs/custom/update.d.ts +2 -2
- package/cjs/custom/update.js +10 -2
- package/cjs/custom/update.js.map +1 -1
- package/cjs/executor/animate-executor.d.ts +7 -6
- package/cjs/executor/animate-executor.js +118 -62
- package/cjs/executor/animate-executor.js.map +1 -1
- package/cjs/executor/executor.d.ts +9 -3
- package/cjs/executor/executor.js.map +1 -1
- package/cjs/index.d.ts +8 -8
- package/cjs/index.js +50 -18
- package/cjs/index.js.map +1 -1
- package/cjs/interpolate/store.d.ts +6 -2
- package/cjs/interpolate/store.js +13 -2
- package/cjs/interpolate/store.js.map +1 -1
- package/cjs/register.js +1 -5
- package/cjs/register.js.map +1 -1
- package/cjs/state/animation-state.d.ts +20 -2
- package/cjs/state/animation-state.js +48 -4
- package/cjs/state/animation-state.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/state/graphic-extension.d.ts +7 -1
- package/cjs/state/graphic-extension.js +20 -0
- package/cjs/state/graphic-extension.js.map +1 -1
- package/cjs/step.d.ts +7 -4
- package/cjs/step.js +33 -15
- package/cjs/step.js.map +1 -1
- package/cjs/ticker/default-ticker.d.ts +12 -7
- package/cjs/ticker/default-ticker.js +38 -33
- 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 +14 -7
- 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 +3765 -527
- package/es/animate-extension.d.ts +12 -5
- package/es/animate-extension.js +24 -11
- package/es/animate-extension.js.map +1 -1
- package/es/animate.d.ts +2 -5
- package/es/animate.js +14 -11
- package/es/animate.js.map +1 -1
- package/es/component/component-animate-extension.d.ts +1 -0
- package/es/component/component-animate-extension.js +1 -0
- package/es/component/component-animate-extension.js.map +1 -0
- package/es/component/component-animator.d.ts +22 -0
- package/es/component/component-animator.js +59 -0
- package/es/component/component-animator.js.map +1 -0
- package/es/component/index.d.ts +1 -0
- package/es/component/index.js +2 -0
- package/es/component/index.js.map +1 -0
- 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.d.ts +1 -1
- package/es/custom/clip-graphic.js +2 -2
- package/es/custom/clip-graphic.js.map +1 -1
- package/es/custom/clip.d.ts +2 -1
- package/es/custom/clip.js +9 -1
- package/es/custom/clip.js.map +1 -1
- package/es/custom/common.d.ts +1 -3
- package/es/custom/common.js +21 -17
- package/es/custom/common.js.map +1 -1
- package/es/custom/custom-animate.d.ts +7 -3
- package/es/custom/custom-animate.js +10 -1
- package/es/custom/custom-animate.js.map +1 -1
- package/es/custom/fade.d.ts +1 -1
- package/es/custom/fade.js +7 -2
- package/es/custom/fade.js.map +1 -1
- package/es/custom/fromTo.d.ts +10 -0
- package/es/custom/fromTo.js +34 -0
- package/es/custom/fromTo.js.map +1 -0
- package/es/custom/groupFade.d.ts +10 -0
- package/es/custom/groupFade.js +15 -0
- package/es/custom/groupFade.js.map +1 -0
- package/es/custom/growAngle.d.ts +10 -5
- package/es/custom/growAngle.js +39 -15
- package/es/custom/growAngle.js.map +1 -1
- package/es/custom/growCenter.d.ts +1 -2
- package/es/custom/growCenter.js +16 -10
- package/es/custom/growCenter.js.map +1 -1
- package/es/custom/growHeight.d.ts +1 -3
- package/es/custom/growHeight.js +20 -14
- package/es/custom/growHeight.js.map +1 -1
- package/es/custom/growPoints.d.ts +1 -2
- package/es/custom/growPoints.js +40 -36
- package/es/custom/growPoints.js.map +1 -1
- package/es/custom/growRadius.d.ts +4 -5
- package/es/custom/growRadius.js +22 -16
- package/es/custom/growRadius.js.map +1 -1
- package/es/custom/growWidth.d.ts +1 -3
- package/es/custom/growWidth.js +16 -10
- package/es/custom/growWidth.js.map +1 -1
- package/es/custom/input-text.d.ts +1 -2
- package/es/custom/input-text.js.map +1 -1
- package/es/custom/label-item-animate.d.ts +7 -0
- package/es/custom/label-item-animate.js +215 -0
- package/es/custom/label-item-animate.js.map +1 -0
- 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 +96 -0
- package/es/custom/move.js +118 -0
- package/es/custom/move.js.map +1 -0
- package/es/custom/number.d.ts +1 -2
- package/es/custom/number.js.map +1 -1
- package/es/custom/poptip-animate.d.ts +7 -0
- package/es/custom/poptip-animate.js +103 -0
- package/es/custom/poptip-animate.js.map +1 -0
- package/es/custom/register.d.ts +27 -0
- package/es/custom/register.js +48 -1
- package/es/custom/register.js.map +1 -1
- package/es/custom/richtext/input-richtext.d.ts +35 -0
- package/es/custom/richtext/input-richtext.js +74 -0
- package/es/custom/richtext/input-richtext.js.map +1 -0
- package/es/custom/richtext/output-richtext.d.ts +37 -0
- package/es/custom/richtext/output-richtext.js +88 -0
- package/es/custom/richtext/output-richtext.js.map +1 -0
- package/es/custom/richtext/slide-out-richtext.d.ts +38 -0
- package/es/custom/richtext/slide-out-richtext.js +140 -0
- package/es/custom/richtext/slide-out-richtext.js.map +1 -0
- package/es/custom/richtext/slide-richtext.d.ts +36 -0
- package/es/custom/richtext/slide-richtext.js +138 -0
- package/es/custom/richtext/slide-richtext.js.map +1 -0
- package/es/custom/rotate.d.ts +33 -0
- package/es/custom/rotate.js +65 -0
- package/es/custom/rotate.js.map +1 -0
- package/es/custom/scale.d.ts +6 -2
- package/es/custom/scale.js +32 -17
- package/es/custom/scale.js.map +1 -1
- package/es/custom/sphere.d.ts +2 -1
- package/es/custom/sphere.js +14 -5
- package/es/custom/sphere.js.map +1 -1
- package/es/custom/state.d.ts +1 -1
- package/es/custom/state.js +1 -1
- package/es/custom/state.js.map +1 -1
- package/es/custom/story.d.ts +196 -0
- package/es/custom/story.js +468 -0
- package/es/custom/story.js.map +1 -0
- 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.d.ts +2 -3
- package/es/custom/tag-points.js +21 -5
- package/es/custom/tag-points.js.map +1 -1
- package/es/custom/update.d.ts +2 -2
- package/es/custom/update.js +10 -2
- package/es/custom/update.js.map +1 -1
- package/es/executor/animate-executor.d.ts +7 -6
- package/es/executor/animate-executor.js +116 -61
- package/es/executor/animate-executor.js.map +1 -1
- package/es/executor/executor.d.ts +9 -3
- package/es/executor/executor.js.map +1 -1
- package/es/index.d.ts +8 -8
- package/es/index.js +10 -12
- package/es/index.js.map +1 -1
- package/es/interpolate/store.d.ts +6 -2
- package/es/interpolate/store.js +13 -3
- package/es/interpolate/store.js.map +1 -1
- package/es/register.js +0 -8
- package/es/register.js.map +1 -1
- package/es/state/animation-state.d.ts +20 -2
- package/es/state/animation-state.js +48 -2
- package/es/state/animation-state.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/state/graphic-extension.d.ts +7 -1
- package/es/state/graphic-extension.js +20 -0
- package/es/state/graphic-extension.js.map +1 -1
- package/es/step.d.ts +7 -4
- package/es/step.js +34 -16
- package/es/step.js.map +1 -1
- package/es/ticker/default-ticker.d.ts +12 -7
- package/es/ticker/default-ticker.js +30 -27
- 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 +14 -7
- package/es/timeline.js +33 -18
- 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 +16 -16
- package/cjs/custom/group-fade.d.ts +0 -16
- package/cjs/custom/group-fade.js +0 -66
- package/cjs/custom/group-fade.js.map +0 -1
- package/cjs/custom/scale-in.d.ts +0 -13
- package/cjs/custom/scale-in.js +0 -57
- package/cjs/custom/scale-in.js.map +0 -1
- package/cjs/interpolate/executor.d.ts +0 -66
- package/cjs/interpolate/executor.js +0 -6
- package/cjs/interpolate/executor.js.map +0 -1
- package/cjs/intreface/animate.d.ts +0 -91
- package/cjs/intreface/animate.js +0 -10
- package/cjs/intreface/animate.js.map +0 -1
- package/cjs/intreface/easing.d.ts +0 -3
- package/cjs/intreface/easing.js +0 -6
- package/cjs/intreface/easing.js.map +0 -1
- package/cjs/intreface/state.d.ts +0 -35
- package/cjs/intreface/state.js +0 -6
- package/cjs/intreface/state.js.map +0 -1
- package/cjs/intreface/ticker.d.ts +0 -37
- package/cjs/intreface/ticker.js +0 -10
- package/cjs/intreface/ticker.js.map +0 -1
- package/cjs/intreface/timeline.d.ts +0 -17
- package/cjs/intreface/timeline.js +0 -6
- package/cjs/intreface/timeline.js.map +0 -1
- package/cjs/intreface/type.d.ts +0 -13
- package/cjs/intreface/type.js +0 -15
- package/cjs/intreface/type.js.map +0 -1
- package/cjs/state/animation-state-machine.d.ts +0 -22
- package/cjs/state/animation-state-machine.js +0 -53
- package/cjs/state/animation-state-machine.js.map +0 -1
- package/cjs/state/animation-state-queue.d.ts +0 -24
- package/cjs/state/animation-state-queue.js +0 -66
- package/cjs/state/animation-state-queue.js.map +0 -1
- package/cjs/state/animation-state-registry.d.ts +0 -14
- package/cjs/state/animation-state-registry.js +0 -53
- package/cjs/state/animation-state-registry.js.map +0 -1
- package/es/custom/group-fade.d.ts +0 -16
- package/es/custom/group-fade.js +0 -56
- package/es/custom/group-fade.js.map +0 -1
- package/es/custom/scale-in.d.ts +0 -13
- package/es/custom/scale-in.js +0 -49
- package/es/custom/scale-in.js.map +0 -1
- package/es/interpolate/executor.d.ts +0 -66
- package/es/interpolate/executor.js +0 -2
- package/es/interpolate/executor.js.map +0 -1
- package/es/intreface/animate.d.ts +0 -91
- package/es/intreface/animate.js +0 -6
- package/es/intreface/animate.js.map +0 -1
- package/es/intreface/easing.d.ts +0 -3
- package/es/intreface/easing.js +0 -2
- package/es/intreface/easing.js.map +0 -1
- package/es/intreface/state.d.ts +0 -35
- package/es/intreface/state.js +0 -2
- package/es/intreface/state.js.map +0 -1
- package/es/intreface/ticker.d.ts +0 -37
- package/es/intreface/ticker.js +0 -6
- package/es/intreface/ticker.js.map +0 -1
- package/es/intreface/timeline.d.ts +0 -17
- package/es/intreface/timeline.js +0 -2
- package/es/intreface/timeline.js.map +0 -1
- package/es/intreface/type.d.ts +0 -13
- package/es/intreface/type.js +0 -14
- package/es/intreface/type.js.map +0 -1
- package/es/state/animation-state-machine.d.ts +0 -22
- package/es/state/animation-state-machine.js +0 -47
- package/es/state/animation-state-machine.js.map +0 -1
- package/es/state/animation-state-queue.d.ts +0 -24
- package/es/state/animation-state-queue.js +0 -58
- package/es/state/animation-state-queue.js.map +0 -1
- package/es/state/animation-state-registry.d.ts +0 -14
- package/es/state/animation-state-registry.js +0 -45
- package/es/state/animation-state-registry.js.map +0 -1
package/cjs/custom/register.d.ts
CHANGED
|
@@ -1 +1,28 @@
|
|
|
1
|
+
import { ClipIn, ClipOut } from './clip';
|
|
2
|
+
import { FadeIn, FadeOut } from './fade';
|
|
3
|
+
import { GrowAngleIn, GrowAngleOut } from './growAngle';
|
|
4
|
+
import { GrowCenterIn, GrowCenterOut } from './growCenter';
|
|
5
|
+
import { GrowHeightIn, GrowHeightOut } from './growHeight';
|
|
6
|
+
import { GrowPointsIn, GrowPointsOut, GrowPointsXIn, GrowPointsXOut, GrowPointsYIn, GrowPointsYOut } from './growPoints';
|
|
7
|
+
import { GrowRadiusIn, GrowRadiusOut } from './growRadius';
|
|
8
|
+
import { GrowWidthIn, GrowWidthOut } from './growWidth';
|
|
9
|
+
import { InputText } from './input-text';
|
|
10
|
+
import { LabelItemAppear, LabelItemDisappear } from './label-item-animate';
|
|
11
|
+
import { IncreaseCount } from './number';
|
|
12
|
+
import { PoptipAppear, PoptipDisappear } from './poptip-animate';
|
|
13
|
+
import { InputRichText } from './richtext/input-richtext';
|
|
14
|
+
import { OutputRichText } from './richtext/output-richtext';
|
|
15
|
+
import { SlideRichText } from './richtext/slide-richtext';
|
|
16
|
+
import { SlideOutRichText } from './richtext/slide-out-richtext';
|
|
17
|
+
import { ScaleIn, ScaleOut } from './scale';
|
|
18
|
+
import { State } from './state';
|
|
19
|
+
import { GrowIn, GrowOut, MoveRotateIn, MoveRotateOut, MoveScaleIn, MoveScaleOut, PulseAnimate, SlideIn, SlideOut, SpinIn, SpinOut, StrokeIn, StrokeOut } from './story';
|
|
20
|
+
import { Update } from './update';
|
|
21
|
+
import { MoveIn, MoveOut } from './move';
|
|
22
|
+
import { RotateIn, RotateOut } from './rotate';
|
|
23
|
+
import { MotionPath } from './motionPath';
|
|
24
|
+
import { FromTo } from './fromTo';
|
|
25
|
+
import { GroupFadeIn, GroupFadeOut } from './groupFade';
|
|
26
|
+
import { StreamLight } from './streamLight';
|
|
1
27
|
export declare const registerCustomAnimate: () => void;
|
|
28
|
+
export { ClipIn, ClipOut, FadeIn, FadeOut, GrowAngleIn, GrowAngleOut, GrowCenterIn, GrowCenterOut, GrowHeightIn, GrowHeightOut, GrowPointsIn, GrowPointsOut, GrowPointsXIn, GrowPointsXOut, GrowPointsYIn, GrowPointsYOut, GrowRadiusIn, GrowRadiusOut, GrowWidthIn, GrowWidthOut, IncreaseCount, PoptipAppear, PoptipDisappear, ScaleIn, ScaleOut, MoveIn, MoveOut, RotateIn, RotateOut, State, Update, MotionPath, LabelItemAppear, LabelItemDisappear, InputText, InputRichText, OutputRichText, SlideRichText, SlideOutRichText, SlideIn, GrowIn, SpinIn, MoveScaleIn, MoveRotateIn, SlideOut, GrowOut, SpinOut, MoveScaleOut, MoveRotateOut, StrokeIn, StrokeOut, PulseAnimate, GroupFadeIn, GroupFadeOut, FromTo, StreamLight };
|
package/cjs/custom/register.js
CHANGED
|
@@ -2,9 +2,396 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: !0
|
|
5
|
-
}), exports.registerCustomAnimate = void 0
|
|
5
|
+
}), exports.MoveRotateOut = exports.MoveScaleOut = exports.SpinOut = exports.GrowOut = exports.SlideOut = exports.MoveRotateIn = exports.MoveScaleIn = exports.SpinIn = exports.GrowIn = exports.SlideIn = exports.SlideOutRichText = exports.SlideRichText = exports.OutputRichText = exports.InputRichText = exports.InputText = exports.LabelItemDisappear = exports.LabelItemAppear = exports.MotionPath = exports.Update = exports.State = exports.RotateOut = exports.RotateIn = exports.MoveOut = exports.MoveIn = exports.ScaleOut = exports.ScaleIn = exports.PoptipDisappear = exports.PoptipAppear = exports.IncreaseCount = exports.GrowWidthOut = exports.GrowWidthIn = exports.GrowRadiusOut = exports.GrowRadiusIn = exports.GrowPointsYOut = exports.GrowPointsYIn = exports.GrowPointsXOut = exports.GrowPointsXIn = exports.GrowPointsOut = exports.GrowPointsIn = exports.GrowHeightOut = exports.GrowHeightIn = exports.GrowCenterOut = exports.GrowCenterIn = exports.GrowAngleOut = exports.GrowAngleIn = exports.FadeOut = exports.FadeIn = exports.ClipOut = exports.ClipIn = exports.registerCustomAnimate = void 0,
|
|
6
|
+
exports.StreamLight = exports.FromTo = exports.GroupFadeOut = exports.GroupFadeIn = exports.PulseAnimate = exports.StrokeOut = exports.StrokeIn = void 0;
|
|
6
7
|
|
|
7
|
-
const animate_executor_1 = require("../executor/animate-executor"), clip_1 = require("./clip")
|
|
8
|
+
const animate_executor_1 = require("../executor/animate-executor"), clip_1 = require("./clip");
|
|
9
|
+
|
|
10
|
+
Object.defineProperty(exports, "ClipIn", {
|
|
11
|
+
enumerable: !0,
|
|
12
|
+
get: function() {
|
|
13
|
+
return clip_1.ClipIn;
|
|
14
|
+
}
|
|
15
|
+
}), Object.defineProperty(exports, "ClipOut", {
|
|
16
|
+
enumerable: !0,
|
|
17
|
+
get: function() {
|
|
18
|
+
return clip_1.ClipOut;
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
const fade_1 = require("./fade");
|
|
23
|
+
|
|
24
|
+
Object.defineProperty(exports, "FadeIn", {
|
|
25
|
+
enumerable: !0,
|
|
26
|
+
get: function() {
|
|
27
|
+
return fade_1.FadeIn;
|
|
28
|
+
}
|
|
29
|
+
}), Object.defineProperty(exports, "FadeOut", {
|
|
30
|
+
enumerable: !0,
|
|
31
|
+
get: function() {
|
|
32
|
+
return fade_1.FadeOut;
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
const growAngle_1 = require("./growAngle");
|
|
37
|
+
|
|
38
|
+
Object.defineProperty(exports, "GrowAngleIn", {
|
|
39
|
+
enumerable: !0,
|
|
40
|
+
get: function() {
|
|
41
|
+
return growAngle_1.GrowAngleIn;
|
|
42
|
+
}
|
|
43
|
+
}), Object.defineProperty(exports, "GrowAngleOut", {
|
|
44
|
+
enumerable: !0,
|
|
45
|
+
get: function() {
|
|
46
|
+
return growAngle_1.GrowAngleOut;
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
const growCenter_1 = require("./growCenter");
|
|
51
|
+
|
|
52
|
+
Object.defineProperty(exports, "GrowCenterIn", {
|
|
53
|
+
enumerable: !0,
|
|
54
|
+
get: function() {
|
|
55
|
+
return growCenter_1.GrowCenterIn;
|
|
56
|
+
}
|
|
57
|
+
}), Object.defineProperty(exports, "GrowCenterOut", {
|
|
58
|
+
enumerable: !0,
|
|
59
|
+
get: function() {
|
|
60
|
+
return growCenter_1.GrowCenterOut;
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
const growHeight_1 = require("./growHeight");
|
|
65
|
+
|
|
66
|
+
Object.defineProperty(exports, "GrowHeightIn", {
|
|
67
|
+
enumerable: !0,
|
|
68
|
+
get: function() {
|
|
69
|
+
return growHeight_1.GrowHeightIn;
|
|
70
|
+
}
|
|
71
|
+
}), Object.defineProperty(exports, "GrowHeightOut", {
|
|
72
|
+
enumerable: !0,
|
|
73
|
+
get: function() {
|
|
74
|
+
return growHeight_1.GrowHeightOut;
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
const growPoints_1 = require("./growPoints");
|
|
79
|
+
|
|
80
|
+
Object.defineProperty(exports, "GrowPointsIn", {
|
|
81
|
+
enumerable: !0,
|
|
82
|
+
get: function() {
|
|
83
|
+
return growPoints_1.GrowPointsIn;
|
|
84
|
+
}
|
|
85
|
+
}), Object.defineProperty(exports, "GrowPointsOut", {
|
|
86
|
+
enumerable: !0,
|
|
87
|
+
get: function() {
|
|
88
|
+
return growPoints_1.GrowPointsOut;
|
|
89
|
+
}
|
|
90
|
+
}), Object.defineProperty(exports, "GrowPointsXIn", {
|
|
91
|
+
enumerable: !0,
|
|
92
|
+
get: function() {
|
|
93
|
+
return growPoints_1.GrowPointsXIn;
|
|
94
|
+
}
|
|
95
|
+
}), Object.defineProperty(exports, "GrowPointsXOut", {
|
|
96
|
+
enumerable: !0,
|
|
97
|
+
get: function() {
|
|
98
|
+
return growPoints_1.GrowPointsXOut;
|
|
99
|
+
}
|
|
100
|
+
}), Object.defineProperty(exports, "GrowPointsYIn", {
|
|
101
|
+
enumerable: !0,
|
|
102
|
+
get: function() {
|
|
103
|
+
return growPoints_1.GrowPointsYIn;
|
|
104
|
+
}
|
|
105
|
+
}), Object.defineProperty(exports, "GrowPointsYOut", {
|
|
106
|
+
enumerable: !0,
|
|
107
|
+
get: function() {
|
|
108
|
+
return growPoints_1.GrowPointsYOut;
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
const growRadius_1 = require("./growRadius");
|
|
113
|
+
|
|
114
|
+
Object.defineProperty(exports, "GrowRadiusIn", {
|
|
115
|
+
enumerable: !0,
|
|
116
|
+
get: function() {
|
|
117
|
+
return growRadius_1.GrowRadiusIn;
|
|
118
|
+
}
|
|
119
|
+
}), Object.defineProperty(exports, "GrowRadiusOut", {
|
|
120
|
+
enumerable: !0,
|
|
121
|
+
get: function() {
|
|
122
|
+
return growRadius_1.GrowRadiusOut;
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
const growWidth_1 = require("./growWidth");
|
|
127
|
+
|
|
128
|
+
Object.defineProperty(exports, "GrowWidthIn", {
|
|
129
|
+
enumerable: !0,
|
|
130
|
+
get: function() {
|
|
131
|
+
return growWidth_1.GrowWidthIn;
|
|
132
|
+
}
|
|
133
|
+
}), Object.defineProperty(exports, "GrowWidthOut", {
|
|
134
|
+
enumerable: !0,
|
|
135
|
+
get: function() {
|
|
136
|
+
return growWidth_1.GrowWidthOut;
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
const input_text_1 = require("./input-text");
|
|
141
|
+
|
|
142
|
+
Object.defineProperty(exports, "InputText", {
|
|
143
|
+
enumerable: !0,
|
|
144
|
+
get: function() {
|
|
145
|
+
return input_text_1.InputText;
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
const label_item_animate_1 = require("./label-item-animate");
|
|
150
|
+
|
|
151
|
+
Object.defineProperty(exports, "LabelItemAppear", {
|
|
152
|
+
enumerable: !0,
|
|
153
|
+
get: function() {
|
|
154
|
+
return label_item_animate_1.LabelItemAppear;
|
|
155
|
+
}
|
|
156
|
+
}), Object.defineProperty(exports, "LabelItemDisappear", {
|
|
157
|
+
enumerable: !0,
|
|
158
|
+
get: function() {
|
|
159
|
+
return label_item_animate_1.LabelItemDisappear;
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
const number_1 = require("./number");
|
|
164
|
+
|
|
165
|
+
Object.defineProperty(exports, "IncreaseCount", {
|
|
166
|
+
enumerable: !0,
|
|
167
|
+
get: function() {
|
|
168
|
+
return number_1.IncreaseCount;
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
const poptip_animate_1 = require("./poptip-animate");
|
|
173
|
+
|
|
174
|
+
Object.defineProperty(exports, "PoptipAppear", {
|
|
175
|
+
enumerable: !0,
|
|
176
|
+
get: function() {
|
|
177
|
+
return poptip_animate_1.PoptipAppear;
|
|
178
|
+
}
|
|
179
|
+
}), Object.defineProperty(exports, "PoptipDisappear", {
|
|
180
|
+
enumerable: !0,
|
|
181
|
+
get: function() {
|
|
182
|
+
return poptip_animate_1.PoptipDisappear;
|
|
183
|
+
}
|
|
184
|
+
});
|
|
185
|
+
|
|
186
|
+
const input_richtext_1 = require("./richtext/input-richtext");
|
|
187
|
+
|
|
188
|
+
Object.defineProperty(exports, "InputRichText", {
|
|
189
|
+
enumerable: !0,
|
|
190
|
+
get: function() {
|
|
191
|
+
return input_richtext_1.InputRichText;
|
|
192
|
+
}
|
|
193
|
+
});
|
|
194
|
+
|
|
195
|
+
const output_richtext_1 = require("./richtext/output-richtext");
|
|
196
|
+
|
|
197
|
+
Object.defineProperty(exports, "OutputRichText", {
|
|
198
|
+
enumerable: !0,
|
|
199
|
+
get: function() {
|
|
200
|
+
return output_richtext_1.OutputRichText;
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
|
|
204
|
+
const slide_richtext_1 = require("./richtext/slide-richtext");
|
|
205
|
+
|
|
206
|
+
Object.defineProperty(exports, "SlideRichText", {
|
|
207
|
+
enumerable: !0,
|
|
208
|
+
get: function() {
|
|
209
|
+
return slide_richtext_1.SlideRichText;
|
|
210
|
+
}
|
|
211
|
+
});
|
|
212
|
+
|
|
213
|
+
const slide_out_richtext_1 = require("./richtext/slide-out-richtext");
|
|
214
|
+
|
|
215
|
+
Object.defineProperty(exports, "SlideOutRichText", {
|
|
216
|
+
enumerable: !0,
|
|
217
|
+
get: function() {
|
|
218
|
+
return slide_out_richtext_1.SlideOutRichText;
|
|
219
|
+
}
|
|
220
|
+
});
|
|
221
|
+
|
|
222
|
+
const scale_1 = require("./scale");
|
|
223
|
+
|
|
224
|
+
Object.defineProperty(exports, "ScaleIn", {
|
|
225
|
+
enumerable: !0,
|
|
226
|
+
get: function() {
|
|
227
|
+
return scale_1.ScaleIn;
|
|
228
|
+
}
|
|
229
|
+
}), Object.defineProperty(exports, "ScaleOut", {
|
|
230
|
+
enumerable: !0,
|
|
231
|
+
get: function() {
|
|
232
|
+
return scale_1.ScaleOut;
|
|
233
|
+
}
|
|
234
|
+
});
|
|
235
|
+
|
|
236
|
+
const state_1 = require("./state");
|
|
237
|
+
|
|
238
|
+
Object.defineProperty(exports, "State", {
|
|
239
|
+
enumerable: !0,
|
|
240
|
+
get: function() {
|
|
241
|
+
return state_1.State;
|
|
242
|
+
}
|
|
243
|
+
});
|
|
244
|
+
|
|
245
|
+
const story_1 = require("./story");
|
|
246
|
+
|
|
247
|
+
Object.defineProperty(exports, "GrowIn", {
|
|
248
|
+
enumerable: !0,
|
|
249
|
+
get: function() {
|
|
250
|
+
return story_1.GrowIn;
|
|
251
|
+
}
|
|
252
|
+
}), Object.defineProperty(exports, "GrowOut", {
|
|
253
|
+
enumerable: !0,
|
|
254
|
+
get: function() {
|
|
255
|
+
return story_1.GrowOut;
|
|
256
|
+
}
|
|
257
|
+
}), Object.defineProperty(exports, "MoveRotateIn", {
|
|
258
|
+
enumerable: !0,
|
|
259
|
+
get: function() {
|
|
260
|
+
return story_1.MoveRotateIn;
|
|
261
|
+
}
|
|
262
|
+
}), Object.defineProperty(exports, "MoveRotateOut", {
|
|
263
|
+
enumerable: !0,
|
|
264
|
+
get: function() {
|
|
265
|
+
return story_1.MoveRotateOut;
|
|
266
|
+
}
|
|
267
|
+
}), Object.defineProperty(exports, "MoveScaleIn", {
|
|
268
|
+
enumerable: !0,
|
|
269
|
+
get: function() {
|
|
270
|
+
return story_1.MoveScaleIn;
|
|
271
|
+
}
|
|
272
|
+
}), Object.defineProperty(exports, "MoveScaleOut", {
|
|
273
|
+
enumerable: !0,
|
|
274
|
+
get: function() {
|
|
275
|
+
return story_1.MoveScaleOut;
|
|
276
|
+
}
|
|
277
|
+
}), Object.defineProperty(exports, "PulseAnimate", {
|
|
278
|
+
enumerable: !0,
|
|
279
|
+
get: function() {
|
|
280
|
+
return story_1.PulseAnimate;
|
|
281
|
+
}
|
|
282
|
+
}), Object.defineProperty(exports, "SlideIn", {
|
|
283
|
+
enumerable: !0,
|
|
284
|
+
get: function() {
|
|
285
|
+
return story_1.SlideIn;
|
|
286
|
+
}
|
|
287
|
+
}), Object.defineProperty(exports, "SlideOut", {
|
|
288
|
+
enumerable: !0,
|
|
289
|
+
get: function() {
|
|
290
|
+
return story_1.SlideOut;
|
|
291
|
+
}
|
|
292
|
+
}), Object.defineProperty(exports, "SpinIn", {
|
|
293
|
+
enumerable: !0,
|
|
294
|
+
get: function() {
|
|
295
|
+
return story_1.SpinIn;
|
|
296
|
+
}
|
|
297
|
+
}), Object.defineProperty(exports, "SpinOut", {
|
|
298
|
+
enumerable: !0,
|
|
299
|
+
get: function() {
|
|
300
|
+
return story_1.SpinOut;
|
|
301
|
+
}
|
|
302
|
+
}), Object.defineProperty(exports, "StrokeIn", {
|
|
303
|
+
enumerable: !0,
|
|
304
|
+
get: function() {
|
|
305
|
+
return story_1.StrokeIn;
|
|
306
|
+
}
|
|
307
|
+
}), Object.defineProperty(exports, "StrokeOut", {
|
|
308
|
+
enumerable: !0,
|
|
309
|
+
get: function() {
|
|
310
|
+
return story_1.StrokeOut;
|
|
311
|
+
}
|
|
312
|
+
});
|
|
313
|
+
|
|
314
|
+
const update_1 = require("./update");
|
|
315
|
+
|
|
316
|
+
Object.defineProperty(exports, "Update", {
|
|
317
|
+
enumerable: !0,
|
|
318
|
+
get: function() {
|
|
319
|
+
return update_1.Update;
|
|
320
|
+
}
|
|
321
|
+
});
|
|
322
|
+
|
|
323
|
+
const move_1 = require("./move");
|
|
324
|
+
|
|
325
|
+
Object.defineProperty(exports, "MoveIn", {
|
|
326
|
+
enumerable: !0,
|
|
327
|
+
get: function() {
|
|
328
|
+
return move_1.MoveIn;
|
|
329
|
+
}
|
|
330
|
+
}), Object.defineProperty(exports, "MoveOut", {
|
|
331
|
+
enumerable: !0,
|
|
332
|
+
get: function() {
|
|
333
|
+
return move_1.MoveOut;
|
|
334
|
+
}
|
|
335
|
+
});
|
|
336
|
+
|
|
337
|
+
const rotate_1 = require("./rotate");
|
|
338
|
+
|
|
339
|
+
Object.defineProperty(exports, "RotateIn", {
|
|
340
|
+
enumerable: !0,
|
|
341
|
+
get: function() {
|
|
342
|
+
return rotate_1.RotateIn;
|
|
343
|
+
}
|
|
344
|
+
}), Object.defineProperty(exports, "RotateOut", {
|
|
345
|
+
enumerable: !0,
|
|
346
|
+
get: function() {
|
|
347
|
+
return rotate_1.RotateOut;
|
|
348
|
+
}
|
|
349
|
+
});
|
|
350
|
+
|
|
351
|
+
const motionPath_1 = require("./motionPath");
|
|
352
|
+
|
|
353
|
+
Object.defineProperty(exports, "MotionPath", {
|
|
354
|
+
enumerable: !0,
|
|
355
|
+
get: function() {
|
|
356
|
+
return motionPath_1.MotionPath;
|
|
357
|
+
}
|
|
358
|
+
});
|
|
359
|
+
|
|
360
|
+
const fromTo_1 = require("./fromTo");
|
|
361
|
+
|
|
362
|
+
Object.defineProperty(exports, "FromTo", {
|
|
363
|
+
enumerable: !0,
|
|
364
|
+
get: function() {
|
|
365
|
+
return fromTo_1.FromTo;
|
|
366
|
+
}
|
|
367
|
+
});
|
|
368
|
+
|
|
369
|
+
const groupFade_1 = require("./groupFade");
|
|
370
|
+
|
|
371
|
+
Object.defineProperty(exports, "GroupFadeIn", {
|
|
372
|
+
enumerable: !0,
|
|
373
|
+
get: function() {
|
|
374
|
+
return groupFade_1.GroupFadeIn;
|
|
375
|
+
}
|
|
376
|
+
}), Object.defineProperty(exports, "GroupFadeOut", {
|
|
377
|
+
enumerable: !0,
|
|
378
|
+
get: function() {
|
|
379
|
+
return groupFade_1.GroupFadeOut;
|
|
380
|
+
}
|
|
381
|
+
});
|
|
382
|
+
|
|
383
|
+
const streamLight_1 = require("./streamLight");
|
|
384
|
+
|
|
385
|
+
Object.defineProperty(exports, "StreamLight", {
|
|
386
|
+
enumerable: !0,
|
|
387
|
+
get: function() {
|
|
388
|
+
return streamLight_1.StreamLight;
|
|
389
|
+
}
|
|
390
|
+
});
|
|
391
|
+
|
|
392
|
+
const registerCustomAnimate = () => {
|
|
393
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("increaseCount", number_1.IncreaseCount),
|
|
394
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("fromTo", fromTo_1.FromTo),
|
|
8
395
|
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("scaleIn", scale_1.ScaleIn),
|
|
9
396
|
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("scaleOut", scale_1.ScaleOut),
|
|
10
397
|
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("growHeightIn", growHeight_1.GrowHeightIn),
|
|
@@ -27,8 +414,36 @@ const animate_executor_1 = require("../executor/animate-executor"), clip_1 = req
|
|
|
27
414
|
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("growAngleOut", growAngle_1.GrowAngleOut),
|
|
28
415
|
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("growRadiusIn", growRadius_1.GrowRadiusIn),
|
|
29
416
|
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("growRadiusOut", growRadius_1.GrowRadiusOut),
|
|
417
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("moveIn", move_1.MoveIn),
|
|
418
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("moveOut", move_1.MoveOut),
|
|
419
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("rotateIn", rotate_1.RotateIn),
|
|
420
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("rotateOut", rotate_1.RotateOut),
|
|
30
421
|
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("update", update_1.Update),
|
|
31
|
-
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("state", state_1.State)
|
|
422
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("state", state_1.State),
|
|
423
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("labelItemAppear", label_item_animate_1.LabelItemAppear),
|
|
424
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("labelItemDisappear", label_item_animate_1.LabelItemDisappear),
|
|
425
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("poptipAppear", poptip_animate_1.PoptipAppear),
|
|
426
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("poptipDisappear", poptip_animate_1.PoptipDisappear),
|
|
427
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("inputText", input_text_1.InputText),
|
|
428
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("inputRichText", input_richtext_1.InputRichText),
|
|
429
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("outputRichText", output_richtext_1.OutputRichText),
|
|
430
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("slideRichText", slide_richtext_1.SlideRichText),
|
|
431
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("slideOutRichText", slide_out_richtext_1.SlideOutRichText),
|
|
432
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("slideIn", story_1.SlideIn),
|
|
433
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("growIn", story_1.GrowIn),
|
|
434
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("spinIn", story_1.SpinIn),
|
|
435
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("moveScaleIn", story_1.MoveScaleIn),
|
|
436
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("moveRotateIn", story_1.MoveRotateIn),
|
|
437
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("strokeIn", story_1.StrokeIn),
|
|
438
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("slideOut", story_1.SlideOut),
|
|
439
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("growOut", story_1.GrowOut),
|
|
440
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("spinOut", story_1.SpinOut),
|
|
441
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("moveScaleOut", story_1.MoveScaleOut),
|
|
442
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("moveRotateOut", story_1.MoveRotateOut),
|
|
443
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("strokeOut", story_1.StrokeOut),
|
|
444
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("pulse", story_1.PulseAnimate),
|
|
445
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("MotionPath", motionPath_1.MotionPath),
|
|
446
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("streamLight", streamLight_1.StreamLight);
|
|
32
447
|
};
|
|
33
448
|
|
|
34
449
|
exports.registerCustomAnimate = registerCustomAnimate;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/custom/register.ts"],"names":[],"mappings":";;;AAAA,mEAA+D;AAC/D,iCAAyC;AACzC,iCAAyC;AACzC,2CAAwD;AACxD,6CAA2D;AAC3D,6CAA2D;AAC3D,6CAOsB;AACtB,6CAA2D;AAC3D,2CAAwD;AACxD,mCAA4C;AAC5C,mCAAgC;AAChC,qCAAkC;AAE3B,MAAM,qBAAqB,GAAG,GAAG,EAAE;IACxC,kCAAe,CAAC,sBAAsB,CAAC,SAAS,EAAE,eAAO,CAAC,CAAC;IAC3D,kCAAe,CAAC,sBAAsB,CAAC,UAAU,EAAE,gBAAQ,CAAC,CAAC;IAC7D,kCAAe,CAAC,sBAAsB,CAAC,cAAc,EAAE,yBAAY,CAAC,CAAC;IACrE,kCAAe,CAAC,sBAAsB,CAAC,eAAe,EAAE,0BAAa,CAAC,CAAC;IACvE,kCAAe,CAAC,sBAAsB,CAAC,aAAa,EAAE,uBAAW,CAAC,CAAC;IACnE,kCAAe,CAAC,sBAAsB,CAAC,cAAc,EAAE,wBAAY,CAAC,CAAC;IACrE,kCAAe,CAAC,sBAAsB,CAAC,cAAc,EAAE,yBAAY,CAAC,CAAC;IACrE,kCAAe,CAAC,sBAAsB,CAAC,eAAe,EAAE,0BAAa,CAAC,CAAC;IACvE,kCAAe,CAAC,sBAAsB,CAAC,QAAQ,EAAE,aAAM,CAAC,CAAC;IACzD,kCAAe,CAAC,sBAAsB,CAAC,SAAS,EAAE,cAAO,CAAC,CAAC;IAC3D,kCAAe,CAAC,sBAAsB,CAAC,QAAQ,EAAE,aAAM,CAAC,CAAC;IACzD,kCAAe,CAAC,sBAAsB,CAAC,SAAS,EAAE,cAAO,CAAC,CAAC;IAC3D,kCAAe,CAAC,sBAAsB,CAAC,cAAc,EAAE,yBAAY,CAAC,CAAC;IACrE,kCAAe,CAAC,sBAAsB,CAAC,eAAe,EAAE,0BAAa,CAAC,CAAC;IACvE,kCAAe,CAAC,sBAAsB,CAAC,eAAe,EAAE,0BAAa,CAAC,CAAC;IACvE,kCAAe,CAAC,sBAAsB,CAAC,gBAAgB,EAAE,2BAAc,CAAC,CAAC;IACzE,kCAAe,CAAC,sBAAsB,CAAC,eAAe,EAAE,0BAAa,CAAC,CAAC;IACvE,kCAAe,CAAC,sBAAsB,CAAC,gBAAgB,EAAE,2BAAc,CAAC,CAAC;IACzE,kCAAe,CAAC,sBAAsB,CAAC,aAAa,EAAE,uBAAW,CAAC,CAAC;IACnE,kCAAe,CAAC,sBAAsB,CAAC,cAAc,EAAE,wBAAY,CAAC,CAAC;IACrE,kCAAe,CAAC,sBAAsB,CAAC,cAAc,EAAE,yBAAY,CAAC,CAAC;IACrE,kCAAe,CAAC,sBAAsB,CAAC,eAAe,EAAE,0BAAa,CAAC,CAAC;IAEvE,kCAAe,CAAC,sBAAsB,CAAC,QAAQ,EAAE,eAAM,CAAC,CAAC;IACzD,kCAAe,CAAC,sBAAsB,CAAC,OAAO,EAAE,aAAK,CAAC,CAAC;AACzD,CAAC,CAAC;AA1BW,QAAA,qBAAqB,yBA0BhC","file":"register.js","sourcesContent":["import { AnimateExecutor } from '../executor/animate-executor';\nimport { ClipIn, ClipOut } from './clip';\nimport { FadeIn, FadeOut } from './fade';\nimport { GrowAngleIn, GrowAngleOut } from './growAngle';\nimport { GrowCenterIn, GrowCenterOut } from './growCenter';\nimport { GrowHeightIn, GrowHeightOut } from './growHeight';\nimport {\n GrowPointsIn,\n GrowPointsOut,\n GrowPointsXIn,\n GrowPointsXOut,\n GrowPointsYIn,\n GrowPointsYOut\n} from './growPoints';\nimport { GrowRadiusIn, GrowRadiusOut } from './growRadius';\nimport { GrowWidthIn, GrowWidthOut } from './growWidth';\nimport { ScaleIn, ScaleOut } from './scale';\nimport { State } from './state';\nimport { Update } from './update';\n\nexport const registerCustomAnimate = () => {\n AnimateExecutor.registerBuiltInAnimate('scaleIn', ScaleIn);\n AnimateExecutor.registerBuiltInAnimate('scaleOut', ScaleOut);\n AnimateExecutor.registerBuiltInAnimate('growHeightIn', GrowHeightIn);\n AnimateExecutor.registerBuiltInAnimate('growHeightOut', GrowHeightOut);\n AnimateExecutor.registerBuiltInAnimate('growWidthIn', GrowWidthIn);\n AnimateExecutor.registerBuiltInAnimate('growWidthOut', GrowWidthOut);\n AnimateExecutor.registerBuiltInAnimate('growCenterIn', GrowCenterIn);\n AnimateExecutor.registerBuiltInAnimate('growCenterOut', GrowCenterOut);\n AnimateExecutor.registerBuiltInAnimate('clipIn', ClipIn);\n AnimateExecutor.registerBuiltInAnimate('clipOut', ClipOut);\n AnimateExecutor.registerBuiltInAnimate('fadeIn', FadeIn);\n AnimateExecutor.registerBuiltInAnimate('fadeOut', FadeOut);\n AnimateExecutor.registerBuiltInAnimate('growPointsIn', GrowPointsIn);\n AnimateExecutor.registerBuiltInAnimate('growPointsOut', GrowPointsOut);\n AnimateExecutor.registerBuiltInAnimate('growPointsXIn', GrowPointsXIn);\n AnimateExecutor.registerBuiltInAnimate('growPointsXOut', GrowPointsXOut);\n AnimateExecutor.registerBuiltInAnimate('growPointsYIn', GrowPointsYIn);\n AnimateExecutor.registerBuiltInAnimate('growPointsYOut', GrowPointsYOut);\n AnimateExecutor.registerBuiltInAnimate('growAngleIn', GrowAngleIn);\n AnimateExecutor.registerBuiltInAnimate('growAngleOut', GrowAngleOut);\n AnimateExecutor.registerBuiltInAnimate('growRadiusIn', GrowRadiusIn);\n AnimateExecutor.registerBuiltInAnimate('growRadiusOut', GrowRadiusOut);\n // state和update共用一个自定义动画类\n AnimateExecutor.registerBuiltInAnimate('update', Update);\n AnimateExecutor.registerBuiltInAnimate('state', State);\n};\n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AsB,CAAC,QAAQ,EAAE,cAAM,CAAC,CAAC;IACzD,kCAAe,CAAC,sBAAsB,CAAC,aAAa,EAAE,mBAAW,CAAC,CAAC;IACnE,kCAAe,CAAC,sBAAsB,CAAC,cAAc,EAAE,oBAAY,CAAC,CAAC;IACrE,kCAAe,CAAC,sBAAsB,CAAC,UAAU,EAAE,gBAAQ,CAAC,CAAC;IAG7D,kCAAe,CAAC,sBAAsB,CAAC,UAAU,EAAE,gBAAQ,CAAC,CAAC;IAC7D,kCAAe,CAAC,sBAAsB,CAAC,SAAS,EAAE,eAAO,CAAC,CAAC;IAC3D,kCAAe,CAAC,sBAAsB,CAAC,SAAS,EAAE,eAAO,CAAC,CAAC;IAC3D,kCAAe,CAAC,sBAAsB,CAAC,cAAc,EAAE,oBAAY,CAAC,CAAC;IACrE,kCAAe,CAAC,sBAAsB,CAAC,eAAe,EAAE,qBAAa,CAAC,CAAC;IACvE,kCAAe,CAAC,sBAAsB,CAAC,WAAW,EAAE,iBAAS,CAAC,CAAC;IAG/D,kCAAe,CAAC,sBAAsB,CAAC,OAAO,EAAE,oBAAY,CAAC,CAAC;IAG9D,kCAAe,CAAC,sBAAsB,CAAC,YAAY,EAAE,uBAAU,CAAC,CAAC;IAEjE,kCAAe,CAAC,sBAAsB,CAAC,aAAa,EAAE,yBAAW,CAAC,CAAC;AACrE,CAAC,CAAC;AAvEW,QAAA,qBAAqB,yBAuEhC","file":"register.js","sourcesContent":["import { AnimateExecutor } from '../executor/animate-executor';\nimport { ClipIn, ClipOut } from './clip';\nimport { FadeIn, FadeOut } from './fade';\nimport { GrowAngleIn, GrowAngleOut } from './growAngle';\nimport { GrowCenterIn, GrowCenterOut } from './growCenter';\nimport { GrowHeightIn, GrowHeightOut } from './growHeight';\nimport {\n GrowPointsIn,\n GrowPointsOut,\n GrowPointsXIn,\n GrowPointsXOut,\n GrowPointsYIn,\n GrowPointsYOut\n} from './growPoints';\nimport { GrowRadiusIn, GrowRadiusOut } from './growRadius';\nimport { GrowWidthIn, GrowWidthOut } from './growWidth';\nimport { InputText } from './input-text';\nimport { LabelItemAppear, LabelItemDisappear } from './label-item-animate';\nimport { IncreaseCount } from './number';\nimport { PoptipAppear, PoptipDisappear } from './poptip-animate';\nimport { InputRichText } from './richtext/input-richtext';\nimport { OutputRichText } from './richtext/output-richtext';\nimport { SlideRichText } from './richtext/slide-richtext';\nimport { SlideOutRichText } from './richtext/slide-out-richtext';\nimport { ScaleIn, ScaleOut } from './scale';\nimport { State } from './state';\nimport {\n GrowIn,\n GrowOut,\n MoveRotateIn,\n MoveRotateOut,\n MoveScaleIn,\n MoveScaleOut,\n PulseAnimate,\n SlideIn,\n SlideOut,\n SpinIn,\n SpinOut,\n StrokeIn,\n StrokeOut\n} from './story';\nimport { Update } from './update';\nimport { MoveIn, MoveOut } from './move';\nimport { RotateIn, RotateOut } from './rotate';\nimport { MotionPath } from './motionPath';\nimport { FromTo } from './fromTo';\nimport { GroupFadeIn, GroupFadeOut } from './groupFade';\nimport { StreamLight } from './streamLight';\n\nexport const registerCustomAnimate = () => {\n // 基础动画\n AnimateExecutor.registerBuiltInAnimate('increaseCount', IncreaseCount);\n\n AnimateExecutor.registerBuiltInAnimate('fromTo', FromTo);\n AnimateExecutor.registerBuiltInAnimate('scaleIn', ScaleIn);\n AnimateExecutor.registerBuiltInAnimate('scaleOut', ScaleOut);\n AnimateExecutor.registerBuiltInAnimate('growHeightIn', GrowHeightIn);\n AnimateExecutor.registerBuiltInAnimate('growHeightOut', GrowHeightOut);\n AnimateExecutor.registerBuiltInAnimate('growWidthIn', GrowWidthIn);\n AnimateExecutor.registerBuiltInAnimate('growWidthOut', GrowWidthOut);\n AnimateExecutor.registerBuiltInAnimate('growCenterIn', GrowCenterIn);\n AnimateExecutor.registerBuiltInAnimate('growCenterOut', GrowCenterOut);\n AnimateExecutor.registerBuiltInAnimate('clipIn', ClipIn);\n AnimateExecutor.registerBuiltInAnimate('clipOut', ClipOut);\n AnimateExecutor.registerBuiltInAnimate('fadeIn', FadeIn);\n AnimateExecutor.registerBuiltInAnimate('fadeOut', FadeOut);\n AnimateExecutor.registerBuiltInAnimate('growPointsIn', GrowPointsIn);\n AnimateExecutor.registerBuiltInAnimate('growPointsOut', GrowPointsOut);\n AnimateExecutor.registerBuiltInAnimate('growPointsXIn', GrowPointsXIn);\n AnimateExecutor.registerBuiltInAnimate('growPointsXOut', GrowPointsXOut);\n AnimateExecutor.registerBuiltInAnimate('growPointsYIn', GrowPointsYIn);\n AnimateExecutor.registerBuiltInAnimate('growPointsYOut', GrowPointsYOut);\n AnimateExecutor.registerBuiltInAnimate('growAngleIn', GrowAngleIn);\n AnimateExecutor.registerBuiltInAnimate('growAngleOut', GrowAngleOut);\n AnimateExecutor.registerBuiltInAnimate('growRadiusIn', GrowRadiusIn);\n AnimateExecutor.registerBuiltInAnimate('growRadiusOut', GrowRadiusOut);\n AnimateExecutor.registerBuiltInAnimate('moveIn', MoveIn);\n AnimateExecutor.registerBuiltInAnimate('moveOut', MoveOut);\n AnimateExecutor.registerBuiltInAnimate('rotateIn', RotateIn);\n AnimateExecutor.registerBuiltInAnimate('rotateOut', RotateOut);\n // state和update共用一个自定义动画类\n AnimateExecutor.registerBuiltInAnimate('update', Update);\n AnimateExecutor.registerBuiltInAnimate('state', State);\n // Label item animations\n AnimateExecutor.registerBuiltInAnimate('labelItemAppear', LabelItemAppear);\n AnimateExecutor.registerBuiltInAnimate('labelItemDisappear', LabelItemDisappear);\n // Poptip animations\n AnimateExecutor.registerBuiltInAnimate('poptipAppear', PoptipAppear);\n AnimateExecutor.registerBuiltInAnimate('poptipDisappear', PoptipDisappear);\n\n // Text input animations\n AnimateExecutor.registerBuiltInAnimate('inputText', InputText);\n AnimateExecutor.registerBuiltInAnimate('inputRichText', InputRichText);\n AnimateExecutor.registerBuiltInAnimate('outputRichText', OutputRichText);\n AnimateExecutor.registerBuiltInAnimate('slideRichText', SlideRichText);\n AnimateExecutor.registerBuiltInAnimate('slideOutRichText', SlideOutRichText);\n\n // 故事化动画 - 入场\n AnimateExecutor.registerBuiltInAnimate('slideIn', SlideIn);\n AnimateExecutor.registerBuiltInAnimate('growIn', GrowIn);\n AnimateExecutor.registerBuiltInAnimate('spinIn', SpinIn);\n AnimateExecutor.registerBuiltInAnimate('moveScaleIn', MoveScaleIn);\n AnimateExecutor.registerBuiltInAnimate('moveRotateIn', MoveRotateIn);\n AnimateExecutor.registerBuiltInAnimate('strokeIn', StrokeIn);\n\n // 故事化动画 - 出场\n AnimateExecutor.registerBuiltInAnimate('slideOut', SlideOut);\n AnimateExecutor.registerBuiltInAnimate('growOut', GrowOut);\n AnimateExecutor.registerBuiltInAnimate('spinOut', SpinOut);\n AnimateExecutor.registerBuiltInAnimate('moveScaleOut', MoveScaleOut);\n AnimateExecutor.registerBuiltInAnimate('moveRotateOut', MoveRotateOut);\n AnimateExecutor.registerBuiltInAnimate('strokeOut', StrokeOut);\n\n // 特效动画\n AnimateExecutor.registerBuiltInAnimate('pulse', PulseAnimate);\n\n // 路径动画\n AnimateExecutor.registerBuiltInAnimate('MotionPath', MotionPath);\n // 流光动画\n AnimateExecutor.registerBuiltInAnimate('streamLight', StreamLight);\n};\n\nexport {\n ClipIn,\n ClipOut,\n FadeIn,\n FadeOut,\n GrowAngleIn,\n GrowAngleOut,\n GrowCenterIn,\n GrowCenterOut,\n GrowHeightIn,\n GrowHeightOut,\n GrowPointsIn,\n GrowPointsOut,\n GrowPointsXIn,\n GrowPointsXOut,\n GrowPointsYIn,\n GrowPointsYOut,\n GrowRadiusIn,\n GrowRadiusOut,\n GrowWidthIn,\n GrowWidthOut,\n IncreaseCount,\n PoptipAppear,\n PoptipDisappear,\n ScaleIn,\n ScaleOut,\n MoveIn,\n MoveOut,\n RotateIn,\n RotateOut,\n State,\n Update,\n MotionPath,\n LabelItemAppear,\n LabelItemDisappear,\n InputText,\n InputRichText,\n OutputRichText,\n SlideRichText,\n SlideOutRichText,\n SlideIn,\n GrowIn,\n SpinIn,\n MoveScaleIn,\n MoveRotateIn,\n SlideOut,\n GrowOut,\n SpinOut,\n MoveScaleOut,\n MoveRotateOut,\n StrokeIn,\n StrokeOut,\n PulseAnimate,\n GroupFadeIn,\n GroupFadeOut,\n FromTo,\n StreamLight\n};\n"]}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ACustomAnimate } from '../custom-animate';
|
|
2
|
+
import type { IRichTextCharacter, IAnimate, IStep, EasingType } from '@visactor/vrender-core';
|
|
3
|
+
export declare class InputRichText extends ACustomAnimate<{
|
|
4
|
+
textConfig: IRichTextCharacter[];
|
|
5
|
+
}> {
|
|
6
|
+
valid: boolean;
|
|
7
|
+
private fromTextConfig;
|
|
8
|
+
private toTextConfig;
|
|
9
|
+
private originalTextConfig;
|
|
10
|
+
private showCursor;
|
|
11
|
+
private cursorChar;
|
|
12
|
+
private blinkCursor;
|
|
13
|
+
private fadeInChars;
|
|
14
|
+
private fadeInDuration;
|
|
15
|
+
private strokeFirst;
|
|
16
|
+
private strokeToFillRatio;
|
|
17
|
+
constructor(from: {
|
|
18
|
+
textConfig: IRichTextCharacter[];
|
|
19
|
+
}, to: {
|
|
20
|
+
textConfig: IRichTextCharacter[];
|
|
21
|
+
}, duration: number, easing: EasingType, params?: {
|
|
22
|
+
showCursor?: boolean;
|
|
23
|
+
cursorChar?: string;
|
|
24
|
+
blinkCursor?: boolean;
|
|
25
|
+
beforeText?: string;
|
|
26
|
+
afterText?: string;
|
|
27
|
+
fadeInChars?: boolean;
|
|
28
|
+
fadeInDuration?: number;
|
|
29
|
+
strokeFirst?: boolean;
|
|
30
|
+
strokeToFillRatio?: number;
|
|
31
|
+
});
|
|
32
|
+
onFirstRun(): void;
|
|
33
|
+
onEnd(cb?: (animate: IAnimate, step: IStep) => void): void;
|
|
34
|
+
onUpdate(end: boolean, ratio: number, out: Record<string, any>): void;
|
|
35
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: !0
|
|
5
|
+
}), exports.InputRichText = void 0;
|
|
6
|
+
|
|
7
|
+
const custom_animate_1 = require("../custom-animate"), vrender_core_1 = require("@visactor/vrender-core");
|
|
8
|
+
|
|
9
|
+
class InputRichText extends custom_animate_1.ACustomAnimate {
|
|
10
|
+
constructor(from, to, duration, easing, params) {
|
|
11
|
+
super(from, to, duration, easing, params), this.fromTextConfig = [], this.toTextConfig = [],
|
|
12
|
+
this.originalTextConfig = [], this.showCursor = !1, this.cursorChar = "|", this.blinkCursor = !0,
|
|
13
|
+
this.fadeInChars = !1, this.fadeInDuration = .3, this.strokeFirst = !1, this.strokeToFillRatio = .3,
|
|
14
|
+
void 0 !== (null == params ? void 0 : params.showCursor) && (this.showCursor = params.showCursor),
|
|
15
|
+
void 0 !== (null == params ? void 0 : params.cursorChar) && (this.cursorChar = params.cursorChar),
|
|
16
|
+
void 0 !== (null == params ? void 0 : params.blinkCursor) && (this.blinkCursor = params.blinkCursor),
|
|
17
|
+
void 0 !== (null == params ? void 0 : params.fadeInChars) && (this.fadeInChars = params.fadeInChars),
|
|
18
|
+
void 0 !== (null == params ? void 0 : params.fadeInDuration) && (this.fadeInDuration = params.fadeInDuration),
|
|
19
|
+
void 0 !== (null == params ? void 0 : params.strokeFirst) && (this.strokeFirst = params.strokeFirst),
|
|
20
|
+
void 0 !== (null == params ? void 0 : params.strokeToFillRatio) && (this.strokeToFillRatio = params.strokeToFillRatio);
|
|
21
|
+
}
|
|
22
|
+
onFirstRun() {
|
|
23
|
+
const fromProps = this.getLastProps(), toProps = this.getEndProps();
|
|
24
|
+
this.originalTextConfig = toProps.textConfig ? [ ...toProps.textConfig ] : [], this.valid = !0,
|
|
25
|
+
this.originalTextConfig && 0 !== this.originalTextConfig.length ? (this.fromTextConfig = fromProps.textConfig && fromProps.textConfig.length > 0 ? vrender_core_1.RichText.TransformTextConfig2SingleCharacter(fromProps.textConfig) : [],
|
|
26
|
+
this.toTextConfig = vrender_core_1.RichText.TransformTextConfig2SingleCharacter(this.originalTextConfig)) : this.valid = !1;
|
|
27
|
+
}
|
|
28
|
+
onEnd(cb) {
|
|
29
|
+
super.onEnd(cb), cb || this.target.setAttribute("textConfig", this.originalTextConfig);
|
|
30
|
+
}
|
|
31
|
+
onUpdate(end, ratio, out) {
|
|
32
|
+
if (!this.valid) return;
|
|
33
|
+
const totalItems = this.toTextConfig.length, fromItems = this.fromTextConfig.length, maxTextShowRatio = this.fadeInChars ? 1 - this.fadeInDuration : 1;
|
|
34
|
+
let currentLength, currentTextConfig;
|
|
35
|
+
if (fromItems > totalItems) currentLength = Math.round(fromItems - (fromItems - totalItems) * ratio); else if (this.fadeInChars) {
|
|
36
|
+
const adjustedRatio = Math.min(1, ratio / maxTextShowRatio);
|
|
37
|
+
currentLength = Math.round(fromItems + (totalItems - fromItems) * adjustedRatio);
|
|
38
|
+
} else currentLength = Math.round(fromItems + (totalItems - fromItems) * ratio);
|
|
39
|
+
if (currentTextConfig = fromItems > totalItems ? this.fromTextConfig.slice(0, currentLength) : this.toTextConfig.slice(0, currentLength).map(((item, index) => {
|
|
40
|
+
if ("text" in item) {
|
|
41
|
+
const newItem = Object.assign({}, item);
|
|
42
|
+
if (this.strokeFirst) {
|
|
43
|
+
const appearTime = index / totalItems * maxTextShowRatio, itemLifetime = Math.max(0, ratio - appearTime), maxLifetime = 1 - appearTime, fillProgress = Math.min(1, itemLifetime / (this.strokeToFillRatio * maxLifetime));
|
|
44
|
+
if ("fill" in newItem && newItem.fill && (newItem.stroke = newItem.fill, fillProgress < 1 && (newItem.fillOpacity = fillProgress)),
|
|
45
|
+
this.fadeInChars) {
|
|
46
|
+
const fadeProgress = Math.min(1, itemLifetime / (this.fadeInDuration * maxLifetime));
|
|
47
|
+
newItem.opacity = Math.max(0, Math.min(1, fadeProgress));
|
|
48
|
+
}
|
|
49
|
+
} else if (this.fadeInChars) {
|
|
50
|
+
const fadeProgress = (ratio - index / totalItems * maxTextShowRatio) / this.fadeInDuration;
|
|
51
|
+
newItem.opacity = Math.max(0, Math.min(1, fadeProgress));
|
|
52
|
+
}
|
|
53
|
+
return newItem;
|
|
54
|
+
}
|
|
55
|
+
return item;
|
|
56
|
+
})), this.showCursor && currentLength < totalItems) {
|
|
57
|
+
let shouldShowCursor = !0;
|
|
58
|
+
if (this.blinkCursor) {
|
|
59
|
+
const blinkRate = .1;
|
|
60
|
+
shouldShowCursor = Math.floor(ratio / blinkRate) % 2 == 0;
|
|
61
|
+
}
|
|
62
|
+
if (shouldShowCursor && currentTextConfig.length > 0) {
|
|
63
|
+
const lastIndex = currentTextConfig.length - 1, lastItem = currentTextConfig[lastIndex];
|
|
64
|
+
if ("text" in lastItem) currentTextConfig[lastIndex] = Object.assign(Object.assign({}, lastItem), {
|
|
65
|
+
text: String(lastItem.text) + this.cursorChar
|
|
66
|
+
}); else {
|
|
67
|
+
const cursorItem = {
|
|
68
|
+
text: this.cursorChar,
|
|
69
|
+
fontSize: 16
|
|
70
|
+
};
|
|
71
|
+
currentTextConfig.push(cursorItem);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
this.target.setAttribute("textConfig", currentTextConfig);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
exports.InputRichText = InputRichText;
|
|
80
|
+
//# sourceMappingURL=input-richtext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/custom/richtext/input-richtext.ts"],"names":[],"mappings":";;;AAAA,sDAAmD;AAQnD,yDAAkD;AASlD,MAAa,aAAc,SAAQ,+BAAoD;IAcrF,YACE,IAA0C,EAC1C,EAAwC,EACxC,QAAgB,EAChB,MAAkB,EAClB,MAUC;QAED,KAAK,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;QA5BpC,mBAAc,GAAyB,EAAE,CAAC;QAC1C,iBAAY,GAAyB,EAAE,CAAC;QACxC,uBAAkB,G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E5B,IAAI,IAAI,CAAC,WAAW,EAAE;gBAEpB,MAAM,SAAS,GAAG,GAAG,CAAC;gBACtB,gBAAgB,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;aAC5D;YAED,IAAI,gBAAgB,IAAI,iBAAiB,CAAC,MAAM,GAAG,CAAC,EAAE;gBAEpD,MAAM,SAAS,GAAG,iBAAiB,CAAC,MAAM,GAAG,CAAC,CAAC;gBAC/C,MAAM,QAAQ,GAAG,iBAAiB,CAAC,SAAS,CAAC,CAAC;gBAE9C,IAAI,MAAM,IAAI,QAAQ,EAAE;oBAEtB,iBAAiB,CAAC,SAAS,CAAC,mCACvB,QAAQ,KACX,IAAI,EAAE,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,UAAU,GAC9C,CAAC;iBACH;qBAAM;oBAEL,MAAM,UAAU,GAAgC;wBAC9C,IAAI,EAAE,IAAI,CAAC,UAAU;wBACrB,QAAQ,EAAE,EAAE;qBACb,CAAC;oBACF,iBAAiB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;iBACpC;aACF;SACF;QAGD,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,YAAY,EAAE,iBAAiB,CAAC,CAAC;IAC5D,CAAC;CACF;AAvND,sCAuNC","file":"input-richtext.js","sourcesContent":["import { ACustomAnimate } from '../custom-animate';\nimport type {\n IRichTextCharacter,\n IRichTextParagraphCharacter,\n IAnimate,\n IStep,\n EasingType\n} from '@visactor/vrender-core';\nimport { RichText } from '@visactor/vrender-core';\n\n/**\n * 富文本输入动画,实现类似打字机的字符逐个显示效果\n * 支持通过beforeText和afterText参数添加前缀和后缀\n * 支持通过showCursor参数显示光标,cursorChar自定义光标字符\n * 支持通过fadeInChars参数开启字符透明度渐变效果\n * 支持通过strokeFirst参数开启描边先于填充显示效果,使用文字自身颜色作为描边色\n */\nexport class InputRichText extends ACustomAnimate<{ textConfig: IRichTextCharacter[] }> {\n declare valid: boolean;\n\n private fromTextConfig: IRichTextCharacter[] = [];\n private toTextConfig: IRichTextCharacter[] = [];\n private originalTextConfig: IRichTextCharacter[] = [];\n private showCursor: boolean = false;\n private cursorChar: string = '|';\n private blinkCursor: boolean = true;\n private fadeInChars: boolean = false;\n private fadeInDuration: number = 0.3; // 透明度渐变持续时间,以动画总时长的比例表示\n private strokeFirst: boolean = false; // 是否开启描边先于填充显示效果\n private strokeToFillRatio: number = 0.3; // 描边到填充的过渡比例,占总动画时长的比例\n\n constructor(\n from: { textConfig: IRichTextCharacter[] },\n to: { textConfig: IRichTextCharacter[] },\n duration: number,\n easing: EasingType,\n params?: {\n showCursor?: boolean;\n cursorChar?: string;\n blinkCursor?: boolean;\n beforeText?: string;\n afterText?: string;\n fadeInChars?: boolean;\n fadeInDuration?: number;\n strokeFirst?: boolean;\n strokeToFillRatio?: number;\n }\n ) {\n super(from, to, duration, easing, params);\n\n // 配置光标相关选项\n if (params?.showCursor !== undefined) {\n this.showCursor = params.showCursor;\n }\n if (params?.cursorChar !== undefined) {\n this.cursorChar = params.cursorChar;\n }\n if (params?.blinkCursor !== undefined) {\n this.blinkCursor = params.blinkCursor;\n }\n\n // 配置字符透明度渐变效果\n if (params?.fadeInChars !== undefined) {\n this.fadeInChars = params.fadeInChars;\n }\n if (params?.fadeInDuration !== undefined) {\n this.fadeInDuration = params.fadeInDuration;\n }\n\n // 配置描边先于填充显示效果\n if (params?.strokeFirst !== undefined) {\n this.strokeFirst = params.strokeFirst;\n }\n if (params?.strokeToFillRatio !== undefined) {\n this.strokeToFillRatio = params.strokeToFillRatio;\n }\n }\n\n onFirstRun(): void {\n const fromProps = this.getLastProps();\n const toProps = this.getEndProps();\n\n // 存储原始配置\n this.originalTextConfig = toProps.textConfig ? [...toProps.textConfig] : [];\n\n // 初始化解析结果\n this.valid = true;\n\n // 确保to不为空\n if (!this.originalTextConfig || this.originalTextConfig.length === 0) {\n this.valid = false;\n return;\n }\n\n // 将文本拆分为单个字符,使用RichText的静态方法\n this.fromTextConfig =\n fromProps.textConfig && fromProps.textConfig.length > 0\n ? RichText.TransformTextConfig2SingleCharacter(fromProps.textConfig)\n : [];\n\n this.toTextConfig = RichText.TransformTextConfig2SingleCharacter(this.originalTextConfig);\n }\n\n onEnd(cb?: (animate: IAnimate, step: IStep) => void): void {\n super.onEnd(cb);\n if (!cb) {\n // 动画结束时,恢复原始textConfig\n this.target.setAttribute('textConfig', this.originalTextConfig);\n }\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n if (!this.valid) {\n return;\n }\n\n // 计算当前应该显示的字符数量\n const totalItems = this.toTextConfig.length;\n const fromItems = this.fromTextConfig.length;\n\n // 计算文本显示比例上限 - 如果有渐变效果,需要为尾部字符的渐变留出时间\n // 例如,如果fadeInDuration为0.3,则文本显示部分最多占用动画时间的70%\n const maxTextShowRatio = this.fadeInChars ? 1 - this.fadeInDuration : 1;\n\n // 确定当前应该显示多少个项目\n let currentLength: number;\n\n // 如果fromItems比totalItems长,则是删除动画,否则是添加动画\n if (fromItems > totalItems) {\n // 删除文本动画(从多到少)\n currentLength = Math.round(fromItems - (fromItems - totalItems) * ratio);\n } else {\n // 添加文本动画(从少到多)- 需要更快显示字符以便留出时间让最后的字符完成渐变\n if (this.fadeInChars) {\n // 当ratio达到maxTextShowRatio时,应该已经显示全部文本\n const adjustedRatio = Math.min(1, ratio / maxTextShowRatio);\n currentLength = Math.round(fromItems + (totalItems - fromItems) * adjustedRatio);\n } else {\n // 无渐变效果时,正常显示\n currentLength = Math.round(fromItems + (totalItems - fromItems) * ratio);\n }\n }\n\n // 构建当前要显示的textConfig\n let currentTextConfig: IRichTextCharacter[];\n if (fromItems > totalItems) {\n // 删除动画:显示from的前currentLength项\n currentTextConfig = this.fromTextConfig.slice(0, currentLength);\n } else {\n // 添加文本动画:显示to的前currentLength项,可能需要应用透明度和描边效果\n currentTextConfig = this.toTextConfig.slice(0, currentLength).map((item, index) => {\n // 如果是文本项并且需要应用效果\n if ('text' in item) {\n const newItem = { ...item };\n\n // 如果启用了描边优先效果\n if (this.strokeFirst) {\n // 计算描边到填充的过渡进度\n // 字符在特定时间点出现:出现时刻 = (index / totalItems) * maxTextShowRatio\n const appearTime = (index / totalItems) * maxTextShowRatio;\n const itemLifetime = Math.max(0, ratio - appearTime); // 当前字符已经存在的时间\n const maxLifetime = 1 - appearTime; // 当前字符从出现到动画结束的最大时间\n const fillProgress = Math.min(1, itemLifetime / (this.strokeToFillRatio * maxLifetime));\n\n // 使用文本自身的填充颜色作为描边颜色\n if ('fill' in newItem && newItem.fill) {\n newItem.stroke = newItem.fill;\n // 计算描边宽度,基于字体大小\n // const fontSize = newItem.fontSize || 16;\n // newItem.lineWidth = Math.max(1, fontSize * 0.05); // 线宽大约为字体大小的5%\n\n // 如果还没到填充阶段,则将填充色透明度设为0\n if (fillProgress < 1) {\n newItem.fillOpacity = fillProgress;\n }\n }\n\n // 如果也启用了透明度渐变\n if (this.fadeInChars) {\n const fadeProgress = Math.min(1, itemLifetime / (this.fadeInDuration * maxLifetime));\n newItem.opacity = Math.max(0, Math.min(1, fadeProgress));\n }\n }\n // 只启用了透明度渐变效果,没有启用描边优先\n else if (this.fadeInChars) {\n const appearTime = (index / totalItems) * maxTextShowRatio;\n const fadeProgress = (ratio - appearTime) / this.fadeInDuration;\n newItem.opacity = Math.max(0, Math.min(1, fadeProgress));\n }\n\n return newItem;\n }\n return item;\n });\n }\n\n // 如果启用了光标\n if (this.showCursor && currentLength < totalItems) {\n // 判断是否应该显示光标\n let shouldShowCursor = true;\n\n if (this.blinkCursor) {\n // 闪烁效果:在动画期间,光标每半个周期闪烁一次\n const blinkRate = 0.1; // 光标闪烁频率(每10%动画进度闪烁一次)\n shouldShowCursor = Math.floor(ratio / blinkRate) % 2 === 0;\n }\n\n if (shouldShowCursor && currentTextConfig.length > 0) {\n // 找到最后一个文本项,在其后添加光标\n const lastIndex = currentTextConfig.length - 1;\n const lastItem = currentTextConfig[lastIndex];\n\n if ('text' in lastItem) {\n // 如果最后一项是文本,将光标添加到文本后面\n currentTextConfig[lastIndex] = {\n ...lastItem,\n text: String(lastItem.text) + this.cursorChar\n };\n } else {\n // 如果最后一项是非文本(如图片),添加一个只包含光标的新文本项\n const cursorItem: IRichTextParagraphCharacter = {\n text: this.cursorChar,\n fontSize: 16 // 使用默认字体大小,或者从context获取\n };\n currentTextConfig.push(cursorItem);\n }\n }\n }\n\n // 更新富文本的textConfig属性\n this.target.setAttribute('textConfig', currentTextConfig);\n }\n}\n"]}
|