@visactor/vstory 0.0.4-alpha.2 → 0.0.4
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/typewirter.d.ts +3 -4
- package/cjs/animate/typewirter.js +44 -30
- package/cjs/animate/typewirter.js.map +1 -1
- package/cjs/constants/action.d.ts +9 -0
- package/cjs/constants/action.js +10 -2
- package/cjs/constants/action.js.map +1 -1
- package/cjs/constants/character.d.ts +0 -1
- package/cjs/constants/character.js +1 -2
- package/cjs/constants/character.js.map +1 -1
- package/cjs/constants/config.js +2 -1
- package/cjs/dsl/constant/index.d.ts +13 -0
- package/cjs/dsl/constant/index.js +6 -1
- package/cjs/dsl/constant/index.js.map +1 -1
- package/cjs/dsl/story-chart/area.d.ts +2 -0
- package/cjs/dsl/story-chart/area.js +5 -1
- package/cjs/dsl/story-chart/area.js.map +1 -1
- package/cjs/dsl/story-chart/bar.d.ts +2 -0
- package/cjs/dsl/story-chart/bar.js +1 -1
- package/cjs/dsl/story-chart/bar.js.map +1 -1
- package/cjs/dsl/story-chart/chart.js +1 -2
- package/cjs/dsl/story-chart/line.d.ts +2 -0
- package/cjs/dsl/story-chart/line.js +1 -1
- package/cjs/dsl/story-chart/line.js.map +1 -1
- package/cjs/dsl/story-chart/pie.d.ts +2 -0
- package/cjs/dsl/story-chart/pie.js +3 -0
- package/cjs/dsl/story-chart/pie.js.map +1 -1
- package/cjs/dsl/story-processor/graphic/appear.js.map +1 -1
- package/cjs/dsl/story-processor/graphic/effect/appear.js +2 -7
- package/cjs/dsl/story-processor/graphic/effect/appear.js.map +1 -1
- package/cjs/dsl/story-processor/graphic/effect/typewriter.js +1 -1
- package/cjs/dsl/story-processor/graphic/effect/typewriter.js.map +1 -1
- package/cjs/dsl/story-processor/processor.js +1 -1
- package/cjs/dsl/utils/datum.js +2 -1
- package/cjs/dsl/utils/flicker.js +1 -1
- package/cjs/edit/edit-component/layer-edit.js +0 -2
- package/cjs/edit/edit-component/rect-selection.js +1 -1
- package/cjs/edit/edit-component/richtext-selection.js +1 -1
- package/cjs/edit/edit-component/text-selection.js +1 -1
- package/cjs/index.d.ts +0 -1
- package/cjs/index.js +1 -2
- package/cjs/index.js.map +1 -1
- package/cjs/interface/type.js +1 -2
- package/cjs/player/interface/player.d.ts +5 -2
- package/cjs/player/interface/player.js.map +1 -1
- package/cjs/player/interface/scheduler.d.ts +1 -1
- package/cjs/player/interface/scheduler.js.map +1 -1
- package/cjs/player/player.d.ts +7 -2
- package/cjs/player/player.js +25 -19
- package/cjs/player/player.js.map +1 -1
- package/cjs/player/processor/chart/common/chartAppear.d.ts +5 -0
- package/cjs/player/processor/chart/common/chartAppear.js +11 -0
- package/cjs/player/processor/chart/common/chartAppear.js.map +1 -0
- package/cjs/player/processor/chart/common/commonAppear.d.ts +8 -0
- package/cjs/player/processor/chart/common/commonAppear.js +46 -0
- package/cjs/player/processor/chart/common/commonAppear.js.map +1 -0
- package/cjs/player/processor/chart/component/axisAppear.d.ts +2 -2
- package/cjs/player/processor/chart/component/axisAppear.js +2 -2
- package/cjs/player/processor/chart/component/axisAppear.js.map +1 -1
- package/cjs/player/processor/chart/component/commonAppear.d.ts +3 -3
- package/cjs/player/processor/chart/component/commonAppear.js +5 -17
- package/cjs/player/processor/chart/component/commonAppear.js.map +1 -1
- package/cjs/player/processor/chart/component/labelAppear.d.ts +2 -2
- package/cjs/player/processor/chart/component/labelAppear.js +1 -1
- package/cjs/player/processor/chart/component/labelAppear.js.map +1 -1
- package/cjs/player/processor/chart/component/legendsAppear.d.ts +4 -3
- package/cjs/player/processor/chart/component/legendsAppear.js +2 -3
- package/cjs/player/processor/chart/component/legendsAppear.js.map +1 -1
- package/cjs/player/processor/chart/component/titleAppear.d.ts +4 -3
- package/cjs/player/processor/chart/component/titleAppear.js +2 -3
- package/cjs/player/processor/chart/component/titleAppear.js.map +1 -1
- package/cjs/player/processor/chart/seriesmark/commonTransformMarkAppear.d.ts +3 -3
- package/cjs/player/processor/chart/seriesmark/commonTransformMarkAppear.js.map +1 -1
- package/cjs/player/processor/chart/seriesmark/{transformArcAppear.d.ts → transformArcVisibility.d.ts} +2 -2
- package/cjs/player/processor/chart/seriesmark/{transformArcAppear.js → transformArcVisibility.js} +5 -6
- package/cjs/player/processor/chart/seriesmark/transformArcVisibility.js.map +1 -0
- package/cjs/player/processor/chart/seriesmark/{transformRectAppear.d.ts → transformLineVisibility.d.ts} +2 -2
- package/cjs/player/processor/chart/seriesmark/transformLineVisibility.js +12 -0
- package/cjs/player/processor/chart/seriesmark/transformLineVisibility.js.map +1 -0
- package/cjs/player/processor/chart/seriesmark/{transformLineAppear.d.ts → transformRectVisibility.d.ts} +2 -2
- package/cjs/player/processor/chart/seriesmark/{transformRectAppear.js → transformRectVisibility.js} +6 -7
- package/cjs/player/processor/chart/seriesmark/transformRectVisibility.js.map +1 -0
- package/cjs/player/processor/chart/seriesmark/transformSymbolVisibility.d.ts +12 -0
- package/cjs/player/processor/chart/seriesmark/transformSymbolVisibility.js +12 -0
- package/cjs/player/processor/chart/seriesmark/transformSymbolVisibility.js.map +1 -0
- package/cjs/player/processor/chart/seriesmark/transformTextVisibility.d.ts +12 -0
- package/cjs/player/processor/chart/seriesmark/transformTextVisibility.js +12 -0
- package/cjs/player/processor/chart/seriesmark/transformTextVisibility.js.map +1 -0
- package/cjs/player/processor/chart/transformMap.d.ts +24 -18
- package/cjs/player/processor/chart/transformMap.js +8 -7
- package/cjs/player/processor/chart/transformMap.js.map +1 -1
- package/cjs/player/processor/chart/vchart.d.ts +62 -15
- package/cjs/player/processor/chart/vchart.js +98 -11
- package/cjs/player/processor/chart/vchart.js.map +1 -1
- package/cjs/player/processor/common/bounce-processor.d.ts +3 -0
- package/cjs/player/processor/common/bounce-processor.js +24 -0
- package/cjs/player/processor/common/bounce-processor.js.map +1 -0
- package/cjs/player/processor/common/common.d.ts +5 -0
- package/cjs/player/processor/common/common.js +20 -0
- package/cjs/player/processor/common/common.js.map +1 -0
- package/cjs/player/processor/common/fade-processor.d.ts +4 -0
- package/cjs/player/processor/common/fade-processor.js +36 -0
- package/cjs/player/processor/common/fade-processor.js.map +1 -0
- package/cjs/player/processor/common/move-processor.d.ts +8 -0
- package/cjs/player/processor/common/move-processor.js +155 -0
- package/cjs/player/processor/common/move-processor.js.map +1 -0
- package/cjs/player/processor/common/scale-processor.d.ts +8 -0
- package/cjs/player/processor/common/scale-processor.js +49 -0
- package/cjs/player/processor/common/scale-processor.js.map +1 -0
- package/cjs/player/processor/common/wipe-processor.d.ts +4 -0
- package/cjs/player/processor/common/wipe-processor.js +40 -0
- package/cjs/player/processor/common/wipe-processor.js.map +1 -0
- package/cjs/player/processor/common-processor.js +3 -0
- package/cjs/player/processor/common-processor.js.map +1 -0
- package/cjs/player/processor/component/common-component.d.ts +45 -9
- package/cjs/player/processor/component/common-component.js +98 -77
- package/cjs/player/processor/component/common-component.js.map +1 -1
- package/cjs/player/processor/component/image/image-visibility.d.ts +5 -0
- package/cjs/player/processor/component/image/image-visibility.js +16 -0
- package/cjs/player/processor/component/image/image-visibility.js.map +1 -0
- package/cjs/player/processor/component/line/line-visibility.d.ts +5 -0
- package/cjs/player/processor/component/line/line-visibility.js +16 -0
- package/cjs/player/processor/component/line/line-visibility.js.map +1 -0
- package/cjs/player/processor/component/rect/rect-visibility.d.ts +5 -0
- package/cjs/player/processor/component/rect/rect-visibility.js +16 -0
- package/cjs/player/processor/component/rect/rect-visibility.js.map +1 -0
- package/cjs/player/processor/component/shape/shape-visibility.d.ts +5 -0
- package/cjs/player/processor/component/shape/shape-visibility.js +16 -0
- package/cjs/player/processor/component/shape/shape-visibility.js.map +1 -0
- package/cjs/player/processor/component/text/text-visibility.d.ts +6 -0
- package/cjs/player/processor/component/text/text-visibility.js +41 -0
- package/cjs/player/processor/component/text/text-visibility.js.map +1 -0
- package/cjs/player/processor/component/timeline/timeline-visibility.d.ts +15 -0
- package/cjs/player/processor/component/timeline/timeline-visibility.js +79 -0
- package/cjs/player/processor/component/timeline/timeline-visibility.js.map +1 -0
- package/cjs/player/processor/component/utils.d.ts +3 -1
- package/cjs/player/processor/component/utils.js +16 -1
- package/cjs/player/processor/component/utils.js.map +1 -1
- package/cjs/player/processor/interface/action-processor.d.ts +6 -6
- package/cjs/player/processor/interface/action-processor.js.map +1 -1
- package/cjs/player/processor/interface/appear-action.d.ts +30 -18
- package/cjs/player/processor/interface/appear-action.js.map +1 -1
- package/cjs/player/processor/interface/common-action.d.ts +14 -0
- package/cjs/player/processor/interface/common-action.js +6 -0
- package/cjs/player/processor/interface/common-action.js.map +1 -0
- package/cjs/player/processor/interface/style-action.d.ts +34 -0
- package/cjs/player/processor/interface/style-action.js +6 -0
- package/cjs/player/processor/interface/style-action.js.map +1 -0
- package/cjs/player/processor/processor-item.d.ts +5 -5
- package/cjs/player/processor/processor-item.js.map +1 -1
- package/cjs/player/processor/processor.d.ts +3 -3
- package/cjs/player/processor/processor.js +2 -2
- package/cjs/player/processor/processor.js.map +1 -1
- package/cjs/player/processor/processorMap.d.ts +22 -21
- package/cjs/player/processor/processorMap.js +42 -8
- package/cjs/player/processor/processorMap.js.map +1 -1
- package/cjs/player/scheduler.d.ts +4 -3
- package/cjs/player/scheduler.js +7 -5
- package/cjs/player/scheduler.js.map +1 -1
- package/cjs/story/canvas/canvas.d.ts +4 -2
- package/cjs/story/canvas/canvas.js +17 -10
- package/cjs/story/canvas/canvas.js.map +1 -1
- package/cjs/story/character/base/base.d.ts +3 -4
- package/cjs/story/character/base/base.js +6 -3
- package/cjs/story/character/base/base.js.map +1 -1
- package/cjs/story/character/chart/character.d.ts +1 -0
- package/cjs/story/character/chart/character.js +5 -2
- package/cjs/story/character/chart/character.js.map +1 -1
- package/cjs/story/character/chart/graphic/vchart-graphic-render.js +3 -3
- package/cjs/story/character/chart/graphic/vchart-graphic-render.js.map +1 -1
- package/cjs/story/character/chart/graphic/vchart-graphic.d.ts +1 -0
- package/cjs/story/character/chart/graphic/vchart-graphic.js +5 -1
- package/cjs/story/character/chart/graphic/vchart-graphic.js.map +1 -1
- package/cjs/story/character/component/character-group/component-group-graphic.d.ts +1 -0
- package/cjs/story/character/component/character-group/component-group-graphic.js +8 -2
- package/cjs/story/character/component/character-group/component-group-graphic.js.map +1 -1
- package/cjs/story/character/component/character.d.ts +4 -3
- package/cjs/story/character/component/character.js +8 -5
- package/cjs/story/character/component/character.js.map +1 -1
- package/cjs/story/character/component/characters/character-richtext.d.ts +1 -6
- package/cjs/story/character/component/characters/character-richtext.js +0 -16
- package/cjs/story/character/component/characters/character-richtext.js.map +1 -1
- package/cjs/story/character/component/characters/character-text.js +1 -1
- package/cjs/story/character/component/characters/character-text.js.map +1 -1
- package/cjs/story/character/component/graphic/graphic-base-text.d.ts +23 -0
- package/cjs/story/character/component/graphic/{graphic-text.js → graphic-base-text.js} +38 -22
- package/cjs/story/character/component/graphic/graphic-base-text.js.map +1 -0
- package/cjs/story/character/component/graphic/graphic.d.ts +1 -1
- package/cjs/story/character/component/graphic/graphic.js.map +1 -1
- package/cjs/story/character/component/graphic/richtext.d.ts +1 -9
- package/cjs/story/character/component/graphic/richtext.js +0 -45
- package/cjs/story/character/component/graphic/richtext.js.map +1 -1
- package/cjs/story/character/component/graphic/text.d.ts +4 -3
- package/cjs/story/character/component/graphic/text.js +21 -6
- package/cjs/story/character/component/graphic/text.js.map +1 -1
- package/cjs/story/character/component/graphic/timeline.d.ts +6 -0
- package/cjs/story/character/component/graphic/timeline.js +7 -1
- package/cjs/story/character/component/graphic/timeline.js.map +1 -1
- package/cjs/story/character/dsl-interface.d.ts +2 -2
- package/cjs/story/character/dsl-interface.js.map +1 -1
- package/cjs/story/character/runtime-interface.d.ts +1 -0
- package/cjs/story/character/runtime-interface.js.map +1 -1
- package/cjs/story/character/visactor/character.d.ts +2 -3
- package/cjs/story/character/visactor/character.js.map +1 -1
- package/cjs/story/character/visactor/interface.d.ts +1 -0
- package/cjs/story/character/visactor/interface.js.map +1 -1
- package/cjs/story/character-tree/character-tree.d.ts +1 -0
- package/cjs/story/character-tree/character-tree.js +6 -0
- package/cjs/story/character-tree/character-tree.js.map +1 -1
- package/cjs/story/index.js +1 -2
- package/cjs/story/index.js.map +1 -1
- package/cjs/story/interface/dsl-interface.d.ts +5 -8
- package/cjs/story/interface/dsl-interface.js.map +1 -1
- package/cjs/story/interface/player.d.ts +1 -13
- package/cjs/story/interface/player.js +1 -4
- package/cjs/story/interface/player.js.map +1 -1
- package/cjs/story/interface/runtime-interface.d.ts +3 -3
- package/cjs/story/interface/runtime-interface.js.map +1 -1
- package/cjs/story/story.d.ts +2 -1
- package/cjs/story/story.js +8 -6
- package/cjs/story/story.js.map +1 -1
- package/dist/index.js +53440 -0
- package/dist/index.min.js +20 -0
- package/es/animate/typewirter.d.ts +3 -4
- package/es/animate/typewirter.js +46 -30
- package/es/animate/typewirter.js.map +1 -1
- package/es/constants/action.d.ts +9 -0
- package/es/constants/action.js +11 -1
- package/es/constants/action.js.map +1 -1
- package/es/constants/character.d.ts +0 -1
- package/es/constants/character.js +1 -2
- package/es/constants/character.js.map +1 -1
- package/es/constants/config.js +2 -1
- package/es/dsl/constant/index.d.ts +13 -0
- package/es/dsl/constant/index.js +6 -1
- package/es/dsl/constant/index.js.map +1 -1
- package/es/dsl/story-chart/area.d.ts +2 -0
- package/es/dsl/story-chart/area.js +5 -1
- package/es/dsl/story-chart/area.js.map +1 -1
- package/es/dsl/story-chart/bar.d.ts +2 -0
- package/es/dsl/story-chart/bar.js +1 -1
- package/es/dsl/story-chart/bar.js.map +1 -1
- package/es/dsl/story-chart/chart.js +1 -2
- package/es/dsl/story-chart/line.d.ts +2 -0
- package/es/dsl/story-chart/line.js +1 -1
- package/es/dsl/story-chart/line.js.map +1 -1
- package/es/dsl/story-chart/pie.d.ts +2 -0
- package/es/dsl/story-chart/pie.js +3 -0
- package/es/dsl/story-chart/pie.js.map +1 -1
- package/es/dsl/story-processor/graphic/appear.js.map +1 -1
- package/es/dsl/story-processor/graphic/effect/appear.js +1 -8
- package/es/dsl/story-processor/graphic/effect/appear.js.map +1 -1
- package/es/dsl/story-processor/graphic/effect/typewriter.js +1 -1
- package/es/dsl/story-processor/graphic/effect/typewriter.js.map +1 -1
- package/es/dsl/story-processor/processor.js +1 -1
- package/es/dsl/utils/datum.js +2 -1
- package/es/dsl/utils/flicker.js +1 -1
- package/es/edit/edit-component/layer-edit.js +0 -2
- package/es/edit/edit-component/rect-selection.js +1 -1
- package/es/edit/edit-component/richtext-selection.js +1 -1
- package/es/edit/edit-component/text-selection.js +1 -1
- package/es/index.d.ts +0 -1
- package/es/index.js +1 -3
- package/es/index.js.map +1 -1
- package/es/interface/type.js +1 -2
- package/es/player/interface/player.d.ts +5 -2
- package/es/player/interface/player.js.map +1 -1
- package/es/player/interface/scheduler.d.ts +1 -1
- package/es/player/interface/scheduler.js.map +1 -1
- package/es/player/player.d.ts +7 -2
- package/es/player/player.js +27 -18
- package/es/player/player.js.map +1 -1
- package/es/player/processor/chart/common/chartAppear.d.ts +5 -0
- package/es/player/processor/chart/common/chartAppear.js +4 -0
- package/es/player/processor/chart/common/chartAppear.js.map +1 -0
- package/es/player/processor/chart/common/commonAppear.d.ts +8 -0
- package/es/player/processor/chart/common/commonAppear.js +36 -0
- package/es/player/processor/chart/common/commonAppear.js.map +1 -0
- package/es/player/processor/chart/component/axisAppear.d.ts +2 -2
- package/es/player/processor/chart/component/axisAppear.js +3 -1
- package/es/player/processor/chart/component/axisAppear.js.map +1 -1
- package/es/player/processor/chart/component/commonAppear.d.ts +3 -3
- package/es/player/processor/chart/component/commonAppear.js +3 -14
- package/es/player/processor/chart/component/commonAppear.js.map +1 -1
- package/es/player/processor/chart/component/labelAppear.d.ts +2 -2
- package/es/player/processor/chart/component/labelAppear.js +1 -1
- package/es/player/processor/chart/component/labelAppear.js.map +1 -1
- package/es/player/processor/chart/component/legendsAppear.d.ts +4 -3
- package/es/player/processor/chart/component/legendsAppear.js +2 -2
- package/es/player/processor/chart/component/legendsAppear.js.map +1 -1
- package/es/player/processor/chart/component/titleAppear.d.ts +4 -3
- package/es/player/processor/chart/component/titleAppear.js +2 -2
- package/es/player/processor/chart/component/titleAppear.js.map +1 -1
- package/es/player/processor/chart/seriesmark/commonTransformMarkAppear.d.ts +3 -3
- package/es/player/processor/chart/seriesmark/commonTransformMarkAppear.js.map +1 -1
- package/{cjs/player/processor/chart/seriesmark/transformSymbolAppear.d.ts → es/player/processor/chart/seriesmark/transformArcVisibility.d.ts} +3 -3
- package/es/player/processor/chart/seriesmark/{transformArcAppear.js → transformArcVisibility.js} +3 -4
- package/es/player/processor/chart/seriesmark/transformArcVisibility.js.map +1 -0
- package/es/player/processor/chart/seriesmark/transformLineVisibility.d.ts +12 -0
- package/es/player/processor/chart/seriesmark/transformLineVisibility.js +4 -0
- package/es/player/processor/chart/seriesmark/transformLineVisibility.js.map +1 -0
- package/es/player/processor/chart/seriesmark/transformRectVisibility.d.ts +12 -0
- package/es/player/processor/chart/seriesmark/{transformRectAppear.js → transformRectVisibility.js} +4 -5
- package/es/player/processor/chart/seriesmark/transformRectVisibility.js.map +1 -0
- package/es/player/processor/chart/seriesmark/transformSymbolVisibility.d.ts +12 -0
- package/es/player/processor/chart/seriesmark/transformSymbolVisibility.js +4 -0
- package/es/player/processor/chart/seriesmark/transformSymbolVisibility.js.map +1 -0
- package/es/player/processor/chart/seriesmark/transformTextVisibility.d.ts +12 -0
- package/es/player/processor/chart/seriesmark/transformTextVisibility.js +4 -0
- package/es/player/processor/chart/seriesmark/transformTextVisibility.js.map +1 -0
- package/es/player/processor/chart/transformMap.d.ts +24 -18
- package/es/player/processor/chart/transformMap.js +14 -11
- package/es/player/processor/chart/transformMap.js.map +1 -1
- package/es/player/processor/chart/vchart.d.ts +62 -15
- package/es/player/processor/chart/vchart.js +92 -9
- package/es/player/processor/chart/vchart.js.map +1 -1
- package/es/player/processor/common/bounce-processor.d.ts +3 -0
- package/es/player/processor/common/bounce-processor.js +20 -0
- package/es/player/processor/common/bounce-processor.js.map +1 -0
- package/es/player/processor/common/common.d.ts +5 -0
- package/es/player/processor/common/common.js +12 -0
- package/es/player/processor/common/common.js.map +1 -0
- package/es/player/processor/common/fade-processor.d.ts +4 -0
- package/es/player/processor/common/fade-processor.js +30 -0
- package/es/player/processor/common/fade-processor.js.map +1 -0
- package/es/player/processor/common/move-processor.d.ts +8 -0
- package/es/player/processor/common/move-processor.js +148 -0
- package/es/player/processor/common/move-processor.js.map +1 -0
- package/es/player/processor/common/scale-processor.d.ts +8 -0
- package/es/player/processor/common/scale-processor.js +43 -0
- package/es/player/processor/common/scale-processor.js.map +1 -0
- package/es/player/processor/common/wipe-processor.d.ts +4 -0
- package/es/player/processor/common/wipe-processor.js +36 -0
- package/es/player/processor/common/wipe-processor.js.map +1 -0
- package/es/player/processor/common-processor.js +3 -0
- package/es/player/processor/common-processor.js.map +1 -0
- package/es/player/processor/component/common-component.d.ts +45 -9
- package/es/player/processor/component/common-component.js +97 -73
- package/es/player/processor/component/common-component.js.map +1 -1
- package/es/player/processor/component/image/image-visibility.d.ts +5 -0
- package/es/player/processor/component/image/image-visibility.js +8 -0
- package/es/player/processor/component/image/image-visibility.js.map +1 -0
- package/es/player/processor/component/line/line-visibility.d.ts +5 -0
- package/es/player/processor/component/line/line-visibility.js +8 -0
- package/es/player/processor/component/line/line-visibility.js.map +1 -0
- package/es/player/processor/component/rect/rect-visibility.d.ts +5 -0
- package/es/player/processor/component/rect/rect-visibility.js +8 -0
- package/es/player/processor/component/rect/rect-visibility.js.map +1 -0
- package/es/player/processor/component/shape/shape-visibility.d.ts +5 -0
- package/es/player/processor/component/shape/shape-visibility.js +8 -0
- package/es/player/processor/component/shape/shape-visibility.js.map +1 -0
- package/es/player/processor/component/text/text-visibility.d.ts +6 -0
- package/es/player/processor/component/text/text-visibility.js +39 -0
- package/es/player/processor/component/text/text-visibility.js.map +1 -0
- package/es/player/processor/component/timeline/timeline-visibility.d.ts +15 -0
- package/es/player/processor/component/timeline/timeline-visibility.js +71 -0
- package/es/player/processor/component/timeline/timeline-visibility.js.map +1 -0
- package/es/player/processor/component/utils.d.ts +3 -1
- package/es/player/processor/component/utils.js +13 -0
- package/es/player/processor/component/utils.js.map +1 -1
- package/es/player/processor/interface/action-processor.d.ts +6 -6
- package/es/player/processor/interface/action-processor.js.map +1 -1
- package/es/player/processor/interface/appear-action.d.ts +30 -18
- package/es/player/processor/interface/appear-action.js.map +1 -1
- package/es/player/processor/interface/common-action.d.ts +14 -0
- package/es/player/processor/interface/common-action.js +2 -0
- package/es/player/processor/interface/common-action.js.map +1 -0
- package/es/player/processor/interface/style-action.d.ts +34 -0
- package/es/player/processor/interface/style-action.js +2 -0
- package/es/player/processor/interface/style-action.js.map +1 -0
- package/es/player/processor/processor-item.d.ts +5 -5
- package/es/player/processor/processor-item.js.map +1 -1
- package/es/player/processor/processor.d.ts +3 -3
- package/es/player/processor/processor.js +2 -2
- package/es/player/processor/processor.js.map +1 -1
- package/es/player/processor/processorMap.d.ts +22 -21
- package/es/player/processor/processorMap.js +51 -15
- package/es/player/processor/processorMap.js.map +1 -1
- package/es/player/scheduler.d.ts +4 -3
- package/es/player/scheduler.js +7 -5
- package/es/player/scheduler.js.map +1 -1
- package/es/story/canvas/canvas.d.ts +4 -2
- package/es/story/canvas/canvas.js +18 -10
- package/es/story/canvas/canvas.js.map +1 -1
- package/es/story/character/base/base.d.ts +3 -4
- package/es/story/character/base/base.js +6 -3
- package/es/story/character/base/base.js.map +1 -1
- package/es/story/character/chart/character.d.ts +1 -0
- package/es/story/character/chart/character.js +6 -3
- package/es/story/character/chart/character.js.map +1 -1
- package/es/story/character/chart/graphic/vchart-graphic-render.js +3 -3
- package/es/story/character/chart/graphic/vchart-graphic-render.js.map +1 -1
- package/es/story/character/chart/graphic/vchart-graphic.d.ts +1 -0
- package/es/story/character/chart/graphic/vchart-graphic.js +5 -1
- package/es/story/character/chart/graphic/vchart-graphic.js.map +1 -1
- package/es/story/character/component/character-group/component-group-graphic.d.ts +1 -0
- package/es/story/character/component/character-group/component-group-graphic.js +8 -2
- package/es/story/character/component/character-group/component-group-graphic.js.map +1 -1
- package/es/story/character/component/character.d.ts +4 -3
- package/es/story/character/component/character.js +8 -4
- package/es/story/character/component/character.js.map +1 -1
- package/es/story/character/component/characters/character-richtext.d.ts +1 -6
- package/es/story/character/component/characters/character-richtext.js +0 -12
- package/es/story/character/component/characters/character-richtext.js.map +1 -1
- package/es/story/character/component/characters/character-text.js +2 -2
- package/es/story/character/component/characters/character-text.js.map +1 -1
- package/es/story/character/component/graphic/graphic-base-text.d.ts +23 -0
- package/es/story/character/component/graphic/{graphic-text.js → graphic-base-text.js} +37 -21
- package/es/story/character/component/graphic/graphic-base-text.js.map +1 -0
- package/es/story/character/component/graphic/graphic.d.ts +1 -1
- package/es/story/character/component/graphic/graphic.js.map +1 -1
- package/es/story/character/component/graphic/richtext.d.ts +1 -9
- package/es/story/character/component/graphic/richtext.js +0 -41
- package/es/story/character/component/graphic/richtext.js.map +1 -1
- package/es/story/character/component/graphic/text.d.ts +4 -3
- package/es/story/character/component/graphic/text.js +21 -4
- package/es/story/character/component/graphic/text.js.map +1 -1
- package/es/story/character/component/graphic/timeline.d.ts +6 -0
- package/es/story/character/component/graphic/timeline.js +7 -1
- package/es/story/character/component/graphic/timeline.js.map +1 -1
- package/es/story/character/dsl-interface.d.ts +2 -2
- package/es/story/character/dsl-interface.js.map +1 -1
- package/es/story/character/runtime-interface.d.ts +1 -0
- package/es/story/character/runtime-interface.js.map +1 -1
- package/es/story/character/visactor/character.d.ts +2 -3
- package/es/story/character/visactor/character.js.map +1 -1
- package/es/story/character/visactor/interface.d.ts +1 -0
- package/es/story/character/visactor/interface.js.map +1 -1
- package/es/story/character-tree/character-tree.d.ts +1 -0
- package/es/story/character-tree/character-tree.js +6 -0
- package/es/story/character-tree/character-tree.js.map +1 -1
- package/es/story/index.js +0 -3
- package/es/story/index.js.map +1 -1
- package/es/story/interface/dsl-interface.d.ts +5 -8
- package/es/story/interface/dsl-interface.js.map +1 -1
- package/es/story/interface/player.d.ts +1 -13
- package/es/story/interface/player.js +2 -1
- package/es/story/interface/player.js.map +1 -1
- package/es/story/interface/runtime-interface.d.ts +3 -3
- package/es/story/interface/runtime-interface.js.map +1 -1
- package/es/story/story.d.ts +2 -1
- package/es/story/story.js +8 -6
- package/es/story/story.js.map +1 -1
- package/package.json +7 -7
- package/cjs/player/processor/chart/seriesmark/transformArcAppear.js.map +0 -1
- package/cjs/player/processor/chart/seriesmark/transformLineAppear.js +0 -14
- package/cjs/player/processor/chart/seriesmark/transformLineAppear.js.map +0 -1
- package/cjs/player/processor/chart/seriesmark/transformRectAppear.js.map +0 -1
- package/cjs/player/processor/chart/seriesmark/transformSymbolAppear.js +0 -14
- package/cjs/player/processor/chart/seriesmark/transformSymbolAppear.js.map +0 -1
- package/cjs/player/processor/chart/seriesmark/transformTextAppear.d.ts +0 -12
- package/cjs/player/processor/chart/seriesmark/transformTextAppear.js +0 -14
- package/cjs/player/processor/chart/seriesmark/transformTextAppear.js.map +0 -1
- package/cjs/player/processor/component/image/image-appear.d.ts +0 -5
- package/cjs/player/processor/component/image/image-appear.js +0 -16
- package/cjs/player/processor/component/image/image-appear.js.map +0 -1
- package/cjs/player/processor/component/line/line-appear.d.ts +0 -5
- package/cjs/player/processor/component/line/line-appear.js +0 -16
- package/cjs/player/processor/component/line/line-appear.js.map +0 -1
- package/cjs/player/processor/component/rect/rect-appear.d.ts +0 -5
- package/cjs/player/processor/component/rect/rect-appear.js +0 -16
- package/cjs/player/processor/component/rect/rect-appear.js.map +0 -1
- package/cjs/player/processor/component/shape/shape-appear.d.ts +0 -5
- package/cjs/player/processor/component/shape/shape-appear.js +0 -16
- package/cjs/player/processor/component/shape/shape-appear.js.map +0 -1
- package/cjs/player/processor/component/text/text-appear.d.ts +0 -7
- package/cjs/player/processor/component/text/text-appear.js +0 -34
- package/cjs/player/processor/component/text/text-appear.js.map +0 -1
- package/cjs/player/processor/component/timeline/timeline-appear.d.ts +0 -7
- package/cjs/player/processor/component/timeline/timeline-appear.js +0 -33
- package/cjs/player/processor/component/timeline/timeline-appear.js.map +0 -1
- package/cjs/story/character/component/graphic/graphic-text.d.ts +0 -18
- package/cjs/story/character/component/graphic/graphic-text.js.map +0 -1
- package/cjs/story/player/encode.js +0 -3
- package/cjs/story/player/encode.js.map +0 -1
- package/cjs/story/player/index.js +0 -3
- package/cjs/story/player/index.js.map +0 -1
- package/cjs/story/player/ticker.d.ts +0 -1
- package/cjs/story/player/ticker.js +0 -3
- package/cjs/story/player/ticker.js.map +0 -1
- package/es/player/processor/chart/seriesmark/transformArcAppear.d.ts +0 -12
- package/es/player/processor/chart/seriesmark/transformArcAppear.js.map +0 -1
- package/es/player/processor/chart/seriesmark/transformLineAppear.d.ts +0 -12
- package/es/player/processor/chart/seriesmark/transformLineAppear.js +0 -7
- package/es/player/processor/chart/seriesmark/transformLineAppear.js.map +0 -1
- package/es/player/processor/chart/seriesmark/transformRectAppear.d.ts +0 -12
- package/es/player/processor/chart/seriesmark/transformRectAppear.js.map +0 -1
- package/es/player/processor/chart/seriesmark/transformSymbolAppear.d.ts +0 -12
- package/es/player/processor/chart/seriesmark/transformSymbolAppear.js +0 -7
- package/es/player/processor/chart/seriesmark/transformSymbolAppear.js.map +0 -1
- package/es/player/processor/chart/seriesmark/transformTextAppear.d.ts +0 -12
- package/es/player/processor/chart/seriesmark/transformTextAppear.js +0 -7
- package/es/player/processor/chart/seriesmark/transformTextAppear.js.map +0 -1
- package/es/player/processor/component/image/image-appear.d.ts +0 -5
- package/es/player/processor/component/image/image-appear.js +0 -8
- package/es/player/processor/component/image/image-appear.js.map +0 -1
- package/es/player/processor/component/line/line-appear.d.ts +0 -5
- package/es/player/processor/component/line/line-appear.js +0 -8
- package/es/player/processor/component/line/line-appear.js.map +0 -1
- package/es/player/processor/component/rect/rect-appear.d.ts +0 -5
- package/es/player/processor/component/rect/rect-appear.js +0 -8
- package/es/player/processor/component/rect/rect-appear.js.map +0 -1
- package/es/player/processor/component/shape/shape-appear.d.ts +0 -5
- package/es/player/processor/component/shape/shape-appear.js +0 -8
- package/es/player/processor/component/shape/shape-appear.js.map +0 -1
- package/es/player/processor/component/text/text-appear.d.ts +0 -7
- package/es/player/processor/component/text/text-appear.js +0 -32
- package/es/player/processor/component/text/text-appear.js.map +0 -1
- package/es/player/processor/component/timeline/timeline-appear.d.ts +0 -7
- package/es/player/processor/component/timeline/timeline-appear.js +0 -27
- package/es/player/processor/component/timeline/timeline-appear.js.map +0 -1
- package/es/story/character/component/graphic/graphic-text.d.ts +0 -18
- package/es/story/character/component/graphic/graphic-text.js.map +0 -1
- package/es/story/player/encode.d.ts +0 -1
- package/es/story/player/encode.js +0 -3
- package/es/story/player/encode.js.map +0 -1
- package/es/story/player/index.d.ts +0 -1
- package/es/story/player/index.js +0 -3
- package/es/story/player/index.js.map +0 -1
- package/es/story/player/ticker.d.ts +0 -1
- package/es/story/player/ticker.js +0 -3
- package/es/story/player/ticker.js.map +0 -1
- /package/cjs/{story/player/encode.d.ts → player/processor/common-processor.d.ts} +0 -0
- /package/{cjs/story/player/index.d.ts → es/player/processor/common-processor.d.ts} +0 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ICharacter } from '../../../story/character';
|
|
2
|
+
import type { IComponentBouncePayLoad } from '../interface/style-action';
|
|
3
|
+
export declare function bounce(character: ICharacter, animation: IComponentBouncePayLoad['animation'], params: IComponentBouncePayLoad): void;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { getCharacterParentGraphic } from "./common";
|
|
2
|
+
|
|
3
|
+
import { CustomEase } from "../../../animate/util/util";
|
|
4
|
+
|
|
5
|
+
import { Bounce } from "../../../animate/bounce";
|
|
6
|
+
|
|
7
|
+
export function bounce(character, animation, params) {
|
|
8
|
+
const graphic = getCharacterParentGraphic(character);
|
|
9
|
+
if (graphic) {
|
|
10
|
+
const {duration: duration, easing: easing} = animation, {dy: dy} = params;
|
|
11
|
+
let {customEase: customEase} = params;
|
|
12
|
+
const {y1: y1, y2: y2} = graphic.AABBBounds, height = Math.abs(y1 - y2);
|
|
13
|
+
customEase || (customEase = CustomEase.create("bounce", "M0,0 C0,0 0.058,1 0.2,1 0.346,1 0.41,0 0.53,0 0.559,0 0.681,-0.002 0.702,0.011 0.788,0.065 0.774,0.212 0.853,0.212 0.928,0.212 1,0 1,0 ", {})),
|
|
14
|
+
graphic.animate().play(new Bounce({}, {}, duration, easing, {
|
|
15
|
+
dy: null != dy ? dy : .2 * height,
|
|
16
|
+
customEase: customEase
|
|
17
|
+
}));
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=bounce-processor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/player/processor/common/bounce-processor.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AAErD,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAEjD,MAAM,UAAU,MAAM,CACpB,SAAqB,EACrB,SAA+C,EAC/C,MAA+B;IAE/B,MAAM,OAAO,GAAG,yBAAyB,CAAC,SAAS,CAAC,CAAC;IACrD,IAAI,OAAO,EAAE;QACX,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;QACvC,MAAM,EAAE,EAAE,EAAE,GAAG,MAAM,CAAC;QACtB,IAAI,EAAE,UAAU,EAAE,GAAG,MAAM,CAAC;QAC5B,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;QACtC,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC;QACjC,IAAI,CAAC,UAAU,EAAE;YACf,UAAU,GAAG,UAAU,CAAC,MAAM,CAC5B,QAAQ,EACR,yIAAyI,EACzI,EAAE,CACH,CAAC;SACH;QACD,OAAO,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,aAAF,EAAE,cAAF,EAAE,GAAI,MAAM,GAAG,GAAG,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC;KACtG;AACH,CAAC","file":"bounce-processor.js","sourcesContent":["import type { ICharacter } from '../../../story/character';\nimport { getCharacterParentGraphic } from './common';\nimport type { IComponentBouncePayLoad } from '../interface/style-action';\nimport { CustomEase } from '../../../animate/util/util';\nimport { Bounce } from '../../../animate/bounce';\n\nexport function bounce(\n character: ICharacter,\n animation: IComponentBouncePayLoad['animation'],\n params: IComponentBouncePayLoad\n) {\n const graphic = getCharacterParentGraphic(character);\n if (graphic) {\n const { duration, easing } = animation;\n const { dy } = params;\n let { customEase } = params;\n const { y1, y2 } = graphic.AABBBounds;\n const height = Math.abs(y1 - y2);\n if (!customEase) {\n customEase = CustomEase.create(\n 'bounce',\n 'M0,0 C0,0 0.058,1 0.2,1 0.346,1 0.41,0 0.53,0 0.559,0 0.681,-0.002 0.702,0.011 0.788,0.065 0.774,0.212 0.853,0.212 0.928,0.212 1,0 1,0 ',\n {}\n );\n }\n graphic.animate().play(new Bounce({}, {}, duration, easing, { dy: dy ?? height * 0.2, customEase }));\n }\n}\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { IGraphic } from '@visactor/vrender-core';
|
|
2
|
+
import type { ICharacter } from '../../../story/character';
|
|
3
|
+
export declare function getCharacterParentGraphic(character: ICharacter): import("@visactor/vrender-core").IGroup;
|
|
4
|
+
export declare function getCharacterGraphic(character: ICharacter): IGraphic<Partial<import("@visactor/vrender-core").IGraphicAttribute>>[];
|
|
5
|
+
export declare function getCharacterByEffect(character: ICharacter, effect: 'move' | string): IGraphic<Partial<import("@visactor/vrender-core").IGraphicAttribute>>[];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export function getCharacterParentGraphic(character) {
|
|
2
|
+
return character.getGraphicParent();
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
export function getCharacterGraphic(character) {
|
|
6
|
+
return character.getGraphicParent().getChildren();
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export function getCharacterByEffect(character, effect) {
|
|
10
|
+
return "chart" === character._graphic.type || "move" === effect ? [ getCharacterParentGraphic(character) ] : getCharacterGraphic(character);
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=common.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/player/processor/common/common.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,yBAAyB,CAAC,SAAqB;IAC7D,OAAO,SAAS,CAAC,gBAAgB,EAAE,CAAC;AACtC,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,SAAqB;IACvD,OAAO,SAAS,CAAC,gBAAgB,EAAE,CAAC,WAAW,EAAgB,CAAC;AAClE,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,SAAqB,EAAE,MAAuB;IAGjF,IAAI,SAAS,CAAC,QAAQ,CAAC,IAAI,KAAK,OAAO,EAAE;QACvC,OAAO,CAAC,yBAAyB,CAAC,SAAS,CAAC,CAAC,CAAC;KAC/C;IAED,OAAO,MAAM,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC,yBAAyB,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC;AACrG,CAAC","file":"common.js","sourcesContent":["import type { IGraphic } from '@visactor/vrender-core';\nimport type { ICharacter } from '../../../story/character';\n\nexport function getCharacterParentGraphic(character: ICharacter) {\n return character.getGraphicParent();\n}\n\nexport function getCharacterGraphic(character: ICharacter) {\n return character.getGraphicParent().getChildren() as IGraphic[];\n}\n\nexport function getCharacterByEffect(character: ICharacter, effect: 'move' | string) {\n // 图表仅操作父节点.\n // @ts-ignore\n if (character._graphic.type === 'chart') {\n return [getCharacterParentGraphic(character)];\n }\n // move效果, 一定是对parent的操作\n return effect === 'move' ? [getCharacterParentGraphic(character)] : getCharacterGraphic(character);\n}\n"]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ICharacter } from '../../../story/character';
|
|
2
|
+
import type { IFadeInParams } from '../interface/appear-action';
|
|
3
|
+
export declare function fadeIn(character: ICharacter, animation: IFadeInParams, effect: string): void;
|
|
4
|
+
export declare function fadeOut(character: ICharacter, animation: IFadeInParams, effect: string): void;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { getCharacterParentGraphic } from "./common";
|
|
2
|
+
|
|
3
|
+
import { canDoGraphicAnimation } from "../component/utils";
|
|
4
|
+
|
|
5
|
+
export function fadeIn(character, animation, effect) {
|
|
6
|
+
_fade(getCharacterParentGraphic(character), animation, !0);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export function fadeOut(character, animation, effect) {
|
|
10
|
+
_fade(getCharacterParentGraphic(character), animation, !1);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function _fade(graphic, params, appear) {
|
|
14
|
+
var _a, _b, _c, _d;
|
|
15
|
+
if (!canDoGraphicAnimation(graphic, params)) return !1;
|
|
16
|
+
const {fade: fade = {}} = params, duration = (_b = null !== (_a = fade.opacity) && void 0 !== _a ? _a : params.opacity,
|
|
17
|
+
null !== (_c = fade.duration) && void 0 !== _c ? _c : params.duration), easing = null !== (_d = fade.easing) && void 0 !== _d ? _d : params.easing, currOpacity = graphic.attribute.baseOpacity, opacityMap = appear ? {
|
|
18
|
+
from: 0,
|
|
19
|
+
to: null != currOpacity ? currOpacity : 1
|
|
20
|
+
} : {
|
|
21
|
+
from: null != currOpacity ? currOpacity : 1,
|
|
22
|
+
to: 0
|
|
23
|
+
};
|
|
24
|
+
return graphic.setAttributes({
|
|
25
|
+
baseOpacity: opacityMap.from
|
|
26
|
+
}), graphic.animate().to({
|
|
27
|
+
baseOpacity: opacityMap.to
|
|
28
|
+
}, duration, easing), !0;
|
|
29
|
+
}
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EAAE,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC;IAElG,OAAO,CAAC,aAAa,CAAC;QACpB,WAAW,EAAE,UAAU,CAAC,IAAI;KACtB,CAAC,CAAC;IAEV,OAAO,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,WAAW,EAAE,UAAU,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,MAAoB,CAAC,CAAC;IAErF,OAAO,IAAI,CAAC;AACd,CAAC","file":"fade-processor.js","sourcesContent":["import type { EasingType, IGraphic } from '@visactor/vrender-core';\nimport type { ICharacter } from '../../../story/character';\nimport { getCharacterParentGraphic } from './common';\nimport { canDoGraphicAnimation } from '../component/utils';\nimport type { IFadeInParams } from '../interface/appear-action';\n\nexport function fadeIn(character: ICharacter, animation: IFadeInParams, effect: string) {\n const graphic = getCharacterParentGraphic(character);\n _fade(graphic, animation as any, true);\n}\nexport function fadeOut(character: ICharacter, animation: IFadeInParams, effect: string) {\n const graphic = getCharacterParentGraphic(character);\n _fade(graphic, animation as any, false);\n}\n\nfunction _fade(graphic: IGraphic, params: IFadeInParams, appear: boolean): boolean {\n if (!canDoGraphicAnimation(graphic, params)) {\n return false;\n }\n const { fade = {} } = params;\n const opacity = fade.opacity ?? params.opacity ?? 1;\n const duration = fade.duration ?? params.duration;\n const easing = fade.easing ?? params.easing;\n const currOpacity = (graphic.attribute as any).baseOpacity;\n\n const opacityMap = appear ? { from: 0, to: currOpacity ?? 1 } : { from: currOpacity ?? 1, to: 0 };\n\n graphic.setAttributes({\n baseOpacity: opacityMap.from\n } as any);\n\n graphic.animate().to({ baseOpacity: opacityMap.to }, duration, easing as EasingType);\n\n return true;\n}\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { IGraphic } from '@visactor/vrender-core';
|
|
2
|
+
import type { IPointLike } from '@visactor/vutils';
|
|
3
|
+
import type { ICharacter } from '../../../story/character';
|
|
4
|
+
import type { IMoveParams, IMoveToParams } from '../interface/appear-action';
|
|
5
|
+
export declare function moveTo(character: ICharacter, animation: IMoveToParams, destination: IPointLike): void;
|
|
6
|
+
export declare function moveOut(character: ICharacter, animation: IMoveParams, effect: string): void;
|
|
7
|
+
export declare function _moveOut(graphic: IGraphic, params: IMoveParams): boolean;
|
|
8
|
+
export declare function moveIn(character: ICharacter, animation: IMoveParams, effect: string): void;
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { getCharacterParentGraphic } from "./common";
|
|
2
|
+
|
|
3
|
+
import { canDoGraphicAnimation } from "../component/utils";
|
|
4
|
+
|
|
5
|
+
export function moveTo(character, animation, destination) {
|
|
6
|
+
const graphic = getCharacterParentGraphic(character);
|
|
7
|
+
if (graphic) {
|
|
8
|
+
const {duration: duration, easing: easing} = animation;
|
|
9
|
+
destination && graphic.animate().to(destination, duration, easing);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export function moveOut(character, animation, effect) {
|
|
14
|
+
_moveOut(getCharacterParentGraphic(character), animation);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export function _moveOut(graphic, params) {
|
|
18
|
+
var _a, _b, _c, _d;
|
|
19
|
+
if (!canDoGraphicAnimation(graphic, params)) return !1;
|
|
20
|
+
const {move: move = {}} = params, to = null !== (_a = move.pos) && void 0 !== _a ? _a : params.pos, duration = null !== (_b = move.duration) && void 0 !== _b ? _b : params.duration, easing = null !== (_c = move.easing) && void 0 !== _c ? _c : params.easing, isVariableSpeed = null === (_d = move.isVariableSpeed) || void 0 === _d || _d;
|
|
21
|
+
let toX = graphic.attribute.x, toY = graphic.attribute.y;
|
|
22
|
+
const width = Math.abs(graphic.AABBBounds.x2 - graphic.AABBBounds.x1), height = Math.abs(graphic.AABBBounds.y2 - graphic.AABBBounds.y1);
|
|
23
|
+
if (isVariableSpeed) switch (to) {
|
|
24
|
+
case "right":
|
|
25
|
+
toX = graphic.parent.width;
|
|
26
|
+
break;
|
|
27
|
+
|
|
28
|
+
case "left":
|
|
29
|
+
toX = -width;
|
|
30
|
+
break;
|
|
31
|
+
|
|
32
|
+
case "bottom":
|
|
33
|
+
toY = graphic.parent.height + height;
|
|
34
|
+
break;
|
|
35
|
+
|
|
36
|
+
case "top":
|
|
37
|
+
toY = -height;
|
|
38
|
+
} else {
|
|
39
|
+
const distance = Math.max(graphic.parent.width, graphic.parent.height);
|
|
40
|
+
switch (to) {
|
|
41
|
+
case "right":
|
|
42
|
+
toX += distance;
|
|
43
|
+
break;
|
|
44
|
+
|
|
45
|
+
case "left":
|
|
46
|
+
toX += -distance;
|
|
47
|
+
break;
|
|
48
|
+
|
|
49
|
+
case "bottom":
|
|
50
|
+
toY += distance;
|
|
51
|
+
break;
|
|
52
|
+
|
|
53
|
+
case "top":
|
|
54
|
+
toY += -distance;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return graphic.animate().to({
|
|
58
|
+
x: toX,
|
|
59
|
+
y: toY
|
|
60
|
+
}, duration, easing).onEnd((() => {
|
|
61
|
+
graphic.setAttributes({
|
|
62
|
+
visible: !1,
|
|
63
|
+
visibleAll: !1
|
|
64
|
+
});
|
|
65
|
+
})), !0;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function moveIn(character, animation, effect) {
|
|
69
|
+
_moveIn(getCharacterParentGraphic(character), animation);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
function _moveIn(graphic, params) {
|
|
73
|
+
var _a, _b, _c, _d, _e;
|
|
74
|
+
if (!canDoGraphicAnimation(graphic, params)) return !1;
|
|
75
|
+
const {move: move = {}} = params, from = null !== (_b = null !== (_a = move.pos) && void 0 !== _a ? _a : params.pos) && void 0 !== _b ? _b : 1, duration = null !== (_c = move.duration) && void 0 !== _c ? _c : params.duration, easing = null !== (_d = move.easing) && void 0 !== _d ? _d : params.easing, isVariableSpeed = null === (_e = move.isVariableSpeed) || void 0 === _e || _e, width = Math.abs(graphic.AABBBounds.x2 - graphic.AABBBounds.x1), height = Math.abs(graphic.AABBBounds.y2 - graphic.AABBBounds.y1);
|
|
76
|
+
let fromX = graphic.attribute.x, fromY = graphic.attribute.y;
|
|
77
|
+
if (isVariableSpeed) switch (from) {
|
|
78
|
+
case "right":
|
|
79
|
+
fromX = graphic.parent.width;
|
|
80
|
+
break;
|
|
81
|
+
|
|
82
|
+
case "left":
|
|
83
|
+
fromX = -width;
|
|
84
|
+
break;
|
|
85
|
+
|
|
86
|
+
case "bottom":
|
|
87
|
+
fromY = graphic.parent.height + height;
|
|
88
|
+
break;
|
|
89
|
+
|
|
90
|
+
case "top":
|
|
91
|
+
fromY = -height;
|
|
92
|
+
break;
|
|
93
|
+
|
|
94
|
+
case "top-right":
|
|
95
|
+
fromY = -height, fromX = graphic.parent.width;
|
|
96
|
+
break;
|
|
97
|
+
|
|
98
|
+
case "top-left":
|
|
99
|
+
fromY = -height, fromX = -width;
|
|
100
|
+
break;
|
|
101
|
+
|
|
102
|
+
case "bottom-left":
|
|
103
|
+
fromY = graphic.parent.height + height, fromX = -width;
|
|
104
|
+
break;
|
|
105
|
+
|
|
106
|
+
case "bottom-right":
|
|
107
|
+
fromY = graphic.parent.height + height, fromX = graphic.parent.width;
|
|
108
|
+
} else {
|
|
109
|
+
const distance = Math.max(graphic.parent.width, graphic.parent.height);
|
|
110
|
+
switch (from) {
|
|
111
|
+
case "right":
|
|
112
|
+
fromX += distance;
|
|
113
|
+
break;
|
|
114
|
+
|
|
115
|
+
case "left":
|
|
116
|
+
fromX += -distance;
|
|
117
|
+
break;
|
|
118
|
+
|
|
119
|
+
case "bottom":
|
|
120
|
+
fromY += distance;
|
|
121
|
+
break;
|
|
122
|
+
|
|
123
|
+
case "top":
|
|
124
|
+
fromY += -distance;
|
|
125
|
+
break;
|
|
126
|
+
|
|
127
|
+
case "top-right":
|
|
128
|
+
fromX += distance, fromY += -distance;
|
|
129
|
+
break;
|
|
130
|
+
|
|
131
|
+
case "top-left":
|
|
132
|
+
fromX += -distance, fromY += -distance;
|
|
133
|
+
break;
|
|
134
|
+
|
|
135
|
+
case "bottom-left":
|
|
136
|
+
fromY += distance, fromX += -distance;
|
|
137
|
+
break;
|
|
138
|
+
|
|
139
|
+
case "bottom-right":
|
|
140
|
+
fromX += distance, fromY += distance;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
return graphic.animate().from({
|
|
144
|
+
x: fromX,
|
|
145
|
+
y: fromY
|
|
146
|
+
}, duration, easing), !0;
|
|
147
|
+
}
|
|
148
|
+
//# sourceMappingURL=move-processor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/player/processor/common/move-processor.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AACrD,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,MAAM,UAAU,MAAM,CAAC,SAAqB,EAAE,SAAwB,EAAE,WAAuB;IAC7F,MAAM,OAAO,GAAG,yBAAyB,CAAC,SAAS,CAAC,CAAC;IACrD,IAAI,OAAO,EAAE;QACX,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;QACvC,IAAI,WAAW,EAAE;YACf,OAAO,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC,WAAW,EAAE,QAAQ,EAAE,MAAoB,CAAC,CAAC;SACnE;KACF;AACH,CAAC;AAED,MAAM,UAAU,OAAO,CAAC,SAAqB,EAAE,SAAsB,EAAE,MAAc;IACnF,MAAM,OAAO,GAAG,yBAAyB,CAAC,SAAS,CAAC,CAAC;IACrD,QAAQ,CAAC,OAAO,EAAE,SAAgB,CAAC,CAAC;AACtC,CAAC;AACD,MAAM,UAAU,QAAQ,CAAC,OAAiB,EAAE,MAAmB;;IAC7D,IAAI,CAAC,qBAAqB,CAAC,OAA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esContent":["import type { EasingType, IGraphic } from '@visactor/vrender-core';\nimport type { IPointLike } from '@visactor/vutils';\nimport { isObject } from '@visactor/vutils';\nimport type { ICharacter } from '../../../story/character';\nimport type { IMoveParams, IMoveToParams } from '../interface/appear-action';\nimport { getCharacterParentGraphic } from './common';\nimport { canDoGraphicAnimation } from '../component/utils';\n\nexport function moveTo(character: ICharacter, animation: IMoveToParams, destination: IPointLike) {\n const graphic = getCharacterParentGraphic(character);\n if (graphic) {\n const { duration, easing } = animation;\n if (destination) {\n graphic.animate().to(destination, duration, easing as EasingType);\n }\n }\n}\n\nexport function moveOut(character: ICharacter, animation: IMoveParams, effect: string) {\n const graphic = getCharacterParentGraphic(character);\n _moveOut(graphic, animation as any);\n}\nexport function _moveOut(graphic: IGraphic, params: IMoveParams) {\n if (!canDoGraphicAnimation(graphic, params)) {\n return false;\n }\n const { move = {} } = params;\n const to = move.pos ?? params.pos;\n const duration = move.duration ?? params.duration;\n const easing = move.easing ?? params.easing;\n const isVariableSpeed = move.isVariableSpeed ?? true;\n\n let toX = graphic.attribute.x;\n let toY = graphic.attribute.y;\n\n // 图形宽高\n const width = Math.abs(graphic.AABBBounds.x2 - graphic.AABBBounds.x1);\n const height = Math.abs(graphic.AABBBounds.y2 - graphic.AABBBounds.y1);\n\n if (isVariableSpeed) {\n // 同时抵达边缘, 速度不同.\n switch (to) {\n case 'right':\n // 画布容器宽度\n toX = graphic.parent.width;\n break;\n case 'left':\n // 负的图形宽度\n toX = -width;\n break;\n case 'bottom':\n // 容器高度 + 图形高度\n toY = graphic.parent.height + height;\n break;\n case 'top':\n // 负的图形高度\n toY = -height;\n break;\n }\n } else {\n // 速度相同, 相对位置不变.\n const distance = Math.max(graphic.parent.width, graphic.parent.height);\n switch (to) {\n case 'right':\n toX += distance;\n break;\n case 'left':\n toX += -distance;\n break;\n case 'bottom':\n toY += distance;\n break;\n case 'top':\n toY += -distance;\n break;\n }\n }\n graphic\n .animate()\n .to({ x: toX, y: toY }, duration, easing as EasingType)\n // 最终不显示\n .onEnd(() => {\n graphic.setAttributes({ visible: false, visibleAll: false } as any);\n });\n return true;\n}\n\nexport function moveIn(character: ICharacter, animation: IMoveParams, effect: string) {\n const graphic = getCharacterParentGraphic(character);\n _moveIn(graphic, animation as any);\n}\n\nfunction _moveIn(graphic: IGraphic, params: IMoveParams) {\n if (!canDoGraphicAnimation(graphic, params)) {\n return false;\n }\n\n const { move = {} } = params;\n const from = move.pos ?? params.pos ?? 1;\n const duration = move.duration ?? params.duration;\n const easing = move.easing ?? params.easing;\n const isVariableSpeed = move.isVariableSpeed ?? true;\n\n // 图形宽高\n const width = Math.abs(graphic.AABBBounds.x2 - graphic.AABBBounds.x1);\n const height = Math.abs(graphic.AABBBounds.y2 - graphic.AABBBounds.y1);\n\n let fromX = graphic.attribute.x;\n let fromY = graphic.attribute.y;\n if (isVariableSpeed) {\n // 同时从边缘进入, 速度不同, 同时抵达目标.\n switch (from) {\n case 'right':\n // 图形左边缘为起点\n fromX = graphic.parent.width;\n break;\n case 'left':\n // 图形右边缘为起点\n fromX = -width;\n break;\n case 'bottom':\n // 从下往上进入\n fromY = graphic.parent.height + height;\n break;\n case 'top':\n // 从上往下进入\n fromY = -height;\n break;\n case 'top-right':\n // 从右上进入 ↗️\n fromY = -height;\n fromX = graphic.parent.width;\n break;\n case 'top-left':\n // 从左上进入 ↖️\n fromY = -height;\n fromX = -width;\n break;\n case 'bottom-left':\n // 从左下进入 ↙️\n fromY = graphic.parent.height + height;\n fromX = -width;\n break;\n case 'bottom-right':\n // 从右下进入 ↘️\n fromY = graphic.parent.height + height;\n fromX = graphic.parent.width;\n break;\n }\n } else {\n // 速度相同, 相对位置不变, 但不同时出现.\n const distance = Math.max(graphic.parent.width, graphic.parent.height);\n switch (from) {\n case 'right':\n // 从右往左进入\n fromX += distance;\n break;\n case 'left':\n // 从左往右进入\n fromX += -distance;\n break;\n case 'bottom':\n // 从下往上进入\n fromY += distance;\n break;\n case 'top':\n // 从上往下进入\n fromY += -distance;\n break;\n case 'top-right':\n // 从右上进入 ↗️\n fromX += distance;\n fromY += -distance;\n break;\n case 'top-left':\n // 从左上进入 ↖️\n fromX += -distance;\n fromY += -distance;\n break;\n case 'bottom-left':\n // 从左下进入 ↙️\n fromY += distance;\n fromX += -distance;\n break;\n case 'bottom-right':\n // 从右下进入 ↘️\n fromX += distance;\n fromY += distance;\n break;\n }\n }\n\n graphic.animate().from({ x: fromX, y: fromY }, duration, easing as EasingType);\n return true;\n}\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ICharacter } from '../../../story/character';
|
|
2
|
+
import type { IFadeInParams, IScaleToParams } from '../interface/appear-action';
|
|
3
|
+
export declare function scaleTo(character: ICharacter, animation: IScaleToParams, scaleTo: {
|
|
4
|
+
scaleX: number;
|
|
5
|
+
scaleY: number;
|
|
6
|
+
}): void;
|
|
7
|
+
export declare function scaleIn(character: ICharacter, animation: IFadeInParams, effect: string): void;
|
|
8
|
+
export declare function scaleOut(character: ICharacter, animation: IFadeInParams, effect: string): void;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { getCharacterByEffect, getCharacterParentGraphic } from "./common";
|
|
2
|
+
|
|
3
|
+
import { canDoGraphicAnimation } from "../component/utils";
|
|
4
|
+
|
|
5
|
+
export function scaleTo(character, animation, scaleTo) {
|
|
6
|
+
const graphic = getCharacterParentGraphic(character);
|
|
7
|
+
if (graphic) {
|
|
8
|
+
const {duration: duration, easing: easing} = animation;
|
|
9
|
+
scaleTo && graphic.animate().to(scaleTo, duration, easing);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export function scaleIn(character, animation, effect) {
|
|
14
|
+
getCharacterByEffect(character, effect).forEach((graphic => _scale(graphic, animation, !0)));
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export function scaleOut(character, animation, effect) {
|
|
18
|
+
getCharacterByEffect(character, effect).forEach((graphic => _scale(graphic, animation, !1)));
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function _scale(graphic, params, appear) {
|
|
22
|
+
var _a, _b, _c, _d;
|
|
23
|
+
if (!canDoGraphicAnimation(graphic, params)) return !1;
|
|
24
|
+
const {scale: scale = {}} = params, ratio = null !== (_b = null !== (_a = scale.ratio) && void 0 !== _a ? _a : params.ratio) && void 0 !== _b ? _b : 1, duration = null !== (_c = scale.duration) && void 0 !== _c ? _c : params.duration, easing = null !== (_d = scale.easing) && void 0 !== _d ? _d : params.easing, currScaleX = graphic.attribute.scaleX, currScaleY = graphic.attribute.scaleY, opacityMap = appear ? {
|
|
25
|
+
fromX: 0,
|
|
26
|
+
fromY: 0,
|
|
27
|
+
toX: null != currScaleX ? currScaleX : ratio,
|
|
28
|
+
toY: null != currScaleY ? currScaleY : ratio
|
|
29
|
+
} : {
|
|
30
|
+
fromX: null != currScaleX ? currScaleX : ratio,
|
|
31
|
+
fromY: null != currScaleY ? currScaleY : ratio,
|
|
32
|
+
toX: 0,
|
|
33
|
+
toY: 0
|
|
34
|
+
};
|
|
35
|
+
return graphic.setAttributes({
|
|
36
|
+
scaleX: opacityMap.fromX,
|
|
37
|
+
scaleY: opacityMap.fromY
|
|
38
|
+
}), graphic.animate().to({
|
|
39
|
+
scaleX: opacityMap.toX,
|
|
40
|
+
scaleY: opacityMap.toY
|
|
41
|
+
}, duration, easing), !0;
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=scale-processor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/player/processor/common/scale-processor.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AAC3E,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAG3D,MAAM,UAAU,OAAO,CAAC,SAAqB,EAAE,SAAyB,EAAE,OAA2C;IACnH,MAAM,OAAO,GAAG,yBAAyB,CAAC,SAAS,CAAC,CAAC;IACrD,IAAI,OAAO,E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,SAAS,CAAC,MAAM,CAAC;IAC5C,MAAM,UAAU,GAAG,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC;IAC5C,MAAM,UAAU,GAAG,MAAM;QACvB,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,UAAU,aAAV,UAAU,cAAV,UAAU,GAAI,KAAK,EAAE,GAAG,EAAE,UAAU,aAAV,UAAU,cAAV,UAAU,GAAI,KAAK,EAAE;QAC5E,CAAC,CAAC,EAAE,KAAK,EAAE,UAAU,aAAV,UAAU,cAAV,UAAU,GAAI,KAAK,EAAE,KAAK,EAAE,UAAU,aAAV,UAAU,cAAV,UAAU,GAAI,KAAK,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;IAE/E,OAAO,CAAC,aAAa,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,CAAC,KAAK,EAAE,CAAC,CAAC;IAC9E,OAAO,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,CAAC,GAAG,EAAE,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;IAE3F,OAAO,IAAI,CAAC;AACd,CAAC","file":"scale-processor.js","sourcesContent":["import type { EasingType, IGraphic } from '@visactor/vrender-core';\nimport type { ICharacter } from '../../../story/character';\nimport { getCharacterByEffect, getCharacterParentGraphic } from './common';\nimport { canDoGraphicAnimation } from '../component/utils';\nimport type { IFadeInParams, IScaleInParams, IScaleToParams } from '../interface/appear-action';\n\nexport function scaleTo(character: ICharacter, animation: IScaleToParams, scaleTo: { scaleX: number; scaleY: number }) {\n const graphic = getCharacterParentGraphic(character);\n if (graphic) {\n const { duration, easing } = animation;\n if (scaleTo) {\n graphic.animate().to(scaleTo, duration, easing as EasingType);\n }\n }\n}\n\nexport function scaleIn(character: ICharacter, animation: IFadeInParams, effect: string) {\n const graphics = getCharacterByEffect(character, effect) as IGraphic[];\n graphics.forEach(graphic => _scale(graphic, animation as any, true));\n}\nexport function scaleOut(character: ICharacter, animation: IFadeInParams, effect: string) {\n const graphics = getCharacterByEffect(character, effect) as IGraphic[];\n graphics.forEach(graphic => _scale(graphic, animation as any, false));\n}\n\nfunction _scale(graphic: IGraphic, params: IScaleInParams, appear: boolean): boolean {\n if (!canDoGraphicAnimation(graphic, params)) {\n return false;\n }\n const { scale = {} } = params;\n const ratio = scale.ratio ?? params.ratio ?? 1;\n const duration = scale.duration ?? params.duration;\n const easing = scale.easing ?? params.easing;\n\n const currScaleX = graphic.attribute.scaleX;\n const currScaleY = graphic.attribute.scaleY;\n const opacityMap = appear\n ? { fromX: 0, fromY: 0, toX: currScaleX ?? ratio, toY: currScaleY ?? ratio }\n : { fromX: currScaleX ?? ratio, fromY: currScaleY ?? ratio, toX: 0, toY: 0 };\n\n graphic.setAttributes({ scaleX: opacityMap.fromX, scaleY: opacityMap.fromY });\n graphic.animate().to({ scaleX: opacityMap.toX, scaleY: opacityMap.toY }, duration, easing);\n\n return true;\n}\n"]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ICharacter } from '../../../story/character';
|
|
2
|
+
import type { IFadeInParams } from '../interface/appear-action';
|
|
3
|
+
export declare function wipeIn(character: ICharacter, animation: IFadeInParams, effect: string): void;
|
|
4
|
+
export declare function wipeOut(character: ICharacter, animation: IFadeInParams, effect: string): void;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { getCharacterParentGraphic } from "./common";
|
|
2
|
+
|
|
3
|
+
import { canDoGraphicAnimation } from "../component/utils";
|
|
4
|
+
|
|
5
|
+
const Direction = {
|
|
6
|
+
right: 0,
|
|
7
|
+
left: 1,
|
|
8
|
+
top: 2,
|
|
9
|
+
bottom: 3
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export function wipeIn(character, animation, effect) {
|
|
13
|
+
_wipe(getCharacterParentGraphic(character), animation, !0);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function wipeOut(character, animation, effect) {
|
|
17
|
+
_wipe(getCharacterParentGraphic(character), animation, !1);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function _wipe(graphic, params, appear) {
|
|
21
|
+
var _a, _b, _c, _d;
|
|
22
|
+
if (!canDoGraphicAnimation(graphic, params)) return !1;
|
|
23
|
+
const {wipe: wipe = {}} = params, from = null !== (_b = null !== (_a = wipe.from) && void 0 !== _a ? _a : params.from) && void 0 !== _b ? _b : "right", duration = null !== (_c = wipe.duration) && void 0 !== _c ? _c : params.duration, easing = null !== (_d = wipe.easing) && void 0 !== _d ? _d : params.easing;
|
|
24
|
+
let fromRatio = 0, toRatio = 1;
|
|
25
|
+
return appear || ([fromRatio, toRatio] = [ toRatio, fromRatio ]), graphic.setAttributes({
|
|
26
|
+
wipeDirection: Direction[from],
|
|
27
|
+
wipeRatio: fromRatio
|
|
28
|
+
}), graphic.animate().to({
|
|
29
|
+
wipeRatio: toRatio
|
|
30
|
+
}, duration, easing).onEnd((() => {
|
|
31
|
+
graphic.setAttributes({
|
|
32
|
+
wipeRatio: toRatio
|
|
33
|
+
});
|
|
34
|
+
})), !0;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=wipe-processor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/player/processor/common/wipe-processor.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AACrD,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAI3D,MAAM,SAAS,GAAQ;IACrB,KAAK,EAAE,CAAC;IACR,IAAI,EAAE,CAAC;IACP,GAAG,EAAE,CAAC;IACN,MAAM,EAAE,CAAC;CACV,CAAC;AAEF,MAAM,UAAU,MAAM,CAAC,SAAqB,EAAE,SAAwB,EAAE,MAAc;IACpF,MAAM,OAAO,GA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a,CAAC,EAAE,SAAS,EAAE,OAAO,EAAS,CAAC,CAAC;IACvD,CAAC,CAAC,CAAC;IACL,OAAO,IAAI,CAAC;AACd,CAAC","file":"wipe-processor.js","sourcesContent":["import type { IGraphic } from '@visactor/vrender-core';\nimport type { ICharacter } from '../../../story/character';\nimport { getCharacterParentGraphic } from './common';\nimport { canDoGraphicAnimation } from '../component/utils';\nimport type { IFadeInParams, IWipeInParams } from '../interface/appear-action';\nimport { IScaleInParams } from '../interface/appear-action';\n\nconst Direction: any = {\n right: 0,\n left: 1,\n top: 2,\n bottom: 3\n};\n\nexport function wipeIn(character: ICharacter, animation: IFadeInParams, effect: string) {\n const graphic = getCharacterParentGraphic(character);\n _wipe(graphic, animation as any, true);\n}\nexport function wipeOut(character: ICharacter, animation: IFadeInParams, effect: string) {\n const graphic = getCharacterParentGraphic(character);\n _wipe(graphic, animation as any, false);\n}\nfunction _wipe(graphic: IGraphic, params: IWipeInParams, appear: boolean) {\n if (!canDoGraphicAnimation(graphic, params)) {\n return false;\n }\n\n const { wipe = {} } = params;\n const from = wipe.from ?? params.from ?? 'right';\n const duration = wipe.duration ?? params.duration;\n const easing = wipe.easing ?? params.easing;\n\n let fromRatio = 0;\n let toRatio = 1;\n if (!appear) {\n [fromRatio, toRatio] = [toRatio, fromRatio];\n }\n\n graphic.setAttributes({\n wipeDirection: Direction[from],\n wipeRatio: fromRatio\n } as any);\n graphic\n .animate()\n .to({ wipeRatio: toRatio }, duration, easing)\n .onEnd(() => {\n graphic.setAttributes({ wipeRatio: toRatio } as any);\n });\n return true;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/player/processor/common-processor.ts"],"names":[],"mappings":"","file":"common-processor.js","sourcesContent":[""]}
|
|
@@ -1,16 +1,52 @@
|
|
|
1
1
|
import type { ICharacter } from '../../../story/character';
|
|
2
|
-
import type {
|
|
2
|
+
import type { IActionSpec } from '../../../story/interface';
|
|
3
3
|
import { ActionProcessorItem } from '../processor-item';
|
|
4
|
-
import type {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
import type { IComponentBounceAction, IComponentMoveToAction, IComponentScaleToAction, IComponentStyleAction } from '../interface/style-action';
|
|
5
|
+
import { scaleIn } from '../common/scale-processor';
|
|
6
|
+
import { moveIn } from '../common/move-processor';
|
|
7
|
+
export declare class CommonVisibilityActionProcessor extends ActionProcessorItem {
|
|
8
|
+
name: string;
|
|
8
9
|
constructor();
|
|
9
|
-
getStartTimeAndDuration(action:
|
|
10
|
+
getStartTimeAndDuration(action: IActionSpec): {
|
|
10
11
|
startTime: number;
|
|
11
12
|
duration: number;
|
|
12
13
|
};
|
|
13
|
-
run(character: ICharacter, actionSpec:
|
|
14
|
-
getEffectFunc(effect: string): typeof scaleIn;
|
|
14
|
+
run(character: ICharacter, actionSpec: IActionSpec): void;
|
|
15
|
+
getEffectFunc(effect: string, appear: boolean): typeof scaleIn | typeof moveIn;
|
|
16
|
+
}
|
|
17
|
+
export declare class CommonStyleActionProcessor extends ActionProcessorItem {
|
|
18
|
+
name: 'style';
|
|
19
|
+
constructor();
|
|
20
|
+
getStartTimeAndDuration(action: IActionSpec): {
|
|
21
|
+
startTime: number;
|
|
22
|
+
duration: number;
|
|
23
|
+
};
|
|
24
|
+
run(character: ICharacter, actionSpec: IComponentStyleAction): void;
|
|
25
|
+
}
|
|
26
|
+
export declare class CommonMoveToActionProcessor extends ActionProcessorItem {
|
|
27
|
+
name: 'moveTo';
|
|
28
|
+
constructor();
|
|
29
|
+
getStartTimeAndDuration(action: IActionSpec): {
|
|
30
|
+
startTime: number;
|
|
31
|
+
duration: number;
|
|
32
|
+
};
|
|
33
|
+
run(character: ICharacter, actionSpec: IComponentMoveToAction): void;
|
|
34
|
+
}
|
|
35
|
+
export declare class CommonScaleToActionProcessor extends ActionProcessorItem {
|
|
36
|
+
name: 'scaleTo';
|
|
37
|
+
constructor();
|
|
38
|
+
getStartTimeAndDuration(action: IActionSpec): {
|
|
39
|
+
startTime: number;
|
|
40
|
+
duration: number;
|
|
41
|
+
};
|
|
42
|
+
run(character: ICharacter, actionSpec: IComponentScaleToAction): void;
|
|
43
|
+
}
|
|
44
|
+
export declare class CommonBounceActionProcessor extends ActionProcessorItem {
|
|
45
|
+
name: 'bounce';
|
|
46
|
+
constructor();
|
|
47
|
+
getStartTimeAndDuration(action: IActionSpec): {
|
|
48
|
+
startTime: number;
|
|
49
|
+
duration: number;
|
|
50
|
+
};
|
|
51
|
+
run(character: ICharacter, actionSpec: IComponentBounceAction): void;
|
|
15
52
|
}
|
|
16
|
-
export {};
|