@visactor/vrender 0.17.2-alpha.3 → 0.17.2
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.js +27 -21
- 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 +4 -4
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.17.2
|
|
24
|
+
exports.version = "0.17.2", (0, vrender_core_1.isBrowserEnv)() ? (0, vrender_kits_1.loadBrowserEnv)(vrender_core_1.container) : (0,
|
|
25
25
|
vrender_core_1.isNodeEnv)() && (0, vrender_kits_1.loadNodeEnv)(vrender_core_1.container),
|
|
26
26
|
(0, vrender_kits_2.registerArc)(), (0, vrender_kits_2.registerArc3d)(), (0, vrender_kits_2.registerArea)(),
|
|
27
27
|
(0, vrender_kits_2.registerCircle)(), (0, vrender_kits_2.registerGlyph)(), (0, vrender_kits_2.registerGroup)(),
|
package/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,yDAA4E;AAC5E,yDAAqE;AACrE,yDAmBgC;AAEnB,QAAA,OAAO,GAAG,
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,yDAA4E;AAC5E,yDAAqE;AACrE,yDAmBgC;AAEnB,QAAA,OAAO,GAAG,QAAQ,CAAC;AAEhC,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 { container, isBrowserEnv, isNodeEnv } 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.17.2\";\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
|
@@ -15468,12 +15468,16 @@
|
|
|
15468
15468
|
},
|
|
15469
15469
|
rectTheme = getTheme(this).rect3d,
|
|
15470
15470
|
_this$attribute = this.attribute,
|
|
15471
|
-
|
|
15472
|
-
|
|
15473
|
-
|
|
15474
|
-
|
|
15471
|
+
x1 = _this$attribute.x1,
|
|
15472
|
+
y1 = _this$attribute.y1,
|
|
15473
|
+
x = _this$attribute.x,
|
|
15474
|
+
y = _this$attribute.y,
|
|
15475
15475
|
_this$attribute$lengt = _this$attribute.length,
|
|
15476
15476
|
length = _this$attribute$lengt === void 0 ? min(rectTheme.width, rectTheme.height) : _this$attribute$lengt;
|
|
15477
|
+
var _this$attribute2 = this.attribute,
|
|
15478
|
+
width = _this$attribute2.width,
|
|
15479
|
+
height = _this$attribute2.height;
|
|
15480
|
+
width = null != width ? width : x1 - x, height = null != height ? height : y1 - y;
|
|
15477
15481
|
for (var i = 0; i < CUBE_VERTICES.length; i++) {
|
|
15478
15482
|
var v = CUBE_VERTICES[i];
|
|
15479
15483
|
faces.vertices.push([v[0] * width, v[1] * height, v[2] * length]);
|
|
@@ -18710,24 +18714,25 @@
|
|
|
18710
18714
|
var halfPi = pi / 2;
|
|
18711
18715
|
function createRectPath(path, x, y, width, height, rectCornerRadius) {
|
|
18712
18716
|
var cornerRadius;
|
|
18713
|
-
if (width < 0 && (x += width, width = -width), height < 0 && (y += height, height = -height), isNumber$2(rectCornerRadius, !0)) cornerRadius = [rectCornerRadius, rectCornerRadius, rectCornerRadius, rectCornerRadius];else if (Array.isArray(rectCornerRadius)) {
|
|
18717
|
+
if (width < 0 && (x += width, width = -width), height < 0 && (y += height, height = -height), isNumber$2(rectCornerRadius, !0)) cornerRadius = [rectCornerRadius = abs(rectCornerRadius), rectCornerRadius, rectCornerRadius, rectCornerRadius];else if (Array.isArray(rectCornerRadius)) {
|
|
18714
18718
|
var cornerRadiusArr = rectCornerRadius;
|
|
18719
|
+
var cr0, cr1;
|
|
18715
18720
|
switch (cornerRadiusArr.length) {
|
|
18716
18721
|
case 0:
|
|
18717
18722
|
cornerRadius = [0, 0, 0, 0];
|
|
18718
18723
|
break;
|
|
18719
18724
|
case 1:
|
|
18720
|
-
|
|
18725
|
+
cr0 = abs(cornerRadiusArr[0]), cornerRadius = [cr0, cr0, cr0, cr0];
|
|
18721
18726
|
break;
|
|
18722
18727
|
case 2:
|
|
18723
18728
|
case 3:
|
|
18724
|
-
|
|
18729
|
+
cr0 = abs(cornerRadiusArr[0]), cr1 = abs(cornerRadiusArr[1]), cornerRadius = [cr0, cr1, cr0, cr1];
|
|
18725
18730
|
break;
|
|
18726
18731
|
default:
|
|
18727
|
-
cornerRadius = cornerRadiusArr
|
|
18732
|
+
cornerRadius = cornerRadiusArr, cornerRadius[0] = abs(cornerRadius[0]), cornerRadius[1] = abs(cornerRadius[1]), cornerRadius[2] = abs(cornerRadius[2]), cornerRadius[3] = abs(cornerRadius[3]);
|
|
18728
18733
|
}
|
|
18729
18734
|
} else cornerRadius = [0, 0, 0, 0];
|
|
18730
|
-
if (width < 0 ||
|
|
18735
|
+
if (width < 0 || cornerRadius[0] + cornerRadius[1] + cornerRadius[2] + cornerRadius[3] < 1e-12) return path.rect(x, y, width, height);
|
|
18731
18736
|
var leftTop = [x, y],
|
|
18732
18737
|
rightTop = [x + width, y],
|
|
18733
18738
|
rightBottom = [x + width, y + height],
|
|
@@ -20886,11 +20891,8 @@
|
|
|
20886
20891
|
context.highPerformanceSave();
|
|
20887
20892
|
var g = graphic.shadowRoot,
|
|
20888
20893
|
currentGroupMatrix = matrixAllocate.allocateByObj(parentMatrix),
|
|
20889
|
-
newPoint = new Point(point.x, point.y)
|
|
20890
|
-
|
|
20891
|
-
var transMatrix = graphic.transMatrix;
|
|
20892
|
-
currentGroupMatrix.multiply(transMatrix.a, transMatrix.b, transMatrix.c, transMatrix.d, transMatrix.e, transMatrix.f);
|
|
20893
|
-
var result = pickerService.pickGroup(g, newPoint.clone(), currentGroupMatrix, pickParams);
|
|
20894
|
+
newPoint = new Point(currentGroupMatrix.a * point.x + currentGroupMatrix.c * point.y + currentGroupMatrix.e, currentGroupMatrix.b * point.x + currentGroupMatrix.d * point.y + currentGroupMatrix.f),
|
|
20895
|
+
result = pickerService.pickGroup(g, newPoint, currentGroupMatrix, pickParams);
|
|
20894
20896
|
return context.highPerformanceRestore(), result;
|
|
20895
20897
|
}
|
|
20896
20898
|
}]);
|
|
@@ -25229,10 +25231,10 @@
|
|
|
25229
25231
|
fill = _rect$attribute$fill === void 0 ? rectAttribute.fill : _rect$attribute$fill,
|
|
25230
25232
|
_rect$attribute$strok = _rect$attribute.stroke,
|
|
25231
25233
|
stroke = _rect$attribute$strok === void 0 ? rectAttribute.stroke : _rect$attribute$strok,
|
|
25232
|
-
|
|
25233
|
-
|
|
25234
|
-
|
|
25235
|
-
|
|
25234
|
+
x1 = _rect$attribute.x1,
|
|
25235
|
+
y1 = _rect$attribute.y1,
|
|
25236
|
+
originX = _rect$attribute.x,
|
|
25237
|
+
originY = _rect$attribute.y,
|
|
25236
25238
|
_rect$attribute$opaci = _rect$attribute.opacity,
|
|
25237
25239
|
opacity = _rect$attribute$opaci === void 0 ? rectAttribute.opacity : _rect$attribute$opaci,
|
|
25238
25240
|
_rect$attribute$fillO = _rect$attribute.fillOpacity,
|
|
@@ -25242,8 +25244,12 @@
|
|
|
25242
25244
|
_rect$attribute$strok2 = _rect$attribute.strokeOpacity,
|
|
25243
25245
|
strokeOpacity = _rect$attribute$strok2 === void 0 ? rectAttribute.strokeOpacity : _rect$attribute$strok2,
|
|
25244
25246
|
_rect$attribute$visib = _rect$attribute.visible,
|
|
25245
|
-
visible = _rect$attribute$visib === void 0 ? rectAttribute.visible : _rect$attribute$visib
|
|
25246
|
-
|
|
25247
|
+
visible = _rect$attribute$visib === void 0 ? rectAttribute.visible : _rect$attribute$visib;
|
|
25248
|
+
var _rect$attribute2 = rect.attribute,
|
|
25249
|
+
width = _rect$attribute2.width,
|
|
25250
|
+
height = _rect$attribute2.height;
|
|
25251
|
+
width = (null != width ? width : x1 - originX) || 0, height = (null != height ? height : y1 - originY) || 0;
|
|
25252
|
+
var z = null !== (_a = this.z) && void 0 !== _a ? _a : 0,
|
|
25247
25253
|
fVisible = rectFillVisible(opacity, fillOpacity, width, height, fill),
|
|
25248
25254
|
sVisible = rectStrokeVisible(opacity, strokeOpacity, width, height),
|
|
25249
25255
|
doFill = runFill(fill),
|
|
@@ -34319,7 +34325,7 @@
|
|
|
34319
34325
|
|
|
34320
34326
|
var roughModule = _roughModule;
|
|
34321
34327
|
|
|
34322
|
-
const version = "0.17.2
|
|
34328
|
+
const version = "0.17.2";
|
|
34323
34329
|
if (isBrowserEnv()) {
|
|
34324
34330
|
loadBrowserEnv(container);
|
|
34325
34331
|
}
|