@visactor/vrender 0.11.2-alpha.1 → 0.12.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.
Files changed (66) hide show
  1. package/cjs/animate/custom-animate.d.ts +3 -3
  2. package/cjs/animate/custom-animate.js +1 -1
  3. package/cjs/animate/custom-animate.js.map +1 -1
  4. package/cjs/animate/easing.d.ts +6 -0
  5. package/cjs/animate/easing.js +18 -0
  6. package/cjs/animate/easing.js.map +1 -1
  7. package/cjs/canvas/contributions/lynx/context.d.ts +2 -1
  8. package/cjs/canvas/contributions/lynx/context.js +8 -0
  9. package/cjs/canvas/contributions/lynx/context.js.map +1 -1
  10. package/cjs/core/stage.d.ts +23 -1
  11. package/cjs/core/stage.js +14 -9
  12. package/cjs/core/stage.js.map +1 -1
  13. package/cjs/graphic/graphic-service/graphic-service.js +6 -1
  14. package/cjs/graphic/graphic-service/graphic-service.js.map +1 -1
  15. package/cjs/graphic/richtext/wrapper.d.ts +2 -2
  16. package/cjs/graphic/richtext/wrapper.js +2 -2
  17. package/cjs/graphic/richtext/wrapper.js.map +1 -1
  18. package/cjs/index.d.ts +1 -1
  19. package/cjs/index.js +18 -18
  20. package/cjs/index.js.map +1 -1
  21. package/cjs/interface/animate.d.ts +1 -1
  22. package/cjs/interface/animate.js.map +1 -1
  23. package/cjs/interface/render.d.ts +1 -1
  24. package/cjs/interface/render.js.map +1 -1
  25. package/cjs/interface/stage.d.ts +9 -2
  26. package/cjs/interface/stage.js.map +1 -1
  27. package/cjs/render/contributions/render/draw-contribution.d.ts +1 -1
  28. package/cjs/render/contributions/render/draw-contribution.js +4 -2
  29. package/cjs/render/contributions/render/draw-contribution.js.map +1 -1
  30. package/cjs/render/contributions/render/draw-interceptor.js +1 -1
  31. package/cjs/render/contributions/render/draw-interceptor.js.map +1 -1
  32. package/dist/index.js +91 -22
  33. package/dist/index.min.js +1 -1
  34. package/es/animate/custom-animate.d.ts +3 -3
  35. package/es/animate/custom-animate.js +1 -1
  36. package/es/animate/custom-animate.js.map +1 -1
  37. package/es/animate/easing.d.ts +6 -0
  38. package/es/animate/easing.js +18 -0
  39. package/es/animate/easing.js.map +1 -1
  40. package/es/canvas/contributions/lynx/context.d.ts +2 -1
  41. package/es/canvas/contributions/lynx/context.js +8 -0
  42. package/es/canvas/contributions/lynx/context.js.map +1 -1
  43. package/es/core/stage.d.ts +23 -1
  44. package/es/core/stage.js +14 -9
  45. package/es/core/stage.js.map +1 -1
  46. package/es/graphic/graphic-service/graphic-service.js +6 -1
  47. package/es/graphic/graphic-service/graphic-service.js.map +1 -1
  48. package/es/graphic/richtext/wrapper.d.ts +2 -2
  49. package/es/graphic/richtext/wrapper.js +2 -2
  50. package/es/graphic/richtext/wrapper.js.map +1 -1
  51. package/es/index.d.ts +1 -1
  52. package/es/index.js +1 -1
  53. package/es/index.js.map +1 -1
  54. package/es/interface/animate.d.ts +1 -1
  55. package/es/interface/animate.js.map +1 -1
  56. package/es/interface/render.d.ts +1 -1
  57. package/es/interface/render.js.map +1 -1
  58. package/es/interface/stage.d.ts +9 -2
  59. package/es/interface/stage.js.map +1 -1
  60. package/es/render/contributions/render/draw-contribution.d.ts +1 -1
  61. package/es/render/contributions/render/draw-contribution.js +4 -2
  62. package/es/render/contributions/render/draw-contribution.js.map +1 -1
  63. package/es/render/contributions/render/draw-interceptor.js +1 -1
  64. package/es/render/contributions/render/draw-interceptor.js.map +1 -1
  65. package/es/tsconfig.tsbuildinfo +1 -1
  66. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
- import { IPoint, IPointLike } from '@visactor/vutils';
2
- import { CustomPath2D } from '../common/custom-path2d';
3
- import { EasingType, IGraphic, IGroup, ILinearGradient, IRect, IRectAttribute, IShadowRoot } from '../interface';
1
+ import type { IPoint, IPointLike } from '@visactor/vutils';
2
+ import type { CustomPath2D } from '../common/custom-path2d';
3
+ import type { EasingType, IGraphic, IGroup, ILinearGradient, IRect, IRectAttribute, IShadowRoot } from '../interface';
4
4
  import { ACustomAnimate } from './animate';
