@visactor/vchart 2.1.3-alpha.1 → 2.1.3-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/es5/index.js +1 -1
- package/build/index.es.js +103 -23
- package/build/index.js +65879 -65832
- package/build/index.min.js +2 -2
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/animation/config.js +1 -2
- package/cjs/animation/grammar-dector.js +2 -1
- package/cjs/animation/index.d.ts +2 -1
- package/cjs/animation/index.js +8 -4
- package/cjs/animation/index.js.map +1 -1
- package/cjs/animation/state-transition.js +2 -2
- package/cjs/animation/state-transition.js.map +1 -1
- package/cjs/chart/util.js +2 -2
- package/cjs/chart/util.js.map +1 -1
- package/cjs/compile/compiler.js +9 -9
- package/cjs/compile/compiler.js.map +1 -1
- package/cjs/compile/state-manager.js +1 -2
- package/cjs/compile/util.js +2 -1
- package/cjs/component/axis/cartesian/axis.js +3 -2
- package/cjs/component/axis/cartesian/axis.js.map +1 -1
- package/cjs/component/base/base-component.d.ts +1 -1
- package/cjs/component/base/base-component.js +2 -2
- package/cjs/component/base/base-component.js.map +1 -1
- package/cjs/component/label/util.js +2 -2
- package/cjs/component/label/util.js.map +1 -1
- package/cjs/component/tooltip/processor/mark-tooltip.js +2 -2
- package/cjs/component/tooltip/processor/mark-tooltip.js.map +1 -1
- package/cjs/component/tooltip/tooltip-transformer.js +2 -2
- package/cjs/component/tooltip/tooltip-transformer.js.map +1 -1
- package/cjs/constant/marker.js +1 -2
- package/cjs/constant/polar.js +2 -1
- package/cjs/core/factory-registry.js +34 -3
- package/cjs/core/factory-registry.js.map +1 -1
- package/cjs/core/index.d.ts +2 -1
- package/cjs/core/index.js +15 -11
- package/cjs/core/index.js.map +1 -1
- package/cjs/core/vchart.js +4 -4
- package/cjs/core/vchart.js.map +1 -1
- package/cjs/env/env.js +9 -9
- package/cjs/env/env.js.map +1 -1
- package/cjs/index-harmony-simple.d.ts +1 -1
- package/cjs/index-harmony-simple.js +2 -2
- package/cjs/index-harmony-simple.js.map +1 -1
- package/cjs/index-harmony.d.ts +1 -1
- package/cjs/index-harmony.js +2 -2
- package/cjs/index-harmony.js.map +1 -1
- package/cjs/index.d.ts +7 -2
- package/cjs/index.js +39 -23
- package/cjs/index.js.map +1 -1
- package/cjs/mark/arc.js +2 -2
- package/cjs/mark/arc.js.map +1 -1
- package/cjs/mark/area.js +2 -2
- package/cjs/mark/area.js.map +1 -1
- package/cjs/mark/base/base-mark.js +4 -4
- package/cjs/mark/base/base-mark.js.map +1 -1
- package/cjs/mark/box-plot.js +3 -3
- package/cjs/mark/box-plot.js.map +1 -1
- package/cjs/mark/cell.js +3 -3
- package/cjs/mark/cell.js.map +1 -1
- package/cjs/mark/glyph.js +3 -3
- package/cjs/mark/glyph.js.map +1 -1
- package/cjs/mark/image.js +2 -2
- package/cjs/mark/image.js.map +1 -1
- package/cjs/mark/line.js +2 -2
- package/cjs/mark/line.js.map +1 -1
- package/cjs/mark/link-path.js +2 -2
- package/cjs/mark/link-path.js.map +1 -1
- package/cjs/mark/liquid.d.ts +1 -1
- package/cjs/mark/liquid.js +2 -2
- package/cjs/mark/liquid.js.map +1 -1
- package/cjs/mark/path.js +2 -2
- package/cjs/mark/path.js.map +1 -1
- package/cjs/mark/polygon/polygon.js +2 -2
- package/cjs/mark/polygon/polygon.js.map +1 -1
- package/cjs/mark/rect.js +2 -2
- package/cjs/mark/rect.js.map +1 -1
- package/cjs/mark/ripple.d.ts +1 -1
- package/cjs/mark/ripple.js +2 -2
- package/cjs/mark/ripple.js.map +1 -1
- package/cjs/mark/rule.js +3 -3
- package/cjs/mark/rule.js.map +1 -1
- package/cjs/mark/symbol.js +2 -2
- package/cjs/mark/symbol.js.map +1 -1
- package/cjs/mark/text.js +4 -3
- package/cjs/mark/text.js.map +1 -1
- package/cjs/plugin/components/tooltip-handler/dom-tooltip-handler.d.ts +1 -0
- package/cjs/plugin/components/tooltip-handler/dom-tooltip-handler.js +9 -5
- package/cjs/plugin/components/tooltip-handler/dom-tooltip-handler.js.map +1 -1
- package/cjs/plugin/components/tooltip-handler/utils/attribute.js +2 -2
- package/cjs/plugin/components/tooltip-handler/utils/attribute.js.map +1 -1
- package/cjs/plugin/components/tooltip-handler/utils/svg.js +4 -4
- package/cjs/plugin/components/tooltip-handler/utils/svg.js.map +1 -1
- package/cjs/plugin/other.d.ts +1 -1
- package/cjs/plugin/other.js +6 -6
- package/cjs/plugin/other.js.map +1 -1
- package/cjs/series/bar/bar.js +2 -2
- package/cjs/series/bar/bar.js.map +1 -1
- package/cjs/series/box-plot/animation.d.ts +1 -1
- package/cjs/series/box-plot/animation.js +7 -7
- package/cjs/series/box-plot/animation.js.map +1 -1
- package/cjs/series/liquid/liquid.js +3 -3
- package/cjs/series/liquid/liquid.js.map +1 -1
- package/cjs/series/polar/animation.d.ts +2 -1
- package/cjs/series/polar/animation.js +3 -3
- package/cjs/series/polar/animation.js.map +1 -1
- package/cjs/series/polar/progress-like/progress-like.js +3 -3
- package/cjs/series/polar/progress-like/progress-like.js.map +1 -1
- package/cjs/series/radar/animation.js +2 -2
- package/cjs/series/radar/animation.js.map +1 -1
- package/cjs/series/sankey/animation.d.ts +1 -1
- package/cjs/series/sankey/animation.js +6 -6
- package/cjs/series/sankey/animation.js.map +1 -1
- package/cjs/series/venn/animation.d.ts +1 -1
- package/cjs/series/venn/animation.js +2 -2
- package/cjs/series/venn/animation.js.map +1 -1
- package/cjs/series/word-cloud/base.js +4 -4
- package/cjs/series/word-cloud/base.js.map +1 -1
- package/cjs/util/env.js +2 -2
- package/cjs/util/env.js.map +1 -1
- package/cjs/vrender-bridge.d.ts +11 -0
- package/cjs/vrender-bridge.js +158 -0
- package/cjs/vrender-bridge.js.map +1 -0
- package/cjs/vrender-tools.d.ts +1 -1
- package/cjs/vrender-tools.js +21 -21
- package/cjs/vrender-tools.js.map +1 -1
- package/esm/animation/config.js +1 -2
- package/esm/animation/grammar-dector.js +2 -1
- package/esm/animation/index.d.ts +2 -1
- package/esm/animation/index.js +3 -1
- package/esm/animation/index.js.map +1 -1
- package/esm/animation/state-transition.js +1 -1
- package/esm/animation/state-transition.js.map +1 -1
- package/esm/chart/util.js +1 -1
- package/esm/chart/util.js.map +1 -1
- package/esm/compile/compiler.js +1 -1
- package/esm/compile/compiler.js.map +1 -1
- package/esm/compile/state-manager.js +1 -2
- package/esm/compile/util.js +2 -1
- package/esm/component/axis/cartesian/axis.js +1 -1
- package/esm/component/axis/cartesian/axis.js.map +1 -1
- package/esm/component/base/base-component.d.ts +1 -1
- package/esm/component/base/base-component.js +1 -1
- package/esm/component/base/base-component.js.map +1 -1
- package/esm/component/label/util.js +1 -1
- package/esm/component/label/util.js.map +1 -1
- package/esm/component/tooltip/processor/mark-tooltip.js +1 -1
- package/esm/component/tooltip/processor/mark-tooltip.js.map +1 -1
- package/esm/component/tooltip/tooltip-transformer.js +1 -1
- package/esm/component/tooltip/tooltip-transformer.js.map +1 -1
- package/esm/constant/marker.js +1 -2
- package/esm/constant/polar.js +2 -1
- package/esm/core/factory-registry.js +35 -2
- package/esm/core/factory-registry.js.map +1 -1
- package/esm/core/index.d.ts +2 -1
- package/esm/core/index.js +3 -1
- package/esm/core/index.js.map +1 -1
- package/esm/core/vchart.js +1 -1
- package/esm/core/vchart.js.map +1 -1
- package/esm/env/env.js +1 -1
- package/esm/env/env.js.map +1 -1
- package/esm/index-harmony-simple.d.ts +1 -1
- package/esm/index-harmony-simple.js +1 -1
- package/esm/index-harmony-simple.js.map +1 -1
- package/esm/index-harmony.d.ts +1 -1
- package/esm/index-harmony.js +1 -1
- package/esm/index-harmony.js.map +1 -1
- package/esm/index.d.ts +7 -2
- package/esm/index.js +10 -2
- package/esm/index.js.map +1 -1
- package/esm/mark/arc.js +1 -1
- package/esm/mark/arc.js.map +1 -1
- package/esm/mark/area.js +1 -1
- package/esm/mark/area.js.map +1 -1
- package/esm/mark/base/base-mark.js +1 -1
- package/esm/mark/base/base-mark.js.map +1 -1
- package/esm/mark/box-plot.js +1 -1
- package/esm/mark/box-plot.js.map +1 -1
- package/esm/mark/cell.js +1 -1
- package/esm/mark/cell.js.map +1 -1
- package/esm/mark/glyph.js +1 -1
- package/esm/mark/glyph.js.map +1 -1
- package/esm/mark/image.js +1 -1
- package/esm/mark/image.js.map +1 -1
- package/esm/mark/line.js +1 -1
- package/esm/mark/line.js.map +1 -1
- package/esm/mark/link-path.js +1 -1
- package/esm/mark/link-path.js.map +1 -1
- package/esm/mark/liquid.d.ts +1 -1
- package/esm/mark/liquid.js +1 -1
- package/esm/mark/liquid.js.map +1 -1
- package/esm/mark/path.js +1 -1
- package/esm/mark/path.js.map +1 -1
- package/esm/mark/polygon/polygon.js +1 -1
- package/esm/mark/polygon/polygon.js.map +1 -1
- package/esm/mark/rect.js +1 -1
- package/esm/mark/rect.js.map +1 -1
- package/esm/mark/ripple.d.ts +1 -1
- package/esm/mark/ripple.js +1 -1
- package/esm/mark/ripple.js.map +1 -1
- package/esm/mark/rule.js +1 -1
- package/esm/mark/rule.js.map +1 -1
- package/esm/mark/symbol.js +1 -1
- package/esm/mark/symbol.js.map +1 -1
- package/esm/mark/text.js +1 -1
- package/esm/mark/text.js.map +1 -1
- package/esm/plugin/components/tooltip-handler/dom-tooltip-handler.d.ts +1 -0
- package/esm/plugin/components/tooltip-handler/dom-tooltip-handler.js +10 -4
- package/esm/plugin/components/tooltip-handler/dom-tooltip-handler.js.map +1 -1
- package/esm/plugin/components/tooltip-handler/utils/attribute.js +1 -1
- package/esm/plugin/components/tooltip-handler/utils/attribute.js.map +1 -1
- package/esm/plugin/components/tooltip-handler/utils/svg.js +3 -1
- package/esm/plugin/components/tooltip-handler/utils/svg.js.map +1 -1
- package/esm/plugin/other.d.ts +1 -1
- package/esm/plugin/other.js +2 -4
- package/esm/plugin/other.js.map +1 -1
- package/esm/series/bar/bar.js +1 -1
- package/esm/series/bar/bar.js.map +1 -1
- package/esm/series/box-plot/animation.d.ts +1 -1
- package/esm/series/box-plot/animation.js +3 -1
- package/esm/series/box-plot/animation.js.map +1 -1
- package/esm/series/liquid/liquid.js +1 -1
- package/esm/series/liquid/liquid.js.map +1 -1
- package/esm/series/polar/animation.d.ts +2 -1
- package/esm/series/polar/animation.js +3 -1
- package/esm/series/polar/animation.js.map +1 -1
- package/esm/series/polar/progress-like/progress-like.js +1 -1
- package/esm/series/polar/progress-like/progress-like.js.map +1 -1
- package/esm/series/radar/animation.js +1 -1
- package/esm/series/radar/animation.js.map +1 -1
- package/esm/series/sankey/animation.d.ts +1 -1
- package/esm/series/sankey/animation.js +3 -1
- package/esm/series/sankey/animation.js.map +1 -1
- package/esm/series/venn/animation.d.ts +1 -1
- package/esm/series/venn/animation.js +1 -1
- package/esm/series/venn/animation.js.map +1 -1
- package/esm/series/word-cloud/base.js +3 -1
- package/esm/series/word-cloud/base.js.map +1 -1
- package/esm/util/env.js +1 -1
- package/esm/util/env.js.map +1 -1
- package/esm/vrender-bridge.d.ts +11 -0
- package/esm/vrender-bridge.js +45 -0
- package/esm/vrender-bridge.js.map +1 -0
- package/esm/vrender-tools.d.ts +1 -1
- package/esm/vrender-tools.js +1 -1
- package/esm/vrender-tools.js.map +1 -1
- package/package.json +4 -4
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: !0
|
|
5
5
|
}), exports.registerVennAnimation = exports.VennOverlapAnimation = exports.vennOverlapPresetAnimation = exports.vennCirclePresetAnimation = void 0;
|
|
6
6
|
|
|
7
|
-
const
|
|
7
|
+
const custom_animate_1 = require("@visactor/vrender-animate/custom/custom-animate"), vlayouts_1 = require("@visactor/vlayouts"), factory_1 = require("../../core/factory"), config_1 = require("../../animation/config"), vennCirclePresetAnimation = preset => {
|
|
8
8
|
switch (preset) {
|
|
9
9
|
case "fadeIn":
|
|
10
10
|
default:
|
|
@@ -43,7 +43,7 @@ const vennOverlapPresetAnimation = preset => {
|
|
|
43
43
|
|
|
44
44
|
exports.vennOverlapPresetAnimation = vennOverlapPresetAnimation;
|
|
45
45
|
|
|
46
|
-
class VennOverlapAnimation extends
|
|
46
|
+
class VennOverlapAnimation extends custom_animate_1.ACustomAnimate {
|
|
47
47
|
onBind() {
|
|
48
48
|
var _a, _b;
|
|
49
49
|
this.fromCircles = {}, null === (_a = (0, vlayouts_1.getCirclesFromArcs)(this.target.attribute.arcs)) || void 0 === _a || _a.forEach((c => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/series/venn/animation.ts"],"names":[],"mappings":";;;AAAA
|
|
1
|
+
{"version":3,"sources":["../src/series/venn/animation.ts"],"names":[],"mappings":";;;AAAA,oFAAiF;AAEjF,iDAA6F;AAI7F,gDAA6C;AAC7C,mDAAkE;AAE3D,MAAM,yBAAyB,GAAG,CAAC,MAAwB,EAAwB,EAAE;IAC1F,QAAQ,MAAM,EAAE;QACd,KAAK,QAAQ,CAAC,CAAC;YACb,OAAO;gBACL,IAAI,EAAE,QAAQ;aACf,CAAC;SACH;QACD,KAAK,QAAQ,CAAC,CAAC;YACb,OAAO;gBACL,IAAI,EAAE,cAAc;aACrB,CAAC;SACH;QACD,KAAK,SAAS,CAAC,CAAC;YACd,OAAO;gBACL,IAAI,EAAE,SAAS;aAChB,CAAC;SACH;QACD,OAAO,CAAC,CAAC;YACP,OAAO;gBACL,IAAI,EAAE,QAAQ;aACf,CAAC;SACH;KACF;AACH,CAAC,CAAC;AAvBW,QAAA,yBAAyB,6BAuBpC;AAEK,MAAM,0BAA0B,GAAG,CAAC,MAAwB,EAAwB,EAAE;IAC3F,QAAQ,MAAM,EAAE;QACd,KAAK,QAAQ,CAAC,CAAC;YACb,OAAO;gBACL,IAAI,EAAE,QAAQ;aACf,CAAC;SACH;QACD,KAAK,SAAS,CAAC,CAAC;YACd,OAAO;gBACL,IAAI,EAAE,SAAS;aAChB,CAAC;SACH;QACD,OAAO,CAAC,CAAC;YACP,OAAO;gBACL,IAAI,EAAE,QAAQ;aACf,CAAC;SACH;KACF;AACH,CAAC,CAA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BAkBhC","file":"animation.js","sourcesContent":["import { ACustomAnimate } from '@visactor/vrender-animate/custom/custom-animate';\nimport type { IVennCircle, IVennOverlapArc, VennCircleName } from '@visactor/vlayouts';\nimport { getArcsFromCircles, getCirclesFromArcs, getPathFromArcs } from '@visactor/vlayouts';\n\nimport type { VennAppearPreset } from './interface';\nimport type { IAnimationTypeConfig } from '../../animation/interface';\nimport { Factory } from '../../core/factory';\nimport { DEFAULT_ANIMATION_CONFIG } from '../../animation/config';\n\nexport const vennCirclePresetAnimation = (preset: VennAppearPreset): IAnimationTypeConfig => {\n switch (preset) {\n case 'fadeIn': {\n return {\n type: 'fadeIn'\n };\n }\n case 'growIn': {\n return {\n type: 'growRadiusIn'\n };\n }\n case 'scaleIn': {\n return {\n type: 'scaleIn'\n };\n }\n default: {\n return {\n type: 'fadeIn'\n };\n }\n }\n};\n\nexport const vennOverlapPresetAnimation = (preset: VennAppearPreset): IAnimationTypeConfig => {\n switch (preset) {\n case 'fadeIn': {\n return {\n type: 'fadeIn'\n };\n }\n case 'scaleIn': {\n return {\n type: 'scaleIn'\n };\n }\n default: {\n return {\n type: 'fadeIn'\n };\n }\n }\n};\n\nexport class VennOverlapAnimation extends ACustomAnimate<{ path: string; arcs: IVennOverlapArc[] }> {\n protected fromCircles: Record<VennCircleName, IVennCircle>;\n protected toCircles: Record<VennCircleName, IVennCircle>;\n\n onBind(): void {\n this.fromCircles = {};\n getCirclesFromArcs((this.target.attribute as any).arcs)?.forEach((c: IVennCircle) => {\n this.fromCircles[c.setId] = c;\n });\n this.toCircles = {};\n getCirclesFromArcs(this.target.getFinalAttribute().arcs)?.forEach((c: IVennCircle) => {\n this.toCircles[c.setId] = c;\n });\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n const circles: IVennCircle[] = [];\n Object.keys(this.fromCircles).forEach(key => {\n const fromC = this.fromCircles[key];\n const toC = this.toCircles[key];\n if (fromC && toC) {\n circles.push({\n radius: fromC.radius + (toC.radius - fromC.radius) * ratio,\n x: fromC.x + (toC.x - fromC.x) * ratio,\n y: fromC.y + (toC.y - fromC.y) * ratio,\n setId: key\n } as IVennCircle);\n }\n });\n const arcs = getArcsFromCircles(circles);\n\n this.target.setAttributes({\n arcs,\n path: getPathFromArcs(arcs)\n } as any);\n }\n}\n\nexport const registerVennAnimation = () => {\n Factory.registerAnimation('vennCircle', (params: unknown, preset: VennAppearPreset) => {\n return {\n appear: vennCirclePresetAnimation(preset),\n enter: { type: 'growRadiusIn' },\n exit: { type: 'growRadiusOut' },\n disappear: { duration: DEFAULT_ANIMATION_CONFIG.disappear.duration }\n };\n });\n Factory.registerAnimation('vennOverlap', (params: unknown, preset: VennAppearPreset) => {\n return {\n appear: vennOverlapPresetAnimation(preset),\n update: { custom: VennOverlapAnimation },\n enter: { type: 'fadeIn' },\n exit: { type: 'fadeOut' },\n disappear: { duration: DEFAULT_ANIMATION_CONFIG.disappear.duration }\n };\n });\n};\n"]}
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: !0
|
|
5
5
|
}), exports.BaseWordCloudSeries = void 0;
|
|
6
6
|
|
|
7
|
-
const vutils_1 = require("@visactor/vutils"), vutils_2 = require("@visactor/vutils"), data_1 = require("../../constant/data"), attribute_1 = require("../../constant/attribute"), env_1 = require("../../util/env"), config_1 = require("./config"), measure_cache_1 = require("./measure-cache"), utils_1 = require("../../animation/utils"), word_cloud_1 = require("../../constant/word-cloud"), base_series_1 = require("../base/base-series"), color_ordinal_scale_1 = require("../../scale/color-ordinal-scale"), constant_1 = require("./constant"), factory_1 = require("../../core/factory"), vscale_1 = require("@visactor/vscale"),
|
|
7
|
+
const vutils_1 = require("@visactor/vutils"), vutils_2 = require("@visactor/vutils"), data_1 = require("../../constant/data"), attribute_1 = require("../../constant/attribute"), env_1 = require("../../util/env"), config_1 = require("./config"), measure_cache_1 = require("./measure-cache"), utils_1 = require("../../animation/utils"), word_cloud_1 = require("../../constant/word-cloud"), base_series_1 = require("../base/base-series"), color_ordinal_scale_1 = require("../../scale/color-ordinal-scale"), constant_1 = require("./constant"), factory_1 = require("../../core/factory"), vscale_1 = require("@visactor/vscale"), vrender_bridge_1 = require("../../vrender-bridge"), text_1 = require("@visactor/vrender-core/text"), word_cloud_2 = require("../../theme/builtin/common/series/word-cloud"), layout_1 = require("../../constant/layout"), core_1 = require("../../core");
|
|
8
8
|
|
|
9
9
|
class BaseWordCloudSeries extends base_series_1.BaseSeries {
|
|
10
10
|
constructor() {
|
|
@@ -187,8 +187,8 @@ class BaseWordCloudSeries extends base_series_1.BaseSeries {
|
|
|
187
187
|
fontStyle: (0, vutils_2.isValid)(this._spec.fontStyleField) ? {
|
|
188
188
|
field: this._spec.fontStyleField
|
|
189
189
|
} : wordStyleSpec.fontStyle,
|
|
190
|
-
createCanvas:
|
|
191
|
-
getTextBounds:
|
|
190
|
+
createCanvas: vrender_bridge_1.vglobal.createCanvas.bind(vrender_bridge_1.vglobal),
|
|
191
|
+
getTextBounds: text_1.getTextBounds
|
|
192
192
|
};
|
|
193
193
|
}
|
|
194
194
|
_wordCloudTransformOption() {
|
|
@@ -211,7 +211,7 @@ class BaseWordCloudSeries extends base_series_1.BaseSeries {
|
|
|
211
211
|
var _a, _b, _c, _d, _e, _f;
|
|
212
212
|
const fillingWordStyleSpec = null !== (_b = null === (_a = this._spec.fillingWord) || void 0 === _a ? void 0 : _a.style) && void 0 !== _b ? _b : {}, wordCloudShapeConfig = null !== (_c = this._wordCloudShapeConfig) && void 0 !== _c ? _c : {};
|
|
213
213
|
return Object.assign(Object.assign(Object.assign({}, wordCloudShapeConfig), this._getCommonTransformOptions()), {
|
|
214
|
-
createImage:
|
|
214
|
+
createImage: vrender_bridge_1.createImage,
|
|
215
215
|
measureCache: this._wordMeasureCache,
|
|
216
216
|
rotateList: this._rotateAngles,
|
|
217
217
|
fillingRotateList: wordCloudShapeConfig.fillingRotateAngles,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../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AAK,EAAE,CAAC;QAChC,IAAI,CAAC,iBAAiB,GAAG,SAAS,CAAC;IACrC,CAAC;;AA7fH,kDA8fC;AA7fiB,wBAAI,GAAkB,8BAAmB,CAAC;AAC1C,gCAAY,GAA0C,EAAE,SAAS,EAAT,sBAAS,EAAE,CAAC","file":"base.js","sourcesContent":["/* eslint-disable no-duplicate-imports */\nimport type { IPadding } from '@visactor/vutils';\nimport { isNil, isObject, isValidNumber } from '@visactor/vutils';\nimport { isValid } from '@visactor/vutils';\nimport { DEFAULT_DATA_INDEX, DEFAULT_DATA_KEY, DEFAULT_DATA_SERIES_FIELD } from '../../constant/data';\nimport { AttributeLevel } from '../../constant/attribute';\nimport type { SeriesMarkMap } from '../interface';\nimport { SeriesMarkNameEnum } from '../interface/type';\nimport { isTrueBrowser } from '../../util/env';\nimport {\n DEFAULT_DRAW_OUT_OF_BOUND,\n DEFAULT_FONTSIZE_RANGE,\n DEFAULT_FONT_PADDING,\n DEFAULT_FONT_WEIGHT_RANGE,\n DEFAULT_MASK_SHAPE,\n DEFAULT_MIN_FONT_SIZE,\n DEFAULT_RANDOM,\n DEFAULT_ROTATE_ANGLES,\n DEFAULT_ZOOM_TO_FIT,\n SHAPE_TYPE\n} from './config';\nimport type {\n IWordCloudSeriesSpec,\n IWordCloudSeriesTheme,\n WordCloudConfigType,\n WordCloudShapeConfigType,\n WordCloudShapeType\n} from './interface';\nimport { WordMeasureCache } from './measure-cache';\nimport type { Datum, IMarkSpec, IPoint, ITextMarkSpec } from '../../typings';\nimport { animationConfig, userAnimationConfig } from '../../animation/utils';\nimport { WORD_CLOUD_TEXT } from '../../constant/word-cloud';\nimport { BaseSeries } from '../base/base-series';\nimport { ColorOrdinalScale } from '../../scale/color-ordinal-scale';\nimport { wordCloudSeriesMark } from './constant';\nimport type { IStateAnimateSpec } from '../../animation/spec';\nimport { Factory } from '../../core/factory';\nimport type { IMark, IRectMark, ITextMark } from '../../mark/interface';\nimport { LinearScale } from '@visactor/vscale';\nimport type { GeometricMaskShape, TextShapeMask } from '@visactor/vlayouts';\nimport type { ITransformSpec } from '../../compile/interface';\nimport { vglobal, getTextBounds, createImage } from '@visactor/vrender-core';\nimport { wordCloud } from '../../theme/builtin/common/series/word-cloud';\nimport { LayoutZIndex } from '../../constant/layout';\nimport { ChartEvent } from '../../core';\n\nexport type IBaseWordCloudSeriesSpec = Omit<IWordCloudSeriesSpec, 'type'> & { type: string };\n\nexport class BaseWordCloudSeries<T extends IBaseWordCloudSeriesSpec = IBaseWordCloudSeriesSpec> extends BaseSeries<T> {\n static readonly mark: SeriesMarkMap = wordCloudSeriesMark;\n static readonly builtInTheme: Record<string, IWordCloudSeriesTheme> = { wordCloud };\n\n protected _nameField: string;\n protected _valueField?: string;\n setValueField(field: string) {\n if (isValid(field)) {\n this._valueField = field;\n }\n }\n\n protected _colorMode: 'linear' | 'ordinal';\n protected _colorList: string[];\n protected _rotateAngles?: number[];\n protected _fontWeightRange?: [number, number];\n protected _textField?: string;\n protected _maskCanvas?: HTMLCanvasElement;\n protected _maskMark?: IRectMark;\n\n protected _fontSizeRange?: [number, number] | 'auto' = [DEFAULT_MIN_FONT_SIZE, DEFAULT_MIN_FONT_SIZE];\n setFontSizeRange(fontSizeRange: [number, number] | 'auto') {\n if (isValid(fontSizeRange)) {\n this._fontSizeRange = fontSizeRange;\n } else {\n this._fontSizeRange = DEFAULT_FONTSIZE_RANGE;\n }\n }\n\n protected _maskShape?: string | WordCloudShapeType | TextShapeMask | GeometricMaskShape;\n protected _isWordCloudShape: boolean = false;\n\n protected _wordCloudConfig?: WordCloudConfigType;\n protected _wordCloudShapeConfig?: WordCloudShapeConfigType;\n\n private _wordMeasureCache?: WordMeasureCache;\n\n protected _padding?: IPadding;\n protected _defaultFontFamily: string;\n\n protected _keyWordColorCallback: (datum: Datum) => string;\n protected _fillingColorCallback: (datum: Datum) => string;\n protected _dataChange: boolean = true;\n\n protected handleMaskCanvasUpdate = (canvas: HTMLCanvasElement, imageUrl?: string) => {\n this._maskCanvas = canvas;\n };\n /**\n * @override\n */\n setAttrFromSpec() {\n super.setAttrFromSpec();\n // series布局相关\n this._padding = this._option.getChart().padding;\n\n // 普通词云 & 形状词云 共有spec相关\n this._nameField = this._spec.nameField;\n this._colorMode = this._spec.colorMode ?? 'ordinal';\n this._colorList = this._spec.colorList;\n this.setValueField(this._spec.valueField);\n this._fontWeightRange = this._spec.fontWeightRange ?? DEFAULT_FONT_WEIGHT_RANGE;\n this._rotateAngles = this._spec.rotateAngles ?? DEFAULT_ROTATE_ANGLES;\n this.setFontSizeRange(this._spec.fontSizeRange);\n this._maskShape = this._spec.maskShape ?? DEFAULT_MASK_SHAPE;\n this._textField = this._spec.word?.formatMethod ? WORD_CLOUD_TEXT : this._nameField;\n const wordCloudConfig = this._spec.wordCloudConfig;\n // 普通词云spec相关\n this._wordCloudConfig = {\n drawOutOfBound: DEFAULT_DRAW_OUT_OF_BOUND,\n layoutMode: 'default',\n zoomToFit: DEFAULT_ZOOM_TO_FIT,\n ...this._spec.wordCloudConfig\n };\n\n if ((!wordCloudConfig || isNil(wordCloudConfig.layoutMode)) && !isTrueBrowser(this._option.mode)) {\n this._wordCloudConfig.layoutMode = 'fast';\n }\n\n // 形状词云spec相关\n this._wordCloudShapeConfig = {\n fillingSeriesField: this.getSeriesField(),\n fillingRotateAngles: DEFAULT_ROTATE_ANGLES,\n layoutMode: 'default',\n ...this._spec.wordCloudShapeConfig\n };\n\n this._isWordCloudShape =\n !SHAPE_TYPE.includes(this._maskShape as string) &&\n !['fast', 'grid', 'cloud'].includes(this._wordCloudConfig.layoutMode);\n this._defaultFontFamily = this._option.getTheme('fontFamily') as string;\n\n if (!this._wordMeasureCache) {\n this._wordMeasureCache = new WordMeasureCache(1000);\n }\n }\n\n /**\n * @override\n */\n protected initData(): void {\n super.initData();\n // data改变时, 需要重新编译, 重新布局\n this.getViewData()?.target?.addListener('change', () => {\n this._wordMeasureCache?.clear();\n this._dataChange = true;\n this.compile();\n });\n }\n\n protected _wordMark: ITextMark;\n\n initMark(): void {\n this._wordMark = this._createMark(\n BaseWordCloudSeries.mark.word,\n {\n key: DEFAULT_DATA_KEY,\n groupKey: this._seriesField,\n isSeriesMark: true\n },\n {\n morphElementKey: this._seriesField\n }\n ) as ITextMark;\n if (this._spec.wordMask?.visible) {\n this._maskMark = this._createMark(BaseWordCloudSeries.mark.wordMask, { dataView: false }) as IRectMark;\n\n this._maskMark.setMarkConfig({\n zIndex: LayoutZIndex.Mark - 1\n });\n }\n }\n\n initMarkStyle() {\n this.initMarkStyleOfWord(this._wordMark, this._spec.word, this._spec.colorHexField, this._seriesField);\n\n if (this._maskMark) {\n this.setMarkStyle(\n this._maskMark,\n {\n width: () => {\n return this._region.getLayoutRect().width;\n },\n height: () => {\n return this._region.getLayoutRect().height;\n },\n background: () => {\n return this._maskCanvas;\n }\n },\n 'normal',\n AttributeLevel.Series\n );\n }\n }\n\n initMarkStyleOfWord(\n wordMark: ITextMark,\n wordSpec?: IMarkSpec<ITextMarkSpec>,\n colorHexField?: string,\n seriesField?: string,\n isFillingWord?: boolean\n ): void {\n if (!wordMark) {\n return;\n }\n this.setMarkStyle(\n wordMark,\n {\n text: (wordSpec as any)?.formatMethod\n ? (datum: Datum) => {\n return (wordSpec as any).formatMethod(datum);\n }\n : (datum: Datum) => datum[this._textField],\n x: (datum: Datum) => datum.x,\n y: (datum: Datum) => datum.y,\n fontSize: (datum: Datum) => datum.fontSize,\n fontStyle: (datum: Datum) => datum.fontStyle,\n\n angle: (datum: Datum) => datum.angle,\n visible: (datum: Datum) => datum.visible\n },\n 'normal',\n AttributeLevel.Series\n );\n this.setMarkStyle(\n wordMark,\n {\n fill: wordSpec?.style?.fill ?? this.getWordColor,\n // style和field相关的配置都已经传给vgrammar, 所以这里直接拿结果就可以\n fontWeight: (datum: Datum) => datum.fontWeight,\n fontFamily: (datum: Datum) => datum.fontFamily\n },\n 'normal',\n AttributeLevel.User_Mark\n );\n }\n\n protected initTooltip() {\n super.initTooltip();\n\n this._wordMark && this._tooltipHelper.activeTriggerSet.mark.add(this._wordMark);\n }\n\n initAnimation() {\n [this._wordMark].forEach(mark => {\n if (mark) {\n const appearPreset = (this._spec?.animationAppear as IStateAnimateSpec<any>)?.preset;\n const params = {\n animationConfig: () => mark.getAnimationConfig()?.appear?.[0]\n };\n mark.setAnimationConfig(\n animationConfig(\n Factory.getAnimationInKey('wordCloud')(params, appearPreset),\n userAnimationConfig(SeriesMarkNameEnum.word, this._spec, this._markAttributeContext)\n )\n );\n }\n });\n }\n\n protected getWordOrdinalColorScale(field: string, isFillingWord: boolean) {\n const colorList = isFillingWord ? this._wordCloudShapeConfig.fillingColorList : this._colorList;\n const colorDomain = field ? this.getViewData()?.latestData.map((datum: Datum) => datum[field]) : [];\n const colorRange = colorList ?? this._option.globalScale.getScale('color')?.range() ?? this._getDataScheme();\n return new ColorOrdinalScale().domain(colorDomain).range?.(colorRange);\n }\n\n protected initColorCallback(field: string, isFillingWord: boolean) {\n if (this._colorMode === 'ordinal') {\n const scale = this.getWordOrdinalColorScale(field, isFillingWord);\n return (datum: Datum) => {\n return scale.scale(datum[field ?? DEFAULT_DATA_SERIES_FIELD]);\n };\n }\n\n const colorList =\n (isFillingWord ? this._colorList : this._wordCloudShapeConfig.fillingColorList) ??\n this._option.globalScale.getScale('color').range();\n\n if (colorList.length === 1) {\n return (datum: Datum) => colorList[0];\n }\n\n if (this._valueField) {\n const stats = this.getRawDataStatisticsByField(this._valueField, true);\n if (stats.min === stats.max) {\n return colorList[0];\n }\n const scale = new LinearScale().domain([stats.min, stats.max]).range(colorList);\n\n return (datum: Datum) => {\n return scale.scale(datum[this._valueField]);\n };\n }\n\n const scale = new LinearScale().domain([0, this.getViewData()?.latestData?.length ?? 1]).range(colorList);\n\n return (datum: Datum) => {\n return scale.scale(datum[DEFAULT_DATA_INDEX]);\n };\n }\n\n getWordColor = (datum: Datum) => {\n if (datum.isFillingWord) {\n if (!this._fillingColorCallback || this._dataChange) {\n // 如果updateData数据变更了, 颜色映射也需要重新计算\n this._fillingColorCallback = this._wordCloudShapeConfig.fillingColorHexField\n ? (datum: Datum) => datum[this._wordCloudShapeConfig.fillingColorHexField]\n : this.initColorCallback(this._wordCloudShapeConfig.fillingSeriesField, true);\n }\n\n return this._fillingColorCallback(datum);\n }\n\n if (!this._keyWordColorCallback || this._dataChange) {\n // 如果updateData数据变更了, 颜色映射也需要重新计算\n this._keyWordColorCallback = this._spec.colorHexField\n ? datum => datum[this._spec.colorHexField]\n : this.initColorCallback(this._seriesField, false);\n }\n\n return this._keyWordColorCallback(datum);\n };\n\n private _calculateFontWeight = (datum: Datum) => {\n const stats = this.getRawDataStatisticsByField(this._valueField, true);\n\n if (stats.min === stats.max) {\n return this._fontWeightRange[0];\n }\n\n return (\n this._fontWeightRange[0] +\n ((this._fontWeightRange[this._fontWeightRange.length - 1] - this._fontWeightRange[0]) *\n (datum[this._valueField] - stats.min)) /\n (stats.max - stats.min)\n );\n };\n\n compile(): void {\n super.compile();\n const { width, height } = this._region.getLayoutRect();\n // 非正常尺寸下不进行布局\n if (!isValidNumber(width) || !isValidNumber(height) || !(height > 0 && width > 0)) {\n return;\n }\n\n const wordCloudTransforms: ITransformSpec[] = [];\n\n // 词云 transform\n if (!this._isWordCloudShape) {\n wordCloudTransforms.push({\n type: 'wordcloud',\n ...this._wordCloudTransformOption()\n });\n }\n // 形状词云 transform\n else {\n wordCloudTransforms.push({\n type: 'wordcloudShape',\n // 形状词云中必须要传入dataIndexKey, 否则填充词无法绘制\n ...this._wordCloudShapeTransformOption()\n });\n }\n\n // 挂到mark的transform上\n this._wordMark.setTransform(wordCloudTransforms);\n }\n\n protected _getCommonTransformOptions(): any {\n const { width, height } = this._region.getLayoutRect();\n const wordSpec = this._spec.word ?? {};\n const wordStyleSpec = wordSpec.style ?? {};\n\n return {\n size: [width, height],\n shape:\n isObject(this._maskShape) &&\n (this._maskShape as TextShapeMask).type === 'text' &&\n isNil((this._maskShape as TextShapeMask).fontFamily)\n ? {\n fontFamily: this._option.getTheme('fontFamily'),\n ...this._maskShape\n }\n : this._maskShape,\n onUpdateMaskCanvas: this.handleMaskCanvasUpdate,\n onLayoutFinished: () => {\n const afterWordcloudShapeDraw = () => {\n // 需要等到真正渲染完成\n this._option.globalInstance.getStage().hooks.afterRender.taps = this._option.globalInstance\n .getStage()\n .hooks.afterRender.taps.filter(tap => tap.fn !== afterWordcloudShapeDraw);\n\n this._option.dispatchEvent?.(ChartEvent.afterWordcloudShapeDraw, {\n instance: this._option.globalInstance\n });\n this._option.globalInstance\n .getChart()\n .getOption()\n .performanceHook?.afterWordcloudShapeDraw?.(this._option.globalInstance);\n };\n this._option.globalInstance.getStage().hooks.afterRender.taps.push({\n type: 'sync',\n name: 'afterWordcloudShapeDraw',\n fn: afterWordcloudShapeDraw\n });\n },\n dataIndexKey: DEFAULT_DATA_KEY,\n text: wordSpec.formatMethod\n ? (datum: Datum) => {\n return wordSpec.formatMethod(datum);\n }\n : { field: this._textField },\n fontSize: this._valueField ? { field: this._valueField } : this._fontSizeRange[0],\n fontSizeRange: this._fontSizeRange === 'auto' ? null : this._fontSizeRange,\n\n padding: this._spec.word?.padding ?? DEFAULT_FONT_PADDING,\n fontFamily: isValid(this._spec.fontFamilyField)\n ? { field: this._spec.fontFamilyField }\n : wordStyleSpec.fontFamily ?? this._defaultFontFamily,\n // 为了保持和旧版逻辑一致,优先级如下: spec field > mark style > default (根据valueField映射)\n fontWeight: isValid(this._spec.fontWeightField)\n ? { field: this._spec.fontWeightField }\n : isValid(wordStyleSpec.fontWeight)\n ? wordStyleSpec.fontWeight\n : isValid(this._valueField)\n ? this._calculateFontWeight\n : 'normal',\n fontStyle: isValid(this._spec.fontStyleField) ? { field: this._spec.fontStyleField } : wordStyleSpec.fontStyle,\n createCanvas: vglobal.createCanvas.bind(vglobal),\n getTextBounds\n };\n }\n\n protected _wordCloudTransformOption(): Object {\n const wordCloudConfig = this._wordCloudConfig ?? {};\n\n return {\n ...wordCloudConfig,\n ...this._getCommonTransformOptions(),\n // TIP: 非浏览器环境下,使用 fast 布局,否则会出现兼容问题\n layoutType: this._wordCloudConfig.layoutMode,\n\n rotate: this._rotateAngles,\n\n randomVisible: this._spec.random ?? DEFAULT_RANDOM,\n clip: this._wordCloudConfig.drawOutOfBound === 'clip',\n shrink: this._wordCloudConfig.zoomToFit.shrink,\n enlarge: this._wordCloudConfig.zoomToFit.enlarge,\n minFontSize: this._wordCloudConfig.zoomToFit.fontSizeLimitMin,\n progressiveTime: this._wordCloudConfig.progressiveTime,\n progressiveStep: this._wordCloudConfig.progressiveStep,\n repeatFill: this._wordCloudConfig.zoomToFit.repeat\n };\n }\n\n protected _wordCloudShapeTransformOption(): Object {\n const fillingWordStyleSpec = this._spec.fillingWord?.style ?? {};\n const wordCloudShapeConfig = this._wordCloudShapeConfig ?? {};\n\n return {\n ...wordCloudShapeConfig,\n ...this._getCommonTransformOptions(),\n createImage,\n measureCache: this._wordMeasureCache,\n\n rotateList: this._rotateAngles,\n fillingRotateList: wordCloudShapeConfig.fillingRotateAngles,\n\n fillingFontFamily: isValid(wordCloudShapeConfig.fillingFontFamilyField)\n ? { field: wordCloudShapeConfig.fillingFontFamilyField }\n : fillingWordStyleSpec.fontFamily ?? this._defaultFontFamily,\n fillingPadding: this._spec.fillingWord?.padding ?? DEFAULT_FONT_PADDING,\n fillingFontStyle: isValid(wordCloudShapeConfig.fillingFontStyleField)\n ? { field: wordCloudShapeConfig.fillingFontStyleField }\n : fillingWordStyleSpec.fontStyle,\n // 如果配置了字段映射,优先按照映射进行展示\n fillingFontWeight: isValid(wordCloudShapeConfig.fillingFontWeightField)\n ? {\n field: wordCloudShapeConfig.fillingFontWeightField\n }\n : fillingWordStyleSpec.fontWeight // 填充词fontWeight默认不跟随valueField\n };\n }\n\n getStatisticFields() {\n const fields: { key: string; operations: Array<'max' | 'min' | 'values'> }[] = [];\n fields.push({ key: this._nameField, operations: ['values'] });\n fields.push({ key: this._valueField, operations: ['max', 'min'] });\n return fields;\n }\n dataToPosition(data: Datum): IPoint {\n return null;\n }\n dataToPositionX(data: any): number {\n return null;\n }\n dataToPositionY(data: any): number {\n return null;\n }\n dataToPositionZ(data: any): number {\n return null;\n }\n valueToPosition(value1: any, value2?: any): IPoint {\n return null;\n }\n\n getGroupFields(): string[] {\n // do nothing\n return [];\n }\n\n getStackGroupFields(): string[] {\n // do nothing\n return [];\n }\n\n getStackValueField(): string {\n // do nothing\n return '';\n }\n\n onLayoutEnd(): void {\n super.onLayoutEnd();\n this.compile();\n this._dataChange = false;\n }\n\n getActiveMarks(): IMark[] {\n return [this._wordMark];\n }\n\n reInit() {\n super.reInit();\n if (this._keyWordColorCallback) {\n this._keyWordColorCallback = null;\n }\n\n if (this._fillingColorCallback) {\n this._fillingColorCallback = null;\n }\n\n this._wordMeasureCache?.clear();\n }\n\n release() {\n super.release();\n this._wordMeasureCache?.clear();\n this._wordMeasureCache = undefined;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/series/word-cloud/base.ts"],"names":[],"mappings":";;;AAEA,6CAAkE;AAClE,6CAA2C;AAC3C,8CAAsG;AACtG,wDAA0D;AAG1D,wCAA+C;AAC/C,qCAWkB;AAQlB,mDAAmD;AAEnD,iDAA6E;AAC7E,0DAA4D;AAC5D,qDAAiD;AACjD,yEAAoE;AACpE,yCAAiD;AAEjD,gDAA6C;AAE7C,6CAA+C;AAG/C,yDAA4D;AAC5D,sDAA4D;AAC5D,6EAAyE;AACzE,kDAAqD;AACrD,qCAAwC;AAIxC,MAAa,mBAAmF,SAAQ,wBAAa;IAArH;;QAoBY,mBAAc,GAA+B,CAAC,8BAAqB,EAAE,8BAAqB,CAAC,CAAC;QAU5F,sBAAiB,GAAY,KAAK,CAAC;QAYnC,gBAAW,GAAY,IAAI,CAAC;QAE5B,2BAAsB,GAAG,CAAC,MAAyB,EAAE,QAAiB,EAAE,EAAE;YAClF,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC;QAC5B,CAAC,CAAC;QAwNF,iBAAY,GAAG,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,CAAC;IACZ,CAAC;IAED,WAAW;QACT,KAAK,CAAC,WAAW,EAAE,CAAC;QACpB,IAAI,CAAC,OAAO,EAAE,CAAC;QACf,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;IAC3B,CAAC;IAED,cAAc;QACZ,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAC1B,CAAC;IAED,MAAM;;QACJ,KAAK,CAAC,MAAM,EAAE,CAAC;QACf,IAAI,IAAI,CAAC,qBAAqB,EAAE;YAC9B,IAAI,CAAC,qBAAqB,GAAG,IAAI,CAAC;SACnC;QAED,IAAI,IAAI,CAAC,qBAAqB,EAAE;YAC9B,IAAI,CAAC,qBAAqB,GAAG,IAAI,CAAC;SACnC;QAED,MAAA,IAAI,CAAC,iBAAiB,0CAAE,KAAK,EAAE,CAAC;IAClC,CAAC;IAED,OAAO;;QACL,KAAK,CAAC,OAAO,EAAE,CAAC;QAChB,MAAA,IAAI,CAAC,iBAAiB,0CAAE,KAAK,EAAE,CAAC;QAChC,IAAI,CAAC,iBAAiB,GAAG,SAAS,CAAC;IACrC,CAAC;;AA7fH,kDA8fC;AA7fiB,wBAAI,GAAkB,8BAAmB,CAAC;AAC1C,gCAAY,GAA0C,EAAE,SAAS,EAAT,sBAAS,EAAE,CAAC","file":"base.js","sourcesContent":["/* eslint-disable no-duplicate-imports */\nimport type { IPadding } from '@visactor/vutils';\nimport { isNil, isObject, isValidNumber } from '@visactor/vutils';\nimport { isValid } from '@visactor/vutils';\nimport { DEFAULT_DATA_INDEX, DEFAULT_DATA_KEY, DEFAULT_DATA_SERIES_FIELD } from '../../constant/data';\nimport { AttributeLevel } from '../../constant/attribute';\nimport type { SeriesMarkMap } from '../interface';\nimport { SeriesMarkNameEnum } from '../interface/type';\nimport { isTrueBrowser } from '../../util/env';\nimport {\n DEFAULT_DRAW_OUT_OF_BOUND,\n DEFAULT_FONTSIZE_RANGE,\n DEFAULT_FONT_PADDING,\n DEFAULT_FONT_WEIGHT_RANGE,\n DEFAULT_MASK_SHAPE,\n DEFAULT_MIN_FONT_SIZE,\n DEFAULT_RANDOM,\n DEFAULT_ROTATE_ANGLES,\n DEFAULT_ZOOM_TO_FIT,\n SHAPE_TYPE\n} from './config';\nimport type {\n IWordCloudSeriesSpec,\n IWordCloudSeriesTheme,\n WordCloudConfigType,\n WordCloudShapeConfigType,\n WordCloudShapeType\n} from './interface';\nimport { WordMeasureCache } from './measure-cache';\nimport type { Datum, IMarkSpec, IPoint, ITextMarkSpec } from '../../typings';\nimport { animationConfig, userAnimationConfig } from '../../animation/utils';\nimport { WORD_CLOUD_TEXT } from '../../constant/word-cloud';\nimport { BaseSeries } from '../base/base-series';\nimport { ColorOrdinalScale } from '../../scale/color-ordinal-scale';\nimport { wordCloudSeriesMark } from './constant';\nimport type { IStateAnimateSpec } from '../../animation/spec';\nimport { Factory } from '../../core/factory';\nimport type { IMark, IRectMark, ITextMark } from '../../mark/interface';\nimport { LinearScale } from '@visactor/vscale';\nimport type { GeometricMaskShape, TextShapeMask } from '@visactor/vlayouts';\nimport type { ITransformSpec } from '../../compile/interface';\nimport { createImage, vglobal } from '../../vrender-bridge';\nimport { getTextBounds } from '@visactor/vrender-core/text';\nimport { wordCloud } from '../../theme/builtin/common/series/word-cloud';\nimport { LayoutZIndex } from '../../constant/layout';\nimport { ChartEvent } from '../../core';\n\nexport type IBaseWordCloudSeriesSpec = Omit<IWordCloudSeriesSpec, 'type'> & { type: string };\n\nexport class BaseWordCloudSeries<T extends IBaseWordCloudSeriesSpec = IBaseWordCloudSeriesSpec> extends BaseSeries<T> {\n static readonly mark: SeriesMarkMap = wordCloudSeriesMark;\n static readonly builtInTheme: Record<string, IWordCloudSeriesTheme> = { wordCloud };\n\n protected _nameField: string;\n protected _valueField?: string;\n setValueField(field: string) {\n if (isValid(field)) {\n this._valueField = field;\n }\n }\n\n protected _colorMode: 'linear' | 'ordinal';\n protected _colorList: string[];\n protected _rotateAngles?: number[];\n protected _fontWeightRange?: [number, number];\n protected _textField?: string;\n protected _maskCanvas?: HTMLCanvasElement;\n protected _maskMark?: IRectMark;\n\n protected _fontSizeRange?: [number, number] | 'auto' = [DEFAULT_MIN_FONT_SIZE, DEFAULT_MIN_FONT_SIZE];\n setFontSizeRange(fontSizeRange: [number, number] | 'auto') {\n if (isValid(fontSizeRange)) {\n this._fontSizeRange = fontSizeRange;\n } else {\n this._fontSizeRange = DEFAULT_FONTSIZE_RANGE;\n }\n }\n\n protected _maskShape?: string | WordCloudShapeType | TextShapeMask | GeometricMaskShape;\n protected _isWordCloudShape: boolean = false;\n\n protected _wordCloudConfig?: WordCloudConfigType;\n protected _wordCloudShapeConfig?: WordCloudShapeConfigType;\n\n private _wordMeasureCache?: WordMeasureCache;\n\n protected _padding?: IPadding;\n protected _defaultFontFamily: string;\n\n protected _keyWordColorCallback: (datum: Datum) => string;\n protected _fillingColorCallback: (datum: Datum) => string;\n protected _dataChange: boolean = true;\n\n protected handleMaskCanvasUpdate = (canvas: HTMLCanvasElement, imageUrl?: string) => {\n this._maskCanvas = canvas;\n };\n /**\n * @override\n */\n setAttrFromSpec() {\n super.setAttrFromSpec();\n // series布局相关\n this._padding = this._option.getChart().padding;\n\n // 普通词云 & 形状词云 共有spec相关\n this._nameField = this._spec.nameField;\n this._colorMode = this._spec.colorMode ?? 'ordinal';\n this._colorList = this._spec.colorList;\n this.setValueField(this._spec.valueField);\n this._fontWeightRange = this._spec.fontWeightRange ?? DEFAULT_FONT_WEIGHT_RANGE;\n this._rotateAngles = this._spec.rotateAngles ?? DEFAULT_ROTATE_ANGLES;\n this.setFontSizeRange(this._spec.fontSizeRange);\n this._maskShape = this._spec.maskShape ?? DEFAULT_MASK_SHAPE;\n this._textField = this._spec.word?.formatMethod ? WORD_CLOUD_TEXT : this._nameField;\n const wordCloudConfig = this._spec.wordCloudConfig;\n // 普通词云spec相关\n this._wordCloudConfig = {\n drawOutOfBound: DEFAULT_DRAW_OUT_OF_BOUND,\n layoutMode: 'default',\n zoomToFit: DEFAULT_ZOOM_TO_FIT,\n ...this._spec.wordCloudConfig\n };\n\n if ((!wordCloudConfig || isNil(wordCloudConfig.layoutMode)) && !isTrueBrowser(this._option.mode)) {\n this._wordCloudConfig.layoutMode = 'fast';\n }\n\n // 形状词云spec相关\n this._wordCloudShapeConfig = {\n fillingSeriesField: this.getSeriesField(),\n fillingRotateAngles: DEFAULT_ROTATE_ANGLES,\n layoutMode: 'default',\n ...this._spec.wordCloudShapeConfig\n };\n\n this._isWordCloudShape =\n !SHAPE_TYPE.includes(this._maskShape as string) &&\n !['fast', 'grid', 'cloud'].includes(this._wordCloudConfig.layoutMode);\n this._defaultFontFamily = this._option.getTheme('fontFamily') as string;\n\n if (!this._wordMeasureCache) {\n this._wordMeasureCache = new WordMeasureCache(1000);\n }\n }\n\n /**\n * @override\n */\n protected initData(): void {\n super.initData();\n // data改变时, 需要重新编译, 重新布局\n this.getViewData()?.target?.addListener('change', () => {\n this._wordMeasureCache?.clear();\n this._dataChange = true;\n this.compile();\n });\n }\n\n protected _wordMark: ITextMark;\n\n initMark(): void {\n this._wordMark = this._createMark(\n BaseWordCloudSeries.mark.word,\n {\n key: DEFAULT_DATA_KEY,\n groupKey: this._seriesField,\n isSeriesMark: true\n },\n {\n morphElementKey: this._seriesField\n }\n ) as ITextMark;\n if (this._spec.wordMask?.visible) {\n this._maskMark = this._createMark(BaseWordCloudSeries.mark.wordMask, { dataView: false }) as IRectMark;\n\n this._maskMark.setMarkConfig({\n zIndex: LayoutZIndex.Mark - 1\n });\n }\n }\n\n initMarkStyle() {\n this.initMarkStyleOfWord(this._wordMark, this._spec.word, this._spec.colorHexField, this._seriesField);\n\n if (this._maskMark) {\n this.setMarkStyle(\n this._maskMark,\n {\n width: () => {\n return this._region.getLayoutRect().width;\n },\n height: () => {\n return this._region.getLayoutRect().height;\n },\n background: () => {\n return this._maskCanvas;\n }\n },\n 'normal',\n AttributeLevel.Series\n );\n }\n }\n\n initMarkStyleOfWord(\n wordMark: ITextMark,\n wordSpec?: IMarkSpec<ITextMarkSpec>,\n colorHexField?: string,\n seriesField?: string,\n isFillingWord?: boolean\n ): void {\n if (!wordMark) {\n return;\n }\n this.setMarkStyle(\n wordMark,\n {\n text: (wordSpec as any)?.formatMethod\n ? (datum: Datum) => {\n return (wordSpec as any).formatMethod(datum);\n }\n : (datum: Datum) => datum[this._textField],\n x: (datum: Datum) => datum.x,\n y: (datum: Datum) => datum.y,\n fontSize: (datum: Datum) => datum.fontSize,\n fontStyle: (datum: Datum) => datum.fontStyle,\n\n angle: (datum: Datum) => datum.angle,\n visible: (datum: Datum) => datum.visible\n },\n 'normal',\n AttributeLevel.Series\n );\n this.setMarkStyle(\n wordMark,\n {\n fill: wordSpec?.style?.fill ?? this.getWordColor,\n // style和field相关的配置都已经传给vgrammar, 所以这里直接拿结果就可以\n fontWeight: (datum: Datum) => datum.fontWeight,\n fontFamily: (datum: Datum) => datum.fontFamily\n },\n 'normal',\n AttributeLevel.User_Mark\n );\n }\n\n protected initTooltip() {\n super.initTooltip();\n\n this._wordMark && this._tooltipHelper.activeTriggerSet.mark.add(this._wordMark);\n }\n\n initAnimation() {\n [this._wordMark].forEach(mark => {\n if (mark) {\n const appearPreset = (this._spec?.animationAppear as IStateAnimateSpec<any>)?.preset;\n const params = {\n animationConfig: () => mark.getAnimationConfig()?.appear?.[0]\n };\n mark.setAnimationConfig(\n animationConfig(\n Factory.getAnimationInKey('wordCloud')(params, appearPreset),\n userAnimationConfig(SeriesMarkNameEnum.word, this._spec, this._markAttributeContext)\n )\n );\n }\n });\n }\n\n protected getWordOrdinalColorScale(field: string, isFillingWord: boolean) {\n const colorList = isFillingWord ? this._wordCloudShapeConfig.fillingColorList : this._colorList;\n const colorDomain = field ? this.getViewData()?.latestData.map((datum: Datum) => datum[field]) : [];\n const colorRange = colorList ?? this._option.globalScale.getScale('color')?.range() ?? this._getDataScheme();\n return new ColorOrdinalScale().domain(colorDomain).range?.(colorRange);\n }\n\n protected initColorCallback(field: string, isFillingWord: boolean) {\n if (this._colorMode === 'ordinal') {\n const scale = this.getWordOrdinalColorScale(field, isFillingWord);\n return (datum: Datum) => {\n return scale.scale(datum[field ?? DEFAULT_DATA_SERIES_FIELD]);\n };\n }\n\n const colorList =\n (isFillingWord ? this._colorList : this._wordCloudShapeConfig.fillingColorList) ??\n this._option.globalScale.getScale('color').range();\n\n if (colorList.length === 1) {\n return (datum: Datum) => colorList[0];\n }\n\n if (this._valueField) {\n const stats = this.getRawDataStatisticsByField(this._valueField, true);\n if (stats.min === stats.max) {\n return colorList[0];\n }\n const scale = new LinearScale().domain([stats.min, stats.max]).range(colorList);\n\n return (datum: Datum) => {\n return scale.scale(datum[this._valueField]);\n };\n }\n\n const scale = new LinearScale().domain([0, this.getViewData()?.latestData?.length ?? 1]).range(colorList);\n\n return (datum: Datum) => {\n return scale.scale(datum[DEFAULT_DATA_INDEX]);\n };\n }\n\n getWordColor = (datum: Datum) => {\n if (datum.isFillingWord) {\n if (!this._fillingColorCallback || this._dataChange) {\n // 如果updateData数据变更了, 颜色映射也需要重新计算\n this._fillingColorCallback = this._wordCloudShapeConfig.fillingColorHexField\n ? (datum: Datum) => datum[this._wordCloudShapeConfig.fillingColorHexField]\n : this.initColorCallback(this._wordCloudShapeConfig.fillingSeriesField, true);\n }\n\n return this._fillingColorCallback(datum);\n }\n\n if (!this._keyWordColorCallback || this._dataChange) {\n // 如果updateData数据变更了, 颜色映射也需要重新计算\n this._keyWordColorCallback = this._spec.colorHexField\n ? datum => datum[this._spec.colorHexField]\n : this.initColorCallback(this._seriesField, false);\n }\n\n return this._keyWordColorCallback(datum);\n };\n\n private _calculateFontWeight = (datum: Datum) => {\n const stats = this.getRawDataStatisticsByField(this._valueField, true);\n\n if (stats.min === stats.max) {\n return this._fontWeightRange[0];\n }\n\n return (\n this._fontWeightRange[0] +\n ((this._fontWeightRange[this._fontWeightRange.length - 1] - this._fontWeightRange[0]) *\n (datum[this._valueField] - stats.min)) /\n (stats.max - stats.min)\n );\n };\n\n compile(): void {\n super.compile();\n const { width, height } = this._region.getLayoutRect();\n // 非正常尺寸下不进行布局\n if (!isValidNumber(width) || !isValidNumber(height) || !(height > 0 && width > 0)) {\n return;\n }\n\n const wordCloudTransforms: ITransformSpec[] = [];\n\n // 词云 transform\n if (!this._isWordCloudShape) {\n wordCloudTransforms.push({\n type: 'wordcloud',\n ...this._wordCloudTransformOption()\n });\n }\n // 形状词云 transform\n else {\n wordCloudTransforms.push({\n type: 'wordcloudShape',\n // 形状词云中必须要传入dataIndexKey, 否则填充词无法绘制\n ...this._wordCloudShapeTransformOption()\n });\n }\n\n // 挂到mark的transform上\n this._wordMark.setTransform(wordCloudTransforms);\n }\n\n protected _getCommonTransformOptions(): any {\n const { width, height } = this._region.getLayoutRect();\n const wordSpec = this._spec.word ?? {};\n const wordStyleSpec = wordSpec.style ?? {};\n\n return {\n size: [width, height],\n shape:\n isObject(this._maskShape) &&\n (this._maskShape as TextShapeMask).type === 'text' &&\n isNil((this._maskShape as TextShapeMask).fontFamily)\n ? {\n fontFamily: this._option.getTheme('fontFamily'),\n ...this._maskShape\n }\n : this._maskShape,\n onUpdateMaskCanvas: this.handleMaskCanvasUpdate,\n onLayoutFinished: () => {\n const afterWordcloudShapeDraw = () => {\n // 需要等到真正渲染完成\n this._option.globalInstance.getStage().hooks.afterRender.taps = this._option.globalInstance\n .getStage()\n .hooks.afterRender.taps.filter(tap => tap.fn !== afterWordcloudShapeDraw);\n\n this._option.dispatchEvent?.(ChartEvent.afterWordcloudShapeDraw, {\n instance: this._option.globalInstance\n });\n this._option.globalInstance\n .getChart()\n .getOption()\n .performanceHook?.afterWordcloudShapeDraw?.(this._option.globalInstance);\n };\n this._option.globalInstance.getStage().hooks.afterRender.taps.push({\n type: 'sync',\n name: 'afterWordcloudShapeDraw',\n fn: afterWordcloudShapeDraw\n });\n },\n dataIndexKey: DEFAULT_DATA_KEY,\n text: wordSpec.formatMethod\n ? (datum: Datum) => {\n return wordSpec.formatMethod(datum);\n }\n : { field: this._textField },\n fontSize: this._valueField ? { field: this._valueField } : this._fontSizeRange[0],\n fontSizeRange: this._fontSizeRange === 'auto' ? null : this._fontSizeRange,\n\n padding: this._spec.word?.padding ?? DEFAULT_FONT_PADDING,\n fontFamily: isValid(this._spec.fontFamilyField)\n ? { field: this._spec.fontFamilyField }\n : wordStyleSpec.fontFamily ?? this._defaultFontFamily,\n // 为了保持和旧版逻辑一致,优先级如下: spec field > mark style > default (根据valueField映射)\n fontWeight: isValid(this._spec.fontWeightField)\n ? { field: this._spec.fontWeightField }\n : isValid(wordStyleSpec.fontWeight)\n ? wordStyleSpec.fontWeight\n : isValid(this._valueField)\n ? this._calculateFontWeight\n : 'normal',\n fontStyle: isValid(this._spec.fontStyleField) ? { field: this._spec.fontStyleField } : wordStyleSpec.fontStyle,\n createCanvas: vglobal.createCanvas.bind(vglobal),\n getTextBounds\n };\n }\n\n protected _wordCloudTransformOption(): Object {\n const wordCloudConfig = this._wordCloudConfig ?? {};\n\n return {\n ...wordCloudConfig,\n ...this._getCommonTransformOptions(),\n // TIP: 非浏览器环境下,使用 fast 布局,否则会出现兼容问题\n layoutType: this._wordCloudConfig.layoutMode,\n\n rotate: this._rotateAngles,\n\n randomVisible: this._spec.random ?? DEFAULT_RANDOM,\n clip: this._wordCloudConfig.drawOutOfBound === 'clip',\n shrink: this._wordCloudConfig.zoomToFit.shrink,\n enlarge: this._wordCloudConfig.zoomToFit.enlarge,\n minFontSize: this._wordCloudConfig.zoomToFit.fontSizeLimitMin,\n progressiveTime: this._wordCloudConfig.progressiveTime,\n progressiveStep: this._wordCloudConfig.progressiveStep,\n repeatFill: this._wordCloudConfig.zoomToFit.repeat\n };\n }\n\n protected _wordCloudShapeTransformOption(): Object {\n const fillingWordStyleSpec = this._spec.fillingWord?.style ?? {};\n const wordCloudShapeConfig = this._wordCloudShapeConfig ?? {};\n\n return {\n ...wordCloudShapeConfig,\n ...this._getCommonTransformOptions(),\n createImage,\n measureCache: this._wordMeasureCache,\n\n rotateList: this._rotateAngles,\n fillingRotateList: wordCloudShapeConfig.fillingRotateAngles,\n\n fillingFontFamily: isValid(wordCloudShapeConfig.fillingFontFamilyField)\n ? { field: wordCloudShapeConfig.fillingFontFamilyField }\n : fillingWordStyleSpec.fontFamily ?? this._defaultFontFamily,\n fillingPadding: this._spec.fillingWord?.padding ?? DEFAULT_FONT_PADDING,\n fillingFontStyle: isValid(wordCloudShapeConfig.fillingFontStyleField)\n ? { field: wordCloudShapeConfig.fillingFontStyleField }\n : fillingWordStyleSpec.fontStyle,\n // 如果配置了字段映射,优先按照映射进行展示\n fillingFontWeight: isValid(wordCloudShapeConfig.fillingFontWeightField)\n ? {\n field: wordCloudShapeConfig.fillingFontWeightField\n }\n : fillingWordStyleSpec.fontWeight // 填充词fontWeight默认不跟随valueField\n };\n }\n\n getStatisticFields() {\n const fields: { key: string; operations: Array<'max' | 'min' | 'values'> }[] = [];\n fields.push({ key: this._nameField, operations: ['values'] });\n fields.push({ key: this._valueField, operations: ['max', 'min'] });\n return fields;\n }\n dataToPosition(data: Datum): IPoint {\n return null;\n }\n dataToPositionX(data: any): number {\n return null;\n }\n dataToPositionY(data: any): number {\n return null;\n }\n dataToPositionZ(data: any): number {\n return null;\n }\n valueToPosition(value1: any, value2?: any): IPoint {\n return null;\n }\n\n getGroupFields(): string[] {\n // do nothing\n return [];\n }\n\n getStackGroupFields(): string[] {\n // do nothing\n return [];\n }\n\n getStackValueField(): string {\n // do nothing\n return '';\n }\n\n onLayoutEnd(): void {\n super.onLayoutEnd();\n this.compile();\n this._dataChange = false;\n }\n\n getActiveMarks(): IMark[] {\n return [this._wordMark];\n }\n\n reInit() {\n super.reInit();\n if (this._keyWordColorCallback) {\n this._keyWordColorCallback = null;\n }\n\n if (this._fillingColorCallback) {\n this._fillingColorCallback = null;\n }\n\n this._wordMeasureCache?.clear();\n }\n\n release() {\n super.release();\n this._wordMeasureCache?.clear();\n this._wordMeasureCache = undefined;\n }\n}\n"]}
|
package/cjs/util/env.js
CHANGED
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: !0
|
|
5
5
|
}), exports.isMiniAppLikeMode = exports.isMobileLikeMode = exports.isPcLikeMode = exports.isTrueBrowser = exports.domDocument = exports.isBrowser = void 0;
|
|
6
6
|
|
|
7
|
-
const
|
|
7
|
+
const env_1 = require("@visactor/vrender-core/env");
|
|
8
8
|
|
|
9
9
|
function isTrueBrowser(mode) {
|
|
10
10
|
return ("desktop-browser" === mode || "mobile-browser" === mode) && exports.isBrowser;
|
|
@@ -22,7 +22,7 @@ function isMiniAppLikeMode(mode) {
|
|
|
22
22
|
return mode.includes("miniApp") || "lynx" === mode || "wx" === mode || "harmony" === mode;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
exports.isBrowser = (0,
|
|
25
|
+
exports.isBrowser = (0, env_1.isBrowserEnv)(), exports.domDocument = exports.isBrowser && globalThis ? globalThis.document : void 0,
|
|
26
26
|
exports.isTrueBrowser = isTrueBrowser, exports.isPcLikeMode = isPcLikeMode, exports.isMobileLikeMode = isMobileLikeMode,
|
|
27
27
|
exports.isMiniAppLikeMode = isMiniAppLikeMode;
|
|
28
28
|
//# sourceMappingURL=env.js.map
|
package/cjs/util/env.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/util/env.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"sources":["../src/util/env.ts"],"names":[],"mappings":";;;AAAA,oDAA0D;AAG7C,QAAA,SAAS,GAAG,IAAA,kBAAY,GAAE,CAAC;AAC3B,QAAA,WAAW,GAAG,iBAAS,IAAI,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;AAGrF,SAAgB,aAAa,CAAC,IAAgB;IAC5C,OAAO,CAAC,IAAI,KAAK,iBAAiB,IAAI,IAAI,KAAK,gBAAgB,CAAC,IAAI,iBAAS,CAAC;AAChF,CAAC;AAFD,sCAEC;AAED,SAAgB,YAAY,CAAC,IAAgB;IAC3C,OAAO,IAAI,KAAK,iBAAiB,IAAI,IAAI,KAAK,iBAAiB,CAAC;AAClE,CAAC;AAFD,oCAEC;AAED,SAAgB,gBAAgB,CAAC,IAAgB;IAC/C,OAAO,iBAAiB,CAAC,IAAI,CAAC,IAAI,IAAI,KAAK,gBAAgB,CAAC;AAC9D,CAAC;AAFD,4CAEC;AAED,SAAgB,iBAAiB,CAAC,IAAgB;IAChD,OAAO,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,IAAI,KAAK,MAAM,IAAI,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,SAAS,CAAC;AAC5F,CAAC;AAFD,8CAEC","file":"env.js","sourcesContent":["import { isBrowserEnv } from '@visactor/vrender-core/env';\nimport type { RenderMode } from '../typings/spec';\n\nexport const isBrowser = isBrowserEnv();\nexport const domDocument = isBrowser && globalThis ? globalThis.document : undefined;\n\n// Taro 会模拟实现 DOM,所以还是加上 mode 的判断\nexport function isTrueBrowser(mode: RenderMode): boolean {\n return (mode === 'desktop-browser' || mode === 'mobile-browser') && isBrowser;\n}\n\nexport function isPcLikeMode(mode: RenderMode) {\n return mode === 'desktop-miniApp' || mode === 'desktop-browser';\n}\n\nexport function isMobileLikeMode(mode: RenderMode) {\n return isMiniAppLikeMode(mode) || mode === 'mobile-browser';\n}\n\nexport function isMiniAppLikeMode(mode: RenderMode) {\n return mode.includes('miniApp') || mode === 'lynx' || mode === 'wx' || mode === 'harmony';\n}\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createArc, createArea, createGlyph, createGraphic, createGroup, createImage, createLine, createPath, createPolygon, createRect, createRichText, createSymbol, createText, graphicCreator } from '@visactor/vrender-core/graphic/creator';
|
|
2
|
+
import { vglobal } from '@visactor/vrender-core/global';
|
|
3
|
+
import { CustomPath2D } from '@visactor/vrender-core/path';
|
|
4
|
+
import { registerHtmlAttributePlugin, registerReactAttributePlugin } from '@visactor/vrender-core/plugin/attribute';
|
|
5
|
+
import { registerAnimate as registerVRenderAnimate } from '@visactor/vrender-animate/register';
|
|
6
|
+
import type { IArc3d, IArc3dGraphicAttribute, IPyramid3d, IPyramid3dGraphicAttribute, IRect3d, IRect3dGraphicAttribute, IStage } from '@visactor/vrender-core';
|
|
7
|
+
export { createArc, createArea, createGlyph, createGraphic, createGroup, createImage, createLine, createPath, createPolygon, createRect, createRichText, createSymbol, createText, graphicCreator, CustomPath2D, registerHtmlAttributePlugin, registerReactAttributePlugin, registerVRenderAnimate, vglobal };
|
|
8
|
+
export declare const createArc3d: (attributes: IArc3dGraphicAttribute) => IArc3d;
|
|
9
|
+
export declare const createPyramid3d: (attributes: IPyramid3dGraphicAttribute) => IPyramid3d;
|
|
10
|
+
export declare const createRect3d: (attributes: IRect3dGraphicAttribute) => IRect3d;
|
|
11
|
+
export declare const waitForAllSubLayers: (stage: IStage) => Promise<null[]>;
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: !0
|
|
5
|
+
}), exports.waitForAllSubLayers = exports.createRect3d = exports.createPyramid3d = exports.createArc3d = exports.vglobal = exports.registerVRenderAnimate = exports.registerReactAttributePlugin = exports.registerHtmlAttributePlugin = exports.CustomPath2D = exports.graphicCreator = exports.createText = exports.createSymbol = exports.createRichText = exports.createRect = exports.createPolygon = exports.createPath = exports.createLine = exports.createImage = exports.createGroup = exports.createGraphic = exports.createGlyph = exports.createArea = exports.createArc = void 0;
|
|
6
|
+
|
|
7
|
+
const creator_1 = require("@visactor/vrender-core/graphic/creator");
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, "createArc", {
|
|
10
|
+
enumerable: !0,
|
|
11
|
+
get: function() {
|
|
12
|
+
return creator_1.createArc;
|
|
13
|
+
}
|
|
14
|
+
}), Object.defineProperty(exports, "createArea", {
|
|
15
|
+
enumerable: !0,
|
|
16
|
+
get: function() {
|
|
17
|
+
return creator_1.createArea;
|
|
18
|
+
}
|
|
19
|
+
}), Object.defineProperty(exports, "createGlyph", {
|
|
20
|
+
enumerable: !0,
|
|
21
|
+
get: function() {
|
|
22
|
+
return creator_1.createGlyph;
|
|
23
|
+
}
|
|
24
|
+
}), Object.defineProperty(exports, "createGraphic", {
|
|
25
|
+
enumerable: !0,
|
|
26
|
+
get: function() {
|
|
27
|
+
return creator_1.createGraphic;
|
|
28
|
+
}
|
|
29
|
+
}), Object.defineProperty(exports, "createGroup", {
|
|
30
|
+
enumerable: !0,
|
|
31
|
+
get: function() {
|
|
32
|
+
return creator_1.createGroup;
|
|
33
|
+
}
|
|
34
|
+
}), Object.defineProperty(exports, "createImage", {
|
|
35
|
+
enumerable: !0,
|
|
36
|
+
get: function() {
|
|
37
|
+
return creator_1.createImage;
|
|
38
|
+
}
|
|
39
|
+
}), Object.defineProperty(exports, "createLine", {
|
|
40
|
+
enumerable: !0,
|
|
41
|
+
get: function() {
|
|
42
|
+
return creator_1.createLine;
|
|
43
|
+
}
|
|
44
|
+
}), Object.defineProperty(exports, "createPath", {
|
|
45
|
+
enumerable: !0,
|
|
46
|
+
get: function() {
|
|
47
|
+
return creator_1.createPath;
|
|
48
|
+
}
|
|
49
|
+
}), Object.defineProperty(exports, "createPolygon", {
|
|
50
|
+
enumerable: !0,
|
|
51
|
+
get: function() {
|
|
52
|
+
return creator_1.createPolygon;
|
|
53
|
+
}
|
|
54
|
+
}), Object.defineProperty(exports, "createRect", {
|
|
55
|
+
enumerable: !0,
|
|
56
|
+
get: function() {
|
|
57
|
+
return creator_1.createRect;
|
|
58
|
+
}
|
|
59
|
+
}), Object.defineProperty(exports, "createRichText", {
|
|
60
|
+
enumerable: !0,
|
|
61
|
+
get: function() {
|
|
62
|
+
return creator_1.createRichText;
|
|
63
|
+
}
|
|
64
|
+
}), Object.defineProperty(exports, "createSymbol", {
|
|
65
|
+
enumerable: !0,
|
|
66
|
+
get: function() {
|
|
67
|
+
return creator_1.createSymbol;
|
|
68
|
+
}
|
|
69
|
+
}), Object.defineProperty(exports, "createText", {
|
|
70
|
+
enumerable: !0,
|
|
71
|
+
get: function() {
|
|
72
|
+
return creator_1.createText;
|
|
73
|
+
}
|
|
74
|
+
}), Object.defineProperty(exports, "graphicCreator", {
|
|
75
|
+
enumerable: !0,
|
|
76
|
+
get: function() {
|
|
77
|
+
return creator_1.graphicCreator;
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
const global_1 = require("@visactor/vrender-core/global");
|
|
82
|
+
|
|
83
|
+
Object.defineProperty(exports, "vglobal", {
|
|
84
|
+
enumerable: !0,
|
|
85
|
+
get: function() {
|
|
86
|
+
return global_1.vglobal;
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
const path_1 = require("@visactor/vrender-core/path");
|
|
91
|
+
|
|
92
|
+
Object.defineProperty(exports, "CustomPath2D", {
|
|
93
|
+
enumerable: !0,
|
|
94
|
+
get: function() {
|
|
95
|
+
return path_1.CustomPath2D;
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
const attribute_1 = require("@visactor/vrender-core/plugin/attribute");
|
|
100
|
+
|
|
101
|
+
Object.defineProperty(exports, "registerHtmlAttributePlugin", {
|
|
102
|
+
enumerable: !0,
|
|
103
|
+
get: function() {
|
|
104
|
+
return attribute_1.registerHtmlAttributePlugin;
|
|
105
|
+
}
|
|
106
|
+
}), Object.defineProperty(exports, "registerReactAttributePlugin", {
|
|
107
|
+
enumerable: !0,
|
|
108
|
+
get: function() {
|
|
109
|
+
return attribute_1.registerReactAttributePlugin;
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
const register_1 = require("@visactor/vrender-animate/register");
|
|
114
|
+
|
|
115
|
+
Object.defineProperty(exports, "registerVRenderAnimate", {
|
|
116
|
+
enumerable: !0,
|
|
117
|
+
get: function() {
|
|
118
|
+
return register_1.registerAnimate;
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
const register_arc3d_1 = require("@visactor/vrender-kits/register/register-arc3d"), register_pyramid3d_1 = require("@visactor/vrender-kits/register/register-pyramid3d"), register_rect3d_1 = require("@visactor/vrender-kits/register/register-rect3d"), createArc3d = attributes => ((0,
|
|
123
|
+
register_arc3d_1.registerArc3d)(), (0, creator_1.createGraphic)("arc3d", attributes));
|
|
124
|
+
|
|
125
|
+
exports.createArc3d = createArc3d;
|
|
126
|
+
|
|
127
|
+
const createPyramid3d = attributes => ((0, register_pyramid3d_1.registerPyramid3d)(),
|
|
128
|
+
(0, creator_1.createGraphic)("pyramid3d", attributes));
|
|
129
|
+
|
|
130
|
+
exports.createPyramid3d = createPyramid3d;
|
|
131
|
+
|
|
132
|
+
const createRect3d = attributes => ((0, register_rect3d_1.registerRect3d)(), (0,
|
|
133
|
+
creator_1.createGraphic)("rect3d", attributes));
|
|
134
|
+
|
|
135
|
+
exports.createRect3d = createRect3d;
|
|
136
|
+
|
|
137
|
+
const waitForAllSubLayers = stage => new Promise((resolve => {
|
|
138
|
+
global_1.vglobal.getRequestAnimationFrame()((() => {
|
|
139
|
+
resolve(null);
|
|
140
|
+
}));
|
|
141
|
+
})).then((() => {
|
|
142
|
+
const promiseList = [];
|
|
143
|
+
return stage.getChildren().forEach((layer => {
|
|
144
|
+
var _a;
|
|
145
|
+
(null === (_a = layer.subLayers) || void 0 === _a ? void 0 : _a.size) && layer.subLayers.forEach((subLayer => {
|
|
146
|
+
const drawContribution = subLayer.drawContribution;
|
|
147
|
+
(null == drawContribution ? void 0 : drawContribution.hooks) && drawContribution.rendering && promiseList.push(new Promise((resolve => {
|
|
148
|
+
drawContribution.hooks.completeDraw.tap("outWait", (() => {
|
|
149
|
+
drawContribution.hooks.completeDraw.taps = drawContribution.hooks.completeDraw.taps.filter((item => "outWait" !== item.name)),
|
|
150
|
+
resolve(null);
|
|
151
|
+
}));
|
|
152
|
+
})));
|
|
153
|
+
}));
|
|
154
|
+
})), Promise.all(promiseList);
|
|
155
|
+
}));
|
|
156
|
+
|
|
157
|
+
exports.waitForAllSubLayers = waitForAllSubLayers;
|
|
158
|
+
//# sourceMappingURL=vrender-bridge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/vrender-bridge.ts"],"names":[],"mappings":";;;AAAA,oEAegD;AAmB9C,0FAjCA,mBAAS,OAiCA;AACT,2FAjCA,oBAAU,OAiCA;AACV,4FAjCA,qBAAW,OAiCA;AACX,8FAjCA,uBAAa,OAiCA;AACb,4FAjCA,qBAAW,OAiCA;AACX,4FAjCA,qBAAW,OAiCA;AACX,2FAjCA,oBAAU,OAiCA;AACV,2FAjCA,oBAAU,OAiCA;AACV,8FAjCA,uBAAa,OAiCA;AACb,2FAjCA,oBAAU,OAiCA;AACV,+FAjCA,wBAAc,OAiCA;AACd,6FAjCA,sBAAY,OAiCA;AACZ,2FAjCA,oBAAU,OAiCA;AACV,+FAjCA,wBAAc,OAiCA;AA/BhB,0DAAwD;AAoCtD,wFApCO,gBAAO,OAoCP;AAnCT,sDAA2D;AA+BzD,6FA/BO,mBAAY,OA+BP;AA9Bd,uEAAoH;AA+BlH,4GA/BO,uCAA2B,OA+BP;AAC3B,6GAhCoC,wCAA4B,OAgCpC;AA/B9B,iEAA+F;AAgC7F,uGAhC0B,0BAAsB,OAgC1B;AA/BxB,mFAA+E;AAC/E,2FAAuF;AACvF,qFAAiF;AAiC1E,MAAM,WAAW,GAAG,CAAC,UAAkC,EAAU,EAAE;IACxE,IAAA,8BAAa,GAAE,CAAC;IAChB,OAAO,IAAA,uBAAa,EAAC,OAAO,EAAE,UAAU,CAAW,CAAC;AACtD,CAAC,CAAC;AAHW,QAAA,WAAW,eAGtB;AAEK,MAAM,eAAe,GAAG,CAAC,UAAsC,EAAc,EAAE;IACpF,IAAA,sCAAiB,GAAE,CAAC;IACpB,OAAO,IAAA,uBAAa,EAAC,WAAW,EAAE,UAAU,CAAe,CAAC;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AE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,SAAS,CACpD,CAAC;wBACF,OAAO,CAAC,IAAI,CAAC,CAAC;oBAChB,CAAC,CAAC,CAAC;gBACL,CAAC,CAAC,CACH,CAAC;aACH;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;AAClC,CAAC,CAAC,CAAC;AAhCQ,QAAA,mBAAmB,uBAgC3B","file":"vrender-bridge.js","sourcesContent":["import {\n createArc,\n createArea,\n createGlyph,\n createGraphic,\n createGroup,\n createImage,\n createLine,\n createPath,\n createPolygon,\n createRect,\n createRichText,\n createSymbol,\n createText,\n graphicCreator\n} from '@visactor/vrender-core/graphic/creator';\nimport { vglobal } from '@visactor/vrender-core/global';\nimport { CustomPath2D } from '@visactor/vrender-core/path';\nimport { registerHtmlAttributePlugin, registerReactAttributePlugin } from '@visactor/vrender-core/plugin/attribute';\nimport { registerAnimate as registerVRenderAnimate } from '@visactor/vrender-animate/register';\nimport { registerArc3d } from '@visactor/vrender-kits/register/register-arc3d';\nimport { registerPyramid3d } from '@visactor/vrender-kits/register/register-pyramid3d';\nimport { registerRect3d } from '@visactor/vrender-kits/register/register-rect3d';\nimport type {\n IArc3d,\n IArc3dGraphicAttribute,\n IPyramid3d,\n IPyramid3dGraphicAttribute,\n IRect3d,\n IRect3dGraphicAttribute,\n IStage\n} from '@visactor/vrender-core';\n\nexport {\n createArc,\n createArea,\n createGlyph,\n createGraphic,\n createGroup,\n createImage,\n createLine,\n createPath,\n createPolygon,\n createRect,\n createRichText,\n createSymbol,\n createText,\n graphicCreator,\n CustomPath2D,\n registerHtmlAttributePlugin,\n registerReactAttributePlugin,\n registerVRenderAnimate,\n vglobal\n};\n\nexport const createArc3d = (attributes: IArc3dGraphicAttribute): IArc3d => {\n registerArc3d();\n return createGraphic('arc3d', attributes) as IArc3d;\n};\n\nexport const createPyramid3d = (attributes: IPyramid3dGraphicAttribute): IPyramid3d => {\n registerPyramid3d();\n return createGraphic('pyramid3d', attributes) as IPyramid3d;\n};\n\nexport const createRect3d = (attributes: IRect3dGraphicAttribute): IRect3d => {\n registerRect3d();\n return createGraphic('rect3d', attributes) as IRect3d;\n};\n\nexport const waitForAllSubLayers = (stage: IStage) =>\n new Promise(resolve => {\n vglobal.getRequestAnimationFrame()(() => {\n resolve(null);\n });\n }).then(() => {\n const promiseList: Promise<null>[] = [];\n const layers = stage.getChildren();\n\n layers.forEach((layer: any) => {\n if (!layer.subLayers?.size) {\n return;\n }\n\n layer.subLayers.forEach((subLayer: any) => {\n const drawContribution = subLayer.drawContribution;\n if (drawContribution?.hooks && drawContribution.rendering) {\n promiseList.push(\n new Promise(resolve => {\n drawContribution.hooks.completeDraw.tap('outWait', () => {\n drawContribution.hooks.completeDraw.taps = drawContribution.hooks.completeDraw.taps.filter(\n (item: { name: string }) => item.name !== 'outWait'\n );\n resolve(null);\n });\n })\n );\n }\n });\n });\n\n return Promise.all(promiseList);\n });\n"]}
|
package/cjs/vrender-tools.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { randomOpacity, columnLeftToRight, columnRightToLeft, rowTopToBottom, rowBottomToTop, diagonalCenterToEdge, diagonalTopLeftToBottomRight, rotationScan, rippleEffect, snakeWave, alternatingWave, spiralEffect, columnEdgeToCenter, columnCenterToEdge, rowEdgeToCenter, rowCenterToEdge, cornerToCenter, centerToCorner, pulseWave, particleEffect } from '@visactor/vrender-kits';
|
|
1
|
+
export { randomOpacity, columnLeftToRight, columnRightToLeft, rowTopToBottom, rowBottomToTop, diagonalCenterToEdge, diagonalTopLeftToBottomRight, rotationScan, rippleEffect, snakeWave, alternatingWave, spiralEffect, columnEdgeToCenter, columnCenterToEdge, rowEdgeToCenter, rowCenterToEdge, cornerToCenter, centerToCorner, pulseWave, particleEffect } from '@visactor/vrender-kits/tools/dynamicTexture/effect';
|
package/cjs/vrender-tools.js
CHANGED
|
@@ -4,107 +4,107 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: !0
|
|
5
5
|
}), exports.particleEffect = exports.pulseWave = exports.centerToCorner = exports.cornerToCenter = exports.rowCenterToEdge = exports.rowEdgeToCenter = exports.columnCenterToEdge = exports.columnEdgeToCenter = exports.spiralEffect = exports.alternatingWave = exports.snakeWave = exports.rippleEffect = exports.rotationScan = exports.diagonalTopLeftToBottomRight = exports.diagonalCenterToEdge = exports.rowBottomToTop = exports.rowTopToBottom = exports.columnRightToLeft = exports.columnLeftToRight = exports.randomOpacity = void 0;
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var effect_1 = require("@visactor/vrender-kits/tools/dynamicTexture/effect");
|
|
8
8
|
|
|
9
9
|
Object.defineProperty(exports, "randomOpacity", {
|
|
10
10
|
enumerable: !0,
|
|
11
11
|
get: function() {
|
|
12
|
-
return
|
|
12
|
+
return effect_1.randomOpacity;
|
|
13
13
|
}
|
|
14
14
|
}), Object.defineProperty(exports, "columnLeftToRight", {
|
|
15
15
|
enumerable: !0,
|
|
16
16
|
get: function() {
|
|
17
|
-
return
|
|
17
|
+
return effect_1.columnLeftToRight;
|
|
18
18
|
}
|
|
19
19
|
}), Object.defineProperty(exports, "columnRightToLeft", {
|
|
20
20
|
enumerable: !0,
|
|
21
21
|
get: function() {
|
|
22
|
-
return
|
|
22
|
+
return effect_1.columnRightToLeft;
|
|
23
23
|
}
|
|
24
24
|
}), Object.defineProperty(exports, "rowTopToBottom", {
|
|
25
25
|
enumerable: !0,
|
|
26
26
|
get: function() {
|
|
27
|
-
return
|
|
27
|
+
return effect_1.rowTopToBottom;
|
|
28
28
|
}
|
|
29
29
|
}), Object.defineProperty(exports, "rowBottomToTop", {
|
|
30
30
|
enumerable: !0,
|
|
31
31
|
get: function() {
|
|
32
|
-
return
|
|
32
|
+
return effect_1.rowBottomToTop;
|
|
33
33
|
}
|
|
34
34
|
}), Object.defineProperty(exports, "diagonalCenterToEdge", {
|
|
35
35
|
enumerable: !0,
|
|
36
36
|
get: function() {
|
|
37
|
-
return
|
|
37
|
+
return effect_1.diagonalCenterToEdge;
|
|
38
38
|
}
|
|
39
39
|
}), Object.defineProperty(exports, "diagonalTopLeftToBottomRight", {
|
|
40
40
|
enumerable: !0,
|
|
41
41
|
get: function() {
|
|
42
|
-
return
|
|
42
|
+
return effect_1.diagonalTopLeftToBottomRight;
|
|
43
43
|
}
|
|
44
44
|
}), Object.defineProperty(exports, "rotationScan", {
|
|
45
45
|
enumerable: !0,
|
|
46
46
|
get: function() {
|
|
47
|
-
return
|
|
47
|
+
return effect_1.rotationScan;
|
|
48
48
|
}
|
|
49
49
|
}), Object.defineProperty(exports, "rippleEffect", {
|
|
50
50
|
enumerable: !0,
|
|
51
51
|
get: function() {
|
|
52
|
-
return
|
|
52
|
+
return effect_1.rippleEffect;
|
|
53
53
|
}
|
|
54
54
|
}), Object.defineProperty(exports, "snakeWave", {
|
|
55
55
|
enumerable: !0,
|
|
56
56
|
get: function() {
|
|
57
|
-
return
|
|
57
|
+
return effect_1.snakeWave;
|
|
58
58
|
}
|
|
59
59
|
}), Object.defineProperty(exports, "alternatingWave", {
|
|
60
60
|
enumerable: !0,
|
|
61
61
|
get: function() {
|
|
62
|
-
return
|
|
62
|
+
return effect_1.alternatingWave;
|
|
63
63
|
}
|
|
64
64
|
}), Object.defineProperty(exports, "spiralEffect", {
|
|
65
65
|
enumerable: !0,
|
|
66
66
|
get: function() {
|
|
67
|
-
return
|
|
67
|
+
return effect_1.spiralEffect;
|
|
68
68
|
}
|
|
69
69
|
}), Object.defineProperty(exports, "columnEdgeToCenter", {
|
|
70
70
|
enumerable: !0,
|
|
71
71
|
get: function() {
|
|
72
|
-
return
|
|
72
|
+
return effect_1.columnEdgeToCenter;
|
|
73
73
|
}
|
|
74
74
|
}), Object.defineProperty(exports, "columnCenterToEdge", {
|
|
75
75
|
enumerable: !0,
|
|
76
76
|
get: function() {
|
|
77
|
-
return
|
|
77
|
+
return effect_1.columnCenterToEdge;
|
|
78
78
|
}
|
|
79
79
|
}), Object.defineProperty(exports, "rowEdgeToCenter", {
|
|
80
80
|
enumerable: !0,
|
|
81
81
|
get: function() {
|
|
82
|
-
return
|
|
82
|
+
return effect_1.rowEdgeToCenter;
|
|
83
83
|
}
|
|
84
84
|
}), Object.defineProperty(exports, "rowCenterToEdge", {
|
|
85
85
|
enumerable: !0,
|
|
86
86
|
get: function() {
|
|
87
|
-
return
|
|
87
|
+
return effect_1.rowCenterToEdge;
|
|
88
88
|
}
|
|
89
89
|
}), Object.defineProperty(exports, "cornerToCenter", {
|
|
90
90
|
enumerable: !0,
|
|
91
91
|
get: function() {
|
|
92
|
-
return
|
|
92
|
+
return effect_1.cornerToCenter;
|
|
93
93
|
}
|
|
94
94
|
}), Object.defineProperty(exports, "centerToCorner", {
|
|
95
95
|
enumerable: !0,
|
|
96
96
|
get: function() {
|
|
97
|
-
return
|
|
97
|
+
return effect_1.centerToCorner;
|
|
98
98
|
}
|
|
99
99
|
}), Object.defineProperty(exports, "pulseWave", {
|
|
100
100
|
enumerable: !0,
|
|
101
101
|
get: function() {
|
|
102
|
-
return
|
|
102
|
+
return effect_1.pulseWave;
|
|
103
103
|
}
|
|
104
104
|
}), Object.defineProperty(exports, "particleEffect", {
|
|
105
105
|
enumerable: !0,
|
|
106
106
|
get: function() {
|
|
107
|
-
return
|
|
107
|
+
return effect_1.particleEffect;
|
|
108
108
|
}
|
|
109
109
|
});
|
|
110
110
|
//# sourceMappingURL=vrender-tools.js.map
|
package/cjs/vrender-tools.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/vrender-tools.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"sources":["../src/vrender-tools.ts"],"names":[],"mappings":";;;AAAA,6EAqB4D;AApB1D,uGAAA,aAAa,OAAA;AACb,2GAAA,iBAAiB,OAAA;AACjB,2GAAA,iBAAiB,OAAA;AACjB,wGAAA,cAAc,OAAA;AACd,wGAAA,cAAc,OAAA;AACd,8GAAA,oBAAoB,OAAA;AACpB,sHAAA,4BAA4B,OAAA;AAC5B,sGAAA,YAAY,OAAA;AACZ,sGAAA,YAAY,OAAA;AACZ,mGAAA,SAAS,OAAA;AACT,yGAAA,eAAe,OAAA;AACf,sGAAA,YAAY,OAAA;AACZ,4GAAA,kBAAkB,OAAA;AAClB,4GAAA,kBAAkB,OAAA;AAClB,yGAAA,eAAe,OAAA;AACf,yGAAA,eAAe,OAAA;AACf,wGAAA,cAAc,OAAA;AACd,wGAAA,cAAc,OAAA;AACd,mGAAA,SAAS,OAAA;AACT,wGAAA,cAAc,OAAA","file":"vrender-tools.js","sourcesContent":["export {\n randomOpacity,\n columnLeftToRight,\n columnRightToLeft,\n rowTopToBottom,\n rowBottomToTop,\n diagonalCenterToEdge,\n diagonalTopLeftToBottomRight,\n rotationScan,\n rippleEffect,\n snakeWave,\n alternatingWave,\n spiralEffect,\n columnEdgeToCenter,\n columnCenterToEdge,\n rowEdgeToCenter,\n rowCenterToEdge,\n cornerToCenter,\n centerToCorner,\n pulseWave,\n particleEffect\n} from '@visactor/vrender-kits/tools/dynamicTexture/effect';\n"]}
|
package/esm/animation/config.js
CHANGED