@visactor/vrender-core 0.22.12 → 0.22.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/animate/Ticker/default-ticker.d.ts +40 -0
- package/cjs/animate/Ticker/default-ticker.js +140 -0
- package/cjs/animate/Ticker/default-ticker.js.map +1 -0
- package/cjs/animate/Ticker/index.d.ts +5 -0
- package/cjs/{interface/animation → animate/Ticker}/index.js +3 -3
- package/cjs/animate/Ticker/index.js.map +1 -0
- package/cjs/animate/Ticker/manual-ticker-handler.d.ts +15 -0
- package/cjs/animate/Ticker/manual-ticker-handler.js +36 -0
- package/cjs/animate/Ticker/manual-ticker-handler.js.map +1 -0
- package/cjs/animate/Ticker/manual-ticker.d.ts +19 -0
- package/cjs/animate/Ticker/manual-ticker.js +37 -0
- package/cjs/animate/Ticker/manual-ticker.js.map +1 -0
- package/cjs/animate/Ticker/raf-tick-handler.d.ts +9 -0
- package/cjs/animate/Ticker/raf-tick-handler.js +30 -0
- package/cjs/animate/Ticker/raf-tick-handler.js.map +1 -0
- package/cjs/animate/Ticker/timeout-tick-handler.d.ts +9 -0
- package/cjs/animate/Ticker/timeout-tick-handler.js +28 -0
- package/cjs/animate/Ticker/timeout-tick-handler.js.map +1 -0
- package/cjs/animate/Ticker/type.d.ts +6 -0
- package/cjs/{interface/animation/ticker.js → animate/Ticker/type.js} +1 -1
- package/cjs/animate/Ticker/type.js.map +1 -0
- package/cjs/animate/animate.d.ts +147 -0
- package/cjs/animate/animate.js +403 -0
- package/cjs/animate/animate.js.map +1 -0
- package/cjs/animate/config.d.ts +2 -1
- package/cjs/animate/config.js +5 -1
- package/cjs/animate/config.js.map +1 -1
- package/cjs/animate/custom-animate.d.ts +236 -0
- package/cjs/animate/custom-animate.js +726 -0
- package/cjs/animate/custom-animate.js.map +1 -0
- package/cjs/animate/default-ticker.d.ts +2 -0
- package/cjs/animate/default-ticker.js +14 -0
- package/cjs/animate/default-ticker.js.map +1 -0
- package/cjs/animate/easing-func.d.ts +1 -0
- package/cjs/animate/easing-func.js +16 -0
- package/cjs/animate/easing-func.js.map +1 -0
- package/cjs/animate/easing.d.ts +49 -0
- package/cjs/animate/easing.js +141 -0
- package/cjs/animate/easing.js.map +1 -0
- package/cjs/animate/group-fade.d.ts +16 -0
- package/cjs/animate/group-fade.js +66 -0
- package/cjs/animate/group-fade.js.map +1 -0
- package/cjs/animate/index.d.ts +8 -0
- package/cjs/animate/index.js +24 -0
- package/cjs/animate/index.js.map +1 -0
- package/cjs/animate/morphing.d.ts +52 -0
- package/cjs/animate/morphing.js +292 -0
- package/cjs/animate/morphing.js.map +1 -0
- package/cjs/animate/timeline.d.ts +17 -0
- package/cjs/animate/timeline.js +46 -0
- package/cjs/animate/timeline.js.map +1 -0
- package/cjs/application.d.ts +1 -2
- package/cjs/application.js.map +1 -1
- package/cjs/canvas/constants.js +2 -1
- package/cjs/canvas/empty-context.d.ts +0 -1
- package/cjs/canvas/empty-context.js +0 -4
- package/cjs/canvas/empty-context.js.map +1 -1
- package/cjs/color-string/interpolate.d.ts +0 -1
- package/cjs/color-string/interpolate.js +4 -12
- package/cjs/color-string/interpolate.js.map +1 -1
- package/cjs/color-string/store.js +1 -2
- package/cjs/common/custom-path2d.js +2 -2
- package/cjs/common/custom-path2d.js.map +1 -1
- package/cjs/common/enums.d.ts +16 -0
- package/cjs/common/enums.js +11 -2
- package/cjs/common/enums.js.map +1 -1
- package/cjs/common/morphing-utils.js +124 -32
- package/cjs/common/morphing-utils.js.map +1 -1
- package/cjs/common/polygon.js +2 -5
- package/cjs/common/polygon.js.map +1 -1
- package/cjs/common/segment/curve/cubic-bezier.d.ts +2 -1
- package/cjs/common/segment/curve/cubic-bezier.js +8 -3
- package/cjs/common/segment/curve/cubic-bezier.js.map +1 -1
- package/cjs/common/segment/curve/quadratic-bezier.d.ts +0 -1
- package/cjs/common/segment/curve/quadratic-bezier.js +3 -10
- package/cjs/common/segment/curve/quadratic-bezier.js.map +1 -1
- package/cjs/common/segment/index.d.ts +0 -1
- 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 +3 -7
- package/cjs/common/shape/arc.js.map +1 -1
- package/cjs/common/simplify.js +2 -1
- 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 +2 -0
- package/cjs/common/utils.js +9 -5
- 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 +0 -3
- package/cjs/core/global.js +3 -14
- package/cjs/core/global.js.map +1 -1
- package/cjs/core/stage.d.ts +3 -8
- package/cjs/core/stage.js +20 -34
- package/cjs/core/stage.js.map +1 -1
- package/cjs/graphic/arc.d.ts +2 -1
- package/cjs/graphic/arc.js +2 -3
- package/cjs/graphic/arc.js.map +1 -1
- package/cjs/graphic/area.d.ts +2 -1
- package/cjs/graphic/area.js +1 -4
- package/cjs/graphic/area.js.map +1 -1
- package/cjs/graphic/circle.d.ts +2 -1
- package/cjs/graphic/circle.js +2 -5
- package/cjs/graphic/circle.js.map +1 -1
- package/cjs/graphic/config.js +1 -2
- package/cjs/graphic/config.js.map +1 -1
- package/cjs/graphic/graphic-service/graphic-module.js +2 -1
- package/cjs/graphic/graphic-service/graphic-module.js.map +1 -1
- package/cjs/graphic/graphic-service/graphic-service.js +3 -2
- package/cjs/graphic/graphic-service/graphic-service.js.map +1 -1
- package/cjs/graphic/graphic.d.ts +12 -9
- package/cjs/graphic/graphic.js +105 -48
- 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 +2 -1
- package/cjs/graphic/line.js +1 -5
- package/cjs/graphic/line.js.map +1 -1
- package/cjs/graphic/rect.js +2 -5
- 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 +2 -1
- package/cjs/graphic/star.js +2 -4
- package/cjs/graphic/star.js.map +1 -1
- package/cjs/index.d.ts +3 -2
- package/cjs/index.js +16 -14
- package/cjs/index.js.map +1 -1
- package/cjs/interface/animate.d.ts +160 -1
- package/cjs/interface/animate.js +4 -1
- package/cjs/interface/animate.js.map +1 -1
- package/cjs/interface/context.d.ts +0 -1
- package/cjs/interface/context.js.map +1 -1
- package/cjs/interface/global.d.ts +0 -2
- package/cjs/interface/global.js.map +1 -1
- package/cjs/interface/graphic.d.ts +3 -11
- 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 +0 -7
- package/cjs/interface/render.js.map +1 -1
- package/cjs/interface/stage.d.ts +1 -4
- package/cjs/interface/stage.js.map +1 -1
- package/cjs/modules.d.ts +1 -2
- package/cjs/modules.js +3 -4
- package/cjs/modules.js.map +1 -1
- package/cjs/plugins/builtin-plugin/auto-render-plugin.js +8 -9
- package/cjs/plugins/builtin-plugin/auto-render-plugin.js.map +1 -1
- package/cjs/plugins/builtin-plugin/dirty-bounds-plugin.js +11 -14
- package/cjs/plugins/builtin-plugin/dirty-bounds-plugin.js.map +1 -1
- package/cjs/plugins/builtin-plugin/flex-layout-plugin.js +10 -13
- package/cjs/plugins/builtin-plugin/flex-layout-plugin.js.map +1 -1
- package/cjs/plugins/builtin-plugin/html-attribute-plugin.js +1 -0
- package/cjs/plugins/builtin-plugin/html-attribute-plugin.js.map +1 -1
- package/cjs/plugins/builtin-plugin/incremental-auto-render-plugin.js +5 -8
- package/cjs/plugins/builtin-plugin/incremental-auto-render-plugin.js.map +1 -1
- package/cjs/plugins/builtin-plugin/richtext-edit-plugin-old.d.ts +1 -0
- package/cjs/plugins/builtin-plugin/richtext-edit-plugin-old.js +3 -0
- package/cjs/plugins/builtin-plugin/richtext-edit-plugin-old.js.map +1 -0
- package/cjs/plugins/builtin-plugin/richtext-edit-plugin.d.ts +2 -2
- package/cjs/plugins/builtin-plugin/richtext-edit-plugin.js +5 -6
- package/cjs/plugins/builtin-plugin/richtext-edit-plugin.js.map +1 -1
- package/cjs/render/contributions/render/arc-render.d.ts +2 -4
- package/cjs/render/contributions/render/arc-render.js +17 -19
- 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 +0 -1
- package/cjs/render/contributions/render/draw-contribution.js +19 -23
- package/cjs/render/contributions/render/draw-contribution.js.map +1 -1
- package/cjs/render/contributions/render/draw-interceptor.js +1 -2
- 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 +11 -15
- 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 +1 -3
- package/cjs/render/contributions/render/rect-render.js +15 -17
- package/cjs/render/contributions/render/rect-render.js.map +1 -1
- package/cjs/render/contributions/render/symbol-render.d.ts +2 -4
- package/cjs/render/contributions/render/symbol-render.js +11 -16
- 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 +8867 -6020
- package/es/animate/Ticker/default-ticker.d.ts +40 -0
- package/es/animate/Ticker/default-ticker.js +138 -0
- package/es/animate/Ticker/default-ticker.js.map +1 -0
- package/es/animate/Ticker/index.d.ts +5 -0
- package/es/animate/Ticker/index.js +10 -0
- package/es/animate/Ticker/index.js.map +1 -0
- package/es/animate/Ticker/manual-ticker-handler.d.ts +15 -0
- package/es/animate/Ticker/manual-ticker-handler.js +28 -0
- package/es/animate/Ticker/manual-ticker-handler.js.map +1 -0
- package/es/animate/Ticker/manual-ticker.d.ts +19 -0
- package/es/animate/Ticker/manual-ticker.js +31 -0
- package/es/animate/Ticker/manual-ticker.js.map +1 -0
- package/es/animate/Ticker/raf-tick-handler.d.ts +9 -0
- package/es/animate/Ticker/raf-tick-handler.js +22 -0
- package/es/animate/Ticker/raf-tick-handler.js.map +1 -0
- package/es/animate/Ticker/timeout-tick-handler.d.ts +9 -0
- package/es/animate/Ticker/timeout-tick-handler.js +20 -0
- package/es/animate/Ticker/timeout-tick-handler.js.map +1 -0
- package/es/animate/Ticker/type.d.ts +6 -0
- package/es/{interface/animation/ticker.js → animate/Ticker/type.js} +1 -1
- package/es/animate/Ticker/type.js.map +1 -0
- package/es/animate/animate.d.ts +147 -0
- package/es/animate/animate.js +398 -0
- package/es/animate/animate.js.map +1 -0
- package/es/animate/config.d.ts +2 -1
- package/es/animate/config.js +5 -0
- package/es/animate/config.js.map +1 -1
- package/es/animate/custom-animate.d.ts +236 -0
- package/es/animate/custom-animate.js +703 -0
- package/es/animate/custom-animate.js.map +1 -0
- package/es/animate/default-ticker.d.ts +2 -0
- package/es/animate/default-ticker.js +12 -0
- package/es/animate/default-ticker.js.map +1 -0
- package/es/animate/easing-func.d.ts +1 -0
- package/es/animate/easing-func.js +10 -0
- package/es/animate/easing-func.js.map +1 -0
- package/es/animate/easing.d.ts +49 -0
- package/es/animate/easing.js +134 -0
- package/es/animate/easing.js.map +1 -0
- package/es/animate/group-fade.d.ts +16 -0
- package/es/animate/group-fade.js +56 -0
- package/es/animate/group-fade.js.map +1 -0
- package/es/animate/index.d.ts +8 -0
- package/es/animate/index.js +16 -0
- package/es/animate/index.js.map +1 -0
- package/es/animate/morphing.d.ts +52 -0
- package/es/animate/morphing.js +295 -0
- package/es/animate/morphing.js.map +1 -0
- package/es/animate/timeline.d.ts +17 -0
- package/es/animate/timeline.js +42 -0
- package/es/animate/timeline.js.map +1 -0
- package/es/application.d.ts +1 -2
- package/es/application.js.map +1 -1
- package/es/canvas/constants.js +2 -1
- package/es/canvas/empty-context.d.ts +0 -1
- package/es/canvas/empty-context.js +0 -4
- package/es/canvas/empty-context.js.map +1 -1
- package/es/color-string/interpolate.d.ts +0 -1
- package/es/color-string/interpolate.js +1 -8
- package/es/color-string/interpolate.js.map +1 -1
- package/es/color-string/store.js +1 -2
- package/es/common/custom-path2d.js +2 -2
- package/es/common/custom-path2d.js.map +1 -1
- package/es/common/enums.d.ts +16 -0
- package/es/common/enums.js +20 -0
- package/es/common/enums.js.map +1 -1
- package/es/common/morphing-utils.js +124 -29
- package/es/common/morphing-utils.js.map +1 -1
- package/es/common/polygon.js +3 -6
- package/es/common/polygon.js.map +1 -1
- package/es/common/segment/curve/cubic-bezier.d.ts +2 -1
- package/es/common/segment/curve/cubic-bezier.js +8 -1
- package/es/common/segment/curve/cubic-bezier.js.map +1 -1
- package/es/common/segment/curve/quadratic-bezier.d.ts +0 -1
- package/es/common/segment/curve/quadratic-bezier.js +2 -5
- package/es/common/segment/curve/quadratic-bezier.js.map +1 -1
- package/es/common/segment/index.d.ts +0 -1
- package/es/common/segment/index.js +0 -2
- package/es/common/segment/index.js.map +1 -1
- package/es/common/shape/arc.d.ts +1 -1
- package/es/common/shape/arc.js +3 -7
- package/es/common/shape/arc.js.map +1 -1
- package/es/common/simplify.js +2 -1
- 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 +2 -0
- package/es/common/utils.js +5 -1
- 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 +0 -3
- package/es/core/global.js +2 -15
- package/es/core/global.js.map +1 -1
- package/es/core/stage.d.ts +3 -8
- package/es/core/stage.js +22 -35
- package/es/core/stage.js.map +1 -1
- package/es/graphic/arc.d.ts +2 -1
- package/es/graphic/arc.js +2 -3
- package/es/graphic/arc.js.map +1 -1
- package/es/graphic/area.d.ts +2 -1
- package/es/graphic/area.js +1 -4
- package/es/graphic/area.js.map +1 -1
- package/es/graphic/circle.d.ts +2 -1
- package/es/graphic/circle.js +2 -4
- package/es/graphic/circle.js.map +1 -1
- package/es/graphic/config.js +1 -2
- 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 +4 -1
- package/es/graphic/graphic-service/graphic-service.js.map +1 -1
- package/es/graphic/graphic.d.ts +12 -9
- package/es/graphic/graphic.js +109 -52
- 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 +2 -1
- package/es/graphic/line.js +1 -5
- package/es/graphic/line.js.map +1 -1
- package/es/graphic/rect.js +2 -5
- 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 +2 -1
- package/es/graphic/star.js +2 -4
- package/es/graphic/star.js.map +1 -1
- package/es/index.d.ts +3 -2
- package/es/index.js +6 -4
- package/es/index.js.map +1 -1
- package/es/interface/animate.d.ts +160 -1
- package/es/interface/animate.js +1 -2
- package/es/interface/animate.js.map +1 -1
- package/es/interface/context.d.ts +0 -1
- package/es/interface/context.js.map +1 -1
- package/es/interface/global.d.ts +0 -2
- package/es/interface/global.js.map +1 -1
- package/es/interface/graphic.d.ts +3 -11
- 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 +0 -7
- package/es/interface/render.js.map +1 -1
- package/es/interface/stage.d.ts +1 -4
- package/es/interface/stage.js.map +1 -1
- package/es/modules.d.ts +1 -2
- package/es/modules.js +0 -6
- 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 +12 -13
- package/es/plugins/builtin-plugin/dirty-bounds-plugin.js.map +1 -1
- package/es/plugins/builtin-plugin/flex-layout-plugin.js +11 -12
- package/es/plugins/builtin-plugin/flex-layout-plugin.js.map +1 -1
- package/es/plugins/builtin-plugin/html-attribute-plugin.js +1 -0
- package/es/plugins/builtin-plugin/html-attribute-plugin.js.map +1 -1
- package/es/plugins/builtin-plugin/incremental-auto-render-plugin.js +5 -8
- package/es/plugins/builtin-plugin/incremental-auto-render-plugin.js.map +1 -1
- package/es/plugins/builtin-plugin/richtext-edit-plugin-old.d.ts +1 -0
- package/es/plugins/builtin-plugin/richtext-edit-plugin-old.js +3 -0
- package/es/plugins/builtin-plugin/richtext-edit-plugin-old.js.map +1 -0
- package/es/plugins/builtin-plugin/richtext-edit-plugin.d.ts +2 -2
- package/es/plugins/builtin-plugin/richtext-edit-plugin.js +5 -4
- package/es/plugins/builtin-plugin/richtext-edit-plugin.js.map +1 -1
- package/es/render/contributions/render/arc-render.d.ts +2 -4
- package/es/render/contributions/render/arc-render.js +17 -19
- 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 +0 -1
- package/es/render/contributions/render/draw-contribution.js +19 -23
- package/es/render/contributions/render/draw-contribution.js.map +1 -1
- package/es/render/contributions/render/draw-interceptor.js +1 -2
- 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 +11 -15
- 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 +1 -3
- package/es/render/contributions/render/rect-render.js +14 -17
- package/es/render/contributions/render/rect-render.js.map +1 -1
- package/es/render/contributions/render/symbol-render.d.ts +2 -4
- package/es/render/contributions/render/symbol-render.js +11 -16
- 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/common/diff.d.ts +0 -1
- package/cjs/common/diff.js +0 -19
- package/cjs/common/diff.js.map +0 -1
- package/cjs/common/performance-raf.d.ts +0 -8
- package/cjs/common/performance-raf.js +0 -32
- package/cjs/common/performance-raf.js.map +0 -1
- package/cjs/interface/animation/animate.d.ts +0 -117
- package/cjs/interface/animation/animate.js +0 -10
- package/cjs/interface/animation/animate.js.map +0 -1
- package/cjs/interface/animation/easing.d.ts +0 -3
- package/cjs/interface/animation/easing.js +0 -6
- package/cjs/interface/animation/easing.js.map +0 -1
- package/cjs/interface/animation/index.d.ts +0 -5
- package/cjs/interface/animation/index.js.map +0 -1
- package/cjs/interface/animation/ticker.d.ts +0 -39
- package/cjs/interface/animation/ticker.js.map +0 -1
- package/cjs/interface/animation/timeline.d.ts +0 -17
- package/cjs/interface/animation/timeline.js +0 -6
- package/cjs/interface/animation/timeline.js.map +0 -1
- package/cjs/interface/animation/type.d.ts +0 -13
- package/cjs/interface/animation/type.js +0 -15
- package/cjs/interface/animation/type.js.map +0 -1
- package/es/common/diff.d.ts +0 -1
- package/es/common/diff.js +0 -11
- package/es/common/diff.js.map +0 -1
- package/es/common/performance-raf.d.ts +0 -8
- package/es/common/performance-raf.js +0 -24
- package/es/common/performance-raf.js.map +0 -1
- package/es/interface/animation/animate.d.ts +0 -117
- package/es/interface/animation/animate.js +0 -6
- package/es/interface/animation/animate.js.map +0 -1
- package/es/interface/animation/easing.d.ts +0 -3
- package/es/interface/animation/easing.js +0 -2
- package/es/interface/animation/easing.js.map +0 -1
- package/es/interface/animation/index.d.ts +0 -5
- package/es/interface/animation/index.js +0 -10
- package/es/interface/animation/index.js.map +0 -1
- package/es/interface/animation/ticker.d.ts +0 -39
- package/es/interface/animation/ticker.js.map +0 -1
- package/es/interface/animation/timeline.d.ts +0 -17
- package/es/interface/animation/timeline.js +0 -2
- package/es/interface/animation/timeline.js.map +0 -1
- package/es/interface/animation/type.d.ts +0 -13
- package/es/interface/animation/type.js +0 -14
- package/es/interface/animation/type.js.map +0 -1
package/cjs/graphic/graphic.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { ICustomPath2D } from './../interface/path';
|
|
2
2
|
import type { Dict, IPointLike, IAABBBounds, IOBBBounds } from '@visactor/vutils';
|
|
3
3
|
import { Matrix, Point } from '@visactor/vutils';
|
|
4
|
-
import type { GraphicType, IAnimateConfig, IGraphicAttribute, IGraphic, IGraphicJson, ISetAttributeContext, ITransform, GraphicReleaseStatus } from '../interface/graphic';
|
|
4
|
+
import type { GraphicType, IAnimateConfig, IGraphicAttribute, IGraphic, IGraphicAnimateParams, IGraphicJson, ISetAttributeContext, ITransform, GraphicReleaseStatus } from '../interface/graphic';
|
|
5
5
|
import { Node } from './node-tree';
|
|
6
|
-
import type { IAnimate, IAnimateTarget, IGlyphGraphicAttribute, ILayer, IPickerService, IShadowRoot, IStage, IStep, ISymbolClass } from '../interface';
|
|
6
|
+
import type { IAnimate, IAnimateTarget, IGlyphGraphicAttribute, ILayer, IPickerService, IShadowRoot, IStage, IStep, ISubAnimate, ISymbolClass } from '../interface';
|
|
7
|
+
import { Animate } from '../animate';
|
|
7
8
|
import { IContainPointMode } from '../common/enums';
|
|
8
9
|
import { CustomSymbolClass } from './builtin-symbol';
|
|
9
10
|
export declare const PURE_STYLE_KEY: string[];
|
|
@@ -41,7 +42,6 @@ export declare const NOWORK_ANIMATE_ATTR: {
|
|
|
41
42
|
export declare abstract class Graphic<T extends Partial<IGraphicAttribute> = Partial<IGraphicAttribute>> extends Node implements IGraphic<T>, IAnimateTarget {
|
|
42
43
|
static mixin(source: Dict<any>): void;
|
|
43
44
|
_events?: any;
|
|
44
|
-
context?: Record<string, any>;
|
|
45
45
|
static userSymbolMap: Record<string, ISymbolClass>;
|
|
46
46
|
onBeforeAttributeUpdate?: (val: any, attributes: Partial<T>, key: null | string | string[], context?: ISetAttributeContext) => T | undefined;
|
|
47
47
|
parent: any;
|
|
@@ -86,20 +86,20 @@ export declare abstract class Graphic<T extends Partial<IGraphicAttribute> = Par
|
|
|
86
86
|
normalAttrs?: Partial<T>;
|
|
87
87
|
stateProxy?: (stateName: string, targetStates?: string[]) => T;
|
|
88
88
|
animates: Map<string | number, IAnimate>;
|
|
89
|
-
|
|
89
|
+
nextAttrs?: T;
|
|
90
|
+
prevAttrs?: T;
|
|
91
|
+
finalAttrs?: T;
|
|
90
92
|
pathProxy?: ICustomPath2D;
|
|
91
93
|
attachedThemeGraphic?: IGraphic;
|
|
92
94
|
protected updateAABBBoundsStamp: number;
|
|
93
95
|
protected updateOBBBoundsStamp?: number;
|
|
94
96
|
clipPathMap?: Map<string, ISymbolClass>;
|
|
95
97
|
constructor(params?: T);
|
|
96
|
-
getGraphicService(): import("../interface").IGraphicService;
|
|
97
|
-
getAttributes(): T;
|
|
98
98
|
setMode(mode: '2d' | '3d'): void;
|
|
99
99
|
set3dMode(): void;
|
|
100
100
|
set2dMode(): void;
|
|
101
101
|
getOffsetXY(attr?: ITransform, includeScroll?: boolean): Point;
|
|
102
|
-
onAnimateBind(animate: IAnimate): void;
|
|
102
|
+
onAnimateBind(animate: IAnimate | ISubAnimate): void;
|
|
103
103
|
protected tryUpdateAABBBounds(): IAABBBounds;
|
|
104
104
|
protected tryUpdateOBBBounds(): IOBBBounds;
|
|
105
105
|
protected combindShadowAABBBounds(bounds: IAABBBounds): void;
|
|
@@ -123,7 +123,6 @@ export declare abstract class Graphic<T extends Partial<IGraphicAttribute> = Par
|
|
|
123
123
|
clearUpdateShapeTag(): void;
|
|
124
124
|
containsPoint(x: number, y: number, mode: IContainPointMode, picker?: IPickerService): boolean;
|
|
125
125
|
protected setWidthHeightWithoutTransform(aabbBounds: IAABBBounds): void;
|
|
126
|
-
setAttributesAndPreventAnimate(params: Partial<T>, forceUpdateTag?: boolean, context?: ISetAttributeContext): void;
|
|
127
126
|
setAttributes(params: Partial<T>, forceUpdateTag?: boolean, context?: ISetAttributeContext): void;
|
|
128
127
|
_setAttributes(params: Partial<T>, forceUpdateTag?: boolean, context?: ISetAttributeContext): void;
|
|
129
128
|
setAttribute(key: string, value: any, forceUpdateTag?: boolean, context?: ISetAttributeContext): void;
|
|
@@ -137,6 +136,7 @@ export declare abstract class Graphic<T extends Partial<IGraphicAttribute> = Par
|
|
|
137
136
|
rotate(angle: number, rotateCenter?: IPointLike): this;
|
|
138
137
|
rotateTo(angle: number): this;
|
|
139
138
|
skewTo(b: number, c: number): this;
|
|
139
|
+
animate(params?: IGraphicAnimateParams): Animate;
|
|
140
140
|
onAttributeUpdate(context?: ISetAttributeContext): void;
|
|
141
141
|
update(d?: {
|
|
142
142
|
bounds: boolean;
|
|
@@ -174,6 +174,10 @@ export declare abstract class Graphic<T extends Partial<IGraphicAttribute> = Par
|
|
|
174
174
|
setStageToShadowRoot(stage?: IStage, layer?: ILayer): void;
|
|
175
175
|
onAddStep(step: IStep): void;
|
|
176
176
|
onStop(props?: Partial<T>): void;
|
|
177
|
+
onStep(subAnimate: ISubAnimate, animate: IAnimate, step: IStep, ratio: number, end: boolean): void;
|
|
178
|
+
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;
|
|
179
|
+
defaultInterpolate(nextStepVal: any, lastStepVal: any, key: string, nextAttributes: Record<string, any>, nextParsedProps: any, ratio: number): boolean;
|
|
180
|
+
protected _interpolate(key: string, ratio: number, lastStepVal: any, nextStepVal: any, nextAttributes: any): void;
|
|
177
181
|
getDefaultAttribute(name: string): any;
|
|
178
182
|
getComputedAttribute(name: string): any;
|
|
179
183
|
onSetStage(cb: (g: IGraphic, stage: IStage) => void, immediate?: boolean): void;
|
|
@@ -191,5 +195,4 @@ export declare abstract class Graphic<T extends Partial<IGraphicAttribute> = Par
|
|
|
191
195
|
protected _emitCustomEvent(type: string, context?: any): void;
|
|
192
196
|
abstract getNoWorkAnimateAttr(): Record<string, number>;
|
|
193
197
|
abstract clone(): IGraphic<any>;
|
|
194
|
-
toCustomPath(): ICustomPath2D;
|
|
195
198
|
}
|
package/cjs/graphic/graphic.js
CHANGED
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: !0
|
|
5
5
|
}), exports.Graphic = exports.NOWORK_ANIMATE_ATTR = exports.GRAPHIC_UPDATE_TAG_KEY = exports.PURE_STYLE_KEY = void 0;
|
|
6
6
|
|
|
7
|
-
const vutils_1 = require("@visactor/vutils"), vutils_2 = require("@visactor/vutils"), node_tree_1 = require("./node-tree"), event_1 = require("../event"), config_1 = require("./config"), application_1 = require("../application"), custom_path2d_1 = require("../common/custom-path2d"), loader_1 = require("../resource-loader/loader"), enums_1 = require("../common/enums"), bounds_context_1 = require("../common/bounds-context"), render_command_list_1 = require("../common/render-command-list"), utils_1 = require("../common/utils"), builtin_symbol_1 = require("./builtin-symbol"), xml_1 = require("../common/xml"), constants_1 = require("./constants"),
|
|
7
|
+
const vutils_1 = require("@visactor/vutils"), vutils_2 = require("@visactor/vutils"), node_tree_1 = require("./node-tree"), event_1 = require("../event"), config_1 = require("./config"), application_1 = require("../application"), animate_1 = require("../animate"), interpolate_1 = require("../color-string/interpolate"), custom_path2d_1 = require("../common/custom-path2d"), loader_1 = require("../resource-loader/loader"), enums_1 = require("../common/enums"), bounds_context_1 = require("../common/bounds-context"), render_command_list_1 = require("../common/render-command-list"), utils_1 = require("../common/utils"), builtin_symbol_1 = require("./builtin-symbol"), xml_1 = require("../common/xml"), constants_1 = require("./constants"), _tempBounds = new vutils_2.AABBBounds, tempMatrix = new vutils_2.Matrix, tempBounds = new vutils_2.AABBBounds;
|
|
8
8
|
|
|
9
9
|
exports.PURE_STYLE_KEY = [ "stroke", "opacity", "strokeOpacity", "lineDash", "lineDashOffset", "lineCap", "lineJoin", "miterLimit", "fill", "fillOpacity" ],
|
|
10
10
|
exports.GRAPHIC_UPDATE_TAG_KEY = [ "lineWidth", "scaleX", "scaleY", "angle", "anchor", "visible" ];
|
|
@@ -71,13 +71,6 @@ class Graphic extends node_tree_1.Node {
|
|
|
71
71
|
this.attribute = params, this.valid = this.isValid(), this.updateAABBBoundsStamp = 0,
|
|
72
72
|
params.background ? this.loadImage(null !== (_a = params.background.background) && void 0 !== _a ? _a : params.background, !0) : params.shadowGraphic && this.setShadowGraphic(params.shadowGraphic);
|
|
73
73
|
}
|
|
74
|
-
getGraphicService() {
|
|
75
|
-
var _a, _b;
|
|
76
|
-
return null !== (_b = null === (_a = this.stage) || void 0 === _a ? void 0 : _a.graphicService) && void 0 !== _b ? _b : application_1.application.graphicService;
|
|
77
|
-
}
|
|
78
|
-
getAttributes() {
|
|
79
|
-
return this.attribute;
|
|
80
|
-
}
|
|
81
74
|
setMode(mode) {
|
|
82
75
|
"3d" === mode ? this.set3dMode() : this.set2dMode();
|
|
83
76
|
}
|
|
@@ -103,9 +96,9 @@ class Graphic extends node_tree_1.Node {
|
|
|
103
96
|
const full = "imprecise" === this.attribute.boundsMode;
|
|
104
97
|
if (!this.shouldUpdateAABBBounds()) return this._AABBBounds;
|
|
105
98
|
if (!this.valid) return this._AABBBounds.clear(), this._AABBBounds;
|
|
106
|
-
|
|
99
|
+
application_1.application.graphicService.beforeUpdateAABBBounds(this, this.stage, !0, this._AABBBounds);
|
|
107
100
|
const bounds = this.doUpdateAABBBounds(full);
|
|
108
|
-
return
|
|
101
|
+
return application_1.application.graphicService.afterUpdateAABBBounds(this, this.stage, this._AABBBounds, this, !0),
|
|
109
102
|
"empty" === this.attribute.boundsMode && bounds.clear(), bounds;
|
|
110
103
|
}
|
|
111
104
|
tryUpdateOBBBounds() {
|
|
@@ -205,7 +198,7 @@ class Graphic extends node_tree_1.Node {
|
|
|
205
198
|
clearTag && this.clearUpdateLocalPositionTag()), this._transMatrix;
|
|
206
199
|
}
|
|
207
200
|
shouldUpdateAABBBounds() {
|
|
208
|
-
return this.shadowRoot ? (!!(this._updateTag & enums_1.UpdateTag.UPDATE_BOUNDS) || this.shadowRoot.shouldUpdateAABBBounds()) &&
|
|
201
|
+
return this.shadowRoot ? (!!(this._updateTag & enums_1.UpdateTag.UPDATE_BOUNDS) || this.shadowRoot.shouldUpdateAABBBounds()) && application_1.application.graphicService.validCheck(this.attribute, this.getGraphicTheme(), this._AABBBounds, this) : !!(this._updateTag & enums_1.UpdateTag.UPDATE_BOUNDS) && application_1.application.graphicService.validCheck(this.attribute, this.getGraphicTheme(), this._AABBBounds, this);
|
|
209
202
|
}
|
|
210
203
|
shouldSelfChangeUpdateAABBBounds() {
|
|
211
204
|
return this.shadowRoot ? !!(this._updateTag & enums_1.UpdateTag.UPDATE_BOUNDS) || this.shadowRoot.shouldUpdateAABBBounds() : !!(this._updateTag & enums_1.UpdateTag.UPDATE_BOUNDS);
|
|
@@ -242,13 +235,6 @@ class Graphic extends node_tree_1.Node {
|
|
|
242
235
|
setWidthHeightWithoutTransform(aabbBounds) {
|
|
243
236
|
this.widthWithoutTransform = aabbBounds.x2 - aabbBounds.x1, this.heightWithoutTransform = aabbBounds.y2 - aabbBounds.y1;
|
|
244
237
|
}
|
|
245
|
-
setAttributesAndPreventAnimate(params, forceUpdateTag = !1, context) {
|
|
246
|
-
this.setAttributes(params, forceUpdateTag, context), this.animates && this.animates.forEach((animate => {
|
|
247
|
-
Object.keys(params).forEach((key => {
|
|
248
|
-
animate.preventAttr(key);
|
|
249
|
-
}));
|
|
250
|
-
}));
|
|
251
|
-
}
|
|
252
238
|
setAttributes(params, forceUpdateTag = !1, context) {
|
|
253
239
|
(params = this.onBeforeAttributeUpdate && this.onBeforeAttributeUpdate(params, this.attribute, null, context) || params).background ? this.loadImage(params.background, !0) : params.shadowGraphic && this.setShadowGraphic(params.shadowGraphic),
|
|
254
240
|
this._setAttributes(params, forceUpdateTag, context);
|
|
@@ -389,8 +375,22 @@ class Graphic extends node_tree_1.Node {
|
|
|
389
375
|
skewTo(b, c) {
|
|
390
376
|
return this;
|
|
391
377
|
}
|
|
378
|
+
animate(params) {
|
|
379
|
+
var _a;
|
|
380
|
+
this.animates || (this.animates = new Map);
|
|
381
|
+
const animate = new animate_1.Animate(null == params ? void 0 : params.id, null !== (_a = null == params ? void 0 : params.timeline) && void 0 !== _a ? _a : this.stage && this.stage.getTimeline(), null == params ? void 0 : params.slience);
|
|
382
|
+
if (animate.bind(this), params) {
|
|
383
|
+
const {onStart: onStart, onFrame: onFrame, onEnd: onEnd, onRemove: onRemove} = params;
|
|
384
|
+
null != onStart && animate.onStart(onStart), null != onFrame && animate.onFrame(onFrame),
|
|
385
|
+
null != onEnd && animate.onEnd(onEnd), null != onRemove && animate.onRemove(onRemove),
|
|
386
|
+
animate.interpolateFunc = params.interpolate;
|
|
387
|
+
}
|
|
388
|
+
return this.animates.set(animate.id, animate), animate.onRemove((() => {
|
|
389
|
+
animate.stop(), this.animates.delete(animate.id);
|
|
390
|
+
})), animate;
|
|
391
|
+
}
|
|
392
392
|
onAttributeUpdate(context) {
|
|
393
|
-
context && context.skipUpdateCallback || (
|
|
393
|
+
context && context.skipUpdateCallback || (application_1.application.graphicService.onAttributeUpdate(this),
|
|
394
394
|
this._emitCustomEvent("afterAttributeUpdate", context));
|
|
395
395
|
}
|
|
396
396
|
update(d) {
|
|
@@ -405,29 +405,21 @@ class Graphic extends node_tree_1.Node {
|
|
|
405
405
|
return null === (_a = this.states) || void 0 === _a ? void 0 : _a[stateName];
|
|
406
406
|
}
|
|
407
407
|
applyStateAttrs(attrs, stateNames, hasAnimation, isClear) {
|
|
408
|
-
var _a, _b;
|
|
408
|
+
var _a, _b, _c, _d;
|
|
409
409
|
if (hasAnimation) {
|
|
410
410
|
const keys = Object.keys(attrs), noWorkAttrs = this.getNoWorkAnimateAttr(), animateAttrs = {};
|
|
411
411
|
let noAnimateAttrs;
|
|
412
412
|
keys.forEach((key => {
|
|
413
413
|
noWorkAttrs[key] ? (noAnimateAttrs || (noAnimateAttrs = {}), noAnimateAttrs[key] = attrs[key]) : animateAttrs[key] = isClear && void 0 === attrs[key] ? this.getDefaultAttribute(key) : attrs[key];
|
|
414
414
|
}));
|
|
415
|
-
const
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
to: animateAttrs,
|
|
421
|
-
duration: stateAnimateConfig.duration,
|
|
422
|
-
easing: stateAnimateConfig.easing
|
|
423
|
-
}
|
|
424
|
-
} ]), noAnimateAttrs && this.setAttributesAndPreventAnimate(noAnimateAttrs, !1, {
|
|
415
|
+
const animate = this.animate({
|
|
416
|
+
slience: !0
|
|
417
|
+
});
|
|
418
|
+
animate.stateNames = stateNames, animate.to(animateAttrs, null !== (_b = null === (_a = this.stateAnimateConfig) || void 0 === _a ? void 0 : _a.duration) && void 0 !== _b ? _b : animate_1.DefaultStateAnimateConfig.duration, null !== (_d = null === (_c = this.stateAnimateConfig) || void 0 === _c ? void 0 : _c.easing) && void 0 !== _d ? _d : animate_1.DefaultStateAnimateConfig.easing),
|
|
419
|
+
noAnimateAttrs && this.setAttributes(noAnimateAttrs, !1, {
|
|
425
420
|
type: enums_1.AttributeUpdateType.STATE
|
|
426
421
|
});
|
|
427
|
-
} else this.stopStateAnimates(), this.
|
|
428
|
-
type: enums_1.AttributeUpdateType.STATE
|
|
429
|
-
});
|
|
430
|
-
this._emitCustomEvent("afterStateUpdate", {
|
|
422
|
+
} else this.stopStateAnimates(), this.setAttributes(attrs, !1, {
|
|
431
423
|
type: enums_1.AttributeUpdateType.STATE
|
|
432
424
|
});
|
|
433
425
|
}
|
|
@@ -447,9 +439,13 @@ class Graphic extends node_tree_1.Node {
|
|
|
447
439
|
}));
|
|
448
440
|
}
|
|
449
441
|
getNormalAttribute(key) {
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
442
|
+
let value = this.attribute[key];
|
|
443
|
+
return this.animates && this.animates.forEach((animate => {
|
|
444
|
+
if (animate.stateNames) {
|
|
445
|
+
const endProps = animate.getEndProps();
|
|
446
|
+
(0, vutils_2.has)(endProps, key) && (value = endProps[key]);
|
|
447
|
+
}
|
|
448
|
+
})), value;
|
|
453
449
|
}
|
|
454
450
|
clearStates(hasAnimation) {
|
|
455
451
|
this.hasState() && this.normalAttrs ? (this.currentStates = [], this.applyStateAttrs(this.normalAttrs, this.currentStates, hasAnimation, !0)) : this.currentStates = [],
|
|
@@ -573,10 +569,10 @@ class Graphic extends node_tree_1.Node {
|
|
|
573
569
|
this.animates && this.animates.size) {
|
|
574
570
|
const timeline = stage.getTimeline();
|
|
575
571
|
this.animates.forEach((a => {
|
|
576
|
-
a.timeline.
|
|
572
|
+
a.timeline === animate_1.defaultTimeline && a.setTimeline(timeline);
|
|
577
573
|
}));
|
|
578
574
|
}
|
|
579
|
-
this._onSetStage && this._onSetStage(this, stage, layer),
|
|
575
|
+
this._onSetStage && this._onSetStage(this, stage, layer), application_1.application.graphicService.onSetStage(this, stage);
|
|
580
576
|
}
|
|
581
577
|
}
|
|
582
578
|
setStageToShadowRoot(stage, layer) {
|
|
@@ -588,6 +584,76 @@ class Graphic extends node_tree_1.Node {
|
|
|
588
584
|
type: enums_1.AttributeUpdateType.ANIMATE_END
|
|
589
585
|
});
|
|
590
586
|
}
|
|
587
|
+
onStep(subAnimate, animate, step, ratio, end) {
|
|
588
|
+
const nextAttributes = {};
|
|
589
|
+
if (step.customAnimate) step.customAnimate.update(end, ratio, nextAttributes); else {
|
|
590
|
+
const nextProps = step.props, nextParsedProps = step.parsedProps, propKeys = step.propKeys;
|
|
591
|
+
this.stepInterpolate(subAnimate, animate, nextAttributes, step, ratio, end, nextProps, void 0, nextParsedProps, propKeys);
|
|
592
|
+
}
|
|
593
|
+
this.setAttributes(nextAttributes, !1, {
|
|
594
|
+
type: enums_1.AttributeUpdateType.ANIMATE_UPDATE,
|
|
595
|
+
animationState: {
|
|
596
|
+
ratio: ratio,
|
|
597
|
+
end: end,
|
|
598
|
+
step: step,
|
|
599
|
+
isFirstFrameOfStep: subAnimate.getLastStep() !== step
|
|
600
|
+
}
|
|
601
|
+
}), this.stage && this.stage.renderNextFrame();
|
|
602
|
+
}
|
|
603
|
+
stepInterpolate(subAnimate, animate, nextAttributes, step, ratio, end, nextProps, lastProps, nextParsedProps, propKeys) {
|
|
604
|
+
propKeys || (propKeys = Object.keys(nextProps), step.propKeys = propKeys), end ? step.propKeys.forEach((key => {
|
|
605
|
+
animate.validAttr(key) && (nextAttributes[key] = nextProps[key]);
|
|
606
|
+
})) : propKeys.forEach((key => {
|
|
607
|
+
var _a;
|
|
608
|
+
if (!animate.validAttr(key)) return;
|
|
609
|
+
const nextStepVal = nextProps[key], lastStepVal = null !== (_a = lastProps && lastProps[key]) && void 0 !== _a ? _a : subAnimate.getLastPropByName(key, step);
|
|
610
|
+
if (null == nextStepVal || null == lastStepVal || nextStepVal === lastStepVal) return void (nextAttributes[key] = nextStepVal);
|
|
611
|
+
let match;
|
|
612
|
+
match = animate.interpolateFunc && animate.interpolateFunc(key, ratio, lastStepVal, nextStepVal, nextAttributes),
|
|
613
|
+
match || (match = animate.customInterpolate(key, ratio, lastStepVal, nextStepVal, this, nextAttributes),
|
|
614
|
+
match || this.defaultInterpolate(nextStepVal, lastStepVal, key, nextAttributes, nextParsedProps, ratio) || this._interpolate(key, ratio, lastStepVal, nextStepVal, nextAttributes));
|
|
615
|
+
})), step.parsedProps = nextParsedProps;
|
|
616
|
+
}
|
|
617
|
+
defaultInterpolate(nextStepVal, lastStepVal, key, nextAttributes, nextParsedProps, ratio) {
|
|
618
|
+
if (Number.isFinite(nextStepVal) && Number.isFinite(lastStepVal)) return nextAttributes[key] = lastStepVal + (nextStepVal - lastStepVal) * ratio,
|
|
619
|
+
!0;
|
|
620
|
+
if ("fill" === key) {
|
|
621
|
+
nextParsedProps || (nextParsedProps = {});
|
|
622
|
+
const fillColorArray = nextParsedProps.fillColorArray, color = (0, interpolate_1.interpolateColor)(lastStepVal, null != fillColorArray ? fillColorArray : nextStepVal, ratio, !1, ((fArray, tArray) => {
|
|
623
|
+
nextParsedProps.fillColorArray = tArray;
|
|
624
|
+
}));
|
|
625
|
+
return color && (nextAttributes[key] = color), !0;
|
|
626
|
+
}
|
|
627
|
+
if ("stroke" === key) {
|
|
628
|
+
nextParsedProps || (nextParsedProps = {});
|
|
629
|
+
const strokeColorArray = nextParsedProps.strokeColorArray, color = (0, interpolate_1.interpolateColor)(lastStepVal, null != strokeColorArray ? strokeColorArray : nextStepVal, ratio, !1, ((fArray, tArray) => {
|
|
630
|
+
nextParsedProps.strokeColorArray = tArray;
|
|
631
|
+
}));
|
|
632
|
+
return color && (nextAttributes[key] = color), !0;
|
|
633
|
+
}
|
|
634
|
+
if ("shadowColor" === key) {
|
|
635
|
+
nextParsedProps || (nextParsedProps = {});
|
|
636
|
+
const shadowColorArray = nextParsedProps.shadowColorArray, color = (0, interpolate_1.interpolateColor)(lastStepVal, null != shadowColorArray ? shadowColorArray : nextStepVal, ratio, !0, ((fArray, tArray) => {
|
|
637
|
+
nextParsedProps.shadowColorArray = tArray;
|
|
638
|
+
}));
|
|
639
|
+
return color && (nextAttributes[key] = color), !0;
|
|
640
|
+
}
|
|
641
|
+
if (Array.isArray(nextStepVal) && nextStepVal.length === lastStepVal.length) {
|
|
642
|
+
const nextList = [];
|
|
643
|
+
let valid = !0;
|
|
644
|
+
for (let i = 0; i < nextStepVal.length; i++) {
|
|
645
|
+
const v = lastStepVal[i], val = v + (nextStepVal[i] - v) * ratio;
|
|
646
|
+
if (!Number.isFinite(val)) {
|
|
647
|
+
valid = !1;
|
|
648
|
+
break;
|
|
649
|
+
}
|
|
650
|
+
nextList.push(val);
|
|
651
|
+
}
|
|
652
|
+
valid && (nextAttributes[key] = nextList);
|
|
653
|
+
}
|
|
654
|
+
return !1;
|
|
655
|
+
}
|
|
656
|
+
_interpolate(key, ratio, lastStepVal, nextStepVal, nextAttributes) {}
|
|
591
657
|
getDefaultAttribute(name) {
|
|
592
658
|
return this.getGraphicTheme()[name];
|
|
593
659
|
}
|
|
@@ -670,15 +736,6 @@ class Graphic extends node_tree_1.Node {
|
|
|
670
736
|
this.dispatchEvent(changeEvent);
|
|
671
737
|
}
|
|
672
738
|
}
|
|
673
|
-
toCustomPath() {
|
|
674
|
-
var _a, _b, _c;
|
|
675
|
-
const renderer = null === (_c = null === (_b = (null === (_a = this.stage) || void 0 === _a ? void 0 : _a.renderService) || application_1.application.renderService) || void 0 === _b ? void 0 : _b.drawContribution) || void 0 === _c ? void 0 : _c.getRenderContribution(this);
|
|
676
|
-
if (renderer) {
|
|
677
|
-
const context = new canvas_1.EmptyContext2d(null, 1);
|
|
678
|
-
return renderer.drawShape(this, context, 0, 0, {}, {}), context.path;
|
|
679
|
-
}
|
|
680
|
-
return null;
|
|
681
|
-
}
|
|
682
739
|
}
|
|
683
740
|
|
|
684
741
|
function backgroundNotImage(image) {
|