@visactor/vrender 0.20.7 → 0.20.8
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 +8 -7
- package/dist/index.js +8 -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,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.20.
|
|
24
|
+
exports.version = "0.20.8", (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,yDAWgC;AAChC,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;AAEnB,IAAA,uCAAwB,GAAE,CAAC;AAC3B,IAAA,4CAA6B,GAAE,CAAC;AAChC,IAAA,0CAA2B,GAAE,CAAC;AAC9B,IAAA,2CAA4B,GAAE,CAAC;AAC/B,IAAA,uCAAwB,GAAE,CAAC;AAC3B,IAAA,kCAAmB,GAAE,CAAC;AACtB,yDAAuC;AACvC,yDAAuC","file":"index.js","sourcesContent":["import '@visactor/vrender-core';\nimport {\n container,\n isBrowserEnv,\n isNodeEnv,\n preLoadAllModule,\n registerFlexLayoutPlugin,\n registerViewTransform3dPlugin,\n registerHtmlAttributePlugin,\n registerReactAttributePlugin,\n registerDirectionalLight,\n registerOrthoCamera\n} 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.20.
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kCAAgC;AAChC,yDAWgC;AAChC,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;AAEnB,IAAA,uCAAwB,GAAE,CAAC;AAC3B,IAAA,4CAA6B,GAAE,CAAC;AAChC,IAAA,0CAA2B,GAAE,CAAC;AAC9B,IAAA,2CAA4B,GAAE,CAAC;AAC/B,IAAA,uCAAwB,GAAE,CAAC;AAC3B,IAAA,kCAAmB,GAAE,CAAC;AACtB,yDAAuC;AACvC,yDAAuC","file":"index.js","sourcesContent":["import '@visactor/vrender-core';\nimport {\n container,\n isBrowserEnv,\n isNodeEnv,\n preLoadAllModule,\n registerFlexLayoutPlugin,\n registerViewTransform3dPlugin,\n registerHtmlAttributePlugin,\n registerReactAttributePlugin,\n registerDirectionalLight,\n registerOrthoCamera\n} 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.20.8\";\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();\n\nregisterFlexLayoutPlugin();\nregisterViewTransform3dPlugin();\nregisterHtmlAttributePlugin();\nregisterReactAttributePlugin();\nregisterDirectionalLight();\nregisterOrthoCamera();\nexport * from '@visactor/vrender-core';\nexport * from '@visactor/vrender-kits';\n"]}
|
package/dist/index.es.js
CHANGED
|
@@ -7472,6 +7472,7 @@ class StreamLight extends ACustomAnimate {
|
|
|
7472
7472
|
}, target.attribute)), target.addUpdateBoundTag();
|
|
7473
7473
|
}
|
|
7474
7474
|
_onUpdateLineOrAreaWithCache(customPath, g, end, ratio, out) {
|
|
7475
|
+
var _a, _b;
|
|
7475
7476
|
if (customPath.clear(), "line" === g.type) {
|
|
7476
7477
|
let cache = g.cache;
|
|
7477
7478
|
Array.isArray(cache) || (cache = [cache]);
|
|
@@ -7481,7 +7482,7 @@ class StreamLight extends ACustomAnimate {
|
|
|
7481
7482
|
c.curves.forEach(ci => curves.push(ci));
|
|
7482
7483
|
}), this._updateCurves(customPath, curves, totalLen, ratio);
|
|
7483
7484
|
}
|
|
7484
|
-
if ("area" === g.type) {
|
|
7485
|
+
if ("area" === g.type && (null === (_b = null === (_a = g.cacheArea) || void 0 === _a ? void 0 : _a.top) || void 0 === _b ? void 0 : _b.curves)) {
|
|
7485
7486
|
const cache = g.cacheArea,
|
|
7486
7487
|
totalLen = cache.top.curves.reduce((a, b) => a + b.getLength(), 0);
|
|
7487
7488
|
return this._updateCurves(customPath, cache.top.curves, totalLen, ratio);
|
|
@@ -7493,7 +7494,7 @@ class StreamLight extends ACustomAnimate {
|
|
|
7493
7494
|
endLen = Math.min(null !== (_b = startLen + (null === (_a = this.params) || void 0 === _a ? void 0 : _a.streamLength)) && void 0 !== _b ? _b : 10, totalLen);
|
|
7494
7495
|
let lastLen = 0,
|
|
7495
7496
|
start = !1;
|
|
7496
|
-
for (let i = 0; i < curves.length; i++) {
|
|
7497
|
+
for (let i = 0; i < curves.length; i++) if (!1 !== curves[i].defined) {
|
|
7497
7498
|
const curveItem = curves[i],
|
|
7498
7499
|
len = curveItem.getLength(),
|
|
7499
7500
|
startPercent = 1 - (lastLen + len - startLen) / len;
|
|
@@ -15768,7 +15769,7 @@ let Line$1 = class Line extends Graphic {
|
|
|
15768
15769
|
} = attribute,
|
|
15769
15770
|
b = aabbBounds;
|
|
15770
15771
|
return points.forEach(p => {
|
|
15771
|
-
!1 === p.defined && "zero" !== connectedType || b.add(p.x, p.y);
|
|
15772
|
+
!1 === p.defined && "zero" !== connectedType && "connect" !== connectedType || b.add(p.x, p.y);
|
|
15772
15773
|
}), b;
|
|
15773
15774
|
}
|
|
15774
15775
|
updateLineAABBBoundsBySegments(attribute, lineTheme, aabbBounds, graphic) {
|
|
@@ -15779,7 +15780,7 @@ let Line$1 = class Line extends Graphic {
|
|
|
15779
15780
|
b = aabbBounds;
|
|
15780
15781
|
return segments.forEach(s => {
|
|
15781
15782
|
s.points.forEach(p => {
|
|
15782
|
-
!1 === p.defined && "zero" !== connectedType || b.add(p.x, p.y);
|
|
15783
|
+
!1 === p.defined && "zero" !== connectedType && "connect" !== connectedType || b.add(p.x, p.y);
|
|
15783
15784
|
});
|
|
15784
15785
|
}), b;
|
|
15785
15786
|
}
|
|
@@ -24094,7 +24095,7 @@ let BrowserContext2d = class {
|
|
|
24094
24095
|
const bez = arr[i];
|
|
24095
24096
|
this.bezierCurveTo(bez[0], bez[1], bez[2], bez[3], bez[4], bez[5], z);
|
|
24096
24097
|
}
|
|
24097
|
-
} else this.nativeContext.arc(x, y, radius, startAngle, endAngle, anticlockwise);
|
|
24098
|
+
} else this.nativeContext.arc(x, y, Math.max(0, radius), startAngle, endAngle, anticlockwise);
|
|
24098
24099
|
}
|
|
24099
24100
|
arcTo(x1, y1, x2, y2, radiusX) {
|
|
24100
24101
|
this.nativeContext.arcTo(x1, y1, x2, y2, radiusX);
|
|
@@ -24148,7 +24149,7 @@ let BrowserContext2d = class {
|
|
|
24148
24149
|
return 2 === a.length ? this.nativeContext.createImageData(a[0], a[1]) : 1 === a.length ? this.nativeContext.createImageData(a[0]) : null;
|
|
24149
24150
|
}
|
|
24150
24151
|
createLinearGradient(x0, y0, x1, y1) {
|
|
24151
|
-
return this.nativeContext.createLinearGradient(x0, y0, x1, y1);
|
|
24152
|
+
return isFinite(x0 + y0 + x1 + y1) || (x0 = 0, y0 = 0, x1 = 0, y1 = 0), this.nativeContext.createLinearGradient(x0, y0, x1, y1);
|
|
24152
24153
|
}
|
|
24153
24154
|
createPattern(image, repetition) {
|
|
24154
24155
|
return 0 === image.width || 0 === image.height ? null : this.nativeContext.createPattern(image, repetition);
|
|
@@ -28463,7 +28464,7 @@ const registerWrapText = _registerWrapText;
|
|
|
28463
28464
|
|
|
28464
28465
|
const roughModule = _roughModule;
|
|
28465
28466
|
|
|
28466
|
-
const version = "0.20.
|
|
28467
|
+
const version = "0.20.8";
|
|
28467
28468
|
preLoadAllModule();
|
|
28468
28469
|
if (isBrowserEnv()) {
|
|
28469
28470
|
loadBrowserEnv(container);
|
package/dist/index.js
CHANGED
|
@@ -7478,6 +7478,7 @@
|
|
|
7478
7478
|
}, target.attribute)), target.addUpdateBoundTag();
|
|
7479
7479
|
}
|
|
7480
7480
|
_onUpdateLineOrAreaWithCache(customPath, g, end, ratio, out) {
|
|
7481
|
+
var _a, _b;
|
|
7481
7482
|
if (customPath.clear(), "line" === g.type) {
|
|
7482
7483
|
let cache = g.cache;
|
|
7483
7484
|
Array.isArray(cache) || (cache = [cache]);
|
|
@@ -7487,7 +7488,7 @@
|
|
|
7487
7488
|
c.curves.forEach(ci => curves.push(ci));
|
|
7488
7489
|
}), this._updateCurves(customPath, curves, totalLen, ratio);
|
|
7489
7490
|
}
|
|
7490
|
-
if ("area" === g.type) {
|
|
7491
|
+
if ("area" === g.type && (null === (_b = null === (_a = g.cacheArea) || void 0 === _a ? void 0 : _a.top) || void 0 === _b ? void 0 : _b.curves)) {
|
|
7491
7492
|
const cache = g.cacheArea,
|
|
7492
7493
|
totalLen = cache.top.curves.reduce((a, b) => a + b.getLength(), 0);
|
|
7493
7494
|
return this._updateCurves(customPath, cache.top.curves, totalLen, ratio);
|
|
@@ -7499,7 +7500,7 @@
|
|
|
7499
7500
|
endLen = Math.min(null !== (_b = startLen + (null === (_a = this.params) || void 0 === _a ? void 0 : _a.streamLength)) && void 0 !== _b ? _b : 10, totalLen);
|
|
7500
7501
|
let lastLen = 0,
|
|
7501
7502
|
start = !1;
|
|
7502
|
-
for (let i = 0; i < curves.length; i++) {
|
|
7503
|
+
for (let i = 0; i < curves.length; i++) if (!1 !== curves[i].defined) {
|
|
7503
7504
|
const curveItem = curves[i],
|
|
7504
7505
|
len = curveItem.getLength(),
|
|
7505
7506
|
startPercent = 1 - (lastLen + len - startLen) / len;
|
|
@@ -15774,7 +15775,7 @@
|
|
|
15774
15775
|
} = attribute,
|
|
15775
15776
|
b = aabbBounds;
|
|
15776
15777
|
return points.forEach(p => {
|
|
15777
|
-
!1 === p.defined && "zero" !== connectedType || b.add(p.x, p.y);
|
|
15778
|
+
!1 === p.defined && "zero" !== connectedType && "connect" !== connectedType || b.add(p.x, p.y);
|
|
15778
15779
|
}), b;
|
|
15779
15780
|
}
|
|
15780
15781
|
updateLineAABBBoundsBySegments(attribute, lineTheme, aabbBounds, graphic) {
|
|
@@ -15785,7 +15786,7 @@
|
|
|
15785
15786
|
b = aabbBounds;
|
|
15786
15787
|
return segments.forEach(s => {
|
|
15787
15788
|
s.points.forEach(p => {
|
|
15788
|
-
!1 === p.defined && "zero" !== connectedType || b.add(p.x, p.y);
|
|
15789
|
+
!1 === p.defined && "zero" !== connectedType && "connect" !== connectedType || b.add(p.x, p.y);
|
|
15789
15790
|
});
|
|
15790
15791
|
}), b;
|
|
15791
15792
|
}
|
|
@@ -24100,7 +24101,7 @@
|
|
|
24100
24101
|
const bez = arr[i];
|
|
24101
24102
|
this.bezierCurveTo(bez[0], bez[1], bez[2], bez[3], bez[4], bez[5], z);
|
|
24102
24103
|
}
|
|
24103
|
-
} else this.nativeContext.arc(x, y, radius, startAngle, endAngle, anticlockwise);
|
|
24104
|
+
} else this.nativeContext.arc(x, y, Math.max(0, radius), startAngle, endAngle, anticlockwise);
|
|
24104
24105
|
}
|
|
24105
24106
|
arcTo(x1, y1, x2, y2, radiusX) {
|
|
24106
24107
|
this.nativeContext.arcTo(x1, y1, x2, y2, radiusX);
|
|
@@ -24154,7 +24155,7 @@
|
|
|
24154
24155
|
return 2 === a.length ? this.nativeContext.createImageData(a[0], a[1]) : 1 === a.length ? this.nativeContext.createImageData(a[0]) : null;
|
|
24155
24156
|
}
|
|
24156
24157
|
createLinearGradient(x0, y0, x1, y1) {
|
|
24157
|
-
return this.nativeContext.createLinearGradient(x0, y0, x1, y1);
|
|
24158
|
+
return isFinite(x0 + y0 + x1 + y1) || (x0 = 0, y0 = 0, x1 = 0, y1 = 0), this.nativeContext.createLinearGradient(x0, y0, x1, y1);
|
|
24158
24159
|
}
|
|
24159
24160
|
createPattern(image, repetition) {
|
|
24160
24161
|
return 0 === image.width || 0 === image.height ? null : this.nativeContext.createPattern(image, repetition);
|
|
@@ -28469,7 +28470,7 @@
|
|
|
28469
28470
|
|
|
28470
28471
|
const roughModule = _roughModule;
|
|
28471
28472
|
|
|
28472
|
-
const version = "0.20.
|
|
28473
|
+
const version = "0.20.8";
|
|
28473
28474
|
preLoadAllModule();
|
|
28474
28475
|
if (isBrowserEnv()) {
|
|
28475
28476
|
loadBrowserEnv(container);
|