@visactor/vrender-core 1.1.0-alpha.11 → 1.1.0-alpha.12

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.
Files changed (37) hide show
  1. package/cjs/common/canvas-utils.js +1 -0
  2. package/cjs/common/event-transformer.js +1 -2
  3. package/cjs/common/explicit-binding.js +1 -1
  4. package/cjs/common/generator.js +1 -1
  5. package/cjs/common/matrix.js +1 -1
  6. package/cjs/common/morphing-utils.js +1 -1
  7. package/cjs/common/path-svg.js +1 -1
  8. package/cjs/common/performance-raf.js +1 -1
  9. package/cjs/common/polygon.js +2 -2
  10. package/cjs/entries/app-context.js +1 -1
  11. package/cjs/entries/browser.js +1 -1
  12. package/cjs/entries/index.js +1 -1
  13. package/cjs/entries/miniapp.js +1 -1
  14. package/cjs/entries/node.js +1 -1
  15. package/cjs/entries/runtime-installer.js +1 -1
  16. package/cjs/entries/types.js +1 -1
  17. package/cjs/interface/animation/animate.d.ts +1 -0
  18. package/cjs/interface/animation/animate.js.map +1 -1
  19. package/es/common/canvas-utils.js +2 -1
  20. package/es/common/event-transformer.js +1 -2
  21. package/es/common/explicit-binding.js +1 -1
  22. package/es/common/generator.js +1 -1
  23. package/es/common/matrix.js +1 -1
  24. package/es/common/morphing-utils.js +1 -1
  25. package/es/common/path-svg.js +1 -1
  26. package/es/common/performance-raf.js +1 -1
  27. package/es/common/polygon.js +1 -1
  28. package/es/entries/app-context.js +1 -1
  29. package/es/entries/browser.js +1 -1
  30. package/es/entries/index.js +1 -1
  31. package/es/entries/miniapp.js +1 -1
  32. package/es/entries/node.js +1 -1
  33. package/es/entries/runtime-installer.js +1 -1
  34. package/es/entries/types.js +1 -1
  35. package/es/interface/animation/animate.d.ts +1 -0
  36. package/es/interface/animation/animate.js.map +1 -1
  37. package/package.json +1 -1
@@ -57,4 +57,5 @@ function createConicGradient(context, color, x, y, w, h) {
57
57
  })), canvasGradient.GetPattern ? canvasGradient.GetPattern(w + x, h + y, undefined) : canvasGradient;
58
58
  }
59
59
 
60
+ //# sourceMappingURL=canvas-utils.js.map
60
61
  exports.getScaledStroke = getScaledStroke, exports.createColor = createColor;
@@ -123,5 +123,4 @@ function mapToCanvasPointForCanvas(nativeEvent) {
123
123
 
124
124
  exports.createEventTransformer = createEventTransformer, exports.createCanvasEventTransformer = createCanvasEventTransformer,
125
125
  exports.registerWindowEventTransformer = registerWindowEventTransformer, exports.registerGlobalEventTransformer = registerGlobalEventTransformer,
126
- exports.transformPointForCanvas = transformPointForCanvas, exports.mapToCanvasPointForCanvas = mapToCanvasPointForCanvas;
127
- //# sourceMappingURL=event-transformer.js.map
126
+ exports.transformPointForCanvas = transformPointForCanvas, exports.mapToCanvasPointForCanvas = mapToCanvasPointForCanvas;
@@ -13,4 +13,4 @@ function resolveContainerBinding(container, serviceIdentifier) {
13
13
  Object.defineProperty(exports, "__esModule", {
14
14
  value: !0
15
15
  }), exports.resolveContainerBinding = void 0, exports.resolveContainerBinding = resolveContainerBinding;
16
- //# sourceMappingURL=explicit-binding.js.map
16
+ //# sourceMappingURL=explicit-binding.js.map
@@ -11,4 +11,4 @@ class Generator {
11
11
  }
12
12
 
13
13
  exports.Generator = Generator, Generator.auto_increment_id = 0;
14
- //# sourceMappingURL=generator.js.map
14
+ //# sourceMappingURL=generator.js.map
@@ -129,4 +129,4 @@ exports.identityMat4 = identityMat4, exports.rotateX = rotateX, exports.rotateY
129
129
  exports.rotateZ = rotateZ, exports.translate = translate, exports.mat3Tomat4 = mat3Tomat4,
130
130
  exports.multiplyMat4Mat3 = multiplyMat4Mat3, exports.scaleMat4 = scaleMat4, exports.multiplyMat4Mat4 = multiplyMat4Mat4,
131
131
  exports.lookAt = lookAt, exports.ortho = ortho, exports.transformMat4 = transformMat4;
132
- //# sourceMappingURL=matrix.js.map
132
+ //# sourceMappingURL=matrix.js.map
@@ -200,4 +200,4 @@ exports.cubicSubdivide = cubicSubdivide, exports.alignSubpath = alignSubpath, ex
200
200
  exports.findBestMorphingRotation = findBestMorphingRotation, exports.alignBezierCurves = alignBezierCurves,
201
201
  exports.pathToBezierCurves = pathToBezierCurves, exports.applyTransformOnBezierCurves = applyTransformOnBezierCurves,
202
202
  exports.bezierCurversToPath = bezierCurversToPath;
203
- //# sourceMappingURL=morphing-utils.js.map
203
+ //# sourceMappingURL=morphing-utils.js.map
@@ -61,4 +61,4 @@ exports.enumCommandMap = {
61
61
  Q: 7,
62
62
  R: 8
63
63
  }, exports.parseSvgPath = parseSvgPath;
64
- //# sourceMappingURL=path-svg.js.map
64
+ //# sourceMappingURL=path-svg.js.map
@@ -34,4 +34,4 @@ class PerformanceRAF {
34
34
  }
35
35
 
36
36
  exports.PerformanceRAF = PerformanceRAF;
37
- //# sourceMappingURL=performance-raf.js.map
37
+ //# sourceMappingURL=performance-raf.js.map
@@ -41,8 +41,8 @@ function getProportionPoint(point, segment, length, dx, dy) {
41
41
  };
42
42
  }
43
43
 
44
+ //# sourceMappingURL=polygon.js.map
44
45
  Object.defineProperty(exports, "__esModule", {
45
46
  value: !0
46
47
  }), exports.drawRoundedPolygon = exports.drawPolygon = void 0, exports.drawPolygon = drawPolygon,
47
- exports.drawRoundedPolygon = drawRoundedPolygon;
48
- //# sourceMappingURL=polygon.js.map
48
+ exports.drawRoundedPolygon = drawRoundedPolygon;
@@ -81,4 +81,4 @@ class AppContext {
81
81
  }
82
82
 
83
83
  exports.AppContext = AppContext;
84
- //# sourceMappingURL=app-context.js.map
84
+ //# sourceMappingURL=app-context.js.map
@@ -41,4 +41,4 @@ function createBrowserApp(options = {}) {
41
41
  }
42
42
 
43
43
  exports.BrowserEntry = BrowserEntry, exports.createBrowserApp = createBrowserApp;
44
- //# sourceMappingURL=browser.js.map
44
+ //# sourceMappingURL=browser.js.map
@@ -29,4 +29,4 @@ Object.defineProperty(exports, "createApp", {
29
29
  return browser_1.createBrowserApp;
30
30
  }
31
31
  });
