lythreeframe 1.0.14 → 1.0.16
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/dist/bundle.cjs.js +8 -5
- package/dist/bundle.esm.js +8 -5
- package/package.json +1 -1
package/dist/bundle.cjs.js
CHANGED
|
@@ -1760,6 +1760,7 @@ class Orbital extends Pawn {
|
|
|
1760
1760
|
return;
|
|
1761
1761
|
}
|
|
1762
1762
|
//this.enabled = false;
|
|
1763
|
+
const _this = this;
|
|
1763
1764
|
let obj = { alpha: 0 };
|
|
1764
1765
|
this.anim = gsap.gsap.to(obj, {
|
|
1765
1766
|
duration: time,
|
|
@@ -1768,20 +1769,22 @@ class Orbital extends Pawn {
|
|
|
1768
1769
|
let alpha = obj.alpha;
|
|
1769
1770
|
let camPos = new three.Vector3(startPos.x + posDir.x * alpha * movingLength, startPos.y + posDir.y * alpha * movingLength, startPos.z + posDir.z * alpha * movingLength);
|
|
1770
1771
|
let targetPos = new three.Vector3(startTarget.x + targetDir.x * alpha * targetDistance, startTarget.y + targetDir.y * alpha * targetDistance, startTarget.z + targetDir.z * alpha * targetDistance);
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1772
|
+
_this.control.object.position.copy(camPos);
|
|
1773
|
+
_this.control.target.copy(targetPos);
|
|
1774
|
+
_this.control.update();
|
|
1774
1775
|
if (onGoing) {
|
|
1775
1776
|
onGoing();
|
|
1776
1777
|
}
|
|
1777
|
-
|
|
1778
|
+
if (_this.controller.viewPort)
|
|
1779
|
+
_this.controller.viewPort.markRenderStateDirty();
|
|
1778
1780
|
},
|
|
1779
1781
|
onComplete: function () {
|
|
1780
1782
|
//_this.enabled = true;
|
|
1781
1783
|
if (onFinished) {
|
|
1782
1784
|
onFinished();
|
|
1783
1785
|
}
|
|
1784
|
-
|
|
1786
|
+
if (_this.controller.viewPort)
|
|
1787
|
+
_this.controller.viewPort.markRenderStateDirty();
|
|
1785
1788
|
}
|
|
1786
1789
|
});
|
|
1787
1790
|
}
|
package/dist/bundle.esm.js
CHANGED
|
@@ -1758,6 +1758,7 @@ class Orbital extends Pawn {
|
|
|
1758
1758
|
return;
|
|
1759
1759
|
}
|
|
1760
1760
|
//this.enabled = false;
|
|
1761
|
+
const _this = this;
|
|
1761
1762
|
let obj = { alpha: 0 };
|
|
1762
1763
|
this.anim = gsap.to(obj, {
|
|
1763
1764
|
duration: time,
|
|
@@ -1766,20 +1767,22 @@ class Orbital extends Pawn {
|
|
|
1766
1767
|
let alpha = obj.alpha;
|
|
1767
1768
|
let camPos = new Vector3(startPos.x + posDir.x * alpha * movingLength, startPos.y + posDir.y * alpha * movingLength, startPos.z + posDir.z * alpha * movingLength);
|
|
1768
1769
|
let targetPos = new Vector3(startTarget.x + targetDir.x * alpha * targetDistance, startTarget.y + targetDir.y * alpha * targetDistance, startTarget.z + targetDir.z * alpha * targetDistance);
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1770
|
+
_this.control.object.position.copy(camPos);
|
|
1771
|
+
_this.control.target.copy(targetPos);
|
|
1772
|
+
_this.control.update();
|
|
1772
1773
|
if (onGoing) {
|
|
1773
1774
|
onGoing();
|
|
1774
1775
|
}
|
|
1775
|
-
|
|
1776
|
+
if (_this.controller.viewPort)
|
|
1777
|
+
_this.controller.viewPort.markRenderStateDirty();
|
|
1776
1778
|
},
|
|
1777
1779
|
onComplete: function () {
|
|
1778
1780
|
//_this.enabled = true;
|
|
1779
1781
|
if (onFinished) {
|
|
1780
1782
|
onFinished();
|
|
1781
1783
|
}
|
|
1782
|
-
|
|
1784
|
+
if (_this.controller.viewPort)
|
|
1785
|
+
_this.controller.viewPort.markRenderStateDirty();
|
|
1783
1786
|
}
|
|
1784
1787
|
});
|
|
1785
1788
|
}
|