5
5
  export declare class IncreaseCount extends ACustomAnimate<{
6
6
  text: string | number;
@@ -59,7 +59,7 @@ class FadeInPlus extends animate_1.ACustomAnimate {
59
59
  }
60
60
  onEnd() {}
61
61
  onUpdate(end, ratio, out) {
62
- switch (this.direction) {
62
+ if (this.toFill && this.toStroke) switch (this.direction) {
63
63
  case Direction.RIGHT_TO_LEFT:
64
64
  this.rightToLeft(end, ratio, out);
65
65
  break;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/animate/custom-animate.ts"],"names":[],"mappings":";;;AAAA,6CAAyF;AACzF,gDAA6C;AAC7C,2CAAsD;AAatD,uCAA2C;AAC3C,qCAAkC;AAClC,2CAAqD;AAErD,MAAa,aAAc,SAAQ,wBAAyC;IAM1E,YACE,IAA+B,EAC/B,EAA6B,EAC7B,QAAgB,EAChB,MAAkB,EAClB,MAA4B;QAE5B,KAAK,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5C,CAAC;IAED,WAAW;QACT,IAAI,IAAI,CAAC,KAAK,KAAK,KAAK,EAAE;YACxB,OAAO,EAAE,CAAC;SACX;QACD,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,EAAE;SACd,CAAC;IACJ,CAAC;IAED,MAAM;;QACJ,IAAI,CAAC,UAAU,GAAG,IAAA,iBAAQ,EAAC,MAAA,IAAI,CAAC,IAAI,0CAAE,IAAI,CAAC,CAAC,CAAC,CAAC,MAAA,IAAI,CAAC,IAAI,0CAAE,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,MAAA,IAAI,CAAC,IAAI,0CAAE,IAAI,CAAC,CAAC;QACnG,IAAI,CAAC,QAAQ,GAAG,IAAA,iBAAQ,EAAC,MAAA,IAAI,CAAC,EAAE,0CAAE,IAAI,CAAC,CAAC,CAAC,CAAC,MAAA,IAAI,CAAC,EAAE,0CAAE,IAAI,CAAC,CAAC,CAAC,M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AAE,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;QACxC,CAAC,CAAC,CAAC;QACH,OAAO,KAAK,CAAC;IACf,CAAC;IAED,MAAM;QACJ,IAAI,CAAC,YAAY,EAAE,CAAC;QACpB,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;YAC9B,CAAC,CAAC,MAAM,EAAE,CAAC;QACb,CAAC,CAAC,CAAC;QACH,OAAO;IACT,CAAC;IAED,KAAK;QACH,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;YAC9B,CAAC,CAAC,KAAK,EAAE,CAAC;QACZ,CAAC,CAAC,CAAC;QACH,OAAO;IACT,CAAC;IAED,QAAQ,CAAC,GAAY,EAAE,KAAa,EAAE,GAAwB;QAC5D,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,OAAO;SACR;QACD,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QACrB,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;YAC9B,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC;YACxB,MAAM,UAAU,GAAG,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,eAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;YACxE,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;YAC1B,CAAC,CAAC,QAAQ,CAAC,GAAG,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC;QAC9B,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;QACtB,OAAO;IACT,CAAC;CACF;AAtDD,sCAsDC","file":"custom-animate.js","sourcesContent":["import { IPoint, IPointLike, isArray, isNumber, pi, pi2, Point } from '@visactor/vutils';\nimport { application } from '../application';\nimport { AttributeUpdateType } from '../common/enums';\nimport { CustomPath2D } from '../common/custom-path2d';\nimport {\n EasingType,\n IArcGraphicAttribute,\n IGraphic,\n IGroup,\n ILinearGradient,\n IRect,\n IRectAttribute,\n IRectGraphicAttribute,\n IShadowRoot\n} from '../interface';\nimport { ACustomAnimate } from './animate';\nimport { Easing } from './easing';\nimport { pointInterpolation } from '../common/utils';\n\nexport class IncreaseCount extends ACustomAnimate<{ text: string | number }> {\n declare valid: boolean;\n\n private fromNumber: number;\n private toNumber: number;\n\n constructor(\n from: { text: string | number },\n to: { text: string | number },\n duration: number,\n easing: EasingType,\n params?: { fixed?: boolean }\n ) {\n super(from, to, duration, easing, params);\n }\n\n getEndProps(): Record<string, any> | void {\n if (this.valid === false) {\n return {};\n }\n return {\n text: this.to\n };\n }\n\n onBind(): void {\n this.fromNumber = isNumber(this.from?.text) ? this.from?.text : Number.parseFloat(this.from?.text);\n this.toNumber = isNumber(this.to?.text) ? this.to?.text : Number.parseFloat(this.to?.text);\n if (!Number.isFinite(this.toNumber)) {\n this.fromNumber = 0;\n }\n if (!Number.isFinite(this.toNumber)) {\n this.valid = false;\n }\n }\n\n onEnd(): void {\n return;\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n if (this.valid === false) {\n return;\n }\n if (end) {\n out.text = this.toNumber.toFixed();\n } else {\n out.text = (this.fromNumber + (this.toNumber - this.fromNumber) * ratio).toFixed(this.params?.fixed ?? 0);\n }\n }\n}\n\nenum Direction {\n LEFT_TO_RIGHT = 0,\n RIGHT_TO_LEFT = 1,\n TOP_TO_BOTTOM = 2,\n BOTTOM_TO_TOP = 3,\n STROKE = 4\n}\nexport class FadeInPlus extends ACustomAnimate<any> {\n declare direction: number;\n declare toFill: string;\n declare toStroke: string;\n declare fillGradient: ILinearGradient;\n declare strokeGradient: ILinearGradient;\n declare fill: boolean;\n declare stroke: boolean;\n constructor(\n from: any,\n to: any,\n duration: number,\n easing: EasingType,\n params?: { direction?: number; fill?: boolean; stroke?: boolean }\n ) {\n super(from, to, duration, easing, params);\n const { direction = Direction.LEFT_TO_RIGHT, fill = true, stroke = true } = params || {};\n this.direction = direction;\n this.fill = fill;\n this.stroke = stroke;\n this.fillGradient = {\n gradient: 'linear',\n stops: []\n };\n this.strokeGradient = {\n gradient: 'linear',\n stops: []\n };\n }\n\n getEndProps(): Record<string, any> {\n return {\n fill: this.toFill,\n stroke: this.toStroke\n };\n }\n\n onBind(): void {\n // this.to = parseFloat(this.target.getAnimatePropByName('text'));\n this.toFill = this.target.getComputedAttribute('fill');\n this.toStroke = this.target.getComputedAttribute('stroke');\n }\n\n onEnd(): void {\n return;\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n switch (this.direction) {\n case Direction.RIGHT_TO_LEFT:\n this.rightToLeft(end, ratio, out);\n break;\n case Direction.TOP_TO_BOTTOM:\n this.topToBottom(end, ratio, out);\n break;\n case Direction.BOTTOM_TO_TOP:\n this.bottomToTop(end, ratio, out);\n break;\n case Direction.STROKE:\n this.strokePath(end, ratio, out);\n break;\n default:\n this.leftToRight(end, ratio, out);\n break;\n }\n }\n\n leftToRight(end: boolean, ratio: number, out: Record<string, any>) {\n if (this.fill) {\n const toFillColor = this.toFill;\n this.fillGradient.x0 = 0;\n this.fillGradient.y0 = 0;\n this.fillGradient.x1 = 1;\n this.fillGradient.y1 = 0;\n this.fillGradient.stops = [\n { offset: 0, color: toFillColor },\n { offset: ratio, color: toFillColor },\n { offset: Math.min(1, ratio * 2), color: 'transparent' }\n ];\n out.fill = this.fillGradient;\n }\n if (this.stroke) {\n const toStrokeColor = this.toStroke;\n this.strokeGradient.x0 = 0;\n this.strokeGradient.y0 = 0;\n this.strokeGradient.x1 = 1;\n this.strokeGradient.y1 = 0;\n this.strokeGradient.stops = [\n { offset: 0, color: toStrokeColor },\n { offset: ratio, color: toStrokeColor },\n { offset: Math.min(1, ratio * 6), color: 'transparent' }\n ];\n out.stroke = this.strokeGradient;\n // const dashLen = 300;\n // const offset = ratio * dashLen;\n // out.lineDash = [offset, dashLen - offset];\n }\n return;\n }\n\n strokePath(end: boolean, ratio: number, out: Record<string, any>) {\n if (this.fill) {\n const toFillColor = this.toFill;\n this.fillGradient.x0 = 0;\n this.fillGradient.y0 = 0;\n this.fillGradient.x1 = 1;\n this.fillGradient.y1 = 0;\n this.fillGradient.stops = [\n { offset: 0, color: toFillColor },\n { offset: ratio, color: toFillColor },\n { offset: Math.min(1, ratio * 2), color: 'transparent' }\n ];\n out.fill = this.fillGradient;\n }\n if (this.stroke) {\n const dashLen = 300;\n const offset = ratio * dashLen;\n out.lineDash = [offset, dashLen - offset];\n }\n return;\n }\n rightToLeft(end: boolean, ratio: number, out: Record<string, any>) {\n return;\n }\n topToBottom(end: boolean, ratio: number, out: Record<string, any>) {\n return;\n }\n bottomToTop(end: boolean, ratio: number, out: Record<string, any>) {\n return;\n }\n}\n\nexport class InputText extends ACustomAnimate<{ text: string }> {\n declare valid: boolean;\n declare target: IGraphic;\n\n private fromText: string = '';\n private toText: string = '';\n\n getEndProps(): Record<string, any> {\n if (this.valid === false) {\n return {};\n }\n return {\n text: this.to\n };\n }\n\n onBind(): void {\n this.fromText = this.from?.text ?? '';\n this.toText = this.to?.text ?? '';\n if (!this.toText || isArray(this.toText)) {\n this.valid = false;\n } else {\n this.toText = this.toText.toString();\n const root = this.target.attachShadow();\n const line = application.graphicService.creator.line({\n x: 0,\n y: 0,\n points: [\n { x: 0, y: 0 },\n { x: 0, y: this.target.getComputedAttribute('fontSize') }\n ],\n stroke: 'black',\n lineWidth: 1\n });\n root.add(line);\n }\n }\n\n onEnd(): void {\n this.target.detachShadow();\n return;\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n if (this.valid === false) {\n return;\n }\n // update text\n const fromCount = this.fromText.length;\n const toCount = this.toText.length;\n const count = Math.ceil(fromCount + (toCount - fromCount) * ratio);\n\n out.text = this.toText.substr(0, count);\n\n // update line position\n const line = this.target.shadowRoot?.at(0) as IGraphic;\n const endX = (this.target as any).clipedWidth + 2;\n line.setAttribute('x', endX);\n }\n}\n\nexport class StreamLight extends ACustomAnimate<any> {\n declare valid: boolean;\n declare target: IGraphic;\n\n declare rect: IRect;\n constructor(\n from: any,\n to: any,\n duration: number,\n easing: EasingType,\n params?: { attribute?: Partial<IRectAttribute>; streamLength?: number }\n ) {\n super(from, to, duration, easing, params);\n }\n\n getEndProps(): Record<string, any> {\n return {};\n }\n\n onStart(): void {\n const root = this.target.attachShadow();\n\n const height = this.target.AABBBounds.height();\n\n const rect = application.graphicService.creator.rect({\n height: height,\n fill: '#bcdeff',\n shadowBlur: 30,\n shadowColor: '#bcdeff',\n ...this.params?.attribute,\n x: 0,\n y: 0,\n width: 0\n });\n this.rect = rect;\n root.add(rect);\n }\n\n onBind(): void {\n return;\n }\n\n onEnd(): void {\n this.target.detachShadow();\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n const parentWidth = (this.target as any).attribute.width ?? 250;\n const streamLength = this.params?.streamLength ?? parentWidth;\n const maxLength = this.params?.attribute?.width ?? 60;\n const startX = -maxLength;\n const currentX = startX + (streamLength - startX) * ratio;\n const x = Math.max(currentX, 0);\n const w = Math.min(Math.min(currentX + maxLength, maxLength), streamLength - currentX);\n const width = w + x > parentWidth ? Math.max(parentWidth - x, 0) : w;\n this.rect.setAttributes(\n {\n x,\n width\n } as any,\n false,\n {\n type: AttributeUpdateType.ANIMATE_PLAY,\n animationState: {\n ratio,\n end\n }\n }\n );\n }\n}\n\nexport class Meteor extends ACustomAnimate<any> {\n declare size: number;\n declare target: IGraphic;\n declare root: IShadowRoot;\n declare posList: IPoint[];\n\n get lastPos(): IPoint {\n return this.posList[this.posList.length - 1];\n }\n\n constructor(size: number, duration: number, easing: EasingType, params?: any) {\n super(null, null, duration, easing, params);\n this.size = size;\n this.posList = [];\n }\n\n onBind(): void {\n const root = this.target.attachShadow();\n this.root = root;\n for (let i = 0; i < this.size; i++) {\n const g = this.target.clone();\n const scale = Math.min(((this.size - i) / this.size) * 3, 1);\n const opacity = Math.min(0.2 + 0.7 / this.size);\n g.setAttributes({ x: 0, y: 0, dx: 0, dy: 0, scaleX: scale, scaleY: scale, opacity }, false, {\n type: AttributeUpdateType.ANIMATE_BIND\n });\n root.add(g);\n }\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n if (end) {\n this.target.detachShadow();\n this.posList.length = 0;\n return;\n }\n\n const x = this.target.getComputedAttribute('x');\n const y = this.target.getComputedAttribute('y');\n\n const nextPos = new Point(x, y);\n if (!this.posList.length) {\n this.posList.push(nextPos);\n return;\n }\n\n this.target.shadowRoot.forEachChildren((g: IGraphic, i) => {\n const pos = this.posList[Math.max(this.posList.length - i - 1, 0)];\n g.setAttributes(\n {\n x: pos.x - x,\n y: pos.y - y\n },\n false\n );\n });\n\n this.posList.push(nextPos);\n }\n}\n\nexport class MotionPath extends ACustomAnimate<any> {\n declare valid: boolean;\n declare pathLength: number;\n declare path: CustomPath2D;\n declare distance: number;\n declare initAngle: number;\n declare changeAngle: boolean;\n declare cb?: (from: any, to: any, ratio: number, target: IGraphic) => void;\n constructor(\n from: any,\n to: any,\n duration: number,\n easing: EasingType,\n params?: {\n path: CustomPath2D;\n distance: number;\n cb?: (from: any, to: any, ratio: number, target: IGraphic) => void;\n initAngle?: number;\n changeAngle?: boolean;\n }\n ) {\n super(from, to, duration, easing, params);\n if (params) {\n this.pathLength = params.path.getLength();\n this.path = params.path;\n this.distance = params.distance;\n this.to = params.distance * this.pathLength;\n this.initAngle = params.initAngle ?? 0;\n this.changeAngle = !!params.changeAngle;\n this.cb = params.cb;\n }\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n // 计算位置\n const at = this.to * ratio;\n const { pos, angle } = this.path.getAttrAt(at);\n out.x = pos.x;\n out.y = pos.y;\n if (this.changeAngle) {\n out.angle = angle + this.initAngle;\n }\n this.cb && this.cb(this.from, this.to, ratio, this.target as IGraphic);\n // out.angle = angle + this.initAngle;\n }\n}\n\nexport class TagPointsUpdate extends ACustomAnimate<{ points: IPointLike[] }> {\n protected fromPoints: IPointLike[];\n protected toPoints: IPointLike[];\n protected points: IPointLike[];\n protected interpolatePoints: [IPointLike, IPointLike][];\n protected newPointAnimateType: 'grow' | 'appear';\n\n constructor(\n from: any,\n to: any,\n duration: number,\n easing: EasingType,\n params?: { newPointAnimateType?: 'grow' | 'appear' }\n ) {\n super(from, to, duration, easing, params);\n this.newPointAnimateType = params?.newPointAnimateType === 'appear' ? 'appear' : 'grow';\n }\n\n onBind(): void {\n const originFromPoints = this.from?.points;\n const originToPoints = this.to?.points;\n this.fromPoints = !originFromPoints ? [] : !Array.isArray(originFromPoints) ? [originFromPoints] : originFromPoints;\n this.toPoints = !originToPoints ? [] : !Array.isArray(originToPoints) ? [originToPoints] : originToPoints;\n\n const tagMap = new Map<string, IPointLike>();\n this.fromPoints.forEach(point => {\n if (point.context) {\n tagMap.set(point.context, point);\n }\n });\n let firstMatchedIndex = Infinity;\n let lastMatchedIndex = -Infinity;\n let firstMatchedPoint: IPointLike;\n let lastMatchedPoint: IPointLike;\n for (let i = 0; i < this.toPoints.length; i += 1) {\n if (tagMap.has(this.toPoints[i].context)) {\n firstMatchedIndex = i;\n firstMatchedPoint = tagMap.get(this.toPoints[i].context);\n break;\n }\n }\n for (let i = this.toPoints.length - 1; i >= 0; i -= 1) {\n if (tagMap.has(this.toPoints[i].context)) {\n lastMatchedIndex = i;\n lastMatchedPoint = tagMap.get(this.toPoints[i].context);\n break;\n }\n }\n // TODO: shrink removed points\n // if no point is matched, animation should start from toPoint[0]\n let prevMatchedPoint = this.toPoints[0];\n this.interpolatePoints = this.toPoints.map((point, index) => {\n const matchedPoint = tagMap.get(point.context);\n if (matchedPoint) {\n prevMatchedPoint = matchedPoint;\n return [matchedPoint, point];\n }\n // appear new point\n if (this.newPointAnimateType === 'appear') {\n return [point, point];\n }\n // grow new point\n if (index < firstMatchedIndex && firstMatchedPoint) {\n return [firstMatchedPoint, point];\n } else if (index > lastMatchedIndex && lastMatchedPoint) {\n return [lastMatchedPoint, point];\n }\n return [prevMatchedPoint, point];\n });\n this.points = this.interpolatePoints.map(interpolate => {\n const fromPoint = interpolate[0];\n const toPoint = interpolate[1];\n const newPoint = new Point(fromPoint.x, fromPoint.y, fromPoint.x1, fromPoint.y1);\n newPoint.defined = toPoint.defined;\n newPoint.context = toPoint.context;\n return newPoint;\n });\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n // if not create new points, multi points animation might not work well.\n this.points = this.points.map((point, index) => {\n const newPoint = pointInterpolation(this.interpolatePoints[index][0], this.interpolatePoints[index][1], ratio);\n newPoint.context = point.context;\n return newPoint;\n });\n out.points = this.points;\n }\n}\n\nexport class GraphicAnimate extends ACustomAnimate<any> {\n graphic: IGraphic;\n\n constructor(from: any, to: any, duration: number, easing: EasingType, params?: { graphic: IGraphic }) {\n super(from, to, duration, easing, params);\n this.graphic = params?.graphic;\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n if (!this.graphic) {\n return;\n }\n Object.keys(this.from).forEach(k => {\n out[k] = this.from[k] + (this.to[k] - this.from[k]) * ratio;\n });\n }\n}\n\nexport class ClipGraphicAnimate extends ACustomAnimate<any> {\n private _group?: IGroup;\n private _clipGraphic?: IGraphic;\n protected clipFromAttribute?: any;\n protected clipToAttribute?: any;\n\n private _lastClip?: boolean;\n private _lastPath?: IGraphic[];\n\n constructor(\n from: any,\n to: any,\n duration: number,\n easing: EasingType,\n params: { group: IGroup; clipGraphic: IGraphic }\n ) {\n super(null, null, duration, easing, params);\n this.clipFromAttribute = from;\n this.clipToAttribute = to;\n this._group = params?.group;\n this._clipGraphic = params?.clipGraphic;\n }\n\n onBind() {\n if (this._group && this._clipGraphic) {\n this._lastClip = this._group.attribute.clip;\n this._lastPath = this._group.attribute.path;\n this._group.setAttributes(\n {\n clip: true,\n path: [this._clipGraphic]\n },\n false,\n { type: AttributeUpdateType.ANIMATE_BIND }\n );\n }\n }\n\n onEnd() {\n if (this._group) {\n this._group.setAttributes(\n {\n clip: this._lastClip,\n path: this._lastPath\n },\n false,\n { type: AttributeUpdateType.ANIMATE_END }\n );\n }\n return;\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n if (!this._clipGraphic) {\n return;\n }\n const res: any = {};\n Object.keys(this.clipFromAttribute).forEach(k => {\n res[k] = this.clipFromAttribute[k] + (this.clipToAttribute[k] - this.clipFromAttribute[k]) * ratio;\n });\n this._clipGraphic.setAttributes(res, false, {\n type: AttributeUpdateType.ANIMATE_UPDATE,\n animationState: { ratio, end }\n });\n }\n}\n\nexport class ClipAngleAnimate extends ClipGraphicAnimate {\n constructor(\n from: any,\n to: any,\n duration: number,\n easing: EasingType,\n params: {\n group: IGroup;\n center?: { x: number; y: number };\n startAngle?: number;\n radius?: number;\n orient?: 'clockwise' | 'anticlockwise';\n animationType?: 'in' | 'out';\n }\n ) {\n const groupAttribute = params?.group?.attribute ?? {};\n const width = groupAttribute.width ?? 0;\n const height = groupAttribute.height ?? 0;\n\n const animationType = params?.animationType ?? 'in';\n const startAngle = params?.startAngle ?? 0;\n const orient = params?.orient ?? 'clockwise';\n\n let arcStartAngle = 0;\n let arcEndAngle = 0;\n if (orient === 'anticlockwise') {\n arcEndAngle = animationType === 'in' ? startAngle + Math.PI * 2 : startAngle;\n arcEndAngle = startAngle + Math.PI * 2;\n } else {\n arcStartAngle = startAngle;\n arcEndAngle = animationType === 'out' ? startAngle + Math.PI * 2 : startAngle;\n }\n const arc = application.graphicService.creator.arc({\n x: params?.center?.x ?? width / 2,\n y: params?.center?.y ?? height / 2,\n outerRadius: params?.radius ?? (width + height) / 2,\n innerRadius: 0,\n startAngle: arcStartAngle,\n endAngle: arcEndAngle,\n fill: true\n });\n let fromAttributes: Partial<IArcGraphicAttribute>;\n let toAttributes: Partial<IArcGraphicAttribute>;\n if (orient === 'anticlockwise') {\n fromAttributes = { startAngle: startAngle + Math.PI * 2 };\n toAttributes = { startAngle: startAngle };\n } else {\n fromAttributes = { endAngle: startAngle };\n toAttributes = { endAngle: startAngle + Math.PI * 2 };\n }\n super(\n animationType === 'in' ? fromAttributes : toAttributes,\n animationType === 'in' ? toAttributes : fromAttributes,\n duration,\n easing,\n { group: params?.group, clipGraphic: arc }\n );\n }\n}\n\nexport class ClipRadiusAnimate extends ClipGraphicAnimate {\n constructor(\n from: any,\n to: any,\n duration: number,\n easing: EasingType,\n params: {\n group: IGroup;\n center?: { x: number; y: number };\n startRadius?: number;\n endRadius?: number;\n animationType?: 'in' | 'out';\n }\n ) {\n const groupAttribute = params?.group?.attribute ?? {};\n const width = groupAttribute.width ?? 0;\n const height = groupAttribute.height ?? 0;\n\n const animationType = params?.animationType ?? 'in';\n const startRadius = params?.startRadius ?? 0;\n const endRadius = params?.endRadius ?? Math.sqrt((width / 2) ** 2 + (height / 2) ** 2);\n\n const arc = application.graphicService.creator.arc({\n x: params?.center?.x ?? width / 2,\n y: params?.center?.y ?? height / 2,\n outerRadius: animationType === 'out' ? endRadius : startRadius,\n innerRadius: 0,\n startAngle: 0,\n endAngle: Math.PI * 2,\n fill: true\n });\n const fromAttributes: Partial<IArcGraphicAttribute> = { outerRadius: startRadius };\n const toAttributes: Partial<IArcGraphicAttribute> = { outerRadius: endRadius };\n super(\n animationType === 'in' ? fromAttributes : toAttributes,\n animationType === 'in' ? toAttributes : fromAttributes,\n duration,\n easing,\n { group: params?.group, clipGraphic: arc }\n );\n }\n}\n\nexport class ClipDirectionAnimate extends ClipGraphicAnimate {\n constructor(\n from: any,\n to: any,\n duration: number,\n easing: EasingType,\n params: {\n group: IGroup;\n direction?: 'x' | 'y';\n orient?: 'positive' | 'negative';\n width?: number;\n height?: number;\n animationType?: 'in' | 'out';\n }\n ) {\n const groupAttribute = params?.group?.attribute ?? {};\n const width = params?.width ?? groupAttribute.width ?? 0;\n const height = params?.height ?? groupAttribute.height ?? 0;\n\n const animationType = params?.animationType ?? 'in';\n const direction = params?.direction ?? 'x';\n const orient = params?.orient ?? 'positive';\n\n const rect = application.graphicService.creator.rect({\n x: 0,\n y: 0,\n width: animationType === 'in' && direction === 'x' ? 0 : width,\n height: animationType === 'in' && direction === 'y' ? 0 : height,\n fill: true\n });\n let fromAttributes: Partial<IRectGraphicAttribute> = {};\n let toAttributes: Partial<IRectGraphicAttribute> = {};\n if (direction === 'y') {\n if (orient === 'negative') {\n fromAttributes = { y: height, height: 0 };\n toAttributes = { y: 0, height: height };\n } else {\n fromAttributes = { height: 0 };\n toAttributes = { height: height };\n }\n } else {\n if (orient === 'negative') {\n fromAttributes = { x: width, width: 0 };\n toAttributes = { x: 0, width: width };\n } else {\n fromAttributes = { width: 0 };\n toAttributes = { width: width };\n }\n }\n super(\n animationType === 'in' ? fromAttributes : toAttributes,\n animationType === 'in' ? toAttributes : fromAttributes,\n duration,\n easing,\n { group: params?.group, clipGraphic: rect }\n );\n }\n}\n\ntype RotateSphereParams =\n | {\n center: { x: number; y: number; z: number };\n r: number;\n }\n | (() => any);\n\nexport class RotateBySphereAnimate extends ACustomAnimate<any> {\n declare params: RotateSphereParams;\n declare theta: number;\n declare phi: number;\n\n onStart(): void {\n const { center, r } = typeof this.params === 'function' ? this.params() : this.params;\n const startX = this.target.getComputedAttribute('x');\n const startY = this.target.getComputedAttribute('y');\n const startZ = this.target.getComputedAttribute('z');\n const phi = Math.acos((startY - center.y) / r);\n let theta = Math.acos((startX - center.x) / r / Math.sin(phi));\n if (startZ - center.z < 0) {\n theta = pi2 - theta;\n }\n this.theta = theta;\n this.phi = phi;\n }\n\n onBind() {\n return;\n }\n\n onEnd() {\n return;\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n if (this.phi == null || this.theta == null) {\n return;\n }\n const { center, r } = typeof this.params === 'function' ? this.params() : this.params;\n const deltaAngle = Math.PI * 2 * ratio;\n const theta = this.theta + deltaAngle;\n const phi = this.phi;\n const x = r * Math.sin(phi) * Math.cos(theta) + center.x;\n const y = r * Math.cos(phi) + center.y;\n const z = r * Math.sin(phi) * Math.sin(theta) + center.z;\n out.x = x;\n out.y = y;\n out.z = z;\n // out.beta = phi;\n out.alpha = theta + pi / 2;\n while (out.alpha > pi2) {\n out.alpha -= pi2;\n }\n out.alpha = pi2 - out.alpha;\n\n out.zIndex = out.z * -10000;\n }\n}\n\nexport class GroupFadeIn extends ACustomAnimate<any> {\n declare target: IGroup;\n\n getEndProps(): Record<string, any> {\n return {};\n }\n\n onBind(): void {\n this.target.setTheme({\n common: {\n opacity: 0\n }\n });\n return;\n }\n\n onEnd(): void {\n this.target.setTheme({\n common: {\n opacity: 1\n }\n });\n return;\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n this.target.setTheme({\n common: {\n opacity: ratio\n }\n });\n }\n}\n\nexport class GroupFadeOut extends ACustomAnimate<any> {\n declare target: IGroup;\n\n getEndProps(): Record<string, any> {\n return {};\n }\n\n onBind(): void {\n this.target.setTheme({\n common: {\n opacity: 1\n }\n });\n return;\n }\n\n onEnd(): void {\n this.target.setTheme({\n common: {\n opacity: 0\n }\n });\n return;\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n this.target.setTheme({\n common: {\n opacity: 1 - ratio\n }\n });\n }\n}\n\nexport class AttributeAnimate extends ACustomAnimate<any> {\n declare target: IGroup;\n\n constructor(to: Record<string, any>, duration: number, easing: EasingType) {\n super({}, to, duration, easing);\n }\n\n getEndProps(): Record<string, any> {\n return this.to;\n }\n\n onBind(): void {\n Object.keys(this.to).forEach(k => {\n this.from[k] = this.target.getComputedAttribute(k);\n });\n return;\n }\n\n onEnd(): void {\n return;\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n this.target.stepInterpolate(\n this.subAnimate,\n this.subAnimate.animate,\n out,\n this.step,\n ratio,\n end,\n this.to,\n this.from\n );\n }\n}\n\nexport class AnimateGroup extends ACustomAnimate<any> {\n declare customAnimates: ACustomAnimate<any>[];\n declare updating: boolean;\n\n constructor(duration: number, customAnimates: ACustomAnimate<any>[]) {\n super(null, null, duration, 'linear');\n this.customAnimates = customAnimates;\n }\n\n initAnimates() {\n this.customAnimates.forEach(a => {\n a.step = this.step;\n a.subAnimate = this.subAnimate;\n a.target = this.target;\n });\n }\n\n getEndProps(): Record<string, any> {\n const props = {};\n this.customAnimates.forEach(a => {\n Object.assign(props, a.getEndProps());\n });\n return props;\n }\n\n onBind(): void {\n this.initAnimates();\n this.customAnimates.forEach(a => {\n a.onBind();\n });\n return;\n }\n\n onEnd(): void {\n this.customAnimates.forEach(a => {\n a.onEnd();\n });\n return;\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n if (this.updating) {\n return;\n }\n this.updating = true;\n this.customAnimates.forEach(a => {\n const easing = a.easing;\n const easingFunc = typeof easing === 'string' ? Easing[easing] : easing;\n ratio = easingFunc(ratio);\n a.onUpdate(end, ratio, out);\n });\n this.updating = false;\n return;\n }\n}\n\nexport class AnimateGroup1 extends ACustomAnimate<any> {\n declare customAnimates: ACustomAnimate<any>[];\n declare updating: boolean;\n\n constructor(duration: number, customAnimates: ACustomAnimate<any>[]) {\n super(null, null, duration, 'linear');\n this.customAnimates = customAnimates;\n }\n\n initAnimates() {\n this.customAnimates.forEach(a => {\n a.step = this.step;\n a.subAnimate = this.subAnimate;\n a.target = this.target;\n });\n }\n\n getEndProps(): Record<string, any> {\n const props = {};\n this.customAnimates.forEach(a => {\n Object.assign(props, a.getEndProps());\n });\n return props;\n }\n\n onBind(): void {\n this.initAnimates();\n this.customAnimates.forEach(a => {\n a.onBind();\n });\n return;\n }\n\n onEnd(): void {\n this.customAnimates.forEach(a => {\n a.onEnd();\n });\n return;\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n if (this.updating) {\n return;\n }\n this.updating = true;\n this.customAnimates.forEach(a => {\n const easing = a.easing;\n const easingFunc = typeof easing === 'string' ? Easing[easing] : easing;\n ratio = easingFunc(ratio);\n a.onUpdate(end, ratio, out);\n });\n this.updating = false;\n return;\n }\n}\n"]}
1
+ {"version":3,"sources":["../../src/animate/custom-animate.ts"],"names":[],"mappings":";;;AACA,6CAAqE;AACr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,CAAC;QACH,OAAO;IACT,CAAC;IAED,KAAK;QACH,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;YAC9B,CAAC,CAAC,KAAK,EAAE,CAAC;QACZ,CAAC,CAAC,CAAC;QACH,OAAO;IACT,CAAC;IAED,QAAQ,CAAC,GAAY,EAAE,KAAa,EAAE,GAAwB;QAC5D,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,OAAO;SACR;QACD,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QACrB,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;YAC9B,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC;YACxB,MAAM,UAAU,GAAG,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,eAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;YACxE,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;YAC1B,CAAC,CAAC,QAAQ,CAAC,GAAG,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC;QAC9B,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;QACtB,OAAO;IACT,CAAC;CACF;AAtDD,sCAsDC","file":"custom-animate.js","sourcesContent":["import type { IPoint, IPointLike } from '@visactor/vutils';\nimport { isArray, isNumber, pi, pi2, Point } from '@visactor/vutils';\nimport { application } from '../application';\nimport { AttributeUpdateType } from '../common/enums';\nimport type { CustomPath2D } from '../common/custom-path2d';\nimport type {\n EasingType,\n IArcGraphicAttribute,\n IGraphic,\n IGroup,\n ILinearGradient,\n IRect,\n IRectAttribute,\n IRectGraphicAttribute,\n IShadowRoot\n} from '../interface';\nimport { ACustomAnimate } from './animate';\nimport { Easing } from './easing';\nimport { pointInterpolation } from '../common/utils';\n\nexport class IncreaseCount extends ACustomAnimate<{ text: string | number }> {\n declare valid: boolean;\n\n private fromNumber: number;\n private toNumber: number;\n\n constructor(\n from: { text: string | number },\n to: { text: string | number },\n duration: number,\n easing: EasingType,\n params?: { fixed?: boolean }\n ) {\n super(from, to, duration, easing, params);\n }\n\n getEndProps(): Record<string, any> | void {\n if (this.valid === false) {\n return {};\n }\n return {\n text: this.to\n };\n }\n\n onBind(): void {\n this.fromNumber = isNumber(this.from?.text) ? this.from?.text : Number.parseFloat(this.from?.text);\n this.toNumber = isNumber(this.to?.text) ? this.to?.text : Number.parseFloat(this.to?.text);\n if (!Number.isFinite(this.toNumber)) {\n this.fromNumber = 0;\n }\n if (!Number.isFinite(this.toNumber)) {\n this.valid = false;\n }\n }\n\n onEnd(): void {\n return;\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n if (this.valid === false) {\n return;\n }\n if (end) {\n out.text = this.toNumber.toFixed();\n } else {\n out.text = (this.fromNumber + (this.toNumber - this.fromNumber) * ratio).toFixed(this.params?.fixed ?? 0);\n }\n }\n}\n\nenum Direction {\n LEFT_TO_RIGHT = 0,\n RIGHT_TO_LEFT = 1,\n TOP_TO_BOTTOM = 2,\n BOTTOM_TO_TOP = 3,\n STROKE = 4\n}\nexport class FadeInPlus extends ACustomAnimate<any> {\n declare direction: number;\n declare toFill: string;\n declare toStroke: string;\n declare fillGradient: ILinearGradient;\n declare strokeGradient: ILinearGradient;\n declare fill: boolean;\n declare stroke: boolean;\n constructor(\n from: any,\n to: any,\n duration: number,\n easing: EasingType,\n params?: { direction?: number; fill?: boolean; stroke?: boolean }\n ) {\n super(from, to, duration, easing, params);\n const { direction = Direction.LEFT_TO_RIGHT, fill = true, stroke = true } = params || {};\n this.direction = direction;\n this.fill = fill;\n this.stroke = stroke;\n this.fillGradient = {\n gradient: 'linear',\n stops: []\n };\n this.strokeGradient = {\n gradient: 'linear',\n stops: []\n };\n }\n\n getEndProps(): Record<string, any> {\n return {\n fill: this.toFill,\n stroke: this.toStroke\n };\n }\n\n onBind(): void {\n // this.to = parseFloat(this.target.getAnimatePropByName('text'));\n this.toFill = this.target.getComputedAttribute('fill');\n this.toStroke = this.target.getComputedAttribute('stroke');\n }\n\n onEnd(): void {\n return;\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n if (!this.toFill) {\n return;\n }\n if (!this.toStroke) {\n return;\n }\n switch (this.direction) {\n case Direction.RIGHT_TO_LEFT:\n this.rightToLeft(end, ratio, out);\n break;\n case Direction.TOP_TO_BOTTOM:\n this.topToBottom(end, ratio, out);\n break;\n case Direction.BOTTOM_TO_TOP:\n this.bottomToTop(end, ratio, out);\n break;\n case Direction.STROKE:\n this.strokePath(end, ratio, out);\n break;\n default:\n this.leftToRight(end, ratio, out);\n break;\n }\n }\n\n leftToRight(end: boolean, ratio: number, out: Record<string, any>) {\n if (this.fill) {\n const toFillColor = this.toFill;\n this.fillGradient.x0 = 0;\n this.fillGradient.y0 = 0;\n this.fillGradient.x1 = 1;\n this.fillGradient.y1 = 0;\n this.fillGradient.stops = [\n { offset: 0, color: toFillColor },\n { offset: ratio, color: toFillColor },\n { offset: Math.min(1, ratio * 2), color: 'transparent' }\n ];\n out.fill = this.fillGradient;\n }\n if (this.stroke) {\n const toStrokeColor = this.toStroke;\n this.strokeGradient.x0 = 0;\n this.strokeGradient.y0 = 0;\n this.strokeGradient.x1 = 1;\n this.strokeGradient.y1 = 0;\n this.strokeGradient.stops = [\n { offset: 0, color: toStrokeColor },\n { offset: ratio, color: toStrokeColor },\n { offset: Math.min(1, ratio * 6), color: 'transparent' }\n ];\n out.stroke = this.strokeGradient;\n // const dashLen = 300;\n // const offset = ratio * dashLen;\n // out.lineDash = [offset, dashLen - offset];\n }\n return;\n }\n\n strokePath(end: boolean, ratio: number, out: Record<string, any>) {\n if (this.fill) {\n const toFillColor = this.toFill;\n this.fillGradient.x0 = 0;\n this.fillGradient.y0 = 0;\n this.fillGradient.x1 = 1;\n this.fillGradient.y1 = 0;\n this.fillGradient.stops = [\n { offset: 0, color: toFillColor },\n { offset: ratio, color: toFillColor },\n { offset: Math.min(1, ratio * 2), color: 'transparent' }\n ];\n out.fill = this.fillGradient;\n }\n if (this.stroke) {\n const dashLen = 300;\n const offset = ratio * dashLen;\n out.lineDash = [offset, dashLen - offset];\n }\n return;\n }\n rightToLeft(end: boolean, ratio: number, out: Record<string, any>) {\n return;\n }\n topToBottom(end: boolean, ratio: number, out: Record<string, any>) {\n return;\n }\n bottomToTop(end: boolean, ratio: number, out: Record<string, any>) {\n return;\n }\n}\n\nexport class InputText extends ACustomAnimate<{ text: string }> {\n declare valid: boolean;\n declare target: IGraphic;\n\n private fromText: string = '';\n private toText: string = '';\n\n getEndProps(): Record<string, any> {\n if (this.valid === false) {\n return {};\n }\n return {\n text: this.to\n };\n }\n\n onBind(): void {\n this.fromText = this.from?.text ?? '';\n this.toText = this.to?.text ?? '';\n if (!this.toText || isArray(this.toText)) {\n this.valid = false;\n } else {\n this.toText = this.toText.toString();\n const root = this.target.attachShadow();\n const line = application.graphicService.creator.line({\n x: 0,\n y: 0,\n points: [\n { x: 0, y: 0 },\n { x: 0, y: this.target.getComputedAttribute('fontSize') }\n ],\n stroke: 'black',\n lineWidth: 1\n });\n root.add(line);\n }\n }\n\n onEnd(): void {\n this.target.detachShadow();\n return;\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n if (this.valid === false) {\n return;\n }\n // update text\n const fromCount = this.fromText.length;\n const toCount = this.toText.length;\n const count = Math.ceil(fromCount + (toCount - fromCount) * ratio);\n\n out.text = this.toText.substr(0, count);\n\n // update line position\n const line = this.target.shadowRoot?.at(0) as IGraphic;\n const endX = (this.target as any).clipedWidth + 2;\n line.setAttribute('x', endX);\n }\n}\n\nexport class StreamLight extends ACustomAnimate<any> {\n declare valid: boolean;\n declare target: IGraphic;\n\n declare rect: IRect;\n constructor(\n from: any,\n to: any,\n duration: number,\n easing: EasingType,\n params?: { attribute?: Partial<IRectAttribute>; streamLength?: number }\n ) {\n super(from, to, duration, easing, params);\n }\n\n getEndProps(): Record<string, any> {\n return {};\n }\n\n onStart(): void {\n const root = this.target.attachShadow();\n\n const height = this.target.AABBBounds.height();\n\n const rect = application.graphicService.creator.rect({\n height: height,\n fill: '#bcdeff',\n shadowBlur: 30,\n shadowColor: '#bcdeff',\n ...this.params?.attribute,\n x: 0,\n y: 0,\n width: 0\n });\n this.rect = rect;\n root.add(rect);\n }\n\n onBind(): void {\n return;\n }\n\n onEnd(): void {\n this.target.detachShadow();\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n const parentWidth = (this.target as any).attribute.width ?? 250;\n const streamLength = this.params?.streamLength ?? parentWidth;\n const maxLength = this.params?.attribute?.width ?? 60;\n const startX = -maxLength;\n const currentX = startX + (streamLength - startX) * ratio;\n const x = Math.max(currentX, 0);\n const w = Math.min(Math.min(currentX + maxLength, maxLength), streamLength - currentX);\n const width = w + x > parentWidth ? Math.max(parentWidth - x, 0) : w;\n this.rect.setAttributes(\n {\n x,\n width\n } as any,\n false,\n {\n type: AttributeUpdateType.ANIMATE_PLAY,\n animationState: {\n ratio,\n end\n }\n }\n );\n }\n}\n\nexport class Meteor extends ACustomAnimate<any> {\n declare size: number;\n declare target: IGraphic;\n declare root: IShadowRoot;\n declare posList: IPoint[];\n\n get lastPos(): IPoint {\n return this.posList[this.posList.length - 1];\n }\n\n constructor(size: number, duration: number, easing: EasingType, params?: any) {\n super(null, null, duration, easing, params);\n this.size = size;\n this.posList = [];\n }\n\n onBind(): void {\n const root = this.target.attachShadow();\n this.root = root;\n for (let i = 0; i < this.size; i++) {\n const g = this.target.clone();\n const scale = Math.min(((this.size - i) / this.size) * 3, 1);\n const opacity = Math.min(0.2 + 0.7 / this.size);\n g.setAttributes({ x: 0, y: 0, dx: 0, dy: 0, scaleX: scale, scaleY: scale, opacity }, false, {\n type: AttributeUpdateType.ANIMATE_BIND\n });\n root.add(g);\n }\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n if (end) {\n this.target.detachShadow();\n this.posList.length = 0;\n return;\n }\n\n const x = this.target.getComputedAttribute('x');\n const y = this.target.getComputedAttribute('y');\n\n const nextPos = new Point(x, y);\n if (!this.posList.length) {\n this.posList.push(nextPos);\n return;\n }\n\n this.target.shadowRoot.forEachChildren((g: IGraphic, i) => {\n const pos = this.posList[Math.max(this.posList.length - i - 1, 0)];\n g.setAttributes(\n {\n x: pos.x - x,\n y: pos.y - y\n },\n false\n );\n });\n\n this.posList.push(nextPos);\n }\n}\n\nexport class MotionPath extends ACustomAnimate<any> {\n declare valid: boolean;\n declare pathLength: number;\n declare path: CustomPath2D;\n declare distance: number;\n declare initAngle: number;\n declare changeAngle: boolean;\n declare cb?: (from: any, to: any, ratio: number, target: IGraphic) => void;\n constructor(\n from: any,\n to: any,\n duration: number,\n easing: EasingType,\n params?: {\n path: CustomPath2D;\n distance: number;\n cb?: (from: any, to: any, ratio: number, target: IGraphic) => void;\n initAngle?: number;\n changeAngle?: boolean;\n }\n ) {\n super(from, to, duration, easing, params);\n if (params) {\n this.pathLength = params.path.getLength();\n this.path = params.path;\n this.distance = params.distance;\n this.to = params.distance * this.pathLength;\n this.initAngle = params.initAngle ?? 0;\n this.changeAngle = !!params.changeAngle;\n this.cb = params.cb;\n }\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n // 计算位置\n const at = this.to * ratio;\n const { pos, angle } = this.path.getAttrAt(at);\n out.x = pos.x;\n out.y = pos.y;\n if (this.changeAngle) {\n out.angle = angle + this.initAngle;\n }\n this.cb && this.cb(this.from, this.to, ratio, this.target as IGraphic);\n // out.angle = angle + this.initAngle;\n }\n}\n\nexport class TagPointsUpdate extends ACustomAnimate<{ points: IPointLike[] }> {\n protected fromPoints: IPointLike[];\n protected toPoints: IPointLike[];\n protected points: IPointLike[];\n protected interpolatePoints: [IPointLike, IPointLike][];\n protected newPointAnimateType: 'grow' | 'appear';\n\n constructor(\n from: any,\n to: any,\n duration: number,\n easing: EasingType,\n params?: { newPointAnimateType?: 'grow' | 'appear' }\n ) {\n super(from, to, duration, easing, params);\n this.newPointAnimateType = params?.newPointAnimateType === 'appear' ? 'appear' : 'grow';\n }\n\n onBind(): void {\n const originFromPoints = this.from?.points;\n const originToPoints = this.to?.points;\n this.fromPoints = !originFromPoints ? [] : !Array.isArray(originFromPoints) ? [originFromPoints] : originFromPoints;\n this.toPoints = !originToPoints ? [] : !Array.isArray(originToPoints) ? [originToPoints] : originToPoints;\n\n const tagMap = new Map<string, IPointLike>();\n this.fromPoints.forEach(point => {\n if (point.context) {\n tagMap.set(point.context, point);\n }\n });\n let firstMatchedIndex = Infinity;\n let lastMatchedIndex = -Infinity;\n let firstMatchedPoint: IPointLike;\n let lastMatchedPoint: IPointLike;\n for (let i = 0; i < this.toPoints.length; i += 1) {\n if (tagMap.has(this.toPoints[i].context)) {\n firstMatchedIndex = i;\n firstMatchedPoint = tagMap.get(this.toPoints[i].context);\n break;\n }\n }\n for (let i = this.toPoints.length - 1; i >= 0; i -= 1) {\n if (tagMap.has(this.toPoints[i].context)) {\n lastMatchedIndex = i;\n lastMatchedPoint = tagMap.get(this.toPoints[i].context);\n break;\n }\n }\n // TODO: shrink removed points\n // if no point is matched, animation should start from toPoint[0]\n let prevMatchedPoint = this.toPoints[0];\n this.interpolatePoints = this.toPoints.map((point, index) => {\n const matchedPoint = tagMap.get(point.context);\n if (matchedPoint) {\n prevMatchedPoint = matchedPoint;\n return [matchedPoint, point];\n }\n // appear new point\n if (this.newPointAnimateType === 'appear') {\n return [point, point];\n }\n // grow new point\n if (index < firstMatchedIndex && firstMatchedPoint) {\n return [firstMatchedPoint, point];\n } else if (index > lastMatchedIndex && lastMatchedPoint) {\n return [lastMatchedPoint, point];\n }\n return [prevMatchedPoint, point];\n });\n this.points = this.interpolatePoints.map(interpolate => {\n const fromPoint = interpolate[0];\n const toPoint = interpolate[1];\n const newPoint = new Point(fromPoint.x, fromPoint.y, fromPoint.x1, fromPoint.y1);\n newPoint.defined = toPoint.defined;\n newPoint.context = toPoint.context;\n return newPoint;\n });\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n // if not create new points, multi points animation might not work well.\n this.points = this.points.map((point, index) => {\n const newPoint = pointInterpolation(this.interpolatePoints[index][0], this.interpolatePoints[index][1], ratio);\n newPoint.context = point.context;\n return newPoint;\n });\n out.points = this.points;\n }\n}\n\nexport class GraphicAnimate extends ACustomAnimate<any> {\n graphic: IGraphic;\n\n constructor(from: any, to: any, duration: number, easing: EasingType, params?: { graphic: IGraphic }) {\n super(from, to, duration, easing, params);\n this.graphic = params?.graphic;\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n if (!this.graphic) {\n return;\n }\n Object.keys(this.from).forEach(k => {\n out[k] = this.from[k] + (this.to[k] - this.from[k]) * ratio;\n });\n }\n}\n\nexport class ClipGraphicAnimate extends ACustomAnimate<any> {\n private _group?: IGroup;\n private _clipGraphic?: IGraphic;\n protected clipFromAttribute?: any;\n protected clipToAttribute?: any;\n\n private _lastClip?: boolean;\n private _lastPath?: IGraphic[];\n\n constructor(\n from: any,\n to: any,\n duration: number,\n easing: EasingType,\n params: { group: IGroup; clipGraphic: IGraphic }\n ) {\n super(null, null, duration, easing, params);\n this.clipFromAttribute = from;\n this.clipToAttribute = to;\n this._group = params?.group;\n this._clipGraphic = params?.clipGraphic;\n }\n\n onBind() {\n if (this._group && this._clipGraphic) {\n this._lastClip = this._group.attribute.clip;\n this._lastPath = this._group.attribute.path;\n this._group.setAttributes(\n {\n clip: true,\n path: [this._clipGraphic]\n },\n false,\n { type: AttributeUpdateType.ANIMATE_BIND }\n );\n }\n }\n\n onEnd() {\n if (this._group) {\n this._group.setAttributes(\n {\n clip: this._lastClip,\n path: this._lastPath\n },\n false,\n { type: AttributeUpdateType.ANIMATE_END }\n );\n }\n return;\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n if (!this._clipGraphic) {\n return;\n }\n const res: any = {};\n Object.keys(this.clipFromAttribute).forEach(k => {\n res[k] = this.clipFromAttribute[k] + (this.clipToAttribute[k] - this.clipFromAttribute[k]) * ratio;\n });\n this._clipGraphic.setAttributes(res, false, {\n type: AttributeUpdateType.ANIMATE_UPDATE,\n animationState: { ratio, end }\n });\n }\n}\n\nexport class ClipAngleAnimate extends ClipGraphicAnimate {\n constructor(\n from: any,\n to: any,\n duration: number,\n easing: EasingType,\n params: {\n group: IGroup;\n center?: { x: number; y: number };\n startAngle?: number;\n radius?: number;\n orient?: 'clockwise' | 'anticlockwise';\n animationType?: 'in' | 'out';\n }\n ) {\n const groupAttribute = params?.group?.attribute ?? {};\n const width = groupAttribute.width ?? 0;\n const height = groupAttribute.height ?? 0;\n\n const animationType = params?.animationType ?? 'in';\n const startAngle = params?.startAngle ?? 0;\n const orient = params?.orient ?? 'clockwise';\n\n let arcStartAngle = 0;\n let arcEndAngle = 0;\n if (orient === 'anticlockwise') {\n arcEndAngle = animationType === 'in' ? startAngle + Math.PI * 2 : startAngle;\n arcEndAngle = startAngle + Math.PI * 2;\n } else {\n arcStartAngle = startAngle;\n arcEndAngle = animationType === 'out' ? startAngle + Math.PI * 2 : startAngle;\n }\n const arc = application.graphicService.creator.arc({\n x: params?.center?.x ?? width / 2,\n y: params?.center?.y ?? height / 2,\n outerRadius: params?.radius ?? (width + height) / 2,\n innerRadius: 0,\n startAngle: arcStartAngle,\n endAngle: arcEndAngle,\n fill: true\n });\n let fromAttributes: Partial<IArcGraphicAttribute>;\n let toAttributes: Partial<IArcGraphicAttribute>;\n if (orient === 'anticlockwise') {\n fromAttributes = { startAngle: startAngle + Math.PI * 2 };\n toAttributes = { startAngle: startAngle };\n } else {\n fromAttributes = { endAngle: startAngle };\n toAttributes = { endAngle: startAngle + Math.PI * 2 };\n }\n super(\n animationType === 'in' ? fromAttributes : toAttributes,\n animationType === 'in' ? toAttributes : fromAttributes,\n duration,\n easing,\n { group: params?.group, clipGraphic: arc }\n );\n }\n}\n\nexport class ClipRadiusAnimate extends ClipGraphicAnimate {\n constructor(\n from: any,\n to: any,\n duration: number,\n easing: EasingType,\n params: {\n group: IGroup;\n center?: { x: number; y: number };\n startRadius?: number;\n endRadius?: number;\n animationType?: 'in' | 'out';\n }\n ) {\n const groupAttribute = params?.group?.attribute ?? {};\n const width = groupAttribute.width ?? 0;\n const height = groupAttribute.height ?? 0;\n\n const animationType = params?.animationType ?? 'in';\n const startRadius = params?.startRadius ?? 0;\n const endRadius = params?.endRadius ?? Math.sqrt((width / 2) ** 2 + (height / 2) ** 2);\n\n const arc = application.graphicService.creator.arc({\n x: params?.center?.x ?? width / 2,\n y: params?.center?.y ?? height / 2,\n outerRadius: animationType === 'out' ? endRadius : startRadius,\n innerRadius: 0,\n startAngle: 0,\n endAngle: Math.PI * 2,\n fill: true\n });\n const fromAttributes: Partial<IArcGraphicAttribute> = { outerRadius: startRadius };\n const toAttributes: Partial<IArcGraphicAttribute> = { outerRadius: endRadius };\n super(\n animationType === 'in' ? fromAttributes : toAttributes,\n animationType === 'in' ? toAttributes : fromAttributes,\n duration,\n easing,\n { group: params?.group, clipGraphic: arc }\n );\n }\n}\n\nexport class ClipDirectionAnimate extends ClipGraphicAnimate {\n constructor(\n from: any,\n to: any,\n duration: number,\n easing: EasingType,\n params: {\n group: IGroup;\n direction?: 'x' | 'y';\n orient?: 'positive' | 'negative';\n width?: number;\n height?: number;\n animationType?: 'in' | 'out';\n }\n ) {\n const groupAttribute = params?.group?.attribute ?? {};\n const width = params?.width ?? groupAttribute.width ?? 0;\n const height = params?.height ?? groupAttribute.height ?? 0;\n\n const animationType = params?.animationType ?? 'in';\n const direction = params?.direction ?? 'x';\n const orient = params?.orient ?? 'positive';\n\n const rect = application.graphicService.creator.rect({\n x: 0,\n y: 0,\n width: animationType === 'in' && direction === 'x' ? 0 : width,\n height: animationType === 'in' && direction === 'y' ? 0 : height,\n fill: true\n });\n let fromAttributes: Partial<IRectGraphicAttribute> = {};\n let toAttributes: Partial<IRectGraphicAttribute> = {};\n if (direction === 'y') {\n if (orient === 'negative') {\n fromAttributes = { y: height, height: 0 };\n toAttributes = { y: 0, height: height };\n } else {\n fromAttributes = { height: 0 };\n toAttributes = { height: height };\n }\n } else {\n if (orient === 'negative') {\n fromAttributes = { x: width, width: 0 };\n toAttributes = { x: 0, width: width };\n } else {\n fromAttributes = { width: 0 };\n toAttributes = { width: width };\n }\n }\n super(\n animationType === 'in' ? fromAttributes : toAttributes,\n animationType === 'in' ? toAttributes : fromAttributes,\n duration,\n easing,\n { group: params?.group, clipGraphic: rect }\n );\n }\n}\n\ntype RotateSphereParams =\n | {\n center: { x: number; y: number; z: number };\n r: number;\n }\n | (() => any);\n\nexport class RotateBySphereAnimate extends ACustomAnimate<any> {\n declare params: RotateSphereParams;\n declare theta: number;\n declare phi: number;\n\n onStart(): void {\n const { center, r } = typeof this.params === 'function' ? this.params() : this.params;\n const startX = this.target.getComputedAttribute('x');\n const startY = this.target.getComputedAttribute('y');\n const startZ = this.target.getComputedAttribute('z');\n const phi = Math.acos((startY - center.y) / r);\n let theta = Math.acos((startX - center.x) / r / Math.sin(phi));\n if (startZ - center.z < 0) {\n theta = pi2 - theta;\n }\n this.theta = theta;\n this.phi = phi;\n }\n\n onBind() {\n return;\n }\n\n onEnd() {\n return;\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n if (this.phi == null || this.theta == null) {\n return;\n }\n const { center, r } = typeof this.params === 'function' ? this.params() : this.params;\n const deltaAngle = Math.PI * 2 * ratio;\n const theta = this.theta + deltaAngle;\n const phi = this.phi;\n const x = r * Math.sin(phi) * Math.cos(theta) + center.x;\n const y = r * Math.cos(phi) + center.y;\n const z = r * Math.sin(phi) * Math.sin(theta) + center.z;\n out.x = x;\n out.y = y;\n out.z = z;\n // out.beta = phi;\n out.alpha = theta + pi / 2;\n while (out.alpha > pi2) {\n out.alpha -= pi2;\n }\n out.alpha = pi2 - out.alpha;\n\n out.zIndex = out.z * -10000;\n }\n}\n\nexport class GroupFadeIn extends ACustomAnimate<any> {\n declare target: IGroup;\n\n getEndProps(): Record<string, any> {\n return {};\n }\n\n onBind(): void {\n this.target.setTheme({\n common: {\n opacity: 0\n }\n });\n return;\n }\n\n onEnd(): void {\n this.target.setTheme({\n common: {\n opacity: 1\n }\n });\n return;\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n this.target.setTheme({\n common: {\n opacity: ratio\n }\n });\n }\n}\n\nexport class GroupFadeOut extends ACustomAnimate<any> {\n declare target: IGroup;\n\n getEndProps(): Record<string, any> {\n return {};\n }\n\n onBind(): void {\n this.target.setTheme({\n common: {\n opacity: 1\n }\n });\n return;\n }\n\n onEnd(): void {\n this.target.setTheme({\n common: {\n opacity: 0\n }\n });\n return;\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n this.target.setTheme({\n common: {\n opacity: 1 - ratio\n }\n });\n }\n}\n\nexport class AttributeAnimate extends ACustomAnimate<any> {\n declare target: IGroup;\n\n constructor(to: Record<string, any>, duration: number, easing: EasingType) {\n super({}, to, duration, easing);\n }\n\n getEndProps(): Record<string, any> {\n return this.to;\n }\n\n onBind(): void {\n Object.keys(this.to).forEach(k => {\n this.from[k] = this.target.getComputedAttribute(k);\n });\n return;\n }\n\n onEnd(): void {\n return;\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n this.target.stepInterpolate(\n this.subAnimate,\n this.subAnimate.animate,\n out,\n this.step,\n ratio,\n end,\n this.to,\n this.from\n );\n }\n}\n\nexport class AnimateGroup extends ACustomAnimate<any> {\n declare customAnimates: ACustomAnimate<any>[];\n declare updating: boolean;\n\n constructor(duration: number, customAnimates: ACustomAnimate<any>[]) {\n super(null, null, duration, 'linear');\n this.customAnimates = customAnimates;\n }\n\n initAnimates() {\n this.customAnimates.forEach(a => {\n a.step = this.step;\n a.subAnimate = this.subAnimate;\n a.target = this.target;\n });\n }\n\n getEndProps(): Record<string, any> {\n const props = {};\n this.customAnimates.forEach(a => {\n Object.assign(props, a.getEndProps());\n });\n return props;\n }\n\n onBind(): void {\n this.initAnimates();\n this.customAnimates.forEach(a => {\n a.onBind();\n });\n return;\n }\n\n onEnd(): void {\n this.customAnimates.forEach(a => {\n a.onEnd();\n });\n return;\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n if (this.updating) {\n return;\n }\n this.updating = true;\n this.customAnimates.forEach(a => {\n const easing = a.easing;\n const easingFunc = typeof easing === 'string' ? Easing[easing] : easing;\n ratio = easingFunc(ratio);\n a.onUpdate(end, ratio, out);\n });\n this.updating = false;\n return;\n }\n}\n\nexport class AnimateGroup1 extends ACustomAnimate<any> {\n declare customAnimates: ACustomAnimate<any>[];\n declare updating: boolean;\n\n constructor(duration: number, customAnimates: ACustomAnimate<any>[]) {\n super(null, null, duration, 'linear');\n this.customAnimates = customAnimates;\n }\n\n initAnimates() {\n this.customAnimates.forEach(a => {\n a.step = this.step;\n a.subAnimate = this.subAnimate;\n a.target = this.target;\n });\n }\n\n getEndProps(): Record<string, any> {\n const props = {};\n this.customAnimates.forEach(a => {\n Object.assign(props, a.getEndProps());\n });\n return props;\n }\n\n onBind(): void {\n this.initAnimates();\n this.customAnimates.forEach(a => {\n a.onBind();\n });\n return;\n }\n\n onEnd(): void {\n this.customAnimates.forEach(a => {\n a.onEnd();\n });\n return;\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n if (this.updating) {\n return;\n }\n this.updating = true;\n this.customAnimates.forEach(a => {\n const easing = a.easing;\n const easingFunc = typeof easing === 'string' ? Easing[easing] : easing;\n ratio = easingFunc(ratio);\n a.onUpdate(end, ratio, out);\n });\n this.updating = false;\n return;\n }\n}\n"]}
@@ -24,6 +24,12 @@ export declare class Easing {
24
24
  static backIn: (t: number) => number;
25
25
  static backOut: (t: number) => number;
26
26
  static backInOut: (t: number) => number;
27
+ static sineIn(t: number): number;
28
+ static sineOut(t: number): number;
29
+ static sineInOut(t: number): number;
30
+ static expoIn(t: number): number;
31
+ static expoOut(t: number): number;
32
+ static expoInOut(t: number): number;
27
33
  static circIn(t: number): number;
28
34
  static circOut(t: number): number;
29
35
  static circInOut(t: number): number;
@@ -49,6 +49,24 @@ class Easing {
49
49
  return (t *= 2) < 1 ? t * t * ((amount + 1) * t - amount) * .5 : .5 * ((t -= 2) * t * ((amount + 1) * t + amount) + 2);
50
50
  };
51
51
  }
52
+ static sineIn(t) {
53
+ return 1 - Math.cos(t * Math.PI / 2);
54
+ }
55
+ static sineOut(t) {
56
+ return Math.sin(t * Math.PI / 2);
57
+ }
58
+ static sineInOut(t) {
59
+ return -(Math.cos(Math.PI * t) - 1) / 2;
60
+ }
61
+ static expoIn(t) {
62
+ return 0 === t ? 0 : Math.pow(2, 10 * t - 10);
63
+ }
64
+ static expoOut(t) {
65
+ return 1 === t ? 1 : 1 - Math.pow(2, -10 * t);
66
+ }
67
+ static expoInOut(t) {
68
+ return 0 === t ? 0 : 1 === t ? 1 : t < .5 ? Math.pow(2, 20 * t - 10) / 2 : (2 - Math.pow(2, -20 * t + 10)) / 2;
69
+ }
52
70
  static circIn(t) {
53
71
  return -(Math.sqrt(1 - t * t) - 1);
54
72
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/animate/easing.ts"],"names":[],"mappings":";;;AA0BA,6CAAuC;AAKvC,MAAa,MAAM;IACjB;IAEA,CAAC;IAED,MAAM,CAAC,MAAM,CAAC,CAAS;QACrB,OAAO,CAAC,CAAC;IACX,CAAC;IAED,MAAM,CAAC,IAAI;QACT,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAOD,MAAM,CAAC,GAAG,CAAC,MAAc;QACvB,IAAI,MAAM,GAAG,CAAC,CAAC,EAAE;YACf,MAAM,GAAG,CAAC,CAAC,CAAC;SACb;aAAM,IAAI,MAAM,GAAG,CAAC,EAAE;YACrB,MAAM,GAAG,CAAC,CAAC;SACZ;QAED,OAAO,UAAU,CAAS;YACxB,IAAI,MAAM,KAAK,CAAC,EAAE;gBAChB,OAAO,CAAC,CAAC;aACV;YACD,IAAI,MAAM,GAAG,CAAC,EAAE;gBACd,OAAO,CA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AC,CAAC;AACjC,gBAAS,GAAG,MAAM,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;AAoErC,gBAAS,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;AACxC,iBAAU,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;AAC1C,mBAAY,GAAG,MAAM,CAAC,eAAe,CAAC,CAAC,EAAE,GAAG,GAAG,GAAG,CAAC,CAAC","file":"easing.js","sourcesContent":["/**\n * The MIT License (MIT)\n\n Copyright (c) 2014 gskinner.com, inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n */\n\n// 参考TweenJS\n// https://github.com/CreateJS/TweenJS/tree/master/src/tweenjs\nimport { pi2 } from '@visactor/vutils';\n\n/**\n * 代码迁移自createjs\n */\nexport class Easing {\n private constructor() {\n // do nothing\n }\n\n static linear(t: number): number {\n return t;\n }\n\n static none() {\n return this.linear;\n }\n\n /**\n * 获取缓动函数,amount指示这个缓动函数的插值方式\n * @param amount\n * @returns\n */\n static get(amount: number) {\n if (amount < -1) {\n amount = -1;\n } else if (amount > 1) {\n amount = 1;\n }\n\n return function (t: number) {\n if (amount === 0) {\n return t;\n }\n if (amount < 0) {\n return t * (t * -amount + 1 + amount);\n }\n return t * ((2 - t) * amount + (1 - amount));\n };\n }\n\n /* 语法糖 */\n static getPowIn(pow: number) {\n return function (t: number) {\n return Math.pow(t, pow);\n };\n }\n\n static getPowOut(pow: number) {\n return function (t: number) {\n return 1 - Math.pow(1 - t, pow);\n };\n }\n\n static getPowInOut(pow: number) {\n return function (t: number) {\n if ((t *= 2) < 1) {\n return 0.5 * Math.pow(t, pow);\n }\n return 1 - 0.5 * Math.abs(Math.pow(2 - t, pow));\n };\n }\n\n // 插值函数\n static quadIn = Easing.getPowIn(2);\n static quadOut = Easing.getPowOut(2);\n\n static quadInOut = Easing.getPowInOut(2);\n static cubicIn = Easing.getPowIn(3);\n static cubicOut = Easing.getPowOut(3);\n static cubicInOut = Easing.getPowInOut(3);\n static quartIn = Easing.getPowIn(4);\n static quartOut = Easing.getPowOut(4);\n static quartInOut = Easing.getPowInOut(4);\n static quintIn = Easing.getPowIn(5);\n static quintOut = Easing.getPowOut(5);\n static quintInOut = Easing.getPowInOut(5);\n\n /* 语法糖 */\n static getBackIn(amount: number) {\n return function (t: number) {\n return t * t * ((amount + 1) * t - amount);\n };\n }\n static getBackOut(amount: number) {\n return function (t: number) {\n return --t * t * ((amount + 1) * t + amount) + 1;\n };\n }\n static getBackInOut(amount: number) {\n amount *= 1.525;\n return function (t: number) {\n if ((t *= 2) < 1) {\n return 0.5 * (t * t * ((amount + 1) * t - amount));\n }\n return 0.5 * ((t -= 2) * t * ((amount + 1) * t + amount) + 2);\n };\n }\n\n // 插值函数\n static backIn = Easing.getBackIn(1.7);\n static backOut = Easing.getBackOut(1.7);\n static backInOut = Easing.getBackInOut(1.7);\n\n // 插值函数\n static circIn(t: number) {\n return -(Math.sqrt(1 - t * t) - 1);\n }\n\n static circOut(t: number) {\n return Math.sqrt(1 - --t * t);\n }\n\n static circInOut(t: number) {\n if ((t *= 2) < 1) {\n return -0.5 * (Math.sqrt(1 - t * t) - 1);\n }\n return 0.5 * (Math.sqrt(1 - (t -= 2) * t) + 1);\n }\n static bounceOut(t: number) {\n if (t < 1 / 2.75) {\n return 7.5625 * t * t;\n } else if (t < 2 / 2.75) {\n return 7.5625 * (t -= 1.5 / 2.75) * t + 0.75;\n } else if (t < 2.5 / 2.75) {\n return 7.5625 * (t -= 2.25 / 2.75) * t + 0.9375;\n }\n return 7.5625 * (t -= 2.625 / 2.75) * t + 0.984375;\n }\n static bounceIn(t: number) {\n return 1 - Easing.bounceOut(1 - t);\n }\n\n static bounceInOut(t: number) {\n if (t < 0.5) {\n return Easing.bounceIn(t * 2) * 0.5;\n }\n return Easing.bounceOut(t * 2 - 1) * 0.5 + 0.5;\n }\n\n /* 语法糖 */\n static getElasticIn(amplitude: number, period: number) {\n return function (t: number) {\n if (t === 0 || t === 1) {\n return t;\n }\n const s = (period / pi2) * Math.asin(1 / amplitude);\n return -(amplitude * Math.pow(2, 10 * (t -= 1)) * Math.sin(((t - s) * pi2) / period));\n };\n }\n static getElasticOut(amplitude: number, period: number) {\n return function (t: number) {\n if (t === 0 || t === 1) {\n return t;\n }\n const s = (period / pi2) * Math.asin(1 / amplitude);\n return amplitude * Math.pow(2, -10 * t) * Math.sin(((t - s) * pi2) / period) + 1;\n };\n }\n static getElasticInOut(amplitude: number, period: number) {\n return function (t: number) {\n const s = (period / pi2) * Math.asin(1 / amplitude);\n if ((t *= 2) < 1) {\n return -0.5 * (amplitude * Math.pow(2, 10 * (t -= 1)) * Math.sin(((t - s) * pi2) / period));\n }\n return amplitude * Math.pow(2, -10 * (t -= 1)) * Math.sin(((t - s) * pi2) / period) * 0.5 + 1;\n };\n }\n\n // 插值函数\n static elasticIn = Easing.getElasticIn(1, 0.3);\n static elasticOut = Easing.getElasticOut(1, 0.3);\n static elasticInOut = Easing.getElasticInOut(1, 0.3 * 1.5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,cAAO,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;AAC7B,eAAQ,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;AAC/B,iBAAU,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;AACnC,cAAO,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;AAC7B,eAAQ,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;AAC/B,iBAAU,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;AACnC,cAAO,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;AAC7B,eAAQ,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;AAC/B,iBAAU,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;AAwBnC,aAAM,GAAG,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;AAC/B,cAAO,GAAG,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;AACjC,gBAAS,GAAG,MAAM,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;AA4FrC,gBAAS,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;AACxC,iBAAU,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;AAC1C,mBAAY,GAAG,MAAM,CAAC,eAAe,CAAC,CAAC,EAAE,GAAG,GAAG,GAAG,CAAC,CAAC","file":"easing.js","sourcesContent":["/**\n * The MIT License (MIT)\n\n Copyright (c) 2014 gskinner.com, inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n */\n\n// 参考TweenJS\n// https://github.com/CreateJS/TweenJS/tree/master/src/tweenjs\nimport { pi2 } from '@visactor/vutils';\n\n/**\n * 代码迁移自createjs\n * 部分缓动函数参考https://easings.net/\n */\nexport class Easing {\n private constructor() {\n // do nothing\n }\n\n static linear(t: number): number {\n return t;\n }\n\n static none() {\n return this.linear;\n }\n\n /**\n * 获取缓动函数,amount指示这个缓动函数的插值方式\n * @param amount\n * @returns\n */\n static get(amount: number) {\n if (amount < -1) {\n amount = -1;\n } else if (amount > 1) {\n amount = 1;\n }\n\n return function (t: number) {\n if (amount === 0) {\n return t;\n }\n if (amount < 0) {\n return t * (t * -amount + 1 + amount);\n }\n return t * ((2 - t) * amount + (1 - amount));\n };\n }\n\n /* 语法糖 */\n static getPowIn(pow: number) {\n return function (t: number) {\n return Math.pow(t, pow);\n };\n }\n\n static getPowOut(pow: number) {\n return function (t: number) {\n return 1 - Math.pow(1 - t, pow);\n };\n }\n\n static getPowInOut(pow: number) {\n return function (t: number) {\n if ((t *= 2) < 1) {\n return 0.5 * Math.pow(t, pow);\n }\n return 1 - 0.5 * Math.abs(Math.pow(2 - t, pow));\n };\n }\n\n // 插值函数\n static quadIn = Easing.getPowIn(2);\n static quadOut = Easing.getPowOut(2);\n\n static quadInOut = Easing.getPowInOut(2);\n static cubicIn = Easing.getPowIn(3);\n static cubicOut = Easing.getPowOut(3);\n static cubicInOut = Easing.getPowInOut(3);\n static quartIn = Easing.getPowIn(4);\n static quartOut = Easing.getPowOut(4);\n static quartInOut = Easing.getPowInOut(4);\n static quintIn = Easing.getPowIn(5);\n static quintOut = Easing.getPowOut(5);\n static quintInOut = Easing.getPowInOut(5);\n\n /* 语法糖 */\n static getBackIn(amount: number) {\n return function (t: number) {\n return t * t * ((amount + 1) * t - amount);\n };\n }\n static getBackOut(amount: number) {\n return function (t: number) {\n return --t * t * ((amount + 1) * t + amount) + 1;\n };\n }\n static getBackInOut(amount: number) {\n amount *= 1.525;\n return function (t: number) {\n if ((t *= 2) < 1) {\n return 0.5 * (t * t * ((amount + 1) * t - amount));\n }\n return 0.5 * ((t -= 2) * t * ((amount + 1) * t + amount) + 2);\n };\n }\n\n // 插值函数\n static backIn = Easing.getBackIn(1.7);\n static backOut = Easing.getBackOut(1.7);\n static backInOut = Easing.getBackInOut(1.7);\n\n static sineIn(t: number): number {\n return 1 - Math.cos((t * Math.PI) / 2);\n }\n\n static sineOut(t: number): number {\n return Math.sin((t * Math.PI) / 2);\n }\n\n static sineInOut(t: number): number {\n return -(Math.cos(Math.PI * t) - 1) / 2;\n }\n\n static expoIn(t: number): number {\n return t === 0 ? 0 : Math.pow(2, 10 * t - 10);\n }\n\n static expoOut(t: number): number {\n return t === 1 ? 1 : 1 - Math.pow(2, -10 * t);\n }\n\n static expoInOut(t: number): number {\n return t === 0 ? 0 : t === 1 ? 1 : t < 0.5 ? Math.pow(2, 20 * t - 10) / 2 : (2 - Math.pow(2, -20 * t + 10)) / 2;\n }\n\n // 插值函数\n static circIn(t: number) {\n return -(Math.sqrt(1 - t * t) - 1);\n }\n\n static circOut(t: number) {\n return Math.sqrt(1 - --t * t);\n }\n\n static circInOut(t: number) {\n if ((t *= 2) < 1) {\n return -0.5 * (Math.sqrt(1 - t * t) - 1);\n }\n return 0.5 * (Math.sqrt(1 - (t -= 2) * t) + 1);\n }\n static bounceOut(t: number) {\n if (t < 1 / 2.75) {\n return 7.5625 * t * t;\n } else if (t < 2 / 2.75) {\n return 7.5625 * (t -= 1.5 / 2.75) * t + 0.75;\n } else if (t < 2.5 / 2.75) {\n return 7.5625 * (t -= 2.25 / 2.75) * t + 0.9375;\n }\n return 7.5625 * (t -= 2.625 / 2.75) * t + 0.984375;\n }\n static bounceIn(t: number) {\n return 1 - Easing.bounceOut(1 - t);\n }\n\n static bounceInOut(t: number) {\n if (t < 0.5) {\n return Easing.bounceIn(t * 2) * 0.5;\n }\n return Easing.bounceOut(t * 2 - 1) * 0.5 + 0.5;\n }\n\n /* 语法糖 */\n static getElasticIn(amplitude: number, period: number) {\n return function (t: number) {\n if (t === 0 || t === 1) {\n return t;\n }\n const s = (period / pi2) * Math.asin(1 / amplitude);\n return -(amplitude * Math.pow(2, 10 * (t -= 1)) * Math.sin(((t - s) * pi2) / period));\n };\n }\n static getElasticOut(amplitude: number, period: number) {\n return function (t: number) {\n if (t === 0 || t === 1) {\n return t;\n }\n const s = (period / pi2) * Math.asin(1 / amplitude);\n return amplitude * Math.pow(2, -10 * t) * Math.sin(((t - s) * pi2) / period) + 1;\n };\n }\n static getElasticInOut(amplitude: number, period: number) {\n return function (t: number) {\n const s = (period / pi2) * Math.asin(1 / amplitude);\n if ((t *= 2) < 1) {\n return -0.5 * (amplitude * Math.pow(2, 10 * (t -= 1)) * Math.sin(((t - s) * pi2) / period));\n }\n return amplitude * Math.pow(2, -10 * (t -= 1)) * Math.sin(((t - s) * pi2) / period) * 0.5 + 1;\n };\n }\n\n // 插值函数\n static elasticIn = Easing.getElasticIn(1, 0.3);\n static elasticOut = Easing.getElasticOut(1, 0.3);\n static elasticInOut = Easing.getElasticInOut(1, 0.3 * 1.5);\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { IContext2d, EnvType } from '../../../interface';
1
+ import type { IContext2d, EnvType } from '../../../interface';
2
2
  import { BrowserContext2d } from '../browser';
3
3
  export declare class LynxContext2d extends BrowserContext2d implements IContext2d {
4
4
  static env: EnvType;
@@ -6,5 +6,6 @@ export declare class LynxContext2d extends BrowserContext2d implements IContext2
6
6
  _globalAlpha: number;
7
7
  get globalAlpha(): number;
8
8
  set globalAlpha(ga: number);
9
+ setLineDash(segments: number[]): void;
9
10
  draw(): void;
10
11
  }
@@ -19,6 +19,14 @@ let LynxContext2d = class extends browser_1.BrowserContext2d {
19
19
  set globalAlpha(ga) {
20
20
  this.nativeContext.globalAlpha = ga, this._globalAlpha = ga;
21
21
  }
22
+ setLineDash(segments) {
23
+ const a = arguments, _context = this.nativeContext;
24
+ if (this.nativeContext.setLineDash) {
25
+ const lineDash = a[0];
26
+ if (0 === lineDash[0] && 0 === lineDash[1]) return;
27
+ _context.setLineDash(lineDash);
28
+ }
29
+ }
22
30
  draw() {
23
31
  const _context = this.nativeContext;
24
32
  this.drawPromise = new Promise((resolve => {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/canvas/contributions/lynx/context.ts"],"names":[],"mappings":";;;;;;;;;AACA,yCAAuC;AAEvC,wCAA8C;AAGvC,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,0BAAgB;IAOjD,IAAI,WAAW;QACb,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IACD,IAAI,WAAW,CAAC,EAAU;QACxB,IAAI,CAAC,aAAa,CAAC,WAAW,GAAG,EAAE,CAAC;QACpC,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC;IACzB,CAAC;IAED,IAAI;QACF,MAAM,QAAQ,GAAG,IAAI,CAAC,aAAoB,CAAC;QAC3C,IAAI,CAAC,WAAW,GAAG,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE;YACvC,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE;gBACvB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;gBACxB,OAAO,CAAC,IAAI,CAAC,CAAC;YAChB,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;;AAtBM,iBAAG,GAAY,MAAM,CAAC;AADlB,aAAa;IADzB,IAAA,sBAAU,GAAE;GACA,aAAa,CAwBzB;AAxBY,sCAAa","file":"context.js","sourcesContent":["// 参考konva\nimport { injectable } from 'inversify';\nimport { IContext2d, EnvType } from '../../../interface';\nimport { BrowserContext2d } from '../browser';\n\n@injectable()\nexport class LynxContext2d extends BrowserContext2d implements IContext2d {\n static env: EnvType = 'lynx';\n\n declare drawPromise?: Promise<any>;\n\n declare _globalAlpha: number;\n\n get globalAlpha(): number {\n return this._globalAlpha;\n }\n set globalAlpha(ga: number) {\n this.nativeContext.globalAlpha = ga;\n this._globalAlpha = ga;\n }\n\n draw() {\n const _context = this.nativeContext as any;\n this.drawPromise = new Promise(resolve => {\n _context.draw(true, () => {\n this.drawPromise = null;\n resolve(null);\n });\n });\n }\n}\n"]}
1
+ {"version":3,"sources":["../../src/canvas/contributions/lynx/context.ts"],"names":[],"mappings":";;;;;;;;;AACA,yCAAuC;AAEvC,wCAA8C;AAGvC,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,0BAAgB;IAOjD,IAAI,WAAW;QACb,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IACD,IAAI,WAAW,CAAC,EAAU;QACxB,IAAI,CAAC,aAAa,CAAC,WAAW,GAAG,EAAE,CAAC;QACpC,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC;IACzB,CAAC;IAED,WAAW,CAAC,QAAkB;QAC5B,MAAM,CAAC,GAAG,SAAS,CAAC;QACpB,MAAM,QAAQ,GAAG,IAAI,CAAC,aAAa,CAAC;QAEpC,IAAI,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,WAAW,EAAE;YACpC,MAAM,QAAQ,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;YAEtB,IAAI,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE;gBAC1C,OAAO;aACR;YACD,QAAQ,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;SAChC;IACH,CAAC;IAED,IAAI;QACF,MAAM,QAAQ,GAAG,IAAI,CAAC,aAAoB,CAAC;QAC3C,IAAI,CAAC,WAAW,GAAG,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE;YACvC,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE;gBACvB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;gBACxB,OAAO,CAAC,IAAI,CAAC,CAAC;YAChB,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;;AApCM,iBAAG,GAAY,MAAM,CAAC;AADlB,aAAa;IADzB,IAAA,sBAAU,GAAE;GACA,aAAa,CAsCzB;AAtCY,sCAAa","file":"context.js","sourcesContent":["// 参考konva\nimport { injectable } from 'inversify';\nimport type { IContext2d, EnvType } from '../../../interface';\nimport { BrowserContext2d } from '../browser';\n\n@injectable()\nexport class LynxContext2d extends BrowserContext2d implements IContext2d {\n static env: EnvType = 'lynx';\n\n declare drawPromise?: Promise<any>;\n\n declare _globalAlpha: number;\n\n get globalAlpha(): number {\n return this._globalAlpha;\n }\n set globalAlpha(ga: number) {\n this.nativeContext.globalAlpha = ga;\n this._globalAlpha = ga;\n }\n\n setLineDash(segments: number[]) {\n const a = arguments;\n const _context = this.nativeContext;\n\n if (!!this.nativeContext.setLineDash) {\n const lineDash = a[0];\n // lynx环境中lineDash不能为[0, 0]\n if (lineDash[0] === 0 && lineDash[1] === 0) {\n return;\n }\n _context.setLineDash(lineDash);\n }\n }\n\n draw() {\n const _context = this.nativeContext as any;\n this.drawPromise = new Promise(resolve => {\n _context.draw(true, () => {\n this.drawPromise = null;\n resolve(null);\n });\n });\n }\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  import type { IBounds, IBoundsLike, IMatrix } from '@visactor/vutils';
2
2
  import { AABBBounds } from '@visactor/vutils';
3
- import type { IGraphic, IGroup, IExportType, IStage, IStageParams, ILayer, IColor, IOption3D, ICamera, IDirectionLight, ITicker, IRenderService, IPickerService, IPluginService, ISyncHook, IDrawContext, IWindow } from '../interface';
3
+ import type { IGraphic, IGroup, IExportType, IStage, IStageParams, ILayer, IColor, IOption3D, ICamera, vec3, IDirectionLight, ITicker, IRenderService, IPickerService, IPluginService, ISyncHook, IDrawContext, IWindow } from '../interface';
4
4
  import { Layer } from './layer';
5
5
  import { Group } from '../graphic';
6
6
  export declare class Stage extends Group implements IStage {
@@ -55,6 +55,28 @@ export declare class Stage extends Group implements IStage {
55
55
  protected _afterNextRenderCbs?: ((stage: IStage) => void)[];
56
56
  protected lastRenderparams?: Partial<IDrawContext>;
57
57
  constructor(params: Partial<IStageParams>);
58
+ get3dOptions(options: IOption3D): {
59
+ center: {
60
+ x?: number;
61
+ y?: number;
62
+ z?: number;
63
+ dx?: number;
64
+ dy?: number;
65
+ dz?: number;
66
+ };
67
+ light: {
68
+ dir?: vec3;
69
+ color?: string;
70
+ ambient?: number;
71
+ };
72
+ alpha: number;
73
+ beta: number;
74
+ camera: any;
75
+ fieldRatio: number;
76
+ fieldDepth: number;
77
+ enableView3dTransform?: boolean;
78
+ gama?: number;
79
+ };
58
80
  set3dOptions(options: IOption3D): void;
59
81
  protected beforeRender: (stage: IStage) => void;
60
82
  protected afterRender: (stage: IStage) => void;
package/cjs/core/stage.js CHANGED
@@ -123,12 +123,16 @@ class Stage extends graphic_1.Group {
123
123
  this._beforeRender = params.beforeRender, this._afterRender = params.afterRender,
124
124
  this.ticker = params.ticker || default_ticker_1.defaultTicker;
125
125
  }
126
- set3dOptions(options) {
126
+ get3dOptions(options) {
127
127
  const {center: center = {
128
128
  x: this.width / 2,
129
- y: this.height / 2
129
+ y: this.height / 2,
130
+ z: 0,
131
+ dx: 0,
132
+ dy: 0,
133
+ dz: 0
130
134
  }, light: light = {}, alpha: alpha = 0, beta: beta = 0, camera: camera, fieldRatio: fieldRatio = 1, fieldDepth: fieldDepth} = options;
131
- this.option3d = Object.assign(Object.assign({}, options), {
135
+ return Object.assign(Object.assign({}, options), {
132
136
  center: center,
133
137
  light: light,
134
138
  alpha: alpha,
@@ -137,9 +141,13 @@ class Stage extends graphic_1.Group {
137
141
  fieldRatio: fieldRatio,
138
142
  fieldDepth: fieldDepth
139
143
  });
140
- const {dir: dir = [ 1, 1, -1 ], color: color = "white", ambient: ambient} = light, centerVec3 = [ center.x, center.y, 0 ];
144
+ }
145
+ set3dOptions(options) {
146
+ var _a, _b, _c, _d, _e, _f;
147
+ this.option3d = options;
148
+ const options3d = this.get3dOptions(options), {light: light, center: center, camera: camera, alpha: alpha, beta: beta, fieldRatio: fieldRatio, fieldDepth: fieldDepth} = options3d, {dir: dir = [ 1, 1, -1 ], color: color = "white", ambient: ambient} = light, centerX = (null !== (_a = center.x) && void 0 !== _a ? _a : this.width / 2) + (null !== (_b = center.dx) && void 0 !== _b ? _b : 0), centerY = (null !== (_c = center.y) && void 0 !== _c ? _c : this.height / 2) + (null !== (_d = center.dy) && void 0 !== _d ? _d : 0), centerVec3 = [ centerX, centerY, (null !== (_e = center.z) && void 0 !== _e ? _e : 0) + (null !== (_f = center.dz) && void 0 !== _f ? _f : 0) ];
141
149
  let cameraX = 0, cameraY = 0, cameraZ = 0;
142
- camera || (cameraX = Math.sin(alpha) + center.x, cameraY = Math.sin(beta) + center.y,
150
+ camera || (cameraX = Math.sin(alpha) + centerX, cameraY = Math.sin(beta) + centerY,
143
151
  cameraZ = Math.cos(alpha) * Math.cos(beta) * 1), this.light = new light_1.DirectionalLight(dir, color, ambient);
144
152
  const cameraParams = {
145
153
  left: 0,
@@ -278,10 +286,7 @@ class Stage extends graphic_1.Group {
278
286
  this.window.resize(w, h), this.forEachChildren((c => {
279
287
  c.resize(w, h);
280
288
  })), this._subView || this.viewBox.setValue(this.viewBox.x1, this.viewBox.y1, this.viewBox.x1 + w, this.viewBox.y1 + h),
281
- this.camera && (this.camera.params = Object.assign(Object.assign({}, this.camera.params), {
282
- right: this.width,
283
- bottom: this.height
284
- })), rerender && this.render();
289
+ this.camera && this.option3d && this.set3dOptions(this.option3d), rerender && this.render();
285
290
  }
286
291
  resizeView(w, h, rerender = !0) {
287
292
  this.viewBox.setValue(this.viewBox.x1, this.viewBox.y1, this.viewBox.x1 + w, this.viewBox.y1 + h),