@visactor/vrender 1.0.0-alpha.11 → 1.0.0-alpha.13
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 +21 -26
- package/dist/index.js +21 -26
- 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 = "1.0.0-alpha.
|
|
24
|
+
exports.version = "1.0.0-alpha.13", (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,yDAWgC;AAChC,yDAAmF;AACnF,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,IAAA,2BAAY,GAAE,CAAC;AAEf,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;AACvC,4DAA0C","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, registerStar } 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 = \"1.0.0-alpha.
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kCAAgC;AAChC,yDAWgC;AAChC,yDAAmF;AACnF,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,IAAA,2BAAY,GAAE,CAAC;AAEf,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;AACvC,4DAA0C","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, registerStar } 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 = \"1.0.0-alpha.13\";\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();\nregisterStar();\n\nregisterFlexLayoutPlugin();\nregisterViewTransform3dPlugin();\nregisterHtmlAttributePlugin();\nregisterReactAttributePlugin();\nregisterDirectionalLight();\nregisterOrthoCamera();\nexport * from '@visactor/vrender-core';\nexport * from '@visactor/vrender-kits';\nexport * from '@visactor/vrender-animate';\n"]}
|
package/dist/index.es.js
CHANGED
|
@@ -9128,6 +9128,10 @@ class Graphic extends Node {
|
|
|
9128
9128
|
var _a;
|
|
9129
9129
|
super(), this._AABBBounds = new AABBBounds(), this._updateTag = UpdateTag.INIT, this.attribute = params, this.valid = this.isValid(), this.updateAABBBoundsStamp = 0, params.background ? this.loadImage(null !== (_a = params.background.background) && void 0 !== _a ? _a : params.background, !0) : params.shadowGraphic && this.setShadowGraphic(params.shadowGraphic);
|
|
9130
9130
|
}
|
|
9131
|
+
getGraphicService() {
|
|
9132
|
+
var _a, _b;
|
|
9133
|
+
return null !== (_b = null === (_a = this.stage) || void 0 === _a ? void 0 : _a.graphicService) && void 0 !== _b ? _b : application.graphicService;
|
|
9134
|
+
}
|
|
9131
9135
|
getAttributes() {
|
|
9132
9136
|
return this.attribute;
|
|
9133
9137
|
}
|
|
@@ -9157,13 +9161,12 @@ class Graphic extends Node {
|
|
|
9157
9161
|
this._emitCustomEvent("animate-bind", animate);
|
|
9158
9162
|
}
|
|
9159
9163
|
tryUpdateAABBBounds() {
|
|
9160
|
-
var _a, _b;
|
|
9161
9164
|
const full = "imprecise" === this.attribute.boundsMode;
|
|
9162
9165
|
if (!this.shouldUpdateAABBBounds()) return this._AABBBounds;
|
|
9163
9166
|
if (!this.valid) return this._AABBBounds.clear(), this._AABBBounds;
|
|
9164
|
-
|
|
9167
|
+
this.getGraphicService().beforeUpdateAABBBounds(this, this.stage, !0, this._AABBBounds);
|
|
9165
9168
|
const bounds = this.doUpdateAABBBounds(full);
|
|
9166
|
-
return
|
|
9169
|
+
return this.getGraphicService().afterUpdateAABBBounds(this, this.stage, this._AABBBounds, this, !0), "empty" === this.attribute.boundsMode && bounds.clear(), bounds;
|
|
9167
9170
|
}
|
|
9168
9171
|
tryUpdateOBBBounds() {
|
|
9169
9172
|
if (this._OBBBounds || (this._OBBBounds = new OBBBounds()), this.tryUpdateAABBBounds(), this.updateOBBBoundsStamp === this.updateAABBBoundsStamp) return this._OBBBounds;
|
|
@@ -9270,7 +9273,7 @@ class Graphic extends Node {
|
|
|
9270
9273
|
return this._transMatrix || (this._transMatrix = new Matrix()), this.shouldUpdateLocalMatrix() && (this.doUpdateLocalMatrix(), clearTag && this.clearUpdateLocalPositionTag()), this._transMatrix;
|
|
9271
9274
|
}
|
|
9272
9275
|
shouldUpdateAABBBounds() {
|
|
9273
|
-
return this.shadowRoot ? (!!(this._updateTag & UpdateTag.UPDATE_BOUNDS) || this.shadowRoot.shouldUpdateAABBBounds()) &&
|
|
9276
|
+
return this.shadowRoot ? (!!(this._updateTag & UpdateTag.UPDATE_BOUNDS) || this.shadowRoot.shouldUpdateAABBBounds()) && this.getGraphicService().validCheck(this.attribute, this.getGraphicTheme(), this._AABBBounds, this) : !!(this._updateTag & UpdateTag.UPDATE_BOUNDS) && this.getGraphicService().validCheck(this.attribute, this.getGraphicTheme(), this._AABBBounds, this);
|
|
9274
9277
|
}
|
|
9275
9278
|
shouldSelfChangeUpdateAABBBounds() {
|
|
9276
9279
|
return this.shadowRoot ? !!(this._updateTag & UpdateTag.UPDATE_BOUNDS) || this.shadowRoot.shouldUpdateAABBBounds() : !!(this._updateTag & UpdateTag.UPDATE_BOUNDS);
|
|
@@ -9451,8 +9454,7 @@ class Graphic extends Node {
|
|
|
9451
9454
|
return this;
|
|
9452
9455
|
}
|
|
9453
9456
|
onAttributeUpdate(context) {
|
|
9454
|
-
|
|
9455
|
-
context && context.skipUpdateCallback || (null === (_a = this.stage) || void 0 === _a || _a.graphicService.onAttributeUpdate(this), this._emitCustomEvent("afterAttributeUpdate", context));
|
|
9457
|
+
context && context.skipUpdateCallback || (this.getGraphicService().onAttributeUpdate(this), this._emitCustomEvent("afterAttributeUpdate", context));
|
|
9456
9458
|
}
|
|
9457
9459
|
update(d) {
|
|
9458
9460
|
d ? (d.bounds && this.tryUpdateAABBBounds(), d.trans && this.tryUpdateLocalTransMatrix()) : (this.tryUpdateAABBBounds(), this.tryUpdateLocalTransMatrix());
|
|
@@ -9642,7 +9644,6 @@ class Graphic extends Node {
|
|
|
9642
9644
|
}
|
|
9643
9645
|
}
|
|
9644
9646
|
setStage(stage, layer) {
|
|
9645
|
-
var _a;
|
|
9646
9647
|
if (this.stage !== stage) {
|
|
9647
9648
|
if (this.stage = stage, this.layer = layer, this.setStageToShadowRoot(stage, layer), this.animates && this.animates.size) {
|
|
9648
9649
|
const timeline = stage.getTimeline();
|
|
@@ -9650,7 +9651,7 @@ class Graphic extends Node {
|
|
|
9650
9651
|
a.timeline.isGlobal && (a.setTimeline(timeline), timeline.addAnimate(a));
|
|
9651
9652
|
});
|
|
9652
9653
|
}
|
|
9653
|
-
this._onSetStage && this._onSetStage(this, stage, layer),
|
|
9654
|
+
this._onSetStage && this._onSetStage(this, stage, layer), this.getGraphicService().onSetStage(this, stage);
|
|
9654
9655
|
}
|
|
9655
9656
|
}
|
|
9656
9657
|
setStageToShadowRoot(stage, layer) {
|
|
@@ -9798,12 +9799,11 @@ class Group extends Graphic {
|
|
|
9798
9799
|
return !!super.shouldUpdateAABBBounds() || !!(this._childUpdateTag & UpdateTag.UPDATE_BOUNDS);
|
|
9799
9800
|
}
|
|
9800
9801
|
tryUpdateAABBBounds() {
|
|
9801
|
-
var _a, _b;
|
|
9802
9802
|
if (!this.shouldUpdateAABBBounds()) return this._AABBBounds;
|
|
9803
|
-
|
|
9803
|
+
this.getGraphicService().beforeUpdateAABBBounds(this, this.stage, !0, this._AABBBounds);
|
|
9804
9804
|
const selfChange = this.shouldSelfChangeUpdateAABBBounds(),
|
|
9805
9805
|
bounds = this.doUpdateAABBBounds();
|
|
9806
|
-
return this.addUpdateLayoutTag(),
|
|
9806
|
+
return this.addUpdateLayoutTag(), this.getGraphicService().afterUpdateAABBBounds(this, this.stage, this._AABBBounds, this, selfChange), "empty" === this.attribute.boundsMode && bounds.clear(), bounds;
|
|
9807
9807
|
}
|
|
9808
9808
|
doUpdateLocalMatrix() {
|
|
9809
9809
|
const {
|
|
@@ -9863,13 +9863,11 @@ class Group extends Graphic {
|
|
|
9863
9863
|
return this.theme.getTheme(this);
|
|
9864
9864
|
}
|
|
9865
9865
|
incrementalAppendChild(node) {
|
|
9866
|
-
var _a;
|
|
9867
9866
|
const data = super.appendChild(node);
|
|
9868
|
-
return this.stage && data && (data.stage = this.stage, data.layer = this.layer), this.addUpdateBoundTag(),
|
|
9867
|
+
return this.stage && data && (data.stage = this.stage, data.layer = this.layer), this.addUpdateBoundTag(), this.getGraphicService().onAddIncremental(node, this, this.stage), data;
|
|
9869
9868
|
}
|
|
9870
9869
|
incrementalClearChild() {
|
|
9871
|
-
|
|
9872
|
-
super.removeAllChild(), this.addUpdateBoundTag(), null === (_a = this.stage) || void 0 === _a || _a.graphicService.onClearIncremental(this, this.stage);
|
|
9870
|
+
super.removeAllChild(), this.addUpdateBoundTag(), this.getGraphicService().onClearIncremental(this, this.stage);
|
|
9873
9871
|
}
|
|
9874
9872
|
_updateChildToStage(child) {
|
|
9875
9873
|
return this.stage && child && child.setStage(this.stage, this.layer), this.addUpdateBoundTag(), child;
|
|
@@ -9889,20 +9887,17 @@ class Group extends Graphic {
|
|
|
9889
9887
|
return this._updateChildToStage(super.insertInto(newNode, idx));
|
|
9890
9888
|
}
|
|
9891
9889
|
removeChild(child) {
|
|
9892
|
-
var _a;
|
|
9893
9890
|
const data = super.removeChild(child);
|
|
9894
|
-
return child.stage = null,
|
|
9891
|
+
return child.stage = null, this.getGraphicService().onRemove(child), this.addUpdateBoundTag(), data;
|
|
9895
9892
|
}
|
|
9896
9893
|
removeAllChild() {
|
|
9897
9894
|
let deep = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !1;
|
|
9898
9895
|
this.forEachChildren(child => {
|
|
9899
|
-
|
|
9900
|
-
null === (_a = this.stage) || void 0 === _a || _a.graphicService.onRemove(child), deep && child.isContainer && child.removeAllChild(deep);
|
|
9896
|
+
this.getGraphicService().onRemove(child), deep && child.isContainer && child.removeAllChild(deep);
|
|
9901
9897
|
}), super.removeAllChild(), this.addUpdateBoundTag();
|
|
9902
9898
|
}
|
|
9903
9899
|
setStage(stage, layer) {
|
|
9904
|
-
|
|
9905
|
-
this.stage !== stage && (this.stage = stage, this.layer = layer, this.setStageToShadowRoot(stage, layer), this._onSetStage && this._onSetStage(this, stage, layer), null === (_a = this.stage) || void 0 === _a || _a.graphicService.onSetStage(this, stage), this.forEachChildren(item => {
|
|
9900
|
+
this.stage !== stage && (this.stage = stage, this.layer = layer, this.setStageToShadowRoot(stage, layer), this._onSetStage && this._onSetStage(this, stage, layer), this.getGraphicService().onSetStage(this, stage), this.forEachChildren(item => {
|
|
9906
9901
|
item.setStage(stage, this.layer);
|
|
9907
9902
|
}));
|
|
9908
9903
|
}
|
|
@@ -10576,7 +10571,7 @@ let DefaultGraphicService = class {
|
|
|
10576
10571
|
const {
|
|
10577
10572
|
visible = theme.visible
|
|
10578
10573
|
} = attribute;
|
|
10579
|
-
return !(!graphic.valid || !visible) || (aabbBounds.empty() || (graphic.parent && aabbBounds.transformWithMatrix(graphic.parent.globalTransMatrix),
|
|
10574
|
+
return !(!graphic.valid || !visible) || (aabbBounds.empty() || (graphic.parent && aabbBounds.transformWithMatrix(graphic.parent.globalTransMatrix), this.clearAABBBounds(graphic, graphic.stage, aabbBounds), aabbBounds.clear()), !1);
|
|
10580
10575
|
}
|
|
10581
10576
|
updateTempAABBBounds(aabbBounds) {
|
|
10582
10577
|
const tb1 = this.tempAABBBounds1,
|
|
@@ -30662,12 +30657,12 @@ class WaitStep extends Step {
|
|
|
30662
30657
|
determineInterpolateUpdateFunction() {}
|
|
30663
30658
|
}
|
|
30664
30659
|
|
|
30665
|
-
class DefaultTimeline {
|
|
30660
|
+
class DefaultTimeline extends EventEmitter {
|
|
30666
30661
|
get animateCount() {
|
|
30667
30662
|
return this._animateCount;
|
|
30668
30663
|
}
|
|
30669
30664
|
constructor() {
|
|
30670
|
-
this.head = null, this.tail = null, this.animateMap = new Map(), this._animateCount = 0, this._playSpeed = 1, this._totalDuration = 0, this._startTime = 0, this._currentTime = 0, this.id = Generator.GenAutoIncrementId(), this.paused = !1;
|
|
30665
|
+
super(), this.head = null, this.tail = null, this.animateMap = new Map(), this._animateCount = 0, this._playSpeed = 1, this._totalDuration = 0, this._startTime = 0, this._currentTime = 0, this.id = Generator.GenAutoIncrementId(), this.paused = !1;
|
|
30671
30666
|
}
|
|
30672
30667
|
isRunning() {
|
|
30673
30668
|
return !this.paused && this._animateCount > 0;
|
|
@@ -30699,7 +30694,7 @@ class DefaultTimeline {
|
|
|
30699
30694
|
const scaledDelta = delta * this._playSpeed;
|
|
30700
30695
|
this._currentTime += scaledDelta, this.forEachAccessAnimate((animate, i) => {
|
|
30701
30696
|
animate.status === AnimateStatus.END ? this.removeAnimate(animate, !0) : animate.status !== AnimateStatus.RUNNING && animate.status !== AnimateStatus.INITIAL || animate.advance(scaledDelta);
|
|
30702
|
-
});
|
|
30697
|
+
}), 0 === this._animateCount && this.emit("animationEnd");
|
|
30703
30698
|
}
|
|
30704
30699
|
clear() {
|
|
30705
30700
|
this.forEachAccessAnimate(animate => {
|
|
@@ -35203,7 +35198,7 @@ const registerCustomAnimate = () => {
|
|
|
35203
35198
|
AnimateExecutor.registerBuiltInAnimate("increaseCount", IncreaseCount), AnimateExecutor.registerBuiltInAnimate("fromTo", FromTo), AnimateExecutor.registerBuiltInAnimate("scaleIn", ScaleIn), AnimateExecutor.registerBuiltInAnimate("scaleOut", ScaleOut), AnimateExecutor.registerBuiltInAnimate("growHeightIn", GrowHeightIn), AnimateExecutor.registerBuiltInAnimate("growHeightOut", GrowHeightOut), AnimateExecutor.registerBuiltInAnimate("growWidthIn", GrowWidthIn), AnimateExecutor.registerBuiltInAnimate("growWidthOut", GrowWidthOut), AnimateExecutor.registerBuiltInAnimate("growCenterIn", GrowCenterIn), AnimateExecutor.registerBuiltInAnimate("growCenterOut", GrowCenterOut), AnimateExecutor.registerBuiltInAnimate("clipIn", ClipIn), AnimateExecutor.registerBuiltInAnimate("clipOut", ClipOut), AnimateExecutor.registerBuiltInAnimate("fadeIn", FadeIn), AnimateExecutor.registerBuiltInAnimate("fadeOut", FadeOut), AnimateExecutor.registerBuiltInAnimate("growPointsIn", GrowPointsIn), AnimateExecutor.registerBuiltInAnimate("growPointsOut", GrowPointsOut), AnimateExecutor.registerBuiltInAnimate("growPointsXIn", GrowPointsXIn), AnimateExecutor.registerBuiltInAnimate("growPointsXOut", GrowPointsXOut), AnimateExecutor.registerBuiltInAnimate("growPointsYIn", GrowPointsYIn), AnimateExecutor.registerBuiltInAnimate("growPointsYOut", GrowPointsYOut), AnimateExecutor.registerBuiltInAnimate("growAngleIn", GrowAngleIn), AnimateExecutor.registerBuiltInAnimate("growAngleOut", GrowAngleOut), AnimateExecutor.registerBuiltInAnimate("growRadiusIn", GrowRadiusIn), AnimateExecutor.registerBuiltInAnimate("growRadiusOut", GrowRadiusOut), AnimateExecutor.registerBuiltInAnimate("moveIn", MoveIn), AnimateExecutor.registerBuiltInAnimate("moveOut", MoveOut), AnimateExecutor.registerBuiltInAnimate("rotateIn", RotateIn), AnimateExecutor.registerBuiltInAnimate("rotateOut", RotateOut), AnimateExecutor.registerBuiltInAnimate("update", Update), AnimateExecutor.registerBuiltInAnimate("state", State), AnimateExecutor.registerBuiltInAnimate("labelItemAppear", LabelItemAppear), AnimateExecutor.registerBuiltInAnimate("labelItemDisappear", LabelItemDisappear), AnimateExecutor.registerBuiltInAnimate("poptipAppear", PoptipAppear), AnimateExecutor.registerBuiltInAnimate("poptipDisappear", PoptipDisappear), AnimateExecutor.registerBuiltInAnimate("inputText", InputText), AnimateExecutor.registerBuiltInAnimate("inputRichText", InputRichText), AnimateExecutor.registerBuiltInAnimate("outputRichText", OutputRichText), AnimateExecutor.registerBuiltInAnimate("slideRichText", SlideRichText), AnimateExecutor.registerBuiltInAnimate("slideOutRichText", SlideOutRichText), AnimateExecutor.registerBuiltInAnimate("slideIn", SlideIn), AnimateExecutor.registerBuiltInAnimate("growIn", GrowIn), AnimateExecutor.registerBuiltInAnimate("spinIn", SpinIn), AnimateExecutor.registerBuiltInAnimate("moveScaleIn", MoveScaleIn), AnimateExecutor.registerBuiltInAnimate("moveRotateIn", MoveRotateIn), AnimateExecutor.registerBuiltInAnimate("strokeIn", StrokeIn), AnimateExecutor.registerBuiltInAnimate("slideOut", SlideOut), AnimateExecutor.registerBuiltInAnimate("growOut", GrowOut), AnimateExecutor.registerBuiltInAnimate("spinOut", SpinOut), AnimateExecutor.registerBuiltInAnimate("moveScaleOut", MoveScaleOut), AnimateExecutor.registerBuiltInAnimate("moveRotateOut", MoveRotateOut), AnimateExecutor.registerBuiltInAnimate("strokeOut", StrokeOut), AnimateExecutor.registerBuiltInAnimate("pulse", PulseAnimate), AnimateExecutor.registerBuiltInAnimate("MotionPath", MotionPath), AnimateExecutor.registerBuiltInAnimate("streamLight", StreamLight);
|
|
35204
35199
|
};
|
|
35205
35200
|
|
|
35206
|
-
const version = "1.0.0-alpha.
|
|
35201
|
+
const version = "1.0.0-alpha.13";
|
|
35207
35202
|
preLoadAllModule();
|
|
35208
35203
|
if (isBrowserEnv()) {
|
|
35209
35204
|
loadBrowserEnv(container);
|
package/dist/index.js
CHANGED
|
@@ -9134,6 +9134,10 @@
|
|
|
9134
9134
|
var _a;
|
|
9135
9135
|
super(), this._AABBBounds = new AABBBounds(), this._updateTag = exports.UpdateTag.INIT, this.attribute = params, this.valid = this.isValid(), this.updateAABBBoundsStamp = 0, params.background ? this.loadImage(null !== (_a = params.background.background) && void 0 !== _a ? _a : params.background, !0) : params.shadowGraphic && this.setShadowGraphic(params.shadowGraphic);
|
|
9136
9136
|
}
|
|
9137
|
+
getGraphicService() {
|
|
9138
|
+
var _a, _b;
|
|
9139
|
+
return null !== (_b = null === (_a = this.stage) || void 0 === _a ? void 0 : _a.graphicService) && void 0 !== _b ? _b : application.graphicService;
|
|
9140
|
+
}
|
|
9137
9141
|
getAttributes() {
|
|
9138
9142
|
return this.attribute;
|
|
9139
9143
|
}
|
|
@@ -9163,13 +9167,12 @@
|
|
|
9163
9167
|
this._emitCustomEvent("animate-bind", animate);
|
|
9164
9168
|
}
|
|
9165
9169
|
tryUpdateAABBBounds() {
|
|
9166
|
-
var _a, _b;
|
|
9167
9170
|
const full = "imprecise" === this.attribute.boundsMode;
|
|
9168
9171
|
if (!this.shouldUpdateAABBBounds()) return this._AABBBounds;
|
|
9169
9172
|
if (!this.valid) return this._AABBBounds.clear(), this._AABBBounds;
|
|
9170
|
-
|
|
9173
|
+
this.getGraphicService().beforeUpdateAABBBounds(this, this.stage, !0, this._AABBBounds);
|
|
9171
9174
|
const bounds = this.doUpdateAABBBounds(full);
|
|
9172
|
-
return
|
|
9175
|
+
return this.getGraphicService().afterUpdateAABBBounds(this, this.stage, this._AABBBounds, this, !0), "empty" === this.attribute.boundsMode && bounds.clear(), bounds;
|
|
9173
9176
|
}
|
|
9174
9177
|
tryUpdateOBBBounds() {
|
|
9175
9178
|
if (this._OBBBounds || (this._OBBBounds = new OBBBounds()), this.tryUpdateAABBBounds(), this.updateOBBBoundsStamp === this.updateAABBBoundsStamp) return this._OBBBounds;
|
|
@@ -9276,7 +9279,7 @@
|
|
|
9276
9279
|
return this._transMatrix || (this._transMatrix = new Matrix()), this.shouldUpdateLocalMatrix() && (this.doUpdateLocalMatrix(), clearTag && this.clearUpdateLocalPositionTag()), this._transMatrix;
|
|
9277
9280
|
}
|
|
9278
9281
|
shouldUpdateAABBBounds() {
|
|
9279
|
-
return this.shadowRoot ? (!!(this._updateTag & exports.UpdateTag.UPDATE_BOUNDS) || this.shadowRoot.shouldUpdateAABBBounds()) &&
|
|
9282
|
+
return this.shadowRoot ? (!!(this._updateTag & exports.UpdateTag.UPDATE_BOUNDS) || this.shadowRoot.shouldUpdateAABBBounds()) && this.getGraphicService().validCheck(this.attribute, this.getGraphicTheme(), this._AABBBounds, this) : !!(this._updateTag & exports.UpdateTag.UPDATE_BOUNDS) && this.getGraphicService().validCheck(this.attribute, this.getGraphicTheme(), this._AABBBounds, this);
|
|
9280
9283
|
}
|
|
9281
9284
|
shouldSelfChangeUpdateAABBBounds() {
|
|
9282
9285
|
return this.shadowRoot ? !!(this._updateTag & exports.UpdateTag.UPDATE_BOUNDS) || this.shadowRoot.shouldUpdateAABBBounds() : !!(this._updateTag & exports.UpdateTag.UPDATE_BOUNDS);
|
|
@@ -9457,8 +9460,7 @@
|
|
|
9457
9460
|
return this;
|
|
9458
9461
|
}
|
|
9459
9462
|
onAttributeUpdate(context) {
|
|
9460
|
-
|
|
9461
|
-
context && context.skipUpdateCallback || (null === (_a = this.stage) || void 0 === _a || _a.graphicService.onAttributeUpdate(this), this._emitCustomEvent("afterAttributeUpdate", context));
|
|
9463
|
+
context && context.skipUpdateCallback || (this.getGraphicService().onAttributeUpdate(this), this._emitCustomEvent("afterAttributeUpdate", context));
|
|
9462
9464
|
}
|
|
9463
9465
|
update(d) {
|
|
9464
9466
|
d ? (d.bounds && this.tryUpdateAABBBounds(), d.trans && this.tryUpdateLocalTransMatrix()) : (this.tryUpdateAABBBounds(), this.tryUpdateLocalTransMatrix());
|
|
@@ -9648,7 +9650,6 @@
|
|
|
9648
9650
|
}
|
|
9649
9651
|
}
|
|
9650
9652
|
setStage(stage, layer) {
|
|
9651
|
-
var _a;
|
|
9652
9653
|
if (this.stage !== stage) {
|
|
9653
9654
|
if (this.stage = stage, this.layer = layer, this.setStageToShadowRoot(stage, layer), this.animates && this.animates.size) {
|
|
9654
9655
|
const timeline = stage.getTimeline();
|
|
@@ -9656,7 +9657,7 @@
|
|
|
9656
9657
|
a.timeline.isGlobal && (a.setTimeline(timeline), timeline.addAnimate(a));
|
|
9657
9658
|
});
|
|
9658
9659
|
}
|
|
9659
|
-
this._onSetStage && this._onSetStage(this, stage, layer),
|
|
9660
|
+
this._onSetStage && this._onSetStage(this, stage, layer), this.getGraphicService().onSetStage(this, stage);
|
|
9660
9661
|
}
|
|
9661
9662
|
}
|
|
9662
9663
|
setStageToShadowRoot(stage, layer) {
|
|
@@ -9804,12 +9805,11 @@
|
|
|
9804
9805
|
return !!super.shouldUpdateAABBBounds() || !!(this._childUpdateTag & exports.UpdateTag.UPDATE_BOUNDS);
|
|
9805
9806
|
}
|
|
9806
9807
|
tryUpdateAABBBounds() {
|
|
9807
|
-
var _a, _b;
|
|
9808
9808
|
if (!this.shouldUpdateAABBBounds()) return this._AABBBounds;
|
|
9809
|
-
|
|
9809
|
+
this.getGraphicService().beforeUpdateAABBBounds(this, this.stage, !0, this._AABBBounds);
|
|
9810
9810
|
const selfChange = this.shouldSelfChangeUpdateAABBBounds(),
|
|
9811
9811
|
bounds = this.doUpdateAABBBounds();
|
|
9812
|
-
return this.addUpdateLayoutTag(),
|
|
9812
|
+
return this.addUpdateLayoutTag(), this.getGraphicService().afterUpdateAABBBounds(this, this.stage, this._AABBBounds, this, selfChange), "empty" === this.attribute.boundsMode && bounds.clear(), bounds;
|
|
9813
9813
|
}
|
|
9814
9814
|
doUpdateLocalMatrix() {
|
|
9815
9815
|
const {
|
|
@@ -9869,13 +9869,11 @@
|
|
|
9869
9869
|
return this.theme.getTheme(this);
|
|
9870
9870
|
}
|
|
9871
9871
|
incrementalAppendChild(node) {
|
|
9872
|
-
var _a;
|
|
9873
9872
|
const data = super.appendChild(node);
|
|
9874
|
-
return this.stage && data && (data.stage = this.stage, data.layer = this.layer), this.addUpdateBoundTag(),
|
|
9873
|
+
return this.stage && data && (data.stage = this.stage, data.layer = this.layer), this.addUpdateBoundTag(), this.getGraphicService().onAddIncremental(node, this, this.stage), data;
|
|
9875
9874
|
}
|
|
9876
9875
|
incrementalClearChild() {
|
|
9877
|
-
|
|
9878
|
-
super.removeAllChild(), this.addUpdateBoundTag(), null === (_a = this.stage) || void 0 === _a || _a.graphicService.onClearIncremental(this, this.stage);
|
|
9876
|
+
super.removeAllChild(), this.addUpdateBoundTag(), this.getGraphicService().onClearIncremental(this, this.stage);
|
|
9879
9877
|
}
|
|
9880
9878
|
_updateChildToStage(child) {
|
|
9881
9879
|
return this.stage && child && child.setStage(this.stage, this.layer), this.addUpdateBoundTag(), child;
|
|
@@ -9895,20 +9893,17 @@
|
|
|
9895
9893
|
return this._updateChildToStage(super.insertInto(newNode, idx));
|
|
9896
9894
|
}
|
|
9897
9895
|
removeChild(child) {
|
|
9898
|
-
var _a;
|
|
9899
9896
|
const data = super.removeChild(child);
|
|
9900
|
-
return child.stage = null,
|
|
9897
|
+
return child.stage = null, this.getGraphicService().onRemove(child), this.addUpdateBoundTag(), data;
|
|
9901
9898
|
}
|
|
9902
9899
|
removeAllChild() {
|
|
9903
9900
|
let deep = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !1;
|
|
9904
9901
|
this.forEachChildren(child => {
|
|
9905
|
-
|
|
9906
|
-
null === (_a = this.stage) || void 0 === _a || _a.graphicService.onRemove(child), deep && child.isContainer && child.removeAllChild(deep);
|
|
9902
|
+
this.getGraphicService().onRemove(child), deep && child.isContainer && child.removeAllChild(deep);
|
|
9907
9903
|
}), super.removeAllChild(), this.addUpdateBoundTag();
|
|
9908
9904
|
}
|
|
9909
9905
|
setStage(stage, layer) {
|
|
9910
|
-
|
|
9911
|
-
this.stage !== stage && (this.stage = stage, this.layer = layer, this.setStageToShadowRoot(stage, layer), this._onSetStage && this._onSetStage(this, stage, layer), null === (_a = this.stage) || void 0 === _a || _a.graphicService.onSetStage(this, stage), this.forEachChildren(item => {
|
|
9906
|
+
this.stage !== stage && (this.stage = stage, this.layer = layer, this.setStageToShadowRoot(stage, layer), this._onSetStage && this._onSetStage(this, stage, layer), this.getGraphicService().onSetStage(this, stage), this.forEachChildren(item => {
|
|
9912
9907
|
item.setStage(stage, this.layer);
|
|
9913
9908
|
}));
|
|
9914
9909
|
}
|
|
@@ -10582,7 +10577,7 @@
|
|
|
10582
10577
|
const {
|
|
10583
10578
|
visible = theme.visible
|
|
10584
10579
|
} = attribute;
|
|
10585
|
-
return !(!graphic.valid || !visible) || (aabbBounds.empty() || (graphic.parent && aabbBounds.transformWithMatrix(graphic.parent.globalTransMatrix),
|
|
10580
|
+
return !(!graphic.valid || !visible) || (aabbBounds.empty() || (graphic.parent && aabbBounds.transformWithMatrix(graphic.parent.globalTransMatrix), this.clearAABBBounds(graphic, graphic.stage, aabbBounds), aabbBounds.clear()), !1);
|
|
10586
10581
|
}
|
|
10587
10582
|
updateTempAABBBounds(aabbBounds) {
|
|
10588
10583
|
const tb1 = this.tempAABBBounds1,
|
|
@@ -30668,12 +30663,12 @@
|
|
|
30668
30663
|
determineInterpolateUpdateFunction() {}
|
|
30669
30664
|
}
|
|
30670
30665
|
|
|
30671
|
-
class DefaultTimeline {
|
|
30666
|
+
class DefaultTimeline extends EventEmitter {
|
|
30672
30667
|
get animateCount() {
|
|
30673
30668
|
return this._animateCount;
|
|
30674
30669
|
}
|
|
30675
30670
|
constructor() {
|
|
30676
|
-
this.head = null, this.tail = null, this.animateMap = new Map(), this._animateCount = 0, this._playSpeed = 1, this._totalDuration = 0, this._startTime = 0, this._currentTime = 0, this.id = Generator.GenAutoIncrementId(), this.paused = !1;
|
|
30671
|
+
super(), this.head = null, this.tail = null, this.animateMap = new Map(), this._animateCount = 0, this._playSpeed = 1, this._totalDuration = 0, this._startTime = 0, this._currentTime = 0, this.id = Generator.GenAutoIncrementId(), this.paused = !1;
|
|
30677
30672
|
}
|
|
30678
30673
|
isRunning() {
|
|
30679
30674
|
return !this.paused && this._animateCount > 0;
|
|
@@ -30705,7 +30700,7 @@
|
|
|
30705
30700
|
const scaledDelta = delta * this._playSpeed;
|
|
30706
30701
|
this._currentTime += scaledDelta, this.forEachAccessAnimate((animate, i) => {
|
|
30707
30702
|
animate.status === exports.AnimateStatus.END ? this.removeAnimate(animate, !0) : animate.status !== exports.AnimateStatus.RUNNING && animate.status !== exports.AnimateStatus.INITIAL || animate.advance(scaledDelta);
|
|
30708
|
-
});
|
|
30703
|
+
}), 0 === this._animateCount && this.emit("animationEnd");
|
|
30709
30704
|
}
|
|
30710
30705
|
clear() {
|
|
30711
30706
|
this.forEachAccessAnimate(animate => {
|
|
@@ -35209,7 +35204,7 @@
|
|
|
35209
35204
|
AnimateExecutor.registerBuiltInAnimate("increaseCount", IncreaseCount), AnimateExecutor.registerBuiltInAnimate("fromTo", FromTo), AnimateExecutor.registerBuiltInAnimate("scaleIn", ScaleIn), AnimateExecutor.registerBuiltInAnimate("scaleOut", ScaleOut), AnimateExecutor.registerBuiltInAnimate("growHeightIn", GrowHeightIn), AnimateExecutor.registerBuiltInAnimate("growHeightOut", GrowHeightOut), AnimateExecutor.registerBuiltInAnimate("growWidthIn", GrowWidthIn), AnimateExecutor.registerBuiltInAnimate("growWidthOut", GrowWidthOut), AnimateExecutor.registerBuiltInAnimate("growCenterIn", GrowCenterIn), AnimateExecutor.registerBuiltInAnimate("growCenterOut", GrowCenterOut), AnimateExecutor.registerBuiltInAnimate("clipIn", ClipIn), AnimateExecutor.registerBuiltInAnimate("clipOut", ClipOut), AnimateExecutor.registerBuiltInAnimate("fadeIn", FadeIn), AnimateExecutor.registerBuiltInAnimate("fadeOut", FadeOut), AnimateExecutor.registerBuiltInAnimate("growPointsIn", GrowPointsIn), AnimateExecutor.registerBuiltInAnimate("growPointsOut", GrowPointsOut), AnimateExecutor.registerBuiltInAnimate("growPointsXIn", GrowPointsXIn), AnimateExecutor.registerBuiltInAnimate("growPointsXOut", GrowPointsXOut), AnimateExecutor.registerBuiltInAnimate("growPointsYIn", GrowPointsYIn), AnimateExecutor.registerBuiltInAnimate("growPointsYOut", GrowPointsYOut), AnimateExecutor.registerBuiltInAnimate("growAngleIn", GrowAngleIn), AnimateExecutor.registerBuiltInAnimate("growAngleOut", GrowAngleOut), AnimateExecutor.registerBuiltInAnimate("growRadiusIn", GrowRadiusIn), AnimateExecutor.registerBuiltInAnimate("growRadiusOut", GrowRadiusOut), AnimateExecutor.registerBuiltInAnimate("moveIn", MoveIn), AnimateExecutor.registerBuiltInAnimate("moveOut", MoveOut), AnimateExecutor.registerBuiltInAnimate("rotateIn", RotateIn), AnimateExecutor.registerBuiltInAnimate("rotateOut", RotateOut), AnimateExecutor.registerBuiltInAnimate("update", Update), AnimateExecutor.registerBuiltInAnimate("state", State), AnimateExecutor.registerBuiltInAnimate("labelItemAppear", LabelItemAppear), AnimateExecutor.registerBuiltInAnimate("labelItemDisappear", LabelItemDisappear), AnimateExecutor.registerBuiltInAnimate("poptipAppear", PoptipAppear), AnimateExecutor.registerBuiltInAnimate("poptipDisappear", PoptipDisappear), AnimateExecutor.registerBuiltInAnimate("inputText", InputText), AnimateExecutor.registerBuiltInAnimate("inputRichText", InputRichText), AnimateExecutor.registerBuiltInAnimate("outputRichText", OutputRichText), AnimateExecutor.registerBuiltInAnimate("slideRichText", SlideRichText), AnimateExecutor.registerBuiltInAnimate("slideOutRichText", SlideOutRichText), AnimateExecutor.registerBuiltInAnimate("slideIn", SlideIn), AnimateExecutor.registerBuiltInAnimate("growIn", GrowIn), AnimateExecutor.registerBuiltInAnimate("spinIn", SpinIn), AnimateExecutor.registerBuiltInAnimate("moveScaleIn", MoveScaleIn), AnimateExecutor.registerBuiltInAnimate("moveRotateIn", MoveRotateIn), AnimateExecutor.registerBuiltInAnimate("strokeIn", StrokeIn), AnimateExecutor.registerBuiltInAnimate("slideOut", SlideOut), AnimateExecutor.registerBuiltInAnimate("growOut", GrowOut), AnimateExecutor.registerBuiltInAnimate("spinOut", SpinOut), AnimateExecutor.registerBuiltInAnimate("moveScaleOut", MoveScaleOut), AnimateExecutor.registerBuiltInAnimate("moveRotateOut", MoveRotateOut), AnimateExecutor.registerBuiltInAnimate("strokeOut", StrokeOut), AnimateExecutor.registerBuiltInAnimate("pulse", PulseAnimate), AnimateExecutor.registerBuiltInAnimate("MotionPath", MotionPath), AnimateExecutor.registerBuiltInAnimate("streamLight", StreamLight);
|
|
35210
35205
|
};
|
|
35211
35206
|
|
|
35212
|
-
const version = "1.0.0-alpha.
|
|
35207
|
+
const version = "1.0.0-alpha.13";
|
|
35213
35208
|
preLoadAllModule();
|
|
35214
35209
|
if (isBrowserEnv()) {
|
|
35215
35210
|
loadBrowserEnv(container);
|