@visactor/vrender 0.18.7-alpha.0 → 0.18.7
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/index.d.ts +1 -1
- package/cjs/index.js +10 -11
- package/cjs/index.js.map +1 -1
- package/dist/index.js +24 -7
- package/dist/index.min.js +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/package.json +3 -3
package/cjs/index.d.ts
CHANGED
package/cjs/index.js
CHANGED
|
@@ -21,14 +21,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
21
21
|
|
|
22
22
|
const vrender_core_1 = require("@visactor/vrender-core"), vrender_kits_1 = require("@visactor/vrender-kits"), vrender_kits_2 = require("@visactor/vrender-kits");
|
|
23
23
|
|
|
24
|
-
exports.version = "0.18.7
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
(0, vrender_kits_2.
|
|
28
|
-
(0, vrender_kits_2.
|
|
29
|
-
(0, vrender_kits_2.
|
|
30
|
-
(0, vrender_kits_2.
|
|
31
|
-
|
|
32
|
-
(0, vrender_kits_2.
|
|
33
|
-
(
|
|
34
|
-
__exportStar(require("@visactor/vrender-kits"), exports);
|
|
24
|
+
exports.version = "0.18.7", (0, vrender_core_1.preLoadAllModule)(), (0, vrender_core_1.isBrowserEnv)() ? (0,
|
|
25
|
+
vrender_kits_1.loadBrowserEnv)(vrender_core_1.container) : (0, vrender_core_1.isNodeEnv)() && (0,
|
|
26
|
+
vrender_kits_1.loadNodeEnv)(vrender_core_1.container), (0, vrender_kits_2.registerArc)(),
|
|
27
|
+
(0, vrender_kits_2.registerArc3d)(), (0, vrender_kits_2.registerArea)(), (0, vrender_kits_2.registerCircle)(),
|
|
28
|
+
(0, vrender_kits_2.registerGlyph)(), (0, vrender_kits_2.registerGroup)(), (0, vrender_kits_2.registerImage)(),
|
|
29
|
+
(0, vrender_kits_2.registerLine)(), (0, vrender_kits_2.registerPath)(), (0, vrender_kits_2.registerPolygon)(),
|
|
30
|
+
(0, vrender_kits_2.registerPyramid3d)(), (0, vrender_kits_2.registerRect)(), (0,
|
|
31
|
+
vrender_kits_2.registerRect3d)(), (0, vrender_kits_2.registerRichtext)(), (0, vrender_kits_2.registerShadowRoot)(),
|
|
32
|
+
(0, vrender_kits_2.registerSymbol)(), (0, vrender_kits_2.registerText)(), (0, vrender_kits_2.registerWrapText)(),
|
|
33
|
+
__exportStar(require("@visactor/vrender-core"), exports), __exportStar(require("@visactor/vrender-kits"), exports);
|
package/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kCAAgC;AAChC,yDAA8F;AAC9F,yDAAqE;AACrE,yDAmBgC;AAEnB,QAAA,OAAO,GAAG,
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kCAAgC;AAChC,yDAA8F;AAC9F,yDAAqE;AACrE,yDAmBgC;AAEnB,QAAA,OAAO,GAAG,QAAQ,CAAC;AAEhC,IAAA,+BAAgB,GAAE,CAAC;AAEnB,IAAI,IAAA,2BAAY,GAAE,EAAE;IAClB,IAAA,6BAAc,EAAC,wBAAS,CAAC,CAAC;CAC3B;KAAM,IAAI,IAAA,wBAAS,GAAE,EAAE;IACtB,IAAA,0BAAW,EAAC,wBAAS,CAAC,CAAC;CACxB;AACD,IAAA,0BAAW,GAAE,CAAC;AACd,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,8BAAe,GAAE,CAAC;AAClB,IAAA,gCAAiB,GAAE,CAAC;AACpB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,+BAAgB,GAAE,CAAC;AACnB,IAAA,iCAAkB,GAAE,CAAC;AACrB,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,+BAAgB,GAAE,CAAC;AACnB,yDAAuC;AACvC,yDAAuC","file":"index.js","sourcesContent":["import '@visactor/vrender-core';\nimport { container, isBrowserEnv, isNodeEnv, preLoadAllModule } from '@visactor/vrender-core';\nimport { loadBrowserEnv, loadNodeEnv } from '@visactor/vrender-kits';\nimport {\n registerArc,\n registerArc3d,\n registerArea,\n registerCircle,\n registerGlyph,\n registerGroup,\n registerImage,\n registerLine,\n registerPath,\n registerPolygon,\n registerPyramid3d,\n registerRect,\n registerRect3d,\n registerRichtext,\n registerShadowRoot,\n registerSymbol,\n registerText,\n registerWrapText\n} from '@visactor/vrender-kits';\n// 导出版本号\nexport const version = \"0.18.7\";\n\npreLoadAllModule();\n\nif (isBrowserEnv()) {\n loadBrowserEnv(container);\n} else if (isNodeEnv()) {\n loadNodeEnv(container);\n}\nregisterArc();\nregisterArc3d();\nregisterArea();\nregisterCircle();\nregisterGlyph();\nregisterGroup();\nregisterImage();\nregisterLine();\nregisterPath();\nregisterPolygon();\nregisterPyramid3d();\nregisterRect();\nregisterRect3d();\nregisterRichtext();\nregisterShadowRoot();\nregisterSymbol();\nregisterText();\nregisterWrapText();\nexport * from '@visactor/vrender-core';\nexport * from '@visactor/vrender-kits';\n"]}
|
package/dist/index.js
CHANGED
|
@@ -11472,6 +11472,7 @@
|
|
|
11472
11472
|
}, {
|
|
11473
11473
|
key: "loading",
|
|
11474
11474
|
value: function loading() {
|
|
11475
|
+
var _this = this;
|
|
11475
11476
|
setTimeout(function () {
|
|
11476
11477
|
if (!ResourceLoader.isLoading && ResourceLoader.toLoadAueue.length) {
|
|
11477
11478
|
ResourceLoader.isLoading = !0;
|
|
@@ -11497,9 +11498,13 @@
|
|
|
11497
11498
|
return mark.imageLoadFail(url);
|
|
11498
11499
|
});
|
|
11499
11500
|
}), Promise.all(promises).then(function () {
|
|
11500
|
-
ResourceLoader.isLoading = !1,
|
|
11501
|
+
ResourceLoader.isLoading = !1, _this.onLoadSuccessCb.forEach(function (cb) {
|
|
11502
|
+
return cb();
|
|
11503
|
+
}), ResourceLoader.loading();
|
|
11501
11504
|
})["catch"](function (error) {
|
|
11502
|
-
console.error(error), ResourceLoader.isLoading = !1,
|
|
11505
|
+
console.error(error), ResourceLoader.isLoading = !1, _this.onLoadSuccessCb.forEach(function (cb) {
|
|
11506
|
+
return cb();
|
|
11507
|
+
}), ResourceLoader.loading();
|
|
11503
11508
|
});
|
|
11504
11509
|
}
|
|
11505
11510
|
}, 0);
|
|
@@ -11523,6 +11528,11 @@
|
|
|
11523
11528
|
ResourceLoader.toLoadAueue.unshift(elememt[0]);
|
|
11524
11529
|
}
|
|
11525
11530
|
}
|
|
11531
|
+
}, {
|
|
11532
|
+
key: "onLoadSuccess",
|
|
11533
|
+
value: function onLoadSuccess(cb) {
|
|
11534
|
+
this.onLoadSuccessCb.push(cb);
|
|
11535
|
+
}
|
|
11526
11536
|
}]);
|
|
11527
11537
|
return ResourceLoader;
|
|
11528
11538
|
}();
|
|
@@ -11530,7 +11540,7 @@
|
|
|
11530
11540
|
for (var i = 0; i < arr.length; i++) if (arr[i].url === url) return i;
|
|
11531
11541
|
return -1;
|
|
11532
11542
|
}
|
|
11533
|
-
ResourceLoader.cache = new Map(), ResourceLoader.isLoading = !1, ResourceLoader.toLoadAueue = [];
|
|
11543
|
+
ResourceLoader.cache = new Map(), ResourceLoader.isLoading = !1, ResourceLoader.toLoadAueue = [], ResourceLoader.onLoadSuccessCb = [];
|
|
11534
11544
|
|
|
11535
11545
|
var tempMatrix = new Matrix(),
|
|
11536
11546
|
tempBounds$1 = new AABBBounds();
|
|
@@ -13371,6 +13381,10 @@
|
|
|
13371
13381
|
strokeOpacity = _graphic$attribute$st2 === void 0 ? themeAttributes.strokeOpacity : _graphic$attribute$st2,
|
|
13372
13382
|
_graphic$attribute$vi = _graphic$attribute.visible,
|
|
13373
13383
|
visible = _graphic$attribute$vi === void 0 ? themeAttributes.visible : _graphic$attribute$vi,
|
|
13384
|
+
_graphic$attribute$x = _graphic$attribute.x,
|
|
13385
|
+
originX = _graphic$attribute$x === void 0 ? themeAttributes.x : _graphic$attribute$x,
|
|
13386
|
+
_graphic$attribute$y = _graphic$attribute.y,
|
|
13387
|
+
originY = _graphic$attribute$y === void 0 ? themeAttributes.y : _graphic$attribute$y,
|
|
13374
13388
|
fVisible = fillVisible(opacity, fillOpacity, fill),
|
|
13375
13389
|
sVisible = strokeVisible(opacity, strokeOpacity),
|
|
13376
13390
|
doFill = runFill(fill),
|
|
@@ -13380,7 +13394,7 @@
|
|
|
13380
13394
|
if (!(fVisible || sVisible || fillCb || strokeCb)) return !0;
|
|
13381
13395
|
context.beginPath();
|
|
13382
13396
|
var path = "function" == typeof graphic.pathProxy ? graphic.pathProxy(graphic.attribute) : graphic.pathProxy;
|
|
13383
|
-
return renderCommandList(path.commandList, context, x, y), context.setShadowBlendStyle && context.setShadowBlendStyle(graphic, graphic.attribute, themeAttributes), doStroke && (strokeCb ? strokeCb(context, graphic.attribute, themeAttributes) : sVisible && (context.setStrokeStyle(graphic, graphic.attribute, x, y, themeAttributes), context.stroke())), doFill && (fillCb ? fillCb(context, graphic.attribute, themeAttributes) : fVisible && (context.setCommonStyle(graphic, graphic.attribute, x, y, themeAttributes), context.fill())), !0;
|
|
13397
|
+
return renderCommandList(path.commandList, context, x, y), context.setShadowBlendStyle && context.setShadowBlendStyle(graphic, graphic.attribute, themeAttributes), doStroke && (strokeCb ? strokeCb(context, graphic.attribute, themeAttributes) : sVisible && (context.setStrokeStyle(graphic, graphic.attribute, x - originX, y - originY, themeAttributes), context.stroke())), doFill && (fillCb ? fillCb(context, graphic.attribute, themeAttributes) : fVisible && (context.setCommonStyle(graphic, graphic.attribute, x - originX, y - originY, themeAttributes), context.fill())), !0;
|
|
13384
13398
|
}
|
|
13385
13399
|
function intersect(x0, y0, x1, y1, x2, y2, x3, y3) {
|
|
13386
13400
|
var x10 = x1 - x0,
|
|
@@ -20573,7 +20587,9 @@
|
|
|
20573
20587
|
var endSeg = segments[segments.length - 1];
|
|
20574
20588
|
startP = segments[0].points[0], endP = endSeg.points[endSeg.points.length - 1];
|
|
20575
20589
|
} else startP = points[0], endP = points[points.length - 1];
|
|
20576
|
-
|
|
20590
|
+
var xTotalLength = abs(endP.x - startP.x),
|
|
20591
|
+
yTotalLength = abs(endP.y - startP.y);
|
|
20592
|
+
direction = Number.isFinite(xTotalLength + yTotalLength) ? xTotalLength > yTotalLength ? exports.Direction.ROW : exports.Direction.COLUMN : exports.Direction.ROW, drawAreaSegments(context.camera ? context : context.nativeContext, cache, clipRange, {
|
|
20577
20593
|
offsetX: offsetX,
|
|
20578
20594
|
offsetY: offsetY,
|
|
20579
20595
|
offsetZ: offsetZ,
|
|
@@ -30848,7 +30864,8 @@
|
|
|
30848
30864
|
}, {
|
|
30849
30865
|
key: "getStyle",
|
|
30850
30866
|
value: function getStyle() {
|
|
30851
|
-
|
|
30867
|
+
var _a;
|
|
30868
|
+
return null !== (_a = this.canvas.nativeCanvas.style) && void 0 !== _a ? _a : {};
|
|
30852
30869
|
}
|
|
30853
30870
|
}, {
|
|
30854
30871
|
key: "setStyle",
|
|
@@ -35336,7 +35353,7 @@
|
|
|
35336
35353
|
|
|
35337
35354
|
var roughModule = _roughModule;
|
|
35338
35355
|
|
|
35339
|
-
const version = "0.18.7
|
|
35356
|
+
const version = "0.18.7";
|
|
35340
35357
|
preLoadAllModule();
|
|
35341
35358
|
if (isBrowserEnv()) {
|
|
35342
35359
|
loadBrowserEnv(container);
|