@visactor/vstory 0.0.4-alpha.2 → 0.0.5-alpha.0
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/README.md +13 -0
- 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 +2 -2
- package/cjs/constants/character.js +2 -3
- 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/line.d.ts +2 -0
- package/cjs/dsl/story-chart/line.js +2 -2
- 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 +4 -1
- 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/index.js +1 -1
- package/cjs/dsl/story-processor/processor.js +1 -1
- package/cjs/dsl/types/index.d.ts +1 -0
- package/cjs/dsl/types/index.js.map +1 -1
- package/cjs/dsl/utils/datum.js +2 -1
- package/cjs/dsl/utils/flicker.js +1 -1
- package/cjs/edit/const.d.ts +1 -3
- package/cjs/edit/const.js +1 -0
- package/cjs/edit/const.js.map +1 -1
- package/cjs/edit/edit-action.d.ts +9 -0
- package/cjs/edit/edit-action.js +61 -5
- package/cjs/edit/edit-action.js.map +1 -1
- package/cjs/edit/edit-component/base-selection.d.ts +8 -3
- package/cjs/edit/edit-component/base-selection.js +30 -4
- package/cjs/edit/edit-component/base-selection.js.map +1 -1
- package/cjs/edit/edit-component/chart-selection.d.ts +15 -0
- package/cjs/edit/edit-component/chart-selection.js +39 -0
- package/cjs/edit/edit-component/chart-selection.js.map +1 -0
- package/cjs/edit/edit-component/common.d.ts +1 -11
- package/cjs/edit/edit-component/common.js +1 -32
- package/cjs/edit/edit-component/common.js.map +1 -1
- package/cjs/edit/edit-component/edit-control/richtext-control.d.ts +19 -0
- package/cjs/edit/edit-component/edit-control/richtext-control.js +34 -0
- package/cjs/edit/edit-component/edit-control/richtext-control.js.map +1 -0
- package/cjs/edit/edit-component/edit-control/richtext-transform-control.d.ts +2 -3
- package/cjs/edit/edit-component/edit-control/richtext-transform-control.js +30 -32
- package/cjs/edit/edit-component/edit-control/richtext-transform-control.js.map +1 -1
- package/cjs/edit/edit-component/edit-control/transform-control.d.ts +4 -2
- package/cjs/edit/edit-component/edit-control/transform-control.js +10 -6
- package/cjs/edit/edit-component/edit-control/transform-control.js.map +1 -1
- package/cjs/edit/edit-component/edit-control/transform-drag.d.ts +1 -0
- package/cjs/edit/edit-component/edit-control/transform-drag.js +4 -2
- package/cjs/edit/edit-component/edit-control/transform-drag.js.map +1 -1
- package/cjs/edit/edit-component/image-selection.d.ts +1 -2
- package/cjs/edit/edit-component/image-selection.js +2 -5
- package/cjs/edit/edit-component/image-selection.js.map +1 -1
- package/cjs/edit/edit-component/index.js +4 -5
- package/cjs/edit/edit-component/index.js.map +1 -1
- package/cjs/edit/edit-component/layer-edit.js +0 -2
- package/cjs/edit/edit-component/mixin/richtext.d.ts +21 -0
- package/cjs/edit/edit-component/mixin/richtext.js +26 -0
- package/cjs/edit/edit-component/mixin/richtext.js.map +1 -0
- package/cjs/edit/edit-component/rect-selection.d.ts +8 -12
- package/cjs/edit/edit-component/rect-selection.js +13 -18
- package/cjs/edit/edit-component/rect-selection.js.map +1 -1
- package/cjs/edit/edit-component/richtext-selection-common.d.ts +19 -0
- package/cjs/edit/edit-component/richtext-selection-common.js +35 -0
- package/cjs/edit/edit-component/richtext-selection-common.js.map +1 -0
- package/cjs/edit/edit-component/richtext-selection.d.ts +0 -2
- package/cjs/edit/edit-component/richtext-selection.js +1 -7
- package/cjs/edit/edit-component/richtext-selection.js.map +1 -1
- package/cjs/edit/edit-component/shape-selection.d.ts +11 -0
- package/cjs/edit/edit-component/shape-selection.js +36 -0
- package/cjs/edit/edit-component/shape-selection.js.map +1 -0
- package/cjs/edit/edit-component/text-selection.d.ts +0 -3
- package/cjs/edit/edit-component/text-selection.js +3 -11
- package/cjs/edit/edit-component/text-selection.js.map +1 -1
- package/cjs/edit/edit.d.ts +5 -2
- package/cjs/edit/edit.js +20 -5
- package/cjs/edit/edit.js.map +1 -1
- package/cjs/edit/interface.d.ts +6 -1
- package/cjs/edit/interface.js +3 -1
- package/cjs/edit/interface.js.map +1 -1
- package/cjs/index.d.ts +3 -1
- package/cjs/index.js +2 -1
- 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 +31 -21
- 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/rankingBar/rankingBar.d.ts +29 -0
- package/cjs/player/processor/chart/rankingBar/rankingBar.js +54 -0
- package/cjs/player/processor/chart/rankingBar/rankingBar.js.map +1 -0
- 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 +76 -18
- package/cjs/player/processor/chart/vchart.js +151 -36
- 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 +23 -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 +99 -78
- 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 +15 -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 +33 -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 +31 -21
- package/cjs/player/processor/processorMap.js +48 -8
- package/cjs/player/processor/processorMap.js.map +1 -1
- package/cjs/player/scheduler.d.ts +4 -3
- package/cjs/player/scheduler.js +16 -10
- package/cjs/player/scheduler.js.map +1 -1
- package/cjs/scene/scene.js +2 -0
- package/cjs/story/canvas/canvas.d.ts +4 -2
- package/cjs/story/canvas/canvas.js +20 -14
- package/cjs/story/canvas/canvas.js.map +1 -1
- package/cjs/story/character/base/base.d.ts +7 -4
- package/cjs/story/character/base/base.js +7 -4
- package/cjs/story/character/base/base.js.map +1 -1
- package/cjs/story/character/chart/character.d.ts +16 -0
- package/cjs/story/character/chart/character.js +59 -14
- package/cjs/story/character/chart/character.js.map +1 -1
- package/cjs/story/character/chart/characters/rankingBar.d.ts +4 -0
- package/cjs/story/character/chart/characters/rankingBar.js +15 -0
- package/cjs/story/character/chart/characters/rankingBar.js.map +1 -0
- package/cjs/story/character/chart/graphic/vchart-graphic-picker.js +6 -8
- package/cjs/story/character/chart/graphic/vchart-graphic-picker.js.map +1 -1
- package/cjs/story/character/chart/graphic/vchart-graphic-render.js +8 -8
- package/cjs/story/character/chart/graphic/vchart-graphic-render.js.map +1 -1
- package/cjs/story/character/chart/graphic/vchart-graphic.d.ts +13 -2
- package/cjs/story/character/chart/graphic/vchart-graphic.js +82 -14
- package/cjs/story/character/chart/graphic/vchart-graphic.js.map +1 -1
- package/cjs/story/character/chart/runtime/common-spec.d.ts +2 -4
- package/cjs/story/character/chart/runtime/common-spec.js +0 -2
- package/cjs/story/character/chart/runtime/common-spec.js.map +1 -1
- package/cjs/story/character/chart/runtime/component-spec.d.ts +4 -3
- package/cjs/story/character/chart/runtime/component-spec.js +7 -5
- package/cjs/story/character/chart/runtime/component-spec.js.map +1 -1
- package/cjs/story/character/chart/temp/constant.d.ts +1 -0
- package/cjs/story/character/chart/temp/constant.js +2 -1
- package/cjs/story/character/chart/temp/constant.js.map +1 -1
- package/cjs/story/character/chart/temp/templates/bar.d.ts +20 -0
- package/cjs/story/character/chart/temp/templates/bar.js +31 -0
- package/cjs/story/character/chart/temp/templates/bar.js.map +1 -0
- package/cjs/story/character/chart/temp/templates/base-temp.d.ts +6 -4
- package/cjs/story/character/chart/temp/templates/base-temp.js +1 -1
- package/cjs/story/character/chart/temp/templates/base-temp.js.map +1 -1
- package/cjs/story/character/chart/temp/templates/ranking-bar-temp.d.ts +8 -0
- package/cjs/story/character/chart/temp/templates/ranking-bar-temp.js +22 -0
- package/cjs/story/character/chart/temp/templates/ranking-bar-temp.js.map +1 -0
- package/cjs/story/character/component/character-group/component-group-graphic-render.d.ts +2 -2
- package/cjs/story/character/component/character-group/component-group-graphic-render.js +3 -3
- package/cjs/story/character/component/character-group/component-group-graphic-render.js.map +1 -1
- package/cjs/story/character/component/character-group/component-group-graphic.d.ts +2 -1
- package/cjs/story/character/component/character-group/component-group-graphic.js +12 -4
- package/cjs/story/character/component/character-group/component-group-graphic.js.map +1 -1
- package/cjs/story/character/component/character.d.ts +9 -4
- package/cjs/story/character/component/character.js +26 -6
- package/cjs/story/character/component/character.js.map +1 -1
- package/cjs/story/character/component/characters/character-image.d.ts +3 -0
- package/cjs/story/character/component/characters/character-image.js +4 -0
- package/cjs/story/character/component/characters/character-image.js.map +1 -1
- package/cjs/story/character/component/characters/character-rect.d.ts +3 -0
- package/cjs/story/character/component/characters/character-rect.js +4 -0
- package/cjs/story/character/component/characters/character-rect.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-shape.d.ts +4 -0
- package/cjs/story/character/component/characters/character-shape.js +15 -0
- package/cjs/story/character/component/characters/character-shape.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 +24 -0
- package/cjs/story/character/component/graphic/{graphic-text.js → graphic-base-text.js} +45 -24
- 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/symbol.d.ts +3 -0
- package/cjs/story/character/component/graphic/symbol.js +17 -3
- package/cjs/story/character/component/graphic/symbol.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 +4 -2
- package/cjs/story/character/dsl-interface.js.map +1 -1
- package/cjs/story/character/runtime-interface.d.ts +10 -4
- package/cjs/story/character/runtime-interface.js.map +1 -1
- package/cjs/story/character/visactor/character.d.ts +20 -6
- package/cjs/story/character/visactor/character.js +17 -1
- 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 +5 -3
- package/cjs/story/index.js.map +1 -1
- package/cjs/story/interface/dsl-interface.d.ts +7 -9
- 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 +5 -3
- package/cjs/story/interface/runtime-interface.js.map +1 -1
- package/cjs/story/story.d.ts +2 -1
- package/cjs/story/story.js +9 -6
- package/cjs/story/story.js.map +1 -1
- package/cjs/story/utils/layout.d.ts +2 -1
- package/cjs/story/utils/layout.js +2 -2
- package/cjs/story/utils/layout.js.map +1 -1
- package/cjs/story/utils/vchart-pick.d.ts +115 -0
- package/cjs/story/utils/vchart-pick.js +109 -0
- package/cjs/story/utils/vchart-pick.js.map +1 -0
- package/cjs/util/space.js +2 -1
- package/dist/index.js +50811 -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 +2 -2
- package/es/constants/character.js +2 -3
- 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/line.d.ts +2 -0
- package/es/dsl/story-chart/line.js +2 -2
- 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 +4 -1
- 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/index.js +1 -1
- package/es/dsl/story-processor/processor.js +1 -1
- package/es/dsl/types/index.d.ts +1 -0
- package/es/dsl/types/index.js.map +1 -1
- package/es/dsl/utils/datum.js +2 -1
- package/es/dsl/utils/flicker.js +1 -1
- package/es/edit/const.d.ts +1 -3
- package/es/edit/const.js +1 -0
- package/es/edit/const.js.map +1 -1
- package/es/edit/edit-action.d.ts +9 -0
- package/es/edit/edit-action.js +63 -5
- package/es/edit/edit-action.js.map +1 -1
- package/es/edit/edit-component/base-selection.d.ts +8 -3
- package/es/edit/edit-component/base-selection.js +31 -3
- package/es/edit/edit-component/base-selection.js.map +1 -1
- package/es/edit/edit-component/chart-selection.d.ts +15 -0
- package/es/edit/edit-component/chart-selection.js +31 -0
- package/es/edit/edit-component/chart-selection.js.map +1 -0
- package/es/edit/edit-component/common.d.ts +1 -11
- package/es/edit/edit-component/common.js +1 -26
- package/es/edit/edit-component/common.js.map +1 -1
- package/es/edit/edit-component/edit-control/richtext-control.d.ts +19 -0
- package/es/edit/edit-component/edit-control/richtext-control.js +28 -0
- package/es/edit/edit-component/edit-control/richtext-control.js.map +1 -0
- package/es/edit/edit-component/edit-control/richtext-transform-control.d.ts +2 -3
- package/es/edit/edit-component/edit-control/richtext-transform-control.js +29 -34
- package/es/edit/edit-component/edit-control/richtext-transform-control.js.map +1 -1
- package/es/edit/edit-component/edit-control/transform-control.d.ts +4 -2
- package/es/edit/edit-component/edit-control/transform-control.js +10 -6
- package/es/edit/edit-component/edit-control/transform-control.js.map +1 -1
- package/es/edit/edit-component/edit-control/transform-drag.d.ts +1 -0
- package/es/edit/edit-component/edit-control/transform-drag.js +4 -2
- package/es/edit/edit-component/edit-control/transform-drag.js.map +1 -1
- package/es/edit/edit-component/image-selection.d.ts +1 -2
- package/es/edit/edit-component/image-selection.js +2 -5
- package/es/edit/edit-component/image-selection.js.map +1 -1
- package/es/edit/edit-component/index.js +7 -9
- package/es/edit/edit-component/index.js.map +1 -1
- package/es/edit/edit-component/layer-edit.js +0 -2
- package/es/edit/edit-component/mixin/richtext.d.ts +21 -0
- package/es/edit/edit-component/mixin/richtext.js +18 -0
- package/es/edit/edit-component/mixin/richtext.js.map +1 -0
- package/es/edit/edit-component/rect-selection.d.ts +8 -12
- package/es/edit/edit-component/rect-selection.js +14 -21
- package/es/edit/edit-component/rect-selection.js.map +1 -1
- package/es/edit/edit-component/richtext-selection-common.d.ts +19 -0
- package/es/edit/edit-component/richtext-selection-common.js +33 -0
- package/es/edit/edit-component/richtext-selection-common.js.map +1 -0
- package/es/edit/edit-component/richtext-selection.d.ts +0 -2
- package/es/edit/edit-component/richtext-selection.js +1 -7
- package/es/edit/edit-component/richtext-selection.js.map +1 -1
- package/es/edit/edit-component/shape-selection.d.ts +11 -0
- package/es/edit/edit-component/shape-selection.js +30 -0
- package/es/edit/edit-component/shape-selection.js.map +1 -0
- package/es/edit/edit-component/text-selection.d.ts +0 -3
- package/es/edit/edit-component/text-selection.js +2 -12
- package/es/edit/edit-component/text-selection.js.map +1 -1
- package/es/edit/edit.d.ts +5 -2
- package/es/edit/edit.js +21 -4
- package/es/edit/edit.js.map +1 -1
- package/es/edit/interface.d.ts +6 -1
- package/es/edit/interface.js +3 -1
- package/es/edit/interface.js.map +1 -1
- package/es/index.d.ts +3 -1
- package/es/index.js +5 -1
- 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 +33 -20
- 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/rankingBar/rankingBar.d.ts +29 -0
- package/es/player/processor/chart/rankingBar/rankingBar.js +50 -0
- package/es/player/processor/chart/rankingBar/rankingBar.js.map +1 -0
- 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 +76 -18
- package/es/player/processor/chart/vchart.js +145 -34
- 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 +19 -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 +15 -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 +33 -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 +31 -21
- package/es/player/processor/processorMap.js +59 -15
- package/es/player/processor/processorMap.js.map +1 -1
- package/es/player/scheduler.d.ts +4 -3
- package/es/player/scheduler.js +16 -10
- package/es/player/scheduler.js.map +1 -1
- package/es/scene/scene.js +2 -0
- package/es/story/canvas/canvas.d.ts +4 -2
- package/es/story/canvas/canvas.js +21 -14
- package/es/story/canvas/canvas.js.map +1 -1
- package/es/story/character/base/base.d.ts +7 -4
- package/es/story/character/base/base.js +7 -4
- package/es/story/character/base/base.js.map +1 -1
- package/es/story/character/chart/character.d.ts +16 -0
- package/es/story/character/chart/character.js +63 -17
- package/es/story/character/chart/character.js.map +1 -1
- package/es/story/character/chart/characters/rankingBar.d.ts +4 -0
- package/es/story/character/chart/characters/rankingBar.js +14 -0
- package/es/story/character/chart/characters/rankingBar.js.map +1 -0
- package/es/story/character/chart/graphic/vchart-graphic-picker.js +6 -8
- package/es/story/character/chart/graphic/vchart-graphic-picker.js.map +1 -1
- package/es/story/character/chart/graphic/vchart-graphic-render.js +9 -9
- package/es/story/character/chart/graphic/vchart-graphic-render.js.map +1 -1
- package/es/story/character/chart/graphic/vchart-graphic.d.ts +13 -2
- package/es/story/character/chart/graphic/vchart-graphic.js +85 -13
- package/es/story/character/chart/graphic/vchart-graphic.js.map +1 -1
- package/es/story/character/chart/runtime/common-spec.d.ts +2 -4
- package/es/story/character/chart/runtime/common-spec.js +0 -2
- package/es/story/character/chart/runtime/common-spec.js.map +1 -1
- package/es/story/character/chart/runtime/component-spec.d.ts +4 -3
- package/es/story/character/chart/runtime/component-spec.js +7 -5
- package/es/story/character/chart/runtime/component-spec.js.map +1 -1
- package/es/story/character/chart/temp/constant.d.ts +1 -0
- package/es/story/character/chart/temp/constant.js +2 -1
- package/es/story/character/chart/temp/constant.js.map +1 -1
- package/es/story/character/chart/temp/templates/bar.d.ts +20 -0
- package/es/story/character/chart/temp/templates/bar.js +27 -0
- package/es/story/character/chart/temp/templates/bar.js.map +1 -0
- package/es/story/character/chart/temp/templates/base-temp.d.ts +6 -4
- package/es/story/character/chart/temp/templates/base-temp.js +1 -1
- package/es/story/character/chart/temp/templates/base-temp.js.map +1 -1
- package/es/story/character/chart/temp/templates/ranking-bar-temp.d.ts +8 -0
- package/es/story/character/chart/temp/templates/ranking-bar-temp.js +18 -0
- package/es/story/character/chart/temp/templates/ranking-bar-temp.js.map +1 -0
- package/es/story/character/component/character-group/component-group-graphic-render.d.ts +2 -2
- package/es/story/character/component/character-group/component-group-graphic-render.js +4 -4
- package/es/story/character/component/character-group/component-group-graphic-render.js.map +1 -1
- package/es/story/character/component/character-group/component-group-graphic.d.ts +2 -1
- package/es/story/character/component/character-group/component-group-graphic.js +11 -3
- package/es/story/character/component/character-group/component-group-graphic.js.map +1 -1
- package/es/story/character/component/character.d.ts +9 -4
- package/es/story/character/component/character.js +26 -5
- package/es/story/character/component/character.js.map +1 -1
- package/es/story/character/component/characters/character-image.d.ts +3 -0
- package/es/story/character/component/characters/character-image.js +4 -0
- package/es/story/character/component/characters/character-image.js.map +1 -1
- package/es/story/character/component/characters/character-rect.d.ts +3 -0
- package/es/story/character/component/characters/character-rect.js +4 -0
- package/es/story/character/component/characters/character-rect.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-shape.d.ts +4 -0
- package/es/story/character/component/characters/character-shape.js +15 -0
- package/es/story/character/component/characters/character-shape.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 +24 -0
- package/es/story/character/component/graphic/{graphic-text.js → graphic-base-text.js} +44 -23
- 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/symbol.d.ts +3 -0
- package/es/story/character/component/graphic/symbol.js +17 -2
- package/es/story/character/component/graphic/symbol.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 +4 -2
- package/es/story/character/dsl-interface.js.map +1 -1
- package/es/story/character/runtime-interface.d.ts +10 -4
- package/es/story/character/runtime-interface.js.map +1 -1
- package/es/story/character/visactor/character.d.ts +20 -6
- package/es/story/character/visactor/character.js +18 -0
- 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 +7 -6
- package/es/story/index.js.map +1 -1
- package/es/story/interface/dsl-interface.d.ts +7 -9
- 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 +5 -3
- package/es/story/interface/runtime-interface.js.map +1 -1
- package/es/story/story.d.ts +2 -1
- package/es/story/story.js +9 -6
- package/es/story/story.js.map +1 -1
- package/es/story/utils/layout.d.ts +2 -1
- package/es/story/utils/layout.js +2 -2
- package/es/story/utils/layout.js.map +1 -1
- package/es/story/utils/vchart-pick.d.ts +115 -0
- package/es/story/utils/vchart-pick.js +115 -0
- package/es/story/utils/vchart-pick.js.map +1 -0
- package/es/util/space.js +2 -1
- package/package.json +9 -8
- 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
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IRichText } from '@visactor/vrender';
|
|
2
2
|
import type { IPointLike } from '@visactor/vutils';
|
|
3
3
|
import { Graphic } from './graphic';
|
|
4
4
|
import type { IWidgetData } from '../../dsl-interface';
|
|
5
|
-
export declare class
|
|
6
|
-
protected _graphic:
|
|
5
|
+
export declare class GraphicText extends Graphic {
|
|
6
|
+
protected _graphic: IRichText;
|
|
7
7
|
getInitialAttributes(): {
|
|
8
8
|
x: number;
|
|
9
9
|
y: number;
|
|
@@ -19,6 +19,7 @@ export declare class GraphicPureText extends Graphic {
|
|
|
19
19
|
stroke: boolean;
|
|
20
20
|
shapePoints: IPointLike[];
|
|
21
21
|
};
|
|
22
|
+
transformTextAttrsToRichTextConfig(): import("@visactor/vrender").IRichTextCharacter[];
|
|
22
23
|
init(): void;
|
|
23
24
|
applyLayoutData(w: Partial<IWidgetData>): void;
|
|
24
25
|
}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createRichText } from "@visactor/vrender";
|
|
2
2
|
|
|
3
3
|
import { Graphic } from "./graphic";
|
|
4
4
|
|
|
5
5
|
import { getLayoutFromWidget } from "../../../utils/layout";
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
const richtextCombinedAttrs = [ "fill", "stroke", "fontSize", "fontFamily", "fontStyle", "fontWeight", "lineWidth", "opacity", "fillOpacity", "strokeOpacity" ];
|
|
8
|
+
|
|
9
|
+
export class GraphicText extends Graphic {
|
|
8
10
|
getInitialAttributes() {
|
|
9
11
|
return {
|
|
10
12
|
x: 0,
|
|
@@ -22,10 +24,25 @@ export class GraphicPureText extends Graphic {
|
|
|
22
24
|
shapePoints: []
|
|
23
25
|
};
|
|
24
26
|
}
|
|
27
|
+
transformTextAttrsToRichTextConfig() {
|
|
28
|
+
var _a, _b;
|
|
29
|
+
const textAttr = null !== (_b = null === (_a = this._character.spec.options) || void 0 === _a ? void 0 : _a.graphic) && void 0 !== _b ? _b : {};
|
|
30
|
+
let textConfig = textAttr.textConfig;
|
|
31
|
+
if ((!textConfig || !textConfig.length) && textAttr.text) {
|
|
32
|
+
const textList = Array.isArray(textAttr.text) ? textAttr.text : [ textAttr.text ];
|
|
33
|
+
textConfig = textList.map(((item, i) => ({
|
|
34
|
+
textAlign: textAttr.textAlign,
|
|
35
|
+
textBaseline: textAttr.textBaseline,
|
|
36
|
+
text: item + (i < textList.length - 1 ? "\n" : "")
|
|
37
|
+
})));
|
|
38
|
+
}
|
|
39
|
+
return textConfig;
|
|
40
|
+
}
|
|
25
41
|
init() {
|
|
26
42
|
var _a, _b;
|
|
27
|
-
this._graphic || (this._graphic =
|
|
28
|
-
|
|
43
|
+
this._graphic || (this._graphic = createRichText(this._transformAttributes(Object.assign(Object.assign(Object.assign({}, this.getInitialAttributes()), null !== (_b = null === (_a = this._character.spec.options) || void 0 === _a ? void 0 : _a.graphic) && void 0 !== _b ? _b : {}), {
|
|
44
|
+
textConfig: this.transformTextAttrsToRichTextConfig()
|
|
45
|
+
}))), this._graphic.name = `graphic-text-${this._character.id}`, this._character.getGraphicParent().add(this._graphic));
|
|
29
46
|
}
|
|
30
47
|
applyLayoutData(w) {
|
|
31
48
|
const {x: x, y: y, width: width, height: height, angle: angle} = getLayoutFromWidget(w);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/story/character/component/graphic/text.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"sources":["../src/story/character/component/graphic/text.ts"],"names":[],"mappings":"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","file":"text.js","sourcesContent":["import type { IRichText, IRichTextGraphicAttribute, IText } from '@visactor/vrender';\nimport { createRichText, createText } from '@visactor/vrender';\nimport type { IPointLike } from '@visactor/vutils';\nimport { Graphic } from './graphic';\nimport type { IWidgetData } from '../../dsl-interface';\nimport { getLayoutFromWidget } from '../../../utils/layout';\n\nconst richtextCombinedAttrs = [\n 'fill',\n 'stroke',\n 'fontSize',\n 'fontFamily',\n 'fontStyle',\n 'fontWeight',\n 'lineWidth',\n 'opacity',\n 'fillOpacity',\n 'strokeOpacity'\n];\n\nexport class GraphicText extends Graphic {\n protected _graphic: IRichText;\n\n getInitialAttributes() {\n return {\n x: 0,\n y: 0,\n width: 120,\n height: 80,\n angle: 0,\n fontSize: 16,\n textAlign: 'center',\n textBaseline: 'middle',\n fill: '#000000',\n lineWidth: 2,\n ignoreBuf: true,\n stroke: false,\n shapePoints: [] as IPointLike[]\n };\n }\n\n transformTextAttrsToRichTextConfig() {\n const textAttr = (this._character.spec.options?.graphic ?? {}) as IRichTextGraphicAttribute;\n let textConfig = textAttr.textConfig;\n\n // 如果是纯文本定义方式\n if (!(textConfig && textConfig.length) && textAttr.text) {\n const textList = Array.isArray(textAttr.text) ? textAttr.text : [textAttr.text];\n textConfig = textList.map((item, i) => {\n return {\n textAlign: textAttr.textAlign,\n textBaseline: textAttr.textBaseline,\n // ...((textAttr || {}) as any),\n text: item + (i < textList.length - 1 ? '\\n' : '')\n };\n });\n }\n\n return textConfig;\n }\n\n init() {\n if (!this._graphic) {\n this._graphic = createRichText(\n this._transformAttributes({\n ...this.getInitialAttributes(),\n ...(this._character.spec.options?.graphic ?? {}),\n textConfig: this.transformTextAttrsToRichTextConfig()\n })\n );\n this._graphic.name = `graphic-text-${this._character.id}`;\n this._character.getGraphicParent().add(this._graphic);\n }\n }\n\n applyLayoutData(w: Partial<IWidgetData>) {\n const { x, y, width, height, angle } = getLayoutFromWidget(w);\n this._graphic.setAttributes(\n this._transformAttributes({\n x,\n y,\n angle,\n width,\n height,\n maxLineWidth: width,\n heightLimit: height\n })\n );\n }\n}\n"]}
|
|
@@ -7,6 +7,12 @@ export declare class GraphicTimeline extends Graphic {
|
|
|
7
7
|
x: number;
|
|
8
8
|
y: number;
|
|
9
9
|
clipRange: number;
|
|
10
|
+
activeSymbolStyle: {
|
|
11
|
+
size: number;
|
|
12
|
+
};
|
|
13
|
+
activeLineStyle: {
|
|
14
|
+
lineWidth: number;
|
|
15
|
+
};
|
|
10
16
|
};
|
|
11
17
|
init(): void;
|
|
12
18
|
applyLayoutData(w: Partial<IWidgetData>): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/story/character/component/graphic/timeline.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAGxD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,MAAM,OAAO,eAAgB,SAAQ,OAAO;IAG1C,oBAAoB;QAClB,OAAO;YACL,CAAC,EAAE,CAAC;YACJ,CAAC,EAAE,CAAC;YACJ,SAAS,EAAE,CAAC;
|
|
1
|
+
{"version":3,"sources":["../src/story/character/component/graphic/timeline.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAGxD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,MAAM,OAAO,eAAgB,SAAQ,OAAO;IAG1C,oBAAoB;QAClB,OAAO;YACL,CAAC,EAAE,CAAC;YACJ,CAAC,EAAE,CAAC;YACJ,SAAS,EAAE,CAAC;YACZ,iBAAiB,EAAE;gBACjB,IAAI,EAAE,EAAE;aACT;YACD,eAAe,EAAE;gBACf,SAAS,EAAE,GAAG;aACf;SACF,CAAC;IACJ,CAAC;IAED,IAAI;;QACF,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;YAClB,IAAI,CAAC,QAAQ,GAAG,IAAI,QAAQ,CAC1B,IAAI,CAAC,oBAAoB,iCACpB,IAAI,CAAC,oBAAoB,EAAE,GAC3B,CAAC,MAAA,MAAA,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,0CAAE,OAAO,mCAAI,EAAE,CAAC,EAChD,CACH,CAAC;YACF,IAAI,CAAC,QAAQ,CAAC,IAAI,GAAG,YAAY,IAAI,CAAC,UAAU,CAAC,EAAE,EAAE,CAAC;YACtD,IAAI,CAAC,UAAU,CAAC,gBAAgB,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;SACvD;IACH,CAAC;IAED,eAAe,CAAC,CAAuB;QACrC,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,mBAAmB,CAAC,CAAC,CAAC,CAAC;QAC9D,IAAI,CAAC,QAAQ,CAAC,aAAa,CACzB,IAAI,CAAC,oBAAoB,CAAC;YACxB,CAAC;YACD,CAAC;YACD,KAAK;YACL,KAAK;YACL,MAAM;SACP,CAAC,CACH,CAAC;IACJ,CAAC;CACF","file":"timeline.js","sourcesContent":["import { Timeline } from '@visactor/vrender-components';\nimport { createText } from '@visactor/vrender';\nimport type { IPointLike } from '@visactor/vutils';\nimport { Graphic } from './graphic';\nimport type { IWidgetData } from '../../dsl-interface';\nimport { getLayoutFromWidget } from '../../../utils/layout';\n\nexport class GraphicTimeline extends Graphic {\n protected _graphic: Timeline;\n\n getInitialAttributes() {\n return {\n x: 0,\n y: 0,\n clipRange: 0,\n activeSymbolStyle: {\n size: 26\n },\n activeLineStyle: {\n lineWidth: 1.5\n }\n };\n }\n\n init() {\n if (!this._graphic) {\n this._graphic = new Timeline(\n this._transformAttributes({\n ...this.getInitialAttributes(),\n ...(this._character.spec.options?.graphic ?? {})\n })\n );\n this._graphic.name = `timeline-${this._character.id}`;\n this._character.getGraphicParent().add(this._graphic);\n }\n }\n\n applyLayoutData(w: Partial<IWidgetData>) {\n const { x, y, width, height, angle } = getLayoutFromWidget(w);\n this._graphic.setAttributes(\n this._transformAttributes({\n x,\n y,\n angle,\n width,\n height\n })\n );\n }\n}\n"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IInitOption } from '@visactor/vchart';
|
|
2
|
+
import type { IRichTextGraphicAttribute, ITextGraphicAttribute } from '@visactor/vrender';
|
|
2
3
|
import type { DirectionType } from './chart/const';
|
|
3
4
|
export type IPercent = `${number}%`;
|
|
4
5
|
export type WidgetNumber = number;
|
|
@@ -21,7 +22,7 @@ export interface ICharacterSpecBase {
|
|
|
21
22
|
export type IEditorTextGraphicAttribute = {
|
|
22
23
|
graphicAlign?: 'left' | 'center' | 'right';
|
|
23
24
|
graphicBaseline?: 'top' | 'middle' | 'bottom';
|
|
24
|
-
} & ITextGraphicAttribute
|
|
25
|
+
} & Partial<ITextGraphicAttribute & IRichTextGraphicAttribute>;
|
|
25
26
|
export interface IComponentCharacterSpec extends ICharacterSpecBase {
|
|
26
27
|
options: {
|
|
27
28
|
graphic: any;
|
|
@@ -44,6 +45,7 @@ export interface IComponentSpec {
|
|
|
44
45
|
export interface IChartCharacterSpec extends ICharacterSpecBase {
|
|
45
46
|
options: {
|
|
46
47
|
spec?: any;
|
|
48
|
+
initOption?: IInitOption;
|
|
47
49
|
panel?: any;
|
|
48
50
|
theme?: any;
|
|
49
51
|
data?: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/story/character/dsl-interface.ts"],"names":[],"mappings":"","file":"dsl-interface.js","sourcesContent":["import type { ITextGraphicAttribute } from '@visactor/vrender';\nimport type { DirectionType } from './chart/const';\n\nexport type IPercent = `${number}%`;\nexport type WidgetNumber = number; // | IPercent;\n\nexport type IWidgetData = {\n left: WidgetNumber;\n top: WidgetNumber;\n} & (\n | {\n bottom: WidgetNumber;\n right: WidgetNumber;\n }\n | {\n width: WidgetNumber;\n height: WidgetNumber;\n }\n);\n\nexport interface ICharacterSpecBase {\n id: string;\n type: string; // 类型\n position: IWidgetData; // 定位描述\n zIndex: number;\n}\n\nexport type IEditorTextGraphicAttribute = {\n graphicAlign?: 'left' | 'center' | 'right';\n graphicBaseline?: 'top' | 'middle' | 'bottom';\n} & ITextGraphicAttribute
|
|
1
|
+
{"version":3,"sources":["../src/story/character/dsl-interface.ts"],"names":[],"mappings":"","file":"dsl-interface.js","sourcesContent":["import type { IInitOption } from '@visactor/vchart';\nimport type { IRichTextGraphicAttribute, ITextGraphicAttribute } from '@visactor/vrender';\nimport type { DirectionType } from './chart/const';\n\nexport type IPercent = `${number}%`;\nexport type WidgetNumber = number; // | IPercent;\n\nexport type IWidgetData = {\n left: WidgetNumber;\n top: WidgetNumber;\n} & (\n | {\n bottom: WidgetNumber;\n right: WidgetNumber;\n }\n | {\n width: WidgetNumber;\n height: WidgetNumber;\n }\n);\n\nexport interface ICharacterSpecBase {\n id: string;\n type: string; // 类型\n position: IWidgetData; // 定位描述\n zIndex: number;\n}\n\nexport type IEditorTextGraphicAttribute = {\n graphicAlign?: 'left' | 'center' | 'right';\n graphicBaseline?: 'top' | 'middle' | 'bottom';\n} & Partial<ITextGraphicAttribute & IRichTextGraphicAttribute>;\n\nexport interface IComponentCharacterSpec extends ICharacterSpecBase {\n options: {\n graphic: any;\n text?: IEditorTextGraphicAttribute;\n isResized?: boolean;\n angle?: number;\n shapePoints?: any;\n };\n}\n\nexport interface IComponentMatch {\n usrId?: string;\n specIndex?: number | 'all'; // all 表示所有\n [key: string]: any;\n}\n\nexport interface IComponentSpec {\n specKey: string;\n matchInfo: IComponentMatch;\n spec: any;\n}\n\nexport interface IChartCharacterSpec extends ICharacterSpecBase {\n options: {\n // 图表spec\n spec?: any;\n // 初始化参数\n initOption?: IInitOption;\n panel?: any;\n // 各种图表配置属性\n theme?: any;\n // 数据源\n data?: any;\n // 内部模块布局信息\n padding?: any;\n // 标题\n title?: any;\n layout?: any;\n // 色板\n color?: string[];\n // 标注\n marker?: any;\n // mark单元素样式配置\n markStyle?: any[];\n // 组样式\n dataGroupSpec?: {\n [key: string]: any;\n };\n // 方向\n direction?: DirectionType;\n // 系列配置\n seriesSpec?: {\n matchInfo: IComponentMatch;\n spec: any;\n }[];\n // 模块 spec\n componentSpec?: IComponentSpec[];\n };\n}\n\nexport type ICharacterSpec = IChartCharacterSpec | IComponentCharacterSpec;\n"]}
|
|
@@ -1,25 +1,31 @@
|
|
|
1
|
-
import type { IGroup } from '@visactor/vrender';
|
|
2
|
-
import type { IPointLike } from '@visactor/vutils';
|
|
1
|
+
import type { IGroup, IGraphic } from '@visactor/vrender';
|
|
2
|
+
import type { IBoundsLike, IPointLike } from '@visactor/vutils';
|
|
3
3
|
import type { IStory, IStoryCanvas, StoryEvent } from '../interface/runtime-interface';
|
|
4
4
|
import type { ICharacterSpec } from './dsl-interface';
|
|
5
5
|
import type { Graphic } from './component/graphic/graphic';
|
|
6
6
|
export interface ICharacterPickInfo {
|
|
7
7
|
part: string;
|
|
8
|
-
|
|
8
|
+
graphic?: IGraphic;
|
|
9
|
+
graphicType?: string;
|
|
10
|
+
modelInfo?: any;
|
|
9
11
|
}
|
|
10
12
|
export interface ICharacter {
|
|
11
13
|
id: string;
|
|
14
|
+
type: string;
|
|
15
|
+
visActorType: string;
|
|
12
16
|
spec: ICharacterSpec;
|
|
17
|
+
graphic: Graphic | IGroup;
|
|
13
18
|
init: () => void;
|
|
14
19
|
reset: () => void;
|
|
15
20
|
show: () => void;
|
|
16
21
|
hide: () => void;
|
|
17
22
|
getGraphicParent: () => IGroup;
|
|
18
|
-
|
|
23
|
+
getLayoutBounds: () => IBoundsLike;
|
|
19
24
|
tickTo: (t: number) => void;
|
|
20
25
|
checkEvent: (event: StoryEvent) => false | (ICharacterPickInfo & any);
|
|
21
26
|
updateSpec: (spec: Omit<Partial<ICharacterSpec>, 'id' | 'type'>) => void;
|
|
22
27
|
setAttributes: (attr: Record<string, any>) => void;
|
|
28
|
+
release: () => void;
|
|
23
29
|
}
|
|
24
30
|
export interface ICharacterInitOption {
|
|
25
31
|
story: IStory;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/story/character/runtime-interface.ts"],"names":[],"mappings":"","file":"runtime-interface.js","sourcesContent":["import type { IGroup } from '@visactor/vrender';\nimport type { IPointLike } from '@visactor/vutils';\nimport type {
|
|
1
|
+
{"version":3,"sources":["../src/story/character/runtime-interface.ts"],"names":[],"mappings":"","file":"runtime-interface.js","sourcesContent":["import type { IGroup, IGraphic } from '@visactor/vrender';\nimport type { IBoundsLike, IPointLike } from '@visactor/vutils';\nimport type { IStory, IStoryCanvas, StoryEvent } from '../interface/runtime-interface';\nimport type { ICharacterSpec } from './dsl-interface';\nimport type { Graphic } from './component/graphic/graphic';\n\nexport interface ICharacterPickInfo {\n part: string;\n graphic?: IGraphic;\n graphicType?: string;\n modelInfo?: any;\n}\nexport interface ICharacter {\n id: string;\n type: string;\n visActorType: string;\n spec: ICharacterSpec;\n graphic: Graphic | IGroup;\n\n init: () => void;\n reset: () => void;\n show: () => void;\n hide: () => void;\n getGraphicParent: () => IGroup;\n getLayoutBounds: () => IBoundsLike;\n tickTo: (t: number) => void;\n\n checkEvent: (event: StoryEvent) => false | (ICharacterPickInfo & any);\n\n updateSpec: (spec: Omit<Partial<ICharacterSpec>, 'id' | 'type'>) => void;\n\n setAttributes: (attr: Record<string, any>) => void;\n release: () => void;\n}\n\nexport interface ICharacterInitOption {\n story: IStory;\n canvas: IStoryCanvas;\n graphicParent: IGroup;\n}\n\nexport interface ICharacterConstructor {\n new (spec: ICharacterSpec, option: ICharacterInitOption): ICharacter;\n}\n\nexport interface ILayoutAttribute {\n x: number;\n y: number;\n width: number;\n height: number;\n angle: number;\n anchor?: [number | string, number | string];\n dx?: number;\n dy?: number;\n shapePoints?: IPointLike[];\n}\n"]}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import { ICharacterSpec } from 'src/story/character/dsl-interface';
|
|
1
|
+
import type { ICharacterSpec } from 'src/story/character/dsl-interface';
|
|
2
2
|
import { CharacterBase } from '../base/base';
|
|
3
|
-
import type { ISpecProcess, ICharacterVisactor
|
|
4
|
-
import { ICharacterInitOption } from '../runtime-interface';
|
|
5
|
-
import { IChartCharacterRuntime } from '../chart/runtime/interface';
|
|
3
|
+
import type { ISpecProcess, ICharacterVisactor } from './interface';
|
|
4
|
+
import type { ICharacterInitOption } from '../runtime-interface';
|
|
5
|
+
import type { IChartCharacterRuntime } from '../chart/runtime/interface';
|
|
6
6
|
export declare abstract class CharacterVisactor extends CharacterBase implements ICharacterVisactor {
|
|
7
7
|
protected _specProcess: ISpecProcess;
|
|
8
8
|
get specProcess(): ISpecProcess;
|
|
9
9
|
get dataTempTransform(): import("./interface").IDataTempTransform;
|
|
10
10
|
get chartType(): string;
|
|
11
11
|
get tempType(): string;
|
|
12
|
-
protected _graphic: IVisactorGraphic;
|
|
13
12
|
protected _runtime: IChartCharacterRuntime[];
|
|
14
13
|
constructor(spec: ICharacterSpec, option: ICharacterInitOption);
|
|
15
14
|
protected _initRuntime(): void;
|
|
@@ -24,7 +23,22 @@ export declare abstract class CharacterVisactor extends CharacterBase implements
|
|
|
24
23
|
protected abstract _updateVisactorSpec(): void;
|
|
25
24
|
show(): void;
|
|
26
25
|
hide(): void;
|
|
27
|
-
getGraphicParent():
|
|
26
|
+
getGraphicParent(): any;
|
|
27
|
+
getViewBoxFromSpec(): {
|
|
28
|
+
layout: Partial<import("../runtime-interface").ILayoutAttribute>;
|
|
29
|
+
viewBox: {
|
|
30
|
+
x1: number;
|
|
31
|
+
x2: number;
|
|
32
|
+
y1: number;
|
|
33
|
+
y2: number;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
getLayoutBounds(): {
|
|
37
|
+
x1: number;
|
|
38
|
+
x2: number;
|
|
39
|
+
y1: number;
|
|
40
|
+
y2: number;
|
|
41
|
+
};
|
|
28
42
|
tickTo(t: number): void;
|
|
29
43
|
release(): void;
|
|
30
44
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { CharacterBase } from "../base/base";
|
|
2
2
|
|
|
3
|
+
import { getLayoutFromWidget } from "../../utils/layout";
|
|
4
|
+
|
|
3
5
|
export class CharacterVisactor extends CharacterBase {
|
|
4
6
|
get specProcess() {
|
|
5
7
|
return this._specProcess;
|
|
@@ -37,6 +39,22 @@ export class CharacterVisactor extends CharacterBase {
|
|
|
37
39
|
getGraphicParent() {
|
|
38
40
|
return this._graphic;
|
|
39
41
|
}
|
|
42
|
+
getViewBoxFromSpec() {
|
|
43
|
+
const layout = getLayoutFromWidget(this._spec.position);
|
|
44
|
+
return {
|
|
45
|
+
layout: layout,
|
|
46
|
+
viewBox: {
|
|
47
|
+
x1: layout.x,
|
|
48
|
+
x2: layout.x + layout.width,
|
|
49
|
+
y1: layout.y,
|
|
50
|
+
y2: layout.y + layout.height
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
getLayoutBounds() {
|
|
55
|
+
const {viewBox: viewBox} = this.getViewBoxFromSpec();
|
|
56
|
+
return viewBox;
|
|
57
|
+
}
|
|
40
58
|
tickTo(t) {}
|
|
41
59
|
release() {
|
|
42
60
|
var _a, _b;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/story/character/visactor/character.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"sources":["../src/story/character/visactor/character.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAI7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAEzD,MAAM,OAAgB,iBAAkB,SAAQ,aAAa;IAE3D,IAAI,WAAW;QACb,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IACD,IAAI,iBAAiB;QACnB,OAAO,IAAI,CAAC,YAAY,CAAC,iBAAiB,CAAC;IAC7C,CAAC;IAED,IAAI,SAAS;;QACX,OAAO,MAAA,IAAI,CAAC,YAAY,CAAC,iBAAiB,CAAC,QAAQ,0CAAE,YAAY,EAAE,CAAC;IACtE,CAAC;IAED,IAAI,QAAQ;;QACV,OAAO,MAAA,IAAI,CAAC,YAAY,CAAC,iBAAiB,CAAC,QAAQ,0CAAE,IAAI,CAAC;IAC5D,CAAC;IAID,YAAY,IAAoB,EAAE,MAA4B;QAC5D,KAAK,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QAHZ,aAAQ,GAA6B,EAAE,CAAC;QAiBlD,gBAAW,GAAG,GAAG,EAAE;;YACjB,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;YAC7B,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,WAAC,OAAA,MAAA,CAAC,CAAC,WAAW,iDAAI,CAAA,EAAA,CAAC,CAAC;YAC9C,MAAA,IAAI,CAAC,YAAY,CAAC,iBAAiB,CAAC,QAAQ,0CAAE,gBAAgB,CAAC,IAAI,CAAC,YAAY,CAAC,UAAU,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;YACpH,IAAI,CAAC,mBAAmB,EAAE,CAAC;YAC3B,IAAI,CAAC,YAAY,EAAE,CAAC;QACtB,CAAC,CAAC;QAnBA,IAAI,CAAC,gBAAgB,EAAE,CAAC;IAC1B,CAAC;IAES,YAAY;QACpB,OAAO;IACT,CAAC;IAED,WAAW,CAAC,GAAqD;IAEjE,CAAC;IAgBD,IAAI;QACF,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;IACjD,CAAC;IACD,IAAI;QACF,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;IAClD,CAAC;IAED,gBAAgB;QACd,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAED,kBAAkB;QAChB,MAAM,MAAM,GAAG,mBAAmB,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QACxD,MAAM,OAAO,GAAG;YACd,EAAE,EAAE,MAAM,CAAC,CAAC;YACZ,EAAE,EAAE,MAAM,CAAC,CAAC,GAAG,MAAM,CAAC,KAAK;YAC3B,EAAE,EAAE,MAAM,CAAC,CAAC;YACZ,EAAE,EAAE,MAAM,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM;SAC7B,CAAC;QACF,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;IAC7B,CAAC;IAED,eAAe;QACb,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,kBAAkB,EAAE,CAAC;QAC9C,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,MAAM,CAAC,CAAS;QACd,OAAO;IACT,CAAC;IAED,OAAO;;QACL,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC;QAC5B,MAAA,MAAA,IAAI,CAAC,QAAQ,0CAAE,MAAM,0CAAE,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAClD,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;IAC3C,CAAC;CACF","file":"character.js","sourcesContent":["/* eslint-disable no-console */\nimport type { ICharacterSpec } from 'src/story/character/dsl-interface';\nimport { CharacterBase } from '../base/base';\nimport type { ISpecProcess, ICharacterVisactor } from './interface';\nimport type { ICharacterInitOption } from '../runtime-interface';\nimport type { IChartCharacterRuntime } from '../chart/runtime/interface';\nimport { getLayoutFromWidget } from '../../utils/layout';\n\nexport abstract class CharacterVisactor extends CharacterBase implements ICharacterVisactor {\n protected declare _specProcess: ISpecProcess;\n get specProcess() {\n return this._specProcess;\n }\n get dataTempTransform() {\n return this._specProcess.dataTempTransform;\n }\n\n get chartType() {\n return this._specProcess.dataTempTransform.specTemp?.getChartType();\n }\n\n get tempType() {\n return this._specProcess.dataTempTransform.specTemp?.type;\n }\n\n protected _runtime: IChartCharacterRuntime[] = [];\n\n constructor(spec: ICharacterSpec, option: ICharacterInitOption) {\n super(spec, option);\n this._initSpecProcess();\n }\n\n protected _initRuntime(): void {\n return;\n }\n\n clearConfig(opt: { clearCurrent: false | { [key: string]: any } }) {\n // do nothing\n }\n\n protected abstract _initSpecProcess(): void;\n\n onSpecReady = () => {\n console.log('onSpecReady !');\n this._runtime.forEach(r => r.onSpecReady?.());\n this._specProcess.dataTempTransform.specTemp?.standardizedSpec(this._specProcess.getVisSpec(), { character: this });\n this._updateVisactorSpec();\n this._afterRender();\n };\n\n protected abstract _afterRender(): void;\n\n protected abstract _updateVisactorSpec(): void;\n\n show(): void {\n this._graphic.setAttribute('visibleAll', true);\n }\n hide(): void {\n this._graphic.setAttribute('visibleAll', false);\n }\n\n getGraphicParent() {\n return this._graphic;\n }\n\n getViewBoxFromSpec() {\n const layout = getLayoutFromWidget(this._spec.position);\n const viewBox = {\n x1: layout.x,\n x2: layout.x + layout.width,\n y1: layout.y,\n y2: layout.y + layout.height\n };\n return { layout, viewBox };\n }\n\n getLayoutBounds() {\n const { viewBox } = this.getViewBoxFromSpec();\n return viewBox;\n }\n\n tickTo(t: number): void {\n return;\n }\n\n release() {\n this._specProcess.release();\n this._graphic?.parent?.removeChild(this._graphic);\n this._specProcess = this._graphic = null;\n }\n}\n"]}
|
|
@@ -84,6 +84,7 @@ export interface IVisactorTempConstructor {
|
|
|
84
84
|
export interface IVisactorGraphic extends IGroup {
|
|
85
85
|
readonly vProduct: IVChart;
|
|
86
86
|
updateSpec: (spec: any) => void;
|
|
87
|
+
release: () => void;
|
|
87
88
|
}
|
|
88
89
|
export interface ICharacterVisactor extends ICharacter {
|
|
89
90
|
clearConfig: (opt: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/story/character/visactor/interface.ts"],"names":[],"mappings":"","file":"interface.js","sourcesContent":["import type { IChartCharacterSpec } from '../dsl-interface';\nimport type { EventEmitter } from '@visactor/vutils';\nimport type { ICharacter } from '../runtime-interface';\nimport type { ISpec, IVChart } from '@visactor/vchart';\nimport type { IGroup } from '@visactor/vrender';\n\nexport type StandardData = IDataValue | IDataValue[];\nexport type IParserValue = any;\nexport type DataUpdateCall = (data: StandardData) => void;\nexport type DataErrorCall = (msg: { type: string; info: string }, opt?: any) => void;\n\n// visactor 元素的内部结构\n// 数据部分 start\n// DataParser:数据处理。负责解析数据,得到模版可用数据,处理数据上的特性内容。\n// VisactorTemp:模版处理。负责结合数据,生成对应类型的基础 spec。不同类型图表的特殊逻辑,在 temp 中处理\n// DataTempTransform:数据与模版更新管理,当数据/模版更新时,通过这个模块判定更新是否成功,成功后抛出更新成功消息。包含 VisactorTemp 与 DataParser\n// SpecProcess:编辑配置管理器,编辑属性更新的处理,对外输出合并了编辑信息的 spec 。包含一个 dataTempTransform\n// 数据部分 end\n\n// graphic 部分 start\n// IVisactorGraphic:包含一个 vchart|vtbale 。visactor 的自定义图元封装。处理图元是否重绘,viewBox的图元属性逻辑\n// IVisactorGraphic-render:实际的 draw 入口,处理绘图过程,主要是处理变换矩阵。\n// graphic 部分 end\n\n// Visactor-role:编辑元素,包含一个 specProcess、IVisactorGraphic\n\nexport interface IDataTempTransform {\n readonly specTemp: IVisactorTemp;\n\n readonly nextTemp: IVisactorTemp;\n emitter: EventEmitter;\n\n updateChartTemp: (temp?: string) => void;\n\n // 得到没有经过编辑器配置加工过的基础spec\n getBaseSpec: () => any;\n\n // 释放\n release: () => void;\n\n dataParser?: IDataParser;\n}\n\nexport interface IDataTempTransformConstructor {\n new ({ specProcess, character }: { character: ICharacterVisactor; specProcess: ISpecProcess }): IDataTempTransform;\n}\n\nexport interface ISpecProcess {\n dataTempTransform: IDataTempTransform;\n emitter: EventEmitter;\n\n // 得到visactor元素的spec\n getVisSpec: () => ISpec;\n // 得到角色的spec\n getCharacterSpec: () => IChartCharacterSpec;\n\n // temp\n getCharacterType: () => string;\n\n release: () => void;\n}\n\nexport type IDataType = any;\n\nexport interface IDataValue {\n id: string;\n sourceKey: string;\n values: IDataType[];\n}\n\nexport type DataInfo = {\n [key: string]: {\n type: 'ordinal' | 'linear';\n };\n};\n\nexport type DataSave = {\n type: string;\n value: any;\n};\n\nexport interface IDataParser {\n type: string;\n getData: () => StandardData;\n getDataValue: () => IParserValue;\n getDataInfo?: () => DataInfo;\n getSpecOption?: () => any;\n getSave: () => DataSave;\n updateValue: (value: IParserValue) => void;\n setDataUpdateHandler: (call: DataUpdateCall) => void;\n setDataErrorHandler: (call: DataErrorCall) => void;\n clear: () => void;\n}\n\nexport interface IDataParserConstructor {\n type: string;\n new (\n value: any,\n option: {\n updateCall: DataUpdateCall;\n errorCall: DataErrorCall;\n currentData?: IDataParser;\n emitter: EventEmitter;\n }\n ): IDataParser;\n}\n\n// chart & table 都是用这个模版接口\nexport interface IVisactorTemp {\n type: string;\n getSpec: (data: StandardData, ctx: any, opt?: any) => ISpec | null;\n standardizedSpec: (spec: any, ctx: any, opt?: any) => void;\n getChartType: () => string;\n checkDataEnable: (data: StandardData, opt?: any) => boolean;\n getTempInfo?: () => any;\n clear: () => void;\n}\n\nexport interface IVisactorTempConstructor {\n new (): IVisactorTemp;\n}\n\n// 绘图元素\nexport interface IVisactorGraphic extends IGroup {\n readonly vProduct: IVChart;\n\n updateSpec: (spec: any) => void;\n}\n\n// 编辑元素\nexport interface ICharacterVisactor extends ICharacter {\n // 清除编辑数据\n clearConfig: (opt: { clearCurrent: false | { [key: string]: any } }) => void;\n getGraphicParent: () => IVisactorGraphic;\n}\n\nexport interface IUpdateAttributeOption {\n triggerHistory?: boolean;\n saveData?: boolean;\n actionType?: 'data-add' | 'data-change' | 'data-replace' | string;\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/story/character/visactor/interface.ts"],"names":[],"mappings":"","file":"interface.js","sourcesContent":["import type { IChartCharacterSpec } from '../dsl-interface';\nimport type { EventEmitter, IBoundsLike } from '@visactor/vutils';\nimport type { ICharacter } from '../runtime-interface';\nimport type { ISpec, IVChart } from '@visactor/vchart';\nimport type { IGroup } from '@visactor/vrender';\n\nexport type StandardData = IDataValue | IDataValue[];\nexport type IParserValue = any;\nexport type DataUpdateCall = (data: StandardData) => void;\nexport type DataErrorCall = (msg: { type: string; info: string }, opt?: any) => void;\n\n// visactor 元素的内部结构\n// 数据部分 start\n// DataParser:数据处理。负责解析数据,得到模版可用数据,处理数据上的特性内容。\n// VisactorTemp:模版处理。负责结合数据,生成对应类型的基础 spec。不同类型图表的特殊逻辑,在 temp 中处理\n// DataTempTransform:数据与模版更新管理,当数据/模版更新时,通过这个模块判定更新是否成功,成功后抛出更新成功消息。包含 VisactorTemp 与 DataParser\n// SpecProcess:编辑配置管理器,编辑属性更新的处理,对外输出合并了编辑信息的 spec 。包含一个 dataTempTransform\n// 数据部分 end\n\n// graphic 部分 start\n// IVisactorGraphic:包含一个 vchart|vtbale 。visactor 的自定义图元封装。处理图元是否重绘,viewBox的图元属性逻辑\n// IVisactorGraphic-render:实际的 draw 入口,处理绘图过程,主要是处理变换矩阵。\n// graphic 部分 end\n\n// Visactor-role:编辑元素,包含一个 specProcess、IVisactorGraphic\n\nexport interface IDataTempTransform {\n readonly specTemp: IVisactorTemp;\n\n readonly nextTemp: IVisactorTemp;\n emitter: EventEmitter;\n\n updateChartTemp: (temp?: string) => void;\n\n // 得到没有经过编辑器配置加工过的基础spec\n getBaseSpec: () => any;\n\n // 释放\n release: () => void;\n\n dataParser?: IDataParser;\n}\n\nexport interface IDataTempTransformConstructor {\n new ({ specProcess, character }: { character: ICharacterVisactor; specProcess: ISpecProcess }): IDataTempTransform;\n}\n\nexport interface ISpecProcess {\n dataTempTransform: IDataTempTransform;\n emitter: EventEmitter;\n\n // 得到visactor元素的spec\n getVisSpec: () => ISpec;\n // 得到角色的spec\n getCharacterSpec: () => IChartCharacterSpec;\n\n // temp\n getCharacterType: () => string;\n\n release: () => void;\n}\n\nexport type IDataType = any;\n\nexport interface IDataValue {\n id: string;\n sourceKey: string;\n values: IDataType[];\n}\n\nexport type DataInfo = {\n [key: string]: {\n type: 'ordinal' | 'linear';\n };\n};\n\nexport type DataSave = {\n type: string;\n value: any;\n};\n\nexport interface IDataParser {\n type: string;\n getData: () => StandardData;\n getDataValue: () => IParserValue;\n getDataInfo?: () => DataInfo;\n getSpecOption?: () => any;\n getSave: () => DataSave;\n updateValue: (value: IParserValue) => void;\n setDataUpdateHandler: (call: DataUpdateCall) => void;\n setDataErrorHandler: (call: DataErrorCall) => void;\n clear: () => void;\n}\n\nexport interface IDataParserConstructor {\n type: string;\n new (\n value: any,\n option: {\n updateCall: DataUpdateCall;\n errorCall: DataErrorCall;\n currentData?: IDataParser;\n emitter: EventEmitter;\n }\n ): IDataParser;\n}\n\n// chart & table 都是用这个模版接口\nexport interface IVisactorTemp {\n type: string;\n getSpec: (data: StandardData, ctx: any, opt?: any) => ISpec | null;\n standardizedSpec: (spec: any, ctx: any, opt?: any) => void;\n getChartType: () => string;\n checkDataEnable: (data: StandardData, opt?: any) => boolean;\n getTempInfo?: () => any;\n clear: () => void;\n}\n\nexport interface IVisactorTempConstructor {\n new (): IVisactorTemp;\n}\n\n// 绘图元素\nexport interface IVisactorGraphic extends IGroup {\n readonly vProduct: IVChart;\n\n updateSpec: (spec: any) => void;\n release: () => void;\n}\n\n// 编辑元素\nexport interface ICharacterVisactor extends ICharacter {\n // 清除编辑数据\n clearConfig: (opt: { clearCurrent: false | { [key: string]: any } }) => void;\n getGraphicParent: () => IVisactorGraphic;\n}\n\nexport interface IUpdateAttributeOption {\n triggerHistory?: boolean;\n saveData?: boolean;\n actionType?: 'data-add' | 'data-change' | 'data-replace' | string;\n}\n"]}
|
|
@@ -20,6 +20,7 @@ export class CharacterTree {
|
|
|
20
20
|
this._characters[spec.id]) : null;
|
|
21
21
|
}
|
|
22
22
|
initCharacters(specs) {
|
|
23
|
+
this.releaseOldCharacters(), this._characters = {};
|
|
23
24
|
const option = {
|
|
24
25
|
story: this._story,
|
|
25
26
|
canvas: this._story.canvas,
|
|
@@ -29,5 +30,10 @@ export class CharacterTree {
|
|
|
29
30
|
spec.id && (this._characters[spec.id] || (this._characters[spec.id] = StoryFactory.createCharacter(spec, option)));
|
|
30
31
|
}));
|
|
31
32
|
}
|
|
33
|
+
releaseOldCharacters() {
|
|
34
|
+
Object.keys(this._characters).forEach((k => {
|
|
35
|
+
this._characters[k].release();
|
|
36
|
+
}));
|
|
37
|
+
}
|
|
32
38
|
}
|
|
33
39
|
//# sourceMappingURL=character-tree.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/story/character-tree/character-tree.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGlD,MAAM,OAAO,aAAa;IAIxB,YAAY,KAAa;QAHf,gBAAW,GAAkC,EAAE,CAAC;QAIxD,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACtB,CAAC;IAED,aAAa;QACX,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IAED,iBAAiB,CAAC,GAAW;QAC3B,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC;IACvC,CAAC;IAED,YAAY,CAAC,IAAoB;QAC/B,MAAM,MAAM,GAAG;YACb,KAAK,EAAE,IAAI,CAAC,MAAM;YAClB,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM;YAC1B,aAAa,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,YAAY;SAC1D,CAAC;QACF,IAAqB,IAAK,CAAC,EAAE,EAAE;YAC7B,IAAI,CAAC,IAAI,CAAC,WAAW,CAAkB,IAAK,CAAC,EAAE,CAAC,EAAE;gBAChD,IAAI,CAAC,WAAW,CAAkB,IAAK,CAAC,EAAE,CAAC,GAAG,YAAY,CAAC,eAAe,CAAiB,IAAI,EAAE,MAAM,CAAC,CAAC;aAC1G;YACD,OAAO,IAAI,CAAC,WAAW,CAAkB,IAAK,CAAC,EAAE,CAAC,CAAC;SACpD;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,cAAc,CAAC,KAAuB;QACpC,MAAM,MAAM,GAAG;YACb,KAAK,EAAE,IAAI,CAAC,MAAM;YAClB,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM;YAC1B,aAAa,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,YAAY;SAC1D,CAAC;QAEF,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;YACnB,IAAqB,IAAK,CAAC,EAAE,EAAE;gBAC7B,IAAI,CAAC,IAAI,CAAC,WAAW,CAAkB,IAAK,CAAC,EAAE,CAAC,EAAE;oBAChD,IAAI,CAAC,WAAW,CAAkB,IAAK,CAAC,EAAE,CAAC,GAAG,YAAY,CAAC,eAAe,CAAiB,IAAI,EAAE,MAAM,CAAC,CAAC;iBAC1G;aAEF;QACH,CAAC,CAAC,CAAC;IACL,CAAC;CACF","file":"character-tree.js","sourcesContent":["import type { ICharacter, ICharacterSpec } from '../character';\nimport { StoryFactory } from '../factory/factory';\nimport type { ICharacterTree, IStory } from '../interface';\n\nexport class CharacterTree implements ICharacterTree {\n protected _characters: { [key: string]: ICharacter } = {};\n protected _story: IStory;\n\n constructor(story: IStory) {\n this._story = story;\n }\n\n getCharacters(): { [key: string]: ICharacter } {\n return this._characters;\n }\n\n getCharactersById(key: string) {\n return this._characters[key] || null;\n }\n\n addCharacter(spec: ICharacterSpec) {\n const option = {\n story: this._story,\n canvas: this._story.canvas,\n graphicParent: this._story.canvas.getStage().defaultLayer\n };\n if ((<ICharacterSpec>spec).id) {\n if (!this._characters[(<ICharacterSpec>spec).id]) {\n this._characters[(<ICharacterSpec>spec).id] = StoryFactory.createCharacter(<ICharacterSpec>spec, option);\n }\n return this._characters[(<ICharacterSpec>spec).id];\n }\n return null;\n }\n\n initCharacters(specs: ICharacterSpec[]): void {\n const option = {\n story: this._story,\n canvas: this._story.canvas,\n graphicParent: this._story.canvas.getStage().defaultLayer\n };\n\n specs.forEach(spec => {\n if ((<ICharacterSpec>spec).id) {\n if (!this._characters[(<ICharacterSpec>spec).id]) {\n this._characters[(<ICharacterSpec>spec).id] = StoryFactory.createCharacter(<ICharacterSpec>spec, option);\n }\n // return this._characters[(<ICharacterSpec>spec).id];\n }\n });\n }\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/story/character-tree/character-tree.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGlD,MAAM,OAAO,aAAa;IAIxB,YAAY,KAAa;QAHf,gBAAW,GAAkC,EAAE,CAAC;QAIxD,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACtB,CAAC;IAED,aAAa;QACX,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IAED,iBAAiB,CAAC,GAAW;QAC3B,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC;IACvC,CAAC;IAED,YAAY,CAAC,IAAoB;QAC/B,MAAM,MAAM,GAAG;YACb,KAAK,EAAE,IAAI,CAAC,MAAM;YAClB,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM;YAC1B,aAAa,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,YAAY;SAC1D,CAAC;QACF,IAAqB,IAAK,CAAC,EAAE,EAAE;YAC7B,IAAI,CAAC,IAAI,CAAC,WAAW,CAAkB,IAAK,CAAC,EAAE,CAAC,EAAE;gBAChD,IAAI,CAAC,WAAW,CAAkB,IAAK,CAAC,EAAE,CAAC,GAAG,YAAY,CAAC,eAAe,CAAiB,IAAI,EAAE,MAAM,CAAC,CAAC;aAC1G;YACD,OAAO,IAAI,CAAC,WAAW,CAAkB,IAAK,CAAC,EAAE,CAAC,CAAC;SACpD;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,cAAc,CAAC,KAAuB;QACpC,IAAI,CAAC,oBAAoB,EAAE,CAAC;QAC5B,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;QACtB,MAAM,MAAM,GAAG;YACb,KAAK,EAAE,IAAI,CAAC,MAAM;YAClB,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM;YAC1B,aAAa,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,YAAY;SAC1D,CAAC;QAEF,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;YACnB,IAAqB,IAAK,CAAC,EAAE,EAAE;gBAC7B,IAAI,CAAC,IAAI,CAAC,WAAW,CAAkB,IAAK,CAAC,EAAE,CAAC,EAAE;oBAChD,IAAI,CAAC,WAAW,CAAkB,IAAK,CAAC,EAAE,CAAC,GAAG,YAAY,CAAC,eAAe,CAAiB,IAAI,EAAE,MAAM,CAAC,CAAC;iBAC1G;aAEF;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAED,oBAAoB;QAClB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;YACxC,MAAM,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;YAC9B,CAAC,CAAC,OAAO,EAAE,CAAC;QACd,CAAC,CAAC,CAAC;IACL,CAAC;CACF","file":"character-tree.js","sourcesContent":["import type { ICharacter, ICharacterSpec } from '../character';\nimport { StoryFactory } from '../factory/factory';\nimport type { ICharacterTree, IStory } from '../interface';\n\nexport class CharacterTree implements ICharacterTree {\n protected _characters: { [key: string]: ICharacter } = {};\n protected _story: IStory;\n\n constructor(story: IStory) {\n this._story = story;\n }\n\n getCharacters(): { [key: string]: ICharacter } {\n return this._characters;\n }\n\n getCharactersById(key: string) {\n return this._characters[key] || null;\n }\n\n addCharacter(spec: ICharacterSpec) {\n const option = {\n story: this._story,\n canvas: this._story.canvas,\n graphicParent: this._story.canvas.getStage().defaultLayer\n };\n if ((<ICharacterSpec>spec).id) {\n if (!this._characters[(<ICharacterSpec>spec).id]) {\n this._characters[(<ICharacterSpec>spec).id] = StoryFactory.createCharacter(<ICharacterSpec>spec, option);\n }\n return this._characters[(<ICharacterSpec>spec).id];\n }\n return null;\n }\n\n initCharacters(specs: ICharacterSpec[]): void {\n this.releaseOldCharacters();\n this._characters = {};\n const option = {\n story: this._story,\n canvas: this._story.canvas,\n graphicParent: this._story.canvas.getStage().defaultLayer\n };\n\n specs.forEach(spec => {\n if ((<ICharacterSpec>spec).id) {\n if (!this._characters[(<ICharacterSpec>spec).id]) {\n this._characters[(<ICharacterSpec>spec).id] = StoryFactory.createCharacter(<ICharacterSpec>spec, option);\n }\n // return this._characters[(<ICharacterSpec>spec).id];\n }\n });\n }\n\n releaseOldCharacters() {\n Object.keys(this._characters).forEach(k => {\n const c = this._characters[k];\n c.release();\n });\n }\n}\n"]}
|
package/es/story/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { CharacterComponentRect } from "./character/component/characters/charact
|
|
|
4
4
|
|
|
5
5
|
import { StoryFactory } from "./factory/factory";
|
|
6
6
|
|
|
7
|
-
import { ContainerModule, GraphicRender, container } from "@visactor/vrender";
|
|
7
|
+
import { AutoEnablePlugins, ContainerModule, GraphicRender, RichTextEditPlugin, container } from "@visactor/vrender";
|
|
8
8
|
|
|
9
9
|
import { CanvasPickerContribution } from "@visactor/vrender";
|
|
10
10
|
|
|
@@ -12,8 +12,6 @@ import { ChartRender, VChartRender } from "./character/chart/graphic/vchart-grap
|
|
|
12
12
|
|
|
13
13
|
import { CharacterComponentText } from "./character/component/characters/character-text";
|
|
14
14
|
|
|
15
|
-
import { CharacterComponentRichText } from "./character/component/characters/character-richtext";
|
|
16
|
-
|
|
17
15
|
import { VChartPicker } from "./character/chart/graphic/vchart-graphic-picker";
|
|
18
16
|
|
|
19
17
|
import { StoryComponentType } from "../constants/character";
|
|
@@ -30,26 +28,29 @@ import { ComponentGroupRender } from "./character/component/character-group/comp
|
|
|
30
28
|
|
|
31
29
|
import { CharacterComponentTimeline } from "./character/component/characters/character-timeline";
|
|
32
30
|
|
|
31
|
+
import { RankingBarCharacter } from "./character/chart/characters/rankingBar";
|
|
32
|
+
|
|
33
33
|
const splitModule = new ContainerModule((bind => {
|
|
34
34
|
bind(VChartRender).toSelf().inSingletonScope(), bind(ChartRender).toService(VChartRender),
|
|
35
35
|
bind(GraphicRender).toService(ChartRender), bind(VChartPicker).to(VChartPicker).inSingletonScope(),
|
|
36
36
|
bind(CanvasPickerContribution).toService(VChartPicker), bind(ComponentGroupRender).toSelf().inSingletonScope(),
|
|
37
37
|
bind(GraphicRender).toService(ComponentGroupRender);
|
|
38
|
+
})), editPlugin = new ContainerModule((bind => {
|
|
39
|
+
bind(RichTextEditPlugin).toSelf(), bind(AutoEnablePlugins).toService(RichTextEditPlugin);
|
|
38
40
|
}));
|
|
39
41
|
|
|
40
42
|
let _register = !1;
|
|
41
43
|
|
|
42
44
|
export function registerCharacter() {
|
|
43
45
|
_register || (_register = !0, StoryFactory.registerCharacter(VChartCharacter.type, VChartCharacter),
|
|
44
|
-
StoryFactory.registerCharacter(StoryComponentType.RECT, CharacterComponentRect),
|
|
46
|
+
StoryFactory.registerCharacter(RankingBarCharacter.type, RankingBarCharacter), StoryFactory.registerCharacter(StoryComponentType.RECT, CharacterComponentRect),
|
|
45
47
|
StoryFactory.registerCharacter(StoryComponentType.TEXT, CharacterComponentText),
|
|
46
|
-
StoryFactory.registerCharacter(StoryComponentType.RICH_TEXT, CharacterComponentRichText),
|
|
47
48
|
StoryFactory.registerCharacter(StoryComponentType.QIPAO, CharacterComponentQipao),
|
|
48
49
|
StoryFactory.registerCharacter(StoryComponentType.LINE, CharacterComponentLine),
|
|
49
50
|
StoryFactory.registerCharacter(StoryComponentType.IMAGE, CharacterComponentImage),
|
|
50
51
|
StoryFactory.registerCharacter(StoryComponentType.SHAPE, CharacterComponentShape),
|
|
51
52
|
StoryFactory.registerCharacter(StoryComponentType.TIMELINE, CharacterComponentTimeline),
|
|
52
|
-
container.load(splitModule));
|
|
53
|
+
container.load(splitModule), container.load(editPlugin));
|
|
53
54
|
}
|
|
54
55
|
|
|
55
56
|
registerCharacter();
|
package/es/story/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/story/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,kDAAkD,CAAC;AAC3F,OAAO,EAAE,sBAAsB,EAAE,MAAM,iDAAiD,CAAC;AACzF,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"sources":["../src/story/index.ts"],"names":[],"mappings":"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","file":"index.js","sourcesContent":["import { CharacterComponentQipao } from './character/component/characters/character-qipao';\nimport { CharacterComponentRect } from './character/component/characters/character-rect';\nimport { StoryFactory } from './factory/factory';\nimport { AutoEnablePlugins, ContainerModule, GraphicRender, RichTextEditPlugin, container } from '@visactor/vrender';\nimport { CanvasPickerContribution } from '@visactor/vrender';\nimport { ChartRender, VChartRender } from './character/chart/graphic/vchart-graphic-render';\nimport { CharacterComponentText } from './character/component/characters/character-text';\n// import { CharacterComponentRichText } from './character/component/characters/character-richtext';\nimport { VChartPicker } from './character/chart/graphic/vchart-graphic-picker';\nimport { StoryComponentType } from '../constants/character';\nimport { CharacterComponentLine } from './character/component/characters/character-line';\nimport { CharacterComponentImage } from './character/component/characters/character-image';\nimport { CharacterComponentShape } from './character/component/characters/character-shape';\nimport { VChartCharacter } from './character/chart/characters/vchart';\nimport { ComponentGroupRender } from './character/component/character-group/component-group-graphic-render';\nimport { CharacterComponentTimeline } from './character/component/characters/character-timeline';\nimport { RankingBarCharacter } from './character/chart/characters/rankingBar';\n\nconst splitModule = new ContainerModule(bind => {\n // chart渲染器注入\n bind(VChartRender).toSelf().inSingletonScope();\n bind(ChartRender).toService(VChartRender);\n bind(GraphicRender).toService(ChartRender);\n bind(VChartPicker).to(VChartPicker).inSingletonScope();\n bind(CanvasPickerContribution).toService(VChartPicker);\n\n // component渲染器注入\n bind(ComponentGroupRender).toSelf().inSingletonScope();\n bind(GraphicRender).toService(ComponentGroupRender);\n});\n\nconst editPlugin = new ContainerModule(bind => {\n bind(RichTextEditPlugin).toSelf();\n bind(AutoEnablePlugins).toService(RichTextEditPlugin);\n});\n\nlet _register = false;\nexport function registerCharacter() {\n if (_register) {\n return;\n }\n _register = true;\n StoryFactory.registerCharacter(VChartCharacter.type, VChartCharacter);\n StoryFactory.registerCharacter(RankingBarCharacter.type, RankingBarCharacter);\n\n // StoryFactory.registerCharacter('BarChart', CharacterChart);\n // StoryFactory.registerCharacter('CharacterChart', CharacterChart);\n // StoryFactory.registerCharacter('LineChart', CharacterChart);\n StoryFactory.registerCharacter(StoryComponentType.RECT, CharacterComponentRect);\n StoryFactory.registerCharacter(StoryComponentType.TEXT, CharacterComponentText);\n // StoryFactory.registerCharacter(StoryComponentType.RICH_TEXT, CharacterComponentRichText);\n StoryFactory.registerCharacter(StoryComponentType.QIPAO, CharacterComponentQipao);\n StoryFactory.registerCharacter(StoryComponentType.LINE, CharacterComponentLine);\n StoryFactory.registerCharacter(StoryComponentType.IMAGE, CharacterComponentImage);\n StoryFactory.registerCharacter(StoryComponentType.SHAPE, CharacterComponentShape);\n StoryFactory.registerCharacter(StoryComponentType.TIMELINE, CharacterComponentTimeline);\n\n container.load(splitModule);\n container.load(editPlugin);\n}\n\nregisterCharacter();\n\nexport * from './story';\n"]}
|
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IRankingBarPlayAction } from './../../player/processor/chart/rankingBar/rankingBar';
|
|
2
|
+
import type { IChartAddAction, IChartUpdateAction } from '../../player/processor/chart/vchart';
|
|
3
|
+
import type { IChartVisibilityAction, IComponentVisibilityAction } from '../../player/processor/interface/appear-action';
|
|
4
|
+
import type { IComponentBounceAction, IComponentMoveToAction, IComponentScaleToAction, IComponentStyleAction } from '../../player/processor/interface/style-action';
|
|
2
5
|
import type { ICharacterSpec } from '../character';
|
|
3
|
-
export
|
|
4
|
-
startTime?: number;
|
|
5
|
-
action: string;
|
|
6
|
-
duration?: number;
|
|
7
|
-
payload?: Action['payload'];
|
|
8
|
-
}
|
|
6
|
+
export type IActionSpec = IComponentStyleAction | IComponentVisibilityAction | IComponentMoveToAction | IComponentScaleToAction | IComponentBounceAction | IChartVisibilityAction | IChartUpdateAction | IChartAddAction | IRankingBarPlayAction;
|
|
9
7
|
export interface IStorySpec {
|
|
10
8
|
acts: IActSpec[];
|
|
11
9
|
characters: ICharacterSpec[];
|
|
12
10
|
}
|
|
13
11
|
export interface IActionsLink {
|
|
14
|
-
characterId: string;
|
|
15
|
-
characterActions:
|
|
12
|
+
characterId: string | string[];
|
|
13
|
+
characterActions: IActionSpec[];
|
|
16
14
|
}
|
|
17
15
|
export type ISceneSpec = {
|
|
18
16
|
id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/story/interface/dsl-interface.ts"],"names":[],"mappings":"","file":"dsl-interface.js","sourcesContent":["import type {
|
|
1
|
+
{"version":3,"sources":["../src/story/interface/dsl-interface.ts"],"names":[],"mappings":"","file":"dsl-interface.js","sourcesContent":["import type { IRankingBarPlayAction } from './../../player/processor/chart/rankingBar/rankingBar';\nimport type { IChartAddAction, IChartUpdateAction } from '../../player/processor/chart/vchart';\nimport type {\n IChartVisibilityAction,\n IComponentVisibilityAction\n} from '../../player/processor/interface/appear-action';\nimport type {\n IComponentBounceAction,\n IComponentMoveToAction,\n IComponentScaleToAction,\n IComponentStyleAction\n} from '../../player/processor/interface/style-action';\nimport type { ICharacterSpec } from '../character';\n\nexport type IActionSpec =\n | IComponentStyleAction\n | IComponentVisibilityAction\n | IComponentMoveToAction\n | IComponentScaleToAction\n | IComponentBounceAction\n | IChartVisibilityAction\n | IChartUpdateAction\n | IChartAddAction\n | IRankingBarPlayAction;\n\nexport interface IStorySpec {\n acts: IActSpec[]; // 作品的章节\n characters: ICharacterSpec[]; // 作品中的元素\n}\n\nexport interface IActionsLink {\n characterId: string | string[];\n characterActions: IActionSpec[];\n}\n\nexport type ISceneSpec = {\n id: string;\n delay?: number; // 入场延迟,可以是正数或者负数\n actions: IActionsLink[];\n};\n\nexport interface IActSpec {\n id: string;\n scenes: ISceneSpec[];\n}\n"]}
|
|
@@ -1,13 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import type { IActSpec } from './dsl-interface';
|
|
3
|
-
export interface IPlayer {
|
|
4
|
-
tickTo: (t: number) => void;
|
|
5
|
-
play: () => void;
|
|
6
|
-
encodeToVideo: (millsecond: number, fps: number) => Promise<string>;
|
|
7
|
-
pause: () => void;
|
|
8
|
-
release: () => void;
|
|
9
|
-
addAct: (c: IActSpec, characters: {
|
|
10
|
-
[key: string]: ICharacter;
|
|
11
|
-
}) => void;
|
|
12
|
-
getCurrentAct: () => number | string;
|
|
13
|
-
}
|
|
1
|
+
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/story/interface/player.ts"],"names":[],"mappings":"","file":"player.js","sourcesContent":["import type { ICharacter } from '../character';\
|
|
1
|
+
{"version":3,"sources":["../src/story/interface/player.ts"],"names":[],"mappings":"","file":"player.js","sourcesContent":["// import type { ICharacter } from '../character';\n// import type { IActSpec } from './dsl-interface';\n\n// export interface IPlayer {\n// tickTo: (t: number) => void;\n// play: () => void;\n// encodeToVideo: (millsecond: number, fps: number) => Promise<string>;\n// pause: () => void;\n// release: () => void;\n// addAct: (\n// c: IActSpec,\n// characters: {\n// [key: string]: ICharacter;\n// }\n// ) => void;\n// getCurrentAct: () => number | string;\n// }\n"]}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import type { IGraphic, IStage } from '@visactor/vrender';
|
|
2
2
|
import type { ICharacter, ICharacterSpec } from '../character';
|
|
3
|
+
import type { IPlayer } from '../../player/interface/player';
|
|
3
4
|
export interface IStoryInitOption {
|
|
4
|
-
|
|
5
|
-
width: number;
|
|
6
|
-
height: number;
|
|
5
|
+
dom: string | HTMLDivElement;
|
|
7
6
|
playerOption?: {
|
|
8
7
|
scaleX?: number;
|
|
9
8
|
scaleY?: number;
|
|
@@ -20,6 +19,7 @@ export interface IStoryCanvas {
|
|
|
20
19
|
}
|
|
21
20
|
export interface IStory {
|
|
22
21
|
readonly id: string;
|
|
22
|
+
readonly player: IPlayer;
|
|
23
23
|
canvas: IStoryCanvas;
|
|
24
24
|
getCharacters: () => {
|
|
25
25
|
[key: string]: ICharacter;
|
|
@@ -37,4 +37,6 @@ export interface ICharacterTree {
|
|
|
37
37
|
export type StoryEvent = Event & {
|
|
38
38
|
detailPath: IGraphic[];
|
|
39
39
|
path: IGraphic[];
|
|
40
|
+
canvasX?: number;
|
|
41
|
+
canvasY?: number;
|
|
40
42
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/story/interface/runtime-interface.ts"],"names":[],"mappings":"","file":"runtime-interface.js","sourcesContent":["import type { IGraphic, IStage } from '@visactor/vrender';\nimport type { ICharacter, ICharacterSpec } from '../character';\n\nexport interface IStoryInitOption {\n
|
|
1
|
+
{"version":3,"sources":["../src/story/interface/runtime-interface.ts"],"names":[],"mappings":"","file":"runtime-interface.js","sourcesContent":["import type { IGraphic, IStage } from '@visactor/vrender';\nimport type { ICharacter, ICharacterSpec } from '../character';\nimport type { IPlayer } from '../../player/interface/player';\n\nexport interface IStoryInitOption {\n dom: string | HTMLDivElement; // dom id\n playerOption?: {\n scaleX?: number;\n scaleY?: number;\n };\n}\n\nexport interface IStoryCanvas {\n getStage: () => IStage;\n getCanvas: () => HTMLCanvasElement;\n getEventDetail: (event: StoryEvent) => {\n character: ICharacter;\n characterInfo: undefined;\n };\n release: () => void;\n}\n\nexport interface IStory {\n readonly id: string;\n readonly player: IPlayer;\n canvas: IStoryCanvas;\n getCharacters: () => { [key: string]: ICharacter };\n getCharactersById: (key: string) => ICharacter | null;\n}\nexport interface ICharacterTree {\n getCharacters: () => { [key: string]: ICharacter };\n getCharactersById: (key: string) => ICharacter | null;\n addCharacter: (spec: ICharacterSpec) => ICharacter;\n initCharacters: (spec: ICharacterSpec[]) => void;\n}\n\nexport type StoryEvent = Event & {\n detailPath: IGraphic[];\n path: IGraphic[];\n canvasX?: number;\n canvasY?: number;\n};\n"]}
|
package/es/story/story.d.ts
CHANGED
|
@@ -8,7 +8,9 @@ export declare class Story implements IStory {
|
|
|
8
8
|
readonly id: string;
|
|
9
9
|
protected _canvas: IStoryCanvas;
|
|
10
10
|
protected _characterTree: ICharacterTree;
|
|
11
|
+
protected _spec: IStorySpec;
|
|
11
12
|
get canvas(): IStoryCanvas;
|
|
13
|
+
get player(): IPlayer;
|
|
12
14
|
constructor(spec: IStorySpec, option: IStoryInitOption);
|
|
13
15
|
load(spec: IStorySpec): void;
|
|
14
16
|
getCharacters(): {
|
|
@@ -16,7 +18,6 @@ export declare class Story implements IStory {
|
|
|
16
18
|
};
|
|
17
19
|
getCharactersById(key: string): ICharacter;
|
|
18
20
|
play(loop?: boolean): void;
|
|
19
|
-
tickTo(t: number): void;
|
|
20
21
|
pause(): void;
|
|
21
22
|
encodeToVideo(actIndexOrId: number, millsecond: number, fps: number): Promise<string>;
|
|
22
23
|
getPlayer(): IPlayer;
|