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.
@@ -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
- var _child$visibilityStat;
765
- return ((_child$visibilityStat = child.visibilityStatus) === null || _child$visibilityStat === void 0 ? void 0 : _child$visibilityStat.isVisible) !== true;
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.x = this.xNext + child.getMarginLeft() + this.container.getPaddingLeft();
50
- child.y = this.yNext + child.getMarginTop() + this.container.getPaddingTop();
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
  }, {
@@ -68,7 +68,8 @@ var VisibilityUtil = /*#__PURE__*/function () {
68
68
  tmodel = parent;
69
69
  }
70
70
  var clip = VisibilityUtil.getScreenViewportRect();
71
- var isVisible = VisibilityUtil.rectsOverlap(rect, clip);
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
- return a.x <= b.r && a.r >= b.x && a.y <= b.b && a.b >= b.y;
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";