targetj 1.0.259 → 1.1.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/Export.js +16 -1
- package/README.md +18 -25
- package/build/AnimationManager.js +1 -1
- package/build/AnimationUtil.js +1 -8
- package/build/App.js +13 -4
- package/build/BaseModel.js +39 -14
- package/build/Bracket.js +7 -1
- package/build/Child.js +504 -0
- package/build/EventListener.js +10 -1
- package/build/LocationManager.js +161 -40
- package/build/PageManager.js +35 -134
- package/build/ParticleChild.js +575 -0
- package/build/ParticleRenderer.js +818 -0
- package/build/ParticleRuntime.js +1513 -0
- package/build/ParticleTModel.js +1423 -0
- package/build/ParticleUtil.js +265 -0
- package/build/RunScheduler.js +10 -3
- package/build/ScheduleUtil.js +2 -2
- package/build/StateManager.js +235 -31
- package/build/StateUtil.js +14 -15
- package/build/TModel.js +62 -28
- package/build/TModelFactory.js +48 -0
- package/build/TModelManager.js +146 -98
- package/build/TModelUtil.js +11 -8
- package/build/TUtil.js +57 -47
- package/build/TargetData.js +7 -1
- package/build/TargetExecutor.js +63 -9
- package/build/TargetManager.js +39 -23
- package/build/TargetParser.js +38 -2
- package/build/TargetUtil.js +26 -5
- package/build/Viewport.js +2 -2
- package/build/VisibilityUtil.js +4 -2
- package/build/index.js +6 -1
- package/dist/targetjs.js +1 -1
- package/dist/targetjs.js.gz +0 -0
- package/package.json +1 -1
package/build/TargetUtil.js
CHANGED
|
@@ -572,6 +572,9 @@ var TargetUtil = /*#__PURE__*/function () {
|
|
|
572
572
|
if (tmodel.isTargetImperative(targetName)) {
|
|
573
573
|
continue;
|
|
574
574
|
}
|
|
575
|
+
if (tmodel.isTargetComplete(targetName)) {
|
|
576
|
+
continue;
|
|
577
|
+
}
|
|
575
578
|
if (tmodel.activatedTargets.indexOf(targetName) >= 0) {
|
|
576
579
|
return "activated targets";
|
|
577
580
|
}
|
|
@@ -591,7 +594,7 @@ var TargetUtil = /*#__PURE__*/function () {
|
|
|
591
594
|
value: function isTargetTreeComplete(tmodel, key, completionScopeOverride) {
|
|
592
595
|
var target = tmodel.targets[key];
|
|
593
596
|
if (target) {
|
|
594
|
-
var _target$childAction, _target$childAction2, _target$childAction3;
|
|
597
|
+
var _target$childAction, _target$childAction2, _target$childAction3, _tmodel$particleRunti;
|
|
595
598
|
var completionScope = completionScopeOverride !== null && completionScopeOverride !== void 0 ? completionScopeOverride : target.completionScope;
|
|
596
599
|
var targetType = _typeof(target.value);
|
|
597
600
|
if (TargetData.controlTargetMap[key]) {
|
|
@@ -621,6 +624,9 @@ var TargetUtil = /*#__PURE__*/function () {
|
|
|
621
624
|
if (target.fetchAction && !getLoader().isLoadingSuccessful(tmodel, key)) {
|
|
622
625
|
return 'incomplete loading';
|
|
623
626
|
}
|
|
627
|
+
if ((_tmodel$particleRunti = tmodel.particleRuntime) !== null && _tmodel$particleRunti !== void 0 && _tmodel$particleRunti.hasPending(key, completionScope)) {
|
|
628
|
+
return "pending GPU children";
|
|
629
|
+
}
|
|
624
630
|
}
|
|
625
631
|
return true;
|
|
626
632
|
}
|
|
@@ -635,7 +641,14 @@ var TargetUtil = /*#__PURE__*/function () {
|
|
|
635
641
|
_step2;
|
|
636
642
|
try {
|
|
637
643
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
644
|
+
var _child$visibilityStat;
|
|
638
645
|
var child = _step2.value;
|
|
646
|
+
if (!child) {
|
|
647
|
+
continue;
|
|
648
|
+
}
|
|
649
|
+
if (completionScope === "visible" && !child.isLightweightChild && ((_child$visibilityStat = child.visibilityStatus) === null || _child$visibilityStat === void 0 ? void 0 : _child$visibilityStat.isVisible) === undefined) {
|
|
650
|
+
return "visibility not calculated";
|
|
651
|
+
}
|
|
639
652
|
if (TargetUtil.shouldIgnoreChildForCompletion(child, completionScope)) {
|
|
640
653
|
continue;
|
|
641
654
|
}
|
|
@@ -664,11 +677,11 @@ var TargetUtil = /*#__PURE__*/function () {
|
|
|
664
677
|
var childrenMap = new Map();
|
|
665
678
|
var children = [].concat(_toConsumableArray((_tmodel$updatingChild = (_tmodel$updatingChild2 = tmodel.updatingChildrenMap) === null || _tmodel$updatingChild2 === void 0 ? void 0 : _tmodel$updatingChild2.values()) !== null && _tmodel$updatingChild !== void 0 ? _tmodel$updatingChild : []), _toConsumableArray((_tmodel$animatingChil = (_tmodel$animatingChil2 = tmodel.animatingChildrenMap) === null || _tmodel$animatingChil2 === void 0 ? void 0 : _tmodel$animatingChil2.values()) !== null && _tmodel$animatingChil !== void 0 ? _tmodel$animatingChil : []));
|
|
666
679
|
children.forEach(function (child) {
|
|
667
|
-
var _child$updatingTarget;
|
|
680
|
+
var _child$updatingTarget, _child$noDomUpdatingT;
|
|
668
681
|
if (TargetUtil.shouldIgnoreChildForCompletion(child, completionScope)) {
|
|
669
682
|
return;
|
|
670
683
|
}
|
|
671
|
-
var updatingList = [].concat(_toConsumableArray((_child$updatingTarget = child.updatingTargetList) !== null && _child$updatingTarget !== void 0 ? _child$updatingTarget : []), _toConsumableArray(child.animatingMap ? _toConsumableArray(child.animatingMap.keys()) : []));
|
|
684
|
+
var updatingList = [].concat(_toConsumableArray((_child$updatingTarget = child.updatingTargetList) !== null && _child$updatingTarget !== void 0 ? _child$updatingTarget : []), _toConsumableArray(child.animatingMap ? _toConsumableArray(child.animatingMap.keys()) : []), _toConsumableArray((_child$noDomUpdatingT = child.noDomUpdatingTargets) !== null && _child$noDomUpdatingT !== void 0 ? _child$noDomUpdatingT : []));
|
|
672
685
|
var _iterator3 = _createForOfIteratorHelper(updatingList),
|
|
673
686
|
_step3;
|
|
674
687
|
try {
|
|
@@ -761,8 +774,13 @@ var TargetUtil = /*#__PURE__*/function () {
|
|
|
761
774
|
return true;
|
|
762
775
|
}
|
|
763
776
|
if (completionScope === "visible") {
|
|
764
|
-
|
|
765
|
-
|
|
777
|
+
if (child.visibilityStatus) {
|
|
778
|
+
return child.visibilityStatus.isVisible !== true;
|
|
779
|
+
}
|
|
780
|
+
if (typeof child.isVisible === "function") {
|
|
781
|
+
return child.isVisible() !== true;
|
|
782
|
+
}
|
|
783
|
+
return true;
|
|
766
784
|
}
|
|
767
785
|
return false;
|
|
768
786
|
}
|
|
@@ -925,6 +943,9 @@ var TargetUtil = /*#__PURE__*/function () {
|
|
|
925
943
|
value: function resetTargetChildState(tmodel) {
|
|
926
944
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
927
945
|
var visited = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : new Set();
|
|
946
|
+
if (tmodel.isLightweightChild) {
|
|
947
|
+
return;
|
|
948
|
+
}
|
|
928
949
|
var sig = "".concat(tmodel.oid);
|
|
929
950
|
if (visited.has(sig)) {
|
|
930
951
|
return;
|
package/build/Viewport.js
CHANGED
|
@@ -46,8 +46,8 @@ var Viewport = /*#__PURE__*/function () {
|
|
|
46
46
|
value: function setLocation() {
|
|
47
47
|
var child = this.currentChild;
|
|
48
48
|
if (!child.targets['excludeXYCalc']) {
|
|
49
|
-
child.
|
|
50
|
-
child.
|
|
49
|
+
child.setLayoutX(this.xNext + child.getMarginLeft() + this.container.getPaddingLeft());
|
|
50
|
+
child.setLayoutY(this.yNext + child.getMarginTop() + this.container.getPaddingTop());
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
}, {
|
package/build/VisibilityUtil.js
CHANGED
|
@@ -68,7 +68,8 @@ var VisibilityUtil = /*#__PURE__*/function () {
|
|
|
68
68
|
tmodel = parent;
|
|
69
69
|
}
|
|
70
70
|
var clip = VisibilityUtil.getScreenViewportRect();
|
|
71
|
-
var
|
|
71
|
+
var verticalOnly = tmodel.type === "BI";
|
|
72
|
+
var isVisible = VisibilityUtil.rectsOverlap(rect, clip, verticalOnly);
|
|
72
73
|
if (!isVisible) {
|
|
73
74
|
return {
|
|
74
75
|
clip: clip,
|
|
@@ -115,7 +116,8 @@ var VisibilityUtil = /*#__PURE__*/function () {
|
|
|
115
116
|
}, {
|
|
116
117
|
key: "rectsOverlap",
|
|
117
118
|
value: function rectsOverlap(a, b) {
|
|
118
|
-
|
|
119
|
+
var verticalOnly = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
120
|
+
return (verticalOnly || a.x <= b.r && a.r >= b.x) && a.y <= b.b && a.b >= b.y;
|
|
119
121
|
}
|
|
120
122
|
}, {
|
|
121
123
|
key: "intersectRects",
|
package/build/index.js
CHANGED
|
@@ -18,4 +18,9 @@ export * from "./AnimationManager.js";
|
|
|
18
18
|
export * from "./AnimationUtil.js";
|
|
19
19
|
export * from "./VisibilityUtil.js";
|
|
20
20
|
export * from "./ScheduleUtil.js";
|
|
21
|
-
export * from "./StateUtil.js";
|
|
21
|
+
export * from "./StateUtil.js";
|
|
22
|
+
export * from "./ParticleTModel.js";
|
|
23
|
+
export * from "./ParticleChild.js";
|
|
24
|
+
export * from "./ParticleRenderer.js";
|
|
25
|
+
export * from "./ParticleRuntime.js";
|
|
26
|
+
export * from "./ParticleUtil.js";
|