lythreeframe 1.0.15 → 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.
@@ -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
- this.control.object.position.copy(camPos);
1772
- this.control.target.copy(targetPos);
1773
- this.control.update();
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 (this.controller.viewPort)
1778
- this.controller.viewPort.markRenderStateDirty();
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 (this.controller.viewPort)
1786
- this.controller.viewPort.markRenderStateDirty();
1786
+ if (_this.controller.viewPort)
1787
+ _this.controller.viewPort.markRenderStateDirty();
1787
1788
  }
1788
1789
  });
1789
1790
  }
@@ -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
- this.control.object.position.copy(camPos);
1770
- this.control.target.copy(targetPos);
1771
- this.control.update();
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 (this.controller.viewPort)
1776
- this.controller.viewPort.markRenderStateDirty();
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 (this.controller.viewPort)
1784
- this.controller.viewPort.markRenderStateDirty();
1784
+ if (_this.controller.viewPort)
1785
+ _this.controller.viewPort.markRenderStateDirty();
1785
1786
  }
1786
1787
  });
1787
1788
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lythreeframe",
3
- "version": "1.0.15",
3
+ "version": "1.0.16",
4
4
  "description": "Three.js 封装",
5
5
  "main": "dist/bundle.cjs.js",
6
6
  "module": "dist/bundle.esm.js",