32
- //# sourceMappingURL=index.js.map
32
+ //# sourceMappingURL=index.js.map
@@ -17,4 +17,4 @@ function createMiniappApp(options = {}) {
17
17
  }
18
18
 
19
19
  exports.MiniappEntry = MiniappEntry, exports.createMiniappApp = createMiniappApp;
20
- //# sourceMappingURL=miniapp.js.map
20
+ //# sourceMappingURL=miniapp.js.map
@@ -17,4 +17,4 @@ function createNodeApp(options = {}) {
17
17
  }
18
18
 
19
19
  exports.NodeEntry = NodeEntry, exports.createNodeApp = createNodeApp;
20
- //# sourceMappingURL=node.js.map
20
+ //# sourceMappingURL=node.js.map
@@ -108,4 +108,4 @@ exports.getRuntimeInstallerGlobal = getRuntimeInstallerGlobal, exports.configure
108
108
  exports.installRuntimeGraphicRenderersToApp = installRuntimeGraphicRenderersToApp,
109
109
  exports.installRuntimeDrawContributionsToApp = installRuntimeDrawContributionsToApp,
110
110
  exports.installRuntimePickersToApp = installRuntimePickersToApp;
111
- //# sourceMappingURL=runtime-installer.js.map
111
+ //# sourceMappingURL=runtime-installer.js.map
@@ -3,4 +3,4 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: !0
5
5
  });
