@visactor/vrender 0.13.3-alpha.2 → 0.13.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/canvas/contributions/browser/canvas.d.ts +3 -1
- package/cjs/canvas/contributions/browser/canvas.js +6 -0
- package/cjs/canvas/contributions/browser/canvas.js.map +1 -1
- package/cjs/canvas/contributions/feishu/canvas.d.ts +3 -1
- package/cjs/canvas/contributions/feishu/canvas.js +6 -0
- package/cjs/canvas/contributions/feishu/canvas.js.map +1 -1
- package/cjs/canvas/contributions/lynx/canvas.d.ts +3 -1
- package/cjs/canvas/contributions/lynx/canvas.js +6 -0
- package/cjs/canvas/contributions/lynx/canvas.js.map +1 -1
- package/cjs/canvas/contributions/node/canvas.d.ts +2 -0
- package/cjs/canvas/contributions/node/canvas.js +2 -0
- package/cjs/canvas/contributions/node/canvas.js.map +1 -1
- package/cjs/canvas/contributions/taro/canvas.d.ts +3 -1
- package/cjs/canvas/contributions/taro/canvas.js +6 -0
- package/cjs/canvas/contributions/taro/canvas.js.map +1 -1
- package/cjs/canvas/contributions/tt/canvas.d.ts +3 -1
- package/cjs/canvas/contributions/tt/canvas.js +6 -0
- package/cjs/canvas/contributions/tt/canvas.js.map +1 -1
- package/cjs/canvas/contributions/wx/canvas.d.ts +2 -0
- package/cjs/canvas/contributions/wx/canvas.js +6 -0
- package/cjs/canvas/contributions/wx/canvas.js.map +1 -1
- package/cjs/core/contributions/layerHandler/canvas2d-contribution.d.ts +2 -0
- package/cjs/core/contributions/layerHandler/canvas2d-contribution.js +8 -2
- package/cjs/core/contributions/layerHandler/canvas2d-contribution.js.map +1 -1
- package/cjs/index.d.ts +2 -1
- package/cjs/index.js +16 -2
- package/cjs/index.js.map +1 -1
- package/dist/index.js +56 -1
- package/dist/index.min.js +1 -1
- package/es/canvas/contributions/browser/canvas.d.ts +3 -1
- package/es/canvas/contributions/browser/canvas.js +6 -0
- package/es/canvas/contributions/browser/canvas.js.map +1 -1
- package/es/canvas/contributions/feishu/canvas.d.ts +3 -1
- package/es/canvas/contributions/feishu/canvas.js +6 -0
- package/es/canvas/contributions/feishu/canvas.js.map +1 -1
- package/es/canvas/contributions/lynx/canvas.d.ts +3 -1
- package/es/canvas/contributions/lynx/canvas.js +6 -0
- package/es/canvas/contributions/lynx/canvas.js.map +1 -1
- package/es/canvas/contributions/node/canvas.d.ts +2 -0
- package/es/canvas/contributions/node/canvas.js +2 -0
- package/es/canvas/contributions/node/canvas.js.map +1 -1
- package/es/canvas/contributions/taro/canvas.d.ts +3 -1
- package/es/canvas/contributions/taro/canvas.js +6 -0
- package/es/canvas/contributions/taro/canvas.js.map +1 -1
- package/es/canvas/contributions/tt/canvas.d.ts +3 -1
- package/es/canvas/contributions/tt/canvas.js +6 -0
- package/es/canvas/contributions/tt/canvas.js.map +1 -1
- package/es/canvas/contributions/wx/canvas.d.ts +2 -0
- package/es/canvas/contributions/wx/canvas.js +6 -0
- package/es/canvas/contributions/wx/canvas.js.map +1 -1
- package/es/core/contributions/layerHandler/canvas2d-contribution.d.ts +2 -0
- package/es/core/contributions/layerHandler/canvas2d-contribution.js +8 -2
- package/es/core/contributions/layerHandler/canvas2d-contribution.js.map +1 -1
- package/es/index.d.ts +2 -1
- package/es/index.js +3 -1
- package/es/index.js.map +1 -1
- package/es/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
package/cjs/index.js
CHANGED
|
@@ -17,8 +17,8 @@ var __createBinding = this && this.__createBinding || (Object.create ? function(
|
|
|
17
17
|
|
|
18
18
|
Object.defineProperty(exports, "__esModule", {
|
|
19
19
|
value: !0
|
|
20
|
-
}), exports.version = void 0, require("core-js/proposals/reflect-metadata"),
|
|
21
|
-
exports.version = "0.13.3
|
|
20
|
+
}), exports.wrapContext = exports.wrapCanvas = exports.version = void 0, require("core-js/proposals/reflect-metadata"),
|
|
21
|
+
require("./modules"), exports.version = "0.13.3", __exportStar(require("./container"), exports),
|
|
22
22
|
__exportStar(require("./core/global"), exports), __exportStar(require("./graphic"), exports),
|
|
23
23
|
__exportStar(require("./modules"), exports), __exportStar(require("./create"), exports),
|
|
24
24
|
__exportStar(require("./event"), exports), __exportStar(require("./interface"), exports),
|
|
@@ -38,4 +38,18 @@ __exportStar(require("./common/sort"), exports), __exportStar(require("./common/
|
|
|
38
38
|
__exportStar(require("./common/split-path"), exports), __exportStar(require("./common/enums"), exports),
|
|
39
39
|
__exportStar(require("./common/generator"), exports), __exportStar(require("./plugins/constants"), exports),
|
|
40
40
|
__exportStar(require("./animate/default-ticker"), exports);
|
|
41
|
+
|
|
42
|
+
var util_1 = require("./canvas/util");
|
|
43
|
+
|
|
44
|
+
Object.defineProperty(exports, "wrapCanvas", {
|
|
45
|
+
enumerable: !0,
|
|
46
|
+
get: function() {
|
|
47
|
+
return util_1.wrapCanvas;
|
|
48
|
+
}
|
|
49
|
+
}), Object.defineProperty(exports, "wrapContext", {
|
|
50
|
+
enumerable: !0,
|
|
51
|
+
get: function() {
|
|
52
|
+
return util_1.wrapContext;
|
|
53
|
+
}
|
|
54
|
+
});
|
|
41
55
|
//# sourceMappingURL=index.js.map
|
package/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,8CAA4C;AAC5C,qBAAmB;AAGN,QAAA,OAAO,GAAG,
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,8CAA4C;AAC5C,qBAAmB;AAGN,QAAA,OAAO,GAAG,QAAQ,CAAC;AAEhC,8CAA4B;AAC5B,gDAA8B;AAC9B,4CAA0B;AAC1B,4CAA0B;AAC1B,2CAAyB;AACzB,0CAAwB;AACxB,8CAA4B;AAC5B,2CAAyB;AACzB,4EAA0D;AAC1D,2CAAyB;AACzB,yCAAuB;AACvB,2CAAyB;AACzB,yCAAuB;AACvB,4CAA0B;AAC1B,2DAAyC;AAGzC,gDAA8B;AAC9B,wDAAsC;AACtC,0DAAwC;AACxC,uDAAqC;AACrC,yDAAuC;AACvC,mDAAiC;AACjC,wDAAsC;AACtC,iEAA+C;AAC/C,qDAAmC;AACnC,iDAA+B;AAC/B,qDAAmC;AACnC,sDAAoC;AAEpC,oDAAkC;AAClC,wDAAsC;AACtC,uDAAqC;AACrC,+DAA6C;AAC7C,gDAA8B;AAC9B,0DAAwC;AACxC,sDAAoC;AACpC,iDAA+B;AAC/B,qDAAmC;AACnC,sDAAoC;AAEpC,2DAAyC;AACzC,sCAAwD;AAA/C,kGAAA,UAAU,OAAA;AAAE,mGAAA,WAAW,OAAA","file":"index.js","sourcesContent":["import 'core-js/proposals/reflect-metadata';\nimport './modules';\n\n// 导出版本号\nexport const version = \"0.13.3\";\n\nexport * from './container';\nexport * from './core/global';\nexport * from './graphic';\nexport * from './modules';\nexport * from './create';\nexport * from './event';\nexport * from './interface';\nexport * from './render';\nexport * from './render/contributions/render/base-render';\nexport * from './canvas';\nexport * from './core';\nexport * from './picker';\nexport * from './kits';\nexport * from './animate';\nexport * from './resource-loader/loader';\n\n/* export common */\nexport * from './common/text';\nexport * from './common/bezier-utils';\nexport * from './common/bounds-context';\nexport * from './common/seg-context';\nexport * from './common/custom-path2d';\nexport * from './common/segment';\nexport * from './common/canvas-utils';\nexport * from './common/contribution-provider';\nexport * from './common/generator';\nexport * from './common/utils';\nexport * from './common/shape/arc';\nexport * from './common/shape/rect';\n\nexport * from './common/path-svg';\nexport * from './common/render-curve';\nexport * from './common/render-area';\nexport * from './common/render-command-list';\nexport * from './common/sort';\nexport * from './common/morphing-utils';\nexport * from './common/split-path';\nexport * from './common/enums';\nexport * from './common/generator';\nexport * from './plugins/constants';\n\nexport * from './animate/default-ticker';\nexport { wrapCanvas, wrapContext } from './canvas/util';\n"]}
|
package/dist/index.js
CHANGED
|
@@ -9601,6 +9601,9 @@
|
|
|
9601
9601
|
function wrapCanvas(params) {
|
|
9602
9602
|
return container.getNamed(CanvasFactory, application.global.env)(params);
|
|
9603
9603
|
}
|
|
9604
|
+
function wrapContext(canvas, dpr) {
|
|
9605
|
+
return container.getNamed(Context2dFactory, application.global.env)(canvas, dpr);
|
|
9606
|
+
}
|
|
9604
9607
|
const EPSILON_NUMERIC = 1e-4;
|
|
9605
9608
|
const THREE_SQRT = Math.sqrt(3);
|
|
9606
9609
|
const ONE_THIRD = 1 / 3;
|
|
@@ -28297,9 +28300,15 @@
|
|
|
28297
28300
|
get x() {
|
|
28298
28301
|
return this._x;
|
|
28299
28302
|
}
|
|
28303
|
+
set x(_x) {
|
|
28304
|
+
this._x = _x;
|
|
28305
|
+
}
|
|
28300
28306
|
get y() {
|
|
28301
28307
|
return this._y;
|
|
28302
28308
|
}
|
|
28309
|
+
set y(_y) {
|
|
28310
|
+
this._y = _y;
|
|
28311
|
+
}
|
|
28303
28312
|
get nativeCanvas() {
|
|
28304
28313
|
return this._nativeCanvas;
|
|
28305
28314
|
}
|
|
@@ -30235,9 +30244,15 @@
|
|
|
30235
30244
|
get x() {
|
|
30236
30245
|
return this._x;
|
|
30237
30246
|
}
|
|
30247
|
+
set x(_x) {
|
|
30248
|
+
this._x = _x;
|
|
30249
|
+
}
|
|
30238
30250
|
get y() {
|
|
30239
30251
|
return this._y;
|
|
30240
30252
|
}
|
|
30253
|
+
set y(_y) {
|
|
30254
|
+
this._y = _y;
|
|
30255
|
+
}
|
|
30241
30256
|
get nativeCanvas() {
|
|
30242
30257
|
return this._nativeCanvas;
|
|
30243
30258
|
}
|
|
@@ -30630,9 +30645,15 @@
|
|
|
30630
30645
|
get x() {
|
|
30631
30646
|
return this._x;
|
|
30632
30647
|
}
|
|
30648
|
+
set x(_x) {
|
|
30649
|
+
this._x = _x;
|
|
30650
|
+
}
|
|
30633
30651
|
get y() {
|
|
30634
30652
|
return this._y;
|
|
30635
30653
|
}
|
|
30654
|
+
set y(_y) {
|
|
30655
|
+
this._y = _y;
|
|
30656
|
+
}
|
|
30636
30657
|
get nativeCanvas() {
|
|
30637
30658
|
return this._nativeCanvas;
|
|
30638
30659
|
}
|
|
@@ -31012,9 +31033,15 @@
|
|
|
31012
31033
|
get x() {
|
|
31013
31034
|
return this._x;
|
|
31014
31035
|
}
|
|
31036
|
+
set x(_x) {
|
|
31037
|
+
this._x = _x;
|
|
31038
|
+
}
|
|
31015
31039
|
get y() {
|
|
31016
31040
|
return this._y;
|
|
31017
31041
|
}
|
|
31042
|
+
set y(_y) {
|
|
31043
|
+
this._y = _y;
|
|
31044
|
+
}
|
|
31018
31045
|
get nativeCanvas() {
|
|
31019
31046
|
return this._nativeCanvas;
|
|
31020
31047
|
}
|
|
@@ -31348,9 +31375,15 @@
|
|
|
31348
31375
|
get x() {
|
|
31349
31376
|
return 0;
|
|
31350
31377
|
}
|
|
31378
|
+
set x(_x) {
|
|
31379
|
+
return;
|
|
31380
|
+
}
|
|
31351
31381
|
get y() {
|
|
31352
31382
|
return 0;
|
|
31353
31383
|
}
|
|
31384
|
+
set y(_y) {
|
|
31385
|
+
return;
|
|
31386
|
+
}
|
|
31354
31387
|
get nativeCanvas() {
|
|
31355
31388
|
return this._nativeCanvas;
|
|
31356
31389
|
}
|
|
@@ -31602,9 +31635,15 @@
|
|
|
31602
31635
|
get x() {
|
|
31603
31636
|
return this._x;
|
|
31604
31637
|
}
|
|
31638
|
+
set x(_x) {
|
|
31639
|
+
this._x = _x;
|
|
31640
|
+
}
|
|
31605
31641
|
get y() {
|
|
31606
31642
|
return this._y;
|
|
31607
31643
|
}
|
|
31644
|
+
set y(_y) {
|
|
31645
|
+
this._y = _y;
|
|
31646
|
+
}
|
|
31608
31647
|
get nativeCanvas() {
|
|
31609
31648
|
return this._nativeCanvas;
|
|
31610
31649
|
}
|
|
@@ -31930,17 +31969,22 @@
|
|
|
31930
31969
|
canvas;
|
|
31931
31970
|
context;
|
|
31932
31971
|
offscreen;
|
|
31972
|
+
main;
|
|
31973
|
+
window;
|
|
31933
31974
|
constructor(global) {
|
|
31934
31975
|
this.global = global;
|
|
31935
31976
|
this.offscreen = false;
|
|
31936
31977
|
}
|
|
31937
31978
|
init(layer, window, params) {
|
|
31938
31979
|
this.layer = layer;
|
|
31980
|
+
this.window = window;
|
|
31939
31981
|
if (params.main) {
|
|
31982
|
+
this.main = true;
|
|
31940
31983
|
this.context = window.getContext();
|
|
31941
31984
|
this.canvas = this.context.getCanvas();
|
|
31942
31985
|
}
|
|
31943
31986
|
else {
|
|
31987
|
+
this.main = false;
|
|
31944
31988
|
let nativeCanvas;
|
|
31945
31989
|
if (params.canvasId) {
|
|
31946
31990
|
nativeCanvas = this.global.getElementById(params.canvasId);
|
|
@@ -31979,6 +32023,15 @@
|
|
|
31979
32023
|
return;
|
|
31980
32024
|
}
|
|
31981
32025
|
render(group, params, userParams) {
|
|
32026
|
+
if (!this.main) {
|
|
32027
|
+
const windowContext = this.window.getContext();
|
|
32028
|
+
const windowCanvas = windowContext.getCanvas().nativeCanvas;
|
|
32029
|
+
if (windowCanvas && (this.canvas.x !== windowCanvas.offsetLeft || this.canvas.y !== windowCanvas.offsetTop)) {
|
|
32030
|
+
this.canvas.x = windowCanvas.offsetLeft;
|
|
32031
|
+
this.canvas.y = windowCanvas.offsetTop;
|
|
32032
|
+
this.canvas.applyPosition();
|
|
32033
|
+
}
|
|
32034
|
+
}
|
|
31982
32035
|
params.renderService.render(group, {
|
|
31983
32036
|
context: this.context,
|
|
31984
32037
|
clear: params.background ?? '#ffffff',
|
|
@@ -36251,7 +36304,7 @@
|
|
|
36251
36304
|
'rect'
|
|
36252
36305
|
];
|
|
36253
36306
|
|
|
36254
|
-
const version = "0.13.3
|
|
36307
|
+
const version = "0.13.3";
|
|
36255
36308
|
|
|
36256
36309
|
exports.ACustomAnimate = ACustomAnimate;
|
|
36257
36310
|
exports.ARC3D_NUMBER_TYPE = ARC3D_NUMBER_TYPE;
|
|
@@ -36565,5 +36618,7 @@
|
|
|
36565
36618
|
exports.translate = translate;
|
|
36566
36619
|
exports.version = version;
|
|
36567
36620
|
exports.waitForAllSubLayers = waitForAllSubLayers;
|
|
36621
|
+
exports.wrapCanvas = wrapCanvas;
|
|
36622
|
+
exports.wrapContext = wrapContext;
|
|
36568
36623
|
|
|
36569
36624
|
}));
|