@visactor/vrender 0.19.2 → 0.19.4-alpha.0
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 +11 -10
- package/cjs/index.js.map +1 -1
- package/dist/index.js +21 -17
- 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,13 +21,14 @@ 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.
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
(0, vrender_kits_2.
|
|
28
|
-
(0, vrender_kits_2.
|
|
29
|
-
(0, vrender_kits_2.
|
|
30
|
-
(0, vrender_kits_2.
|
|
31
|
-
vrender_kits_2.
|
|
32
|
-
(0, vrender_kits_2.
|
|
33
|
-
|
|
24
|
+
exports.version = "0.19.4-alpha.0", (0, vrender_core_1.preLoadAllModule)(), (0,
|
|
25
|
+
vrender_core_1.isBrowserEnv)() ? (0, vrender_kits_1.loadBrowserEnv)(vrender_core_1.container) : (0,
|
|
26
|
+
vrender_core_1.isNodeEnv)() && (0, vrender_kits_1.loadNodeEnv)(vrender_core_1.container),
|
|
27
|
+
(0, vrender_kits_2.registerArc)(), (0, vrender_kits_2.registerArc3d)(), (0, vrender_kits_2.registerArea)(),
|
|
28
|
+
(0, vrender_kits_2.registerCircle)(), (0, vrender_kits_2.registerGlyph)(), (0, vrender_kits_2.registerGroup)(),
|
|
29
|
+
(0, vrender_kits_2.registerImage)(), (0, vrender_kits_2.registerLine)(), (0, vrender_kits_2.registerPath)(),
|
|
30
|
+
(0, vrender_kits_2.registerPolygon)(), (0, vrender_kits_2.registerPyramid3d)(),
|
|
31
|
+
(0, vrender_kits_2.registerRect)(), (0, vrender_kits_2.registerRect3d)(), (0, vrender_kits_2.registerRichtext)(),
|
|
32
|
+
(0, vrender_kits_2.registerShadowRoot)(), (0, vrender_kits_2.registerSymbol)(),
|
|
33
|
+
(0, vrender_kits_2.registerText)(), (0, vrender_kits_2.registerWrapText)(), __exportStar(require("@visactor/vrender-core"), exports),
|
|
34
|
+
__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,gBAAgB,CAAC;AAExC,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.4-alpha.0\";\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
|
@@ -5261,7 +5261,8 @@
|
|
|
5261
5261
|
flexWrap: "wrap",
|
|
5262
5262
|
justifyContent: "flex-start",
|
|
5263
5263
|
alignItems: "flex-start",
|
|
5264
|
-
alignContent: "flex-start"
|
|
5264
|
+
alignContent: "flex-start",
|
|
5265
|
+
baseOpacity: 1
|
|
5265
5266
|
});
|
|
5266
5267
|
var DefaultGlyphAttribute = Object.assign(Object.assign({}, DefaultAttribute), {
|
|
5267
5268
|
path: "",
|
|
@@ -22567,8 +22568,11 @@
|
|
|
22567
22568
|
value: function draw(group, renderService, drawContext, params) {
|
|
22568
22569
|
var context = drawContext.context;
|
|
22569
22570
|
if (!context) return;
|
|
22570
|
-
var
|
|
22571
|
-
|
|
22571
|
+
var _group$attribute2 = group.attribute,
|
|
22572
|
+
clip = _group$attribute2.clip,
|
|
22573
|
+
_group$attribute2$bas = _group$attribute2.baseOpacity,
|
|
22574
|
+
baseOpacity = _group$attribute2$bas === void 0 ? 1 : _group$attribute2$bas;
|
|
22575
|
+
clip ? context.save() : context.highPerformanceSave(), context.baseGlobalAlpha *= baseOpacity;
|
|
22572
22576
|
var groupAttribute = getTheme(group, null == params ? void 0 : params.theme).group,
|
|
22573
22577
|
lastModelMatrix = context.modelMatrix;
|
|
22574
22578
|
if (context.camera) {
|
|
@@ -22581,13 +22585,13 @@
|
|
|
22581
22585
|
}, function () {
|
|
22582
22586
|
return !1;
|
|
22583
22587
|
}) : this.drawShape(group, context, 0, 0, drawContext);
|
|
22584
|
-
var _group$
|
|
22585
|
-
_group$
|
|
22586
|
-
scrollX = _group$
|
|
22587
|
-
_group$
|
|
22588
|
-
scrollY = _group$
|
|
22588
|
+
var _group$attribute3 = group.attribute,
|
|
22589
|
+
_group$attribute3$scr = _group$attribute3.scrollX,
|
|
22590
|
+
scrollX = _group$attribute3$scr === void 0 ? groupAttribute.scrollX : _group$attribute3$scr,
|
|
22591
|
+
_group$attribute3$scr2 = _group$attribute3.scrollY,
|
|
22592
|
+
scrollY = _group$attribute3$scr2 === void 0 ? groupAttribute.scrollY : _group$attribute3$scr2;
|
|
22589
22593
|
var p;
|
|
22590
|
-
(scrollX || scrollY) && context.translate(scrollX, scrollY), params && params.drawingCb && (p = params.drawingCb()), context.modelMatrix !== lastModelMatrix && mat4Allocate.free(context.modelMatrix), context.modelMatrix = lastModelMatrix, p && p.then ? p.then(function () {
|
|
22594
|
+
(scrollX || scrollY) && context.translate(scrollX, scrollY), params && params.drawingCb && (p = params.drawingCb()), context.modelMatrix !== lastModelMatrix && mat4Allocate.free(context.modelMatrix), context.modelMatrix = lastModelMatrix, context.baseGlobalAlpha /= baseOpacity, p && p.then ? p.then(function () {
|
|
22591
22595
|
clip ? context.restore() : context.highPerformanceRestore();
|
|
22592
22596
|
}) : clip ? context.restore() : context.highPerformanceRestore();
|
|
22593
22597
|
}
|
|
@@ -29714,7 +29718,7 @@
|
|
|
29714
29718
|
}), this._clearShadowStyle = !1, this._clearFilterStyle = !1, this._clearGlobalCompositeOperationStyle = !1;
|
|
29715
29719
|
var context = canvas.nativeCanvas.getContext("2d");
|
|
29716
29720
|
if (!context) throw new Error("发生错误,获取2d上下文失败");
|
|
29717
|
-
this.nativeContext = context, this.canvas = canvas, this.matrix = new Matrix(1, 0, 0, 1, 0, 0), this.stack = [], this.dpr = dpr, this.applyedMatrix = new Matrix(1, 0, 0, 1, 0, 0), this._clearMatrix = new Matrix(1, 0, 0, 1, 0, 0);
|
|
29721
|
+
this.nativeContext = context, this.canvas = canvas, this.matrix = new Matrix(1, 0, 0, 1, 0, 0), this.stack = [], this.dpr = dpr, this.applyedMatrix = new Matrix(1, 0, 0, 1, 0, 0), this._clearMatrix = new Matrix(1, 0, 0, 1, 0, 0), this.baseGlobalAlpha = 1;
|
|
29718
29722
|
}
|
|
29719
29723
|
return _createClass(BrowserContext2d, [{
|
|
29720
29724
|
key: "fillStyle",
|
|
@@ -29738,7 +29742,7 @@
|
|
|
29738
29742
|
return this.nativeContext.globalAlpha;
|
|
29739
29743
|
},
|
|
29740
29744
|
set: function set(d) {
|
|
29741
|
-
this.nativeContext.globalAlpha = d;
|
|
29745
|
+
this.nativeContext.globalAlpha = d * this.baseGlobalAlpha;
|
|
29742
29746
|
}
|
|
29743
29747
|
}, {
|
|
29744
29748
|
key: "lineCap",
|
|
@@ -30244,7 +30248,7 @@
|
|
|
30244
30248
|
opacity = _attribute$opacity === void 0 ? defaultParams.opacity : _attribute$opacity,
|
|
30245
30249
|
_attribute$fill = attribute.fill,
|
|
30246
30250
|
fill = _attribute$fill === void 0 ? defaultParams.fill : _attribute$fill;
|
|
30247
|
-
fillOpacity > 1e-12 && opacity > 1e-12 ? (_context.globalAlpha = fillOpacity * opacity, _context.fillStyle = createColor(this, fill, params, offsetX, offsetY)) : _context.globalAlpha = fillOpacity * opacity;
|
|
30251
|
+
fillOpacity > 1e-12 && opacity > 1e-12 ? (_context.globalAlpha = fillOpacity * opacity * this.baseGlobalAlpha, _context.fillStyle = createColor(this, fill, params, offsetX, offsetY)) : _context.globalAlpha = fillOpacity * opacity * this.baseGlobalAlpha;
|
|
30248
30252
|
}
|
|
30249
30253
|
}, {
|
|
30250
30254
|
key: "setShadowBlendStyle",
|
|
@@ -30313,7 +30317,7 @@
|
|
|
30313
30317
|
lineCap = _attribute$lineCap === void 0 ? defaultParams.lineCap : _attribute$lineCap,
|
|
30314
30318
|
_attribute$miterLimit = attribute.miterLimit,
|
|
30315
30319
|
miterLimit = _attribute$miterLimit === void 0 ? defaultParams.miterLimit : _attribute$miterLimit;
|
|
30316
|
-
_context.globalAlpha = strokeOpacity * opacity, _context.lineWidth = getScaledStroke(this, lineWidth, this.dpr), _context.strokeStyle = createColor(this, stroke, params, offsetX, offsetY), _context.lineJoin = lineJoin, lineDash && _context.setLineDash(lineDash), _context.lineCap = lineCap, _context.miterLimit = miterLimit;
|
|
30320
|
+
_context.globalAlpha = strokeOpacity * opacity * this.baseGlobalAlpha, _context.lineWidth = getScaledStroke(this, lineWidth, this.dpr), _context.strokeStyle = createColor(this, stroke, params, offsetX, offsetY), _context.lineJoin = lineJoin, lineDash && _context.setLineDash(lineDash), _context.lineCap = lineCap, _context.miterLimit = miterLimit;
|
|
30317
30321
|
}
|
|
30318
30322
|
}
|
|
30319
30323
|
}, {
|
|
@@ -31130,7 +31134,7 @@
|
|
|
31130
31134
|
return this._globalAlpha;
|
|
31131
31135
|
},
|
|
31132
31136
|
set: function set(ga) {
|
|
31133
|
-
this.nativeContext.globalAlpha = ga, this._globalAlpha = ga;
|
|
31137
|
+
this.nativeContext.globalAlpha = ga * this.baseGlobalAlpha, this._globalAlpha = ga * this.baseGlobalAlpha;
|
|
31134
31138
|
}
|
|
31135
31139
|
}, {
|
|
31136
31140
|
key: "getImageData",
|
|
@@ -31741,7 +31745,7 @@
|
|
|
31741
31745
|
return this._globalAlpha;
|
|
31742
31746
|
},
|
|
31743
31747
|
set: function set(ga) {
|
|
31744
|
-
this.nativeContext.globalAlpha = ga, this._globalAlpha = ga;
|
|
31748
|
+
this.nativeContext.globalAlpha = ga * this.baseGlobalAlpha, this._globalAlpha = ga * this.baseGlobalAlpha;
|
|
31745
31749
|
}
|
|
31746
31750
|
}, {
|
|
31747
31751
|
key: "setLineDash",
|
|
@@ -31776,7 +31780,7 @@
|
|
|
31776
31780
|
lineCap = _attribute$lineCap === void 0 ? defaultParams.lineCap : _attribute$lineCap,
|
|
31777
31781
|
_attribute$miterLimit = attribute.miterLimit,
|
|
31778
31782
|
miterLimit = _attribute$miterLimit === void 0 ? defaultParams.miterLimit : _attribute$miterLimit;
|
|
31779
|
-
_context.globalAlpha = strokeOpacity * opacity, _context.lineWidth = getScaledStroke(this, lineWidth, this.dpr), _context.strokeStyle = createColor(this, stroke, params, offsetX, offsetY), _context.lineJoin = lineJoin, 0 === lineDash[0] && 0 === lineDash[1] || lineDash && _context.setLineDash(lineDash), _context.lineCap = lineCap, _context.miterLimit = miterLimit;
|
|
31783
|
+
_context.globalAlpha = strokeOpacity * opacity * this.baseGlobalAlpha, _context.lineWidth = getScaledStroke(this, lineWidth, this.dpr), _context.strokeStyle = createColor(this, stroke, params, offsetX, offsetY), _context.lineJoin = lineJoin, 0 === lineDash[0] && 0 === lineDash[1] || lineDash && _context.setLineDash(lineDash), _context.lineCap = lineCap, _context.miterLimit = miterLimit;
|
|
31780
31784
|
}
|
|
31781
31785
|
}
|
|
31782
31786
|
}, {
|
|
@@ -35632,7 +35636,7 @@
|
|
|
35632
35636
|
|
|
35633
35637
|
var roughModule = _roughModule;
|
|
35634
35638
|
|
|
35635
|
-
const version = "0.19.
|
|
35639
|
+
const version = "0.19.4-alpha.0";
|
|
35636
35640
|
preLoadAllModule();
|
|
35637
35641
|
if (isBrowserEnv()) {
|
|
35638
35642
|
loadBrowserEnv(container);
|