@visactor/vrender 0.19.7-alpha.0 → 0.19.7-alpha.1
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 +26 -52
- package/dist/index.js +26 -52
- 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.7-alpha.
|
|
24
|
+
exports.version = "0.19.7-alpha.1", (0, vrender_core_1.preLoadAllModule)(), (0,
|
|
25
25
|
vrender_core_1.isBrowserEnv)() ? (0, vrender_kits_1.loadBrowserEnv)(vrender_core_1.container) : (0,
|
|
26
26
|
vrender_core_1.isNodeEnv)() && (0, vrender_kits_1.loadNodeEnv)(vrender_core_1.container),
|
|
27
27
|
(0, vrender_kits_2.registerArc)(), (0, vrender_kits_2.registerArc3d)(), (0, vrender_kits_2.registerArea)(),
|
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,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.7-alpha.
|
|
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.7-alpha.1\";\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
|
@@ -7218,22 +7218,18 @@ class StreamLight extends ACustomAnimate {
|
|
|
7218
7218
|
this[type] = line, line.pathProxy = new CustomPath2D(), root.add(line);
|
|
7219
7219
|
}
|
|
7220
7220
|
onStartRect() {
|
|
7221
|
-
var _a
|
|
7221
|
+
var _a;
|
|
7222
7222
|
const root = this.target.attachShadow(),
|
|
7223
|
-
|
|
7224
|
-
sizeAttr = isHorizontal ? "height" : "width",
|
|
7225
|
-
otherSizeAttr = isHorizontal ? "width" : "height",
|
|
7226
|
-
size = this.target.AABBBounds[sizeAttr](),
|
|
7227
|
-
y = isHorizontal ? 0 : this.target.AABBBounds.y1,
|
|
7223
|
+
height = this.target.AABBBounds.height(),
|
|
7228
7224
|
rect = application.graphicService.creator.rect(Object.assign(Object.assign({
|
|
7229
|
-
|
|
7225
|
+
height: height,
|
|
7230
7226
|
fill: "#bcdeff",
|
|
7231
7227
|
shadowBlur: 30,
|
|
7232
7228
|
shadowColor: "#bcdeff"
|
|
7233
|
-
}, null === (
|
|
7229
|
+
}, null === (_a = this.params) || void 0 === _a ? void 0 : _a.attribute), {
|
|
7234
7230
|
x: 0,
|
|
7235
|
-
y:
|
|
7236
|
-
|
|
7231
|
+
y: 0,
|
|
7232
|
+
width: 0
|
|
7237
7233
|
}));
|
|
7238
7234
|
this.rect = rect, root.add(rect);
|
|
7239
7235
|
}
|
|
@@ -7245,47 +7241,25 @@ class StreamLight extends ACustomAnimate {
|
|
|
7245
7241
|
return this.rect ? this.onUpdateRect(end, ratio, out) : this.line || this.area ? this.onUpdateLineOrArea(end, ratio, out) : void 0;
|
|
7246
7242
|
}
|
|
7247
7243
|
onUpdateRect(end, ratio, out) {
|
|
7248
|
-
var _a, _b, _c, _d, _e, _f
|
|
7249
|
-
const
|
|
7250
|
-
|
|
7251
|
-
|
|
7252
|
-
|
|
7253
|
-
|
|
7254
|
-
|
|
7255
|
-
|
|
7256
|
-
|
|
7257
|
-
|
|
7258
|
-
|
|
7259
|
-
|
|
7260
|
-
|
|
7261
|
-
|
|
7262
|
-
|
|
7263
|
-
|
|
7264
|
-
|
|
7265
|
-
|
|
7266
|
-
|
|
7267
|
-
end: end
|
|
7268
|
-
}
|
|
7269
|
-
});
|
|
7270
|
-
} else {
|
|
7271
|
-
const parentHeight = null !== (_l = null !== (_k = parentAttr.height) && void 0 !== _k ? _k : parentAttr.y1 - parentAttr.y) && void 0 !== _l ? _l : 250,
|
|
7272
|
-
streamLength = null !== (_o = null === (_m = this.params) || void 0 === _m ? void 0 : _m.streamLength) && void 0 !== _o ? _o : parentHeight,
|
|
7273
|
-
maxLength = null !== (_r = null === (_q = null === (_p = this.params) || void 0 === _p ? void 0 : _p.attribute) || void 0 === _q ? void 0 : _q.height) && void 0 !== _r ? _r : 60,
|
|
7274
|
-
currentY = parentHeight - (streamLength + maxLength) * ratio;
|
|
7275
|
-
let y = Math.min(currentY, parentHeight);
|
|
7276
|
-
const h = Math.min(parentHeight - currentY, maxLength);
|
|
7277
|
-
let height;
|
|
7278
|
-
y <= 0 ? (height = Math.max(y + h, 0), y = 0) : height = h, this.rect.setAttributes({
|
|
7279
|
-
y: y,
|
|
7280
|
-
height: height
|
|
7281
|
-
}, !1, {
|
|
7282
|
-
type: AttributeUpdateType.ANIMATE_PLAY,
|
|
7283
|
-
animationState: {
|
|
7284
|
-
ratio: ratio,
|
|
7285
|
-
end: end
|
|
7286
|
-
}
|
|
7287
|
-
});
|
|
7288
|
-
}
|
|
7244
|
+
var _a, _b, _c, _d, _e, _f;
|
|
7245
|
+
const parentWidth = null !== (_a = this.target.attribute.width) && void 0 !== _a ? _a : 250,
|
|
7246
|
+
streamLength = null !== (_c = null === (_b = this.params) || void 0 === _b ? void 0 : _b.streamLength) && void 0 !== _c ? _c : parentWidth,
|
|
7247
|
+
maxLength = null !== (_f = null === (_e = null === (_d = this.params) || void 0 === _d ? void 0 : _d.attribute) || void 0 === _e ? void 0 : _e.width) && void 0 !== _f ? _f : 60,
|
|
7248
|
+
startX = -maxLength,
|
|
7249
|
+
currentX = startX + (streamLength - startX) * ratio,
|
|
7250
|
+
x = Math.max(currentX, 0),
|
|
7251
|
+
w = Math.min(Math.min(currentX + maxLength, maxLength), streamLength - currentX),
|
|
7252
|
+
width = w + x > parentWidth ? Math.max(parentWidth - x, 0) : w;
|
|
7253
|
+
this.rect.setAttributes({
|
|
7254
|
+
x: x,
|
|
7255
|
+
width: width
|
|
7256
|
+
}, !1, {
|
|
7257
|
+
type: AttributeUpdateType.ANIMATE_PLAY,
|
|
7258
|
+
animationState: {
|
|
7259
|
+
ratio: ratio,
|
|
7260
|
+
end: end
|
|
7261
|
+
}
|
|
7262
|
+
});
|
|
7289
7263
|
}
|
|
7290
7264
|
onUpdateLineOrArea(end, ratio, out) {
|
|
7291
7265
|
const target = this.line || this.area;
|
|
@@ -28564,7 +28538,7 @@ const registerWrapText = _registerWrapText;
|
|
|
28564
28538
|
|
|
28565
28539
|
const roughModule = _roughModule;
|
|
28566
28540
|
|
|
28567
|
-
const version = "0.19.7-alpha.
|
|
28541
|
+
const version = "0.19.7-alpha.1";
|
|
28568
28542
|
preLoadAllModule();
|
|
28569
28543
|
if (isBrowserEnv()) {
|
|
28570
28544
|
loadBrowserEnv(container);
|
package/dist/index.js
CHANGED
|
@@ -7224,22 +7224,18 @@
|
|
|
7224
7224
|
this[type] = line, line.pathProxy = new CustomPath2D(), root.add(line);
|
|
7225
7225
|
}
|
|
7226
7226
|
onStartRect() {
|
|
7227
|
-
var _a
|
|
7227
|
+
var _a;
|
|
7228
7228
|
const root = this.target.attachShadow(),
|
|
7229
|
-
|
|
7230
|
-
sizeAttr = isHorizontal ? "height" : "width",
|
|
7231
|
-
otherSizeAttr = isHorizontal ? "width" : "height",
|
|
7232
|
-
size = this.target.AABBBounds[sizeAttr](),
|
|
7233
|
-
y = isHorizontal ? 0 : this.target.AABBBounds.y1,
|
|
7229
|
+
height = this.target.AABBBounds.height(),
|
|
7234
7230
|
rect = application.graphicService.creator.rect(Object.assign(Object.assign({
|
|
7235
|
-
|
|
7231
|
+
height: height,
|
|
7236
7232
|
fill: "#bcdeff",
|
|
7237
7233
|
shadowBlur: 30,
|
|
7238
7234
|
shadowColor: "#bcdeff"
|
|
7239
|
-
}, null === (
|
|
7235
|
+
}, null === (_a = this.params) || void 0 === _a ? void 0 : _a.attribute), {
|
|
7240
7236
|
x: 0,
|
|
7241
|
-
y:
|
|
7242
|
-
|
|
7237
|
+
y: 0,
|
|
7238
|
+
width: 0
|
|
7243
7239
|
}));
|
|
7244
7240
|
this.rect = rect, root.add(rect);
|
|
7245
7241
|
}
|
|
@@ -7251,47 +7247,25 @@
|
|
|
7251
7247
|
return this.rect ? this.onUpdateRect(end, ratio, out) : this.line || this.area ? this.onUpdateLineOrArea(end, ratio, out) : void 0;
|
|
7252
7248
|
}
|
|
7253
7249
|
onUpdateRect(end, ratio, out) {
|
|
7254
|
-
var _a, _b, _c, _d, _e, _f
|
|
7255
|
-
const
|
|
7256
|
-
|
|
7257
|
-
|
|
7258
|
-
|
|
7259
|
-
|
|
7260
|
-
|
|
7261
|
-
|
|
7262
|
-
|
|
7263
|
-
|
|
7264
|
-
|
|
7265
|
-
|
|
7266
|
-
|
|
7267
|
-
|
|
7268
|
-
|
|
7269
|
-
|
|
7270
|
-
|
|
7271
|
-
|
|
7272
|
-
|
|
7273
|
-
end: end
|
|
7274
|
-
}
|
|
7275
|
-
});
|
|
7276
|
-
} else {
|
|
7277
|
-
const parentHeight = null !== (_l = null !== (_k = parentAttr.height) && void 0 !== _k ? _k : parentAttr.y1 - parentAttr.y) && void 0 !== _l ? _l : 250,
|
|
7278
|
-
streamLength = null !== (_o = null === (_m = this.params) || void 0 === _m ? void 0 : _m.streamLength) && void 0 !== _o ? _o : parentHeight,
|
|
7279
|
-
maxLength = null !== (_r = null === (_q = null === (_p = this.params) || void 0 === _p ? void 0 : _p.attribute) || void 0 === _q ? void 0 : _q.height) && void 0 !== _r ? _r : 60,
|
|
7280
|
-
currentY = parentHeight - (streamLength + maxLength) * ratio;
|
|
7281
|
-
let y = Math.min(currentY, parentHeight);
|
|
7282
|
-
const h = Math.min(parentHeight - currentY, maxLength);
|
|
7283
|
-
let height;
|
|
7284
|
-
y <= 0 ? (height = Math.max(y + h, 0), y = 0) : height = h, this.rect.setAttributes({
|
|
7285
|
-
y: y,
|
|
7286
|
-
height: height
|
|
7287
|
-
}, !1, {
|
|
7288
|
-
type: exports.AttributeUpdateType.ANIMATE_PLAY,
|
|
7289
|
-
animationState: {
|
|
7290
|
-
ratio: ratio,
|
|
7291
|
-
end: end
|
|
7292
|
-
}
|
|
7293
|
-
});
|
|
7294
|
-
}
|
|
7250
|
+
var _a, _b, _c, _d, _e, _f;
|
|
7251
|
+
const parentWidth = null !== (_a = this.target.attribute.width) && void 0 !== _a ? _a : 250,
|
|
7252
|
+
streamLength = null !== (_c = null === (_b = this.params) || void 0 === _b ? void 0 : _b.streamLength) && void 0 !== _c ? _c : parentWidth,
|
|
7253
|
+
maxLength = null !== (_f = null === (_e = null === (_d = this.params) || void 0 === _d ? void 0 : _d.attribute) || void 0 === _e ? void 0 : _e.width) && void 0 !== _f ? _f : 60,
|
|
7254
|
+
startX = -maxLength,
|
|
7255
|
+
currentX = startX + (streamLength - startX) * ratio,
|
|
7256
|
+
x = Math.max(currentX, 0),
|
|
7257
|
+
w = Math.min(Math.min(currentX + maxLength, maxLength), streamLength - currentX),
|
|
7258
|
+
width = w + x > parentWidth ? Math.max(parentWidth - x, 0) : w;
|
|
7259
|
+
this.rect.setAttributes({
|
|
7260
|
+
x: x,
|
|
7261
|
+
width: width
|
|
7262
|
+
}, !1, {
|
|
7263
|
+
type: exports.AttributeUpdateType.ANIMATE_PLAY,
|
|
7264
|
+
animationState: {
|
|
7265
|
+
ratio: ratio,
|
|
7266
|
+
end: end
|
|
7267
|
+
}
|
|
7268
|
+
});
|
|
7295
7269
|
}
|
|
7296
7270
|
onUpdateLineOrArea(end, ratio, out) {
|
|
7297
7271
|
const target = this.line || this.area;
|
|
@@ -28570,7 +28544,7 @@
|
|
|
28570
28544
|
|
|
28571
28545
|
const roughModule = _roughModule;
|
|
28572
28546
|
|
|
28573
|
-
const version = "0.19.7-alpha.
|
|
28547
|
+
const version = "0.19.7-alpha.1";
|
|
28574
28548
|
preLoadAllModule();
|
|
28575
28549
|
if (isBrowserEnv()) {
|
|
28576
28550
|
loadBrowserEnv(container);
|