@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/graphic/graphic.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
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,
|
|
4
|
+
import type { GraphicType, IAnimateConfig, IGraphicAttribute, IGraphic, 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,
|
|
7
|
-
import { Animate } from '../animate';
|
|
6
|
+
import type { IAnimate, IAnimateTarget, IGlyphGraphicAttribute, ILayer, IPickerService, IShadowRoot, IStage, IStep, ISymbolClass } from '../interface';
|
|
8
7
|
import { IContainPointMode } from '../common/enums';
|
|
9
8
|
import { CustomSymbolClass } from './builtin-symbol';
|
|
10
9
|
export declare const PURE_STYLE_KEY: string[];
|
|
@@ -42,6 +41,7 @@ export declare const NOWORK_ANIMATE_ATTR: {
|
|
|
42
41
|
export declare abstract class Graphic<T extends Partial<IGraphicAttribute> = Partial<IGraphicAttribute>> extends Node implements IGraphic<T>, IAnimateTarget {
|
|
43
42
|
static mixin(source: Dict<any>): void;
|
|
44
43
|
_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
|
-
|
|
90
|
-
prevAttrs?: T;
|
|
91
|
-
finalAttrs?: T;
|
|
89
|
+
animate?: () => IAnimate;
|
|
92
90
|
pathProxy?: ICustomPath2D;
|
|
93
91
|
attachedThemeGraphic?: IGraphic;
|
|
94
92
|
protected updateAABBBoundsStamp: number;
|
|
95
93
|
protected updateOBBBoundsStamp?: number;
|
|
96
94
|
clipPathMap?: Map<string, ISymbolClass>;
|
|
97
95
|
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
|
|
102
|
+
onAnimateBind(animate: IAnimate): void;
|
|
103
103
|
protected tryUpdateAABBBounds(): IAABBBounds;
|
|
104
104
|
protected tryUpdateOBBBounds(): IOBBBounds;
|
|
105
105
|
protected combindShadowAABBBounds(bounds: IAABBBounds): void;
|
|
@@ -123,6 +123,7 @@ 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;
|
|
126
127
|
setAttributes(params: Partial<T>, forceUpdateTag?: boolean, context?: ISetAttributeContext): void;
|
|
127
128
|
_setAttributes(params: Partial<T>, forceUpdateTag?: boolean, context?: ISetAttributeContext): void;
|
|
128
129
|
setAttribute(key: string, value: any, forceUpdateTag?: boolean, context?: ISetAttributeContext): void;
|
|
@@ -136,7 +137,6 @@ export declare abstract class Graphic<T extends Partial<IGraphicAttribute> = Par
|
|
|
136
137
|
rotate(angle: number, rotateCenter?: IPointLike): this;
|
|
137
138
|
rotateTo(angle: number): this;
|
|
138
139
|
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,10 +174,6 @@ 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;
|
|
181
177
|
getDefaultAttribute(name: string): any;
|
|
182
178
|
getComputedAttribute(name: string): any;
|
|
183
179
|
onSetStage(cb: (g: IGraphic, stage: IStage) => void, immediate?: boolean): void;
|
|
@@ -195,4 +191,5 @@ export declare abstract class Graphic<T extends Partial<IGraphicAttribute> = Par
|
|
|
195
191
|
protected _emitCustomEvent(type: string, context?: any): void;
|
|
196
192
|
abstract getNoWorkAnimateAttr(): Record<string, number>;
|
|
197
193
|
abstract clone(): IGraphic<any>;
|
|
194
|
+
toCustomPath(): ICustomPath2D;
|
|
198
195
|
}
|
package/es/graphic/graphic.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isArray, max, OBBBounds } from "@visactor/vutils";
|
|
2
2
|
|
|
3
|
-
import { AABBBounds, Matrix, normalTransform, Point, isNil,
|
|
3
|
+
import { AABBBounds, Matrix, normalTransform, Point, isNil, isString, isValidUrl, isBase64, isObject } from "@visactor/vutils";
|
|
4
4
|
|
|
5
5
|
import { Node } from "./node-tree";
|
|
6
6
|
|
|
@@ -10,10 +10,6 @@ import { DefaultTransform } from "./config";
|
|
|
10
10
|
|
|
11
11
|
import { application } from "../application";
|
|
12
12
|
|
|
13
|
-
import { Animate, DefaultStateAnimateConfig, defaultTimeline } from "../animate";
|
|
14
|
-
|
|
15
|
-
import { interpolateColor } from "../color-string/interpolate";
|
|
16
|
-
|
|
17
13
|
import { CustomPath2D } from "../common/custom-path2d";
|
|
18
14
|
|
|
19
15
|
import { ResourceLoader } from "../resource-loader/loader";
|
|
@@ -32,6 +28,10 @@ import { isSvg, XMLParser } from "../common/xml";
|
|
|
32
28
|
|
|
33
29
|
import { SVG_PARSE_ATTRIBUTE_MAP, SVG_PARSE_ATTRIBUTE_MAP_KEYS } from "./constants";
|
|
34
30
|
|
|
31
|
+
import { DefaultStateAnimateConfig } from "../animate/config";
|
|
32
|
+
|
|
33
|
+
import { EmptyContext2d } from "../canvas";
|
|
34
|
+
|
|
35
35
|
const _tempBounds = new AABBBounds, tempMatrix = new Matrix, tempBounds = new AABBBounds;
|
|
36
36
|
|
|
37
37
|
export const PURE_STYLE_KEY = [ "stroke", "opacity", "strokeOpacity", "lineDash", "lineDashOffset", "lineCap", "lineJoin", "miterLimit", "fill", "fillOpacity" ];
|
|
@@ -99,6 +99,13 @@ export class Graphic extends Node {
|
|
|
99
99
|
super(), this._AABBBounds = new AABBBounds, this._updateTag = UpdateTag.INIT, this.attribute = params,
|
|
100
100
|
this.valid = this.isValid(), this.updateAABBBoundsStamp = 0, params.background ? this.loadImage(null !== (_a = params.background.background) && void 0 !== _a ? _a : params.background, !0) : params.shadowGraphic && this.setShadowGraphic(params.shadowGraphic);
|
|
101
101
|
}
|
|
102
|
+
getGraphicService() {
|
|
103
|
+
var _a, _b;
|
|
104
|
+
return null !== (_b = null === (_a = this.stage) || void 0 === _a ? void 0 : _a.graphicService) && void 0 !== _b ? _b : application.graphicService;
|
|
105
|
+
}
|
|
106
|
+
getAttributes() {
|
|
107
|
+
return this.attribute;
|
|
108
|
+
}
|
|
102
109
|
setMode(mode) {
|
|
103
110
|
"3d" === mode ? this.set3dMode() : this.set2dMode();
|
|
104
111
|
}
|
|
@@ -124,9 +131,9 @@ export class Graphic extends Node {
|
|
|
124
131
|
const full = "imprecise" === this.attribute.boundsMode;
|
|
125
132
|
if (!this.shouldUpdateAABBBounds()) return this._AABBBounds;
|
|
126
133
|
if (!this.valid) return this._AABBBounds.clear(), this._AABBBounds;
|
|
127
|
-
|
|
134
|
+
this.getGraphicService().beforeUpdateAABBBounds(this, this.stage, !0, this._AABBBounds);
|
|
128
135
|
const bounds = this.doUpdateAABBBounds(full);
|
|
129
|
-
return
|
|
136
|
+
return this.getGraphicService().afterUpdateAABBBounds(this, this.stage, this._AABBBounds, this, !0),
|
|
130
137
|
"empty" === this.attribute.boundsMode && bounds.clear(), bounds;
|
|
131
138
|
}
|
|
132
139
|
tryUpdateOBBBounds() {
|
|
@@ -222,7 +229,7 @@ export class Graphic extends Node {
|
|
|
222
229
|
clearTag && this.clearUpdateLocalPositionTag()), this._transMatrix;
|
|
223
230
|
}
|
|
224
231
|
shouldUpdateAABBBounds() {
|
|
225
|
-
return this.shadowRoot ? (!!(this._updateTag & UpdateTag.UPDATE_BOUNDS) || this.shadowRoot.shouldUpdateAABBBounds()) &&
|
|
232
|
+
return this.shadowRoot ? (!!(this._updateTag & UpdateTag.UPDATE_BOUNDS) || this.shadowRoot.shouldUpdateAABBBounds()) && this.getGraphicService().validCheck(this.attribute, this.getGraphicTheme(), this._AABBBounds, this) : !!(this._updateTag & UpdateTag.UPDATE_BOUNDS) && this.getGraphicService().validCheck(this.attribute, this.getGraphicTheme(), this._AABBBounds, this);
|
|
226
233
|
}
|
|
227
234
|
shouldSelfChangeUpdateAABBBounds() {
|
|
228
235
|
return this.shadowRoot ? !!(this._updateTag & UpdateTag.UPDATE_BOUNDS) || this.shadowRoot.shouldUpdateAABBBounds() : !!(this._updateTag & UpdateTag.UPDATE_BOUNDS);
|
|
@@ -259,6 +266,13 @@ export class Graphic extends Node {
|
|
|
259
266
|
setWidthHeightWithoutTransform(aabbBounds) {
|
|
260
267
|
this.widthWithoutTransform = aabbBounds.x2 - aabbBounds.x1, this.heightWithoutTransform = aabbBounds.y2 - aabbBounds.y1;
|
|
261
268
|
}
|
|
269
|
+
setAttributesAndPreventAnimate(params, forceUpdateTag = !1, context) {
|
|
270
|
+
this.setAttributes(params, forceUpdateTag, context), this.animates && this.animates.forEach((animate => {
|
|
271
|
+
Object.keys(params).forEach((key => {
|
|
272
|
+
animate.preventAttr(key);
|
|
273
|
+
}));
|
|
274
|
+
}));
|
|
275
|
+
}
|
|
262
276
|
setAttributes(params, forceUpdateTag = !1, context) {
|
|
263
277
|
(params = this.onBeforeAttributeUpdate && this.onBeforeAttributeUpdate(params, this.attribute, null, context) || params).background ? this.loadImage(params.background, !0) : params.shadowGraphic && this.setShadowGraphic(params.shadowGraphic),
|
|
264
278
|
this._setAttributes(params, forceUpdateTag, context);
|
|
@@ -397,22 +411,8 @@ export class Graphic extends Node {
|
|
|
397
411
|
skewTo(b, c) {
|
|
398
412
|
return this;
|
|
399
413
|
}
|
|
400
|
-
animate(params) {
|
|
401
|
-
var _a;
|
|
402
|
-
this.animates || (this.animates = new Map);
|
|
403
|
-
const animate = new 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);
|
|
404
|
-
if (animate.bind(this), params) {
|
|
405
|
-
const {onStart: onStart, onFrame: onFrame, onEnd: onEnd, onRemove: onRemove} = params;
|
|
406
|
-
null != onStart && animate.onStart(onStart), null != onFrame && animate.onFrame(onFrame),
|
|
407
|
-
null != onEnd && animate.onEnd(onEnd), null != onRemove && animate.onRemove(onRemove),
|
|
408
|
-
animate.interpolateFunc = params.interpolate;
|
|
409
|
-
}
|
|
410
|
-
return this.animates.set(animate.id, animate), animate.onRemove((() => {
|
|
411
|
-
animate.stop(), this.animates.delete(animate.id);
|
|
412
|
-
})), animate;
|
|
413
|
-
}
|
|
414
414
|
onAttributeUpdate(context) {
|
|
415
|
-
context && context.skipUpdateCallback || (
|
|
415
|
+
context && context.skipUpdateCallback || (this.getGraphicService().onAttributeUpdate(this),
|
|
416
416
|
this._emitCustomEvent("afterAttributeUpdate", context));
|
|
417
417
|
}
|
|
418
418
|
update(d) {
|
|
@@ -427,21 +427,29 @@ export class Graphic extends Node {
|
|
|
427
427
|
return null === (_a = this.states) || void 0 === _a ? void 0 : _a[stateName];
|
|
428
428
|
}
|
|
429
429
|
applyStateAttrs(attrs, stateNames, hasAnimation, isClear) {
|
|
430
|
-
var _a, _b
|
|
430
|
+
var _a, _b;
|
|
431
431
|
if (hasAnimation) {
|
|
432
432
|
const keys = Object.keys(attrs), noWorkAttrs = this.getNoWorkAnimateAttr(), animateAttrs = {};
|
|
433
433
|
let noAnimateAttrs;
|
|
434
434
|
keys.forEach((key => {
|
|
435
435
|
noWorkAttrs[key] ? (noAnimateAttrs || (noAnimateAttrs = {}), noAnimateAttrs[key] = attrs[key]) : animateAttrs[key] = isClear && void 0 === attrs[key] ? this.getDefaultAttribute(key) : attrs[key];
|
|
436
436
|
}));
|
|
437
|
-
const
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
437
|
+
const stateAnimateConfig = null !== (_b = null !== (_a = this.context && this.context.stateAnimateConfig) && void 0 !== _a ? _a : this.stateAnimateConfig) && void 0 !== _b ? _b : DefaultStateAnimateConfig;
|
|
438
|
+
this.applyAnimationState([ "state" ], [ {
|
|
439
|
+
name: "state",
|
|
440
|
+
animation: {
|
|
441
|
+
type: "state",
|
|
442
|
+
to: animateAttrs,
|
|
443
|
+
duration: stateAnimateConfig.duration,
|
|
444
|
+
easing: stateAnimateConfig.easing
|
|
445
|
+
}
|
|
446
|
+
} ]), noAnimateAttrs && this.setAttributesAndPreventAnimate(noAnimateAttrs, !1, {
|
|
442
447
|
type: AttributeUpdateType.STATE
|
|
443
448
|
});
|
|
444
|
-
} else this.stopStateAnimates(), this.
|
|
449
|
+
} else this.stopStateAnimates(), this.setAttributesAndPreventAnimate(attrs, !1, {
|
|
450
|
+
type: AttributeUpdateType.STATE
|
|
451
|
+
});
|
|
452
|
+
this._emitCustomEvent("afterStateUpdate", {
|
|
445
453
|
type: AttributeUpdateType.STATE
|
|
446
454
|
});
|
|
447
455
|
}
|
|
@@ -461,13 +469,9 @@ export class Graphic extends Node {
|
|
|
461
469
|
}));
|
|
462
470
|
}
|
|
463
471
|
getNormalAttribute(key) {
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
const endProps = animate.getEndProps();
|
|
468
|
-
has(endProps, key) && (value = endProps[key]);
|
|
469
|
-
}
|
|
470
|
-
})), value;
|
|
472
|
+
var _a, _b;
|
|
473
|
+
const value = this.attribute[key];
|
|
474
|
+
return this.animates ? null === (_a = this.finalAttribute) || void 0 === _a ? void 0 : _a[key] : null != value ? value : null === (_b = this.finalAttribute) || void 0 === _b ? void 0 : _b[key];
|
|
471
475
|
}
|
|
472
476
|
clearStates(hasAnimation) {
|
|
473
477
|
this.hasState() && this.normalAttrs ? (this.currentStates = [], this.applyStateAttrs(this.normalAttrs, this.currentStates, hasAnimation, !0)) : this.currentStates = [],
|
|
@@ -590,10 +594,10 @@ export class Graphic extends Node {
|
|
|
590
594
|
this.animates && this.animates.size) {
|
|
591
595
|
const timeline = stage.getTimeline();
|
|
592
596
|
this.animates.forEach((a => {
|
|
593
|
-
a.timeline
|
|
597
|
+
a.timeline.isGlobal && (a.setTimeline(timeline), timeline.addAnimate(a));
|
|
594
598
|
}));
|
|
595
599
|
}
|
|
596
|
-
this._onSetStage && this._onSetStage(this, stage, layer),
|
|
600
|
+
this._onSetStage && this._onSetStage(this, stage, layer), this.getGraphicService().onSetStage(this, stage);
|
|
597
601
|
}
|
|
598
602
|
}
|
|
599
603
|
setStageToShadowRoot(stage, layer) {
|
|
@@ -605,76 +609,6 @@ export class Graphic extends Node {
|
|
|
605
609
|
type: AttributeUpdateType.ANIMATE_END
|
|
606
610
|
});
|
|
607
611
|
}
|
|
608
|
-
onStep(subAnimate, animate, step, ratio, end) {
|
|
609
|
-
const nextAttributes = {};
|
|
610
|
-
if (step.customAnimate) step.customAnimate.update(end, ratio, nextAttributes); else {
|
|
611
|
-
const nextProps = step.props, nextParsedProps = step.parsedProps, propKeys = step.propKeys;
|
|
612
|
-
this.stepInterpolate(subAnimate, animate, nextAttributes, step, ratio, end, nextProps, void 0, nextParsedProps, propKeys);
|
|
613
|
-
}
|
|
614
|
-
this.setAttributes(nextAttributes, !1, {
|
|
615
|
-
type: AttributeUpdateType.ANIMATE_UPDATE,
|
|
616
|
-
animationState: {
|
|
617
|
-
ratio: ratio,
|
|
618
|
-
end: end,
|
|
619
|
-
step: step,
|
|
620
|
-
isFirstFrameOfStep: subAnimate.getLastStep() !== step
|
|
621
|
-
}
|
|
622
|
-
}), this.stage && this.stage.renderNextFrame();
|
|
623
|
-
}
|
|
624
|
-
stepInterpolate(subAnimate, animate, nextAttributes, step, ratio, end, nextProps, lastProps, nextParsedProps, propKeys) {
|
|
625
|
-
propKeys || (propKeys = Object.keys(nextProps), step.propKeys = propKeys), end ? step.propKeys.forEach((key => {
|
|
626
|
-
animate.validAttr(key) && (nextAttributes[key] = nextProps[key]);
|
|
627
|
-
})) : propKeys.forEach((key => {
|
|
628
|
-
var _a;
|
|
629
|
-
if (!animate.validAttr(key)) return;
|
|
630
|
-
const nextStepVal = nextProps[key], lastStepVal = null !== (_a = lastProps && lastProps[key]) && void 0 !== _a ? _a : subAnimate.getLastPropByName(key, step);
|
|
631
|
-
if (null == nextStepVal || null == lastStepVal || nextStepVal === lastStepVal) return void (nextAttributes[key] = nextStepVal);
|
|
632
|
-
let match;
|
|
633
|
-
match = animate.interpolateFunc && animate.interpolateFunc(key, ratio, lastStepVal, nextStepVal, nextAttributes),
|
|
634
|
-
match || (match = animate.customInterpolate(key, ratio, lastStepVal, nextStepVal, this, nextAttributes),
|
|
635
|
-
match || this.defaultInterpolate(nextStepVal, lastStepVal, key, nextAttributes, nextParsedProps, ratio) || this._interpolate(key, ratio, lastStepVal, nextStepVal, nextAttributes));
|
|
636
|
-
})), step.parsedProps = nextParsedProps;
|
|
637
|
-
}
|
|
638
|
-
defaultInterpolate(nextStepVal, lastStepVal, key, nextAttributes, nextParsedProps, ratio) {
|
|
639
|
-
if (Number.isFinite(nextStepVal) && Number.isFinite(lastStepVal)) return nextAttributes[key] = lastStepVal + (nextStepVal - lastStepVal) * ratio,
|
|
640
|
-
!0;
|
|
641
|
-
if ("fill" === key) {
|
|
642
|
-
nextParsedProps || (nextParsedProps = {});
|
|
643
|
-
const fillColorArray = nextParsedProps.fillColorArray, color = interpolateColor(lastStepVal, null != fillColorArray ? fillColorArray : nextStepVal, ratio, !1, ((fArray, tArray) => {
|
|
644
|
-
nextParsedProps.fillColorArray = tArray;
|
|
645
|
-
}));
|
|
646
|
-
return color && (nextAttributes[key] = color), !0;
|
|
647
|
-
}
|
|
648
|
-
if ("stroke" === key) {
|
|
649
|
-
nextParsedProps || (nextParsedProps = {});
|
|
650
|
-
const strokeColorArray = nextParsedProps.strokeColorArray, color = interpolateColor(lastStepVal, null != strokeColorArray ? strokeColorArray : nextStepVal, ratio, !1, ((fArray, tArray) => {
|
|
651
|
-
nextParsedProps.strokeColorArray = tArray;
|
|
652
|
-
}));
|
|
653
|
-
return color && (nextAttributes[key] = color), !0;
|
|
654
|
-
}
|
|
655
|
-
if ("shadowColor" === key) {
|
|
656
|
-
nextParsedProps || (nextParsedProps = {});
|
|
657
|
-
const shadowColorArray = nextParsedProps.shadowColorArray, color = interpolateColor(lastStepVal, null != shadowColorArray ? shadowColorArray : nextStepVal, ratio, !0, ((fArray, tArray) => {
|
|
658
|
-
nextParsedProps.shadowColorArray = tArray;
|
|
659
|
-
}));
|
|
660
|
-
return color && (nextAttributes[key] = color), !0;
|
|
661
|
-
}
|
|
662
|
-
if (Array.isArray(nextStepVal) && nextStepVal.length === lastStepVal.length) {
|
|
663
|
-
const nextList = [];
|
|
664
|
-
let valid = !0;
|
|
665
|
-
for (let i = 0; i < nextStepVal.length; i++) {
|
|
666
|
-
const v = lastStepVal[i], val = v + (nextStepVal[i] - v) * ratio;
|
|
667
|
-
if (!Number.isFinite(val)) {
|
|
668
|
-
valid = !1;
|
|
669
|
-
break;
|
|
670
|
-
}
|
|
671
|
-
nextList.push(val);
|
|
672
|
-
}
|
|
673
|
-
valid && (nextAttributes[key] = nextList);
|
|
674
|
-
}
|
|
675
|
-
return !1;
|
|
676
|
-
}
|
|
677
|
-
_interpolate(key, ratio, lastStepVal, nextStepVal, nextAttributes) {}
|
|
678
612
|
getDefaultAttribute(name) {
|
|
679
613
|
return this.getGraphicTheme()[name];
|
|
680
614
|
}
|
|
@@ -756,6 +690,15 @@ export class Graphic extends Node {
|
|
|
756
690
|
this.dispatchEvent(changeEvent);
|
|
757
691
|
}
|
|
758
692
|
}
|
|
693
|
+
toCustomPath() {
|
|
694
|
+
var _a, _b, _c;
|
|
695
|
+
const renderer = null === (_c = null === (_b = (null === (_a = this.stage) || void 0 === _a ? void 0 : _a.renderService) || application.renderService) || void 0 === _b ? void 0 : _b.drawContribution) || void 0 === _c ? void 0 : _c.getRenderContribution(this);
|
|
696
|
+
if (renderer) {
|
|
697
|
+
const context = new EmptyContext2d(null, 1);
|
|
698
|
+
return renderer.drawShape(this, context, 0, 0, {}, {}), context.path;
|
|
699
|
+
}
|
|
700
|
+
return null;
|
|
701
|
+
}
|
|
759
702
|
}
|
|
760
703
|
|
|
761
704
|
function backgroundNotImage(image) {
|