@visactor/vrender-core 1.0.27 → 1.0.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/constants.d.ts +1 -1
- package/cjs/constants.js +1 -1
- package/cjs/constants.js.map +1 -1
- package/cjs/core/stage.js +1 -1
- package/cjs/core/stage.js.map +1 -1
- package/cjs/graphic/config.js +1 -1
- package/cjs/graphic/config.js.map +1 -1
- package/cjs/graphic/symbol.js +5 -4
- package/cjs/graphic/symbol.js.map +1 -1
- package/dist/index.es.js +9 -3
- package/es/constants.d.ts +1 -1
- package/es/constants.js +1 -1
- package/es/constants.js.map +1 -1
- package/es/core/stage.js +1 -1
- package/es/core/stage.js.map +1 -1
- package/es/graphic/config.js +1 -1
- package/es/graphic/config.js.map +1 -1
- package/es/graphic/symbol.js +5 -3
- package/es/graphic/symbol.js.map +1 -1
- package/package.json +2 -2
package/cjs/constants.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export declare const EnvContribution: unique symbol;
|
|
2
2
|
export declare const VGlobal: unique symbol;
|
|
3
|
-
export declare const DEFAULT_TEXT_FONT_FAMILY = "PingFang SC,Helvetica Neue,Microsoft Yahei,system-ui
|
|
3
|
+
export declare const DEFAULT_TEXT_FONT_FAMILY = "PingFang SC,Helvetica Neue,Microsoft Yahei,system-ui,'-apple-system',segoe ui,Roboto,Helvetica,Arial,sans-serif,apple color emoji,segoe ui emoji,segoe ui symbol";
|
package/cjs/constants.js
CHANGED
|
@@ -4,5 +4,5 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: !0
|
|
5
5
|
}), exports.DEFAULT_TEXT_FONT_FAMILY = exports.VGlobal = exports.EnvContribution = void 0,
|
|
6
6
|
exports.EnvContribution = Symbol.for("EnvContribution"), exports.VGlobal = Symbol.for("VGlobal"),
|
|
7
|
-
exports.DEFAULT_TEXT_FONT_FAMILY = "PingFang SC,Helvetica Neue,Microsoft Yahei,system-ui
|
|
7
|
+
exports.DEFAULT_TEXT_FONT_FAMILY = "PingFang SC,Helvetica Neue,Microsoft Yahei,system-ui,'-apple-system',segoe ui,Roboto,Helvetica,Arial,sans-serif,apple color emoji,segoe ui emoji,segoe ui symbol";
|
|
8
8
|
//# sourceMappingURL=constants.js.map
|
package/cjs/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,eAAe,GAAG,MAAM,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;AAChD,QAAA,OAAO,GAAG,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;AAEhC,QAAA,wBAAwB,GAEnC,
|
|
1
|
+
{"version":3,"sources":["../src/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,eAAe,GAAG,MAAM,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;AAChD,QAAA,OAAO,GAAG,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;AAEhC,QAAA,wBAAwB,GAEnC,kKAAkK,CAAC","file":"constants.js","sourcesContent":["export const EnvContribution = Symbol.for('EnvContribution');\nexport const VGlobal = Symbol.for('VGlobal');\n\nexport const DEFAULT_TEXT_FONT_FAMILY =\n // eslint-disable-next-line max-len\n `PingFang SC,Helvetica Neue,Microsoft Yahei,system-ui,'-apple-system',segoe ui,Roboto,Helvetica,Arial,sans-serif,apple color emoji,segoe ui emoji,segoe ui symbol`;\n"]}
|
package/cjs/core/stage.js
CHANGED
|
@@ -261,7 +261,7 @@ class Stage extends group_1.Group {
|
|
|
261
261
|
})));
|
|
262
262
|
}
|
|
263
263
|
enableAutoRefresh() {
|
|
264
|
-
this.autoRefresh || (this.autoRefresh = !0, this.pluginService.register(new auto_refresh_plugin_1.AutoRefreshPlugin));
|
|
264
|
+
this.autoRefresh || "node" === this.global.env || (this.autoRefresh = !0, this.pluginService.register(new auto_refresh_plugin_1.AutoRefreshPlugin));
|
|
265
265
|
}
|
|
266
266
|
disableAutoRefresh() {
|
|
267
267
|
this.autoRefresh && (this.autoRefresh = !1, this.pluginService.findPluginsByName("AutoRefreshPlugin").forEach((plugin => {
|
package/cjs/core/stage.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/core/stage.ts"],"names":[],"mappings":";;;AACA,6CAA2D;AA6B3D,qCAAmC;AAEnC,oCAAuC;AACvC,4CAAyC;AACzC,mDAAoD;AACpD,4CAAyC;AACzC,4CAAyC;AACzC,mDAAoD;AACpD,oDAAqD;AACrD,qFAAgF;AAChF,uFAAkF;AAClF,6GAAuG;AACvG,uFAAkF;AAClF,wCAAsC;AACtC,2CAA2C;AAC3C,gDAA6C;AAC7C,4CAA4C;AAC5C,wCAAqC;AACrC,wCAAqD;AAErD,MAAM,aAAa,GAAG;IACpB,KAAK,EAAE,GAAG;IACV,MAAM,EAAE,GAAG;IACX,CAAC,EAAE,CAAC;IACJ,CAAC,EAAE,CAAC;IACJ,UAAU,EAAE,OAAO;CACpB,CAAC;AAeF,MAAa,KAAM,SAAQ,aAAK;IAuB9B,IAAI,OAAO,CAAC,CAAc;QACxB,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IAC5B,CAAC;IACD,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC;IAClC,CAAC;IAKD,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC,EAAE,CAAC;IACrC,CAAC;IAID,IAAI,CAAC,CAAC,CAAS;QACb,MAAM,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC;QACnC,CAAC,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;QACzB,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IAC5B,CAAC;IAID,IAA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;QAE3D,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;IAC5D,CAAC;IAED,iBAAiB;QACf,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY,CAAC,iBAAiB,EAAE,CAAC;IAC7D,CAAC;IACD,kBAAkB;QAChB,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY,CAAC,kBAAkB,EAAE,CAAC;IAC9D,CAAC;IAED,gBAAgB;QACd,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE;YACvB,IAAI,CAAC,aAAa,GAAG,qBAAS,CAAC,GAAG,CAAiB,yBAAa,CAAC,CAAC;SACnE;QACD,OAAO,IAAI,CAAC,aAAa,CAAC;IAC5B,CAAC;IAED,MAAM;QACJ,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC;QAC5B,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC;IAC9B,CAAC;CACF;AA1lCD,sBA0lCC","file":"stage.js","sourcesContent":["import type { IAABBBounds, IBounds, IBoundsLike, IMatrix } from '@visactor/vutils';\nimport { Bounds, Point, isString } from '@visactor/vutils';\nimport type {\n IGraphic,\n IExportType,\n IStage,\n IStageParams,\n ILayer,\n IColor,\n IGlobal,\n IOption3D,\n ICamera,\n vec3,\n IDirectionLight,\n ITicker,\n IRenderService,\n IPickerService,\n IPluginService,\n ISyncHook,\n IDrawContext,\n IWindow,\n ILayerService,\n ITimeline,\n IOptimizeType,\n LayerMode,\n PickResult,\n IPlugin,\n IGraphicService,\n IRenderServiceDrawParams\n} from '../interface';\nimport { VWindow } from './window';\nimport type { Layer } from './layer';\nimport { EventSystem } from '../event';\nimport { container } from '../container';\nimport { RenderService } from '../render/constants';\nimport { Group } from '../graphic/group';\nimport { Theme } from '../graphic/theme';\nimport { PickerService } from '../picker/constants';\nimport { PluginService } from '../plugins/constants';\nimport { AutoRenderPlugin } from '../plugins/builtin-plugin/auto-render-plugin';\nimport { AutoRefreshPlugin } from '../plugins/builtin-plugin/auto-refresh-plugin';\nimport { IncrementalAutoRenderPlugin } from '../plugins/builtin-plugin/incremental-auto-render-plugin';\nimport { DirtyBoundsPlugin } from '../plugins/builtin-plugin/dirty-bounds-plugin';\nimport { SyncHook } from '../tapable';\nimport { LayerService } from './constants';\nimport { application } from '../application';\nimport { isBrowserEnv } from '../env-check';\nimport { Factory } from '../factory';\nimport { Graphic, GraphicService } from '../graphic';\n\nconst DefaultConfig = {\n WIDTH: 500,\n HEIGHT: 500,\n X: 0,\n Y: 0,\n BACKGROUND: 'white'\n};\n\ntype IStageState = 'rendering' | 'normal';\n\n/**\n * Stage是一个舞台或一个视口,并不直接对应一个或多个Canvas,逻辑上和Canvas无关\n *\n * 1. Stage对应一个Canvas的整体,Stage的宽高即为Canvas的宽高\n * 2. Stage小于Canvas,Stage作为Canvas某个区域的视口,只管理这个区域\n * 3. 多图层时Stage的多个图层对应多个Canvas\n *\n * 原生环境下Stage可以拥有一个Window或者使用Window的一块区域\n *\n * 【注】如果希望获取完整的Canvas或窗口或者调整窗口信息,请使用Window模块\n */\nexport class Stage extends Group implements IStage {\n declare parent: IStage | null;\n\n declare state: IStageState;\n\n private _background: string | IColor;\n protected nextFrameRenderLayerSet: Set<Layer>;\n protected willNextFrameRender: boolean;\n protected _cursor: string;\n renderCount: number;\n dirtyBounds: IBounds | null;\n option3d?: IOption3D;\n declare light?: IDirectionLight;\n declare camera?: ICamera;\n declare renderStyle?: string;\n\n declare hooks: {\n beforeRender: ISyncHook<[IStage]>;\n afterRender: ISyncHook<[IStage]>;\n afterClearScreen: ISyncHook<[IRenderServiceDrawParams]>;\n afterClearRect: ISyncHook<[IRenderServiceDrawParams]>;\n };\n\n set viewBox(b: IBoundsLike) {\n this.window.setViewBox(b);\n }\n get viewBox(): IAABBBounds {\n return this.window.getViewBox();\n }\n\n /**\n * @deprecated 不建议使用\n */\n get x(): number {\n return this.window.getViewBox().x1;\n }\n /**\n * @deprecated 不建议使用\n */\n set x(x: number) {\n const b = this.window.getViewBox();\n b.translate(x - b.x1, 0);\n this.window.setViewBox(b);\n }\n /**\n * @deprecated 不建议使用\n */\n get y(): number {\n return this.window.getViewBox().y1;\n }\n /**\n * @deprecated 不建议使用\n */\n set y(y: number) {\n const b = this.window.getViewBox();\n b.translate(0, y - b.y1);\n this.window.setViewBox(b);\n }\n get width(): number {\n return this.window.width;\n }\n set width(w: number) {\n this.resize(w, this.height);\n }\n get viewWidth(): number {\n return this.window.getViewBox().width();\n }\n set viewWidth(w: number) {\n this.resizeView(w, this.viewHeight);\n }\n get viewHeight(): number {\n return this.window.getViewBox().height();\n }\n set viewHeight(h: number) {\n this.resizeView(this.viewWidth, h);\n }\n get height(): number {\n return this.window.height;\n }\n set height(h: number) {\n this.resize(this.width, h);\n }\n get dpr(): number {\n return this.window.dpr;\n }\n set dpr(r: number) {\n this.setDpr(r);\n }\n get background(): string | IColor {\n return this._background ?? DefaultConfig.BACKGROUND;\n }\n set background(b: string | IColor) {\n this._background = b;\n }\n get defaultLayer(): ILayer {\n return this.at(0) as unknown as ILayer;\n }\n\n protected _ticker: ITicker;\n\n autoRender: boolean;\n autoRefresh: boolean;\n _enableLayout: boolean;\n htmlAttribute: boolean | string | any;\n reactAttribute: boolean | string | any;\n increaseAutoRender: boolean;\n view3dTranform: boolean;\n readonly window: IWindow;\n private readonly global: IGlobal;\n readonly renderService: IRenderService;\n protected pickerService?: IPickerService;\n readonly pluginService: IPluginService;\n readonly layerService: ILayerService;\n readonly graphicService: IGraphicService;\n private _eventSystem?: EventSystem;\n private get eventSystem(): EventSystem {\n return this._eventSystem;\n }\n\n protected _beforeRenderList: Array<(stage: IStage) => void>;\n protected _afterRenderList: Array<(stage: IStage) => void>;\n protected _afterClearScreen?: (drawParams: any) => void;\n protected _afterClearRect?: (drawParams: any) => void;\n // 0: 正常渲染, > 0: 跳过隐藏canvas的渲染, < 0: 禁止渲染\n protected _skipRender?: number;\n protected _afterNextRenderCbs?: ((stage: IStage) => void)[];\n protected lastRenderparams?: Partial<IDrawContext>;\n\n protected interactiveLayer?: ILayer;\n protected supportInteractiveLayer: boolean;\n protected timeline: ITimeline;\n\n declare params: Partial<IStageParams>;\n\n // 是否在render之前执行了tick,如果没有执行,尝试执行tick用来应用动画属性,避免动画过程中随意赋值然后又调用同步render导致属性的突变\n // 第一次render不需要强行走动画\n protected tickedBeforeRender: boolean = true;\n\n // 随机分配一个rafId\n readonly rafId: number;\n\n get ticker() {\n return this._ticker;\n }\n\n set ticker(ticker: ITicker) {\n ticker.bindStage(this);\n if (this._ticker) {\n this._ticker.removeListener('tick', this.afterTickCb);\n }\n ticker.addTimeline(this.timeline);\n this._ticker = ticker;\n this._ticker.on('tick', this.afterTickCb);\n }\n\n /**\n * 所有属性都具有默认值。\n * Canvas为字符串或者Canvas元素,那么默认图层就会绑定到这个Canvas上\n * 如果不传入Canvas,那么会新建一个Canvas,用户可以通过Window模块管理这个Canvas\n * 1. 如果没有传入宽高,那么默认为canvas宽高,如果传入了宽高则stage使用传入宽高作为视口宽高\n * @param params\n */\n constructor(params: Partial<IStageParams> = {}) {\n super({});\n this.params = params;\n this.theme = new Theme();\n this.hooks = {\n beforeRender: new SyncHook(['stage']),\n afterRender: new SyncHook(['stage']),\n afterClearScreen: new SyncHook(['stage']),\n afterClearRect: new SyncHook(['stage'])\n };\n this.global = application.global;\n if (!this.global.env && isBrowserEnv()) {\n // 如果是浏览器环境,默认设置env\n this.global.setEnv('browser');\n }\n this.window = container.get<IWindow>(VWindow);\n this.renderService = container.get<IRenderService>(RenderService);\n this.pluginService = container.get<IPluginService>(PluginService);\n this.layerService = container.get<ILayerService>(LayerService);\n this.graphicService = container.get<IGraphicService>(GraphicService);\n this.pluginService.active(this, params);\n this._beforeRenderList = [];\n this._afterRenderList = [];\n\n this.window.create({\n width: params.width,\n height: params.height,\n viewBox: params.viewBox,\n container: params.container,\n dpr: params.dpr || this.global.devicePixelRatio,\n canvasControled: params.canvasControled !== false,\n title: params.title || '',\n canvas: params.canvas\n });\n\n this.state = 'normal';\n this.renderCount = 0;\n this.tryInitEventSystem();\n // // 没有传入xy就默认为0\n // this._x = params.x ?? DefaultConfig.X;\n // this._y = params.y ?? DefaultConfig.Y;\n // // 没有传入view的宽高则默认为window的宽高\n // this._viewWidth = params.viewWidth ?? this.window.width;\n // this._viewHeight = params.viewHeight ?? this.window.height;\n // this._AABBBounds.set(this._x, this._y, this._viewWidth + this._x, this._viewHeight + this._y);\n // 背景色默认为纯白色\n this._background = params.background ?? DefaultConfig.BACKGROUND;\n\n // 创建一个默认layer图层\n // this.appendChild(new Layer(this, this.global, this.window, { main: true }));\n this.appendChild(this.layerService.createLayer(this, { main: true }));\n\n this.nextFrameRenderLayerSet = new Set();\n this.willNextFrameRender = false;\n this.stage = this;\n this.renderStyle = params.renderStyle;\n\n // this.autoRender = params.autoRender;\n if (params.autoRender) {\n this.enableAutoRender();\n }\n if (params.autoRefresh) {\n this.enableAutoRefresh();\n }\n // 默认不开启dirtyBounds\n if (params.disableDirtyBounds === false) {\n this.enableDirtyBounds();\n }\n\n if (params.enableHtmlAttribute) {\n this.enableHtmlAttribute(params.enableHtmlAttribute);\n }\n if (params.ReactDOM) {\n this.enableReactAttribute(params.ReactDOM);\n }\n\n params.enableLayout && this.enableLayout();\n this.hooks.beforeRender.tap('constructor', this.beforeRender);\n this.hooks.afterRender.tap('constructor', this.afterRender);\n if (params.beforeRender) {\n this._beforeRenderList.push(params.beforeRender);\n }\n if (params.afterRender) {\n this._afterRenderList.push(params.afterRender);\n }\n this.hooks.afterClearScreen.tap('constructor', this.afterClearScreen);\n this.hooks.afterClearRect.tap('constructor', this.afterClearRect);\n this._afterClearScreen = params.afterClearScreen;\n this._afterClearRect = params.afterClearRect;\n this.supportInteractiveLayer = params.interactiveLayer !== false;\n if (!params.optimize) {\n params.optimize = {\n tickRenderMode: 'effect'\n };\n }\n this.optmize(params.optimize);\n // 如果背景是图片,触发加载图片操作\n if (params.background && isString(this._background) && this._background.includes('/')) {\n this.setAttributes({ background: this._background });\n }\n\n this.initAnimate(params);\n this.rafId = params.rafId ?? Math.floor(Math.random() * 6);\n }\n\n initAnimate(params: Partial<IStageParams>) {\n if ((this as any).createTicker && (this as any).createTimeline) {\n this._ticker = params.ticker || (this as any).createTicker(this);\n this._ticker.bindStage(this);\n if (this.params.optimize?.tickRenderMode === 'performance') {\n this._ticker.setFPS(30);\n }\n this.timeline = (this as any).createTimeline();\n this._ticker.addTimeline(this.timeline);\n this._ticker.on('tick', this.afterTickCb);\n }\n }\n\n startAnimate() {\n if (this._ticker && this.timeline) {\n this._ticker.start();\n this.timeline.resume();\n }\n }\n\n pauseRender(sr: number = -1) {\n this._skipRender = sr;\n }\n\n resumeRender() {\n this._skipRender = 0;\n }\n\n protected tryInitEventSystem() {\n if (this.global.supportEvent && !this._eventSystem) {\n this._eventSystem = new EventSystem({\n targetElement: this.window,\n resolution: this.window.dpr || this.global.devicePixelRatio,\n rootNode: this as any,\n global: this.global,\n supportsPointerEvents: this.params.supportsPointerEvents,\n supportsTouchEvents: this.params.supportsTouchEvents,\n ...this.params.event\n });\n }\n }\n\n preventRender(prevent: boolean) {\n if (prevent) {\n this._skipRender = -Infinity;\n } else {\n // 判断是否需要outRange优化\n if (this.params.optimize.skipRenderWithOutRange !== false) {\n this._skipRender = this.window.isVisible() ? 0 : 1;\n } else {\n this._skipRender = 0;\n }\n }\n }\n\n // 优化策略\n optmize(params: IOptimizeType) {\n this.optmizeRender(params.skipRenderWithOutRange);\n this.params.optimize = params;\n }\n\n // 优化渲染\n protected optmizeRender(skipRenderWithOutRange: boolean = false) {\n if (!skipRenderWithOutRange) {\n return;\n }\n // 不在视口内的时候,跳过渲染\n this._skipRender = this._skipRender < 0 ? this._skipRender : this.window.isVisible() ? 0 : 1;\n this.window.onVisibleChange(this._onVisibleChange);\n }\n\n protected _onVisibleChange = (visible: boolean) => {\n if (this._skipRender < 0) {\n return;\n }\n if (visible) {\n if (this.dirtyBounds) {\n const b = this.window.getViewBox();\n this.dirtyBounds.setValue(b.x1, b.y1, b.width(), b.height());\n }\n if (this._skipRender > 1) {\n this.renderNextFrame();\n }\n this._skipRender = 0;\n } else {\n this._skipRender = 1;\n }\n };\n\n getTimeline() {\n return this.timeline;\n }\n\n get3dOptions(options: IOption3D) {\n const {\n center = { x: this.width / 2, y: this.height / 2, z: 0, dx: 0, dy: 0, dz: 0 },\n light = {},\n alpha = 0,\n beta = 0,\n camera,\n fieldRatio = 1,\n fieldDepth\n } = options;\n\n return {\n ...options,\n center,\n light,\n alpha,\n beta,\n camera,\n fieldRatio,\n fieldDepth\n };\n }\n\n set3dOptions(options: IOption3D) {\n this.option3d = options;\n const options3d = this.get3dOptions(options);\n const { light, center, camera, alpha, beta, fieldRatio, fieldDepth } = options3d;\n const { dir = [1, 1, -1], color = 'white', ambient } = light;\n\n const centerX = (center.x ?? this.width / 2) + (center.dx ?? 0);\n const centerY = (center.y ?? this.height / 2) + (center.dy ?? 0);\n const centerZ = (center.z ?? 0) + (center.dz ?? 0);\n const centerVec3: vec3 = [centerX, centerY, centerZ];\n const z = 1;\n let cameraX = 0;\n let cameraY = 0;\n let cameraZ = 0;\n if (!camera) {\n cameraX = Math.sin(alpha) + centerX;\n cameraY = Math.sin(beta) + centerY;\n cameraZ = Math.cos(alpha) * Math.cos(beta) * z;\n }\n\n const DirectionalLight = Factory.getPlugin('DirectionalLight');\n\n if (DirectionalLight) {\n this.light = new DirectionalLight(dir, color, ambient);\n }\n const cameraParams = {\n left: 0,\n right: this.width,\n top: 0,\n bottom: this.height,\n fieldRatio: fieldRatio,\n fieldDepth,\n viewParams: {\n pos: [cameraX, cameraY, cameraZ] as vec3,\n center: centerVec3,\n up: [0, 1, 0] as vec3\n }\n };\n if (this.camera) {\n this.camera.params = cameraParams;\n } else {\n const OrthoCamera = Factory.getPlugin('OrthoCamera');\n if (OrthoCamera) {\n this.camera = new OrthoCamera(cameraParams);\n }\n }\n\n if (options.enableView3dTransform) {\n this.enableView3dTransform();\n }\n }\n\n protected beforeRender = (stage: IStage) => {\n this._beforeRenderList.forEach(cb => cb(stage));\n };\n protected afterClearScreen = (drawParams: any) => {\n this._afterClearScreen && this._afterClearScreen(drawParams);\n };\n protected afterClearRect = (drawParams: any) => {\n this._afterClearRect && this._afterClearRect(drawParams);\n };\n\n protected afterRender = (stage: IStage) => {\n this.renderCount++;\n this._afterRenderList.forEach(cb => cb(stage));\n this._afterNextRenderCbs && this._afterNextRenderCbs.forEach(cb => cb(stage));\n this._afterNextRenderCbs = null;\n this.tickedBeforeRender = false;\n };\n\n protected afterTickCb = () => {\n this.tickedBeforeRender = true;\n // 性能模式不用立刻渲染\n this.state !== 'rendering' && this.renderNextFrame();\n };\n\n setBeforeRender(cb: (stage: IStage) => void) {\n this._beforeRenderList.push(cb);\n }\n\n removeBeforeRender(cb: (stage: IStage) => void) {\n this._beforeRenderList = this._beforeRenderList.filter(c => c !== cb);\n }\n\n setAfterRender(cb: (stage: IStage) => void) {\n this._afterRenderList.push(cb);\n }\n\n removeAfterRender(cb: (stage: IStage) => void) {\n this._afterRenderList = this._afterRenderList.filter(c => c !== cb);\n }\n\n afterNextRender(cb: (stage: IStage) => void) {\n if (!this._afterNextRenderCbs) {\n this._afterNextRenderCbs = [];\n }\n this._afterNextRenderCbs.push(cb);\n }\n\n enableView3dTransform() {\n if (this.view3dTranform) {\n return;\n }\n this.view3dTranform = true;\n const ViewTransform3dPlugin = Factory.getPlugin('ViewTransform3dPlugin');\n\n if (ViewTransform3dPlugin) {\n this.pluginService.register(new ViewTransform3dPlugin());\n }\n }\n\n disableView3dTranform() {\n if (!this.view3dTranform) {\n return;\n }\n this.view3dTranform = false;\n this.pluginService.findPluginsByName('ViewTransform3dPlugin').forEach(plugin => {\n this.pluginService.unRegister(plugin);\n });\n }\n\n enableAutoRender() {\n if (this.autoRender) {\n return;\n }\n this.autoRender = true;\n this.pluginService.register(new AutoRenderPlugin());\n }\n disableAutoRender() {\n if (!this.autoRender) {\n return;\n }\n this.autoRender = false;\n this.pluginService.findPluginsByName('AutoRenderPlugin').forEach(plugin => {\n this.pluginService.unRegister(plugin);\n });\n }\n enableAutoRefresh() {\n if (this.autoRefresh) {\n return;\n }\n this.autoRefresh = true;\n this.pluginService.register(new AutoRefreshPlugin());\n }\n disableAutoRefresh() {\n if (!this.autoRefresh) {\n return;\n }\n this.autoRefresh = false;\n this.pluginService.findPluginsByName('AutoRefreshPlugin').forEach(plugin => {\n this.pluginService.unRegister(plugin);\n });\n }\n enableIncrementalAutoRender() {\n if (this.increaseAutoRender) {\n return;\n }\n this.increaseAutoRender = true;\n this.pluginService.register(new IncrementalAutoRenderPlugin());\n }\n disableIncrementalAutoRender() {\n if (!this.increaseAutoRender) {\n return;\n }\n this.increaseAutoRender = false;\n this.pluginService.findPluginsByName('IncrementalAutoRenderPlugin').forEach(plugin => {\n this.pluginService.unRegister(plugin);\n });\n }\n enableDirtyBounds() {\n if (this.dirtyBounds) {\n return;\n }\n this.dirtyBounds = new Bounds();\n let plugin = this.pluginService.findPluginsByName('DirtyBoundsPlugin')[0];\n if (!plugin) {\n plugin = new DirtyBoundsPlugin();\n this.pluginService.register(plugin);\n } else {\n plugin.activate(this.pluginService);\n }\n }\n disableDirtyBounds() {\n if (!this.dirtyBounds) {\n return;\n }\n this.dirtyBounds = null;\n this.pluginService.findPluginsByName('DirtyBoundsPlugin').forEach(plugin => {\n this.pluginService.unRegister(plugin);\n });\n }\n enableLayout() {\n if (this._enableLayout) {\n return;\n }\n this._enableLayout = true;\n\n const FlexLayoutPlugin = Factory.getPlugin('FlexLayoutPlugin');\n\n if (FlexLayoutPlugin) {\n this.pluginService.register(new FlexLayoutPlugin());\n }\n }\n disableLayout() {\n if (!this._enableLayout) {\n return;\n }\n this._enableLayout = false;\n this.pluginService.findPluginsByName('FlexLayoutPlugin').forEach(plugin => {\n this.pluginService.unRegister(plugin);\n });\n }\n enableHtmlAttribute(container?: any) {\n if (this.htmlAttribute) {\n return;\n }\n const HtmlAttributePlugin = Factory.getPlugin('HtmlAttributePlugin');\n\n if (HtmlAttributePlugin) {\n this.htmlAttribute = container;\n this.pluginService.register(new HtmlAttributePlugin());\n }\n }\n disableHtmlAttribute() {\n if (!this.htmlAttribute) {\n return;\n }\n this.htmlAttribute = false;\n this.pluginService.findPluginsByName('HtmlAttributePlugin').forEach(plugin => {\n this.pluginService.unRegister(plugin);\n });\n }\n enableReactAttribute(container?: any) {\n if (this.reactAttribute) {\n return;\n }\n const ReactAttributePlugin = Factory.getPlugin('ReactAttributePlugin');\n\n if (ReactAttributePlugin) {\n this.reactAttribute = container;\n this.pluginService.register(new ReactAttributePlugin());\n }\n }\n disableReactAttribute() {\n if (!this.reactAttribute) {\n return;\n }\n this.reactAttribute = false;\n this.pluginService.findPluginsByName('ReactAttributePlugin').forEach(plugin => {\n this.pluginService.unRegister(plugin);\n });\n }\n\n getPluginsByName(name: string): IPlugin[] {\n return this.pluginService.findPluginsByName(name);\n }\n\n // /**\n // * stage的appendChild,add\n // * @param node\n // * @returns\n // */\n // appendChild<T extends Node>(node: T): T | null {\n // const layer = this.at(0);\n // if (!layer) {\n // return null;\n // }\n // return layer.appendChild<T>(node);\n // }\n\n protected tryUpdateAABBBounds(): IAABBBounds {\n const viewBox = this.window.getViewBox();\n this._AABBBounds.setValue(viewBox.x1, viewBox.y1, viewBox.x2, viewBox.y2);\n return this._AABBBounds;\n }\n\n combineLayer(ILayer1: ILayer, ILayer2: ILayer): ILayer {\n throw new Error('暂不支持');\n }\n // 如果传入CanvasId,如果存在相同Id,说明这两个图层使用相同的Canvas绘制\n // 但需要注意的是依然是两个图层(用于解决Table嵌入ChartSpace不影响Table的绘制)\n createLayer(canvasId?: string, layerMode?: LayerMode): ILayer {\n if (this.releaseStatus === 'released') {\n return;\n }\n // 创建一个默认layer图层\n const layer = this.layerService.createLayer(this, {\n main: false,\n layerMode,\n canvasId\n });\n this.appendChild(layer);\n return layer;\n // const layer = new Layer(this, this.global, this.window, {\n // main: false,\n // canvasId\n // });\n // this.appendChild(layer);\n // return layer;\n }\n sortLayer(cb: (ILayer1: ILayer, layer2: ILayer) => number): void {\n const children = this.children;\n children.sort(cb);\n this.removeAllChild();\n children.forEach(c => {\n this.appendChild(c);\n });\n }\n removeLayer(ILayerId: number): ILayer | false {\n return this.removeChild(this.findChildByUid(ILayerId) as IGraphic) as ILayer;\n }\n tryInitInteractiveLayer() {\n if (this.releaseStatus === 'released') {\n return;\n }\n // TODO:顺序可能会存在问题\n // 支持交互层,且没有创建过,那就创建\n if (this.supportInteractiveLayer && !this.interactiveLayer) {\n this.interactiveLayer = this.createLayer();\n this.interactiveLayer.name = '_builtin_interactive';\n this.interactiveLayer.attribute.pickable = false;\n this.nextFrameRenderLayerSet.add(this.interactiveLayer as any); // to be fixed\n }\n // this.interactiveLayer.afterDraw(l => {\n // l.removeAllChild();\n // });\n }\n\n clearViewBox(color?: string) {\n this.window.clearViewBox(color);\n }\n\n render(layers?: ILayer[], params?: Partial<IDrawContext>): void {\n if (this.releaseStatus === 'released') {\n return;\n }\n this.startAnimate();\n const state = this.state;\n this.state = 'rendering';\n this.layerService.prepareStageLayer(this);\n if (!this._skipRender) {\n this.lastRenderparams = params;\n this.hooks.beforeRender.call(this);\n if (!this._skipRender) {\n this.renderLayerList(this.children as ILayer[]);\n this.combineLayersToWindow();\n this.nextFrameRenderLayerSet.clear();\n }\n this.hooks.afterRender.call(this);\n }\n this.state = state;\n this._skipRender && this._skipRender++;\n }\n\n protected combineLayersToWindow() {\n // TODO 后续支持通用的渲染模型\n if (this.global.env === 'harmony') {\n const ctx = this.window.getContext().nativeContext;\n this.forEachChildren<ILayer>((layer, i) => {\n if (i > 0) {\n const image = layer\n .getNativeHandler()\n .getContext()\n .canvas.nativeCanvas.nativeCanvas._c.transferToImageBitmap();\n ctx.transferFromImageBitmap(image);\n }\n });\n }\n return;\n // this.forEach<ILayer>((layer, i) => {\n // layer.combineTo(this.window, {\n // clear: i === 0,\n // x: this.x,\n // y: this.y,\n // width: this.viewWidth,\n // height: this.viewHeight,\n // renderService: this.renderService,\n // background: layer === this.defaultLayer ? this.background : undefined,\n // updateBounds: !!this.dirtyBounds\n // });\n // });\n }\n\n renderNextFrame(layers?: ILayer[], force?: boolean): void {\n // render状态中调用的不会触发nextFrame,避免loop\n // if (this.state === 'rendering' && !force) {\n // console.log('abc');\n // return;\n // }\n // 性能优化,避免重复add\n if (this.nextFrameRenderLayerSet.size !== this.childrenCount) {\n (layers || this).forEach<ILayer>((layer: any) => {\n this.nextFrameRenderLayerSet.add(layer);\n });\n }\n if (!this.willNextFrameRender) {\n this.willNextFrameRender = true;\n this.global.getSpecifiedRequestAnimationFrame(this.rafId)(() => {\n this._doRenderInThisFrame(), (this.willNextFrameRender = false);\n });\n }\n }\n\n _doRenderInThisFrame() {\n if (this.releaseStatus === 'released') {\n return;\n }\n this.startAnimate();\n const state = this.state;\n this.state = 'rendering';\n this.layerService.prepareStageLayer(this);\n if (this.nextFrameRenderLayerSet.size && !this._skipRender) {\n this.hooks.beforeRender.call(this);\n if (!this._skipRender) {\n this.renderLayerList(Array.from(this.nextFrameRenderLayerSet.values()), this.lastRenderparams || {});\n this.combineLayersToWindow();\n this.nextFrameRenderLayerSet.clear();\n }\n this.hooks.afterRender.call(this);\n }\n this.state = state;\n this._skipRender && this._skipRender++;\n }\n\n protected renderLayerList(layerList: ILayer[], params?: Partial<IDrawContext>) {\n const list: ILayer[] = [];\n // 只需要render main layer即可\n for (let i = 0; i < layerList.length; i++) {\n let l = layerList[i];\n if (l.layerMode === 'virtual') {\n l = l.getNativeHandler().mainHandler.layer;\n }\n if (!list.includes(l)) {\n list.push(l);\n }\n }\n list.forEach(layer => {\n // 记录当前的stamp,避免重复绘制layer(如果存在virtual layer)\n if (layer.renderCount > this.renderCount) {\n return;\n }\n layer.renderCount = this.renderCount + 1;\n\n if (layer === this.interactiveLayer) {\n // 交互层由于其特殊性,不使用dirtyBounds\n this.dirtyBounds && this.dirtyBounds.clear();\n }\n layer.render(\n {\n renderService: this.renderService,\n background: layer === this.defaultLayer ? this.background : undefined,\n updateBounds: !!(this.dirtyBounds && !this.dirtyBounds.empty()),\n viewBox: this.window.getViewBox(),\n transMatrix: this.window.getViewBoxTransform()\n },\n { renderStyle: this.renderStyle, ...params }\n );\n });\n\n // 添加交互层渲染\n if (this.interactiveLayer && !layerList.includes(this.interactiveLayer)) {\n // 交互层由于其特殊性,不使用dirtyBounds\n this.dirtyBounds && this.dirtyBounds.clear();\n this.interactiveLayer.render(\n {\n renderService: this.renderService,\n updateBounds: !!(this.dirtyBounds && !this.dirtyBounds.empty()),\n viewBox: this.window.getViewBox(),\n transMatrix: this.window.getViewBoxTransform()\n },\n { renderStyle: this.renderStyle, ...params }\n );\n }\n }\n\n resizeWindow(w: number, h: number, rerender: boolean = true) {\n this.window.resize(w, h);\n rerender && this.render();\n }\n\n /**\n * 语法糖,如果viewBox和window宽高一样的话,那么会同时缩放window和viewBox\n * @param w\n * @param h\n * @param rerender\n */\n resize(w: number, h: number, rerender: boolean = true): void {\n if (this.releaseStatus === 'released') {\n return;\n }\n // 如果不是子图的stage,那么认为用户也想要resize view\n if (!this.window.hasSubView()) {\n this.viewBox.setValue(this.viewBox.x1, this.viewBox.y1, this.viewBox.x1 + w, this.viewBox.y1 + h);\n }\n this.window.resize(w, h);\n this.forEachChildren<ILayer>(c => {\n c.resize(w, h);\n });\n // 设置camera\n // this.camera && (this.camera.params = { ...this.camera.params, right: this.width, bottom: this.height });\n this.camera && this.option3d && this.set3dOptions(this.option3d);\n rerender && this.render();\n }\n resizeView(w: number, h: number, rerender: boolean = true) {\n if (this.releaseStatus === 'released') {\n return;\n }\n this.viewBox.setValue(this.viewBox.x1, this.viewBox.y1, this.viewBox.x1 + w, this.viewBox.y1 + h);\n this.forEachChildren<ILayer>(c => {\n c.resizeView(w, h);\n });\n // 设置camera\n this.camera && (this.camera.params = { ...this.camera.params, right: this.width, bottom: this.height });\n rerender && this.render();\n }\n setViewBox(viewBox: IBoundsLike, rerender: boolean): void;\n setViewBox(x: number, y: number, w: number, h: number, rerender: boolean): void;\n setViewBox(x: number | IBoundsLike, y: number | boolean, w?: number, h?: number, rerender?: boolean): void {\n let isRerender: boolean = true;\n\n if (typeof x === 'object') {\n this.viewBox.setValue(x.x1, x.y1, x.x2, x.y2);\n if (y === false) {\n isRerender = false;\n }\n } else {\n this.viewBox.setValue(x, y as number, x + w, (y as number) + h);\n\n if (rerender === false) {\n isRerender = false;\n }\n }\n\n this.forEachChildren<ILayer>(c => {\n c.resizeView(this.viewBox.width(), this.viewBox.height());\n });\n isRerender && this.render();\n }\n setDpr(dpr: number, rerender: boolean = true): void {\n // this.window.setDpr(dpr);\n this.forEachChildren<ILayer>(c => {\n c.setDpr(dpr);\n });\n\n rerender && this.render();\n }\n setOrigin(x: number, y: number): void {\n throw new Error('暂不支持');\n }\n export(type: IExportType): HTMLCanvasElement | ImageData {\n throw new Error('暂不支持');\n }\n pick(x: number, y: number): PickResult | false {\n if (this.releaseStatus === 'released') {\n return;\n }\n // 暂时不提供layer的pick\n const result = this.getPickerService().pick(this.children as unknown as IGraphic[], new Point(x, y), {\n bounds: this.AABBBounds\n });\n if (result?.graphic || result?.group) {\n return result;\n }\n return false;\n }\n\n setToFrame(t: number): void {\n throw new Error('暂不支持');\n }\n\n release() {\n super.release();\n\n this.hooks.beforeRender.unTap('constructor', this.beforeRender);\n this.hooks.afterRender.unTap('constructor', this.afterRender);\n\n this.eventSystem && this.eventSystem.release();\n this.layerService.releaseStage(this);\n this.pluginService.release();\n this.forEach(layer => {\n layer.release();\n });\n // 额外删除掉interactiveLayer的节点\n if (this.interactiveLayer) {\n this.interactiveLayer.forEachChildren((item: IGraphic) => {\n item.setStage && item.setStage(null, null);\n this.interactiveLayer.removeChild(item);\n });\n this.interactiveLayer.release();\n }\n this.window.release();\n this._ticker?.remTimeline(this?.timeline);\n this._ticker?.removeListener('tick', this.afterTickCb);\n this.renderService.renderTreeRoots = [];\n }\n\n setStage(stage?: IStage) {\n return;\n // this.stage = this;\n // this.forEachChildren(item => {\n // (item as Layer).setStage(this);\n // });\n }\n\n /**\n * 添加dirty区域,会修改参数b\n * @param b\n * @param matrix\n */\n dirty(b: IBounds, matrix?: IMatrix) {\n if (this.releaseStatus === 'released') {\n return;\n }\n if (matrix) {\n b.transformWithMatrix(matrix);\n }\n if (this.dirtyBounds.empty()) {\n this.dirtyBounds.setValue(b.x1, b.y1, b.x2, b.y2);\n }\n this.dirtyBounds.union(b);\n }\n\n getLayer(name: string): undefined | ILayer {\n const layer = this.children.filter(layer => layer.name === name);\n return layer[0] as ILayer;\n }\n\n renderTo(window: IWindow) {\n if (this.releaseStatus === 'released') {\n return;\n }\n this.forEachChildren<ILayer>((layer, i) => {\n layer.drawTo(window, {\n // ...params,\n renderService: this.renderService,\n viewBox: window.getViewBox(),\n transMatrix: window.getViewBoxTransform(),\n background: layer === this.defaultLayer ? this.background : undefined,\n clear: i === 0, // 第一个layer需要clear\n updateBounds: !!(this.dirtyBounds && !this.dirtyBounds.empty())\n });\n });\n }\n\n /**\n * 渲染到新的window上去\n * @param fullImage 是否是全量的image,因为可能之前的window有一部分场景树超过window的帧缓冲了\n * @returns\n */\n renderToNewWindow(fullImage: boolean = true, viewBox?: IAABBBounds): IWindow {\n if (this.releaseStatus === 'released') {\n return;\n }\n const window = container.get<IWindow>(VWindow);\n const x1 = viewBox ? -viewBox.x1 : 0;\n const y1 = viewBox ? -viewBox.y1 : 0;\n const x2 = viewBox ? viewBox.x2 : this.viewWidth;\n const y2 = viewBox ? viewBox.y2 : this.viewHeight;\n const width = viewBox ? viewBox.width() : this.viewWidth;\n const height = viewBox ? viewBox.height() : this.viewHeight;\n if (fullImage) {\n window.create({\n viewBox: { x1, y1, x2, y2 },\n width,\n height,\n dpr: this.window.dpr,\n canvasControled: true,\n offscreen: true,\n title: ''\n });\n } else {\n window.create({\n viewBox: { x1, y1, x2, y2 },\n width,\n height,\n dpr: this.window.dpr,\n canvasControled: true,\n offscreen: true,\n title: ''\n });\n }\n\n this.renderTo(window);\n return window;\n }\n\n toCanvas(fullImage: boolean = true, viewBox?: IAABBBounds): HTMLCanvasElement | null {\n if (this.releaseStatus === 'released') {\n return;\n }\n const window = this.renderToNewWindow(fullImage, viewBox);\n const c = window.getNativeHandler();\n if (c.nativeCanvas) {\n return c.nativeCanvas;\n }\n return null;\n }\n\n setCursor(mode?: string): void {\n this._cursor = mode;\n this.eventSystem.setCursor(mode, 'ignore');\n }\n\n getCursor() {\n return this._cursor;\n }\n\n eventPointTransform(e: PointerEvent | WheelEvent | TouchEvent): { x: number; y: number } {\n const point = this.global.mapToCanvasPoint(e, this.window);\n\n return this.stage.window.pointTransform(point.x, point.y);\n }\n\n pauseTriggerEvent() {\n this._eventSystem && this._eventSystem.pauseTriggerEvent();\n }\n resumeTriggerEvent() {\n this._eventSystem && this._eventSystem.resumeTriggerEvent();\n }\n\n getPickerService() {\n if (!this.pickerService) {\n this.pickerService = container.get<IPickerService>(PickerService);\n }\n return this.pickerService;\n }\n\n reInit() {\n this.renderService.reInit();\n this.pickerService.reInit();\n }\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/core/stage.ts"],"names":[],"mappings":";;;AACA,6CAA2D;AA6B3D,qCAAmC;AAEnC,oCAAuC;AACvC,4CAAyC;AACzC,mDAAoD;AACpD,4CAAyC;AACzC,4CAAyC;AACzC,mDAAoD;AACpD,oDAAqD;AACrD,qFAAgF;AAChF,uFAAkF;AAClF,6GAAuG;AACvG,uFAAkF;AAClF,wCAAsC;AACtC,2CAA2C;AAC3C,gDAA6C;AAC7C,4CAA4C;AAC5C,wCAAqC;AACrC,wCAAqD;AAErD,MAAM,aAAa,GAAG;IACpB,KAAK,EAAE,GAAG;IACV,MAAM,EAAE,GAAG;IACX,CAAC,EAAE,CAAC;IACJ,CAAC,EAAE,CAAC;IACJ,UAAU,EAAE,OAAO;CACpB,CAAC;AAeF,MAAa,KAAM,SAAQ,aAAK;IAuB9B,IAAI,OAAO,CAA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.js","sourcesContent":["import type { IAABBBounds, IBounds, IBoundsLike, IMatrix } from '@visactor/vutils';\nimport { Bounds, Point, isString } from '@visactor/vutils';\nimport type {\n IGraphic,\n IExportType,\n IStage,\n IStageParams,\n ILayer,\n IColor,\n IGlobal,\n IOption3D,\n ICamera,\n vec3,\n IDirectionLight,\n ITicker,\n IRenderService,\n IPickerService,\n IPluginService,\n ISyncHook,\n IDrawContext,\n IWindow,\n ILayerService,\n ITimeline,\n IOptimizeType,\n LayerMode,\n PickResult,\n IPlugin,\n IGraphicService,\n IRenderServiceDrawParams\n} from '../interface';\nimport { VWindow } from './window';\nimport type { Layer } from './layer';\nimport { EventSystem } from '../event';\nimport { container } from '../container';\nimport { RenderService } from '../render/constants';\nimport { Group } from '../graphic/group';\nimport { Theme } from '../graphic/theme';\nimport { PickerService } from '../picker/constants';\nimport { PluginService } from '../plugins/constants';\nimport { AutoRenderPlugin } from '../plugins/builtin-plugin/auto-render-plugin';\nimport { AutoRefreshPlugin } from '../plugins/builtin-plugin/auto-refresh-plugin';\nimport { IncrementalAutoRenderPlugin } from '../plugins/builtin-plugin/incremental-auto-render-plugin';\nimport { DirtyBoundsPlugin } from '../plugins/builtin-plugin/dirty-bounds-plugin';\nimport { SyncHook } from '../tapable';\nimport { LayerService } from './constants';\nimport { application } from '../application';\nimport { isBrowserEnv } from '../env-check';\nimport { Factory } from '../factory';\nimport { Graphic, GraphicService } from '../graphic';\n\nconst DefaultConfig = {\n WIDTH: 500,\n HEIGHT: 500,\n X: 0,\n Y: 0,\n BACKGROUND: 'white'\n};\n\ntype IStageState = 'rendering' | 'normal';\n\n/**\n * Stage是一个舞台或一个视口,并不直接对应一个或多个Canvas,逻辑上和Canvas无关\n *\n * 1. Stage对应一个Canvas的整体,Stage的宽高即为Canvas的宽高\n * 2. Stage小于Canvas,Stage作为Canvas某个区域的视口,只管理这个区域\n * 3. 多图层时Stage的多个图层对应多个Canvas\n *\n * 原生环境下Stage可以拥有一个Window或者使用Window的一块区域\n *\n * 【注】如果希望获取完整的Canvas或窗口或者调整窗口信息,请使用Window模块\n */\nexport class Stage extends Group implements IStage {\n declare parent: IStage | null;\n\n declare state: IStageState;\n\n private _background: string | IColor;\n protected nextFrameRenderLayerSet: Set<Layer>;\n protected willNextFrameRender: boolean;\n protected _cursor: string;\n renderCount: number;\n dirtyBounds: IBounds | null;\n option3d?: IOption3D;\n declare light?: IDirectionLight;\n declare camera?: ICamera;\n declare renderStyle?: string;\n\n declare hooks: {\n beforeRender: ISyncHook<[IStage]>;\n afterRender: ISyncHook<[IStage]>;\n afterClearScreen: ISyncHook<[IRenderServiceDrawParams]>;\n afterClearRect: ISyncHook<[IRenderServiceDrawParams]>;\n };\n\n set viewBox(b: IBoundsLike) {\n this.window.setViewBox(b);\n }\n get viewBox(): IAABBBounds {\n return this.window.getViewBox();\n }\n\n /**\n * @deprecated 不建议使用\n */\n get x(): number {\n return this.window.getViewBox().x1;\n }\n /**\n * @deprecated 不建议使用\n */\n set x(x: number) {\n const b = this.window.getViewBox();\n b.translate(x - b.x1, 0);\n this.window.setViewBox(b);\n }\n /**\n * @deprecated 不建议使用\n */\n get y(): number {\n return this.window.getViewBox().y1;\n }\n /**\n * @deprecated 不建议使用\n */\n set y(y: number) {\n const b = this.window.getViewBox();\n b.translate(0, y - b.y1);\n this.window.setViewBox(b);\n }\n get width(): number {\n return this.window.width;\n }\n set width(w: number) {\n this.resize(w, this.height);\n }\n get viewWidth(): number {\n return this.window.getViewBox().width();\n }\n set viewWidth(w: number) {\n this.resizeView(w, this.viewHeight);\n }\n get viewHeight(): number {\n return this.window.getViewBox().height();\n }\n set viewHeight(h: number) {\n this.resizeView(this.viewWidth, h);\n }\n get height(): number {\n return this.window.height;\n }\n set height(h: number) {\n this.resize(this.width, h);\n }\n get dpr(): number {\n return this.window.dpr;\n }\n set dpr(r: number) {\n this.setDpr(r);\n }\n get background(): string | IColor {\n return this._background ?? DefaultConfig.BACKGROUND;\n }\n set background(b: string | IColor) {\n this._background = b;\n }\n get defaultLayer(): ILayer {\n return this.at(0) as unknown as ILayer;\n }\n\n protected _ticker: ITicker;\n\n autoRender: boolean;\n autoRefresh: boolean;\n _enableLayout: boolean;\n htmlAttribute: boolean | string | any;\n reactAttribute: boolean | string | any;\n increaseAutoRender: boolean;\n view3dTranform: boolean;\n readonly window: IWindow;\n private readonly global: IGlobal;\n readonly renderService: IRenderService;\n protected pickerService?: IPickerService;\n readonly pluginService: IPluginService;\n readonly layerService: ILayerService;\n readonly graphicService: IGraphicService;\n private _eventSystem?: EventSystem;\n private get eventSystem(): EventSystem {\n return this._eventSystem;\n }\n\n protected _beforeRenderList: Array<(stage: IStage) => void>;\n protected _afterRenderList: Array<(stage: IStage) => void>;\n protected _afterClearScreen?: (drawParams: any) => void;\n protected _afterClearRect?: (drawParams: any) => void;\n // 0: 正常渲染, > 0: 跳过隐藏canvas的渲染, < 0: 禁止渲染\n protected _skipRender?: number;\n protected _afterNextRenderCbs?: ((stage: IStage) => void)[];\n protected lastRenderparams?: Partial<IDrawContext>;\n\n protected interactiveLayer?: ILayer;\n protected supportInteractiveLayer: boolean;\n protected timeline: ITimeline;\n\n declare params: Partial<IStageParams>;\n\n // 是否在render之前执行了tick,如果没有执行,尝试执行tick用来应用动画属性,避免动画过程中随意赋值然后又调用同步render导致属性的突变\n // 第一次render不需要强行走动画\n protected tickedBeforeRender: boolean = true;\n\n // 随机分配一个rafId\n readonly rafId: number;\n\n get ticker() {\n return this._ticker;\n }\n\n set ticker(ticker: ITicker) {\n ticker.bindStage(this);\n if (this._ticker) {\n this._ticker.removeListener('tick', this.afterTickCb);\n }\n ticker.addTimeline(this.timeline);\n this._ticker = ticker;\n this._ticker.on('tick', this.afterTickCb);\n }\n\n /**\n * 所有属性都具有默认值。\n * Canvas为字符串或者Canvas元素,那么默认图层就会绑定到这个Canvas上\n * 如果不传入Canvas,那么会新建一个Canvas,用户可以通过Window模块管理这个Canvas\n * 1. 如果没有传入宽高,那么默认为canvas宽高,如果传入了宽高则stage使用传入宽高作为视口宽高\n * @param params\n */\n constructor(params: Partial<IStageParams> = {}) {\n super({});\n this.params = params;\n this.theme = new Theme();\n this.hooks = {\n beforeRender: new SyncHook(['stage']),\n afterRender: new SyncHook(['stage']),\n afterClearScreen: new SyncHook(['stage']),\n afterClearRect: new SyncHook(['stage'])\n };\n this.global = application.global;\n if (!this.global.env && isBrowserEnv()) {\n // 如果是浏览器环境,默认设置env\n this.global.setEnv('browser');\n }\n this.window = container.get<IWindow>(VWindow);\n this.renderService = container.get<IRenderService>(RenderService);\n this.pluginService = container.get<IPluginService>(PluginService);\n this.layerService = container.get<ILayerService>(LayerService);\n this.graphicService = container.get<IGraphicService>(GraphicService);\n this.pluginService.active(this, params);\n this._beforeRenderList = [];\n this._afterRenderList = [];\n\n this.window.create({\n width: params.width,\n height: params.height,\n viewBox: params.viewBox,\n container: params.container,\n dpr: params.dpr || this.global.devicePixelRatio,\n canvasControled: params.canvasControled !== false,\n title: params.title || '',\n canvas: params.canvas\n });\n\n this.state = 'normal';\n this.renderCount = 0;\n this.tryInitEventSystem();\n // // 没有传入xy就默认为0\n // this._x = params.x ?? DefaultConfig.X;\n // this._y = params.y ?? DefaultConfig.Y;\n // // 没有传入view的宽高则默认为window的宽高\n // this._viewWidth = params.viewWidth ?? this.window.width;\n // this._viewHeight = params.viewHeight ?? this.window.height;\n // this._AABBBounds.set(this._x, this._y, this._viewWidth + this._x, this._viewHeight + this._y);\n // 背景色默认为纯白色\n this._background = params.background ?? DefaultConfig.BACKGROUND;\n\n // 创建一个默认layer图层\n // this.appendChild(new Layer(this, this.global, this.window, { main: true }));\n this.appendChild(this.layerService.createLayer(this, { main: true }));\n\n this.nextFrameRenderLayerSet = new Set();\n this.willNextFrameRender = false;\n this.stage = this;\n this.renderStyle = params.renderStyle;\n\n // this.autoRender = params.autoRender;\n if (params.autoRender) {\n this.enableAutoRender();\n }\n if (params.autoRefresh) {\n this.enableAutoRefresh();\n }\n // 默认不开启dirtyBounds\n if (params.disableDirtyBounds === false) {\n this.enableDirtyBounds();\n }\n\n if (params.enableHtmlAttribute) {\n this.enableHtmlAttribute(params.enableHtmlAttribute);\n }\n if (params.ReactDOM) {\n this.enableReactAttribute(params.ReactDOM);\n }\n\n params.enableLayout && this.enableLayout();\n this.hooks.beforeRender.tap('constructor', this.beforeRender);\n this.hooks.afterRender.tap('constructor', this.afterRender);\n if (params.beforeRender) {\n this._beforeRenderList.push(params.beforeRender);\n }\n if (params.afterRender) {\n this._afterRenderList.push(params.afterRender);\n }\n this.hooks.afterClearScreen.tap('constructor', this.afterClearScreen);\n this.hooks.afterClearRect.tap('constructor', this.afterClearRect);\n this._afterClearScreen = params.afterClearScreen;\n this._afterClearRect = params.afterClearRect;\n this.supportInteractiveLayer = params.interactiveLayer !== false;\n if (!params.optimize) {\n params.optimize = {\n tickRenderMode: 'effect'\n };\n }\n this.optmize(params.optimize);\n // 如果背景是图片,触发加载图片操作\n if (params.background && isString(this._background) && this._background.includes('/')) {\n this.setAttributes({ background: this._background });\n }\n\n this.initAnimate(params);\n this.rafId = params.rafId ?? Math.floor(Math.random() * 6);\n }\n\n initAnimate(params: Partial<IStageParams>) {\n if ((this as any).createTicker && (this as any).createTimeline) {\n this._ticker = params.ticker || (this as any).createTicker(this);\n this._ticker.bindStage(this);\n if (this.params.optimize?.tickRenderMode === 'performance') {\n this._ticker.setFPS(30);\n }\n this.timeline = (this as any).createTimeline();\n this._ticker.addTimeline(this.timeline);\n this._ticker.on('tick', this.afterTickCb);\n }\n }\n\n startAnimate() {\n if (this._ticker && this.timeline) {\n this._ticker.start();\n this.timeline.resume();\n }\n }\n\n pauseRender(sr: number = -1) {\n this._skipRender = sr;\n }\n\n resumeRender() {\n this._skipRender = 0;\n }\n\n protected tryInitEventSystem() {\n if (this.global.supportEvent && !this._eventSystem) {\n this._eventSystem = new EventSystem({\n targetElement: this.window,\n resolution: this.window.dpr || this.global.devicePixelRatio,\n rootNode: this as any,\n global: this.global,\n supportsPointerEvents: this.params.supportsPointerEvents,\n supportsTouchEvents: this.params.supportsTouchEvents,\n ...this.params.event\n });\n }\n }\n\n preventRender(prevent: boolean) {\n if (prevent) {\n this._skipRender = -Infinity;\n } else {\n // 判断是否需要outRange优化\n if (this.params.optimize.skipRenderWithOutRange !== false) {\n this._skipRender = this.window.isVisible() ? 0 : 1;\n } else {\n this._skipRender = 0;\n }\n }\n }\n\n // 优化策略\n optmize(params: IOptimizeType) {\n this.optmizeRender(params.skipRenderWithOutRange);\n this.params.optimize = params;\n }\n\n // 优化渲染\n protected optmizeRender(skipRenderWithOutRange: boolean = false) {\n if (!skipRenderWithOutRange) {\n return;\n }\n // 不在视口内的时候,跳过渲染\n this._skipRender = this._skipRender < 0 ? this._skipRender : this.window.isVisible() ? 0 : 1;\n this.window.onVisibleChange(this._onVisibleChange);\n }\n\n protected _onVisibleChange = (visible: boolean) => {\n if (this._skipRender < 0) {\n return;\n }\n if (visible) {\n if (this.dirtyBounds) {\n const b = this.window.getViewBox();\n this.dirtyBounds.setValue(b.x1, b.y1, b.width(), b.height());\n }\n if (this._skipRender > 1) {\n this.renderNextFrame();\n }\n this._skipRender = 0;\n } else {\n this._skipRender = 1;\n }\n };\n\n getTimeline() {\n return this.timeline;\n }\n\n get3dOptions(options: IOption3D) {\n const {\n center = { x: this.width / 2, y: this.height / 2, z: 0, dx: 0, dy: 0, dz: 0 },\n light = {},\n alpha = 0,\n beta = 0,\n camera,\n fieldRatio = 1,\n fieldDepth\n } = options;\n\n return {\n ...options,\n center,\n light,\n alpha,\n beta,\n camera,\n fieldRatio,\n fieldDepth\n };\n }\n\n set3dOptions(options: IOption3D) {\n this.option3d = options;\n const options3d = this.get3dOptions(options);\n const { light, center, camera, alpha, beta, fieldRatio, fieldDepth } = options3d;\n const { dir = [1, 1, -1], color = 'white', ambient } = light;\n\n const centerX = (center.x ?? this.width / 2) + (center.dx ?? 0);\n const centerY = (center.y ?? this.height / 2) + (center.dy ?? 0);\n const centerZ = (center.z ?? 0) + (center.dz ?? 0);\n const centerVec3: vec3 = [centerX, centerY, centerZ];\n const z = 1;\n let cameraX = 0;\n let cameraY = 0;\n let cameraZ = 0;\n if (!camera) {\n cameraX = Math.sin(alpha) + centerX;\n cameraY = Math.sin(beta) + centerY;\n cameraZ = Math.cos(alpha) * Math.cos(beta) * z;\n }\n\n const DirectionalLight = Factory.getPlugin('DirectionalLight');\n\n if (DirectionalLight) {\n this.light = new DirectionalLight(dir, color, ambient);\n }\n const cameraParams = {\n left: 0,\n right: this.width,\n top: 0,\n bottom: this.height,\n fieldRatio: fieldRatio,\n fieldDepth,\n viewParams: {\n pos: [cameraX, cameraY, cameraZ] as vec3,\n center: centerVec3,\n up: [0, 1, 0] as vec3\n }\n };\n if (this.camera) {\n this.camera.params = cameraParams;\n } else {\n const OrthoCamera = Factory.getPlugin('OrthoCamera');\n if (OrthoCamera) {\n this.camera = new OrthoCamera(cameraParams);\n }\n }\n\n if (options.enableView3dTransform) {\n this.enableView3dTransform();\n }\n }\n\n protected beforeRender = (stage: IStage) => {\n this._beforeRenderList.forEach(cb => cb(stage));\n };\n protected afterClearScreen = (drawParams: any) => {\n this._afterClearScreen && this._afterClearScreen(drawParams);\n };\n protected afterClearRect = (drawParams: any) => {\n this._afterClearRect && this._afterClearRect(drawParams);\n };\n\n protected afterRender = (stage: IStage) => {\n this.renderCount++;\n this._afterRenderList.forEach(cb => cb(stage));\n this._afterNextRenderCbs && this._afterNextRenderCbs.forEach(cb => cb(stage));\n this._afterNextRenderCbs = null;\n this.tickedBeforeRender = false;\n };\n\n protected afterTickCb = () => {\n this.tickedBeforeRender = true;\n // 性能模式不用立刻渲染\n this.state !== 'rendering' && this.renderNextFrame();\n };\n\n setBeforeRender(cb: (stage: IStage) => void) {\n this._beforeRenderList.push(cb);\n }\n\n removeBeforeRender(cb: (stage: IStage) => void) {\n this._beforeRenderList = this._beforeRenderList.filter(c => c !== cb);\n }\n\n setAfterRender(cb: (stage: IStage) => void) {\n this._afterRenderList.push(cb);\n }\n\n removeAfterRender(cb: (stage: IStage) => void) {\n this._afterRenderList = this._afterRenderList.filter(c => c !== cb);\n }\n\n afterNextRender(cb: (stage: IStage) => void) {\n if (!this._afterNextRenderCbs) {\n this._afterNextRenderCbs = [];\n }\n this._afterNextRenderCbs.push(cb);\n }\n\n enableView3dTransform() {\n if (this.view3dTranform) {\n return;\n }\n this.view3dTranform = true;\n const ViewTransform3dPlugin = Factory.getPlugin('ViewTransform3dPlugin');\n\n if (ViewTransform3dPlugin) {\n this.pluginService.register(new ViewTransform3dPlugin());\n }\n }\n\n disableView3dTranform() {\n if (!this.view3dTranform) {\n return;\n }\n this.view3dTranform = false;\n this.pluginService.findPluginsByName('ViewTransform3dPlugin').forEach(plugin => {\n this.pluginService.unRegister(plugin);\n });\n }\n\n enableAutoRender() {\n if (this.autoRender) {\n return;\n }\n this.autoRender = true;\n this.pluginService.register(new AutoRenderPlugin());\n }\n disableAutoRender() {\n if (!this.autoRender) {\n return;\n }\n this.autoRender = false;\n this.pluginService.findPluginsByName('AutoRenderPlugin').forEach(plugin => {\n this.pluginService.unRegister(plugin);\n });\n }\n enableAutoRefresh() {\n if (this.autoRefresh || this.global.env === 'node') {\n return;\n }\n this.autoRefresh = true;\n this.pluginService.register(new AutoRefreshPlugin());\n }\n disableAutoRefresh() {\n if (!this.autoRefresh) {\n return;\n }\n this.autoRefresh = false;\n this.pluginService.findPluginsByName('AutoRefreshPlugin').forEach(plugin => {\n this.pluginService.unRegister(plugin);\n });\n }\n enableIncrementalAutoRender() {\n if (this.increaseAutoRender) {\n return;\n }\n this.increaseAutoRender = true;\n this.pluginService.register(new IncrementalAutoRenderPlugin());\n }\n disableIncrementalAutoRender() {\n if (!this.increaseAutoRender) {\n return;\n }\n this.increaseAutoRender = false;\n this.pluginService.findPluginsByName('IncrementalAutoRenderPlugin').forEach(plugin => {\n this.pluginService.unRegister(plugin);\n });\n }\n enableDirtyBounds() {\n if (this.dirtyBounds) {\n return;\n }\n this.dirtyBounds = new Bounds();\n let plugin = this.pluginService.findPluginsByName('DirtyBoundsPlugin')[0];\n if (!plugin) {\n plugin = new DirtyBoundsPlugin();\n this.pluginService.register(plugin);\n } else {\n plugin.activate(this.pluginService);\n }\n }\n disableDirtyBounds() {\n if (!this.dirtyBounds) {\n return;\n }\n this.dirtyBounds = null;\n this.pluginService.findPluginsByName('DirtyBoundsPlugin').forEach(plugin => {\n this.pluginService.unRegister(plugin);\n });\n }\n enableLayout() {\n if (this._enableLayout) {\n return;\n }\n this._enableLayout = true;\n\n const FlexLayoutPlugin = Factory.getPlugin('FlexLayoutPlugin');\n\n if (FlexLayoutPlugin) {\n this.pluginService.register(new FlexLayoutPlugin());\n }\n }\n disableLayout() {\n if (!this._enableLayout) {\n return;\n }\n this._enableLayout = false;\n this.pluginService.findPluginsByName('FlexLayoutPlugin').forEach(plugin => {\n this.pluginService.unRegister(plugin);\n });\n }\n enableHtmlAttribute(container?: any) {\n if (this.htmlAttribute) {\n return;\n }\n const HtmlAttributePlugin = Factory.getPlugin('HtmlAttributePlugin');\n\n if (HtmlAttributePlugin) {\n this.htmlAttribute = container;\n this.pluginService.register(new HtmlAttributePlugin());\n }\n }\n disableHtmlAttribute() {\n if (!this.htmlAttribute) {\n return;\n }\n this.htmlAttribute = false;\n this.pluginService.findPluginsByName('HtmlAttributePlugin').forEach(plugin => {\n this.pluginService.unRegister(plugin);\n });\n }\n enableReactAttribute(container?: any) {\n if (this.reactAttribute) {\n return;\n }\n const ReactAttributePlugin = Factory.getPlugin('ReactAttributePlugin');\n\n if (ReactAttributePlugin) {\n this.reactAttribute = container;\n this.pluginService.register(new ReactAttributePlugin());\n }\n }\n disableReactAttribute() {\n if (!this.reactAttribute) {\n return;\n }\n this.reactAttribute = false;\n this.pluginService.findPluginsByName('ReactAttributePlugin').forEach(plugin => {\n this.pluginService.unRegister(plugin);\n });\n }\n\n getPluginsByName(name: string): IPlugin[] {\n return this.pluginService.findPluginsByName(name);\n }\n\n // /**\n // * stage的appendChild,add\n // * @param node\n // * @returns\n // */\n // appendChild<T extends Node>(node: T): T | null {\n // const layer = this.at(0);\n // if (!layer) {\n // return null;\n // }\n // return layer.appendChild<T>(node);\n // }\n\n protected tryUpdateAABBBounds(): IAABBBounds {\n const viewBox = this.window.getViewBox();\n this._AABBBounds.setValue(viewBox.x1, viewBox.y1, viewBox.x2, viewBox.y2);\n return this._AABBBounds;\n }\n\n combineLayer(ILayer1: ILayer, ILayer2: ILayer): ILayer {\n throw new Error('暂不支持');\n }\n // 如果传入CanvasId,如果存在相同Id,说明这两个图层使用相同的Canvas绘制\n // 但需要注意的是依然是两个图层(用于解决Table嵌入ChartSpace不影响Table的绘制)\n createLayer(canvasId?: string, layerMode?: LayerMode): ILayer {\n if (this.releaseStatus === 'released') {\n return;\n }\n // 创建一个默认layer图层\n const layer = this.layerService.createLayer(this, {\n main: false,\n layerMode,\n canvasId\n });\n this.appendChild(layer);\n return layer;\n // const layer = new Layer(this, this.global, this.window, {\n // main: false,\n // canvasId\n // });\n // this.appendChild(layer);\n // return layer;\n }\n sortLayer(cb: (ILayer1: ILayer, layer2: ILayer) => number): void {\n const children = this.children;\n children.sort(cb);\n this.removeAllChild();\n children.forEach(c => {\n this.appendChild(c);\n });\n }\n removeLayer(ILayerId: number): ILayer | false {\n return this.removeChild(this.findChildByUid(ILayerId) as IGraphic) as ILayer;\n }\n tryInitInteractiveLayer() {\n if (this.releaseStatus === 'released') {\n return;\n }\n // TODO:顺序可能会存在问题\n // 支持交互层,且没有创建过,那就创建\n if (this.supportInteractiveLayer && !this.interactiveLayer) {\n this.interactiveLayer = this.createLayer();\n this.interactiveLayer.name = '_builtin_interactive';\n this.interactiveLayer.attribute.pickable = false;\n this.nextFrameRenderLayerSet.add(this.interactiveLayer as any); // to be fixed\n }\n // this.interactiveLayer.afterDraw(l => {\n // l.removeAllChild();\n // });\n }\n\n clearViewBox(color?: string) {\n this.window.clearViewBox(color);\n }\n\n render(layers?: ILayer[], params?: Partial<IDrawContext>): void {\n if (this.releaseStatus === 'released') {\n return;\n }\n this.startAnimate();\n const state = this.state;\n this.state = 'rendering';\n this.layerService.prepareStageLayer(this);\n if (!this._skipRender) {\n this.lastRenderparams = params;\n this.hooks.beforeRender.call(this);\n if (!this._skipRender) {\n this.renderLayerList(this.children as ILayer[]);\n this.combineLayersToWindow();\n this.nextFrameRenderLayerSet.clear();\n }\n this.hooks.afterRender.call(this);\n }\n this.state = state;\n this._skipRender && this._skipRender++;\n }\n\n protected combineLayersToWindow() {\n // TODO 后续支持通用的渲染模型\n if (this.global.env === 'harmony') {\n const ctx = this.window.getContext().nativeContext;\n this.forEachChildren<ILayer>((layer, i) => {\n if (i > 0) {\n const image = layer\n .getNativeHandler()\n .getContext()\n .canvas.nativeCanvas.nativeCanvas._c.transferToImageBitmap();\n ctx.transferFromImageBitmap(image);\n }\n });\n }\n return;\n // this.forEach<ILayer>((layer, i) => {\n // layer.combineTo(this.window, {\n // clear: i === 0,\n // x: this.x,\n // y: this.y,\n // width: this.viewWidth,\n // height: this.viewHeight,\n // renderService: this.renderService,\n // background: layer === this.defaultLayer ? this.background : undefined,\n // updateBounds: !!this.dirtyBounds\n // });\n // });\n }\n\n renderNextFrame(layers?: ILayer[], force?: boolean): void {\n // render状态中调用的不会触发nextFrame,避免loop\n // if (this.state === 'rendering' && !force) {\n // console.log('abc');\n // return;\n // }\n // 性能优化,避免重复add\n if (this.nextFrameRenderLayerSet.size !== this.childrenCount) {\n (layers || this).forEach<ILayer>((layer: any) => {\n this.nextFrameRenderLayerSet.add(layer);\n });\n }\n if (!this.willNextFrameRender) {\n this.willNextFrameRender = true;\n this.global.getSpecifiedRequestAnimationFrame(this.rafId)(() => {\n this._doRenderInThisFrame(), (this.willNextFrameRender = false);\n });\n }\n }\n\n _doRenderInThisFrame() {\n if (this.releaseStatus === 'released') {\n return;\n }\n this.startAnimate();\n const state = this.state;\n this.state = 'rendering';\n this.layerService.prepareStageLayer(this);\n if (this.nextFrameRenderLayerSet.size && !this._skipRender) {\n this.hooks.beforeRender.call(this);\n if (!this._skipRender) {\n this.renderLayerList(Array.from(this.nextFrameRenderLayerSet.values()), this.lastRenderparams || {});\n this.combineLayersToWindow();\n this.nextFrameRenderLayerSet.clear();\n }\n this.hooks.afterRender.call(this);\n }\n this.state = state;\n this._skipRender && this._skipRender++;\n }\n\n protected renderLayerList(layerList: ILayer[], params?: Partial<IDrawContext>) {\n const list: ILayer[] = [];\n // 只需要render main layer即可\n for (let i = 0; i < layerList.length; i++) {\n let l = layerList[i];\n if (l.layerMode === 'virtual') {\n l = l.getNativeHandler().mainHandler.layer;\n }\n if (!list.includes(l)) {\n list.push(l);\n }\n }\n list.forEach(layer => {\n // 记录当前的stamp,避免重复绘制layer(如果存在virtual layer)\n if (layer.renderCount > this.renderCount) {\n return;\n }\n layer.renderCount = this.renderCount + 1;\n\n if (layer === this.interactiveLayer) {\n // 交互层由于其特殊性,不使用dirtyBounds\n this.dirtyBounds && this.dirtyBounds.clear();\n }\n layer.render(\n {\n renderService: this.renderService,\n background: layer === this.defaultLayer ? this.background : undefined,\n updateBounds: !!(this.dirtyBounds && !this.dirtyBounds.empty()),\n viewBox: this.window.getViewBox(),\n transMatrix: this.window.getViewBoxTransform()\n },\n { renderStyle: this.renderStyle, ...params }\n );\n });\n\n // 添加交互层渲染\n if (this.interactiveLayer && !layerList.includes(this.interactiveLayer)) {\n // 交互层由于其特殊性,不使用dirtyBounds\n this.dirtyBounds && this.dirtyBounds.clear();\n this.interactiveLayer.render(\n {\n renderService: this.renderService,\n updateBounds: !!(this.dirtyBounds && !this.dirtyBounds.empty()),\n viewBox: this.window.getViewBox(),\n transMatrix: this.window.getViewBoxTransform()\n },\n { renderStyle: this.renderStyle, ...params }\n );\n }\n }\n\n resizeWindow(w: number, h: number, rerender: boolean = true) {\n this.window.resize(w, h);\n rerender && this.render();\n }\n\n /**\n * 语法糖,如果viewBox和window宽高一样的话,那么会同时缩放window和viewBox\n * @param w\n * @param h\n * @param rerender\n */\n resize(w: number, h: number, rerender: boolean = true): void {\n if (this.releaseStatus === 'released') {\n return;\n }\n // 如果不是子图的stage,那么认为用户也想要resize view\n if (!this.window.hasSubView()) {\n this.viewBox.setValue(this.viewBox.x1, this.viewBox.y1, this.viewBox.x1 + w, this.viewBox.y1 + h);\n }\n this.window.resize(w, h);\n this.forEachChildren<ILayer>(c => {\n c.resize(w, h);\n });\n // 设置camera\n // this.camera && (this.camera.params = { ...this.camera.params, right: this.width, bottom: this.height });\n this.camera && this.option3d && this.set3dOptions(this.option3d);\n rerender && this.render();\n }\n resizeView(w: number, h: number, rerender: boolean = true) {\n if (this.releaseStatus === 'released') {\n return;\n }\n this.viewBox.setValue(this.viewBox.x1, this.viewBox.y1, this.viewBox.x1 + w, this.viewBox.y1 + h);\n this.forEachChildren<ILayer>(c => {\n c.resizeView(w, h);\n });\n // 设置camera\n this.camera && (this.camera.params = { ...this.camera.params, right: this.width, bottom: this.height });\n rerender && this.render();\n }\n setViewBox(viewBox: IBoundsLike, rerender: boolean): void;\n setViewBox(x: number, y: number, w: number, h: number, rerender: boolean): void;\n setViewBox(x: number | IBoundsLike, y: number | boolean, w?: number, h?: number, rerender?: boolean): void {\n let isRerender: boolean = true;\n\n if (typeof x === 'object') {\n this.viewBox.setValue(x.x1, x.y1, x.x2, x.y2);\n if (y === false) {\n isRerender = false;\n }\n } else {\n this.viewBox.setValue(x, y as number, x + w, (y as number) + h);\n\n if (rerender === false) {\n isRerender = false;\n }\n }\n\n this.forEachChildren<ILayer>(c => {\n c.resizeView(this.viewBox.width(), this.viewBox.height());\n });\n isRerender && this.render();\n }\n setDpr(dpr: number, rerender: boolean = true): void {\n // this.window.setDpr(dpr);\n this.forEachChildren<ILayer>(c => {\n c.setDpr(dpr);\n });\n\n rerender && this.render();\n }\n setOrigin(x: number, y: number): void {\n throw new Error('暂不支持');\n }\n export(type: IExportType): HTMLCanvasElement | ImageData {\n throw new Error('暂不支持');\n }\n pick(x: number, y: number): PickResult | false {\n if (this.releaseStatus === 'released') {\n return;\n }\n // 暂时不提供layer的pick\n const result = this.getPickerService().pick(this.children as unknown as IGraphic[], new Point(x, y), {\n bounds: this.AABBBounds\n });\n if (result?.graphic || result?.group) {\n return result;\n }\n return false;\n }\n\n setToFrame(t: number): void {\n throw new Error('暂不支持');\n }\n\n release() {\n super.release();\n\n this.hooks.beforeRender.unTap('constructor', this.beforeRender);\n this.hooks.afterRender.unTap('constructor', this.afterRender);\n\n this.eventSystem && this.eventSystem.release();\n this.layerService.releaseStage(this);\n this.pluginService.release();\n this.forEach(layer => {\n layer.release();\n });\n // 额外删除掉interactiveLayer的节点\n if (this.interactiveLayer) {\n this.interactiveLayer.forEachChildren((item: IGraphic) => {\n item.setStage && item.setStage(null, null);\n this.interactiveLayer.removeChild(item);\n });\n this.interactiveLayer.release();\n }\n this.window.release();\n this._ticker?.remTimeline(this?.timeline);\n this._ticker?.removeListener('tick', this.afterTickCb);\n this.renderService.renderTreeRoots = [];\n }\n\n setStage(stage?: IStage) {\n return;\n // this.stage = this;\n // this.forEachChildren(item => {\n // (item as Layer).setStage(this);\n // });\n }\n\n /**\n * 添加dirty区域,会修改参数b\n * @param b\n * @param matrix\n */\n dirty(b: IBounds, matrix?: IMatrix) {\n if (this.releaseStatus === 'released') {\n return;\n }\n if (matrix) {\n b.transformWithMatrix(matrix);\n }\n if (this.dirtyBounds.empty()) {\n this.dirtyBounds.setValue(b.x1, b.y1, b.x2, b.y2);\n }\n this.dirtyBounds.union(b);\n }\n\n getLayer(name: string): undefined | ILayer {\n const layer = this.children.filter(layer => layer.name === name);\n return layer[0] as ILayer;\n }\n\n renderTo(window: IWindow) {\n if (this.releaseStatus === 'released') {\n return;\n }\n this.forEachChildren<ILayer>((layer, i) => {\n layer.drawTo(window, {\n // ...params,\n renderService: this.renderService,\n viewBox: window.getViewBox(),\n transMatrix: window.getViewBoxTransform(),\n background: layer === this.defaultLayer ? this.background : undefined,\n clear: i === 0, // 第一个layer需要clear\n updateBounds: !!(this.dirtyBounds && !this.dirtyBounds.empty())\n });\n });\n }\n\n /**\n * 渲染到新的window上去\n * @param fullImage 是否是全量的image,因为可能之前的window有一部分场景树超过window的帧缓冲了\n * @returns\n */\n renderToNewWindow(fullImage: boolean = true, viewBox?: IAABBBounds): IWindow {\n if (this.releaseStatus === 'released') {\n return;\n }\n const window = container.get<IWindow>(VWindow);\n const x1 = viewBox ? -viewBox.x1 : 0;\n const y1 = viewBox ? -viewBox.y1 : 0;\n const x2 = viewBox ? viewBox.x2 : this.viewWidth;\n const y2 = viewBox ? viewBox.y2 : this.viewHeight;\n const width = viewBox ? viewBox.width() : this.viewWidth;\n const height = viewBox ? viewBox.height() : this.viewHeight;\n if (fullImage) {\n window.create({\n viewBox: { x1, y1, x2, y2 },\n width,\n height,\n dpr: this.window.dpr,\n canvasControled: true,\n offscreen: true,\n title: ''\n });\n } else {\n window.create({\n viewBox: { x1, y1, x2, y2 },\n width,\n height,\n dpr: this.window.dpr,\n canvasControled: true,\n offscreen: true,\n title: ''\n });\n }\n\n this.renderTo(window);\n return window;\n }\n\n toCanvas(fullImage: boolean = true, viewBox?: IAABBBounds): HTMLCanvasElement | null {\n if (this.releaseStatus === 'released') {\n return;\n }\n const window = this.renderToNewWindow(fullImage, viewBox);\n const c = window.getNativeHandler();\n if (c.nativeCanvas) {\n return c.nativeCanvas;\n }\n return null;\n }\n\n setCursor(mode?: string): void {\n this._cursor = mode;\n this.eventSystem.setCursor(mode, 'ignore');\n }\n\n getCursor() {\n return this._cursor;\n }\n\n eventPointTransform(e: PointerEvent | WheelEvent | TouchEvent): { x: number; y: number } {\n const point = this.global.mapToCanvasPoint(e, this.window);\n\n return this.stage.window.pointTransform(point.x, point.y);\n }\n\n pauseTriggerEvent() {\n this._eventSystem && this._eventSystem.pauseTriggerEvent();\n }\n resumeTriggerEvent() {\n this._eventSystem && this._eventSystem.resumeTriggerEvent();\n }\n\n getPickerService() {\n if (!this.pickerService) {\n this.pickerService = container.get<IPickerService>(PickerService);\n }\n return this.pickerService;\n }\n\n reInit() {\n this.renderService.reInit();\n this.pickerService.reInit();\n }\n}\n"]}
|
package/cjs/graphic/config.js
CHANGED
|
@@ -72,7 +72,7 @@ exports.DefaultStrokeStyle = Object.assign({
|
|
|
72
72
|
textAlign: "left",
|
|
73
73
|
textBaseline: "alphabetic",
|
|
74
74
|
fontSize: 16,
|
|
75
|
-
fontFamily: "PingFang SC,Microsoft Yahei,system-ui
|
|
75
|
+
fontFamily: "PingFang SC,Microsoft Yahei,system-ui,'-apple-system',segoe ui,\n Roboto,Helvetica,Arial,sans-serif, apple color emoji,segoe ui emoji,segoe ui symbol",
|
|
76
76
|
fontWeight: "",
|
|
77
77
|
ellipsis: "…",
|
|
78
78
|
fontVariant: "",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/graphic/config.ts"],"names":[],"mappings":";;;AACA,6CAAuD;AACvD,2DAAuD;AACvD,4CAgCsB;AAET,QAAA,aAAa,GAAY;IACpC,SAAS,EAAE,MAAM;CAClB,CAAC;AAEW,QAAA,gBAAgB,GAAe;IAC1C,CAAC,EAAE,CAAC;IACJ,CAAC,EAAE,CAAC;IACJ,CAAC,EAAE,CAAC;IACJ,EAAE,EAAE,CAAC;IACL,EAAE,EAAE,CAAC;IACL,EAAE,EAAE,CAAC;IACL,OAAO,EAAE,CAAC;IACV,OAAO,EAAE,CAAC;IACV,MAAM,EAAE,CAAC;IACT,MAAM,EAAE,CAAC;IACT,MAAM,EAAE,CAAC;IACT,KAAK,EAAE,CAAC;IACR,KAAK,EAAE,CAAC;IACR,IAAI,EAAE,CAAC;IACP,WAAW,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;IACnB,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;IACd,QAAQ,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;IAChB,UAAU,EAAE,IAAI,eAAM,EAAE;CACzB,CAAC;AAEW,QAAA,gBAAgB,GAAe;IAC1C,WAAW,EAAE,CAAC;IACd,IAAI,EAAE,KAAK;IACX,UAAU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MAAiC,EAC5C,YAAY,EAAE,KAAmC,EACjD,eAAe,EAAE,YAAY,EAC7B,UAAU,EAAE,EAAE,EACd,mBAAmB,EAAE,KAAK,EAC1B,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,SAAS,EACnB,UAAU,EAAE,KAAK,IACjB;AAEW,QAAA,qBAAqB,iCAChC,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,WAAW,EACpB,KAAK,EAAE,EAAE,EACT,KAAK,EAAE,CAAC,EACR,MAAM,EAAE,CAAC,EACT,QAAQ,EAAE,GAAG,EACb,SAAS,EAAE,GAAG,IACX,wBAAgB,KACnB,IAAI,EAAE,IAAI,EACV,YAAY,EAAE,CAAC,EACf,UAAU,EAAE,OAAO,IACnB;AAEW,QAAA,4BAA4B,mCACpC,6BAAqB,KACxB,kBAAkB,EAAE,OAAO,EAC3B,eAAe,EAAE,CAAC,EAClB,gBAAgB,EAAE,CAAC,EACnB,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,QAAQ,EACtB,SAAS,EAAE,YAAY,EACvB,MAAM,EAAE,CAAC,EACT,EAAE,EAAE,EAAE,EAEN,KAAK,EAAE,EAAE,EACT,MAAM,EAAE,EAAE,EACV,cAAc,EAAE,0BAA0B,EAC1C,qBAAqB,EAAE,CAAC,EACxB,gBAAgB,EAAE,KAAK,EACvB,uBAAuB,EAAE,CAAC,EAC1B,gBAAgB,EAAE,CAAC,EACnB,OAAO,EAAE,CAAC,IACV","file":"config.js","sourcesContent":["// 存放公共属性\nimport { Logger, Matrix, pi2 } from '@visactor/vutils';\nimport { CustomPath2D } from '../common/custom-path2d';\nimport {\n type IArcGraphicAttribute,\n type IAreaGraphicAttribute,\n type IGraphicAttribute,\n type ICircleGraphicAttribute,\n type IFillStyle,\n type IGlyphGraphicAttribute,\n type IGroupGraphicAttribute,\n type IImageGraphicAttribute,\n type ILineGraphicAttribute,\n type IPathGraphicAttribute,\n type IPolygonGraphicAttribute,\n type IRect3dGraphicAttribute,\n type IRectGraphicAttribute,\n type IStrokeStyle,\n type IGraphicStyle,\n type ISymbolGraphicAttribute,\n type ITextAttribute,\n type ITextGraphicAttribute,\n type IRichTextGraphicAttribute,\n type ITransform,\n type RichTextWordBreak,\n type RichTextVerticalDirection,\n type RichTextGlobalAlignType,\n type RichTextGlobalBaselineType,\n type IRichTextIconGraphicAttribute,\n type IStarGraphicAttribute,\n type IConnectedStyle,\n type ILayout,\n type IDebugType,\n type IPickStyle,\n MeasureModeEnum\n} from '../interface';\n\nexport const DefaultLayout: ILayout = {\n alignSelf: 'auto'\n};\n\nexport const DefaultTransform: ITransform = {\n x: 0,\n y: 0,\n z: 0,\n dx: 0,\n dy: 0,\n dz: 0,\n scrollX: 0,\n scrollY: 0,\n scaleX: 1,\n scaleY: 1,\n scaleZ: 1,\n angle: 0,\n alpha: 0,\n beta: 0,\n scaleCenter: [0, 0],\n anchor: [0, 0],\n anchor3d: [0, 0],\n postMatrix: new Matrix()\n};\n\nexport const DefaultFillStyle: IFillStyle = {\n fillOpacity: 1,\n fill: false,\n shadowBlur: 0,\n shadowColor: 'black',\n shadowOffsetX: 0,\n shadowOffsetY: 0\n};\n\nconst commonStroke: Omit<IStrokeStyle, 'outerBorder' | 'innerBorder'> = {\n strokeOpacity: 1,\n lineDash: [],\n lineDashOffset: 0,\n lineWidth: 1,\n lineCap: 'butt',\n lineJoin: 'miter',\n miterLimit: 10,\n strokeBoundsBuffer: 2,\n stroke: false\n};\n\nexport const DefaultStrokeStyle: IStrokeStyle = {\n outerBorder: { ...commonStroke, distance: 0 },\n innerBorder: { ...commonStroke, distance: 0 },\n ...commonStroke\n};\n\nexport const DefaultTextStyle: Required<ITextAttribute> = {\n text: '',\n maxLineWidth: Infinity,\n maxWidth: Infinity,\n textAlign: 'left',\n textBaseline: 'alphabetic',\n fontSize: 16,\n // @ts-ignore\n fontFamily: `PingFang SC,Microsoft Yahei,system-ui,-apple-system,segoe ui,\n Roboto,Helvetica,Arial,sans-serif, apple color emoji,segoe ui emoji,segoe ui symbol`,\n fontWeight: '',\n ellipsis: '…',\n fontVariant: '',\n fontStyle: '',\n lineHeight: undefined,\n underline: 0,\n lineThrough: 0,\n scaleIn3d: false,\n direction: 'horizontal',\n wordBreak: 'break-all',\n ignoreBuf: false,\n verticalMode: 0,\n wrap: false,\n whiteSpace: 'no-wrap',\n heightLimit: Infinity,\n lineClamp: Infinity,\n suffixPosition: 'end',\n underlineDash: [],\n underlineOffset: 0,\n disableAutoClipedPoptip: undefined,\n measureMode: MeasureModeEnum.fontBounding,\n keepCenterInLine: false\n};\n\nexport const DefaultPickStyle: IPickStyle = {\n pickStrokeBuffer: 0\n};\n\nexport const DefaultStyle: IGraphicStyle = {\n forceBoundsWidth: undefined,\n forceBoundsHeight: undefined,\n opacity: 1,\n background: null,\n autoAnimateTexture: false,\n textureRatio: 1,\n textureOptions: null,\n backgroundOpacity: 1,\n backgroundCornerRadius: 0,\n texture: null,\n textureColor: 'black',\n textureSize: 10,\n texturePadding: 2,\n backgroundMode: 'no-repeat',\n backgroundFit: true,\n backgroundKeepAspectRatio: false,\n backgroundClip: true,\n backgroundScale: 1,\n backgroundOffsetX: 0,\n backgroundOffsetY: 0,\n blur: 0,\n filter: '',\n cursor: null,\n html: null,\n react: null,\n vue: null,\n ...DefaultFillStyle,\n ...DefaultStrokeStyle,\n ...DefaultLayout,\n ...DefaultPickStyle\n};\n\nexport const DefaultConnectAttribute: Required<IConnectedStyle> = {\n connectedType: 'none',\n // connectedStyle: {\n // stroke: DefaultStrokeStyle.stroke,\n // strokeOpacity: DefaultStrokeStyle.strokeOpacity,\n // lineDash: DefaultStrokeStyle.lineDash,\n // lineDashOffset: DefaultStrokeStyle.lineDashOffset,\n // lineCap: DefaultStrokeStyle.lineCap,\n // lineJoin: DefaultStrokeStyle.lineJoin,\n // lineWidth: DefaultStrokeStyle.lineWidth,\n // fill: DefaultFillStyle.fill,\n // fillOpacity: DefaultFillStyle.fillOpacity\n // },\n connectedStyle: {}, // 默认全都继承父属性\n connectedX: NaN,\n connectedY: NaN\n} as IConnectedStyle;\n\nexport const DefaultDebugAttribute: Required<IDebugType> = {\n _debug_bounds: false\n};\n\nexport const DefaultAttribute: Required<IGraphicAttribute> = {\n strokeSeg: null,\n renderable: true,\n pickable: true,\n shadowGraphic: undefined,\n childrenPickable: true,\n fillPickable: true,\n strokePickable: true,\n visible: true,\n zIndex: 0,\n layout: null,\n boundsPadding: 0,\n fillStrokeOrder: 0,\n renderStyle: 'default',\n pickMode: 'accurate',\n customPickShape: null,\n boundsMode: 'accurate',\n keepDirIn3d: true,\n shadowRootIdx: 1,\n globalZIndex: 1,\n globalCompositeOperation: '',\n overflow: 'hidden',\n shadowPickMode: 'graphic',\n keepStrokeScale: false,\n clipConfig: null,\n roughStyle: null,\n ...DefaultDebugAttribute,\n ...DefaultStyle,\n ...DefaultTransform\n};\n\nexport function addAttributeToPrototype(obj: Record<string, any>, c: any, keys: string[]) {\n keys.forEach(key => {\n c.prototype[key] = obj[key];\n });\n}\nexport function rewriteProto(obj: Record<string, any>, c: Record<string, any>) {\n Object.setPrototypeOf(obj, c);\n}\n\nexport const DefaultArcAttribute: Required<IArcGraphicAttribute> = {\n ...DefaultAttribute,\n startAngle: 0,\n endAngle: pi2,\n innerRadius: 0,\n outerRadius: 1,\n innerPadding: 0,\n outerPadding: 0,\n cornerRadius: 0,\n padRadius: 0,\n padAngle: 0,\n cap: false,\n forceShowCap: false\n};\n\nexport const DefaultAreaAttribute: Required<IAreaGraphicAttribute> = {\n ...DefaultAttribute,\n ...DefaultConnectAttribute,\n points: [],\n segments: [],\n curveType: 'linear',\n clipRange: 1,\n closePath: false,\n curveTension: 1\n};\n\nexport const DefaultCircleAttribute: Required<ICircleGraphicAttribute> = {\n ...DefaultAttribute,\n radius: 1,\n startAngle: 0,\n endAngle: pi2\n};\n\nexport const DefaultGroupAttribute: Required<IGroupGraphicAttribute> = {\n ...DefaultAttribute,\n width: 0,\n height: 0,\n cornerRadius: 0,\n path: [],\n clip: false,\n visibleAll: true,\n display: 'relative',\n flexDirection: 'row',\n flexWrap: 'wrap',\n justifyContent: 'flex-start',\n alignItems: 'flex-start',\n alignContent: 'flex-start',\n baseOpacity: 1,\n cornerType: 'round'\n // 默认是0,不需要主题\n // drawMode: 0\n} as any;\n\nexport const DefaultGlyphAttribute: Required<IGlyphGraphicAttribute> = {\n ...DefaultAttribute,\n path: '',\n width: 0,\n height: 0,\n cornerRadius: 0,\n clip: false\n};\n\nexport const DefaultLineAttribute: Required<ILineGraphicAttribute> = {\n ...DefaultAttribute,\n ...DefaultConnectAttribute,\n points: [],\n segments: [],\n curveType: 'linear',\n clipRange: 1,\n clipRangeByDimension: 'default',\n closePath: false,\n curveTension: 1\n};\n\nexport const DefaultPathAttribute: Required<IPathGraphicAttribute> = {\n ...DefaultAttribute,\n path: new CustomPath2D(),\n fillStrokeOrder: 1,\n clipRange: 1,\n customPath: () => {\n Logger.getInstance().warn('空函数');\n }\n};\n\nexport const DefaultPolygonAttribute: Required<IPolygonGraphicAttribute> = {\n ...DefaultAttribute,\n points: [],\n cornerRadius: 0,\n closePath: true\n};\n\nexport const DefaultStarAttribute: Required<IStarGraphicAttribute> = {\n ...DefaultAttribute,\n width: 100,\n height: 100,\n spikes: 5,\n thickness: 0.5\n};\n\nexport const DefaultRectAttribute: Required<IRectGraphicAttribute> = {\n ...DefaultAttribute,\n width: 0,\n height: 0,\n x1: 0,\n y1: 0,\n strokeBoundsBuffer: 0,\n cornerRadius: 0,\n cornerType: 'round',\n drawStrokeWhenZeroWH: false\n};\n\nexport const DefaultRect3dAttribute: Required<IRect3dGraphicAttribute> = {\n ...DefaultAttribute,\n width: 0,\n height: 0,\n x1: 0,\n y1: 0,\n cornerRadius: 0,\n length: 0,\n cornerType: 'round',\n drawStrokeWhenZeroWH: false\n};\n\nexport const DefaultSymbolAttribute: Required<ISymbolGraphicAttribute> = {\n ...DefaultAttribute,\n symbolType: 'circle',\n size: 10, // 外接**正方形**的边长\n keepDirIn3d: true,\n clipRange: 1\n};\n\nexport const DefaultTextAttribute: Required<ITextGraphicAttribute> = {\n ...DefaultAttribute,\n ...DefaultTextStyle,\n strokeBoundsBuffer: 0,\n keepDirIn3d: true\n};\n\nexport const DefaultRichTextAttribute: Required<IRichTextGraphicAttribute> = {\n ...DefaultAttribute,\n ...DefaultTextStyle,\n upgradeAttrs: null,\n editable: false,\n editOptions: null,\n ascentDescentMode: 'actual',\n width: 300,\n height: 300,\n ellipsis: true,\n wordBreak: 'break-word' as RichTextWordBreak,\n verticalDirection: 'top' as RichTextVerticalDirection,\n textAlign: 'left' as RichTextGlobalAlignType,\n textBaseline: 'top' as RichTextGlobalBaselineType,\n layoutDirection: 'horizontal',\n textConfig: [],\n disableAutoWrapLine: false,\n maxHeight: undefined,\n maxWidth: undefined,\n singleLine: false\n};\n\nexport const DefaultImageAttribute: Required<IImageGraphicAttribute> = {\n repeatX: 'no-repeat',\n repeatY: 'no-repeat',\n image: '',\n width: 0,\n height: 0,\n maxWidth: 500,\n maxHeight: 500,\n ...DefaultAttribute,\n fill: true,\n cornerRadius: 0,\n cornerType: 'round'\n};\n\nexport const DefaultRichTextIconAttribute: Required<IRichTextIconGraphicAttribute> = {\n ...DefaultImageAttribute,\n backgroundShowMode: 'never',\n backgroundWidth: 0,\n backgroundHeight: 0,\n textAlign: 'left',\n textBaseline: 'middle',\n direction: 'horizontal',\n margin: 0,\n id: '',\n\n width: 20,\n height: 20,\n backgroundFill: 'rgba(101, 117, 168, 0.1)',\n backgroundFillOpacity: 1,\n backgroundStroke: false,\n backgroundStrokeOpacity: 1,\n backgroundRadius: 4,\n opacity: 1\n};\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/graphic/config.ts"],"names":[],"mappings":";;;AACA,6CAAuD;AACvD,2DAAuD;AACvD,4CAgCsB;AAET,QAAA,aAAa,GAAY;IACpC,SAAS,EAAE,MAAM;CAClB,CAAC;AAEW,QAAA,gBAAgB,GAAe;IAC1C,CAAC,EAAE,CAAC;IACJ,CAAC,EA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CAAC,EACT,EAAE,EAAE,EAAE,EAEN,KAAK,EAAE,EAAE,EACT,MAAM,EAAE,EAAE,EACV,cAAc,EAAE,0BAA0B,EAC1C,qBAAqB,EAAE,CAAC,EACxB,gBAAgB,EAAE,KAAK,EACvB,uBAAuB,EAAE,CAAC,EAC1B,gBAAgB,EAAE,CAAC,EACnB,OAAO,EAAE,CAAC,IACV","file":"config.js","sourcesContent":["// 存放公共属性\nimport { Logger, Matrix, pi2 } from '@visactor/vutils';\nimport { CustomPath2D } from '../common/custom-path2d';\nimport {\n type IArcGraphicAttribute,\n type IAreaGraphicAttribute,\n type IGraphicAttribute,\n type ICircleGraphicAttribute,\n type IFillStyle,\n type IGlyphGraphicAttribute,\n type IGroupGraphicAttribute,\n type IImageGraphicAttribute,\n type ILineGraphicAttribute,\n type IPathGraphicAttribute,\n type IPolygonGraphicAttribute,\n type IRect3dGraphicAttribute,\n type IRectGraphicAttribute,\n type IStrokeStyle,\n type IGraphicStyle,\n type ISymbolGraphicAttribute,\n type ITextAttribute,\n type ITextGraphicAttribute,\n type IRichTextGraphicAttribute,\n type ITransform,\n type RichTextWordBreak,\n type RichTextVerticalDirection,\n type RichTextGlobalAlignType,\n type RichTextGlobalBaselineType,\n type IRichTextIconGraphicAttribute,\n type IStarGraphicAttribute,\n type IConnectedStyle,\n type ILayout,\n type IDebugType,\n type IPickStyle,\n MeasureModeEnum\n} from '../interface';\n\nexport const DefaultLayout: ILayout = {\n alignSelf: 'auto'\n};\n\nexport const DefaultTransform: ITransform = {\n x: 0,\n y: 0,\n z: 0,\n dx: 0,\n dy: 0,\n dz: 0,\n scrollX: 0,\n scrollY: 0,\n scaleX: 1,\n scaleY: 1,\n scaleZ: 1,\n angle: 0,\n alpha: 0,\n beta: 0,\n scaleCenter: [0, 0],\n anchor: [0, 0],\n anchor3d: [0, 0],\n postMatrix: new Matrix()\n};\n\nexport const DefaultFillStyle: IFillStyle = {\n fillOpacity: 1,\n fill: false,\n shadowBlur: 0,\n shadowColor: 'black',\n shadowOffsetX: 0,\n shadowOffsetY: 0\n};\n\nconst commonStroke: Omit<IStrokeStyle, 'outerBorder' | 'innerBorder'> = {\n strokeOpacity: 1,\n lineDash: [],\n lineDashOffset: 0,\n lineWidth: 1,\n lineCap: 'butt',\n lineJoin: 'miter',\n miterLimit: 10,\n strokeBoundsBuffer: 2,\n stroke: false\n};\n\nexport const DefaultStrokeStyle: IStrokeStyle = {\n outerBorder: { ...commonStroke, distance: 0 },\n innerBorder: { ...commonStroke, distance: 0 },\n ...commonStroke\n};\n\nexport const DefaultTextStyle: Required<ITextAttribute> = {\n text: '',\n maxLineWidth: Infinity,\n maxWidth: Infinity,\n textAlign: 'left',\n textBaseline: 'alphabetic',\n fontSize: 16,\n // @ts-ignore\n fontFamily: `PingFang SC,Microsoft Yahei,system-ui,'-apple-system',segoe ui,\n Roboto,Helvetica,Arial,sans-serif, apple color emoji,segoe ui emoji,segoe ui symbol`,\n fontWeight: '',\n ellipsis: '…',\n fontVariant: '',\n fontStyle: '',\n lineHeight: undefined,\n underline: 0,\n lineThrough: 0,\n scaleIn3d: false,\n direction: 'horizontal',\n wordBreak: 'break-all',\n ignoreBuf: false,\n verticalMode: 0,\n wrap: false,\n whiteSpace: 'no-wrap',\n heightLimit: Infinity,\n lineClamp: Infinity,\n suffixPosition: 'end',\n underlineDash: [],\n underlineOffset: 0,\n disableAutoClipedPoptip: undefined,\n measureMode: MeasureModeEnum.fontBounding,\n keepCenterInLine: false\n};\n\nexport const DefaultPickStyle: IPickStyle = {\n pickStrokeBuffer: 0\n};\n\nexport const DefaultStyle: IGraphicStyle = {\n forceBoundsWidth: undefined,\n forceBoundsHeight: undefined,\n opacity: 1,\n background: null,\n autoAnimateTexture: false,\n textureRatio: 1,\n textureOptions: null,\n backgroundOpacity: 1,\n backgroundCornerRadius: 0,\n texture: null,\n textureColor: 'black',\n textureSize: 10,\n texturePadding: 2,\n backgroundMode: 'no-repeat',\n backgroundFit: true,\n backgroundKeepAspectRatio: false,\n backgroundClip: true,\n backgroundScale: 1,\n backgroundOffsetX: 0,\n backgroundOffsetY: 0,\n blur: 0,\n filter: '',\n cursor: null,\n html: null,\n react: null,\n vue: null,\n ...DefaultFillStyle,\n ...DefaultStrokeStyle,\n ...DefaultLayout,\n ...DefaultPickStyle\n};\n\nexport const DefaultConnectAttribute: Required<IConnectedStyle> = {\n connectedType: 'none',\n // connectedStyle: {\n // stroke: DefaultStrokeStyle.stroke,\n // strokeOpacity: DefaultStrokeStyle.strokeOpacity,\n // lineDash: DefaultStrokeStyle.lineDash,\n // lineDashOffset: DefaultStrokeStyle.lineDashOffset,\n // lineCap: DefaultStrokeStyle.lineCap,\n // lineJoin: DefaultStrokeStyle.lineJoin,\n // lineWidth: DefaultStrokeStyle.lineWidth,\n // fill: DefaultFillStyle.fill,\n // fillOpacity: DefaultFillStyle.fillOpacity\n // },\n connectedStyle: {}, // 默认全都继承父属性\n connectedX: NaN,\n connectedY: NaN\n} as IConnectedStyle;\n\nexport const DefaultDebugAttribute: Required<IDebugType> = {\n _debug_bounds: false\n};\n\nexport const DefaultAttribute: Required<IGraphicAttribute> = {\n strokeSeg: null,\n renderable: true,\n pickable: true,\n shadowGraphic: undefined,\n childrenPickable: true,\n fillPickable: true,\n strokePickable: true,\n visible: true,\n zIndex: 0,\n layout: null,\n boundsPadding: 0,\n fillStrokeOrder: 0,\n renderStyle: 'default',\n pickMode: 'accurate',\n customPickShape: null,\n boundsMode: 'accurate',\n keepDirIn3d: true,\n shadowRootIdx: 1,\n globalZIndex: 1,\n globalCompositeOperation: '',\n overflow: 'hidden',\n shadowPickMode: 'graphic',\n keepStrokeScale: false,\n clipConfig: null,\n roughStyle: null,\n ...DefaultDebugAttribute,\n ...DefaultStyle,\n ...DefaultTransform\n};\n\nexport function addAttributeToPrototype(obj: Record<string, any>, c: any, keys: string[]) {\n keys.forEach(key => {\n c.prototype[key] = obj[key];\n });\n}\nexport function rewriteProto(obj: Record<string, any>, c: Record<string, any>) {\n Object.setPrototypeOf(obj, c);\n}\n\nexport const DefaultArcAttribute: Required<IArcGraphicAttribute> = {\n ...DefaultAttribute,\n startAngle: 0,\n endAngle: pi2,\n innerRadius: 0,\n outerRadius: 1,\n innerPadding: 0,\n outerPadding: 0,\n cornerRadius: 0,\n padRadius: 0,\n padAngle: 0,\n cap: false,\n forceShowCap: false\n};\n\nexport const DefaultAreaAttribute: Required<IAreaGraphicAttribute> = {\n ...DefaultAttribute,\n ...DefaultConnectAttribute,\n points: [],\n segments: [],\n curveType: 'linear',\n clipRange: 1,\n closePath: false,\n curveTension: 1\n};\n\nexport const DefaultCircleAttribute: Required<ICircleGraphicAttribute> = {\n ...DefaultAttribute,\n radius: 1,\n startAngle: 0,\n endAngle: pi2\n};\n\nexport const DefaultGroupAttribute: Required<IGroupGraphicAttribute> = {\n ...DefaultAttribute,\n width: 0,\n height: 0,\n cornerRadius: 0,\n path: [],\n clip: false,\n visibleAll: true,\n display: 'relative',\n flexDirection: 'row',\n flexWrap: 'wrap',\n justifyContent: 'flex-start',\n alignItems: 'flex-start',\n alignContent: 'flex-start',\n baseOpacity: 1,\n cornerType: 'round'\n // 默认是0,不需要主题\n // drawMode: 0\n} as any;\n\nexport const DefaultGlyphAttribute: Required<IGlyphGraphicAttribute> = {\n ...DefaultAttribute,\n path: '',\n width: 0,\n height: 0,\n cornerRadius: 0,\n clip: false\n};\n\nexport const DefaultLineAttribute: Required<ILineGraphicAttribute> = {\n ...DefaultAttribute,\n ...DefaultConnectAttribute,\n points: [],\n segments: [],\n curveType: 'linear',\n clipRange: 1,\n clipRangeByDimension: 'default',\n closePath: false,\n curveTension: 1\n};\n\nexport const DefaultPathAttribute: Required<IPathGraphicAttribute> = {\n ...DefaultAttribute,\n path: new CustomPath2D(),\n fillStrokeOrder: 1,\n clipRange: 1,\n customPath: () => {\n Logger.getInstance().warn('空函数');\n }\n};\n\nexport const DefaultPolygonAttribute: Required<IPolygonGraphicAttribute> = {\n ...DefaultAttribute,\n points: [],\n cornerRadius: 0,\n closePath: true\n};\n\nexport const DefaultStarAttribute: Required<IStarGraphicAttribute> = {\n ...DefaultAttribute,\n width: 100,\n height: 100,\n spikes: 5,\n thickness: 0.5\n};\n\nexport const DefaultRectAttribute: Required<IRectGraphicAttribute> = {\n ...DefaultAttribute,\n width: 0,\n height: 0,\n x1: 0,\n y1: 0,\n strokeBoundsBuffer: 0,\n cornerRadius: 0,\n cornerType: 'round',\n drawStrokeWhenZeroWH: false\n};\n\nexport const DefaultRect3dAttribute: Required<IRect3dGraphicAttribute> = {\n ...DefaultAttribute,\n width: 0,\n height: 0,\n x1: 0,\n y1: 0,\n cornerRadius: 0,\n length: 0,\n cornerType: 'round',\n drawStrokeWhenZeroWH: false\n};\n\nexport const DefaultSymbolAttribute: Required<ISymbolGraphicAttribute> = {\n ...DefaultAttribute,\n symbolType: 'circle',\n size: 10, // 外接**正方形**的边长\n keepDirIn3d: true,\n clipRange: 1\n};\n\nexport const DefaultTextAttribute: Required<ITextGraphicAttribute> = {\n ...DefaultAttribute,\n ...DefaultTextStyle,\n strokeBoundsBuffer: 0,\n keepDirIn3d: true\n};\n\nexport const DefaultRichTextAttribute: Required<IRichTextGraphicAttribute> = {\n ...DefaultAttribute,\n ...DefaultTextStyle,\n upgradeAttrs: null,\n editable: false,\n editOptions: null,\n ascentDescentMode: 'actual',\n width: 300,\n height: 300,\n ellipsis: true,\n wordBreak: 'break-word' as RichTextWordBreak,\n verticalDirection: 'top' as RichTextVerticalDirection,\n textAlign: 'left' as RichTextGlobalAlignType,\n textBaseline: 'top' as RichTextGlobalBaselineType,\n layoutDirection: 'horizontal',\n textConfig: [],\n disableAutoWrapLine: false,\n maxHeight: undefined,\n maxWidth: undefined,\n singleLine: false\n};\n\nexport const DefaultImageAttribute: Required<IImageGraphicAttribute> = {\n repeatX: 'no-repeat',\n repeatY: 'no-repeat',\n image: '',\n width: 0,\n height: 0,\n maxWidth: 500,\n maxHeight: 500,\n ...DefaultAttribute,\n fill: true,\n cornerRadius: 0,\n cornerType: 'round'\n};\n\nexport const DefaultRichTextIconAttribute: Required<IRichTextIconGraphicAttribute> = {\n ...DefaultImageAttribute,\n backgroundShowMode: 'never',\n backgroundWidth: 0,\n backgroundHeight: 0,\n textAlign: 'left',\n textBaseline: 'middle',\n direction: 'horizontal',\n margin: 0,\n id: '',\n\n width: 20,\n height: 20,\n backgroundFill: 'rgba(101, 117, 168, 0.1)',\n backgroundFillOpacity: 1,\n backgroundStroke: false,\n backgroundStrokeOpacity: 1,\n backgroundRadius: 4,\n opacity: 1\n};\n"]}
|
package/cjs/graphic/symbol.js
CHANGED
|
@@ -61,8 +61,8 @@ class Symbol extends graphic_1.Graphic {
|
|
|
61
61
|
return aabbBounds;
|
|
62
62
|
}
|
|
63
63
|
updateSymbolAABBBoundsAccurate(attribute, symbolTheme, aabbBounds) {
|
|
64
|
-
const {size: size = symbolTheme.size} = attribute;
|
|
65
|
-
return
|
|
64
|
+
const {size: size = symbolTheme.size} = attribute, symbolClass = this.getParsedPath();
|
|
65
|
+
return symbolClass ? (symbolClass.bounds(size, aabbBounds), aabbBounds) : aabbBounds;
|
|
66
66
|
}
|
|
67
67
|
needUpdateTags(keys) {
|
|
68
68
|
return super.needUpdateTags(keys, SYMBOL_UPDATE_TAG_KEY);
|
|
@@ -71,8 +71,9 @@ class Symbol extends graphic_1.Graphic {
|
|
|
71
71
|
return super.needUpdateTag(key, SYMBOL_UPDATE_TAG_KEY);
|
|
72
72
|
}
|
|
73
73
|
toCustomPath() {
|
|
74
|
-
const symbolInstance = this.getParsedPath()
|
|
75
|
-
|
|
74
|
+
const symbolInstance = this.getParsedPath();
|
|
75
|
+
if (!symbolInstance) return null;
|
|
76
|
+
const size = this.attribute.size, formattedSize = (0, vutils_1.isArray)(size) ? size : [ size, size ];
|
|
76
77
|
return symbolInstance.path ? (new custom_path2d_1.CustomPath2D).fromCustomPath2D(symbolInstance.path, 0, 0, formattedSize[0], formattedSize[1]) : (new custom_path2d_1.CustomPath2D).fromString(symbolInstance.path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3C,CAAC;IAED,oBAAoB;QAClB,OAAO,MAAM,CAAC,mBAAmB,CAAC;IACpC,CAAC;;AAjJH,wBAkJC;AA/IQ,0BAAmB,mBACxB,UAAU,EAAE,CAAC,IACV,6BAAmB,EACtB;AA8IJ,SAAgB,YAAY,CAAC,UAAmC;IAC9D,OAAO,IAAI,MAAM,CAAC,UAAU,CAAC,CAAC;AAChC,CAAC;AAFD,oCAEC","file":"symbol.js","sourcesContent":["import type { IAABBBounds } from '@visactor/vutils';\nimport { isArray } from '@visactor/vutils';\nimport type { ISymbol, ISymbolClass, ISymbolGraphicAttribute } from '../interface';\nimport { Graphic, GRAPHIC_UPDATE_TAG_KEY, NOWORK_ANIMATE_ATTR } from './graphic';\nimport { getTheme } from './theme';\nimport { application } from '../application';\nimport { CustomPath2D } from '../common/custom-path2d';\nimport { SYMBOL_NUMBER_TYPE } from './constants';\nimport { updateBoundsOfSymbolOuterBorder } from './graphic-service/symbol-outer-border-bounds';\n\nconst SYMBOL_UPDATE_TAG_KEY = ['symbolType', 'size', ...GRAPHIC_UPDATE_TAG_KEY];\n\n/**\n * symbol\n */\nexport class Symbol extends Graphic<ISymbolGraphicAttribute> implements ISymbol {\n type: 'symbol' = 'symbol';\n\n static NOWORK_ANIMATE_ATTR = {\n symbolType: 1,\n ...NOWORK_ANIMATE_ATTR\n };\n\n constructor(params: ISymbolGraphicAttribute = { symbolType: 'circle' }) {\n super(params);\n this.numberType = SYMBOL_NUMBER_TYPE;\n }\n\n protected _parsedPath?: ISymbolClass;\n\n getParsedPath(): ISymbolClass {\n if (this.shouldUpdateShape()) {\n this._parsedPath = this.doUpdateParsedPath();\n this.clearUpdateShapeTag();\n }\n return this._parsedPath as ISymbolClass;\n }\n\n getParsedPath2D(x = 0, y = 0, size = 1): Path2D | null {\n let path: Path2D | null = null;\n try {\n path = new Path2D();\n } catch (err) {\n return null;\n }\n const parsedPath = this.getParsedPath();\n if (!parsedPath) {\n return null;\n }\n parsedPath.draw(path, size, x, y);\n }\n\n isValid(): boolean {\n return super.isValid() && this._isValid();\n }\n private _isValid(): boolean {\n const { size } = this.attribute;\n return isArray(size) ? size.length === 2 && size.every(this._validNumber) : this._validNumber(size);\n }\n\n protected doUpdateParsedPath(): ISymbolClass {\n const { symbolType = 'circle' } = this.attribute;\n return super.parsePath(symbolType);\n }\n\n getGraphicTheme(): Required<ISymbolGraphicAttribute> {\n return getTheme(this).symbol;\n }\n\n protected updateAABBBounds(\n attribute: ISymbolGraphicAttribute,\n symbolTheme: Required<ISymbolGraphicAttribute>,\n aabbBounds: IAABBBounds,\n full?: boolean\n ) {\n if (!this.updatePathProxyAABBBounds(aabbBounds)) {\n full\n ? this.updateSymbolAABBBoundsImprecise(attribute, symbolTheme, aabbBounds)\n : this.updateSymbolAABBBoundsAccurate(attribute, symbolTheme, aabbBounds);\n }\n\n const { tb1, tb2 } = application.graphicService.updateTempAABBBounds(aabbBounds);\n\n updateBoundsOfSymbolOuterBorder(attribute, symbolTheme, tb1);\n aabbBounds.union(tb1);\n tb1.setValue(tb2.x1, tb2.y1, tb2.x2, tb2.y2);\n\n this.widthWithoutTransform = aabbBounds.x2 - aabbBounds.x1;\n this.heightWithoutTransform = aabbBounds.y2 - aabbBounds.y1;\n this.x1WithoutTransform = aabbBounds.x1;\n this.y1WithoutTransform = aabbBounds.y1;\n\n const { lineJoin = symbolTheme.lineJoin } = attribute;\n application.graphicService.transformAABBBounds(attribute, aabbBounds, symbolTheme, lineJoin === 'miter', this);\n return aabbBounds;\n }\n\n protected updateSymbolAABBBoundsImprecise(\n attribute: ISymbolGraphicAttribute,\n symbolTheme: Required<ISymbolGraphicAttribute>,\n aabbBounds: IAABBBounds\n ): IAABBBounds {\n // 当做正方形计算\n const { size = symbolTheme.size } = attribute;\n\n if (isArray(size)) {\n aabbBounds.set(-size[0] / 2, -size[1] / 2, size[0] / 2, size[1] / 2);\n } else {\n const halfWH = size / 2;\n\n aabbBounds.set(-halfWH, -halfWH, halfWH, halfWH);\n }\n\n return aabbBounds;\n }\n\n protected updateSymbolAABBBoundsAccurate(\n attribute: ISymbolGraphicAttribute,\n symbolTheme: Required<ISymbolGraphicAttribute>,\n aabbBounds: IAABBBounds\n ): IAABBBounds {\n const { size = symbolTheme.size } = attribute;\n\n const symbolClass = this.getParsedPath();\n if (!symbolClass) {\n return aabbBounds;\n }\n symbolClass.bounds(size, aabbBounds);\n\n return aabbBounds;\n }\n\n protected needUpdateTags(keys: string[]): boolean {\n return super.needUpdateTags(keys, SYMBOL_UPDATE_TAG_KEY);\n }\n protected needUpdateTag(key: string): boolean {\n return super.needUpdateTag(key, SYMBOL_UPDATE_TAG_KEY);\n }\n\n toCustomPath() {\n const symbolInstance = this.getParsedPath();\n if (!symbolInstance) {\n return null;\n }\n const size = this.attribute.size;\n const x = 0;\n const y = 0;\n const formattedSize = isArray(size) ? size : [size, size];\n\n return symbolInstance.path\n ? new CustomPath2D().fromCustomPath2D(symbolInstance.path, x, y, formattedSize[0], formattedSize[1])\n : new CustomPath2D().fromString(symbolInstance.pathStr, x, y, formattedSize[0], formattedSize[1]);\n }\n\n clone() {\n return new Symbol({ ...this.attribute });\n }\n\n getNoWorkAnimateAttr(): Record<string, number> {\n return Symbol.NOWORK_ANIMATE_ATTR;\n }\n}\n\nexport function createSymbol(attributes: ISymbolGraphicAttribute): ISymbol {\n return new Symbol(attributes);\n}\n\n// addAttributeToPrototype(DefaultSymbolStyle, Symbol, PURE_STYLE_KEY);\n"]}
|
package/dist/index.es.js
CHANGED
|
@@ -874,7 +874,7 @@ class SyncHook extends Hook {
|
|
|
874
874
|
|
|
875
875
|
const EnvContribution = Symbol.for('EnvContribution');
|
|
876
876
|
const VGlobal = Symbol.for('VGlobal');
|
|
877
|
-
const DEFAULT_TEXT_FONT_FAMILY =
|
|
877
|
+
const DEFAULT_TEXT_FONT_FAMILY = `PingFang SC,Helvetica Neue,Microsoft Yahei,system-ui,'-apple-system',segoe ui,Roboto,Helvetica,Arial,sans-serif,apple color emoji,segoe ui emoji,segoe ui symbol`;
|
|
878
878
|
|
|
879
879
|
const container = new Container();
|
|
880
880
|
|
|
@@ -3486,7 +3486,7 @@ const DefaultTextStyle = {
|
|
|
3486
3486
|
textAlign: 'left',
|
|
3487
3487
|
textBaseline: 'alphabetic',
|
|
3488
3488
|
fontSize: 16,
|
|
3489
|
-
fontFamily: `PingFang SC,Microsoft Yahei,system-ui
|
|
3489
|
+
fontFamily: `PingFang SC,Microsoft Yahei,system-ui,'-apple-system',segoe ui,
|
|
3490
3490
|
Roboto,Helvetica,Arial,sans-serif, apple color emoji,segoe ui emoji,segoe ui symbol`,
|
|
3491
3491
|
fontWeight: '',
|
|
3492
3492
|
ellipsis: '…',
|
|
@@ -14222,6 +14222,9 @@ let Symbol$1 = class Symbol extends Graphic {
|
|
|
14222
14222
|
updateSymbolAABBBoundsAccurate(attribute, symbolTheme, aabbBounds) {
|
|
14223
14223
|
const { size = symbolTheme.size } = attribute;
|
|
14224
14224
|
const symbolClass = this.getParsedPath();
|
|
14225
|
+
if (!symbolClass) {
|
|
14226
|
+
return aabbBounds;
|
|
14227
|
+
}
|
|
14225
14228
|
symbolClass.bounds(size, aabbBounds);
|
|
14226
14229
|
return aabbBounds;
|
|
14227
14230
|
}
|
|
@@ -14233,6 +14236,9 @@ let Symbol$1 = class Symbol extends Graphic {
|
|
|
14233
14236
|
}
|
|
14234
14237
|
toCustomPath() {
|
|
14235
14238
|
const symbolInstance = this.getParsedPath();
|
|
14239
|
+
if (!symbolInstance) {
|
|
14240
|
+
return null;
|
|
14241
|
+
}
|
|
14236
14242
|
const size = this.attribute.size;
|
|
14237
14243
|
const x = 0;
|
|
14238
14244
|
const y = 0;
|
|
@@ -23005,7 +23011,7 @@ class Stage extends Group {
|
|
|
23005
23011
|
});
|
|
23006
23012
|
}
|
|
23007
23013
|
enableAutoRefresh() {
|
|
23008
|
-
if (this.autoRefresh) {
|
|
23014
|
+
if (this.autoRefresh || this.global.env === 'node') {
|
|
23009
23015
|
return;
|
|
23010
23016
|
}
|
|
23011
23017
|
this.autoRefresh = true;
|
package/es/constants.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export declare const EnvContribution: unique symbol;
|
|
2
2
|
export declare const VGlobal: unique symbol;
|
|
3
|
-
export declare const DEFAULT_TEXT_FONT_FAMILY = "PingFang SC,Helvetica Neue,Microsoft Yahei,system-ui
|
|
3
|
+
export declare const DEFAULT_TEXT_FONT_FAMILY = "PingFang SC,Helvetica Neue,Microsoft Yahei,system-ui,'-apple-system',segoe ui,Roboto,Helvetica,Arial,sans-serif,apple color emoji,segoe ui emoji,segoe ui symbol";
|
package/es/constants.js
CHANGED
|
@@ -2,5 +2,5 @@ export const EnvContribution = Symbol.for("EnvContribution");
|
|
|
2
2
|
|
|
3
3
|
export const VGlobal = Symbol.for("VGlobal");
|
|
4
4
|
|
|
5
|
-
export const DEFAULT_TEXT_FONT_FAMILY = "PingFang SC,Helvetica Neue,Microsoft Yahei,system-ui
|
|
5
|
+
export const DEFAULT_TEXT_FONT_FAMILY = "PingFang SC,Helvetica Neue,Microsoft Yahei,system-ui,'-apple-system',segoe ui,Roboto,Helvetica,Arial,sans-serif,apple color emoji,segoe ui emoji,segoe ui symbol";
|
|
6
6
|
//# sourceMappingURL=constants.js.map
|
package/es/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;AAC7D,MAAM,CAAC,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;AAE7C,MAAM,CAAC,MAAM,wBAAwB,GAEnC,
|
|
1
|
+
{"version":3,"sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;AAC7D,MAAM,CAAC,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;AAE7C,MAAM,CAAC,MAAM,wBAAwB,GAEnC,kKAAkK,CAAC","file":"constants.js","sourcesContent":["export const EnvContribution = Symbol.for('EnvContribution');\nexport const VGlobal = Symbol.for('VGlobal');\n\nexport const DEFAULT_TEXT_FONT_FAMILY =\n // eslint-disable-next-line max-len\n `PingFang SC,Helvetica Neue,Microsoft Yahei,system-ui,'-apple-system',segoe ui,Roboto,Helvetica,Arial,sans-serif,apple color emoji,segoe ui emoji,segoe ui symbol`;\n"]}
|
package/es/core/stage.js
CHANGED
|
@@ -293,7 +293,7 @@ export class Stage extends Group {
|
|
|
293
293
|
})));
|
|
294
294
|
}
|
|
295
295
|
enableAutoRefresh() {
|
|
296
|
-
this.autoRefresh || (this.autoRefresh = !0, this.pluginService.register(new AutoRefreshPlugin));
|
|
296
|
+
this.autoRefresh || "node" === this.global.env || (this.autoRefresh = !0, this.pluginService.register(new AutoRefreshPlugin));
|
|
297
297
|
}
|
|
298
298
|
disableAutoRefresh() {
|
|
299
299
|
this.autoRefresh && (this.autoRefresh = !1, this.pluginService.findPluginsByName("AutoRefreshPlugin").forEach((plugin => {
|
package/es/core/stage.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/core/stage.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AA6B3D,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAEnC,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAA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AgB,CAAC,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QAE3D,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;IAC5D,CAAC;IAED,iBAAiB;QACf,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY,CAAC,iBAAiB,EAAE,CAAC;IAC7D,CAAC;IACD,kBAAkB;QAChB,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY,CAAC,kBAAkB,EAAE,CAAC;IAC9D,CAAC;IAED,gBAAgB;QACd,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE;YACvB,IAAI,CAAC,aAAa,GAAG,SAAS,CAAC,GAAG,CAAiB,aAAa,CAAC,CAAC;SACnE;QACD,OAAO,IAAI,CAAC,aAAa,CAAC;IAC5B,CAAC;IAED,MAAM;QACJ,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC;QAC5B,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC;IAC9B,CAAC;CACF","file":"stage.js","sourcesContent":["import type { IAABBBounds, IBounds, IBoundsLike, IMatrix } from '@visactor/vutils';\nimport { Bounds, Point, isString } from '@visactor/vutils';\nimport type {\n IGraphic,\n IExportType,\n IStage,\n IStageParams,\n ILayer,\n IColor,\n IGlobal,\n IOption3D,\n ICamera,\n vec3,\n IDirectionLight,\n ITicker,\n IRenderService,\n IPickerService,\n IPluginService,\n ISyncHook,\n IDrawContext,\n IWindow,\n ILayerService,\n ITimeline,\n IOptimizeType,\n LayerMode,\n PickResult,\n IPlugin,\n IGraphicService,\n IRenderServiceDrawParams\n} from '../interface';\nimport { VWindow } from './window';\nimport type { Layer } from './layer';\nimport { EventSystem } from '../event';\nimport { container } from '../container';\nimport { RenderService } from '../render/constants';\nimport { Group } from '../graphic/group';\nimport { Theme } from '../graphic/theme';\nimport { PickerService } from '../picker/constants';\nimport { PluginService } from '../plugins/constants';\nimport { AutoRenderPlugin } from '../plugins/builtin-plugin/auto-render-plugin';\nimport { AutoRefreshPlugin } from '../plugins/builtin-plugin/auto-refresh-plugin';\nimport { IncrementalAutoRenderPlugin } from '../plugins/builtin-plugin/incremental-auto-render-plugin';\nimport { DirtyBoundsPlugin } from '../plugins/builtin-plugin/dirty-bounds-plugin';\nimport { SyncHook } from '../tapable';\nimport { LayerService } from './constants';\nimport { application } from '../application';\nimport { isBrowserEnv } from '../env-check';\nimport { Factory } from '../factory';\nimport { Graphic, GraphicService } from '../graphic';\n\nconst DefaultConfig = {\n WIDTH: 500,\n HEIGHT: 500,\n X: 0,\n Y: 0,\n BACKGROUND: 'white'\n};\n\ntype IStageState = 'rendering' | 'normal';\n\n/**\n * Stage是一个舞台或一个视口,并不直接对应一个或多个Canvas,逻辑上和Canvas无关\n *\n * 1. Stage对应一个Canvas的整体,Stage的宽高即为Canvas的宽高\n * 2. Stage小于Canvas,Stage作为Canvas某个区域的视口,只管理这个区域\n * 3. 多图层时Stage的多个图层对应多个Canvas\n *\n * 原生环境下Stage可以拥有一个Window或者使用Window的一块区域\n *\n * 【注】如果希望获取完整的Canvas或窗口或者调整窗口信息,请使用Window模块\n */\nexport class Stage extends Group implements IStage {\n declare parent: IStage | null;\n\n declare state: IStageState;\n\n private _background: string | IColor;\n protected nextFrameRenderLayerSet: Set<Layer>;\n protected willNextFrameRender: boolean;\n protected _cursor: string;\n renderCount: number;\n dirtyBounds: IBounds | null;\n option3d?: IOption3D;\n declare light?: IDirectionLight;\n declare camera?: ICamera;\n declare renderStyle?: string;\n\n declare hooks: {\n beforeRender: ISyncHook<[IStage]>;\n afterRender: ISyncHook<[IStage]>;\n afterClearScreen: ISyncHook<[IRenderServiceDrawParams]>;\n afterClearRect: ISyncHook<[IRenderServiceDrawParams]>;\n };\n\n set viewBox(b: IBoundsLike) {\n this.window.setViewBox(b);\n }\n get viewBox(): IAABBBounds {\n return this.window.getViewBox();\n }\n\n /**\n * @deprecated 不建议使用\n */\n get x(): number {\n return this.window.getViewBox().x1;\n }\n /**\n * @deprecated 不建议使用\n */\n set x(x: number) {\n const b = this.window.getViewBox();\n b.translate(x - b.x1, 0);\n this.window.setViewBox(b);\n }\n /**\n * @deprecated 不建议使用\n */\n get y(): number {\n return this.window.getViewBox().y1;\n }\n /**\n * @deprecated 不建议使用\n */\n set y(y: number) {\n const b = this.window.getViewBox();\n b.translate(0, y - b.y1);\n this.window.setViewBox(b);\n }\n get width(): number {\n return this.window.width;\n }\n set width(w: number) {\n this.resize(w, this.height);\n }\n get viewWidth(): number {\n return this.window.getViewBox().width();\n }\n set viewWidth(w: number) {\n this.resizeView(w, this.viewHeight);\n }\n get viewHeight(): number {\n return this.window.getViewBox().height();\n }\n set viewHeight(h: number) {\n this.resizeView(this.viewWidth, h);\n }\n get height(): number {\n return this.window.height;\n }\n set height(h: number) {\n this.resize(this.width, h);\n }\n get dpr(): number {\n return this.window.dpr;\n }\n set dpr(r: number) {\n this.setDpr(r);\n }\n get background(): string | IColor {\n return this._background ?? DefaultConfig.BACKGROUND;\n }\n set background(b: string | IColor) {\n this._background = b;\n }\n get defaultLayer(): ILayer {\n return this.at(0) as unknown as ILayer;\n }\n\n protected _ticker: ITicker;\n\n autoRender: boolean;\n autoRefresh: boolean;\n _enableLayout: boolean;\n htmlAttribute: boolean | string | any;\n reactAttribute: boolean | string | any;\n increaseAutoRender: boolean;\n view3dTranform: boolean;\n readonly window: IWindow;\n private readonly global: IGlobal;\n readonly renderService: IRenderService;\n protected pickerService?: IPickerService;\n readonly pluginService: IPluginService;\n readonly layerService: ILayerService;\n readonly graphicService: IGraphicService;\n private _eventSystem?: EventSystem;\n private get eventSystem(): EventSystem {\n return this._eventSystem;\n }\n\n protected _beforeRenderList: Array<(stage: IStage) => void>;\n protected _afterRenderList: Array<(stage: IStage) => void>;\n protected _afterClearScreen?: (drawParams: any) => void;\n protected _afterClearRect?: (drawParams: any) => void;\n // 0: 正常渲染, > 0: 跳过隐藏canvas的渲染, < 0: 禁止渲染\n protected _skipRender?: number;\n protected _afterNextRenderCbs?: ((stage: IStage) => void)[];\n protected lastRenderparams?: Partial<IDrawContext>;\n\n protected interactiveLayer?: ILayer;\n protected supportInteractiveLayer: boolean;\n protected timeline: ITimeline;\n\n declare params: Partial<IStageParams>;\n\n // 是否在render之前执行了tick,如果没有执行,尝试执行tick用来应用动画属性,避免动画过程中随意赋值然后又调用同步render导致属性的突变\n // 第一次render不需要强行走动画\n protected tickedBeforeRender: boolean = true;\n\n // 随机分配一个rafId\n readonly rafId: number;\n\n get ticker() {\n return this._ticker;\n }\n\n set ticker(ticker: ITicker) {\n ticker.bindStage(this);\n if (this._ticker) {\n this._ticker.removeListener('tick', this.afterTickCb);\n }\n ticker.addTimeline(this.timeline);\n this._ticker = ticker;\n this._ticker.on('tick', this.afterTickCb);\n }\n\n /**\n * 所有属性都具有默认值。\n * Canvas为字符串或者Canvas元素,那么默认图层就会绑定到这个Canvas上\n * 如果不传入Canvas,那么会新建一个Canvas,用户可以通过Window模块管理这个Canvas\n * 1. 如果没有传入宽高,那么默认为canvas宽高,如果传入了宽高则stage使用传入宽高作为视口宽高\n * @param params\n */\n constructor(params: Partial<IStageParams> = {}) {\n super({});\n this.params = params;\n this.theme = new Theme();\n this.hooks = {\n beforeRender: new SyncHook(['stage']),\n afterRender: new SyncHook(['stage']),\n afterClearScreen: new SyncHook(['stage']),\n afterClearRect: new SyncHook(['stage'])\n };\n this.global = application.global;\n if (!this.global.env && isBrowserEnv()) {\n // 如果是浏览器环境,默认设置env\n this.global.setEnv('browser');\n }\n this.window = container.get<IWindow>(VWindow);\n this.renderService = container.get<IRenderService>(RenderService);\n this.pluginService = container.get<IPluginService>(PluginService);\n this.layerService = container.get<ILayerService>(LayerService);\n this.graphicService = container.get<IGraphicService>(GraphicService);\n this.pluginService.active(this, params);\n this._beforeRenderList = [];\n this._afterRenderList = [];\n\n this.window.create({\n width: params.width,\n height: params.height,\n viewBox: params.viewBox,\n container: params.container,\n dpr: params.dpr || this.global.devicePixelRatio,\n canvasControled: params.canvasControled !== false,\n title: params.title || '',\n canvas: params.canvas\n });\n\n this.state = 'normal';\n this.renderCount = 0;\n this.tryInitEventSystem();\n // // 没有传入xy就默认为0\n // this._x = params.x ?? DefaultConfig.X;\n // this._y = params.y ?? DefaultConfig.Y;\n // // 没有传入view的宽高则默认为window的宽高\n // this._viewWidth = params.viewWidth ?? this.window.width;\n // this._viewHeight = params.viewHeight ?? this.window.height;\n // this._AABBBounds.set(this._x, this._y, this._viewWidth + this._x, this._viewHeight + this._y);\n // 背景色默认为纯白色\n this._background = params.background ?? DefaultConfig.BACKGROUND;\n\n // 创建一个默认layer图层\n // this.appendChild(new Layer(this, this.global, this.window, { main: true }));\n this.appendChild(this.layerService.createLayer(this, { main: true }));\n\n this.nextFrameRenderLayerSet = new Set();\n this.willNextFrameRender = false;\n this.stage = this;\n this.renderStyle = params.renderStyle;\n\n // this.autoRender = params.autoRender;\n if (params.autoRender) {\n this.enableAutoRender();\n }\n if (params.autoRefresh) {\n this.enableAutoRefresh();\n }\n // 默认不开启dirtyBounds\n if (params.disableDirtyBounds === false) {\n this.enableDirtyBounds();\n }\n\n if (params.enableHtmlAttribute) {\n this.enableHtmlAttribute(params.enableHtmlAttribute);\n }\n if (params.ReactDOM) {\n this.enableReactAttribute(params.ReactDOM);\n }\n\n params.enableLayout && this.enableLayout();\n this.hooks.beforeRender.tap('constructor', this.beforeRender);\n this.hooks.afterRender.tap('constructor', this.afterRender);\n if (params.beforeRender) {\n this._beforeRenderList.push(params.beforeRender);\n }\n if (params.afterRender) {\n this._afterRenderList.push(params.afterRender);\n }\n this.hooks.afterClearScreen.tap('constructor', this.afterClearScreen);\n this.hooks.afterClearRect.tap('constructor', this.afterClearRect);\n this._afterClearScreen = params.afterClearScreen;\n this._afterClearRect = params.afterClearRect;\n this.supportInteractiveLayer = params.interactiveLayer !== false;\n if (!params.optimize) {\n params.optimize = {\n tickRenderMode: 'effect'\n };\n }\n this.optmize(params.optimize);\n // 如果背景是图片,触发加载图片操作\n if (params.background && isString(this._background) && this._background.includes('/')) {\n this.setAttributes({ background: this._background });\n }\n\n this.initAnimate(params);\n this.rafId = params.rafId ?? Math.floor(Math.random() * 6);\n }\n\n initAnimate(params: Partial<IStageParams>) {\n if ((this as any).createTicker && (this as any).createTimeline) {\n this._ticker = params.ticker || (this as any).createTicker(this);\n this._ticker.bindStage(this);\n if (this.params.optimize?.tickRenderMode === 'performance') {\n this._ticker.setFPS(30);\n }\n this.timeline = (this as any).createTimeline();\n this._ticker.addTimeline(this.timeline);\n this._ticker.on('tick', this.afterTickCb);\n }\n }\n\n startAnimate() {\n if (this._ticker && this.timeline) {\n this._ticker.start();\n this.timeline.resume();\n }\n }\n\n pauseRender(sr: number = -1) {\n this._skipRender = sr;\n }\n\n resumeRender() {\n this._skipRender = 0;\n }\n\n protected tryInitEventSystem() {\n if (this.global.supportEvent && !this._eventSystem) {\n this._eventSystem = new EventSystem({\n targetElement: this.window,\n resolution: this.window.dpr || this.global.devicePixelRatio,\n rootNode: this as any,\n global: this.global,\n supportsPointerEvents: this.params.supportsPointerEvents,\n supportsTouchEvents: this.params.supportsTouchEvents,\n ...this.params.event\n });\n }\n }\n\n preventRender(prevent: boolean) {\n if (prevent) {\n this._skipRender = -Infinity;\n } else {\n // 判断是否需要outRange优化\n if (this.params.optimize.skipRenderWithOutRange !== false) {\n this._skipRender = this.window.isVisible() ? 0 : 1;\n } else {\n this._skipRender = 0;\n }\n }\n }\n\n // 优化策略\n optmize(params: IOptimizeType) {\n this.optmizeRender(params.skipRenderWithOutRange);\n this.params.optimize = params;\n }\n\n // 优化渲染\n protected optmizeRender(skipRenderWithOutRange: boolean = false) {\n if (!skipRenderWithOutRange) {\n return;\n }\n // 不在视口内的时候,跳过渲染\n this._skipRender = this._skipRender < 0 ? this._skipRender : this.window.isVisible() ? 0 : 1;\n this.window.onVisibleChange(this._onVisibleChange);\n }\n\n protected _onVisibleChange = (visible: boolean) => {\n if (this._skipRender < 0) {\n return;\n }\n if (visible) {\n if (this.dirtyBounds) {\n const b = this.window.getViewBox();\n this.dirtyBounds.setValue(b.x1, b.y1, b.width(), b.height());\n }\n if (this._skipRender > 1) {\n this.renderNextFrame();\n }\n this._skipRender = 0;\n } else {\n this._skipRender = 1;\n }\n };\n\n getTimeline() {\n return this.timeline;\n }\n\n get3dOptions(options: IOption3D) {\n const {\n center = { x: this.width / 2, y: this.height / 2, z: 0, dx: 0, dy: 0, dz: 0 },\n light = {},\n alpha = 0,\n beta = 0,\n camera,\n fieldRatio = 1,\n fieldDepth\n } = options;\n\n return {\n ...options,\n center,\n light,\n alpha,\n beta,\n camera,\n fieldRatio,\n fieldDepth\n };\n }\n\n set3dOptions(options: IOption3D) {\n this.option3d = options;\n const options3d = this.get3dOptions(options);\n const { light, center, camera, alpha, beta, fieldRatio, fieldDepth } = options3d;\n const { dir = [1, 1, -1], color = 'white', ambient } = light;\n\n const centerX = (center.x ?? this.width / 2) + (center.dx ?? 0);\n const centerY = (center.y ?? this.height / 2) + (center.dy ?? 0);\n const centerZ = (center.z ?? 0) + (center.dz ?? 0);\n const centerVec3: vec3 = [centerX, centerY, centerZ];\n const z = 1;\n let cameraX = 0;\n let cameraY = 0;\n let cameraZ = 0;\n if (!camera) {\n cameraX = Math.sin(alpha) + centerX;\n cameraY = Math.sin(beta) + centerY;\n cameraZ = Math.cos(alpha) * Math.cos(beta) * z;\n }\n\n const DirectionalLight = Factory.getPlugin('DirectionalLight');\n\n if (DirectionalLight) {\n this.light = new DirectionalLight(dir, color, ambient);\n }\n const cameraParams = {\n left: 0,\n right: this.width,\n top: 0,\n bottom: this.height,\n fieldRatio: fieldRatio,\n fieldDepth,\n viewParams: {\n pos: [cameraX, cameraY, cameraZ] as vec3,\n center: centerVec3,\n up: [0, 1, 0] as vec3\n }\n };\n if (this.camera) {\n this.camera.params = cameraParams;\n } else {\n const OrthoCamera = Factory.getPlugin('OrthoCamera');\n if (OrthoCamera) {\n this.camera = new OrthoCamera(cameraParams);\n }\n }\n\n if (options.enableView3dTransform) {\n this.enableView3dTransform();\n }\n }\n\n protected beforeRender = (stage: IStage) => {\n this._beforeRenderList.forEach(cb => cb(stage));\n };\n protected afterClearScreen = (drawParams: any) => {\n this._afterClearScreen && this._afterClearScreen(drawParams);\n };\n protected afterClearRect = (drawParams: any) => {\n this._afterClearRect && this._afterClearRect(drawParams);\n };\n\n protected afterRender = (stage: IStage) => {\n this.renderCount++;\n this._afterRenderList.forEach(cb => cb(stage));\n this._afterNextRenderCbs && this._afterNextRenderCbs.forEach(cb => cb(stage));\n this._afterNextRenderCbs = null;\n this.tickedBeforeRender = false;\n };\n\n protected afterTickCb = () => {\n this.tickedBeforeRender = true;\n // 性能模式不用立刻渲染\n this.state !== 'rendering' && this.renderNextFrame();\n };\n\n setBeforeRender(cb: (stage: IStage) => void) {\n this._beforeRenderList.push(cb);\n }\n\n removeBeforeRender(cb: (stage: IStage) => void) {\n this._beforeRenderList = this._beforeRenderList.filter(c => c !== cb);\n }\n\n setAfterRender(cb: (stage: IStage) => void) {\n this._afterRenderList.push(cb);\n }\n\n removeAfterRender(cb: (stage: IStage) => void) {\n this._afterRenderList = this._afterRenderList.filter(c => c !== cb);\n }\n\n afterNextRender(cb: (stage: IStage) => void) {\n if (!this._afterNextRenderCbs) {\n this._afterNextRenderCbs = [];\n }\n this._afterNextRenderCbs.push(cb);\n }\n\n enableView3dTransform() {\n if (this.view3dTranform) {\n return;\n }\n this.view3dTranform = true;\n const ViewTransform3dPlugin = Factory.getPlugin('ViewTransform3dPlugin');\n\n if (ViewTransform3dPlugin) {\n this.pluginService.register(new ViewTransform3dPlugin());\n }\n }\n\n disableView3dTranform() {\n if (!this.view3dTranform) {\n return;\n }\n this.view3dTranform = false;\n this.pluginService.findPluginsByName('ViewTransform3dPlugin').forEach(plugin => {\n this.pluginService.unRegister(plugin);\n });\n }\n\n enableAutoRender() {\n if (this.autoRender) {\n return;\n }\n this.autoRender = true;\n this.pluginService.register(new AutoRenderPlugin());\n }\n disableAutoRender() {\n if (!this.autoRender) {\n return;\n }\n this.autoRender = false;\n this.pluginService.findPluginsByName('AutoRenderPlugin').forEach(plugin => {\n this.pluginService.unRegister(plugin);\n });\n }\n enableAutoRefresh() {\n if (this.autoRefresh) {\n return;\n }\n this.autoRefresh = true;\n this.pluginService.register(new AutoRefreshPlugin());\n }\n disableAutoRefresh() {\n if (!this.autoRefresh) {\n return;\n }\n this.autoRefresh = false;\n this.pluginService.findPluginsByName('AutoRefreshPlugin').forEach(plugin => {\n this.pluginService.unRegister(plugin);\n });\n }\n enableIncrementalAutoRender() {\n if (this.increaseAutoRender) {\n return;\n }\n this.increaseAutoRender = true;\n this.pluginService.register(new IncrementalAutoRenderPlugin());\n }\n disableIncrementalAutoRender() {\n if (!this.increaseAutoRender) {\n return;\n }\n this.increaseAutoRender = false;\n this.pluginService.findPluginsByName('IncrementalAutoRenderPlugin').forEach(plugin => {\n this.pluginService.unRegister(plugin);\n });\n }\n enableDirtyBounds() {\n if (this.dirtyBounds) {\n return;\n }\n this.dirtyBounds = new Bounds();\n let plugin = this.pluginService.findPluginsByName('DirtyBoundsPlugin')[0];\n if (!plugin) {\n plugin = new DirtyBoundsPlugin();\n this.pluginService.register(plugin);\n } else {\n plugin.activate(this.pluginService);\n }\n }\n disableDirtyBounds() {\n if (!this.dirtyBounds) {\n return;\n }\n this.dirtyBounds = null;\n this.pluginService.findPluginsByName('DirtyBoundsPlugin').forEach(plugin => {\n this.pluginService.unRegister(plugin);\n });\n }\n enableLayout() {\n if (this._enableLayout) {\n return;\n }\n this._enableLayout = true;\n\n const FlexLayoutPlugin = Factory.getPlugin('FlexLayoutPlugin');\n\n if (FlexLayoutPlugin) {\n this.pluginService.register(new FlexLayoutPlugin());\n }\n }\n disableLayout() {\n if (!this._enableLayout) {\n return;\n }\n this._enableLayout = false;\n this.pluginService.findPluginsByName('FlexLayoutPlugin').forEach(plugin => {\n this.pluginService.unRegister(plugin);\n });\n }\n enableHtmlAttribute(container?: any) {\n if (this.htmlAttribute) {\n return;\n }\n const HtmlAttributePlugin = Factory.getPlugin('HtmlAttributePlugin');\n\n if (HtmlAttributePlugin) {\n this.htmlAttribute = container;\n this.pluginService.register(new HtmlAttributePlugin());\n }\n }\n disableHtmlAttribute() {\n if (!this.htmlAttribute) {\n return;\n }\n this.htmlAttribute = false;\n this.pluginService.findPluginsByName('HtmlAttributePlugin').forEach(plugin => {\n this.pluginService.unRegister(plugin);\n });\n }\n enableReactAttribute(container?: any) {\n if (this.reactAttribute) {\n return;\n }\n const ReactAttributePlugin = Factory.getPlugin('ReactAttributePlugin');\n\n if (ReactAttributePlugin) {\n this.reactAttribute = container;\n this.pluginService.register(new ReactAttributePlugin());\n }\n }\n disableReactAttribute() {\n if (!this.reactAttribute) {\n return;\n }\n this.reactAttribute = false;\n this.pluginService.findPluginsByName('ReactAttributePlugin').forEach(plugin => {\n this.pluginService.unRegister(plugin);\n });\n }\n\n getPluginsByName(name: string): IPlugin[] {\n return this.pluginService.findPluginsByName(name);\n }\n\n // /**\n // * stage的appendChild,add\n // * @param node\n // * @returns\n // */\n // appendChild<T extends Node>(node: T): T | null {\n // const layer = this.at(0);\n // if (!layer) {\n // return null;\n // }\n // return layer.appendChild<T>(node);\n // }\n\n protected tryUpdateAABBBounds(): IAABBBounds {\n const viewBox = this.window.getViewBox();\n this._AABBBounds.setValue(viewBox.x1, viewBox.y1, viewBox.x2, viewBox.y2);\n return this._AABBBounds;\n }\n\n combineLayer(ILayer1: ILayer, ILayer2: ILayer): ILayer {\n throw new Error('暂不支持');\n }\n // 如果传入CanvasId,如果存在相同Id,说明这两个图层使用相同的Canvas绘制\n // 但需要注意的是依然是两个图层(用于解决Table嵌入ChartSpace不影响Table的绘制)\n createLayer(canvasId?: string, layerMode?: LayerMode): ILayer {\n if (this.releaseStatus === 'released') {\n return;\n }\n // 创建一个默认layer图层\n const layer = this.layerService.createLayer(this, {\n main: false,\n layerMode,\n canvasId\n });\n this.appendChild(layer);\n return layer;\n // const layer = new Layer(this, this.global, this.window, {\n // main: false,\n // canvasId\n // });\n // this.appendChild(layer);\n // return layer;\n }\n sortLayer(cb: (ILayer1: ILayer, layer2: ILayer) => number): void {\n const children = this.children;\n children.sort(cb);\n this.removeAllChild();\n children.forEach(c => {\n this.appendChild(c);\n });\n }\n removeLayer(ILayerId: number): ILayer | false {\n return this.removeChild(this.findChildByUid(ILayerId) as IGraphic) as ILayer;\n }\n tryInitInteractiveLayer() {\n if (this.releaseStatus === 'released') {\n return;\n }\n // TODO:顺序可能会存在问题\n // 支持交互层,且没有创建过,那就创建\n if (this.supportInteractiveLayer && !this.interactiveLayer) {\n this.interactiveLayer = this.createLayer();\n this.interactiveLayer.name = '_builtin_interactive';\n this.interactiveLayer.attribute.pickable = false;\n this.nextFrameRenderLayerSet.add(this.interactiveLayer as any); // to be fixed\n }\n // this.interactiveLayer.afterDraw(l => {\n // l.removeAllChild();\n // });\n }\n\n clearViewBox(color?: string) {\n this.window.clearViewBox(color);\n }\n\n render(layers?: ILayer[], params?: Partial<IDrawContext>): void {\n if (this.releaseStatus === 'released') {\n return;\n }\n this.startAnimate();\n const state = this.state;\n this.state = 'rendering';\n this.layerService.prepareStageLayer(this);\n if (!this._skipRender) {\n this.lastRenderparams = params;\n this.hooks.beforeRender.call(this);\n if (!this._skipRender) {\n this.renderLayerList(this.children as ILayer[]);\n this.combineLayersToWindow();\n this.nextFrameRenderLayerSet.clear();\n }\n this.hooks.afterRender.call(this);\n }\n this.state = state;\n this._skipRender && this._skipRender++;\n }\n\n protected combineLayersToWindow() {\n // TODO 后续支持通用的渲染模型\n if (this.global.env === 'harmony') {\n const ctx = this.window.getContext().nativeContext;\n this.forEachChildren<ILayer>((layer, i) => {\n if (i > 0) {\n const image = layer\n .getNativeHandler()\n .getContext()\n .canvas.nativeCanvas.nativeCanvas._c.transferToImageBitmap();\n ctx.transferFromImageBitmap(image);\n }\n });\n }\n return;\n // this.forEach<ILayer>((layer, i) => {\n // layer.combineTo(this.window, {\n // clear: i === 0,\n // x: this.x,\n // y: this.y,\n // width: this.viewWidth,\n // height: this.viewHeight,\n // renderService: this.renderService,\n // background: layer === this.defaultLayer ? this.background : undefined,\n // updateBounds: !!this.dirtyBounds\n // });\n // });\n }\n\n renderNextFrame(layers?: ILayer[], force?: boolean): void {\n // render状态中调用的不会触发nextFrame,避免loop\n // if (this.state === 'rendering' && !force) {\n // console.log('abc');\n // return;\n // }\n // 性能优化,避免重复add\n if (this.nextFrameRenderLayerSet.size !== this.childrenCount) {\n (layers || this).forEach<ILayer>((layer: any) => {\n this.nextFrameRenderLayerSet.add(layer);\n });\n }\n if (!this.willNextFrameRender) {\n this.willNextFrameRender = true;\n this.global.getSpecifiedRequestAnimationFrame(this.rafId)(() => {\n this._doRenderInThisFrame(), (this.willNextFrameRender = false);\n });\n }\n }\n\n _doRenderInThisFrame() {\n if (this.releaseStatus === 'released') {\n return;\n }\n this.startAnimate();\n const state = this.state;\n this.state = 'rendering';\n this.layerService.prepareStageLayer(this);\n if (this.nextFrameRenderLayerSet.size && !this._skipRender) {\n this.hooks.beforeRender.call(this);\n if (!this._skipRender) {\n this.renderLayerList(Array.from(this.nextFrameRenderLayerSet.values()), this.lastRenderparams || {});\n this.combineLayersToWindow();\n this.nextFrameRenderLayerSet.clear();\n }\n this.hooks.afterRender.call(this);\n }\n this.state = state;\n this._skipRender && this._skipRender++;\n }\n\n protected renderLayerList(layerList: ILayer[], params?: Partial<IDrawContext>) {\n const list: ILayer[] = [];\n // 只需要render main layer即可\n for (let i = 0; i < layerList.length; i++) {\n let l = layerList[i];\n if (l.layerMode === 'virtual') {\n l = l.getNativeHandler().mainHandler.layer;\n }\n if (!list.includes(l)) {\n list.push(l);\n }\n }\n list.forEach(layer => {\n // 记录当前的stamp,避免重复绘制layer(如果存在virtual layer)\n if (layer.renderCount > this.renderCount) {\n return;\n }\n layer.renderCount = this.renderCount + 1;\n\n if (layer === this.interactiveLayer) {\n // 交互层由于其特殊性,不使用dirtyBounds\n this.dirtyBounds && this.dirtyBounds.clear();\n }\n layer.render(\n {\n renderService: this.renderService,\n background: layer === this.defaultLayer ? this.background : undefined,\n updateBounds: !!(this.dirtyBounds && !this.dirtyBounds.empty()),\n viewBox: this.window.getViewBox(),\n transMatrix: this.window.getViewBoxTransform()\n },\n { renderStyle: this.renderStyle, ...params }\n );\n });\n\n // 添加交互层渲染\n if (this.interactiveLayer && !layerList.includes(this.interactiveLayer)) {\n // 交互层由于其特殊性,不使用dirtyBounds\n this.dirtyBounds && this.dirtyBounds.clear();\n this.interactiveLayer.render(\n {\n renderService: this.renderService,\n updateBounds: !!(this.dirtyBounds && !this.dirtyBounds.empty()),\n viewBox: this.window.getViewBox(),\n transMatrix: this.window.getViewBoxTransform()\n },\n { renderStyle: this.renderStyle, ...params }\n );\n }\n }\n\n resizeWindow(w: number, h: number, rerender: boolean = true) {\n this.window.resize(w, h);\n rerender && this.render();\n }\n\n /**\n * 语法糖,如果viewBox和window宽高一样的话,那么会同时缩放window和viewBox\n * @param w\n * @param h\n * @param rerender\n */\n resize(w: number, h: number, rerender: boolean = true): void {\n if (this.releaseStatus === 'released') {\n return;\n }\n // 如果不是子图的stage,那么认为用户也想要resize view\n if (!this.window.hasSubView()) {\n this.viewBox.setValue(this.viewBox.x1, this.viewBox.y1, this.viewBox.x1 + w, this.viewBox.y1 + h);\n }\n this.window.resize(w, h);\n this.forEachChildren<ILayer>(c => {\n c.resize(w, h);\n });\n // 设置camera\n // this.camera && (this.camera.params = { ...this.camera.params, right: this.width, bottom: this.height });\n this.camera && this.option3d && this.set3dOptions(this.option3d);\n rerender && this.render();\n }\n resizeView(w: number, h: number, rerender: boolean = true) {\n if (this.releaseStatus === 'released') {\n return;\n }\n this.viewBox.setValue(this.viewBox.x1, this.viewBox.y1, this.viewBox.x1 + w, this.viewBox.y1 + h);\n this.forEachChildren<ILayer>(c => {\n c.resizeView(w, h);\n });\n // 设置camera\n this.camera && (this.camera.params = { ...this.camera.params, right: this.width, bottom: this.height });\n rerender && this.render();\n }\n setViewBox(viewBox: IBoundsLike, rerender: boolean): void;\n setViewBox(x: number, y: number, w: number, h: number, rerender: boolean): void;\n setViewBox(x: number | IBoundsLike, y: number | boolean, w?: number, h?: number, rerender?: boolean): void {\n let isRerender: boolean = true;\n\n if (typeof x === 'object') {\n this.viewBox.setValue(x.x1, x.y1, x.x2, x.y2);\n if (y === false) {\n isRerender = false;\n }\n } else {\n this.viewBox.setValue(x, y as number, x + w, (y as number) + h);\n\n if (rerender === false) {\n isRerender = false;\n }\n }\n\n this.forEachChildren<ILayer>(c => {\n c.resizeView(this.viewBox.width(), this.viewBox.height());\n });\n isRerender && this.render();\n }\n setDpr(dpr: number, rerender: boolean = true): void {\n // this.window.setDpr(dpr);\n this.forEachChildren<ILayer>(c => {\n c.setDpr(dpr);\n });\n\n rerender && this.render();\n }\n setOrigin(x: number, y: number): void {\n throw new Error('暂不支持');\n }\n export(type: IExportType): HTMLCanvasElement | ImageData {\n throw new Error('暂不支持');\n }\n pick(x: number, y: number): PickResult | false {\n if (this.releaseStatus === 'released') {\n return;\n }\n // 暂时不提供layer的pick\n const result = this.getPickerService().pick(this.children as unknown as IGraphic[], new Point(x, y), {\n bounds: this.AABBBounds\n });\n if (result?.graphic || result?.group) {\n return result;\n }\n return false;\n }\n\n setToFrame(t: number): void {\n throw new Error('暂不支持');\n }\n\n release() {\n super.release();\n\n this.hooks.beforeRender.unTap('constructor', this.beforeRender);\n this.hooks.afterRender.unTap('constructor', this.afterRender);\n\n this.eventSystem && this.eventSystem.release();\n this.layerService.releaseStage(this);\n this.pluginService.release();\n this.forEach(layer => {\n layer.release();\n });\n // 额外删除掉interactiveLayer的节点\n if (this.interactiveLayer) {\n this.interactiveLayer.forEachChildren((item: IGraphic) => {\n item.setStage && item.setStage(null, null);\n this.interactiveLayer.removeChild(item);\n });\n this.interactiveLayer.release();\n }\n this.window.release();\n this._ticker?.remTimeline(this?.timeline);\n this._ticker?.removeListener('tick', this.afterTickCb);\n this.renderService.renderTreeRoots = [];\n }\n\n setStage(stage?: IStage) {\n return;\n // this.stage = this;\n // this.forEachChildren(item => {\n // (item as Layer).setStage(this);\n // });\n }\n\n /**\n * 添加dirty区域,会修改参数b\n * @param b\n * @param matrix\n */\n dirty(b: IBounds, matrix?: IMatrix) {\n if (this.releaseStatus === 'released') {\n return;\n }\n if (matrix) {\n b.transformWithMatrix(matrix);\n }\n if (this.dirtyBounds.empty()) {\n this.dirtyBounds.setValue(b.x1, b.y1, b.x2, b.y2);\n }\n this.dirtyBounds.union(b);\n }\n\n getLayer(name: string): undefined | ILayer {\n const layer = this.children.filter(layer => layer.name === name);\n return layer[0] as ILayer;\n }\n\n renderTo(window: IWindow) {\n if (this.releaseStatus === 'released') {\n return;\n }\n this.forEachChildren<ILayer>((layer, i) => {\n layer.drawTo(window, {\n // ...params,\n renderService: this.renderService,\n viewBox: window.getViewBox(),\n transMatrix: window.getViewBoxTransform(),\n background: layer === this.defaultLayer ? this.background : undefined,\n clear: i === 0, // 第一个layer需要clear\n updateBounds: !!(this.dirtyBounds && !this.dirtyBounds.empty())\n });\n });\n }\n\n /**\n * 渲染到新的window上去\n * @param fullImage 是否是全量的image,因为可能之前的window有一部分场景树超过window的帧缓冲了\n * @returns\n */\n renderToNewWindow(fullImage: boolean = true, viewBox?: IAABBBounds): IWindow {\n if (this.releaseStatus === 'released') {\n return;\n }\n const window = container.get<IWindow>(VWindow);\n const x1 = viewBox ? -viewBox.x1 : 0;\n const y1 = viewBox ? -viewBox.y1 : 0;\n const x2 = viewBox ? viewBox.x2 : this.viewWidth;\n const y2 = viewBox ? viewBox.y2 : this.viewHeight;\n const width = viewBox ? viewBox.width() : this.viewWidth;\n const height = viewBox ? viewBox.height() : this.viewHeight;\n if (fullImage) {\n window.create({\n viewBox: { x1, y1, x2, y2 },\n width,\n height,\n dpr: this.window.dpr,\n canvasControled: true,\n offscreen: true,\n title: ''\n });\n } else {\n window.create({\n viewBox: { x1, y1, x2, y2 },\n width,\n height,\n dpr: this.window.dpr,\n canvasControled: true,\n offscreen: true,\n title: ''\n });\n }\n\n this.renderTo(window);\n return window;\n }\n\n toCanvas(fullImage: boolean = true, viewBox?: IAABBBounds): HTMLCanvasElement | null {\n if (this.releaseStatus === 'released') {\n return;\n }\n const window = this.renderToNewWindow(fullImage, viewBox);\n const c = window.getNativeHandler();\n if (c.nativeCanvas) {\n return c.nativeCanvas;\n }\n return null;\n }\n\n setCursor(mode?: string): void {\n this._cursor = mode;\n this.eventSystem.setCursor(mode, 'ignore');\n }\n\n getCursor() {\n return this._cursor;\n }\n\n eventPointTransform(e: PointerEvent | WheelEvent | TouchEvent): { x: number; y: number } {\n const point = this.global.mapToCanvasPoint(e, this.window);\n\n return this.stage.window.pointTransform(point.x, point.y);\n }\n\n pauseTriggerEvent() {\n this._eventSystem && this._eventSystem.pauseTriggerEvent();\n }\n resumeTriggerEvent() {\n this._eventSystem && this._eventSystem.resumeTriggerEvent();\n }\n\n getPickerService() {\n if (!this.pickerService) {\n this.pickerService = container.get<IPickerService>(PickerService);\n }\n return this.pickerService;\n }\n\n reInit() {\n this.renderService.reInit();\n this.pickerService.reInit();\n }\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/core/stage.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AA6B3D,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAEnC,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,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IAAI,CAAC,MAAM,CAAC,CAAC;QAE3D,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;IAC5D,CAAC;IAED,iBAAiB;QACf,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY,CAAC,iBAAiB,EAAE,CAAC;IAC7D,CAAC;IACD,kBAAkB;QAChB,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY,CAAC,kBAAkB,EAAE,CAAC;IAC9D,CAAC;IAED,gBAAgB;QACd,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE;YACvB,IAAI,CAAC,aAAa,GAAG,SAAS,CAAC,GAAG,CAAiB,aAAa,CAAC,CAAC;SACnE;QACD,OAAO,IAAI,CAAC,aAAa,CAAC;IAC5B,CAAC;IAED,MAAM;QACJ,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC;QAC5B,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC;IAC9B,CAAC;CACF","file":"stage.js","sourcesContent":["import type { IAABBBounds, IBounds, IBoundsLike, IMatrix } from '@visactor/vutils';\nimport { Bounds, Point, isString } from '@visactor/vutils';\nimport type {\n IGraphic,\n IExportType,\n IStage,\n IStageParams,\n ILayer,\n IColor,\n IGlobal,\n IOption3D,\n ICamera,\n vec3,\n IDirectionLight,\n ITicker,\n IRenderService,\n IPickerService,\n IPluginService,\n ISyncHook,\n IDrawContext,\n IWindow,\n ILayerService,\n ITimeline,\n IOptimizeType,\n LayerMode,\n PickResult,\n IPlugin,\n IGraphicService,\n IRenderServiceDrawParams\n} from '../interface';\nimport { VWindow } from './window';\nimport type { Layer } from './layer';\nimport { EventSystem } from '../event';\nimport { container } from '../container';\nimport { RenderService } from '../render/constants';\nimport { Group } from '../graphic/group';\nimport { Theme } from '../graphic/theme';\nimport { PickerService } from '../picker/constants';\nimport { PluginService } from '../plugins/constants';\nimport { AutoRenderPlugin } from '../plugins/builtin-plugin/auto-render-plugin';\nimport { AutoRefreshPlugin } from '../plugins/builtin-plugin/auto-refresh-plugin';\nimport { IncrementalAutoRenderPlugin } from '../plugins/builtin-plugin/incremental-auto-render-plugin';\nimport { DirtyBoundsPlugin } from '../plugins/builtin-plugin/dirty-bounds-plugin';\nimport { SyncHook } from '../tapable';\nimport { LayerService } from './constants';\nimport { application } from '../application';\nimport { isBrowserEnv } from '../env-check';\nimport { Factory } from '../factory';\nimport { Graphic, GraphicService } from '../graphic';\n\nconst DefaultConfig = {\n WIDTH: 500,\n HEIGHT: 500,\n X: 0,\n Y: 0,\n BACKGROUND: 'white'\n};\n\ntype IStageState = 'rendering' | 'normal';\n\n/**\n * Stage是一个舞台或一个视口,并不直接对应一个或多个Canvas,逻辑上和Canvas无关\n *\n * 1. Stage对应一个Canvas的整体,Stage的宽高即为Canvas的宽高\n * 2. Stage小于Canvas,Stage作为Canvas某个区域的视口,只管理这个区域\n * 3. 多图层时Stage的多个图层对应多个Canvas\n *\n * 原生环境下Stage可以拥有一个Window或者使用Window的一块区域\n *\n * 【注】如果希望获取完整的Canvas或窗口或者调整窗口信息,请使用Window模块\n */\nexport class Stage extends Group implements IStage {\n declare parent: IStage | null;\n\n declare state: IStageState;\n\n private _background: string | IColor;\n protected nextFrameRenderLayerSet: Set<Layer>;\n protected willNextFrameRender: boolean;\n protected _cursor: string;\n renderCount: number;\n dirtyBounds: IBounds | null;\n option3d?: IOption3D;\n declare light?: IDirectionLight;\n declare camera?: ICamera;\n declare renderStyle?: string;\n\n declare hooks: {\n beforeRender: ISyncHook<[IStage]>;\n afterRender: ISyncHook<[IStage]>;\n afterClearScreen: ISyncHook<[IRenderServiceDrawParams]>;\n afterClearRect: ISyncHook<[IRenderServiceDrawParams]>;\n };\n\n set viewBox(b: IBoundsLike) {\n this.window.setViewBox(b);\n }\n get viewBox(): IAABBBounds {\n return this.window.getViewBox();\n }\n\n /**\n * @deprecated 不建议使用\n */\n get x(): number {\n return this.window.getViewBox().x1;\n }\n /**\n * @deprecated 不建议使用\n */\n set x(x: number) {\n const b = this.window.getViewBox();\n b.translate(x - b.x1, 0);\n this.window.setViewBox(b);\n }\n /**\n * @deprecated 不建议使用\n */\n get y(): number {\n return this.window.getViewBox().y1;\n }\n /**\n * @deprecated 不建议使用\n */\n set y(y: number) {\n const b = this.window.getViewBox();\n b.translate(0, y - b.y1);\n this.window.setViewBox(b);\n }\n get width(): number {\n return this.window.width;\n }\n set width(w: number) {\n this.resize(w, this.height);\n }\n get viewWidth(): number {\n return this.window.getViewBox().width();\n }\n set viewWidth(w: number) {\n this.resizeView(w, this.viewHeight);\n }\n get viewHeight(): number {\n return this.window.getViewBox().height();\n }\n set viewHeight(h: number) {\n this.resizeView(this.viewWidth, h);\n }\n get height(): number {\n return this.window.height;\n }\n set height(h: number) {\n this.resize(this.width, h);\n }\n get dpr(): number {\n return this.window.dpr;\n }\n set dpr(r: number) {\n this.setDpr(r);\n }\n get background(): string | IColor {\n return this._background ?? DefaultConfig.BACKGROUND;\n }\n set background(b: string | IColor) {\n this._background = b;\n }\n get defaultLayer(): ILayer {\n return this.at(0) as unknown as ILayer;\n }\n\n protected _ticker: ITicker;\n\n autoRender: boolean;\n autoRefresh: boolean;\n _enableLayout: boolean;\n htmlAttribute: boolean | string | any;\n reactAttribute: boolean | string | any;\n increaseAutoRender: boolean;\n view3dTranform: boolean;\n readonly window: IWindow;\n private readonly global: IGlobal;\n readonly renderService: IRenderService;\n protected pickerService?: IPickerService;\n readonly pluginService: IPluginService;\n readonly layerService: ILayerService;\n readonly graphicService: IGraphicService;\n private _eventSystem?: EventSystem;\n private get eventSystem(): EventSystem {\n return this._eventSystem;\n }\n\n protected _beforeRenderList: Array<(stage: IStage) => void>;\n protected _afterRenderList: Array<(stage: IStage) => void>;\n protected _afterClearScreen?: (drawParams: any) => void;\n protected _afterClearRect?: (drawParams: any) => void;\n // 0: 正常渲染, > 0: 跳过隐藏canvas的渲染, < 0: 禁止渲染\n protected _skipRender?: number;\n protected _afterNextRenderCbs?: ((stage: IStage) => void)[];\n protected lastRenderparams?: Partial<IDrawContext>;\n\n protected interactiveLayer?: ILayer;\n protected supportInteractiveLayer: boolean;\n protected timeline: ITimeline;\n\n declare params: Partial<IStageParams>;\n\n // 是否在render之前执行了tick,如果没有执行,尝试执行tick用来应用动画属性,避免动画过程中随意赋值然后又调用同步render导致属性的突变\n // 第一次render不需要强行走动画\n protected tickedBeforeRender: boolean = true;\n\n // 随机分配一个rafId\n readonly rafId: number;\n\n get ticker() {\n return this._ticker;\n }\n\n set ticker(ticker: ITicker) {\n ticker.bindStage(this);\n if (this._ticker) {\n this._ticker.removeListener('tick', this.afterTickCb);\n }\n ticker.addTimeline(this.timeline);\n this._ticker = ticker;\n this._ticker.on('tick', this.afterTickCb);\n }\n\n /**\n * 所有属性都具有默认值。\n * Canvas为字符串或者Canvas元素,那么默认图层就会绑定到这个Canvas上\n * 如果不传入Canvas,那么会新建一个Canvas,用户可以通过Window模块管理这个Canvas\n * 1. 如果没有传入宽高,那么默认为canvas宽高,如果传入了宽高则stage使用传入宽高作为视口宽高\n * @param params\n */\n constructor(params: Partial<IStageParams> = {}) {\n super({});\n this.params = params;\n this.theme = new Theme();\n this.hooks = {\n beforeRender: new SyncHook(['stage']),\n afterRender: new SyncHook(['stage']),\n afterClearScreen: new SyncHook(['stage']),\n afterClearRect: new SyncHook(['stage'])\n };\n this.global = application.global;\n if (!this.global.env && isBrowserEnv()) {\n // 如果是浏览器环境,默认设置env\n this.global.setEnv('browser');\n }\n this.window = container.get<IWindow>(VWindow);\n this.renderService = container.get<IRenderService>(RenderService);\n this.pluginService = container.get<IPluginService>(PluginService);\n this.layerService = container.get<ILayerService>(LayerService);\n this.graphicService = container.get<IGraphicService>(GraphicService);\n this.pluginService.active(this, params);\n this._beforeRenderList = [];\n this._afterRenderList = [];\n\n this.window.create({\n width: params.width,\n height: params.height,\n viewBox: params.viewBox,\n container: params.container,\n dpr: params.dpr || this.global.devicePixelRatio,\n canvasControled: params.canvasControled !== false,\n title: params.title || '',\n canvas: params.canvas\n });\n\n this.state = 'normal';\n this.renderCount = 0;\n this.tryInitEventSystem();\n // // 没有传入xy就默认为0\n // this._x = params.x ?? DefaultConfig.X;\n // this._y = params.y ?? DefaultConfig.Y;\n // // 没有传入view的宽高则默认为window的宽高\n // this._viewWidth = params.viewWidth ?? this.window.width;\n // this._viewHeight = params.viewHeight ?? this.window.height;\n // this._AABBBounds.set(this._x, this._y, this._viewWidth + this._x, this._viewHeight + this._y);\n // 背景色默认为纯白色\n this._background = params.background ?? DefaultConfig.BACKGROUND;\n\n // 创建一个默认layer图层\n // this.appendChild(new Layer(this, this.global, this.window, { main: true }));\n this.appendChild(this.layerService.createLayer(this, { main: true }));\n\n this.nextFrameRenderLayerSet = new Set();\n this.willNextFrameRender = false;\n this.stage = this;\n this.renderStyle = params.renderStyle;\n\n // this.autoRender = params.autoRender;\n if (params.autoRender) {\n this.enableAutoRender();\n }\n if (params.autoRefresh) {\n this.enableAutoRefresh();\n }\n // 默认不开启dirtyBounds\n if (params.disableDirtyBounds === false) {\n this.enableDirtyBounds();\n }\n\n if (params.enableHtmlAttribute) {\n this.enableHtmlAttribute(params.enableHtmlAttribute);\n }\n if (params.ReactDOM) {\n this.enableReactAttribute(params.ReactDOM);\n }\n\n params.enableLayout && this.enableLayout();\n this.hooks.beforeRender.tap('constructor', this.beforeRender);\n this.hooks.afterRender.tap('constructor', this.afterRender);\n if (params.beforeRender) {\n this._beforeRenderList.push(params.beforeRender);\n }\n if (params.afterRender) {\n this._afterRenderList.push(params.afterRender);\n }\n this.hooks.afterClearScreen.tap('constructor', this.afterClearScreen);\n this.hooks.afterClearRect.tap('constructor', this.afterClearRect);\n this._afterClearScreen = params.afterClearScreen;\n this._afterClearRect = params.afterClearRect;\n this.supportInteractiveLayer = params.interactiveLayer !== false;\n if (!params.optimize) {\n params.optimize = {\n tickRenderMode: 'effect'\n };\n }\n this.optmize(params.optimize);\n // 如果背景是图片,触发加载图片操作\n if (params.background && isString(this._background) && this._background.includes('/')) {\n this.setAttributes({ background: this._background });\n }\n\n this.initAnimate(params);\n this.rafId = params.rafId ?? Math.floor(Math.random() * 6);\n }\n\n initAnimate(params: Partial<IStageParams>) {\n if ((this as any).createTicker && (this as any).createTimeline) {\n this._ticker = params.ticker || (this as any).createTicker(this);\n this._ticker.bindStage(this);\n if (this.params.optimize?.tickRenderMode === 'performance') {\n this._ticker.setFPS(30);\n }\n this.timeline = (this as any).createTimeline();\n this._ticker.addTimeline(this.timeline);\n this._ticker.on('tick', this.afterTickCb);\n }\n }\n\n startAnimate() {\n if (this._ticker && this.timeline) {\n this._ticker.start();\n this.timeline.resume();\n }\n }\n\n pauseRender(sr: number = -1) {\n this._skipRender = sr;\n }\n\n resumeRender() {\n this._skipRender = 0;\n }\n\n protected tryInitEventSystem() {\n if (this.global.supportEvent && !this._eventSystem) {\n this._eventSystem = new EventSystem({\n targetElement: this.window,\n resolution: this.window.dpr || this.global.devicePixelRatio,\n rootNode: this as any,\n global: this.global,\n supportsPointerEvents: this.params.supportsPointerEvents,\n supportsTouchEvents: this.params.supportsTouchEvents,\n ...this.params.event\n });\n }\n }\n\n preventRender(prevent: boolean) {\n if (prevent) {\n this._skipRender = -Infinity;\n } else {\n // 判断是否需要outRange优化\n if (this.params.optimize.skipRenderWithOutRange !== false) {\n this._skipRender = this.window.isVisible() ? 0 : 1;\n } else {\n this._skipRender = 0;\n }\n }\n }\n\n // 优化策略\n optmize(params: IOptimizeType) {\n this.optmizeRender(params.skipRenderWithOutRange);\n this.params.optimize = params;\n }\n\n // 优化渲染\n protected optmizeRender(skipRenderWithOutRange: boolean = false) {\n if (!skipRenderWithOutRange) {\n return;\n }\n // 不在视口内的时候,跳过渲染\n this._skipRender = this._skipRender < 0 ? this._skipRender : this.window.isVisible() ? 0 : 1;\n this.window.onVisibleChange(this._onVisibleChange);\n }\n\n protected _onVisibleChange = (visible: boolean) => {\n if (this._skipRender < 0) {\n return;\n }\n if (visible) {\n if (this.dirtyBounds) {\n const b = this.window.getViewBox();\n this.dirtyBounds.setValue(b.x1, b.y1, b.width(), b.height());\n }\n if (this._skipRender > 1) {\n this.renderNextFrame();\n }\n this._skipRender = 0;\n } else {\n this._skipRender = 1;\n }\n };\n\n getTimeline() {\n return this.timeline;\n }\n\n get3dOptions(options: IOption3D) {\n const {\n center = { x: this.width / 2, y: this.height / 2, z: 0, dx: 0, dy: 0, dz: 0 },\n light = {},\n alpha = 0,\n beta = 0,\n camera,\n fieldRatio = 1,\n fieldDepth\n } = options;\n\n return {\n ...options,\n center,\n light,\n alpha,\n beta,\n camera,\n fieldRatio,\n fieldDepth\n };\n }\n\n set3dOptions(options: IOption3D) {\n this.option3d = options;\n const options3d = this.get3dOptions(options);\n const { light, center, camera, alpha, beta, fieldRatio, fieldDepth } = options3d;\n const { dir = [1, 1, -1], color = 'white', ambient } = light;\n\n const centerX = (center.x ?? this.width / 2) + (center.dx ?? 0);\n const centerY = (center.y ?? this.height / 2) + (center.dy ?? 0);\n const centerZ = (center.z ?? 0) + (center.dz ?? 0);\n const centerVec3: vec3 = [centerX, centerY, centerZ];\n const z = 1;\n let cameraX = 0;\n let cameraY = 0;\n let cameraZ = 0;\n if (!camera) {\n cameraX = Math.sin(alpha) + centerX;\n cameraY = Math.sin(beta) + centerY;\n cameraZ = Math.cos(alpha) * Math.cos(beta) * z;\n }\n\n const DirectionalLight = Factory.getPlugin('DirectionalLight');\n\n if (DirectionalLight) {\n this.light = new DirectionalLight(dir, color, ambient);\n }\n const cameraParams = {\n left: 0,\n right: this.width,\n top: 0,\n bottom: this.height,\n fieldRatio: fieldRatio,\n fieldDepth,\n viewParams: {\n pos: [cameraX, cameraY, cameraZ] as vec3,\n center: centerVec3,\n up: [0, 1, 0] as vec3\n }\n };\n if (this.camera) {\n this.camera.params = cameraParams;\n } else {\n const OrthoCamera = Factory.getPlugin('OrthoCamera');\n if (OrthoCamera) {\n this.camera = new OrthoCamera(cameraParams);\n }\n }\n\n if (options.enableView3dTransform) {\n this.enableView3dTransform();\n }\n }\n\n protected beforeRender = (stage: IStage) => {\n this._beforeRenderList.forEach(cb => cb(stage));\n };\n protected afterClearScreen = (drawParams: any) => {\n this._afterClearScreen && this._afterClearScreen(drawParams);\n };\n protected afterClearRect = (drawParams: any) => {\n this._afterClearRect && this._afterClearRect(drawParams);\n };\n\n protected afterRender = (stage: IStage) => {\n this.renderCount++;\n this._afterRenderList.forEach(cb => cb(stage));\n this._afterNextRenderCbs && this._afterNextRenderCbs.forEach(cb => cb(stage));\n this._afterNextRenderCbs = null;\n this.tickedBeforeRender = false;\n };\n\n protected afterTickCb = () => {\n this.tickedBeforeRender = true;\n // 性能模式不用立刻渲染\n this.state !== 'rendering' && this.renderNextFrame();\n };\n\n setBeforeRender(cb: (stage: IStage) => void) {\n this._beforeRenderList.push(cb);\n }\n\n removeBeforeRender(cb: (stage: IStage) => void) {\n this._beforeRenderList = this._beforeRenderList.filter(c => c !== cb);\n }\n\n setAfterRender(cb: (stage: IStage) => void) {\n this._afterRenderList.push(cb);\n }\n\n removeAfterRender(cb: (stage: IStage) => void) {\n this._afterRenderList = this._afterRenderList.filter(c => c !== cb);\n }\n\n afterNextRender(cb: (stage: IStage) => void) {\n if (!this._afterNextRenderCbs) {\n this._afterNextRenderCbs = [];\n }\n this._afterNextRenderCbs.push(cb);\n }\n\n enableView3dTransform() {\n if (this.view3dTranform) {\n return;\n }\n this.view3dTranform = true;\n const ViewTransform3dPlugin = Factory.getPlugin('ViewTransform3dPlugin');\n\n if (ViewTransform3dPlugin) {\n this.pluginService.register(new ViewTransform3dPlugin());\n }\n }\n\n disableView3dTranform() {\n if (!this.view3dTranform) {\n return;\n }\n this.view3dTranform = false;\n this.pluginService.findPluginsByName('ViewTransform3dPlugin').forEach(plugin => {\n this.pluginService.unRegister(plugin);\n });\n }\n\n enableAutoRender() {\n if (this.autoRender) {\n return;\n }\n this.autoRender = true;\n this.pluginService.register(new AutoRenderPlugin());\n }\n disableAutoRender() {\n if (!this.autoRender) {\n return;\n }\n this.autoRender = false;\n this.pluginService.findPluginsByName('AutoRenderPlugin').forEach(plugin => {\n this.pluginService.unRegister(plugin);\n });\n }\n enableAutoRefresh() {\n if (this.autoRefresh || this.global.env === 'node') {\n return;\n }\n this.autoRefresh = true;\n this.pluginService.register(new AutoRefreshPlugin());\n }\n disableAutoRefresh() {\n if (!this.autoRefresh) {\n return;\n }\n this.autoRefresh = false;\n this.pluginService.findPluginsByName('AutoRefreshPlugin').forEach(plugin => {\n this.pluginService.unRegister(plugin);\n });\n }\n enableIncrementalAutoRender() {\n if (this.increaseAutoRender) {\n return;\n }\n this.increaseAutoRender = true;\n this.pluginService.register(new IncrementalAutoRenderPlugin());\n }\n disableIncrementalAutoRender() {\n if (!this.increaseAutoRender) {\n return;\n }\n this.increaseAutoRender = false;\n this.pluginService.findPluginsByName('IncrementalAutoRenderPlugin').forEach(plugin => {\n this.pluginService.unRegister(plugin);\n });\n }\n enableDirtyBounds() {\n if (this.dirtyBounds) {\n return;\n }\n this.dirtyBounds = new Bounds();\n let plugin = this.pluginService.findPluginsByName('DirtyBoundsPlugin')[0];\n if (!plugin) {\n plugin = new DirtyBoundsPlugin();\n this.pluginService.register(plugin);\n } else {\n plugin.activate(this.pluginService);\n }\n }\n disableDirtyBounds() {\n if (!this.dirtyBounds) {\n return;\n }\n this.dirtyBounds = null;\n this.pluginService.findPluginsByName('DirtyBoundsPlugin').forEach(plugin => {\n this.pluginService.unRegister(plugin);\n });\n }\n enableLayout() {\n if (this._enableLayout) {\n return;\n }\n this._enableLayout = true;\n\n const FlexLayoutPlugin = Factory.getPlugin('FlexLayoutPlugin');\n\n if (FlexLayoutPlugin) {\n this.pluginService.register(new FlexLayoutPlugin());\n }\n }\n disableLayout() {\n if (!this._enableLayout) {\n return;\n }\n this._enableLayout = false;\n this.pluginService.findPluginsByName('FlexLayoutPlugin').forEach(plugin => {\n this.pluginService.unRegister(plugin);\n });\n }\n enableHtmlAttribute(container?: any) {\n if (this.htmlAttribute) {\n return;\n }\n const HtmlAttributePlugin = Factory.getPlugin('HtmlAttributePlugin');\n\n if (HtmlAttributePlugin) {\n this.htmlAttribute = container;\n this.pluginService.register(new HtmlAttributePlugin());\n }\n }\n disableHtmlAttribute() {\n if (!this.htmlAttribute) {\n return;\n }\n this.htmlAttribute = false;\n this.pluginService.findPluginsByName('HtmlAttributePlugin').forEach(plugin => {\n this.pluginService.unRegister(plugin);\n });\n }\n enableReactAttribute(container?: any) {\n if (this.reactAttribute) {\n return;\n }\n const ReactAttributePlugin = Factory.getPlugin('ReactAttributePlugin');\n\n if (ReactAttributePlugin) {\n this.reactAttribute = container;\n this.pluginService.register(new ReactAttributePlugin());\n }\n }\n disableReactAttribute() {\n if (!this.reactAttribute) {\n return;\n }\n this.reactAttribute = false;\n this.pluginService.findPluginsByName('ReactAttributePlugin').forEach(plugin => {\n this.pluginService.unRegister(plugin);\n });\n }\n\n getPluginsByName(name: string): IPlugin[] {\n return this.pluginService.findPluginsByName(name);\n }\n\n // /**\n // * stage的appendChild,add\n // * @param node\n // * @returns\n // */\n // appendChild<T extends Node>(node: T): T | null {\n // const layer = this.at(0);\n // if (!layer) {\n // return null;\n // }\n // return layer.appendChild<T>(node);\n // }\n\n protected tryUpdateAABBBounds(): IAABBBounds {\n const viewBox = this.window.getViewBox();\n this._AABBBounds.setValue(viewBox.x1, viewBox.y1, viewBox.x2, viewBox.y2);\n return this._AABBBounds;\n }\n\n combineLayer(ILayer1: ILayer, ILayer2: ILayer): ILayer {\n throw new Error('暂不支持');\n }\n // 如果传入CanvasId,如果存在相同Id,说明这两个图层使用相同的Canvas绘制\n // 但需要注意的是依然是两个图层(用于解决Table嵌入ChartSpace不影响Table的绘制)\n createLayer(canvasId?: string, layerMode?: LayerMode): ILayer {\n if (this.releaseStatus === 'released') {\n return;\n }\n // 创建一个默认layer图层\n const layer = this.layerService.createLayer(this, {\n main: false,\n layerMode,\n canvasId\n });\n this.appendChild(layer);\n return layer;\n // const layer = new Layer(this, this.global, this.window, {\n // main: false,\n // canvasId\n // });\n // this.appendChild(layer);\n // return layer;\n }\n sortLayer(cb: (ILayer1: ILayer, layer2: ILayer) => number): void {\n const children = this.children;\n children.sort(cb);\n this.removeAllChild();\n children.forEach(c => {\n this.appendChild(c);\n });\n }\n removeLayer(ILayerId: number): ILayer | false {\n return this.removeChild(this.findChildByUid(ILayerId) as IGraphic) as ILayer;\n }\n tryInitInteractiveLayer() {\n if (this.releaseStatus === 'released') {\n return;\n }\n // TODO:顺序可能会存在问题\n // 支持交互层,且没有创建过,那就创建\n if (this.supportInteractiveLayer && !this.interactiveLayer) {\n this.interactiveLayer = this.createLayer();\n this.interactiveLayer.name = '_builtin_interactive';\n this.interactiveLayer.attribute.pickable = false;\n this.nextFrameRenderLayerSet.add(this.interactiveLayer as any); // to be fixed\n }\n // this.interactiveLayer.afterDraw(l => {\n // l.removeAllChild();\n // });\n }\n\n clearViewBox(color?: string) {\n this.window.clearViewBox(color);\n }\n\n render(layers?: ILayer[], params?: Partial<IDrawContext>): void {\n if (this.releaseStatus === 'released') {\n return;\n }\n this.startAnimate();\n const state = this.state;\n this.state = 'rendering';\n this.layerService.prepareStageLayer(this);\n if (!this._skipRender) {\n this.lastRenderparams = params;\n this.hooks.beforeRender.call(this);\n if (!this._skipRender) {\n this.renderLayerList(this.children as ILayer[]);\n this.combineLayersToWindow();\n this.nextFrameRenderLayerSet.clear();\n }\n this.hooks.afterRender.call(this);\n }\n this.state = state;\n this._skipRender && this._skipRender++;\n }\n\n protected combineLayersToWindow() {\n // TODO 后续支持通用的渲染模型\n if (this.global.env === 'harmony') {\n const ctx = this.window.getContext().nativeContext;\n this.forEachChildren<ILayer>((layer, i) => {\n if (i > 0) {\n const image = layer\n .getNativeHandler()\n .getContext()\n .canvas.nativeCanvas.nativeCanvas._c.transferToImageBitmap();\n ctx.transferFromImageBitmap(image);\n }\n });\n }\n return;\n // this.forEach<ILayer>((layer, i) => {\n // layer.combineTo(this.window, {\n // clear: i === 0,\n // x: this.x,\n // y: this.y,\n // width: this.viewWidth,\n // height: this.viewHeight,\n // renderService: this.renderService,\n // background: layer === this.defaultLayer ? this.background : undefined,\n // updateBounds: !!this.dirtyBounds\n // });\n // });\n }\n\n renderNextFrame(layers?: ILayer[], force?: boolean): void {\n // render状态中调用的不会触发nextFrame,避免loop\n // if (this.state === 'rendering' && !force) {\n // console.log('abc');\n // return;\n // }\n // 性能优化,避免重复add\n if (this.nextFrameRenderLayerSet.size !== this.childrenCount) {\n (layers || this).forEach<ILayer>((layer: any) => {\n this.nextFrameRenderLayerSet.add(layer);\n });\n }\n if (!this.willNextFrameRender) {\n this.willNextFrameRender = true;\n this.global.getSpecifiedRequestAnimationFrame(this.rafId)(() => {\n this._doRenderInThisFrame(), (this.willNextFrameRender = false);\n });\n }\n }\n\n _doRenderInThisFrame() {\n if (this.releaseStatus === 'released') {\n return;\n }\n this.startAnimate();\n const state = this.state;\n this.state = 'rendering';\n this.layerService.prepareStageLayer(this);\n if (this.nextFrameRenderLayerSet.size && !this._skipRender) {\n this.hooks.beforeRender.call(this);\n if (!this._skipRender) {\n this.renderLayerList(Array.from(this.nextFrameRenderLayerSet.values()), this.lastRenderparams || {});\n this.combineLayersToWindow();\n this.nextFrameRenderLayerSet.clear();\n }\n this.hooks.afterRender.call(this);\n }\n this.state = state;\n this._skipRender && this._skipRender++;\n }\n\n protected renderLayerList(layerList: ILayer[], params?: Partial<IDrawContext>) {\n const list: ILayer[] = [];\n // 只需要render main layer即可\n for (let i = 0; i < layerList.length; i++) {\n let l = layerList[i];\n if (l.layerMode === 'virtual') {\n l = l.getNativeHandler().mainHandler.layer;\n }\n if (!list.includes(l)) {\n list.push(l);\n }\n }\n list.forEach(layer => {\n // 记录当前的stamp,避免重复绘制layer(如果存在virtual layer)\n if (layer.renderCount > this.renderCount) {\n return;\n }\n layer.renderCount = this.renderCount + 1;\n\n if (layer === this.interactiveLayer) {\n // 交互层由于其特殊性,不使用dirtyBounds\n this.dirtyBounds && this.dirtyBounds.clear();\n }\n layer.render(\n {\n renderService: this.renderService,\n background: layer === this.defaultLayer ? this.background : undefined,\n updateBounds: !!(this.dirtyBounds && !this.dirtyBounds.empty()),\n viewBox: this.window.getViewBox(),\n transMatrix: this.window.getViewBoxTransform()\n },\n { renderStyle: this.renderStyle, ...params }\n );\n });\n\n // 添加交互层渲染\n if (this.interactiveLayer && !layerList.includes(this.interactiveLayer)) {\n // 交互层由于其特殊性,不使用dirtyBounds\n this.dirtyBounds && this.dirtyBounds.clear();\n this.interactiveLayer.render(\n {\n renderService: this.renderService,\n updateBounds: !!(this.dirtyBounds && !this.dirtyBounds.empty()),\n viewBox: this.window.getViewBox(),\n transMatrix: this.window.getViewBoxTransform()\n },\n { renderStyle: this.renderStyle, ...params }\n );\n }\n }\n\n resizeWindow(w: number, h: number, rerender: boolean = true) {\n this.window.resize(w, h);\n rerender && this.render();\n }\n\n /**\n * 语法糖,如果viewBox和window宽高一样的话,那么会同时缩放window和viewBox\n * @param w\n * @param h\n * @param rerender\n */\n resize(w: number, h: number, rerender: boolean = true): void {\n if (this.releaseStatus === 'released') {\n return;\n }\n // 如果不是子图的stage,那么认为用户也想要resize view\n if (!this.window.hasSubView()) {\n this.viewBox.setValue(this.viewBox.x1, this.viewBox.y1, this.viewBox.x1 + w, this.viewBox.y1 + h);\n }\n this.window.resize(w, h);\n this.forEachChildren<ILayer>(c => {\n c.resize(w, h);\n });\n // 设置camera\n // this.camera && (this.camera.params = { ...this.camera.params, right: this.width, bottom: this.height });\n this.camera && this.option3d && this.set3dOptions(this.option3d);\n rerender && this.render();\n }\n resizeView(w: number, h: number, rerender: boolean = true) {\n if (this.releaseStatus === 'released') {\n return;\n }\n this.viewBox.setValue(this.viewBox.x1, this.viewBox.y1, this.viewBox.x1 + w, this.viewBox.y1 + h);\n this.forEachChildren<ILayer>(c => {\n c.resizeView(w, h);\n });\n // 设置camera\n this.camera && (this.camera.params = { ...this.camera.params, right: this.width, bottom: this.height });\n rerender && this.render();\n }\n setViewBox(viewBox: IBoundsLike, rerender: boolean): void;\n setViewBox(x: number, y: number, w: number, h: number, rerender: boolean): void;\n setViewBox(x: number | IBoundsLike, y: number | boolean, w?: number, h?: number, rerender?: boolean): void {\n let isRerender: boolean = true;\n\n if (typeof x === 'object') {\n this.viewBox.setValue(x.x1, x.y1, x.x2, x.y2);\n if (y === false) {\n isRerender = false;\n }\n } else {\n this.viewBox.setValue(x, y as number, x + w, (y as number) + h);\n\n if (rerender === false) {\n isRerender = false;\n }\n }\n\n this.forEachChildren<ILayer>(c => {\n c.resizeView(this.viewBox.width(), this.viewBox.height());\n });\n isRerender && this.render();\n }\n setDpr(dpr: number, rerender: boolean = true): void {\n // this.window.setDpr(dpr);\n this.forEachChildren<ILayer>(c => {\n c.setDpr(dpr);\n });\n\n rerender && this.render();\n }\n setOrigin(x: number, y: number): void {\n throw new Error('暂不支持');\n }\n export(type: IExportType): HTMLCanvasElement | ImageData {\n throw new Error('暂不支持');\n }\n pick(x: number, y: number): PickResult | false {\n if (this.releaseStatus === 'released') {\n return;\n }\n // 暂时不提供layer的pick\n const result = this.getPickerService().pick(this.children as unknown as IGraphic[], new Point(x, y), {\n bounds: this.AABBBounds\n });\n if (result?.graphic || result?.group) {\n return result;\n }\n return false;\n }\n\n setToFrame(t: number): void {\n throw new Error('暂不支持');\n }\n\n release() {\n super.release();\n\n this.hooks.beforeRender.unTap('constructor', this.beforeRender);\n this.hooks.afterRender.unTap('constructor', this.afterRender);\n\n this.eventSystem && this.eventSystem.release();\n this.layerService.releaseStage(this);\n this.pluginService.release();\n this.forEach(layer => {\n layer.release();\n });\n // 额外删除掉interactiveLayer的节点\n if (this.interactiveLayer) {\n this.interactiveLayer.forEachChildren((item: IGraphic) => {\n item.setStage && item.setStage(null, null);\n this.interactiveLayer.removeChild(item);\n });\n this.interactiveLayer.release();\n }\n this.window.release();\n this._ticker?.remTimeline(this?.timeline);\n this._ticker?.removeListener('tick', this.afterTickCb);\n this.renderService.renderTreeRoots = [];\n }\n\n setStage(stage?: IStage) {\n return;\n // this.stage = this;\n // this.forEachChildren(item => {\n // (item as Layer).setStage(this);\n // });\n }\n\n /**\n * 添加dirty区域,会修改参数b\n * @param b\n * @param matrix\n */\n dirty(b: IBounds, matrix?: IMatrix) {\n if (this.releaseStatus === 'released') {\n return;\n }\n if (matrix) {\n b.transformWithMatrix(matrix);\n }\n if (this.dirtyBounds.empty()) {\n this.dirtyBounds.setValue(b.x1, b.y1, b.x2, b.y2);\n }\n this.dirtyBounds.union(b);\n }\n\n getLayer(name: string): undefined | ILayer {\n const layer = this.children.filter(layer => layer.name === name);\n return layer[0] as ILayer;\n }\n\n renderTo(window: IWindow) {\n if (this.releaseStatus === 'released') {\n return;\n }\n this.forEachChildren<ILayer>((layer, i) => {\n layer.drawTo(window, {\n // ...params,\n renderService: this.renderService,\n viewBox: window.getViewBox(),\n transMatrix: window.getViewBoxTransform(),\n background: layer === this.defaultLayer ? this.background : undefined,\n clear: i === 0, // 第一个layer需要clear\n updateBounds: !!(this.dirtyBounds && !this.dirtyBounds.empty())\n });\n });\n }\n\n /**\n * 渲染到新的window上去\n * @param fullImage 是否是全量的image,因为可能之前的window有一部分场景树超过window的帧缓冲了\n * @returns\n */\n renderToNewWindow(fullImage: boolean = true, viewBox?: IAABBBounds): IWindow {\n if (this.releaseStatus === 'released') {\n return;\n }\n const window = container.get<IWindow>(VWindow);\n const x1 = viewBox ? -viewBox.x1 : 0;\n const y1 = viewBox ? -viewBox.y1 : 0;\n const x2 = viewBox ? viewBox.x2 : this.viewWidth;\n const y2 = viewBox ? viewBox.y2 : this.viewHeight;\n const width = viewBox ? viewBox.width() : this.viewWidth;\n const height = viewBox ? viewBox.height() : this.viewHeight;\n if (fullImage) {\n window.create({\n viewBox: { x1, y1, x2, y2 },\n width,\n height,\n dpr: this.window.dpr,\n canvasControled: true,\n offscreen: true,\n title: ''\n });\n } else {\n window.create({\n viewBox: { x1, y1, x2, y2 },\n width,\n height,\n dpr: this.window.dpr,\n canvasControled: true,\n offscreen: true,\n title: ''\n });\n }\n\n this.renderTo(window);\n return window;\n }\n\n toCanvas(fullImage: boolean = true, viewBox?: IAABBBounds): HTMLCanvasElement | null {\n if (this.releaseStatus === 'released') {\n return;\n }\n const window = this.renderToNewWindow(fullImage, viewBox);\n const c = window.getNativeHandler();\n if (c.nativeCanvas) {\n return c.nativeCanvas;\n }\n return null;\n }\n\n setCursor(mode?: string): void {\n this._cursor = mode;\n this.eventSystem.setCursor(mode, 'ignore');\n }\n\n getCursor() {\n return this._cursor;\n }\n\n eventPointTransform(e: PointerEvent | WheelEvent | TouchEvent): { x: number; y: number } {\n const point = this.global.mapToCanvasPoint(e, this.window);\n\n return this.stage.window.pointTransform(point.x, point.y);\n }\n\n pauseTriggerEvent() {\n this._eventSystem && this._eventSystem.pauseTriggerEvent();\n }\n resumeTriggerEvent() {\n this._eventSystem && this._eventSystem.resumeTriggerEvent();\n }\n\n getPickerService() {\n if (!this.pickerService) {\n this.pickerService = container.get<IPickerService>(PickerService);\n }\n return this.pickerService;\n }\n\n reInit() {\n this.renderService.reInit();\n this.pickerService.reInit();\n }\n}\n"]}
|
package/es/graphic/config.js
CHANGED
|
@@ -66,7 +66,7 @@ export const DefaultTextStyle = {
|
|
|
66
66
|
textAlign: "left",
|
|
67
67
|
textBaseline: "alphabetic",
|
|
68
68
|
fontSize: 16,
|
|
69
|
-
fontFamily: "PingFang SC,Microsoft Yahei,system-ui
|
|
69
|
+
fontFamily: "PingFang SC,Microsoft Yahei,system-ui,'-apple-system',segoe ui,\n Roboto,Helvetica,Arial,sans-serif, apple color emoji,segoe ui emoji,segoe ui symbol",
|
|
70
70
|
fontWeight: "",
|
|
71
71
|
ellipsis: "…",
|
|
72
72
|
fontVariant: "",
|
package/es/graphic/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/graphic/config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,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Y,EAC7B,UAAU,EAAE,EAAE,EACd,mBAAmB,EAAE,KAAK,EAC1B,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,SAAS,EACnB,UAAU,EAAE,KAAK,GAClB,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,iCAChC,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,WAAW,EACpB,KAAK,EAAE,EAAE,EACT,KAAK,EAAE,CAAC,EACR,MAAM,EAAE,CAAC,EACT,QAAQ,EAAE,GAAG,EACb,SAAS,EAAE,GAAG,IACX,gBAAgB,KACnB,IAAI,EAAE,IAAI,EACV,YAAY,EAAE,CAAC,EACf,UAAU,EAAE,OAAO,GACpB,CAAC;AAEF,MAAM,CAAC,MAAM,4BAA4B,mCACpC,qBAAqB,KACxB,kBAAkB,EAAE,OAAO,EAC3B,eAAe,EAAE,CAAC,EAClB,gBAAgB,EAAE,CAAC,EACnB,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,QAAQ,EACtB,SAAS,EAAE,YAAY,EACvB,MAAM,EAAE,CAAC,EACT,EAAE,EAAE,EAAE,EAEN,KAAK,EAAE,EAAE,EACT,MAAM,EAAE,EAAE,EACV,cAAc,EAAE,0BAA0B,EAC1C,qBAAqB,EAAE,CAAC,EACxB,gBAAgB,EAAE,KAAK,EACvB,uBAAuB,EAAE,CAAC,EAC1B,gBAAgB,EAAE,CAAC,EACnB,OAAO,EAAE,CAAC,GACX,CAAC","file":"config.js","sourcesContent":["// 存放公共属性\nimport { Logger, Matrix, pi2 } from '@visactor/vutils';\nimport { CustomPath2D } from '../common/custom-path2d';\nimport {\n type IArcGraphicAttribute,\n type IAreaGraphicAttribute,\n type IGraphicAttribute,\n type ICircleGraphicAttribute,\n type IFillStyle,\n type IGlyphGraphicAttribute,\n type IGroupGraphicAttribute,\n type IImageGraphicAttribute,\n type ILineGraphicAttribute,\n type IPathGraphicAttribute,\n type IPolygonGraphicAttribute,\n type IRect3dGraphicAttribute,\n type IRectGraphicAttribute,\n type IStrokeStyle,\n type IGraphicStyle,\n type ISymbolGraphicAttribute,\n type ITextAttribute,\n type ITextGraphicAttribute,\n type IRichTextGraphicAttribute,\n type ITransform,\n type RichTextWordBreak,\n type RichTextVerticalDirection,\n type RichTextGlobalAlignType,\n type RichTextGlobalBaselineType,\n type IRichTextIconGraphicAttribute,\n type IStarGraphicAttribute,\n type IConnectedStyle,\n type ILayout,\n type IDebugType,\n type IPickStyle,\n MeasureModeEnum\n} from '../interface';\n\nexport const DefaultLayout: ILayout = {\n alignSelf: 'auto'\n};\n\nexport const DefaultTransform: ITransform = {\n x: 0,\n y: 0,\n z: 0,\n dx: 0,\n dy: 0,\n dz: 0,\n scrollX: 0,\n scrollY: 0,\n scaleX: 1,\n scaleY: 1,\n scaleZ: 1,\n angle: 0,\n alpha: 0,\n beta: 0,\n scaleCenter: [0, 0],\n anchor: [0, 0],\n anchor3d: [0, 0],\n postMatrix: new Matrix()\n};\n\nexport const DefaultFillStyle: IFillStyle = {\n fillOpacity: 1,\n fill: false,\n shadowBlur: 0,\n shadowColor: 'black',\n shadowOffsetX: 0,\n shadowOffsetY: 0\n};\n\nconst commonStroke: Omit<IStrokeStyle, 'outerBorder' | 'innerBorder'> = {\n strokeOpacity: 1,\n lineDash: [],\n lineDashOffset: 0,\n lineWidth: 1,\n lineCap: 'butt',\n lineJoin: 'miter',\n miterLimit: 10,\n strokeBoundsBuffer: 2,\n stroke: false\n};\n\nexport const DefaultStrokeStyle: IStrokeStyle = {\n outerBorder: { ...commonStroke, distance: 0 },\n innerBorder: { ...commonStroke, distance: 0 },\n ...commonStroke\n};\n\nexport const DefaultTextStyle: Required<ITextAttribute> = {\n text: '',\n maxLineWidth: Infinity,\n maxWidth: Infinity,\n textAlign: 'left',\n textBaseline: 'alphabetic',\n fontSize: 16,\n // @ts-ignore\n fontFamily: `PingFang SC,Microsoft Yahei,system-ui,-apple-system,segoe ui,\n Roboto,Helvetica,Arial,sans-serif, apple color emoji,segoe ui emoji,segoe ui symbol`,\n fontWeight: '',\n ellipsis: '…',\n fontVariant: '',\n fontStyle: '',\n lineHeight: undefined,\n underline: 0,\n lineThrough: 0,\n scaleIn3d: false,\n direction: 'horizontal',\n wordBreak: 'break-all',\n ignoreBuf: false,\n verticalMode: 0,\n wrap: false,\n whiteSpace: 'no-wrap',\n heightLimit: Infinity,\n lineClamp: Infinity,\n suffixPosition: 'end',\n underlineDash: [],\n underlineOffset: 0,\n disableAutoClipedPoptip: undefined,\n measureMode: MeasureModeEnum.fontBounding,\n keepCenterInLine: false\n};\n\nexport const DefaultPickStyle: IPickStyle = {\n pickStrokeBuffer: 0\n};\n\nexport const DefaultStyle: IGraphicStyle = {\n forceBoundsWidth: undefined,\n forceBoundsHeight: undefined,\n opacity: 1,\n background: null,\n autoAnimateTexture: false,\n textureRatio: 1,\n textureOptions: null,\n backgroundOpacity: 1,\n backgroundCornerRadius: 0,\n texture: null,\n textureColor: 'black',\n textureSize: 10,\n texturePadding: 2,\n backgroundMode: 'no-repeat',\n backgroundFit: true,\n backgroundKeepAspectRatio: false,\n backgroundClip: true,\n backgroundScale: 1,\n backgroundOffsetX: 0,\n backgroundOffsetY: 0,\n blur: 0,\n filter: '',\n cursor: null,\n html: null,\n react: null,\n vue: null,\n ...DefaultFillStyle,\n ...DefaultStrokeStyle,\n ...DefaultLayout,\n ...DefaultPickStyle\n};\n\nexport const DefaultConnectAttribute: Required<IConnectedStyle> = {\n connectedType: 'none',\n // connectedStyle: {\n // stroke: DefaultStrokeStyle.stroke,\n // strokeOpacity: DefaultStrokeStyle.strokeOpacity,\n // lineDash: DefaultStrokeStyle.lineDash,\n // lineDashOffset: DefaultStrokeStyle.lineDashOffset,\n // lineCap: DefaultStrokeStyle.lineCap,\n // lineJoin: DefaultStrokeStyle.lineJoin,\n // lineWidth: DefaultStrokeStyle.lineWidth,\n // fill: DefaultFillStyle.fill,\n // fillOpacity: DefaultFillStyle.fillOpacity\n // },\n connectedStyle: {}, // 默认全都继承父属性\n connectedX: NaN,\n connectedY: NaN\n} as IConnectedStyle;\n\nexport const DefaultDebugAttribute: Required<IDebugType> = {\n _debug_bounds: false\n};\n\nexport const DefaultAttribute: Required<IGraphicAttribute> = {\n strokeSeg: null,\n renderable: true,\n pickable: true,\n shadowGraphic: undefined,\n childrenPickable: true,\n fillPickable: true,\n strokePickable: true,\n visible: true,\n zIndex: 0,\n layout: null,\n boundsPadding: 0,\n fillStrokeOrder: 0,\n renderStyle: 'default',\n pickMode: 'accurate',\n customPickShape: null,\n boundsMode: 'accurate',\n keepDirIn3d: true,\n shadowRootIdx: 1,\n globalZIndex: 1,\n globalCompositeOperation: '',\n overflow: 'hidden',\n shadowPickMode: 'graphic',\n keepStrokeScale: false,\n clipConfig: null,\n roughStyle: null,\n ...DefaultDebugAttribute,\n ...DefaultStyle,\n ...DefaultTransform\n};\n\nexport function addAttributeToPrototype(obj: Record<string, any>, c: any, keys: string[]) {\n keys.forEach(key => {\n c.prototype[key] = obj[key];\n });\n}\nexport function rewriteProto(obj: Record<string, any>, c: Record<string, any>) {\n Object.setPrototypeOf(obj, c);\n}\n\nexport const DefaultArcAttribute: Required<IArcGraphicAttribute> = {\n ...DefaultAttribute,\n startAngle: 0,\n endAngle: pi2,\n innerRadius: 0,\n outerRadius: 1,\n innerPadding: 0,\n outerPadding: 0,\n cornerRadius: 0,\n padRadius: 0,\n padAngle: 0,\n cap: false,\n forceShowCap: false\n};\n\nexport const DefaultAreaAttribute: Required<IAreaGraphicAttribute> = {\n ...DefaultAttribute,\n ...DefaultConnectAttribute,\n points: [],\n segments: [],\n curveType: 'linear',\n clipRange: 1,\n closePath: false,\n curveTension: 1\n};\n\nexport const DefaultCircleAttribute: Required<ICircleGraphicAttribute> = {\n ...DefaultAttribute,\n radius: 1,\n startAngle: 0,\n endAngle: pi2\n};\n\nexport const DefaultGroupAttribute: Required<IGroupGraphicAttribute> = {\n ...DefaultAttribute,\n width: 0,\n height: 0,\n cornerRadius: 0,\n path: [],\n clip: false,\n visibleAll: true,\n display: 'relative',\n flexDirection: 'row',\n flexWrap: 'wrap',\n justifyContent: 'flex-start',\n alignItems: 'flex-start',\n alignContent: 'flex-start',\n baseOpacity: 1,\n cornerType: 'round'\n // 默认是0,不需要主题\n // drawMode: 0\n} as any;\n\nexport const DefaultGlyphAttribute: Required<IGlyphGraphicAttribute> = {\n ...DefaultAttribute,\n path: '',\n width: 0,\n height: 0,\n cornerRadius: 0,\n clip: false\n};\n\nexport const DefaultLineAttribute: Required<ILineGraphicAttribute> = {\n ...DefaultAttribute,\n ...DefaultConnectAttribute,\n points: [],\n segments: [],\n curveType: 'linear',\n clipRange: 1,\n clipRangeByDimension: 'default',\n closePath: false,\n curveTension: 1\n};\n\nexport const DefaultPathAttribute: Required<IPathGraphicAttribute> = {\n ...DefaultAttribute,\n path: new CustomPath2D(),\n fillStrokeOrder: 1,\n clipRange: 1,\n customPath: () => {\n Logger.getInstance().warn('空函数');\n }\n};\n\nexport const DefaultPolygonAttribute: Required<IPolygonGraphicAttribute> = {\n ...DefaultAttribute,\n points: [],\n cornerRadius: 0,\n closePath: true\n};\n\nexport const DefaultStarAttribute: Required<IStarGraphicAttribute> = {\n ...DefaultAttribute,\n width: 100,\n height: 100,\n spikes: 5,\n thickness: 0.5\n};\n\nexport const DefaultRectAttribute: Required<IRectGraphicAttribute> = {\n ...DefaultAttribute,\n width: 0,\n height: 0,\n x1: 0,\n y1: 0,\n strokeBoundsBuffer: 0,\n cornerRadius: 0,\n cornerType: 'round',\n drawStrokeWhenZeroWH: false\n};\n\nexport const DefaultRect3dAttribute: Required<IRect3dGraphicAttribute> = {\n ...DefaultAttribute,\n width: 0,\n height: 0,\n x1: 0,\n y1: 0,\n cornerRadius: 0,\n length: 0,\n cornerType: 'round',\n drawStrokeWhenZeroWH: false\n};\n\nexport const DefaultSymbolAttribute: Required<ISymbolGraphicAttribute> = {\n ...DefaultAttribute,\n symbolType: 'circle',\n size: 10, // 外接**正方形**的边长\n keepDirIn3d: true,\n clipRange: 1\n};\n\nexport const DefaultTextAttribute: Required<ITextGraphicAttribute> = {\n ...DefaultAttribute,\n ...DefaultTextStyle,\n strokeBoundsBuffer: 0,\n keepDirIn3d: true\n};\n\nexport const DefaultRichTextAttribute: Required<IRichTextGraphicAttribute> = {\n ...DefaultAttribute,\n ...DefaultTextStyle,\n upgradeAttrs: null,\n editable: false,\n editOptions: null,\n ascentDescentMode: 'actual',\n width: 300,\n height: 300,\n ellipsis: true,\n wordBreak: 'break-word' as RichTextWordBreak,\n verticalDirection: 'top' as RichTextVerticalDirection,\n textAlign: 'left' as RichTextGlobalAlignType,\n textBaseline: 'top' as RichTextGlobalBaselineType,\n layoutDirection: 'horizontal',\n textConfig: [],\n disableAutoWrapLine: false,\n maxHeight: undefined,\n maxWidth: undefined,\n singleLine: false\n};\n\nexport const DefaultImageAttribute: Required<IImageGraphicAttribute> = {\n repeatX: 'no-repeat',\n repeatY: 'no-repeat',\n image: '',\n width: 0,\n height: 0,\n maxWidth: 500,\n maxHeight: 500,\n ...DefaultAttribute,\n fill: true,\n cornerRadius: 0,\n cornerType: 'round'\n};\n\nexport const DefaultRichTextIconAttribute: Required<IRichTextIconGraphicAttribute> = {\n ...DefaultImageAttribute,\n backgroundShowMode: 'never',\n backgroundWidth: 0,\n backgroundHeight: 0,\n textAlign: 'left',\n textBaseline: 'middle',\n direction: 'horizontal',\n margin: 0,\n id: '',\n\n width: 20,\n height: 20,\n backgroundFill: 'rgba(101, 117, 168, 0.1)',\n backgroundFillOpacity: 1,\n backgroundStroke: false,\n backgroundStrokeOpacity: 1,\n backgroundRadius: 4,\n opacity: 1\n};\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/graphic/config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EA+BL,eAAe,EAChB,MAAM,cAAc,CAAC;AAEtB,MAA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C;AAEF,MAAM,CAAC,MAAM,qBAAqB,iCAChC,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,WAAW,EACpB,KAAK,EAAE,EAAE,EACT,KAAK,EAAE,CAAC,EACR,MAAM,EAAE,CAAC,EACT,QAAQ,EAAE,GAAG,EACb,SAAS,EAAE,GAAG,IACX,gBAAgB,KACnB,IAAI,EAAE,IAAI,EACV,YAAY,EAAE,CAAC,EACf,UAAU,EAAE,OAAO,GACpB,CAAC;AAEF,MAAM,CAAC,MAAM,4BAA4B,mCACpC,qBAAqB,KACxB,kBAAkB,EAAE,OAAO,EAC3B,eAAe,EAAE,CAAC,EAClB,gBAAgB,EAAE,CAAC,EACnB,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,QAAQ,EACtB,SAAS,EAAE,YAAY,EACvB,MAAM,EAAE,CAAC,EACT,EAAE,EAAE,EAAE,EAEN,KAAK,EAAE,EAAE,EACT,MAAM,EAAE,EAAE,EACV,cAAc,EAAE,0BAA0B,EAC1C,qBAAqB,EAAE,CAAC,EACxB,gBAAgB,EAAE,KAAK,EACvB,uBAAuB,EAAE,CAAC,EAC1B,gBAAgB,EAAE,CAAC,EACnB,OAAO,EAAE,CAAC,GACX,CAAC","file":"config.js","sourcesContent":["// 存放公共属性\nimport { Logger, Matrix, pi2 } from '@visactor/vutils';\nimport { CustomPath2D } from '../common/custom-path2d';\nimport {\n type IArcGraphicAttribute,\n type IAreaGraphicAttribute,\n type IGraphicAttribute,\n type ICircleGraphicAttribute,\n type IFillStyle,\n type IGlyphGraphicAttribute,\n type IGroupGraphicAttribute,\n type IImageGraphicAttribute,\n type ILineGraphicAttribute,\n type IPathGraphicAttribute,\n type IPolygonGraphicAttribute,\n type IRect3dGraphicAttribute,\n type IRectGraphicAttribute,\n type IStrokeStyle,\n type IGraphicStyle,\n type ISymbolGraphicAttribute,\n type ITextAttribute,\n type ITextGraphicAttribute,\n type IRichTextGraphicAttribute,\n type ITransform,\n type RichTextWordBreak,\n type RichTextVerticalDirection,\n type RichTextGlobalAlignType,\n type RichTextGlobalBaselineType,\n type IRichTextIconGraphicAttribute,\n type IStarGraphicAttribute,\n type IConnectedStyle,\n type ILayout,\n type IDebugType,\n type IPickStyle,\n MeasureModeEnum\n} from '../interface';\n\nexport const DefaultLayout: ILayout = {\n alignSelf: 'auto'\n};\n\nexport const DefaultTransform: ITransform = {\n x: 0,\n y: 0,\n z: 0,\n dx: 0,\n dy: 0,\n dz: 0,\n scrollX: 0,\n scrollY: 0,\n scaleX: 1,\n scaleY: 1,\n scaleZ: 1,\n angle: 0,\n alpha: 0,\n beta: 0,\n scaleCenter: [0, 0],\n anchor: [0, 0],\n anchor3d: [0, 0],\n postMatrix: new Matrix()\n};\n\nexport const DefaultFillStyle: IFillStyle = {\n fillOpacity: 1,\n fill: false,\n shadowBlur: 0,\n shadowColor: 'black',\n shadowOffsetX: 0,\n shadowOffsetY: 0\n};\n\nconst commonStroke: Omit<IStrokeStyle, 'outerBorder' | 'innerBorder'> = {\n strokeOpacity: 1,\n lineDash: [],\n lineDashOffset: 0,\n lineWidth: 1,\n lineCap: 'butt',\n lineJoin: 'miter',\n miterLimit: 10,\n strokeBoundsBuffer: 2,\n stroke: false\n};\n\nexport const DefaultStrokeStyle: IStrokeStyle = {\n outerBorder: { ...commonStroke, distance: 0 },\n innerBorder: { ...commonStroke, distance: 0 },\n ...commonStroke\n};\n\nexport const DefaultTextStyle: Required<ITextAttribute> = {\n text: '',\n maxLineWidth: Infinity,\n maxWidth: Infinity,\n textAlign: 'left',\n textBaseline: 'alphabetic',\n fontSize: 16,\n // @ts-ignore\n fontFamily: `PingFang SC,Microsoft Yahei,system-ui,'-apple-system',segoe ui,\n Roboto,Helvetica,Arial,sans-serif, apple color emoji,segoe ui emoji,segoe ui symbol`,\n fontWeight: '',\n ellipsis: '…',\n fontVariant: '',\n fontStyle: '',\n lineHeight: undefined,\n underline: 0,\n lineThrough: 0,\n scaleIn3d: false,\n direction: 'horizontal',\n wordBreak: 'break-all',\n ignoreBuf: false,\n verticalMode: 0,\n wrap: false,\n whiteSpace: 'no-wrap',\n heightLimit: Infinity,\n lineClamp: Infinity,\n suffixPosition: 'end',\n underlineDash: [],\n underlineOffset: 0,\n disableAutoClipedPoptip: undefined,\n measureMode: MeasureModeEnum.fontBounding,\n keepCenterInLine: false\n};\n\nexport const DefaultPickStyle: IPickStyle = {\n pickStrokeBuffer: 0\n};\n\nexport const DefaultStyle: IGraphicStyle = {\n forceBoundsWidth: undefined,\n forceBoundsHeight: undefined,\n opacity: 1,\n background: null,\n autoAnimateTexture: false,\n textureRatio: 1,\n textureOptions: null,\n backgroundOpacity: 1,\n backgroundCornerRadius: 0,\n texture: null,\n textureColor: 'black',\n textureSize: 10,\n texturePadding: 2,\n backgroundMode: 'no-repeat',\n backgroundFit: true,\n backgroundKeepAspectRatio: false,\n backgroundClip: true,\n backgroundScale: 1,\n backgroundOffsetX: 0,\n backgroundOffsetY: 0,\n blur: 0,\n filter: '',\n cursor: null,\n html: null,\n react: null,\n vue: null,\n ...DefaultFillStyle,\n ...DefaultStrokeStyle,\n ...DefaultLayout,\n ...DefaultPickStyle\n};\n\nexport const DefaultConnectAttribute: Required<IConnectedStyle> = {\n connectedType: 'none',\n // connectedStyle: {\n // stroke: DefaultStrokeStyle.stroke,\n // strokeOpacity: DefaultStrokeStyle.strokeOpacity,\n // lineDash: DefaultStrokeStyle.lineDash,\n // lineDashOffset: DefaultStrokeStyle.lineDashOffset,\n // lineCap: DefaultStrokeStyle.lineCap,\n // lineJoin: DefaultStrokeStyle.lineJoin,\n // lineWidth: DefaultStrokeStyle.lineWidth,\n // fill: DefaultFillStyle.fill,\n // fillOpacity: DefaultFillStyle.fillOpacity\n // },\n connectedStyle: {}, // 默认全都继承父属性\n connectedX: NaN,\n connectedY: NaN\n} as IConnectedStyle;\n\nexport const DefaultDebugAttribute: Required<IDebugType> = {\n _debug_bounds: false\n};\n\nexport const DefaultAttribute: Required<IGraphicAttribute> = {\n strokeSeg: null,\n renderable: true,\n pickable: true,\n shadowGraphic: undefined,\n childrenPickable: true,\n fillPickable: true,\n strokePickable: true,\n visible: true,\n zIndex: 0,\n layout: null,\n boundsPadding: 0,\n fillStrokeOrder: 0,\n renderStyle: 'default',\n pickMode: 'accurate',\n customPickShape: null,\n boundsMode: 'accurate',\n keepDirIn3d: true,\n shadowRootIdx: 1,\n globalZIndex: 1,\n globalCompositeOperation: '',\n overflow: 'hidden',\n shadowPickMode: 'graphic',\n keepStrokeScale: false,\n clipConfig: null,\n roughStyle: null,\n ...DefaultDebugAttribute,\n ...DefaultStyle,\n ...DefaultTransform\n};\n\nexport function addAttributeToPrototype(obj: Record<string, any>, c: any, keys: string[]) {\n keys.forEach(key => {\n c.prototype[key] = obj[key];\n });\n}\nexport function rewriteProto(obj: Record<string, any>, c: Record<string, any>) {\n Object.setPrototypeOf(obj, c);\n}\n\nexport const DefaultArcAttribute: Required<IArcGraphicAttribute> = {\n ...DefaultAttribute,\n startAngle: 0,\n endAngle: pi2,\n innerRadius: 0,\n outerRadius: 1,\n innerPadding: 0,\n outerPadding: 0,\n cornerRadius: 0,\n padRadius: 0,\n padAngle: 0,\n cap: false,\n forceShowCap: false\n};\n\nexport const DefaultAreaAttribute: Required<IAreaGraphicAttribute> = {\n ...DefaultAttribute,\n ...DefaultConnectAttribute,\n points: [],\n segments: [],\n curveType: 'linear',\n clipRange: 1,\n closePath: false,\n curveTension: 1\n};\n\nexport const DefaultCircleAttribute: Required<ICircleGraphicAttribute> = {\n ...DefaultAttribute,\n radius: 1,\n startAngle: 0,\n endAngle: pi2\n};\n\nexport const DefaultGroupAttribute: Required<IGroupGraphicAttribute> = {\n ...DefaultAttribute,\n width: 0,\n height: 0,\n cornerRadius: 0,\n path: [],\n clip: false,\n visibleAll: true,\n display: 'relative',\n flexDirection: 'row',\n flexWrap: 'wrap',\n justifyContent: 'flex-start',\n alignItems: 'flex-start',\n alignContent: 'flex-start',\n baseOpacity: 1,\n cornerType: 'round'\n // 默认是0,不需要主题\n // drawMode: 0\n} as any;\n\nexport const DefaultGlyphAttribute: Required<IGlyphGraphicAttribute> = {\n ...DefaultAttribute,\n path: '',\n width: 0,\n height: 0,\n cornerRadius: 0,\n clip: false\n};\n\nexport const DefaultLineAttribute: Required<ILineGraphicAttribute> = {\n ...DefaultAttribute,\n ...DefaultConnectAttribute,\n points: [],\n segments: [],\n curveType: 'linear',\n clipRange: 1,\n clipRangeByDimension: 'default',\n closePath: false,\n curveTension: 1\n};\n\nexport const DefaultPathAttribute: Required<IPathGraphicAttribute> = {\n ...DefaultAttribute,\n path: new CustomPath2D(),\n fillStrokeOrder: 1,\n clipRange: 1,\n customPath: () => {\n Logger.getInstance().warn('空函数');\n }\n};\n\nexport const DefaultPolygonAttribute: Required<IPolygonGraphicAttribute> = {\n ...DefaultAttribute,\n points: [],\n cornerRadius: 0,\n closePath: true\n};\n\nexport const DefaultStarAttribute: Required<IStarGraphicAttribute> = {\n ...DefaultAttribute,\n width: 100,\n height: 100,\n spikes: 5,\n thickness: 0.5\n};\n\nexport const DefaultRectAttribute: Required<IRectGraphicAttribute> = {\n ...DefaultAttribute,\n width: 0,\n height: 0,\n x1: 0,\n y1: 0,\n strokeBoundsBuffer: 0,\n cornerRadius: 0,\n cornerType: 'round',\n drawStrokeWhenZeroWH: false\n};\n\nexport const DefaultRect3dAttribute: Required<IRect3dGraphicAttribute> = {\n ...DefaultAttribute,\n width: 0,\n height: 0,\n x1: 0,\n y1: 0,\n cornerRadius: 0,\n length: 0,\n cornerType: 'round',\n drawStrokeWhenZeroWH: false\n};\n\nexport const DefaultSymbolAttribute: Required<ISymbolGraphicAttribute> = {\n ...DefaultAttribute,\n symbolType: 'circle',\n size: 10, // 外接**正方形**的边长\n keepDirIn3d: true,\n clipRange: 1\n};\n\nexport const DefaultTextAttribute: Required<ITextGraphicAttribute> = {\n ...DefaultAttribute,\n ...DefaultTextStyle,\n strokeBoundsBuffer: 0,\n keepDirIn3d: true\n};\n\nexport const DefaultRichTextAttribute: Required<IRichTextGraphicAttribute> = {\n ...DefaultAttribute,\n ...DefaultTextStyle,\n upgradeAttrs: null,\n editable: false,\n editOptions: null,\n ascentDescentMode: 'actual',\n width: 300,\n height: 300,\n ellipsis: true,\n wordBreak: 'break-word' as RichTextWordBreak,\n verticalDirection: 'top' as RichTextVerticalDirection,\n textAlign: 'left' as RichTextGlobalAlignType,\n textBaseline: 'top' as RichTextGlobalBaselineType,\n layoutDirection: 'horizontal',\n textConfig: [],\n disableAutoWrapLine: false,\n maxHeight: undefined,\n maxWidth: undefined,\n singleLine: false\n};\n\nexport const DefaultImageAttribute: Required<IImageGraphicAttribute> = {\n repeatX: 'no-repeat',\n repeatY: 'no-repeat',\n image: '',\n width: 0,\n height: 0,\n maxWidth: 500,\n maxHeight: 500,\n ...DefaultAttribute,\n fill: true,\n cornerRadius: 0,\n cornerType: 'round'\n};\n\nexport const DefaultRichTextIconAttribute: Required<IRichTextIconGraphicAttribute> = {\n ...DefaultImageAttribute,\n backgroundShowMode: 'never',\n backgroundWidth: 0,\n backgroundHeight: 0,\n textAlign: 'left',\n textBaseline: 'middle',\n direction: 'horizontal',\n margin: 0,\n id: '',\n\n width: 20,\n height: 20,\n backgroundFill: 'rgba(101, 117, 168, 0.1)',\n backgroundFillOpacity: 1,\n backgroundStroke: false,\n backgroundStrokeOpacity: 1,\n backgroundRadius: 4,\n opacity: 1\n};\n"]}
|
package/es/graphic/symbol.js
CHANGED
|
@@ -69,8 +69,8 @@ export class Symbol extends Graphic {
|
|
|
69
69
|
return aabbBounds;
|
|
70
70
|
}
|
|
71
71
|
updateSymbolAABBBoundsAccurate(attribute, symbolTheme, aabbBounds) {
|
|
72
|
-
const {size: size = symbolTheme.size} = attribute;
|
|
73
|
-
return
|
|
72
|
+
const {size: size = symbolTheme.size} = attribute, symbolClass = this.getParsedPath();
|
|
73
|
+
return symbolClass ? (symbolClass.bounds(size, aabbBounds), aabbBounds) : aabbBounds;
|
|
74
74
|
}
|
|
75
75
|
needUpdateTags(keys) {
|
|
76
76
|
return super.needUpdateTags(keys, SYMBOL_UPDATE_TAG_KEY);
|
|
@@ -79,7 +79,9 @@ export class Symbol extends Graphic {
|
|
|
79
79
|
return super.needUpdateTag(key, SYMBOL_UPDATE_TAG_KEY);
|
|
80
80
|
}
|
|
81
81
|
toCustomPath() {
|
|
82
|
-
const symbolInstance = this.getParsedPath()
|
|
82
|
+
const symbolInstance = this.getParsedPath();
|
|
83
|
+
if (!symbolInstance) return null;
|
|
84
|
+
const size = this.attribute.size, formattedSize = isArray(size) ? size : [ size, size ];
|
|
83
85
|
return symbolInstance.path ? (new CustomPath2D).fromCustomPath2D(symbolInstance.path, 0, 0, formattedSize[0], formattedSize[1]) : (new CustomPath2D).fromString(symbolInstance.pathStr, 0, 0, formattedSize[0], formattedSize[1]);
|
|
84
86
|
}
|
|
85
87
|
clone() {
|
package/es/graphic/symbol.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/graphic/symbol.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,OAAO,EAAE,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AACjF,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,+BAA+B,EAAE,MAAM,8CAA8C,CAAC;AAE/F,MAAM,qBAAqB,GAAG,CAAC,YAAY,EAAE,MAAM,EAAE,GAAG,sBAAsB,CAAC,CAAC;AAKhF,MAAM,OAAO,MAAO,SAAQ,OAAgC;IAQ1D,YAAY,SAAkC,EAAE,UAAU,EAAE,QAAQ,EAAE;QACpE,KAAK,CAAC,MAAM,CAAC,CAAC;QARhB,S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IAABBBounds } from '@visactor/vutils';\nimport { isArray } from '@visactor/vutils';\nimport type { ISymbol, ISymbolClass, ISymbolGraphicAttribute } from '../interface';\nimport { Graphic, GRAPHIC_UPDATE_TAG_KEY, NOWORK_ANIMATE_ATTR } from './graphic';\nimport { getTheme } from './theme';\nimport { application } from '../application';\nimport { CustomPath2D } from '../common/custom-path2d';\nimport { SYMBOL_NUMBER_TYPE } from './constants';\nimport { updateBoundsOfSymbolOuterBorder } from './graphic-service/symbol-outer-border-bounds';\n\nconst SYMBOL_UPDATE_TAG_KEY = ['symbolType', 'size', ...GRAPHIC_UPDATE_TAG_KEY];\n\n/**\n * symbol\n */\nexport class Symbol extends Graphic<ISymbolGraphicAttribute> implements ISymbol {\n type: 'symbol' = 'symbol';\n\n static NOWORK_ANIMATE_ATTR = {\n symbolType: 1,\n ...NOWORK_ANIMATE_ATTR\n };\n\n constructor(params: ISymbolGraphicAttribute = { symbolType: 'circle' }) {\n super(params);\n this.numberType = SYMBOL_NUMBER_TYPE;\n }\n\n protected _parsedPath?: ISymbolClass;\n\n getParsedPath(): ISymbolClass {\n if (this.shouldUpdateShape()) {\n this._parsedPath = this.doUpdateParsedPath();\n this.clearUpdateShapeTag();\n }\n return this._parsedPath as ISymbolClass;\n }\n\n getParsedPath2D(x = 0, y = 0, size = 1): Path2D | null {\n let path: Path2D | null = null;\n try {\n path = new Path2D();\n } catch (err) {\n return null;\n }\n const parsedPath = this.getParsedPath();\n if (!parsedPath) {\n return null;\n }\n parsedPath.draw(path, size, x, y);\n }\n\n isValid(): boolean {\n return super.isValid() && this._isValid();\n }\n private _isValid(): boolean {\n const { size } = this.attribute;\n return isArray(size) ? size.length === 2 && size.every(this._validNumber) : this._validNumber(size);\n }\n\n protected doUpdateParsedPath(): ISymbolClass {\n const { symbolType = 'circle' } = this.attribute;\n return super.parsePath(symbolType);\n }\n\n getGraphicTheme(): Required<ISymbolGraphicAttribute> {\n return getTheme(this).symbol;\n }\n\n protected updateAABBBounds(\n attribute: ISymbolGraphicAttribute,\n symbolTheme: Required<ISymbolGraphicAttribute>,\n aabbBounds: IAABBBounds,\n full?: boolean\n ) {\n if (!this.updatePathProxyAABBBounds(aabbBounds)) {\n full\n ? this.updateSymbolAABBBoundsImprecise(attribute, symbolTheme, aabbBounds)\n : this.updateSymbolAABBBoundsAccurate(attribute, symbolTheme, aabbBounds);\n }\n\n const { tb1, tb2 } = application.graphicService.updateTempAABBBounds(aabbBounds);\n\n updateBoundsOfSymbolOuterBorder(attribute, symbolTheme, tb1);\n aabbBounds.union(tb1);\n tb1.setValue(tb2.x1, tb2.y1, tb2.x2, tb2.y2);\n\n this.widthWithoutTransform = aabbBounds.x2 - aabbBounds.x1;\n this.heightWithoutTransform = aabbBounds.y2 - aabbBounds.y1;\n this.x1WithoutTransform = aabbBounds.x1;\n this.y1WithoutTransform = aabbBounds.y1;\n\n const { lineJoin = symbolTheme.lineJoin } = attribute;\n application.graphicService.transformAABBBounds(attribute, aabbBounds, symbolTheme, lineJoin === 'miter', this);\n return aabbBounds;\n }\n\n protected updateSymbolAABBBoundsImprecise(\n attribute: ISymbolGraphicAttribute,\n symbolTheme: Required<ISymbolGraphicAttribute>,\n aabbBounds: IAABBBounds\n ): IAABBBounds {\n // 当做正方形计算\n const { size = symbolTheme.size } = attribute;\n\n if (isArray(size)) {\n aabbBounds.set(-size[0] / 2, -size[1] / 2, size[0] / 2, size[1] / 2);\n } else {\n const halfWH = size / 2;\n\n aabbBounds.set(-halfWH, -halfWH, halfWH, halfWH);\n }\n\n return aabbBounds;\n }\n\n protected updateSymbolAABBBoundsAccurate(\n attribute: ISymbolGraphicAttribute,\n symbolTheme: Required<ISymbolGraphicAttribute>,\n aabbBounds: IAABBBounds\n ): IAABBBounds {\n const { size = symbolTheme.size } = attribute;\n\n const symbolClass = this.getParsedPath();\n if (!symbolClass) {\n return aabbBounds;\n }\n symbolClass.bounds(size, aabbBounds);\n\n return aabbBounds;\n }\n\n protected needUpdateTags(keys: string[]): boolean {\n return super.needUpdateTags(keys, SYMBOL_UPDATE_TAG_KEY);\n }\n protected needUpdateTag(key: string): boolean {\n return super.needUpdateTag(key, SYMBOL_UPDATE_TAG_KEY);\n }\n\n toCustomPath() {\n const symbolInstance = this.getParsedPath();\n if (!symbolInstance) {\n return null;\n }\n const size = this.attribute.size;\n const x = 0;\n const y = 0;\n const formattedSize = isArray(size) ? size : [size, size];\n\n return symbolInstance.path\n ? new CustomPath2D().fromCustomPath2D(symbolInstance.path, x, y, formattedSize[0], formattedSize[1])\n : new CustomPath2D().fromString(symbolInstance.pathStr, x, y, formattedSize[0], formattedSize[1]);\n }\n\n clone() {\n return new Symbol({ ...this.attribute });\n }\n\n getNoWorkAnimateAttr(): Record<string, number> {\n return Symbol.NOWORK_ANIMATE_ATTR;\n }\n}\n\nexport function createSymbol(attributes: ISymbolGraphicAttribute): ISymbol {\n return new Symbol(attributes);\n}\n\n// addAttributeToPrototype(DefaultSymbolStyle, Symbol, PURE_STYLE_KEY);\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@visactor/vrender-core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.28",
|
|
4
4
|
"description": "",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"./src/modules.ts",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"vite": "3.2.6",
|
|
36
36
|
"typescript": "4.9.5",
|
|
37
37
|
"cross-env": "^7.0.3",
|
|
38
|
-
"@internal/eslint-config": "0.0.1",
|
|
39
38
|
"@internal/bundler": "0.0.1",
|
|
39
|
+
"@internal/eslint-config": "0.0.1",
|
|
40
40
|
"@internal/ts-config": "0.0.1"
|
|
41
41
|
},
|
|
42
42
|
"keywords": [
|