lythreeframe 1.0.15 → 1.0.17
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 +12 -7
- package/dist/bundle.esm.js +12 -7
- 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,22 +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
|
-
if (
|
|
1778
|
-
|
|
1778
|
+
if (_this.controller.viewPort)
|
|
1779
|
+
_this.controller.viewPort.markRenderStateDirty();
|
|
1779
1780
|
},
|
|
1780
1781
|
onComplete: function () {
|
|
1781
1782
|
//_this.enabled = true;
|
|
1782
1783
|
if (onFinished) {
|
|
1783
1784
|
onFinished();
|
|
1784
1785
|
}
|
|
1785
|
-
if (
|
|
1786
|
-
|
|
1786
|
+
if (_this.controller.viewPort)
|
|
1787
|
+
_this.controller.viewPort.markRenderStateDirty();
|
|
1787
1788
|
}
|
|
1788
1789
|
});
|
|
1789
1790
|
}
|
|
@@ -2064,11 +2065,15 @@ class ThreeJsApp {
|
|
|
2064
2065
|
get controllerClass() {
|
|
2065
2066
|
return Controller;
|
|
2066
2067
|
}
|
|
2068
|
+
get appParam() {
|
|
2069
|
+
return this._appParam;
|
|
2070
|
+
}
|
|
2067
2071
|
get onCameraChangedDelegate() {
|
|
2068
2072
|
return this._onCameraChangedDelegate;
|
|
2069
2073
|
}
|
|
2070
2074
|
constructor(elementId, appParam = DefaultAppParam) {
|
|
2071
2075
|
this._onCameraChangedDelegate = new Delegate();
|
|
2076
|
+
this._appParam = appParam;
|
|
2072
2077
|
this._clock = new three.Clock();
|
|
2073
2078
|
this._camera = CameraFactory.createCamera(appParam.cameraParam ? appParam.cameraParam : DefaultCameraParam);
|
|
2074
2079
|
this._world = new this.worldClass(this);
|
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,22 +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
|
-
if (
|
|
1776
|
-
|
|
1776
|
+
if (_this.controller.viewPort)
|
|
1777
|
+
_this.controller.viewPort.markRenderStateDirty();
|
|
1777
1778
|
},
|
|
1778
1779
|
onComplete: function () {
|
|
1779
1780
|
//_this.enabled = true;
|
|
1780
1781
|
if (onFinished) {
|
|
1781
1782
|
onFinished();
|
|
1782
1783
|
}
|
|
1783
|
-
if (
|
|
1784
|
-
|
|
1784
|
+
if (_this.controller.viewPort)
|
|
1785
|
+
_this.controller.viewPort.markRenderStateDirty();
|
|
1785
1786
|
}
|
|
1786
1787
|
});
|
|
1787
1788
|
}
|
|
@@ -2062,11 +2063,15 @@ class ThreeJsApp {
|
|
|
2062
2063
|
get controllerClass() {
|
|
2063
2064
|
return Controller;
|
|
2064
2065
|
}
|
|
2066
|
+
get appParam() {
|
|
2067
|
+
return this._appParam;
|
|
2068
|
+
}
|
|
2065
2069
|
get onCameraChangedDelegate() {
|
|
2066
2070
|
return this._onCameraChangedDelegate;
|
|
2067
2071
|
}
|
|
2068
2072
|
constructor(elementId, appParam = DefaultAppParam) {
|
|
2069
2073
|
this._onCameraChangedDelegate = new Delegate();
|
|
2074
|
+
this._appParam = appParam;
|
|
2070
2075
|
this._clock = new Clock();
|
|
2071
2076
|
this._camera = CameraFactory.createCamera(appParam.cameraParam ? appParam.cameraParam : DefaultCameraParam);
|
|
2072
2077
|
this._world = new this.worldClass(this);
|