6
- //# sourceMappingURL=types.js.map
6
+ //# sourceMappingURL=types.js.map
@@ -35,6 +35,7 @@ export interface IStep {
35
35
  getFromProps: () => Record<string, any> | void;
36
36
  getMergedEndProps: () => Record<string, any> | void;
37
37
  deleteSelfAttr: (key: string) => void;
38
+ deleteSelfAttrs: (keys: string[]) => void;
38
39
  stop: () => void;
39
40
  release: () => void;
40
41
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/interface/animation/animate.ts"],"names":[],"mappings":";;;AAyKA,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,iDAAe,CAAA;IACf,6EAA6B,CAAA;AAC/B,CAAC,EAHW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAGtB","file":"animate.js","sourcesContent":["import type { IGraphic } from '../graphic';\nimport type { EasingType, EasingTypeFunc } from './easing';\nimport type { AnimateStatus, IAnimateStepType } from './type';\nimport type { ITimeline } from './timeline';\n\nexport interface ICustomAnimate extends IStep {\n type: IAnimateStepType;\n}\n\nexport interface IStep {\n type: IAnimateStepType;\n prev?: IStep;\n // 持续时间\n duration: number;\n // 链表,下一个\n next?: IStep;\n // 属性\n props?: Record<string, any>;\n // 解析后的属性(用于性能优化,避免每次tick都解析)\n fromParsedProps?: Record<string, any>;\n toParsedProps?: Record<string, any>;\n fromProps?: Record<string, any>;\n // 解析后的属性列表(用于性能优化,避免每次tick都解析)\n propKeys?: string[];\n // 缓动函数\n easing?: EasingTypeFunc;\n\n // 添加一个\n append: (step: IStep) => void;\n // 获取上一个props,用于完成这次的fromValue 和 toValue的插值\n getLastProps: () => any;\n\n animate: IAnimate;\n\n // 设置持续时间\n setDuration: (duration: number, updateDownstream?: boolean) => void;\n // 获取持续时间\n getDuration: () => number;\n // 确定插值更新函数(在开始的时候就确定,避免每次tick都解析)\n determineInterpolateUpdateFunction: () => void;\n\n // 设置开始时间\n setStartTime: (time: number, updateDownstream?: boolean) => void;\n // 获取开始时间\n getStartTime: () => number;\n\n bind: (target: IGraphic, animate: IAnimate) => void;\n // 在第一次绑定到Animate的时候触发\n onBind: () => void;\n // 第一次执行的时候调用\n onFirstRun: () => void;\n // 开始执行的时候调用(如果有循环,那每个周期都会调用)\n onStart: () => void;\n // 结束执行的时候调用(如果有循环,那每个周期都会调用)\n onEnd: (cb?: (animate: IAnimate, step: IStep) => void) => void;\n // 更新执行的时候调用(如果有循环,那每个周期都会调用)\n update: (end: boolean, ratio: number, out: Record<string, any>) => void;\n onUpdate: (end: boolean, ratio: number, out: Record<string, any>) => void;\n\n getEndProps: () => Record<string, any> | void;\n getFromProps: () => Record<string, any> | void;\n getMergedEndProps: () => Record<string, any> | void;\n\n // 屏蔽自身属性,会直接从props等内容里删除掉\n deleteSelfAttr: (key: string) => void;\n\n // 停止\n stop: () => void;\n\n // 释放\n release: () => void;\n}\n\nexport interface IAnimate {\n readonly id: string | number;\n status: AnimateStatus;\n target: IGraphic;\n priority: number;\n interpolateUpdateFunction:\n | ((from: Record<string, any>, to: Record<string, any>, ratio: number, step: IStep, target: IGraphic) => void)\n | null;\n\n _onStart?: (() => void)[];\n _onFrame?: ((step: IStep, ratio: number) => void)[];\n _onEnd?: (() => void)[];\n _onRemove?: (() => void)[];\n\n getStartProps: () => Record<string, any>;\n getEndProps: () => Record<string, any>;\n\n // 设置timeline\n setTimeline: (timeline: ITimeline) => void;\n // 获取timeline\n getTimeline: () => ITimeline;\n readonly timeline: ITimeline;\n\n bind: (target: IGraphic) => this;\n to: (props: Record<string, any>, duration: number, easing: EasingType) => this;\n from: (props: Record<string, any>, duration: number, easing: EasingType) => this;\n pause: () => void;\n resume: () => void;\n onStart: (cb?: () => void) => void;\n onEnd: (cb?: () => void) => void;\n onFrame: (cb: (step: IStep, ratio: number) => void) => void;\n onRemove: (cb?: () => void) => void;\n // 屏蔽属性\n preventAttr: (key: string) => void;\n // 屏蔽属性\n preventAttrs: (key: string[]) => void;\n // 属性是否合法\n validAttr: (key: string) => boolean;\n\n runCb: (cb: (a: IAnimate, step: IStep) => void) => IAnimate;\n\n // 自定义插值,返回false表示没有匹配上\n customInterpolate: (\n key: string,\n ratio: number,\n from: any,\n to: any,\n target: IGraphic,\n ret: Record<string, any>\n ) => boolean;\n play: (customAnimate: ICustomAnimate) => this;\n\n getFromValue: () => Record<string, any>;\n getToValue: () => Record<string, any>;\n // 停止,可以设置停止后设置target的属性为开始的值(fromValue),还是结束的值(toValue)\n stop: (type?: 'start' | 'end' | Record<string, any>) => void;\n /** 打上END标志,下一帧被删除 */\n release: () => void;\n // 获取持续的时长\n getDuration: () => number;\n getTotalDuration: () => number;\n // 获取动画开始时间(注意并不是子动画的startAt)\n getStartTime: () => number;\n // 等待delay\n wait: (delay: number) => this;\n\n /* 动画编排 */\n // 所有动画结束后执行\n afterAll: (list: IAnimate[]) => this;\n // 在某个动画结束后执行\n after: (animate: IAnimate) => this;\n // 并行执行\n parallel: (animate: IAnimate) => this;\n\n getLoop: () => number;\n\n // 反转动画\n // reversed: (r: boolean) => IAnimate;\n // 循环动画\n loop: (n: number | boolean) => IAnimate;\n // 反弹动画\n bounce: (b: boolean) => IAnimate;\n\n advance: (delta: number) => void;\n\n // 设置开始时间(startAt之前是完全不会进入动画生命周期的)\n // 它和wait不一样,如果调用的是wait,wait过程中还算是一个动画阶段,只是空的阶段,而startAt之前是完全不会进入动画生命周期的\n startAt: (t: number) => IAnimate;\n\n // 重新同步和计算props,用于内部某些step发生了变更后,重新计算自身\n reSyncProps: () => void;\n\n // 更新duration\n updateDuration: () => void;\n}\n\nexport enum AnimateMode {\n NORMAL = 0b0000,\n SET_ATTR_IMMEDIATELY = 0b0001\n}\n\nexport interface IAnimateTarget {\n onAnimateBind?: (animte: IAnimate) => void;\n // 获取属性\n getComputedAttribute: (name: string) => any;\n // 获取默认属性\n getDefaultAttribute: (name: string) => any;\n onStop: (props?: Record<string, any>) => void;\n animates: Map<string | number, IAnimate>;\n [key: string]: any;\n}\n\nexport interface BaseAnimateConfig {\n id?: number | string;\n interpolate?: (key: string, ratio: number, from: any, to: any, nextAttributes: any) => boolean;\n onStart?: () => void;\n onFrame?: (step: IStep, ratio: number) => void;\n onEnd?: () => void;\n onRemove?: () => void;\n}\n\nexport interface MorphingAnimateConfig extends Omit<BaseAnimateConfig, 'interpolate'> {\n duration?: number;\n easing?: EasingType; // 统一到easing\n delay?: number;\n}\n\nexport interface MultiMorphingAnimateConfig extends MorphingAnimateConfig {\n splitPath?: 'clone' | ((graphic: IGraphic, count: number, needAppend?: boolean) => IGraphic[]);\n individualDelay?: (index: number, count: number, fromGraphic: IGraphic, toGraphic: IGraphic) => number;\n}\n"]}
1
+ {"version":3,"sources":["../src/interface/animation/animate.ts"],"names":[],"mappings":";;;AA2KA,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,iDAAe,CAAA;IACf,6EAA6B,CAAA;AAC/B,CAAC,EAHW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAGtB","file":"animate.js","sourcesContent":["import type { IGraphic } from '../graphic';\nimport type { EasingType, EasingTypeFunc } from './easing';\nimport type { AnimateStatus, IAnimateStepType } from './type';\nimport type { ITimeline } from './timeline';\n\nexport interface ICustomAnimate extends IStep {\n type: IAnimateStepType;\n}\n\nexport interface IStep {\n type: IAnimateStepType;\n prev?: IStep;\n // 持续时间\n duration: number;\n // 链表,下一个\n next?: IStep;\n // 属性\n props?: Record<string, any>;\n // 解析后的属性(用于性能优化,避免每次tick都解析)\n fromParsedProps?: Record<string, any>;\n toParsedProps?: Record<string, any>;\n fromProps?: Record<string, any>;\n // 解析后的属性列表(用于性能优化,避免每次tick都解析)\n propKeys?: string[];\n // 缓动函数\n easing?: EasingTypeFunc;\n\n // 添加一个\n append: (step: IStep) => void;\n // 获取上一个props,用于完成这次的fromValue 和 toValue的插值\n getLastProps: () => any;\n\n animate: IAnimate;\n\n // 设置持续时间\n setDuration: (duration: number, updateDownstream?: boolean) => void;\n // 获取持续时间\n getDuration: () => number;\n // 确定插值更新函数(在开始的时候就确定,避免每次tick都解析)\n determineInterpolateUpdateFunction: () => void;\n\n // 设置开始时间\n setStartTime: (time: number, updateDownstream?: boolean) => void;\n // 获取开始时间\n getStartTime: () => number;\n\n bind: (target: IGraphic, animate: IAnimate) => void;\n // 在第一次绑定到Animate的时候触发\n onBind: () => void;\n // 第一次执行的时候调用\n onFirstRun: () => void;\n // 开始执行的时候调用(如果有循环,那每个周期都会调用)\n onStart: () => void;\n // 结束执行的时候调用(如果有循环,那每个周期都会调用)\n onEnd: (cb?: (animate: IAnimate, step: IStep) => void) => void;\n // 更新执行的时候调用(如果有循环,那每个周期都会调用)\n update: (end: boolean, ratio: number, out: Record<string, any>) => void;\n onUpdate: (end: boolean, ratio: number, out: Record<string, any>) => void;\n\n getEndProps: () => Record<string, any> | void;\n getFromProps: () => Record<string, any> | void;\n getMergedEndProps: () => Record<string, any> | void;\n\n // 屏蔽自身属性,会直接从props等内容里删除掉\n deleteSelfAttr: (key: string) => void;\n // 批量屏蔽自身属性,避免大量图元切换时反复 splice/delete\n deleteSelfAttrs: (keys: string[]) => void;\n\n // 停止\n stop: () => void;\n\n // 释放\n release: () => void;\n}\n\nexport interface IAnimate {\n readonly id: string | number;\n status: AnimateStatus;\n target: IGraphic;\n priority: number;\n interpolateUpdateFunction:\n | ((from: Record<string, any>, to: Record<string, any>, ratio: number, step: IStep, target: IGraphic) => void)\n | null;\n\n _onStart?: (() => void)[];\n _onFrame?: ((step: IStep, ratio: number) => void)[];\n _onEnd?: (() => void)[];\n _onRemove?: (() => void)[];\n\n getStartProps: () => Record<string, any>;\n getEndProps: () => Record<string, any>;\n\n // 设置timeline\n setTimeline: (timeline: ITimeline) => void;\n // 获取timeline\n getTimeline: () => ITimeline;\n readonly timeline: ITimeline;\n\n bind: (target: IGraphic) => this;\n to: (props: Record<string, any>, duration: number, easing: EasingType) => this;\n from: (props: Record<string, any>, duration: number, easing: EasingType) => this;\n pause: () => void;\n resume: () => void;\n onStart: (cb?: () => void) => void;\n onEnd: (cb?: () => void) => void;\n onFrame: (cb: (step: IStep, ratio: number) => void) => void;\n onRemove: (cb?: () => void) => void;\n // 屏蔽属性\n preventAttr: (key: string) => void;\n // 屏蔽属性\n preventAttrs: (key: string[]) => void;\n // 属性是否合法\n validAttr: (key: string) => boolean;\n\n runCb: (cb: (a: IAnimate, step: IStep) => void) => IAnimate;\n\n // 自定义插值,返回false表示没有匹配上\n customInterpolate: (\n key: string,\n ratio: number,\n from: any,\n to: any,\n target: IGraphic,\n ret: Record<string, any>\n ) => boolean;\n play: (customAnimate: ICustomAnimate) => this;\n\n getFromValue: () => Record<string, any>;\n getToValue: () => Record<string, any>;\n // 停止,可以设置停止后设置target的属性为开始的值(fromValue),还是结束的值(toValue)\n stop: (type?: 'start' | 'end' | Record<string, any>) => void;\n /** 打上END标志,下一帧被删除 */\n release: () => void;\n // 获取持续的时长\n getDuration: () => number;\n getTotalDuration: () => number;\n // 获取动画开始时间(注意并不是子动画的startAt)\n getStartTime: () => number;\n // 等待delay\n wait: (delay: number) => this;\n\n /* 动画编排 */\n // 所有动画结束后执行\n afterAll: (list: IAnimate[]) => this;\n // 在某个动画结束后执行\n after: (animate: IAnimate) => this;\n // 并行执行\n parallel: (animate: IAnimate) => this;\n\n getLoop: () => number;\n\n // 反转动画\n // reversed: (r: boolean) => IAnimate;\n // 循环动画\n loop: (n: number | boolean) => IAnimate;\n // 反弹动画\n bounce: (b: boolean) => IAnimate;\n\n advance: (delta: number) => void;\n\n // 设置开始时间(startAt之前是完全不会进入动画生命周期的)\n // 它和wait不一样,如果调用的是wait,wait过程中还算是一个动画阶段,只是空的阶段,而startAt之前是完全不会进入动画生命周期的\n startAt: (t: number) => IAnimate;\n\n // 重新同步和计算props,用于内部某些step发生了变更后,重新计算自身\n reSyncProps: () => void;\n\n // 更新duration\n updateDuration: () => void;\n}\n\nexport enum AnimateMode {\n NORMAL = 0b0000,\n SET_ATTR_IMMEDIATELY = 0b0001\n}\n\nexport interface IAnimateTarget {\n onAnimateBind?: (animte: IAnimate) => void;\n // 获取属性\n getComputedAttribute: (name: string) => any;\n // 获取默认属性\n getDefaultAttribute: (name: string) => any;\n onStop: (props?: Record<string, any>) => void;\n animates: Map<string | number, IAnimate>;\n [key: string]: any;\n}\n\nexport interface BaseAnimateConfig {\n id?: number | string;\n interpolate?: (key: string, ratio: number, from: any, to: any, nextAttributes: any) => boolean;\n onStart?: () => void;\n onFrame?: (step: IStep, ratio: number) => void;\n onEnd?: () => void;\n onRemove?: () => void;\n}\n\nexport interface MorphingAnimateConfig extends Omit<BaseAnimateConfig, 'interpolate'> {\n duration?: number;\n easing?: EasingType; // 统一到easing\n delay?: number;\n}\n\nexport interface MultiMorphingAnimateConfig extends MorphingAnimateConfig {\n splitPath?: 'clone' | ((graphic: IGraphic, count: number, needAppend?: boolean) => IGraphic[]);\n individualDelay?: (index: number, count: number, fromGraphic: IGraphic, toGraphic: IGraphic) => number;\n}\n"]}
@@ -51,4 +51,5 @@ function createConicGradient(context, color, x, y, w, h) {
51
51
  return color.stops.forEach((stop => {
52
52
  canvasGradient.addColorStop(stop.offset, stop.color);
53
53
  })), canvasGradient.GetPattern ? canvasGradient.GetPattern(w + x, h + y, undefined) : canvasGradient;
54
- }
54
+ }
55
+ //# sourceMappingURL=canvas-utils.js.map
@@ -113,5 +113,4 @@ export function mapToCanvasPointForCanvas(nativeEvent) {
113
113
  x: nativeEvent._canvasX || 0,
114
114
  y: nativeEvent._canvasY || 0
115
115
  };
116
- }
117
- //# sourceMappingURL=event-transformer.js.map
116
+ }
@@ -7,4 +7,4 @@ export function resolveContainerBinding(container, serviceIdentifier) {
7
7
  if (null == instance) throw new Error(`No binding found for ${describeServiceIdentifier(serviceIdentifier)}.`);
8
8
  return instance;
9
9
  }
