@visactor/vrender 0.19.27 → 0.19.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/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/dist/index.es.js +6 -5
- package/dist/index.js +6 -5
- 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 +5 -5
package/cjs/index.d.ts
CHANGED
package/cjs/index.js
CHANGED
|
@@ -21,7 +21,7 @@ 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.19.
|
|
24
|
+
exports.version = "0.19.28", (0, vrender_core_1.preLoadAllModule)(), (0, vrender_core_1.isBrowserEnv)() ? (0,
|
|
25
25
|
vrender_kits_1.loadBrowserEnv)(vrender_core_1.container) : (0, vrender_core_1.isNodeEnv)() && (0,
|
|
26
26
|
vrender_kits_1.loadNodeEnv)(vrender_core_1.container), (0, vrender_kits_2.registerArc)(),
|
|
27
27
|
(0, vrender_kits_2.registerArc3d)(), (0, vrender_kits_2.registerArea)(), (0, vrender_kits_2.registerCircle)(),
|
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,SAAS,CAAC;AAEjC,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.19.
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kCAAgC;AAChC,yDAA8F;AAC9F,yDAAqE;AACrE,yDAmBgC;AAEnB,QAAA,OAAO,GAAG,SAAS,CAAC;AAEjC,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.19.28\";\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.es.js
CHANGED
|
@@ -7546,6 +7546,7 @@ class StreamLight extends ACustomAnimate {
|
|
|
7546
7546
|
}, target.attribute)), target.addUpdateBoundTag();
|
|
7547
7547
|
}
|
|
7548
7548
|
_onUpdateLineOrAreaWithCache(customPath, g, end, ratio, out) {
|
|
7549
|
+
var _a, _b;
|
|
7549
7550
|
if (customPath.clear(), "line" === g.type) {
|
|
7550
7551
|
let cache = g.cache;
|
|
7551
7552
|
Array.isArray(cache) || (cache = [cache]);
|
|
@@ -7555,7 +7556,7 @@ class StreamLight extends ACustomAnimate {
|
|
|
7555
7556
|
c.curves.forEach(ci => curves.push(ci));
|
|
7556
7557
|
}), this._updateCurves(customPath, curves, totalLen, ratio);
|
|
7557
7558
|
}
|
|
7558
|
-
if ("area" === g.type) {
|
|
7559
|
+
if ("area" === g.type && (null === (_b = null === (_a = g.cacheArea) || void 0 === _a ? void 0 : _a.top) || void 0 === _b ? void 0 : _b.curves)) {
|
|
7559
7560
|
const cache = g.cacheArea,
|
|
7560
7561
|
totalLen = cache.top.curves.reduce((a, b) => a + b.getLength(), 0);
|
|
7561
7562
|
return this._updateCurves(customPath, cache.top.curves, totalLen, ratio);
|
|
@@ -7567,7 +7568,7 @@ class StreamLight extends ACustomAnimate {
|
|
|
7567
7568
|
endLen = Math.min(null !== (_b = startLen + (null === (_a = this.params) || void 0 === _a ? void 0 : _a.streamLength)) && void 0 !== _b ? _b : 10, totalLen);
|
|
7568
7569
|
let lastLen = 0,
|
|
7569
7570
|
start = !1;
|
|
7570
|
-
for (let i = 0; i < curves.length; i++) {
|
|
7571
|
+
for (let i = 0; i < curves.length; i++) if (!1 !== curves[i].defined) {
|
|
7571
7572
|
const curveItem = curves[i],
|
|
7572
7573
|
len = curveItem.getLength(),
|
|
7573
7574
|
startPercent = 1 - (lastLen + len - startLen) / len;
|
|
@@ -24590,7 +24591,7 @@ let BrowserContext2d = class {
|
|
|
24590
24591
|
const bez = arr[i];
|
|
24591
24592
|
this.bezierCurveTo(bez[0], bez[1], bez[2], bez[3], bez[4], bez[5], z);
|
|
24592
24593
|
}
|
|
24593
|
-
} else this.nativeContext.arc(x, y, radius, startAngle, endAngle, anticlockwise);
|
|
24594
|
+
} else this.nativeContext.arc(x, y, Math.max(0, radius), startAngle, endAngle, anticlockwise);
|
|
24594
24595
|
}
|
|
24595
24596
|
arcTo(x1, y1, x2, y2, radiusX) {
|
|
24596
24597
|
this.nativeContext.arcTo(x1, y1, x2, y2, radiusX);
|
|
@@ -24644,7 +24645,7 @@ let BrowserContext2d = class {
|
|
|
24644
24645
|
return 2 === a.length ? this.nativeContext.createImageData(a[0], a[1]) : 1 === a.length ? this.nativeContext.createImageData(a[0]) : null;
|
|
24645
24646
|
}
|
|
24646
24647
|
createLinearGradient(x0, y0, x1, y1) {
|
|
24647
|
-
return this.nativeContext.createLinearGradient(x0, y0, x1, y1);
|
|
24648
|
+
return isFinite(x0 + y0 + x1 + y1) || (x0 = 0, y0 = 0, x1 = 0, y1 = 0), this.nativeContext.createLinearGradient(x0, y0, x1, y1);
|
|
24648
24649
|
}
|
|
24649
24650
|
createPattern(image, repetition) {
|
|
24650
24651
|
return 0 === image.width || 0 === image.height ? null : this.nativeContext.createPattern(image, repetition);
|
|
@@ -29325,7 +29326,7 @@ const registerWrapText = _registerWrapText;
|
|
|
29325
29326
|
|
|
29326
29327
|
const roughModule = _roughModule;
|
|
29327
29328
|
|
|
29328
|
-
const version = "0.19.
|
|
29329
|
+
const version = "0.19.28";
|
|
29329
29330
|
preLoadAllModule();
|
|
29330
29331
|
if (isBrowserEnv()) {
|
|
29331
29332
|
loadBrowserEnv(container);
|
package/dist/index.js
CHANGED
|
@@ -7552,6 +7552,7 @@
|
|
|
7552
7552
|
}, target.attribute)), target.addUpdateBoundTag();
|
|
7553
7553
|
}
|
|
7554
7554
|
_onUpdateLineOrAreaWithCache(customPath, g, end, ratio, out) {
|
|
7555
|
+
var _a, _b;
|
|
7555
7556
|
if (customPath.clear(), "line" === g.type) {
|
|
7556
7557
|
let cache = g.cache;
|
|
7557
7558
|
Array.isArray(cache) || (cache = [cache]);
|
|
@@ -7561,7 +7562,7 @@
|
|
|
7561
7562
|
c.curves.forEach(ci => curves.push(ci));
|
|
7562
7563
|
}), this._updateCurves(customPath, curves, totalLen, ratio);
|
|
7563
7564
|
}
|
|
7564
|
-
if ("area" === g.type) {
|
|
7565
|
+
if ("area" === g.type && (null === (_b = null === (_a = g.cacheArea) || void 0 === _a ? void 0 : _a.top) || void 0 === _b ? void 0 : _b.curves)) {
|
|
7565
7566
|
const cache = g.cacheArea,
|
|
7566
7567
|
totalLen = cache.top.curves.reduce((a, b) => a + b.getLength(), 0);
|
|
7567
7568
|
return this._updateCurves(customPath, cache.top.curves, totalLen, ratio);
|
|
@@ -7573,7 +7574,7 @@
|
|
|
7573
7574
|
endLen = Math.min(null !== (_b = startLen + (null === (_a = this.params) || void 0 === _a ? void 0 : _a.streamLength)) && void 0 !== _b ? _b : 10, totalLen);
|
|
7574
7575
|
let lastLen = 0,
|
|
7575
7576
|
start = !1;
|
|
7576
|
-
for (let i = 0; i < curves.length; i++) {
|
|
7577
|
+
for (let i = 0; i < curves.length; i++) if (!1 !== curves[i].defined) {
|
|
7577
7578
|
const curveItem = curves[i],
|
|
7578
7579
|
len = curveItem.getLength(),
|
|
7579
7580
|
startPercent = 1 - (lastLen + len - startLen) / len;
|
|
@@ -24596,7 +24597,7 @@
|
|
|
24596
24597
|
const bez = arr[i];
|
|
24597
24598
|
this.bezierCurveTo(bez[0], bez[1], bez[2], bez[3], bez[4], bez[5], z);
|
|
24598
24599
|
}
|
|
24599
|
-
} else this.nativeContext.arc(x, y, radius, startAngle, endAngle, anticlockwise);
|
|
24600
|
+
} else this.nativeContext.arc(x, y, Math.max(0, radius), startAngle, endAngle, anticlockwise);
|
|
24600
24601
|
}
|
|
24601
24602
|
arcTo(x1, y1, x2, y2, radiusX) {
|
|
24602
24603
|
this.nativeContext.arcTo(x1, y1, x2, y2, radiusX);
|
|
@@ -24650,7 +24651,7 @@
|
|
|
24650
24651
|
return 2 === a.length ? this.nativeContext.createImageData(a[0], a[1]) : 1 === a.length ? this.nativeContext.createImageData(a[0]) : null;
|
|
24651
24652
|
}
|
|
24652
24653
|
createLinearGradient(x0, y0, x1, y1) {
|
|
24653
|
-
return this.nativeContext.createLinearGradient(x0, y0, x1, y1);
|
|
24654
|
+
return isFinite(x0 + y0 + x1 + y1) || (x0 = 0, y0 = 0, x1 = 0, y1 = 0), this.nativeContext.createLinearGradient(x0, y0, x1, y1);
|
|
24654
24655
|
}
|
|
24655
24656
|
createPattern(image, repetition) {
|
|
24656
24657
|
return 0 === image.width || 0 === image.height ? null : this.nativeContext.createPattern(image, repetition);
|
|
@@ -29331,7 +29332,7 @@
|
|
|
29331
29332
|
|
|
29332
29333
|
const roughModule = _roughModule;
|
|
29333
29334
|
|
|
29334
|
-
const version = "0.19.
|
|
29335
|
+
const version = "0.19.28";
|
|
29335
29336
|
preLoadAllModule();
|
|
29336
29337
|
if (isBrowserEnv()) {
|
|
29337
29338
|
loadBrowserEnv(container);
|