@visactor/vrender-core 0.22.14 → 0.22.15-alpha.1
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/config.d.ts +1 -2
- package/cjs/animate/config.js +1 -5
- package/cjs/animate/config.js.map +1 -1
- package/cjs/application.d.ts +2 -1
- package/cjs/application.js.map +1 -1
- package/cjs/canvas/constants.js +1 -2
- package/cjs/canvas/empty-context.d.ts +1 -0
- package/cjs/canvas/empty-context.js +4 -0
- package/cjs/canvas/empty-context.js.map +1 -1
- package/cjs/canvas/util.js +2 -1
- package/cjs/color-string/interpolate.d.ts +1 -0
- package/cjs/color-string/interpolate.js +12 -4
- package/cjs/color-string/interpolate.js.map +1 -1
- package/cjs/common/custom-path2d.js +2 -2
- package/cjs/common/custom-path2d.js.map +1 -1
- package/cjs/common/diff.d.ts +1 -0
- package/cjs/common/diff.js +19 -0
- package/cjs/common/diff.js.map +1 -0
- package/cjs/common/enums.d.ts +0 -16
- package/cjs/common/enums.js +2 -11
- package/cjs/common/enums.js.map +1 -1
- package/cjs/common/morphing-utils.js +32 -124
- package/cjs/common/morphing-utils.js.map +1 -1
- package/cjs/common/performance-raf.d.ts +8 -0
- package/cjs/common/performance-raf.js +32 -0
- package/cjs/common/performance-raf.js.map +1 -0
- package/cjs/common/polygon.js +5 -2
- package/cjs/common/polygon.js.map +1 -1
- package/cjs/common/segment/curve/cubic-bezier.d.ts +1 -2
- package/cjs/common/segment/curve/cubic-bezier.js +3 -8
- package/cjs/common/segment/curve/cubic-bezier.js.map +1 -1
- package/cjs/common/segment/curve/quadratic-bezier.d.ts +1 -0
- package/cjs/common/segment/curve/quadratic-bezier.js +10 -3
- package/cjs/common/segment/curve/quadratic-bezier.js.map +1 -1
- package/cjs/common/segment/index.d.ts +1 -0
- package/cjs/common/segment/index.js +1 -1
- package/cjs/common/segment/index.js.map +1 -1
- package/cjs/common/shape/arc.d.ts +1 -1
- package/cjs/common/shape/arc.js +7 -3
- package/cjs/common/shape/arc.js.map +1 -1
- package/cjs/common/simplify.js +1 -2
- package/cjs/common/sort.js +1 -1
- package/cjs/common/split-path.js +2 -2
- package/cjs/common/split-path.js.map +1 -1
- package/cjs/common/store.js +1 -1
- package/cjs/common/text.js +1 -1
- package/cjs/common/utils.d.ts +0 -2
- package/cjs/common/utils.js +5 -9
- package/cjs/common/utils.js.map +1 -1
- package/cjs/core/application.js +1 -1
- package/cjs/core/camera.js +1 -1
- package/cjs/core/global.d.ts +3 -0
- package/cjs/core/global.js +14 -3
- package/cjs/core/global.js.map +1 -1
- package/cjs/core/stage.d.ts +8 -3
- package/cjs/core/stage.js +34 -20
- package/cjs/core/stage.js.map +1 -1
- package/cjs/graphic/arc.d.ts +1 -2
- package/cjs/graphic/arc.js +3 -2
- package/cjs/graphic/arc.js.map +1 -1
- package/cjs/graphic/area.d.ts +1 -2
- package/cjs/graphic/area.js +4 -1
- package/cjs/graphic/area.js.map +1 -1
- package/cjs/graphic/circle.d.ts +1 -2
- package/cjs/graphic/circle.js +5 -2
- package/cjs/graphic/circle.js.map +1 -1
- package/cjs/graphic/config.js +2 -1
- package/cjs/graphic/config.js.map +1 -1
- package/cjs/graphic/graphic-service/graphic-module.js +1 -2
- package/cjs/graphic/graphic-service/graphic-module.js.map +1 -1
- package/cjs/graphic/graphic-service/graphic-service.js +2 -3
- package/cjs/graphic/graphic-service/graphic-service.js.map +1 -1
- package/cjs/graphic/graphic.d.ts +9 -12
- package/cjs/graphic/graphic.js +48 -105
- package/cjs/graphic/graphic.js.map +1 -1
- package/cjs/graphic/group.js +8 -8
- package/cjs/graphic/group.js.map +1 -1
- package/cjs/graphic/line.d.ts +1 -2
- package/cjs/graphic/line.js +5 -1
- package/cjs/graphic/line.js.map +1 -1
- package/cjs/graphic/rect.js +5 -2
- package/cjs/graphic/rect.js.map +1 -1
- package/cjs/graphic/richtext/icon.d.ts +1 -1
- package/cjs/graphic/richtext/icon.js.map +1 -1
- package/cjs/graphic/richtext/paragraph.js +2 -2
- package/cjs/graphic/richtext/paragraph.js.map +1 -1
- package/cjs/graphic/star.d.ts +1 -2
- package/cjs/graphic/star.js +4 -2
- package/cjs/graphic/star.js.map +1 -1
- package/cjs/index.d.ts +2 -3
- package/cjs/index.js +14 -16
- package/cjs/index.js.map +1 -1
- package/cjs/interface/animate.d.ts +1 -160
- package/cjs/interface/animate.js +1 -4
- package/cjs/interface/animate.js.map +1 -1
- package/cjs/interface/animation/animate.d.ts +117 -0
- package/cjs/interface/animation/animate.js +10 -0
- package/cjs/interface/animation/animate.js.map +1 -0
- package/cjs/interface/animation/easing.d.ts +3 -0
- package/cjs/interface/animation/easing.js +6 -0
- package/cjs/interface/animation/easing.js.map +1 -0
- package/cjs/interface/animation/index.d.ts +5 -0
- package/cjs/{animate/Ticker → interface/animation}/index.js +3 -3
- package/cjs/interface/animation/index.js.map +1 -0
- package/cjs/interface/animation/ticker.d.ts +39 -0
- package/cjs/{animate/Ticker/type.js → interface/animation/ticker.js} +1 -1
- package/cjs/interface/animation/ticker.js.map +1 -0
- package/cjs/interface/animation/timeline.d.ts +17 -0
- package/cjs/interface/animation/timeline.js +6 -0
- package/cjs/interface/animation/timeline.js.map +1 -0
- package/cjs/interface/animation/type.d.ts +13 -0
- package/cjs/interface/animation/type.js +15 -0
- package/cjs/interface/animation/type.js.map +1 -0
- package/cjs/interface/context.d.ts +1 -0
- package/cjs/interface/context.js.map +1 -1
- package/cjs/interface/global.d.ts +2 -0
- package/cjs/interface/global.js.map +1 -1
- package/cjs/interface/graphic.d.ts +11 -3
- package/cjs/interface/graphic.js.map +1 -1
- package/cjs/interface/index.d.ts +1 -1
- package/cjs/interface/index.js +9 -9
- package/cjs/interface/index.js.map +1 -1
- package/cjs/interface/render.d.ts +7 -0
- package/cjs/interface/render.js.map +1 -1
- package/cjs/interface/stage.d.ts +4 -1
- package/cjs/interface/stage.js.map +1 -1
- package/cjs/modules.d.ts +2 -1
- package/cjs/modules.js +4 -3
- package/cjs/modules.js.map +1 -1
- package/cjs/plugins/builtin-plugin/auto-render-plugin.js +9 -8
- package/cjs/plugins/builtin-plugin/auto-render-plugin.js.map +1 -1
- package/cjs/plugins/builtin-plugin/dirty-bounds-plugin.js +14 -11
- package/cjs/plugins/builtin-plugin/dirty-bounds-plugin.js.map +1 -1
- package/cjs/plugins/builtin-plugin/edit-module.js +4 -4
- package/cjs/plugins/builtin-plugin/edit-module.js.map +1 -1
- package/cjs/plugins/builtin-plugin/flex-layout-plugin.js +13 -10
- package/cjs/plugins/builtin-plugin/flex-layout-plugin.js.map +1 -1
- package/cjs/plugins/builtin-plugin/html-attribute-plugin.js +0 -1
- package/cjs/plugins/builtin-plugin/html-attribute-plugin.js.map +1 -1
- package/cjs/plugins/builtin-plugin/incremental-auto-render-plugin.js +8 -5
- package/cjs/plugins/builtin-plugin/incremental-auto-render-plugin.js.map +1 -1
- package/cjs/plugins/builtin-plugin/richtext-edit-plugin.d.ts +2 -2
- package/cjs/plugins/builtin-plugin/richtext-edit-plugin.js +6 -5
- package/cjs/plugins/builtin-plugin/richtext-edit-plugin.js.map +1 -1
- package/cjs/render/contributions/render/arc-render.d.ts +4 -2
- package/cjs/render/contributions/render/arc-render.js +19 -17
- package/cjs/render/contributions/render/arc-render.js.map +1 -1
- package/cjs/render/contributions/render/area-render.js +2 -2
- package/cjs/render/contributions/render/area-render.js.map +1 -1
- package/cjs/render/contributions/render/base-render.d.ts +2 -2
- package/cjs/render/contributions/render/base-render.js +2 -2
- package/cjs/render/contributions/render/base-render.js.map +1 -1
- package/cjs/render/contributions/render/draw-contribution.d.ts +1 -0
- package/cjs/render/contributions/render/draw-contribution.js +23 -19
- package/cjs/render/contributions/render/draw-contribution.js.map +1 -1
- package/cjs/render/contributions/render/draw-interceptor.js +2 -1
- package/cjs/render/contributions/render/draw-interceptor.js.map +1 -1
- package/cjs/render/contributions/render/group-render.d.ts +2 -2
- package/cjs/render/contributions/render/group-render.js +15 -11
- package/cjs/render/contributions/render/group-render.js.map +1 -1
- package/cjs/render/contributions/render/line-render.js +1 -1
- package/cjs/render/contributions/render/line-render.js.map +1 -1
- package/cjs/render/contributions/render/rect-render.d.ts +3 -1
- package/cjs/render/contributions/render/rect-render.js +17 -15
- package/cjs/render/contributions/render/rect-render.js.map +1 -1
- package/cjs/render/contributions/render/symbol-render.d.ts +4 -2
- package/cjs/render/contributions/render/symbol-render.js +16 -11
- package/cjs/render/contributions/render/symbol-render.js.map +1 -1
- package/cjs/render/render-service.d.ts +1 -1
- package/cjs/render/render-service.js.map +1 -1
- package/dist/index.es.js +5992 -8838
- package/es/animate/config.d.ts +1 -2
- package/es/animate/config.js +0 -5
- package/es/animate/config.js.map +1 -1
- package/es/application.d.ts +2 -1
- package/es/application.js.map +1 -1
- package/es/canvas/constants.js +1 -2
- package/es/canvas/empty-context.d.ts +1 -0
- package/es/canvas/empty-context.js +4 -0
- package/es/canvas/empty-context.js.map +1 -1
- package/es/canvas/util.js +2 -1
- package/es/color-string/interpolate.d.ts +1 -0
- package/es/color-string/interpolate.js +8 -1
- package/es/color-string/interpolate.js.map +1 -1
- package/es/common/custom-path2d.js +2 -2
- package/es/common/custom-path2d.js.map +1 -1
- package/es/common/diff.d.ts +1 -0
- package/es/common/diff.js +11 -0
- package/es/common/diff.js.map +1 -0
- package/es/common/enums.d.ts +0 -16
- package/es/common/enums.js +0 -20
- package/es/common/enums.js.map +1 -1
- package/es/common/morphing-utils.js +29 -124
- package/es/common/morphing-utils.js.map +1 -1
- package/es/common/performance-raf.d.ts +8 -0
- package/es/common/performance-raf.js +24 -0
- package/es/common/performance-raf.js.map +1 -0
- package/es/common/polygon.js +6 -3
- package/es/common/polygon.js.map +1 -1
- package/es/common/segment/curve/cubic-bezier.d.ts +1 -2
- package/es/common/segment/curve/cubic-bezier.js +1 -8
- package/es/common/segment/curve/cubic-bezier.js.map +1 -1
- package/es/common/segment/curve/quadratic-bezier.d.ts +1 -0
- package/es/common/segment/curve/quadratic-bezier.js +5 -2
- package/es/common/segment/curve/quadratic-bezier.js.map +1 -1
- package/es/common/segment/index.d.ts +1 -0
- package/es/common/segment/index.js +2 -0
- package/es/common/segment/index.js.map +1 -1
- package/es/common/shape/arc.d.ts +1 -1
- package/es/common/shape/arc.js +7 -3
- package/es/common/shape/arc.js.map +1 -1
- package/es/common/simplify.js +1 -2
- package/es/common/sort.js +1 -1
- package/es/common/split-path.js +2 -2
- package/es/common/split-path.js.map +1 -1
- package/es/common/store.js +1 -1
- package/es/common/text.js +1 -1
- package/es/common/utils.d.ts +0 -2
- package/es/common/utils.js +1 -5
- package/es/common/utils.js.map +1 -1
- package/es/core/application.js +1 -1
- package/es/core/camera.js +1 -1
- package/es/core/global.d.ts +3 -0
- package/es/core/global.js +15 -2
- package/es/core/global.js.map +1 -1
- package/es/core/stage.d.ts +8 -3
- package/es/core/stage.js +35 -22
- package/es/core/stage.js.map +1 -1
- package/es/graphic/arc.d.ts +1 -2
- package/es/graphic/arc.js +3 -2
- package/es/graphic/arc.js.map +1 -1
- package/es/graphic/area.d.ts +1 -2
- package/es/graphic/area.js +4 -1
- package/es/graphic/area.js.map +1 -1
- package/es/graphic/circle.d.ts +1 -2
- package/es/graphic/circle.js +4 -2
- package/es/graphic/circle.js.map +1 -1
- package/es/graphic/config.js +2 -1
- package/es/graphic/config.js.map +1 -1
- package/es/graphic/graphic-service/graphic-module.js +1 -1
- package/es/graphic/graphic-service/graphic-module.js.map +1 -1
- package/es/graphic/graphic-service/graphic-service.js +1 -4
- package/es/graphic/graphic-service/graphic-service.js.map +1 -1
- package/es/graphic/graphic.d.ts +9 -12
- package/es/graphic/graphic.js +52 -109
- package/es/graphic/graphic.js.map +1 -1
- package/es/graphic/group.js +7 -7
- package/es/graphic/group.js.map +1 -1
- package/es/graphic/line.d.ts +1 -2
- package/es/graphic/line.js +5 -1
- package/es/graphic/line.js.map +1 -1
- package/es/graphic/rect.js +5 -2
- package/es/graphic/rect.js.map +1 -1
- package/es/graphic/richtext/icon.d.ts +1 -1
- package/es/graphic/richtext/icon.js.map +1 -1
- package/es/graphic/richtext/paragraph.js +2 -2
- package/es/graphic/richtext/paragraph.js.map +1 -1
- package/es/graphic/star.d.ts +1 -2
- package/es/graphic/star.js +4 -2
- package/es/graphic/star.js.map +1 -1
- package/es/index.d.ts +2 -3
- package/es/index.js +4 -6
- package/es/index.js.map +1 -1
- package/es/interface/animate.d.ts +1 -160
- package/es/interface/animate.js +2 -1
- package/es/interface/animate.js.map +1 -1
- package/es/interface/animation/animate.d.ts +117 -0
- package/es/interface/animation/animate.js +6 -0
- package/es/interface/animation/animate.js.map +1 -0
- package/es/interface/animation/easing.d.ts +3 -0
- package/es/interface/animation/easing.js +2 -0
- package/es/interface/animation/easing.js.map +1 -0
- package/es/interface/animation/index.d.ts +5 -0
- package/es/interface/animation/index.js +10 -0
- package/es/interface/animation/index.js.map +1 -0
- package/es/interface/animation/ticker.d.ts +39 -0
- package/es/{animate/Ticker/type.js → interface/animation/ticker.js} +1 -1
- package/es/interface/animation/ticker.js.map +1 -0
- package/es/interface/animation/timeline.d.ts +17 -0
- package/es/interface/animation/timeline.js +2 -0
- package/es/interface/animation/timeline.js.map +1 -0
- package/es/interface/animation/type.d.ts +13 -0
- package/es/interface/animation/type.js +14 -0
- package/es/interface/animation/type.js.map +1 -0
- package/es/interface/context.d.ts +1 -0
- package/es/interface/context.js.map +1 -1
- package/es/interface/global.d.ts +2 -0
- package/es/interface/global.js.map +1 -1
- package/es/interface/graphic.d.ts +11 -3
- package/es/interface/graphic.js.map +1 -1
- package/es/interface/index.d.ts +1 -1
- package/es/interface/index.js +2 -2
- package/es/interface/index.js.map +1 -1
- package/es/interface/render.d.ts +7 -0
- package/es/interface/render.js.map +1 -1
- package/es/interface/stage.d.ts +4 -1
- package/es/interface/stage.js.map +1 -1
- package/es/modules.d.ts +2 -1
- package/es/modules.js +6 -0
- package/es/modules.js.map +1 -1
- package/es/plugins/builtin-plugin/auto-render-plugin.js +8 -8
- package/es/plugins/builtin-plugin/auto-render-plugin.js.map +1 -1
- package/es/plugins/builtin-plugin/dirty-bounds-plugin.js +13 -12
- package/es/plugins/builtin-plugin/dirty-bounds-plugin.js.map +1 -1
- package/es/plugins/builtin-plugin/edit-module.js +4 -4
- package/es/plugins/builtin-plugin/edit-module.js.map +1 -1
- package/es/plugins/builtin-plugin/flex-layout-plugin.js +12 -11
- package/es/plugins/builtin-plugin/flex-layout-plugin.js.map +1 -1
- package/es/plugins/builtin-plugin/html-attribute-plugin.js +0 -1
- package/es/plugins/builtin-plugin/html-attribute-plugin.js.map +1 -1
- package/es/plugins/builtin-plugin/incremental-auto-render-plugin.js +8 -5
- package/es/plugins/builtin-plugin/incremental-auto-render-plugin.js.map +1 -1
- package/es/plugins/builtin-plugin/richtext-edit-plugin.d.ts +2 -2
- package/es/plugins/builtin-plugin/richtext-edit-plugin.js +4 -5
- package/es/plugins/builtin-plugin/richtext-edit-plugin.js.map +1 -1
- package/es/render/contributions/render/arc-render.d.ts +4 -2
- package/es/render/contributions/render/arc-render.js +19 -17
- package/es/render/contributions/render/arc-render.js.map +1 -1
- package/es/render/contributions/render/area-render.js +2 -2
- package/es/render/contributions/render/area-render.js.map +1 -1
- package/es/render/contributions/render/base-render.d.ts +2 -2
- package/es/render/contributions/render/base-render.js +2 -2
- package/es/render/contributions/render/base-render.js.map +1 -1
- package/es/render/contributions/render/draw-contribution.d.ts +1 -0
- package/es/render/contributions/render/draw-contribution.js +23 -19
- package/es/render/contributions/render/draw-contribution.js.map +1 -1
- package/es/render/contributions/render/draw-interceptor.js +2 -1
- package/es/render/contributions/render/draw-interceptor.js.map +1 -1
- package/es/render/contributions/render/group-render.d.ts +2 -2
- package/es/render/contributions/render/group-render.js +15 -11
- package/es/render/contributions/render/group-render.js.map +1 -1
- package/es/render/contributions/render/line-render.js +1 -1
- package/es/render/contributions/render/line-render.js.map +1 -1
- package/es/render/contributions/render/rect-render.d.ts +3 -1
- package/es/render/contributions/render/rect-render.js +17 -14
- package/es/render/contributions/render/rect-render.js.map +1 -1
- package/es/render/contributions/render/symbol-render.d.ts +4 -2
- package/es/render/contributions/render/symbol-render.js +16 -11
- package/es/render/contributions/render/symbol-render.js.map +1 -1
- package/es/render/render-service.d.ts +1 -1
- package/es/render/render-service.js.map +1 -1
- package/package.json +2 -2
- package/cjs/animate/Ticker/default-ticker.d.ts +0 -40
- package/cjs/animate/Ticker/default-ticker.js +0 -140
- package/cjs/animate/Ticker/default-ticker.js.map +0 -1
- package/cjs/animate/Ticker/index.d.ts +0 -5
- package/cjs/animate/Ticker/index.js.map +0 -1
- package/cjs/animate/Ticker/manual-ticker-handler.d.ts +0 -15
- package/cjs/animate/Ticker/manual-ticker-handler.js +0 -36
- package/cjs/animate/Ticker/manual-ticker-handler.js.map +0 -1
- package/cjs/animate/Ticker/manual-ticker.d.ts +0 -19
- package/cjs/animate/Ticker/manual-ticker.js +0 -37
- package/cjs/animate/Ticker/manual-ticker.js.map +0 -1
- package/cjs/animate/Ticker/raf-tick-handler.d.ts +0 -9
- package/cjs/animate/Ticker/raf-tick-handler.js +0 -30
- package/cjs/animate/Ticker/raf-tick-handler.js.map +0 -1
- package/cjs/animate/Ticker/timeout-tick-handler.d.ts +0 -9
- package/cjs/animate/Ticker/timeout-tick-handler.js +0 -28
- package/cjs/animate/Ticker/timeout-tick-handler.js.map +0 -1
- package/cjs/animate/Ticker/type.d.ts +0 -6
- package/cjs/animate/Ticker/type.js.map +0 -1
- package/cjs/animate/animate.d.ts +0 -147
- package/cjs/animate/animate.js +0 -403
- package/cjs/animate/animate.js.map +0 -1
- package/cjs/animate/custom-animate.d.ts +0 -236
- package/cjs/animate/custom-animate.js +0 -726
- package/cjs/animate/custom-animate.js.map +0 -1
- package/cjs/animate/default-ticker.d.ts +0 -2
- package/cjs/animate/default-ticker.js +0 -14
- package/cjs/animate/default-ticker.js.map +0 -1
- package/cjs/animate/easing-func.d.ts +0 -1
- package/cjs/animate/easing-func.js +0 -16
- package/cjs/animate/easing-func.js.map +0 -1
- package/cjs/animate/easing.d.ts +0 -49
- package/cjs/animate/easing.js +0 -141
- package/cjs/animate/easing.js.map +0 -1
- package/cjs/animate/group-fade.d.ts +0 -16
- package/cjs/animate/group-fade.js +0 -66
- package/cjs/animate/group-fade.js.map +0 -1
- package/cjs/animate/index.d.ts +0 -8
- package/cjs/animate/index.js +0 -24
- package/cjs/animate/index.js.map +0 -1
- package/cjs/animate/morphing.d.ts +0 -52
- package/cjs/animate/morphing.js +0 -292
- package/cjs/animate/morphing.js.map +0 -1
- package/cjs/animate/timeline.d.ts +0 -17
- package/cjs/animate/timeline.js +0 -46
- package/cjs/animate/timeline.js.map +0 -1
- package/cjs/plugins/builtin-plugin/richtext-edit-plugin-old.d.ts +0 -1
- package/cjs/plugins/builtin-plugin/richtext-edit-plugin-old.js +0 -3
- package/cjs/plugins/builtin-plugin/richtext-edit-plugin-old.js.map +0 -1
- package/es/animate/Ticker/default-ticker.d.ts +0 -40
- package/es/animate/Ticker/default-ticker.js +0 -138
- package/es/animate/Ticker/default-ticker.js.map +0 -1
- package/es/animate/Ticker/index.d.ts +0 -5
- package/es/animate/Ticker/index.js +0 -10
- package/es/animate/Ticker/index.js.map +0 -1
- package/es/animate/Ticker/manual-ticker-handler.d.ts +0 -15
- package/es/animate/Ticker/manual-ticker-handler.js +0 -28
- package/es/animate/Ticker/manual-ticker-handler.js.map +0 -1
- package/es/animate/Ticker/manual-ticker.d.ts +0 -19
- package/es/animate/Ticker/manual-ticker.js +0 -31
- package/es/animate/Ticker/manual-ticker.js.map +0 -1
- package/es/animate/Ticker/raf-tick-handler.d.ts +0 -9
- package/es/animate/Ticker/raf-tick-handler.js +0 -22
- package/es/animate/Ticker/raf-tick-handler.js.map +0 -1
- package/es/animate/Ticker/timeout-tick-handler.d.ts +0 -9
- package/es/animate/Ticker/timeout-tick-handler.js +0 -20
- package/es/animate/Ticker/timeout-tick-handler.js.map +0 -1
- package/es/animate/Ticker/type.d.ts +0 -6
- package/es/animate/Ticker/type.js.map +0 -1
- package/es/animate/animate.d.ts +0 -147
- package/es/animate/animate.js +0 -398
- package/es/animate/animate.js.map +0 -1
- package/es/animate/custom-animate.d.ts +0 -236
- package/es/animate/custom-animate.js +0 -703
- package/es/animate/custom-animate.js.map +0 -1
- package/es/animate/default-ticker.d.ts +0 -2
- package/es/animate/default-ticker.js +0 -12
- package/es/animate/default-ticker.js.map +0 -1
- package/es/animate/easing-func.d.ts +0 -1
- package/es/animate/easing-func.js +0 -10
- package/es/animate/easing-func.js.map +0 -1
- package/es/animate/easing.d.ts +0 -49
- package/es/animate/easing.js +0 -134
- package/es/animate/easing.js.map +0 -1
- package/es/animate/group-fade.d.ts +0 -16
- package/es/animate/group-fade.js +0 -56
- package/es/animate/group-fade.js.map +0 -1
- package/es/animate/index.d.ts +0 -8
- package/es/animate/index.js +0 -16
- package/es/animate/index.js.map +0 -1
- package/es/animate/morphing.d.ts +0 -52
- package/es/animate/morphing.js +0 -295
- package/es/animate/morphing.js.map +0 -1
- package/es/animate/timeline.d.ts +0 -17
- package/es/animate/timeline.js +0 -42
- package/es/animate/timeline.js.map +0 -1
- package/es/plugins/builtin-plugin/richtext-edit-plugin-old.d.ts +0 -1
- package/es/plugins/builtin-plugin/richtext-edit-plugin-old.js +0 -3
- package/es/plugins/builtin-plugin/richtext-edit-plugin-old.js.map +0 -1
package/es/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,WAAW,CAAC;AAEnB,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,2CAA2C,CAAC;AAC1D,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,WAAW,CAAC;AAEnB,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,2CAA2C,CAAC;AAC1D,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,0BAA0B,CAAC;AACzC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAG1B,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAE9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,eAAe,CAAC;AAC9B,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,qBAAqB,CAAC;AACpC,cAAc,+CAA+C,CAAC;AAC9D,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;AAE/C,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACxD,cAAc,cAAc,CAAC;AAC7B,cAAc,yBAAyB,CAAC;AACxC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAE5B,cAAc,0CAA0C,CAAC;AACzD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,8CAA8C,CAAC;AAC7D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,4CAA4C,CAAC;AAC3D,cAAc,+CAA+C,CAAC;AAC9D,cAAc,4CAA4C,CAAC;AAC3D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,4CAA4C,CAAC;AAC3D,cAAc,gDAAgD,CAAC;AAE/D,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC;AACzC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8BAA8B,CAAC;AAG7C,cAAc,gDAAgD,CAAC;AAC/D,cAAc,iDAAiD,CAAC;AAChE,cAAc,kDAAkD,CAAC;AACjE,cAAc,6CAA6C,CAAC;AAE5D,cAAc,sCAAsC,CAAC","file":"index.js","sourcesContent":["// import 'core-js/proposals/reflect-metadata';\nimport './modules';\n\nexport * from './container';\nexport * from './core/global';\nexport * from './graphic';\nexport * from './modules';\nexport * from './create';\nexport * from './event';\nexport * from './interface';\nexport * from './render';\nexport * from './render/contributions/render/base-render';\nexport * from './canvas';\nexport * from './core';\nexport * from './core/light';\nexport * from './core/camera';\nexport * from './picker';\nexport * from './resource-loader/loader';\nexport * from './color-string';\nexport * from './factory';\n\n/* export common */\nexport * from './common/text';\nexport * from './common/bezier-utils';\nexport * from './common/bounds-context';\nexport * from './common/seg-context';\nexport * from './common/custom-path2d';\nexport * from './common/segment';\nexport * from './common/canvas-utils';\nexport * from './common/contribution-provider';\nexport * from './common/generator';\nexport * from './common/utils';\nexport * from './common/shape/arc';\nexport * from './common/shape/rect';\nexport * from './common/matrix';\nexport * from './common/simplify';\nexport * from './common/diff';\n\nexport * from './common/path-svg';\nexport * from './common/render-curve';\nexport * from './common/render-area';\nexport * from './common/render-command-list';\nexport * from './common/sort';\nexport * from './common/morphing-utils';\nexport * from './common/split-path';\nexport * from './common/enums';\nexport * from './common/generator';\nexport * from './common/performance-raf';\nexport * from './common/event-transformer';\nexport * from './plugins/constants';\nexport * from './plugins/builtin-plugin/richtext-edit-plugin';\nexport * from './allocator/matrix-allocate';\nexport * from './allocator/canvas-allocate';\nexport * from './allocator/graphic-allocate';\nexport * from './common/contribution-provider';\n\nexport { wrapCanvas, wrapContext } from './canvas/util';\nexport * from './common/xml';\nexport * from './common/inversify-lite';\nexport * from './constants';\nexport * from './application';\nexport * from './env-check';\n\nexport * from './render/contributions/render/arc-module';\nexport * from './render/contributions/render/rect-module';\nexport * from './render/contributions/render/line-module';\nexport * from './render/contributions/render/area-module';\nexport * from './render/contributions/render/symbol-module';\nexport * from './render/contributions/render/circle-module';\nexport * from './render/contributions/render/text-module';\nexport * from './render/contributions/render/path-module';\nexport * from './render/contributions/render/polygon-module';\nexport * from './render/contributions/render/star-module';\nexport * from './render/contributions/render/glyph-module';\nexport * from './render/contributions/render/richtext-module';\nexport * from './render/contributions/render/image-module';\nexport * from './render/contributions/render/rect3d-module';\nexport * from './render/contributions/render/arc3d-module';\nexport * from './render/contributions/render/pyramid3d-module';\n\nexport * from './register/register-arc';\nexport * from './register/register-arc3d';\nexport * from './register/register-area';\nexport * from './register/register-circle';\nexport * from './register/register-glyph';\nexport * from './register/register-group';\nexport * from './register/register-image';\nexport * from './register/register-line';\nexport * from './register/register-path';\nexport * from './register/register-polygon';\nexport * from './register/register-star';\nexport * from './register/register-pyramid3d';\nexport * from './register/register-rect';\nexport * from './register/register-rect3d';\nexport * from './register/register-richtext';\nexport * from './register/register-symbol';\nexport * from './register/register-text';\nexport * from './register/register-shadowRoot';\nexport * from './register/register-wraptext';\n\n// plugin\nexport * from './plugins/builtin-plugin/html-attribute-plugin';\nexport * from './plugins/builtin-plugin/react-attribute-plugin';\nexport * from './plugins/builtin-plugin/3dview-transform-plugin';\nexport * from './plugins/builtin-plugin/flex-layout-plugin';\n\nexport * from './plugins/builtin-plugin/edit-module';\n\n// export const morphPath = {};\n// export const multiToOneMorph = {};\n// export const oneToMultiMorph = {};\n// export class ACustomAnimate {}\n// export const AnimateGroup = {};\n// export const Animate = {};\n// export const defaultTicker = {};\n"]}
|
|
@@ -1,160 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import type { AnimateMode, AnimateStatus, AnimateStepType } from '../common/enums';
|
|
3
|
-
import type { Releaseable } from './common';
|
|
4
|
-
import type { IGraphic } from './graphic';
|
|
5
|
-
export interface Timeline {
|
|
6
|
-
AnimateList: IAnimate[];
|
|
7
|
-
}
|
|
8
|
-
export type EasingTypeStr = 'linear' | 'quadIn' | 'quadOut' | 'quadInOut' | 'quadInOut' | 'cubicIn' | 'cubicOut' | 'cubicInOut' | 'quartIn' | 'quartOut' | 'quartInOut' | 'quintIn' | 'quintOut' | 'quintInOut' | 'backIn' | 'backOut' | 'backInOut' | 'circIn' | 'circOut' | 'circInOut' | 'bounceOut' | 'bounceIn' | 'bounceInOut' | 'elasticIn' | 'elasticOut' | 'elasticInOut' | 'sineIn' | 'sineOut' | 'sineInOut' | 'expoIn' | 'expoOut' | 'expoInOut' | 'easeInOutQuad' | 'easeOutElastic' | 'easeInOutElastic' | '';
|
|
9
|
-
export type EasingTypeFunc = (t: number) => number;
|
|
10
|
-
export type EasingType = EasingTypeStr | EasingTypeFunc;
|
|
11
|
-
export type IAnimateStepType = keyof typeof AnimateStepType;
|
|
12
|
-
export interface IStep {
|
|
13
|
-
type: IAnimateStepType;
|
|
14
|
-
prev?: IStep;
|
|
15
|
-
duration: number;
|
|
16
|
-
position: number;
|
|
17
|
-
next?: IStep;
|
|
18
|
-
props?: any;
|
|
19
|
-
parsedProps?: any;
|
|
20
|
-
propKeys?: string[];
|
|
21
|
-
easing?: EasingTypeFunc;
|
|
22
|
-
customAnimate?: ICustomAnimate;
|
|
23
|
-
append: (step: IStep) => void;
|
|
24
|
-
getLastProps: () => any;
|
|
25
|
-
}
|
|
26
|
-
export interface IStepConfig {
|
|
27
|
-
tempProps?: boolean;
|
|
28
|
-
noPreventAttrs?: boolean;
|
|
29
|
-
}
|
|
30
|
-
export interface IAnimateTarget {
|
|
31
|
-
onAnimateBind?: (animte: IAnimate | ISubAnimate) => void;
|
|
32
|
-
onAddStep?: (step: IStep) => void;
|
|
33
|
-
onStep: (subAnimate: ISubAnimate, animate: IAnimate, step: IStep, ratio: number, end: boolean) => void;
|
|
34
|
-
stepInterpolate: (subAnimate: ISubAnimate, animate: IAnimate, nextAttributes: Record<string, any>, step: IStep, ratio: number, end: boolean, nextProps: Record<string, any>, lastProps?: Record<string, any>, nextParsedProps?: any, propKeys?: string[]) => void;
|
|
35
|
-
getComputedAttribute: (name: string) => any;
|
|
36
|
-
getDefaultAttribute: (name: string) => any;
|
|
37
|
-
onStop: (props?: Record<string, any>) => void;
|
|
38
|
-
animates: Map<string | number, IAnimate>;
|
|
39
|
-
[key: string]: any;
|
|
40
|
-
}
|
|
41
|
-
export interface ICustomAnimate {
|
|
42
|
-
duration: number;
|
|
43
|
-
easing: EasingType;
|
|
44
|
-
step?: IStep;
|
|
45
|
-
mode?: AnimateMode;
|
|
46
|
-
bind: (target: IAnimateTarget, subAni: ISubAnimate) => void;
|
|
47
|
-
onBind: () => void;
|
|
48
|
-
onFirstRun: () => void;
|
|
49
|
-
onStart: () => void;
|
|
50
|
-
onEnd: () => void;
|
|
51
|
-
onUpdate: (end: boolean, ratio: number, out: Record<string, any>) => void;
|
|
52
|
-
update: (end: boolean, ratio: number, out: Record<string, any>) => void;
|
|
53
|
-
getEndProps: () => Record<string, any> | void;
|
|
54
|
-
getFromProps: () => Record<string, any> | void;
|
|
55
|
-
getMergedEndProps: () => Record<string, any> | void;
|
|
56
|
-
}
|
|
57
|
-
export interface IAnimate {
|
|
58
|
-
readonly id: string | number;
|
|
59
|
-
status: AnimateStatus;
|
|
60
|
-
interpolateFunc: (key: string, ratio: number, from: any, to: any, nextAttributes: any) => boolean;
|
|
61
|
-
_onStart?: (() => void)[];
|
|
62
|
-
_onFrame?: ((step: IStep, ratio: number) => void)[];
|
|
63
|
-
_onEnd?: (() => void)[];
|
|
64
|
-
_onRemove?: (() => void)[];
|
|
65
|
-
getStartProps: () => Record<string, any>;
|
|
66
|
-
getEndProps: () => Record<string, any>;
|
|
67
|
-
setTimeline: (timeline: ITimeline) => void;
|
|
68
|
-
readonly timeline: ITimeline;
|
|
69
|
-
bind: (target: IAnimateTarget) => this;
|
|
70
|
-
to: (props: Record<string, any>, duration: number, easing: EasingType, params?: IStepConfig) => this;
|
|
71
|
-
from: (props: Record<string, any>, duration: number, easing: EasingType, params?: IStepConfig) => this;
|
|
72
|
-
pause: () => void;
|
|
73
|
-
resume: () => void;
|
|
74
|
-
onStart: (cb: () => void) => void;
|
|
75
|
-
onEnd: (cb: () => void) => void;
|
|
76
|
-
onFrame: (cb: (step: IStep, ratio: number) => void) => void;
|
|
77
|
-
preventAttr: (key: string) => void;
|
|
78
|
-
preventAttrs: (key: string[]) => void;
|
|
79
|
-
validAttr: (key: string) => boolean;
|
|
80
|
-
runCb: (cb: (a: IAnimate, step: IStep) => void) => IAnimate;
|
|
81
|
-
customInterpolate: (key: string, ratio: number, from: any, to: any, target: IAnimateTarget, ret: Record<string, any>) => boolean;
|
|
82
|
-
play: (customAnimate: ICustomAnimate) => this;
|
|
83
|
-
stop: (type?: 'start' | 'end' | Record<string, any>) => void;
|
|
84
|
-
release: () => void;
|
|
85
|
-
getDuration: () => number;
|
|
86
|
-
getStartTime: () => number;
|
|
87
|
-
wait: (delay: number) => this;
|
|
88
|
-
afterAll: (list: IAnimate[]) => this;
|
|
89
|
-
after: (animate: IAnimate) => this;
|
|
90
|
-
parallel: (animate: IAnimate) => this;
|
|
91
|
-
reversed: (r: boolean) => IAnimate;
|
|
92
|
-
loop: (n: number) => IAnimate;
|
|
93
|
-
bounce: (b: boolean) => IAnimate;
|
|
94
|
-
nextAnimate?: IAnimate;
|
|
95
|
-
prevAnimate?: IAnimate;
|
|
96
|
-
advance: (delta: number) => void;
|
|
97
|
-
startAt: (t: number) => IAnimate;
|
|
98
|
-
}
|
|
99
|
-
export interface ISubAnimate {
|
|
100
|
-
getLastStep: () => IStep;
|
|
101
|
-
animate: IAnimate;
|
|
102
|
-
getLastPropByName: (name: string, step: IStep) => any;
|
|
103
|
-
}
|
|
104
|
-
export interface BaseAnimateConfig {
|
|
105
|
-
id?: number | string;
|
|
106
|
-
interpolate?: (key: string, ratio: number, from: any, to: any, nextAttributes: any) => boolean;
|
|
107
|
-
onStart?: () => void;
|
|
108
|
-
onFrame?: (step: IStep, ratio: number) => void;
|
|
109
|
-
onEnd?: () => void;
|
|
110
|
-
onRemove?: () => void;
|
|
111
|
-
}
|
|
112
|
-
export interface MorphingAnimateConfig extends Omit<BaseAnimateConfig, 'interpolate'> {
|
|
113
|
-
duration?: number;
|
|
114
|
-
easing?: EasingType;
|
|
115
|
-
delay?: number;
|
|
116
|
-
}
|
|
117
|
-
export interface MultiMorphingAnimateConfig extends MorphingAnimateConfig {
|
|
118
|
-
splitPath?: 'clone' | ((graphic: IGraphic, count: number, needAppend?: boolean) => IGraphic[]);
|
|
119
|
-
individualDelay?: (index: number, count: number, fromGraphic: IGraphic, toGraphic: IGraphic) => number;
|
|
120
|
-
}
|
|
121
|
-
export interface ITimeline {
|
|
122
|
-
id: number;
|
|
123
|
-
animateCount: number;
|
|
124
|
-
addAnimate: (animate: IAnimate) => void;
|
|
125
|
-
removeAnimate: (animate: IAnimate, release?: boolean) => void;
|
|
126
|
-
tick: (delta: number) => void;
|
|
127
|
-
clear: () => void;
|
|
128
|
-
pause: () => void;
|
|
129
|
-
resume: () => void;
|
|
130
|
-
}
|
|
131
|
-
export interface ITickHandler extends Releaseable {
|
|
132
|
-
avaliable: () => boolean;
|
|
133
|
-
tick: (interval: number, cb: (handler: ITickHandler) => void) => void;
|
|
134
|
-
tickTo?: (t: number, cb: (handler: ITickHandler, params?: {
|
|
135
|
-
once: boolean;
|
|
136
|
-
}) => void) => void;
|
|
137
|
-
getTime: () => number;
|
|
138
|
-
}
|
|
139
|
-
export interface ITickerHandlerStatic {
|
|
140
|
-
Avaliable: () => boolean;
|
|
141
|
-
new (): ITickHandler;
|
|
142
|
-
}
|
|
143
|
-
export interface ITicker extends EventEmitter {
|
|
144
|
-
setFPS?: (fps: number) => void;
|
|
145
|
-
setInterval?: (interval: number) => void;
|
|
146
|
-
getFPS?: () => number;
|
|
147
|
-
getInterval?: () => number;
|
|
148
|
-
tick: (interval: number) => void;
|
|
149
|
-
tickAt?: (time: number) => void;
|
|
150
|
-
pause: () => boolean;
|
|
151
|
-
resume: () => boolean;
|
|
152
|
-
start: (force?: boolean) => boolean;
|
|
153
|
-
stop: () => void;
|
|
154
|
-
addTimeline: (timeline: ITimeline) => void;
|
|
155
|
-
remTimeline: (timeline: ITimeline) => void;
|
|
156
|
-
trySyncTickStatus: () => void;
|
|
157
|
-
getTimelines: () => ITimeline[];
|
|
158
|
-
release: () => void;
|
|
159
|
-
autoStop: boolean;
|
|
160
|
-
}
|
|
1
|
+
|
package/es/interface/animate.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/interface/animate.ts"],"names":[],"mappings":"","file":"animate.js","sourcesContent":["import type { EventEmitter } from '@visactor/vutils';\nimport type { AnimateMode, AnimateStatus, AnimateStepType } from '../common/enums';\nimport type { Releaseable } from './common';\nimport type { IGraphic } from './graphic';\n\n// export type EasingType = (...args: any) => any;\n\n// export declare class Easing {\n// static linear(t: number): number;\n// static none(): typeof Easing.linear;\n// /**\n// * 获取缓动函数,amount指示这个缓动函数的插值方式\n// * @param amount\n// * @returns\n// */\n// static get(amount: number): (t: number) => number;\n// static getPowIn(pow: number): (t: number) => number;\n// static getPowOut(pow: number): (t: number) => number;\n// static getPowInOut(pow: number): (t: number) => number;\n// static quadIn: (t: number) => number;\n// static quadOut: (t: number) => number;\n// static quadInOut: (t: number) => number;\n// static cubicIn: (t: number) => number;\n// static cubicOut: (t: number) => number;\n// static cubicInOut: (t: number) => number;\n// static quartIn: (t: number) => number;\n// static quartOut: (t: number) => number;\n// static quartInOut: (t: number) => number;\n// static quintIn: (t: number) => number;\n// static quintOut: (t: number) => number;\n// static quintInOut: (t: number) => number;\n// static getBackIn(amount: number): (t: number) => number;\n// static getBackOut(amount: number): (t: number) => number;\n// static getBackInOut(amount: number): (t: number) => number;\n// static backIn: (t: number) => number;\n// static backOut: (t: number) => number;\n// static backInOut: (t: number) => number;\n// static circIn(t: number): number;\n// static circOut(t: number): number;\n// static circInOut(t: number): number;\n// static bounceOut(t: number): number;\n// static bounceIn(t: number): number;\n// static bounceInOut(t: number): number;\n// static getElasticIn(amplitude: number, period: number): (t: number) => number;\n// static getElasticOut(amplitude: number, period: number): (t: number) => number;\n// static getElasticInOut(amplitude: number, period: number): (t: number) => number;\n// static elasticIn: (t: number) => number;\n// static elasticOut: (t: number) => number;\n// static elasticInOut: (t: number) => number;\n// }\n\n// timeline管理一堆的animate,多个timeline互不影响\n// timeline主要作用是基于layer层面的整体管理\n// 每个layer默认带有一个timeline\nexport interface Timeline {\n AnimateList: IAnimate[];\n}\n\ntype IStopType = 'end' | 'start' | 'current';\n\n// TODO: 提供options配置可序列化\ninterface AnimateSpecItem {\n type: 'to' | 'delay' | 'stop' | 'any';\n params: any[];\n}\n\nexport type EasingTypeStr =\n | 'linear'\n | 'quadIn'\n | 'quadOut'\n | 'quadInOut'\n | 'quadInOut'\n | 'cubicIn'\n | 'cubicOut'\n | 'cubicInOut'\n | 'quartIn'\n | 'quartOut'\n | 'quartInOut'\n | 'quintIn'\n | 'quintOut'\n | 'quintInOut'\n | 'backIn'\n | 'backOut'\n | 'backInOut'\n | 'circIn'\n | 'circOut'\n | 'circInOut'\n | 'bounceOut'\n | 'bounceIn'\n | 'bounceInOut'\n | 'elasticIn'\n | 'elasticOut'\n | 'elasticInOut'\n | 'sineIn'\n | 'sineOut'\n | 'sineInOut'\n | 'expoIn'\n | 'expoOut'\n | 'expoInOut'\n // @since 0.21.0\n | 'easeInOutQuad'\n | 'easeOutElastic'\n | 'easeInOutElastic'\n | '';\nexport type EasingTypeFunc = (t: number) => number;\n\nexport type EasingType = EasingTypeStr | EasingTypeFunc;\n\nexport type IAnimateStepType = keyof typeof AnimateStepType;\n\nexport interface IStep {\n type: IAnimateStepType;\n prev?: IStep;\n // 持续时间\n duration: number;\n // 在animate中的位置\n position: number;\n next?: IStep;\n props?: any;\n parsedProps?: any;\n propKeys?: string[];\n easing?: EasingTypeFunc;\n customAnimate?: ICustomAnimate;\n\n append: (step: IStep) => void;\n getLastProps: () => any;\n}\n\nexport interface IStepConfig {\n tempProps?: boolean; // props为临时props,可以直接使用不用拷贝\n noPreventAttrs?: boolean;\n}\n\nexport interface IAnimateTarget {\n onAnimateBind?: (animte: IAnimate | ISubAnimate) => void;\n // 添加动画step的时候调用\n onAddStep?: (step: IStep) => void;\n // step时调用\n onStep: (subAnimate: ISubAnimate, animate: IAnimate, step: IStep, ratio: number, end: boolean) => void;\n // 插值函数\n stepInterpolate: (\n subAnimate: ISubAnimate,\n animate: IAnimate,\n nextAttributes: Record<string, any>,\n step: IStep,\n ratio: number,\n end: boolean,\n nextProps: Record<string, any>,\n lastProps?: Record<string, any>,\n nextParsedProps?: any,\n propKeys?: string[]\n ) => void;\n // 获取属性\n getComputedAttribute: (name: string) => any;\n // 获取默认属性\n getDefaultAttribute: (name: string) => any;\n onStop: (props?: Record<string, any>) => void;\n animates: Map<string | number, IAnimate>;\n [key: string]: any;\n}\n\nexport interface ICustomAnimate {\n duration: number;\n easing: EasingType;\n step?: IStep;\n mode?: AnimateMode;\n\n bind: (target: IAnimateTarget, subAni: ISubAnimate) => void;\n // 在第一次调用的时候触发\n onBind: () => void;\n // 第一次执行的时候调用\n onFirstRun: () => void;\n // 开始执行的时候调用(如果有循环,那每个周期都会调用)\n onStart: () => void;\n // 结束执行的时候调用(如果有循环,那每个周期都会调用)\n onEnd: () => void;\n onUpdate: (end: boolean, ratio: number, out: Record<string, any>) => void;\n update: (end: boolean, ratio: number, out: Record<string, any>) => void;\n getEndProps: () => Record<string, any> | void;\n getFromProps: () => Record<string, any> | void;\n getMergedEndProps: () => Record<string, any> | void;\n}\n\n// 每一个animate绑定一个graphic,用于描述这个graphic的动画内容\n// 在timeline层面,animate相当于是一段timeslice\nexport interface IAnimate {\n readonly id: string | number;\n status: AnimateStatus;\n\n interpolateFunc: (key: string, ratio: number, from: any, to: any, nextAttributes: any) => boolean;\n\n _onStart?: (() => void)[];\n _onFrame?: ((step: IStep, ratio: number) => void)[];\n _onEnd?: (() => void)[];\n _onRemove?: (() => void)[];\n\n getStartProps: () => Record<string, any>;\n getEndProps: () => Record<string, any>;\n\n setTimeline: (timeline: ITimeline) => void;\n // getTimeline: () => ITimeline;\n readonly timeline: ITimeline;\n\n bind: (target: IAnimateTarget) => this;\n to: (props: Record<string, any>, duration: number, easing: EasingType, params?: IStepConfig) => this;\n from: (props: Record<string, any>, duration: number, easing: EasingType, params?: IStepConfig) => this;\n pause: () => void;\n resume: () => void;\n onStart: (cb: () => void) => void;\n onEnd: (cb: () => void) => void;\n onFrame: (cb: (step: IStep, ratio: number) => void) => void;\n // 屏蔽属性\n preventAttr: (key: string) => void;\n // 屏蔽属性\n preventAttrs: (key: string[]) => void;\n // 属性是否合法\n validAttr: (key: string) => boolean;\n\n runCb: (cb: (a: IAnimate, step: IStep) => void) => IAnimate;\n\n // 自定义插值,返回false表示没有匹配上\n customInterpolate: (\n key: string,\n ratio: number,\n from: any,\n to: any,\n target: IAnimateTarget,\n ret: Record<string, any>\n ) => boolean;\n //\n play: (customAnimate: ICustomAnimate) => this;\n\n // 获取该属性的上一个值\n // getLastPropByName: (name: string, step: IStep) => any;\n // delay: (duration: number) => IAnimate;\n stop: (type?: 'start' | 'end' | Record<string, any>) => void;\n /** 打上END标志,下一帧被删除 */\n release: () => void;\n // 获取持续的时长\n getDuration: () => number;\n // 获取动画开始时间(注意并不是子动画的startAt)\n getStartTime: () => number;\n // done: (cb: (_: any) => any) => IAnimate;\n // pause: () => IAnimate;\n // spec: (spec: AnimateSpecItem[]) => IAnimate;\n // start: () => void; // 有start方法,避免动画提前开始(VGrammar需要时间处理数据)\n wait: (delay: number) => this;\n\n // // 编排\n afterAll: (list: IAnimate[]) => this;\n after: (animate: IAnimate) => this;\n parallel: (animate: IAnimate) => this;\n\n // // timislice (getter)\n // startTime: number;\n // endTime: number;\n // startTimes: number[];\n // endTimes: number[];\n\n // // 高级参数,frame到frameEnd之间可以进行reverse,loop,bounce效果\n // frame: () => IAnimate;\n // frameEnd: () => IAnimate;\n reversed: (r: boolean) => IAnimate;\n loop: (n: number) => IAnimate;\n bounce: (b: boolean) => IAnimate;\n\n nextAnimate?: IAnimate;\n prevAnimate?: IAnimate;\n\n advance: (delta: number) => void;\n\n startAt: (t: number) => IAnimate;\n\n // // 语法糖\n // create: (duration: number) => IAnimate;\n // fadeIn: (duration: number) => IAnimate;\n}\n\nexport interface ISubAnimate {\n getLastStep: () => IStep;\n animate: IAnimate;\n // 获取该属性的上一个值\n getLastPropByName: (name: string, step: IStep) => any;\n}\n\n// rect.animate().abc().to({}, 1000).delay(1000).frame().to().delay().to().frameEnd().loop().bounce()\n\nexport interface BaseAnimateConfig {\n id?: number | string;\n interpolate?: (key: string, ratio: number, from: any, to: any, nextAttributes: any) => boolean;\n onStart?: () => void;\n onFrame?: (step: IStep, ratio: number) => void;\n onEnd?: () => void;\n onRemove?: () => void;\n}\n\n// VGrammar和 vrender命名不一致,好尴尬\nexport interface MorphingAnimateConfig extends Omit<BaseAnimateConfig, 'interpolate'> {\n duration?: number;\n easing?: EasingType; // 统一到easing\n delay?: number;\n}\n\nexport interface MultiMorphingAnimateConfig extends MorphingAnimateConfig {\n splitPath?: 'clone' | ((graphic: IGraphic, count: number, needAppend?: boolean) => IGraphic[]);\n individualDelay?: (index: number, count: number, fromGraphic: IGraphic, toGraphic: IGraphic) => number;\n}\n\nexport interface ITimeline {\n id: number;\n animateCount: number;\n addAnimate: (animate: IAnimate) => void;\n removeAnimate: (animate: IAnimate, release?: boolean) => void;\n tick: (delta: number) => void;\n clear: () => void;\n pause: () => void;\n resume: () => void;\n}\n\nexport interface ITickHandler extends Releaseable {\n avaliable: () => boolean;\n /**\n * 开始执行tick\n * @param interval 延时 ms\n * @param cb 执行的回调\n */\n tick: (interval: number, cb: (handler: ITickHandler) => void) => void; // 开始\n tickTo?: (t: number, cb: (handler: ITickHandler, params?: { once: boolean }) => void) => void;\n getTime: () => number; // 获取时间\n}\n\nexport interface ITickerHandlerStatic {\n Avaliable: () => boolean;\n new (): ITickHandler;\n}\n\nexport interface ITicker extends EventEmitter {\n setFPS?: (fps: number) => void;\n setInterval?: (interval: number) => void;\n getFPS?: () => number;\n getInterval?: () => number;\n tick: (interval: number) => void;\n tickAt?: (time: number) => void;\n pause: () => boolean;\n resume: () => boolean;\n /**\n * 开启tick,force为true强制开启,否则如果timeline为空则不开启\n */\n start: (force?: boolean) => boolean;\n stop: () => void;\n addTimeline: (timeline: ITimeline) => void;\n remTimeline: (timeline: ITimeline) => void;\n trySyncTickStatus: () => void;\n getTimelines: () => ITimeline[];\n\n release: () => void;\n\n // 是否自动停止,默认为true\n autoStop: boolean;\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/interface/animate.ts"],"names":[],"mappings":"","file":"animate.js","sourcesContent":["// import type { EventEmitter } from '@visactor/vutils';\n// import type { AnimateStepType } from '../common/enums';\n// import type { Releaseable } from './common';\n// import type { IGraphic } from './graphic';\n\n// enum AnimateStatus {\n// INITIAL = 0,\n// RUNNING = 1,\n// PAUSED = 2,\n// END = 3\n// }\n\n// enum AnimateMode {\n// NORMAL = 0b0000,\n// SET_ATTR_IMMEDIATELY = 0b0001\n// }\n\n// // export type EasingType = (...args: any) => any;\n\n// // export declare class Easing {\n// // static linear(t: number): number;\n// // static none(): typeof Easing.linear;\n// // /**\n// // * 获取缓动函数,amount指示这个缓动函数的插值方式\n// // * @param amount\n// // * @returns\n// // */\n// // static get(amount: number): (t: number) => number;\n// // static getPowIn(pow: number): (t: number) => number;\n// // static getPowOut(pow: number): (t: number) => number;\n// // static getPowInOut(pow: number): (t: number) => number;\n// // static quadIn: (t: number) => number;\n// // static quadOut: (t: number) => number;\n// // static quadInOut: (t: number) => number;\n// // static cubicIn: (t: number) => number;\n// // static cubicOut: (t: number) => number;\n// // static cubicInOut: (t: number) => number;\n// // static quartIn: (t: number) => number;\n// // static quartOut: (t: number) => number;\n// // static quartInOut: (t: number) => number;\n// // static quintIn: (t: number) => number;\n// // static quintOut: (t: number) => number;\n// // static quintInOut: (t: number) => number;\n// // static getBackIn(amount: number): (t: number) => number;\n// // static getBackOut(amount: number): (t: number) => number;\n// // static getBackInOut(amount: number): (t: number) => number;\n// // static backIn: (t: number) => number;\n// // static backOut: (t: number) => number;\n// // static backInOut: (t: number) => number;\n// // static circIn(t: number): number;\n// // static circOut(t: number): number;\n// // static circInOut(t: number): number;\n// // static bounceOut(t: number): number;\n// // static bounceIn(t: number): number;\n// // static bounceInOut(t: number): number;\n// // static getElasticIn(amplitude: number, period: number): (t: number) => number;\n// // static getElasticOut(amplitude: number, period: number): (t: number) => number;\n// // static getElasticInOut(amplitude: number, period: number): (t: number) => number;\n// // static elasticIn: (t: number) => number;\n// // static elasticOut: (t: number) => number;\n// // static elasticInOut: (t: number) => number;\n// // }\n\n// // timeline管理一堆的animate,多个timeline互不影响\n// // timeline主要作用是基于layer层面的整体管理\n// // 每个layer默认带有一个timeline\n// export interface Timeline {\n// AnimateList: IAnimate[];\n// }\n\n// type IStopType = 'end' | 'start' | 'current';\n\n// // TODO: 提供options配置可序列化\n// interface AnimateSpecItem {\n// type: 'to' | 'delay' | 'stop' | 'any';\n// params: any[];\n// }\n\n// export type EasingTypeStr =\n// | 'linear'\n// | 'quadIn'\n// | 'quadOut'\n// | 'quadInOut'\n// | 'quadInOut'\n// | 'cubicIn'\n// | 'cubicOut'\n// | 'cubicInOut'\n// | 'quartIn'\n// | 'quartOut'\n// | 'quartInOut'\n// | 'quintIn'\n// | 'quintOut'\n// | 'quintInOut'\n// | 'backIn'\n// | 'backOut'\n// | 'backInOut'\n// | 'circIn'\n// | 'circOut'\n// | 'circInOut'\n// | 'bounceOut'\n// | 'bounceIn'\n// | 'bounceInOut'\n// | 'elasticIn'\n// | 'elasticOut'\n// | 'elasticInOut'\n// | 'sineIn'\n// | 'sineOut'\n// | 'sineInOut'\n// | 'expoIn'\n// | 'expoOut'\n// | 'expoInOut'\n// // @since 0.21.0\n// | 'easeInOutQuad'\n// | 'easeOutElastic'\n// | 'easeInOutElastic'\n// | '';\n// export type EasingTypeFunc = (t: number) => number;\n\n// export type EasingType = EasingTypeStr | EasingTypeFunc;\n\n// export type IAnimateStepType = keyof typeof AnimateStepType;\n\n// export interface IStep {\n// type: IAnimateStepType;\n// prev?: IStep;\n// // 持续时间\n// duration: number;\n// // 在animate中的位置\n// position: number;\n// next?: IStep;\n// props?: any;\n// parsedProps?: any;\n// propKeys?: string[];\n// easing?: EasingTypeFunc;\n// customAnimate?: ICustomAnimate;\n\n// append: (step: IStep) => void;\n// getLastProps: () => any;\n// }\n\n// export interface IStepConfig {\n// tempProps?: boolean; // props为临时props,可以直接使用不用拷贝\n// noPreventAttrs?: boolean;\n// }\n\n// export interface IAnimateTarget {\n// onAnimateBind?: (animte: IAnimate | ISubAnimate) => void;\n// // 获取属性\n// getComputedAttribute: (name: string) => any;\n// // 获取默认属性\n// getDefaultAttribute: (name: string) => any;\n// onStop: (props?: Record<string, any>) => void;\n// animates: Map<string | number, IAnimate>;\n// [key: string]: any;\n// }\n\n// export interface ICustomAnimate {\n// duration: number;\n// easing: EasingType;\n// step?: IStep;\n// mode?: AnimateMode;\n\n// bind: (target: IAnimateTarget, subAni: ISubAnimate) => void;\n// // 在第一次调用的时候触发\n// onBind: () => void;\n// // 第一次执行的时候调用\n// onFirstRun: () => void;\n// // 开始执行的时候调用(如果有循环,那每个周期都会调用)\n// onStart: () => void;\n// // 结束执行的时候调用(如果有循环,那每个周期都会调用)\n// onEnd: () => void;\n// onUpdate: (end: boolean, ratio: number, out: Record<string, any>) => void;\n// update: (end: boolean, ratio: number, out: Record<string, any>) => void;\n// getEndProps: () => Record<string, any> | void;\n// getFromProps: () => Record<string, any> | void;\n// getMergedEndProps: () => Record<string, any> | void;\n// }\n\n// export type IAnimateConstructor = new (...args: any[]) => IAnimate;\n\n// // 每一个animate绑定一个graphic,用于描述这个graphic的动画内容\n// // 在timeline层面,animate相当于是一段timeslice\n// export interface IAnimate {\n// readonly id: string | number;\n// status: AnimateStatus;\n\n// interpolateFunc: (key: string, ratio: number, from: any, to: any, nextAttributes: any) => boolean;\n\n// _onStart?: (() => void)[];\n// _onFrame?: ((step: IStep, ratio: number) => void)[];\n// _onEnd?: (() => void)[];\n// _onRemove?: (() => void)[];\n\n// getStartProps: () => Record<string, any>;\n// getEndProps: () => Record<string, any>;\n\n// setTimeline: (timeline: ITimeline) => void;\n// // getTimeline: () => ITimeline;\n// readonly timeline: ITimeline;\n\n// bind: (target: IAnimateTarget) => this;\n// to: (props: Record<string, any>, duration: number, easing: EasingType, params?: IStepConfig) => this;\n// from: (props: Record<string, any>, duration: number, easing: EasingType, params?: IStepConfig) => this;\n// pause: () => void;\n// resume: () => void;\n// onStart: (cb: () => void) => void;\n// onEnd: (cb: () => void) => void;\n// onFrame: (cb: (step: IStep, ratio: number) => void) => void;\n// onRemove: (cb: () => void) => void;\n// // 屏蔽属性\n// preventAttr: (key: string) => void;\n// // 屏蔽属性\n// preventAttrs: (key: string[]) => void;\n// // 属性是否合法\n// validAttr: (key: string) => boolean;\n\n// runCb: (cb: (a: IAnimate, step: IStep) => void) => IAnimate;\n\n// // 自定义插值,返回false表示没有匹配上\n// customInterpolate: (\n// key: string,\n// ratio: number,\n// from: any,\n// to: any,\n// target: IAnimateTarget,\n// ret: Record<string, any>\n// ) => boolean;\n// //\n// play: (customAnimate: ICustomAnimate) => this;\n\n// // 获取该属性的上一个值\n// // getLastPropByName: (name: string, step: IStep) => any;\n// // delay: (duration: number) => IAnimate;\n// stop: (type?: 'start' | 'end' | Record<string, any>) => void;\n// /** 打上END标志,下一帧被删除 */\n// release: () => void;\n// // 获取持续的时长\n// getDuration: () => number;\n// // 获取动画开始时间(注意并不是子动画的startAt)\n// getStartTime: () => number;\n// // done: (cb: (_: any) => any) => IAnimate;\n// // pause: () => IAnimate;\n// // spec: (spec: AnimateSpecItem[]) => IAnimate;\n// // start: () => void; // 有start方法,避免动画提前开始(VGrammar需要时间处理数据)\n// wait: (delay: number) => this;\n\n// // // 编排\n// afterAll: (list: IAnimate[]) => this;\n// after: (animate: IAnimate) => this;\n// parallel: (animate: IAnimate) => this;\n\n// // // timislice (getter)\n// // startTime: number;\n// // endTime: number;\n// // startTimes: number[];\n// // endTimes: number[];\n\n// // // 高级参数,frame到frameEnd之间可以进行reverse,loop,bounce效果\n// // frame: () => IAnimate;\n// // frameEnd: () => IAnimate;\n// reversed: (r: boolean) => IAnimate;\n// loop: (n: number) => IAnimate;\n// bounce: (b: boolean) => IAnimate;\n\n// nextAnimate?: IAnimate;\n// prevAnimate?: IAnimate;\n\n// advance: (delta: number) => void;\n\n// startAt: (t: number) => IAnimate;\n\n// // // 语法糖\n// // create: (duration: number) => IAnimate;\n// // fadeIn: (duration: number) => IAnimate;\n// }\n\n// export interface ISubAnimate {\n// getLastStep: () => IStep;\n// animate: IAnimate;\n// // 获取该属性的上一个值\n// getLastPropByName: (name: string, step: IStep) => any;\n// }\n\n// // rect.animate().abc().to({}, 1000).delay(1000).frame().to().delay().to().frameEnd().loop().bounce()\n\n// export interface BaseAnimateConfig {\n// id?: number | string;\n// interpolate?: (key: string, ratio: number, from: any, to: any, nextAttributes: any) => boolean;\n// onStart?: () => void;\n// onFrame?: (step: IStep, ratio: number) => void;\n// onEnd?: () => void;\n// onRemove?: () => void;\n// }\n\n// // VGrammar和 vrender命名不一致,好尴尬\n// export interface MorphingAnimateConfig extends Omit<BaseAnimateConfig, 'interpolate'> {\n// duration?: number;\n// easing?: EasingType; // 统一到easing\n// delay?: number;\n// }\n\n// export interface MultiMorphingAnimateConfig extends MorphingAnimateConfig {\n// splitPath?: 'clone' | ((graphic: IGraphic, count: number, needAppend?: boolean) => IGraphic[]);\n// individualDelay?: (index: number, count: number, fromGraphic: IGraphic, toGraphic: IGraphic) => number;\n// }\n\n// export interface ITimeline {\n// id: number;\n// animateCount: number;\n// isGlobal: boolean;\n// addAnimate: (animate: IAnimate) => void;\n// removeAnimate: (animate: IAnimate, release?: boolean) => void;\n// tick: (delta: number) => void;\n// clear: () => void;\n// pause: () => void;\n// resume: () => void;\n// }\n\n// export type ITimelineConstructor = new (...args: any[]) => ITimeline;\n\n// export type ITickerConstructor = new (...args: any[]) => ITicker;\n\n// export interface ITickHandler extends Releaseable {\n// avaliable: () => boolean;\n// /**\n// * 开始执行tick\n// * @param interval 延时 ms\n// * @param cb 执行的回调\n// */\n// tick: (interval: number, cb: (handler: ITickHandler) => void) => void; // 开始\n// tickTo?: (t: number, cb: (handler: ITickHandler, params?: { once: boolean }) => void) => void;\n// getTime: () => number; // 获取时间\n// }\n\n// export interface ITickerHandlerStatic {\n// Avaliable: () => boolean;\n// new (): ITickHandler;\n// }\n\n// export interface ITicker extends EventEmitter {\n// setFPS?: (fps: number) => void;\n// setInterval?: (interval: number) => void;\n// getFPS?: () => number;\n// getInterval?: () => number;\n// tick: (interval: number) => void;\n// tickAt?: (time: number) => void;\n// pause: () => boolean;\n// resume: () => boolean;\n// /**\n// * 开启tick,force为true强制开启,否则如果timeline为空则不开启\n// */\n// start: (force?: boolean) => boolean;\n// stop: () => void;\n// addTimeline: (timeline: ITimeline) => void;\n// remTimeline: (timeline: ITimeline) => void;\n// trySyncTickStatus: () => void;\n// getTimelines: () => ITimeline[];\n\n// release: () => void;\n\n// // 是否自动停止,默认为true\n// autoStop: boolean;\n// }\n"]}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import type { IGraphic } from '../graphic';
|
|
2
|
+
import type { EasingType, EasingTypeFunc } from './easing';
|
|
3
|
+
import type { AnimateStatus, IAnimateStepType } from './type';
|
|
4
|
+
import type { ITimeline } from './timeline';
|
|
5
|
+
export interface ICustomAnimate extends IStep {
|
|
6
|
+
type: IAnimateStepType;
|
|
7
|
+
}
|
|
8
|
+
export interface IStep {
|
|
9
|
+
type: IAnimateStepType;
|
|
10
|
+
prev?: IStep;
|
|
11
|
+
duration: number;
|
|
12
|
+
next?: IStep;
|
|
13
|
+
props?: Record<string, any>;
|
|
14
|
+
fromParsedProps?: Record<string, any>;
|
|
15
|
+
toParsedProps?: Record<string, any>;
|
|
16
|
+
fromProps?: Record<string, any>;
|
|
17
|
+
propKeys?: string[];
|
|
18
|
+
easing?: EasingTypeFunc;
|
|
19
|
+
append: (step: IStep) => void;
|
|
20
|
+
getLastProps: () => any;
|
|
21
|
+
animate: IAnimate;
|
|
22
|
+
setDuration: (duration: number, updateDownstream?: boolean) => void;
|
|
23
|
+
getDuration: () => number;
|
|
24
|
+
determineInterpolateUpdateFunction: () => void;
|
|
25
|
+
setStartTime: (time: number, updateDownstream?: boolean) => void;
|
|
26
|
+
getStartTime: () => number;
|
|
27
|
+
bind: (target: IGraphic, animate: IAnimate) => void;
|
|
28
|
+
onBind: () => void;
|
|
29
|
+
onFirstRun: () => void;
|
|
30
|
+
onStart: () => void;
|
|
31
|
+
onEnd: (cb?: (animate: IAnimate, step: IStep) => void) => void;
|
|
32
|
+
update: (end: boolean, ratio: number, out: Record<string, any>) => void;
|
|
33
|
+
onUpdate: (end: boolean, ratio: number, out: Record<string, any>) => void;
|
|
34
|
+
getEndProps: () => Record<string, any> | void;
|
|
35
|
+
getFromProps: () => Record<string, any> | void;
|
|
36
|
+
getMergedEndProps: () => Record<string, any> | void;
|
|
37
|
+
deleteSelfAttr: (key: string) => void;
|
|
38
|
+
stop: () => void;
|
|
39
|
+
}
|
|
40
|
+
export interface IAnimate {
|
|
41
|
+
readonly id: string | number;
|
|
42
|
+
status: AnimateStatus;
|
|
43
|
+
target: IGraphic;
|
|
44
|
+
priority: number;
|
|
45
|
+
interpolateUpdateFunction: ((from: Record<string, any>, to: Record<string, any>, ratio: number, step: IStep, target: IGraphic) => void) | null;
|
|
46
|
+
_onStart?: (() => void)[];
|
|
47
|
+
_onFrame?: ((step: IStep, ratio: number) => void)[];
|
|
48
|
+
_onEnd?: (() => void)[];
|
|
49
|
+
_onRemove?: (() => void)[];
|
|
50
|
+
getStartProps: () => Record<string, any>;
|
|
51
|
+
getEndProps: () => Record<string, any>;
|
|
52
|
+
setTimeline: (timeline: ITimeline) => void;
|
|
53
|
+
getTimeline: () => ITimeline;
|
|
54
|
+
readonly timeline: ITimeline;
|
|
55
|
+
bind: (target: IGraphic) => this;
|
|
56
|
+
to: (props: Record<string, any>, duration: number, easing: EasingType) => this;
|
|
57
|
+
from: (props: Record<string, any>, duration: number, easing: EasingType) => this;
|
|
58
|
+
pause: () => void;
|
|
59
|
+
resume: () => void;
|
|
60
|
+
onStart: (cb?: () => void) => void;
|
|
61
|
+
onEnd: (cb?: () => void) => void;
|
|
62
|
+
onFrame: (cb: (step: IStep, ratio: number) => void) => void;
|
|
63
|
+
onRemove: (cb?: () => void) => void;
|
|
64
|
+
preventAttr: (key: string) => void;
|
|
65
|
+
preventAttrs: (key: string[]) => void;
|
|
66
|
+
validAttr: (key: string) => boolean;
|
|
67
|
+
runCb: (cb: (a: IAnimate, step: IStep) => void) => IAnimate;
|
|
68
|
+
customInterpolate: (key: string, ratio: number, from: any, to: any, target: IGraphic, ret: Record<string, any>) => boolean;
|
|
69
|
+
play: (customAnimate: ICustomAnimate) => this;
|
|
70
|
+
getFromValue: () => Record<string, any>;
|
|
71
|
+
getToValue: () => Record<string, any>;
|
|
72
|
+
stop: (type?: 'start' | 'end' | Record<string, any>) => void;
|
|
73
|
+
release: () => void;
|
|
74
|
+
getDuration: () => number;
|
|
75
|
+
getTotalDuration: () => number;
|
|
76
|
+
getStartTime: () => number;
|
|
77
|
+
wait: (delay: number) => this;
|
|
78
|
+
afterAll: (list: IAnimate[]) => this;
|
|
79
|
+
after: (animate: IAnimate) => this;
|
|
80
|
+
parallel: (animate: IAnimate) => this;
|
|
81
|
+
getLoop: () => number;
|
|
82
|
+
loop: (n: number | boolean) => IAnimate;
|
|
83
|
+
bounce: (b: boolean) => IAnimate;
|
|
84
|
+
advance: (delta: number) => void;
|
|
85
|
+
startAt: (t: number) => IAnimate;
|
|
86
|
+
reSyncProps: () => void;
|
|
87
|
+
updateDuration: () => void;
|
|
88
|
+
}
|
|
89
|
+
export declare enum AnimateMode {
|
|
90
|
+
NORMAL = 0,
|
|
91
|
+
SET_ATTR_IMMEDIATELY = 1
|
|
92
|
+
}
|
|
93
|
+
export interface IAnimateTarget {
|
|
94
|
+
onAnimateBind?: (animte: IAnimate) => void;
|
|
95
|
+
getComputedAttribute: (name: string) => any;
|
|
96
|
+
getDefaultAttribute: (name: string) => any;
|
|
97
|
+
onStop: (props?: Record<string, any>) => void;
|
|
98
|
+
animates: Map<string | number, IAnimate>;
|
|
99
|
+
[key: string]: any;
|
|
100
|
+
}
|
|
101
|
+
export interface BaseAnimateConfig {
|
|
102
|
+
id?: number | string;
|
|
103
|
+
interpolate?: (key: string, ratio: number, from: any, to: any, nextAttributes: any) => boolean;
|
|
104
|
+
onStart?: () => void;
|
|
105
|
+
onFrame?: (step: IStep, ratio: number) => void;
|
|
106
|
+
onEnd?: () => void;
|
|
107
|
+
onRemove?: () => void;
|
|
108
|
+
}
|
|
109
|
+
export interface MorphingAnimateConfig extends Omit<BaseAnimateConfig, 'interpolate'> {
|
|
110
|
+
duration?: number;
|
|
111
|
+
easing?: EasingType;
|
|
112
|
+
delay?: number;
|
|
113
|
+
}
|
|
114
|
+
export interface MultiMorphingAnimateConfig extends MorphingAnimateConfig {
|
|
115
|
+
splitPath?: 'clone' | ((graphic: IGraphic, count: number, needAppend?: boolean) => IGraphic[]);
|
|
116
|
+
individualDelay?: (index: number, count: number, fromGraphic: IGraphic, toGraphic: IGraphic) => number;
|
|
117
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/interface/animation/animate.ts"],"names":[],"mappings":"AAsKA,MAAM,CAAN,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,iDAAe,CAAA;IACf,6EAA6B,CAAA;AAC/B,CAAC,EAHW,WAAW,KAAX,WAAW,QAGtB","file":"animate.js","sourcesContent":["import type { IGraphic } from '../graphic';\nimport type { EasingType, EasingTypeFunc } from './easing';\nimport type { AnimateStatus, IAnimateStepType } from './type';\nimport type { ITimeline } from './timeline';\n\nexport interface ICustomAnimate extends IStep {\n type: IAnimateStepType;\n}\n\nexport interface IStep {\n type: IAnimateStepType;\n prev?: IStep;\n // 持续时间\n duration: number;\n // 链表,下一个\n next?: IStep;\n // 属性\n props?: Record<string, any>;\n // 解析后的属性(用于性能优化,避免每次tick都解析)\n fromParsedProps?: Record<string, any>;\n toParsedProps?: Record<string, any>;\n fromProps?: Record<string, any>;\n // 解析后的属性列表(用于性能优化,避免每次tick都解析)\n propKeys?: string[];\n // 缓动函数\n easing?: EasingTypeFunc;\n\n // 添加一个\n append: (step: IStep) => void;\n // 获取上一个props,用于完成这次的fromValue 和 toValue的插值\n getLastProps: () => any;\n\n animate: IAnimate;\n\n // 设置持续时间\n setDuration: (duration: number, updateDownstream?: boolean) => void;\n // 获取持续时间\n getDuration: () => number;\n // 确定插值更新函数(在开始的时候就确定,避免每次tick都解析)\n determineInterpolateUpdateFunction: () => void;\n\n // 设置开始时间\n setStartTime: (time: number, updateDownstream?: boolean) => void;\n // 获取开始时间\n getStartTime: () => number;\n\n bind: (target: IGraphic, animate: IAnimate) => void;\n // 在第一次绑定到Animate的时候触发\n onBind: () => void;\n // 第一次执行的时候调用\n onFirstRun: () => void;\n // 开始执行的时候调用(如果有循环,那每个周期都会调用)\n onStart: () => void;\n // 结束执行的时候调用(如果有循环,那每个周期都会调用)\n onEnd: (cb?: (animate: IAnimate, step: IStep) => void) => void;\n // 更新执行的时候调用(如果有循环,那每个周期都会调用)\n update: (end: boolean, ratio: number, out: Record<string, any>) => void;\n onUpdate: (end: boolean, ratio: number, out: Record<string, any>) => void;\n\n getEndProps: () => Record<string, any> | void;\n getFromProps: () => Record<string, any> | void;\n getMergedEndProps: () => Record<string, any> | void;\n\n // 屏蔽自身属性,会直接从props等内容里删除掉\n deleteSelfAttr: (key: string) => void;\n\n // 停止\n stop: () => void;\n}\n\nexport interface IAnimate {\n readonly id: string | number;\n status: AnimateStatus;\n target: IGraphic;\n priority: number;\n interpolateUpdateFunction:\n | ((from: Record<string, any>, to: Record<string, any>, ratio: number, step: IStep, target: IGraphic) => void)\n | null;\n\n _onStart?: (() => void)[];\n _onFrame?: ((step: IStep, ratio: number) => void)[];\n _onEnd?: (() => void)[];\n _onRemove?: (() => void)[];\n\n getStartProps: () => Record<string, any>;\n getEndProps: () => Record<string, any>;\n\n // 设置timeline\n setTimeline: (timeline: ITimeline) => void;\n // 获取timeline\n getTimeline: () => ITimeline;\n readonly timeline: ITimeline;\n\n bind: (target: IGraphic) => this;\n to: (props: Record<string, any>, duration: number, easing: EasingType) => this;\n from: (props: Record<string, any>, duration: number, easing: EasingType) => this;\n pause: () => void;\n resume: () => void;\n onStart: (cb?: () => void) => void;\n onEnd: (cb?: () => void) => void;\n onFrame: (cb: (step: IStep, ratio: number) => void) => void;\n onRemove: (cb?: () => void) => void;\n // 屏蔽属性\n preventAttr: (key: string) => void;\n // 屏蔽属性\n preventAttrs: (key: string[]) => void;\n // 属性是否合法\n validAttr: (key: string) => boolean;\n\n runCb: (cb: (a: IAnimate, step: IStep) => void) => IAnimate;\n\n // 自定义插值,返回false表示没有匹配上\n customInterpolate: (\n key: string,\n ratio: number,\n from: any,\n to: any,\n target: IGraphic,\n ret: Record<string, any>\n ) => boolean;\n play: (customAnimate: ICustomAnimate) => this;\n\n getFromValue: () => Record<string, any>;\n getToValue: () => Record<string, any>;\n // 停止,可以设置停止后设置target的属性为开始的值(fromValue),还是结束的值(toValue)\n stop: (type?: 'start' | 'end' | Record<string, any>) => void;\n /** 打上END标志,下一帧被删除 */\n release: () => void;\n // 获取持续的时长\n getDuration: () => number;\n getTotalDuration: () => number;\n // 获取动画开始时间(注意并不是子动画的startAt)\n getStartTime: () => number;\n // 等待delay\n wait: (delay: number) => this;\n\n /* 动画编排 */\n // 所有动画结束后执行\n afterAll: (list: IAnimate[]) => this;\n // 在某个动画结束后执行\n after: (animate: IAnimate) => this;\n // 并行执行\n parallel: (animate: IAnimate) => this;\n\n getLoop: () => number;\n\n // 反转动画\n // reversed: (r: boolean) => IAnimate;\n // 循环动画\n loop: (n: number | boolean) => IAnimate;\n // 反弹动画\n bounce: (b: boolean) => IAnimate;\n\n advance: (delta: number) => void;\n\n // 设置开始时间(startAt之前是完全不会进入动画生命周期的)\n // 它和wait不一样,如果调用的是wait,wait过程中还算是一个动画阶段,只是空的阶段,而startAt之前是完全不会进入动画生命周期的\n startAt: (t: number) => IAnimate;\n\n // 重新同步和计算props,用于内部某些step发生了变更后,重新计算自身\n reSyncProps: () => void;\n\n // 更新duration\n updateDuration: () => void;\n}\n\nexport enum AnimateMode {\n NORMAL = 0b0000,\n SET_ATTR_IMMEDIATELY = 0b0001\n}\n\nexport interface IAnimateTarget {\n onAnimateBind?: (animte: IAnimate) => void;\n // 获取属性\n getComputedAttribute: (name: string) => any;\n // 获取默认属性\n getDefaultAttribute: (name: string) => any;\n onStop: (props?: Record<string, any>) => void;\n animates: Map<string | number, IAnimate>;\n [key: string]: any;\n}\n\nexport interface BaseAnimateConfig {\n id?: number | string;\n interpolate?: (key: string, ratio: number, from: any, to: any, nextAttributes: any) => boolean;\n onStart?: () => void;\n onFrame?: (step: IStep, ratio: number) => void;\n onEnd?: () => void;\n onRemove?: () => void;\n}\n\nexport interface MorphingAnimateConfig extends Omit<BaseAnimateConfig, 'interpolate'> {\n duration?: number;\n easing?: EasingType; // 统一到easing\n delay?: number;\n}\n\nexport interface MultiMorphingAnimateConfig extends MorphingAnimateConfig {\n splitPath?: 'clone' | ((graphic: IGraphic, count: number, needAppend?: boolean) => IGraphic[]);\n individualDelay?: (index: number, count: number, fromGraphic: IGraphic, toGraphic: IGraphic) => number;\n}\n"]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export type EasingTypeStr = 'linear' | 'quadIn' | 'quadOut' | 'quadInOut' | 'quadInOut' | 'cubicIn' | 'cubicOut' | 'cubicInOut' | 'quartIn' | 'quartOut' | 'quartInOut' | 'quintIn' | 'quintOut' | 'quintInOut' | 'backIn' | 'backOut' | 'backInOut' | 'circIn' | 'circOut' | 'circInOut' | 'bounceOut' | 'bounceIn' | 'bounceInOut' | 'elasticIn' | 'elasticOut' | 'elasticInOut' | 'sineIn' | 'sineOut' | 'sineInOut' | 'expoIn' | 'expoOut' | 'expoInOut' | 'easeInOutQuad' | 'easeOutElastic' | 'easeInOutElastic' | '';
|
|
2
|
+
export type EasingTypeFunc = (t: number) => number;
|
|
3
|
+
export type EasingType = EasingTypeStr | EasingTypeFunc;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/interface/animation/easing.ts"],"names":[],"mappings":"","file":"easing.js","sourcesContent":["export type EasingTypeStr =\n | 'linear'\n | 'quadIn'\n | 'quadOut'\n | 'quadInOut'\n | 'quadInOut'\n | 'cubicIn'\n | 'cubicOut'\n | 'cubicInOut'\n | 'quartIn'\n | 'quartOut'\n | 'quartInOut'\n | 'quintIn'\n | 'quintOut'\n | 'quintInOut'\n | 'backIn'\n | 'backOut'\n | 'backInOut'\n | 'circIn'\n | 'circOut'\n | 'circInOut'\n | 'bounceOut'\n | 'bounceIn'\n | 'bounceInOut'\n | 'elasticIn'\n | 'elasticOut'\n | 'elasticInOut'\n | 'sineIn'\n | 'sineOut'\n | 'sineInOut'\n | 'expoIn'\n | 'expoOut'\n | 'expoInOut'\n // @since 0.21.0\n | 'easeInOutQuad'\n | 'easeOutElastic'\n | 'easeInOutElastic'\n | '';\nexport type EasingTypeFunc = (t: number) => number;\n\nexport type EasingType = EasingTypeStr | EasingTypeFunc;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/interface/animation/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC","file":"index.js","sourcesContent":["export * from './animate';\nexport * from './ticker';\nexport * from './timeline';\nexport * from './type';\nexport * from './easing';\n"]}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { EventEmitter } from '@visactor/vutils';
|
|
2
|
+
import type { ITimeline } from './timeline';
|
|
3
|
+
import type { IStage } from '../stage';
|
|
4
|
+
export type TickerMode = 'raf' | 'timeout' | 'manual';
|
|
5
|
+
export declare enum STATUS {
|
|
6
|
+
INITIAL = 0,
|
|
7
|
+
RUNNING = 1,
|
|
8
|
+
PAUSE = 2
|
|
9
|
+
}
|
|
10
|
+
export interface ITickHandler {
|
|
11
|
+
tick: (interval: number, cb: (handler: ITickHandler) => void) => void;
|
|
12
|
+
tickTo?: (t: number, cb: (handler: ITickHandler, params?: {
|
|
13
|
+
once: boolean;
|
|
14
|
+
}) => void) => void;
|
|
15
|
+
getTime: () => number;
|
|
16
|
+
release: () => void;
|
|
17
|
+
}
|
|
18
|
+
export interface ITickerHandlerStatic {
|
|
19
|
+
new (): ITickHandler;
|
|
20
|
+
}
|
|
21
|
+
export interface ITicker extends EventEmitter {
|
|
22
|
+
setFPS?: (fps: number) => void;
|
|
23
|
+
setInterval?: (interval: number) => void;
|
|
24
|
+
getFPS?: () => number;
|
|
25
|
+
getInterval?: () => number;
|
|
26
|
+
tick: (interval: number) => void;
|
|
27
|
+
tickAt?: (time: number) => void;
|
|
28
|
+
pause: () => boolean;
|
|
29
|
+
resume: () => boolean;
|
|
30
|
+
start: (force?: boolean) => boolean;
|
|
31
|
+
stop: () => void;
|
|
32
|
+
addTimeline: (timeline: ITimeline) => void;
|
|
33
|
+
remTimeline: (timeline: ITimeline) => void;
|
|
34
|
+
trySyncTickStatus: () => void;
|
|
35
|
+
getTimelines: () => ITimeline[];
|
|
36
|
+
release: () => void;
|
|
37
|
+
bindStage: (stage: IStage) => void;
|
|
38
|
+
autoStop: boolean;
|
|
39
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/interface/animation/ticker.ts"],"names":[],"mappings":"AAUA,MAAM,CAAN,IAAY,MAIX;AAJD,WAAY,MAAM;IAChB,yCAAW,CAAA;IACX,yCAAW,CAAA;IACX,qCAAS,CAAA;AACX,CAAC,EAJW,MAAM,KAAN,MAAM,QAIjB","file":"ticker.js","sourcesContent":["/**\n * Ticker Types for Animation Graph\n */\n\nimport type { EventEmitter } from '@visactor/vutils';\nimport type { ITimeline } from './timeline';\nimport type { IStage } from '../stage';\n\nexport type TickerMode = 'raf' | 'timeout' | 'manual';\n\nexport enum STATUS {\n INITIAL = 0, // initial represents initial state\n RUNNING = 1, // running represents executing\n PAUSE = 2 // PAUSE represents tick continues but functions are not executed\n}\n\nexport interface ITickHandler {\n /**\n * Start executing tick\n * @param interval Delay in ms\n * @param cb Callback to execute\n */\n tick: (interval: number, cb: (handler: ITickHandler) => void) => void;\n tickTo?: (t: number, cb: (handler: ITickHandler, params?: { once: boolean }) => void) => void;\n getTime: () => number; // Get current time\n release: () => void;\n}\n\nexport interface ITickerHandlerStatic {\n new (): ITickHandler;\n}\n\nexport interface ITicker extends EventEmitter {\n setFPS?: (fps: number) => void;\n setInterval?: (interval: number) => void;\n getFPS?: () => number;\n getInterval?: () => number;\n tick: (interval: number) => void;\n tickAt?: (time: number) => void;\n pause: () => boolean;\n resume: () => boolean;\n /**\n * Start ticking, if force is true, start regardless;\n * otherwise, don't start if timeline is empty\n */\n start: (force?: boolean) => boolean;\n stop: () => void;\n addTimeline: (timeline: ITimeline) => void;\n remTimeline: (timeline: ITimeline) => void;\n trySyncTickStatus: () => void;\n getTimelines: () => ITimeline[];\n release: () => void;\n\n bindStage: (stage: IStage) => void;\n\n // Whether to automatically stop, default is true\n autoStop: boolean;\n}\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { IAnimate } from './animate';
|
|
2
|
+
export interface ITimeline {
|
|
3
|
+
id: number;
|
|
4
|
+
isGlobal?: boolean;
|
|
5
|
+
animateCount: number;
|
|
6
|
+
addAnimate: (animate: IAnimate) => void;
|
|
7
|
+
removeAnimate: (animate: IAnimate, release?: boolean) => void;
|
|
8
|
+
tick: (delta: number) => void;
|
|
9
|
+
clear: () => void;
|
|
10
|
+
pause: () => void;
|
|
11
|
+
resume: () => void;
|
|
12
|
+
getTotalDuration: () => number;
|
|
13
|
+
getPlaySpeed: () => number;
|
|
14
|
+
setPlaySpeed: (speed: number) => void;
|
|
15
|
+
getPlayState: () => 'playing' | 'paused' | 'stopped';
|
|
16
|
+
isRunning: () => boolean;
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/interface/animation/timeline.ts"],"names":[],"mappings":"","file":"timeline.js","sourcesContent":["import type { IAnimate } from './animate';\n\nexport interface ITimeline {\n id: number;\n isGlobal?: boolean;\n // 包含的动画数量(animate数组的数量),包含所有动画\n animateCount: number;\n // 添加动画\n addAnimate: (animate: IAnimate) => void;\n // 移除动画\n removeAnimate: (animate: IAnimate, release?: boolean) => void;\n // 更新动画\n tick: (delta: number) => void;\n // 清除动画\n clear: () => void;\n // 暂停动画\n pause: () => void;\n // 恢复动画\n resume: () => void;\n // 获取动画总时长\n getTotalDuration: () => number;\n // 获取动画的播放速度\n getPlaySpeed: () => number;\n // 设置动画的播放速度\n setPlaySpeed: (speed: number) => void;\n // 获取动画的播放状态\n getPlayState: () => 'playing' | 'paused' | 'stopped';\n // 获取动画是否正在运行\n isRunning: () => boolean;\n}\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare enum AnimateStepType {
|
|
2
|
+
wait = "wait",
|
|
3
|
+
from = "from",
|
|
4
|
+
to = "to",
|
|
5
|
+
customAnimate = "customAnimate"
|
|
6
|
+
}
|
|
7
|
+
export declare enum AnimateStatus {
|
|
8
|
+
INITIAL = 0,
|
|
9
|
+
RUNNING = 1,
|
|
10
|
+
PAUSED = 2,
|
|
11
|
+
END = 3
|
|
12
|
+
}
|
|
13
|
+
export type IAnimateStepType = keyof typeof AnimateStepType;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export var AnimateStepType;
|
|
2
|
+
|
|
3
|
+
!function(AnimateStepType) {
|
|
4
|
+
AnimateStepType.wait = "wait", AnimateStepType.from = "from", AnimateStepType.to = "to",
|
|
5
|
+
AnimateStepType.customAnimate = "customAnimate";
|
|
6
|
+
}(AnimateStepType || (AnimateStepType = {}));
|
|
7
|
+
|
|
8
|
+
export var AnimateStatus;
|
|
9
|
+
|
|
10
|
+
!function(AnimateStatus) {
|
|
11
|
+
AnimateStatus[AnimateStatus.INITIAL = 0] = "INITIAL", AnimateStatus[AnimateStatus.RUNNING = 1] = "RUNNING",
|
|
12
|
+
AnimateStatus[AnimateStatus.PAUSED = 2] = "PAUSED", AnimateStatus[AnimateStatus.END = 3] = "END";
|
|
13
|
+
}(AnimateStatus || (AnimateStatus = {}));
|
|
14
|
+
//# sourceMappingURL=type.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/interface/animation/type.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,eAKX;AALD,WAAY,eAAe;IACzB,gCAAa,CAAA;IACb,gCAAa,CAAA;IACb,4BAAS,CAAA;IACT,kDAA+B,CAAA;AACjC,CAAC,EALW,eAAe,KAAf,eAAe,QAK1B;AAED,MAAM,CAAN,IAAY,aAKX;AALD,WAAY,aAAa;IACvB,uDAAW,CAAA;IACX,uDAAW,CAAA;IACX,qDAAU,CAAA;IACV,+CAAO,CAAA;AACT,CAAC,EALW,aAAa,KAAb,aAAa,QAKxB","file":"type.js","sourcesContent":["export enum AnimateStepType {\n wait = 'wait',\n from = 'from',\n to = 'to',\n customAnimate = 'customAnimate'\n}\n\nexport enum AnimateStatus {\n INITIAL = 0,\n RUNNING = 1,\n PAUSED = 2,\n END = 3\n}\n\nexport type IAnimateStepType = keyof typeof AnimateStepType;\n"]}
|
|
@@ -81,6 +81,7 @@ export interface IContext2d extends Releaseable {
|
|
|
81
81
|
[key: string]: any;
|
|
82
82
|
getCanvas: () => ICanvas;
|
|
83
83
|
getContext: () => any;
|
|
84
|
+
reset: (setTransform?: boolean) => void;
|
|
84
85
|
setTransformForCurrent: (force?: boolean) => void;
|
|
85
86
|
currentMatrix: IMatrix;
|
|
86
87
|
clear: () => void;
|