10
- //# sourceMappingURL=explicit-binding.js.map
10
+ //# sourceMappingURL=explicit-binding.js.map
@@ -5,4 +5,4 @@ export class Generator {
5
5
  }
6
6
 
7
7
  Generator.auto_increment_id = 0;
8
- //# sourceMappingURL=generator.js.map
8
+ //# sourceMappingURL=generator.js.map
@@ -118,4 +118,4 @@ export function transformMat4(out, a, m) {
118
118
  return w = w || 1, out[0] = (m[0] * x + m[4] * y + m[8] * z + m[12]) / w, out[1] = (m[1] * x + m[5] * y + m[9] * z + m[13]) / w,
119
119
  out[2] = (m[2] * x + m[6] * y + m[10] * z + m[14]) / w, out;
120
120
  }
121
- //# sourceMappingURL=matrix.js.map
121
+ //# sourceMappingURL=matrix.js.map
@@ -189,4 +189,4 @@ export function bezierCurversToPath(bezierCurves) {
189
189
  }
190
190
  return path;
191
191
  }
192
- //# sourceMappingURL=morphing-utils.js.map
192
+ //# sourceMappingURL=morphing-utils.js.map
@@ -55,4 +55,4 @@ export function parseSvgPath(str) {
55
55
  } else result.push(currCommandData);
56
56
  return result;
57
57
  }
58
- //# sourceMappingURL=path-svg.js.map
58
+ //# sourceMappingURL=path-svg.js.map
@@ -26,4 +26,4 @@ export class PerformanceRAF {
26
26
  }));
27
27
  }
28
28
  }
29
- //# sourceMappingURL=performance-raf.js.map
29
+ //# sourceMappingURL=performance-raf.js.map
@@ -38,4 +38,4 @@ function getProportionPoint(point, segment, length, dx, dy) {
38
38
  y: point.y - dy * factor
39
39
  };
40
40
  }
41
- //# sourceMappingURL=polygon.js.map
41
+ //# sourceMappingURL=polygon.js.map
@@ -83,4 +83,4 @@ export class AppContext {
83
83
  };
84
84
  }
85
85
  }
86
- //# sourceMappingURL=app-context.js.map
86
+ //# sourceMappingURL=app-context.js.map
@@ -33,4 +33,4 @@ export class BrowserEntry {
33
33
  export function createBrowserApp(options = {}) {
34
34
  return new BrowserEntry(options);
35
35
  }
36
- //# sourceMappingURL=browser.js.map
36
+ //# sourceMappingURL=browser.js.map
@@ -11,4 +11,4 @@ export * from "./miniapp";
11
11
  export * from "./runtime-installer";
12
12
 
13
13
  export { createBrowserApp as createApp } from "./browser";
14
- //# sourceMappingURL=index.js.map
14
+ //# sourceMappingURL=index.js.map
@@ -9,4 +9,4 @@ export class MiniappEntry extends BrowserEntry {
9
9
  export function createMiniappApp(options = {}) {
10
10
  return new MiniappEntry(options);
11
11
  }
12
- //# sourceMappingURL=miniapp.js.map
12
+ //# sourceMappingURL=miniapp.js.map
@@ -9,4 +9,4 @@ export class NodeEntry extends BrowserEntry {
9
9
  export function createNodeApp(options = {}) {
10
10
  return new NodeEntry(options);
11
11
  }
12
- //# sourceMappingURL=node.js.map
12
+ //# sourceMappingURL=node.js.map
@@ -127,4 +127,4 @@ export function installRuntimePickersToApp(app, serviceIdentifier) {
127
127
  const pickers = bindingContext.getAll(serviceIdentifier);
128
128
  app.registry.picker.clear(), registerRuntimeEntries(((key, picker) => app.registry.picker.register(key, picker)), pickers, "runtime-picker");
129
129
  }
130
- //# sourceMappingURL=runtime-installer.js.map
130
+ //# sourceMappingURL=runtime-installer.js.map
@@ -1,2 +1,2 @@
1
1
  export { };
2
- //# sourceMappingURL=types.js.map
2
+ //# sourceMappingURL=types.js.map
@@ -35,6 +35,7 @@ export interface IStep {
35
35
  getFromProps: () => Record<string, any> | void;
36
36
  getMergedEndProps: () => Record<string, any> | void;
37
37
  deleteSelfAttr: (key: string) => void;
38
+ deleteSelfAttrs: (keys: string[]) => void;
38
39
  stop: () => void;
39
40
  release: () => void;
40
41
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/interface/animation/animate.ts"],"names":[],"mappings":"AAyKA,MAAM,CAAN,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,iDAAe,CAAA;IACf,6EAA6B,CAAA;AAC/B,CAAC,EAHW,WAAW,KAAX,WAAW,QAGtB","file":"animate.js","sourcesContent":["import type { IGraphic } from '../graphic';\nimport type { EasingType, EasingTypeFunc } from './easing';\nimport type { AnimateStatus, IAnimateStepType } from './type';\nimport type { ITimeline } from './timeline';\n\nexport interface ICustomAnimate extends IStep {\n type: IAnimateStepType;\n}\n\nexport interface IStep {\n type: IAnimateStepType;\n prev?: IStep;\n // 持续时间\n duration: number;\n // 链表,下一个\n next?: IStep;\n // 属性\n props?: Record<string, any>;\n // 解析后的属性(用于性能优化,避免每次tick都解析)\n fromParsedProps?: Record<string, any>;\n toParsedProps?: Record<string, any>;\n fromProps?: Record<string, any>;\n // 解析后的属性列表(用于性能优化,避免每次tick都解析)\n propKeys?: string[];\n // 缓动函数\n easing?: EasingTypeFunc;\n\n // 添加一个\n append: (step: IStep) => void;\n // 获取上一个props,用于完成这次的fromValue 和 toValue的插值\n getLastProps: () => any;\n\n animate: IAnimate;\n\n // 设置持续时间\n setDuration: (duration: number, updateDownstream?: boolean) => void;\n // 获取持续时间\n getDuration: () => number;\n // 确定插值更新函数(在开始的时候就确定,避免每次tick都解析)\n determineInterpolateUpdateFunction: () => void;\n\n // 设置开始时间\n setStartTime: (time: number, updateDownstream?: boolean) => void;\n // 获取开始时间\n getStartTime: () => number;\n\n bind: (target: IGraphic, animate: IAnimate) => void;\n // 在第一次绑定到Animate的时候触发\n onBind: () => void;\n // 第一次执行的时候调用\n onFirstRun: () => void;\n // 开始执行的时候调用(如果有循环,那每个周期都会调用)\n onStart: () => void;\n // 结束执行的时候调用(如果有循环,那每个周期都会调用)\n onEnd: (cb?: (animate: IAnimate, step: IStep) => void) => void;\n // 更新执行的时候调用(如果有循环,那每个周期都会调用)\n update: (end: boolean, ratio: number, out: Record<string, any>) => void;\n onUpdate: (end: boolean, ratio: number, out: Record<string, any>) => void;\n\n getEndProps: () => Record<string, any> | void;\n getFromProps: () => Record<string, any> | void;\n getMergedEndProps: () => Record<string, any> | void;\n\n // 屏蔽自身属性,会直接从props等内容里删除掉\n deleteSelfAttr: (key: string) => void;\n\n // 停止\n stop: () => void;\n\n // 释放\n release: () => void;\n}\n\nexport interface IAnimate {\n readonly id: string | number;\n status: AnimateStatus;\n target: IGraphic;\n priority: number;\n interpolateUpdateFunction:\n | ((from: Record<string, any>, to: Record<string, any>, ratio: number, step: IStep, target: IGraphic) => void)\n | null;\n\n _onStart?: (() => void)[];\n _onFrame?: ((step: IStep, ratio: number) => void)[];\n _onEnd?: (() => void)[];\n _onRemove?: (() => void)[];\n\n getStartProps: () => Record<string, any>;\n getEndProps: () => Record<string, any>;\n\n // 设置timeline\n setTimeline: (timeline: ITimeline) => void;\n // 获取timeline\n getTimeline: () => ITimeline;\n readonly timeline: ITimeline;\n\n bind: (target: IGraphic) => this;\n to: (props: Record<string, any>, duration: number, easing: EasingType) => this;\n from: (props: Record<string, any>, duration: number, easing: EasingType) => this;\n pause: () => void;\n resume: () => void;\n onStart: (cb?: () => void) => void;\n onEnd: (cb?: () => void) => void;\n onFrame: (cb: (step: IStep, ratio: number) => void) => void;\n onRemove: (cb?: () => void) => void;\n // 屏蔽属性\n preventAttr: (key: string) => void;\n // 屏蔽属性\n preventAttrs: (key: string[]) => void;\n // 属性是否合法\n validAttr: (key: string) => boolean;\n\n runCb: (cb: (a: IAnimate, step: IStep) => void) => IAnimate;\n\n // 自定义插值,返回false表示没有匹配上\n customInterpolate: (\n key: string,\n ratio: number,\n from: any,\n to: any,\n target: IGraphic,\n ret: Record<string, any>\n ) => boolean;\n play: (customAnimate: ICustomAnimate) => this;\n\n getFromValue: () => Record<string, any>;\n getToValue: () => Record<string, any>;\n // 停止,可以设置停止后设置target的属性为开始的值(fromValue),还是结束的值(toValue)\n stop: (type?: 'start' | 'end' | Record<string, any>) => void;\n /** 打上END标志,下一帧被删除 */\n release: () => void;\n // 获取持续的时长\n getDuration: () => number;\n getTotalDuration: () => number;\n // 获取动画开始时间(注意并不是子动画的startAt)\n getStartTime: () => number;\n // 等待delay\n wait: (delay: number) => this;\n\n /* 动画编排 */\n // 所有动画结束后执行\n afterAll: (list: IAnimate[]) => this;\n // 在某个动画结束后执行\n after: (animate: IAnimate) => this;\n // 并行执行\n parallel: (animate: IAnimate) => this;\n\n getLoop: () => number;\n\n // 反转动画\n // reversed: (r: boolean) => IAnimate;\n // 循环动画\n loop: (n: number | boolean) => IAnimate;\n // 反弹动画\n bounce: (b: boolean) => IAnimate;\n\n advance: (delta: number) => void;\n\n // 设置开始时间(startAt之前是完全不会进入动画生命周期的)\n // 它和wait不一样,如果调用的是wait,wait过程中还算是一个动画阶段,只是空的阶段,而startAt之前是完全不会进入动画生命周期的\n startAt: (t: number) => IAnimate;\n\n // 重新同步和计算props,用于内部某些step发生了变更后,重新计算自身\n reSyncProps: () => void;\n\n // 更新duration\n updateDuration: () => void;\n}\n\nexport enum AnimateMode {\n NORMAL = 0b0000,\n SET_ATTR_IMMEDIATELY = 0b0001\n}\n\nexport interface IAnimateTarget {\n onAnimateBind?: (animte: IAnimate) => void;\n // 获取属性\n getComputedAttribute: (name: string) => any;\n // 获取默认属性\n getDefaultAttribute: (name: string) => any;\n onStop: (props?: Record<string, any>) => void;\n animates: Map<string | number, IAnimate>;\n [key: string]: any;\n}\n\nexport interface BaseAnimateConfig {\n id?: number | string;\n interpolate?: (key: string, ratio: number, from: any, to: any, nextAttributes: any) => boolean;\n onStart?: () => void;\n onFrame?: (step: IStep, ratio: number) => void;\n onEnd?: () => void;\n onRemove?: () => void;\n}\n\nexport interface MorphingAnimateConfig extends Omit<BaseAnimateConfig, 'interpolate'> {\n duration?: number;\n easing?: EasingType; // 统一到easing\n delay?: number;\n}\n\nexport interface MultiMorphingAnimateConfig extends MorphingAnimateConfig {\n splitPath?: 'clone' | ((graphic: IGraphic, count: number, needAppend?: boolean) => IGraphic[]);\n individualDelay?: (index: number, count: number, fromGraphic: IGraphic, toGraphic: IGraphic) => number;\n}\n"]}
1
+ {"version":3,"sources":["../src/interface/animation/animate.ts"],"names":[],"mappings":"AA2KA,MAAM,CAAN,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,iDAAe,CAAA;IACf,6EAA6B,CAAA;AAC/B,CAAC,EAHW,WAAW,KAAX,WAAW,QAGtB","file":"animate.js","sourcesContent":["import type { IGraphic } from '../graphic';\nimport type { EasingType, EasingTypeFunc } from './easing';\nimport type { AnimateStatus, IAnimateStepType } from './type';\nimport type { ITimeline } from './timeline';\n\nexport interface ICustomAnimate extends IStep {\n type: IAnimateStepType;\n}\n\nexport interface IStep {\n type: IAnimateStepType;\n prev?: IStep;\n // 持续时间\n duration: number;\n // 链表,下一个\n next?: IStep;\n // 属性\n props?: Record<string, any>;\n // 解析后的属性(用于性能优化,避免每次tick都解析)\n fromParsedProps?: Record<string, any>;\n toParsedProps?: Record<string, any>;\n fromProps?: Record<string, any>;\n // 解析后的属性列表(用于性能优化,避免每次tick都解析)\n propKeys?: string[];\n // 缓动函数\n easing?: EasingTypeFunc;\n\n // 添加一个\n append: (step: IStep) => void;\n // 获取上一个props,用于完成这次的fromValue 和 toValue的插值\n getLastProps: () => any;\n\n animate: IAnimate;\n\n // 设置持续时间\n setDuration: (duration: number, updateDownstream?: boolean) => void;\n // 获取持续时间\n getDuration: () => number;\n // 确定插值更新函数(在开始的时候就确定,避免每次tick都解析)\n determineInterpolateUpdateFunction: () => void;\n\n // 设置开始时间\n setStartTime: (time: number, updateDownstream?: boolean) => void;\n // 获取开始时间\n getStartTime: () => number;\n\n bind: (target: IGraphic, animate: IAnimate) => void;\n // 在第一次绑定到Animate的时候触发\n onBind: () => void;\n // 第一次执行的时候调用\n onFirstRun: () => void;\n // 开始执行的时候调用(如果有循环,那每个周期都会调用)\n onStart: () => void;\n // 结束执行的时候调用(如果有循环,那每个周期都会调用)\n onEnd: (cb?: (animate: IAnimate, step: IStep) => void) => void;\n // 更新执行的时候调用(如果有循环,那每个周期都会调用)\n update: (end: boolean, ratio: number, out: Record<string, any>) => void;\n onUpdate: (end: boolean, ratio: number, out: Record<string, any>) => void;\n\n getEndProps: () => Record<string, any> | void;\n getFromProps: () => Record<string, any> | void;\n getMergedEndProps: () => Record<string, any> | void;\n\n // 屏蔽自身属性,会直接从props等内容里删除掉\n deleteSelfAttr: (key: string) => void;\n // 批量屏蔽自身属性,避免大量图元切换时反复 splice/delete\n deleteSelfAttrs: (keys: string[]) => void;\n\n // 停止\n stop: () => void;\n\n // 释放\n release: () => void;\n}\n\nexport interface IAnimate {\n readonly id: string | number;\n status: AnimateStatus;\n target: IGraphic;\n priority: number;\n interpolateUpdateFunction:\n | ((from: Record<string, any>, to: Record<string, any>, ratio: number, step: IStep, target: IGraphic) => void)\n | null;\n\n _onStart?: (() => void)[];\n _onFrame?: ((step: IStep, ratio: number) => void)[];\n _onEnd?: (() => void)[];\n _onRemove?: (() => void)[];\n\n getStartProps: () => Record<string, any>;\n getEndProps: () => Record<string, any>;\n\n // 设置timeline\n setTimeline: (timeline: ITimeline) => void;\n // 获取timeline\n getTimeline: () => ITimeline;\n readonly timeline: ITimeline;\n\n bind: (target: IGraphic) => this;\n to: (props: Record<string, any>, duration: number, easing: EasingType) => this;\n from: (props: Record<string, any>, duration: number, easing: EasingType) => this;\n pause: () => void;\n resume: () => void;\n onStart: (cb?: () => void) => void;\n onEnd: (cb?: () => void) => void;\n onFrame: (cb: (step: IStep, ratio: number) => void) => void;\n onRemove: (cb?: () => void) => void;\n // 屏蔽属性\n preventAttr: (key: string) => void;\n // 屏蔽属性\n preventAttrs: (key: string[]) => void;\n // 属性是否合法\n validAttr: (key: string) => boolean;\n\n runCb: (cb: (a: IAnimate, step: IStep) => void) => IAnimate;\n\n // 自定义插值,返回false表示没有匹配上\n customInterpolate: (\n key: string,\n ratio: number,\n from: any,\n to: any,\n target: IGraphic,\n ret: Record<string, any>\n ) => boolean;\n play: (customAnimate: ICustomAnimate) => this;\n\n getFromValue: () => Record<string, any>;\n getToValue: () => Record<string, any>;\n // 停止,可以设置停止后设置target的属性为开始的值(fromValue),还是结束的值(toValue)\n stop: (type?: 'start' | 'end' | Record<string, any>) => void;\n /** 打上END标志,下一帧被删除 */\n release: () => void;\n // 获取持续的时长\n getDuration: () => number;\n getTotalDuration: () => number;\n // 获取动画开始时间(注意并不是子动画的startAt)\n getStartTime: () => number;\n // 等待delay\n wait: (delay: number) => this;\n\n /* 动画编排 */\n // 所有动画结束后执行\n afterAll: (list: IAnimate[]) => this;\n // 在某个动画结束后执行\n after: (animate: IAnimate) => this;\n // 并行执行\n parallel: (animate: IAnimate) => this;\n\n getLoop: () => number;\n\n // 反转动画\n // reversed: (r: boolean) => IAnimate;\n // 循环动画\n loop: (n: number | boolean) => IAnimate;\n // 反弹动画\n bounce: (b: boolean) => IAnimate;\n\n advance: (delta: number) => void;\n\n // 设置开始时间(startAt之前是完全不会进入动画生命周期的)\n // 它和wait不一样,如果调用的是wait,wait过程中还算是一个动画阶段,只是空的阶段,而startAt之前是完全不会进入动画生命周期的\n startAt: (t: number) => IAnimate;\n\n // 重新同步和计算props,用于内部某些step发生了变更后,重新计算自身\n reSyncProps: () => void;\n\n // 更新duration\n updateDuration: () => void;\n}\n\nexport enum AnimateMode {\n NORMAL = 0b0000,\n SET_ATTR_IMMEDIATELY = 0b0001\n}\n\nexport interface IAnimateTarget {\n onAnimateBind?: (animte: IAnimate) => void;\n // 获取属性\n getComputedAttribute: (name: string) => any;\n // 获取默认属性\n getDefaultAttribute: (name: string) => any;\n onStop: (props?: Record<string, any>) => void;\n animates: Map<string | number, IAnimate>;\n [key: string]: any;\n}\n\nexport interface BaseAnimateConfig {\n id?: number | string;\n interpolate?: (key: string, ratio: number, from: any, to: any, nextAttributes: any) => boolean;\n onStart?: () => void;\n onFrame?: (step: IStep, ratio: number) => void;\n onEnd?: () => void;\n onRemove?: () => void;\n}\n\nexport interface MorphingAnimateConfig extends Omit<BaseAnimateConfig, 'interpolate'> {\n duration?: number;\n easing?: EasingType; // 统一到easing\n delay?: number;\n}\n\nexport interface MultiMorphingAnimateConfig extends MorphingAnimateConfig {\n splitPath?: 'clone' | ((graphic: IGraphic, count: number, needAppend?: boolean) => IGraphic[]);\n individualDelay?: (index: number, count: number, fromGraphic: IGraphic, toGraphic: IGraphic) => number;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visactor/vrender-core",
3
- "version": "1.1.0-alpha.11",
3
+ "version": "1.1.0-alpha.12",
4
4
  "description": "",
5
5
  "sideEffects": [
6
6
  "./src/modules.ts",