lythreeframe 1.2.59 → 1.2.60

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.
@@ -2412,7 +2412,7 @@ class Controller {
2412
2412
  getHitResultFromScreenPoint(x, y) {
2413
2413
  this._raycastVec2.set(x, y);
2414
2414
  this.raycaster.setFromCamera(this._raycastVec2, this.camera);
2415
- const out = this.raycaster.intersectObjects(this.world.scene.children, true);
2415
+ const out = this.getAllHitResultFromScreenPoint(x, y);
2416
2416
  for (const hit of out) {
2417
2417
  if (hit.object.userData["rayIgnored"])
2418
2418
  continue;
@@ -2425,6 +2425,11 @@ class Controller {
2425
2425
  }
2426
2426
  return null;
2427
2427
  }
2428
+ getAllHitResultFromScreenPoint(x, y) {
2429
+ this._raycastVec2.set(x, y);
2430
+ this.raycaster.setFromCamera(this._raycastVec2, this.camera);
2431
+ return this.raycaster.intersectObjects(this.world.scene.children, true);
2432
+ }
2428
2433
  focusTo(targetPos, targetQuat, distance, time, onGoing = null, onFinished = null) {
2429
2434
  this.pawn.focusTo(targetPos, targetQuat, distance, time, onGoing, onFinished);
2430
2435
  }
@@ -2410,7 +2410,7 @@ class Controller {
2410
2410
  getHitResultFromScreenPoint(x, y) {
2411
2411
  this._raycastVec2.set(x, y);
2412
2412
  this.raycaster.setFromCamera(this._raycastVec2, this.camera);
2413
- const out = this.raycaster.intersectObjects(this.world.scene.children, true);
2413
+ const out = this.getAllHitResultFromScreenPoint(x, y);
2414
2414
  for (const hit of out) {
2415
2415
  if (hit.object.userData["rayIgnored"])
2416
2416
  continue;
@@ -2423,6 +2423,11 @@ class Controller {
2423
2423
  }
2424
2424
  return null;
2425
2425
  }
2426
+ getAllHitResultFromScreenPoint(x, y) {
2427
+ this._raycastVec2.set(x, y);
2428
+ this.raycaster.setFromCamera(this._raycastVec2, this.camera);
2429
+ return this.raycaster.intersectObjects(this.world.scene.children, true);
2430
+ }
2426
2431
  focusTo(targetPos, targetQuat, distance, time, onGoing = null, onFinished = null) {
2427
2432
  this.pawn.focusTo(targetPos, targetQuat, distance, time, onGoing, onFinished);
2428
2433
  }
@@ -99,5 +99,6 @@ export declare class Controller {
99
99
  protected removeCorePointerListeners(): void;
100
100
  getHitResultUnderCursor(): Intersection | null;
101
101
  getHitResultFromScreenPoint(x: number, y: number): Intersection | null;
102
+ getAllHitResultFromScreenPoint(x: number, y: number): Intersection[];
102
103
  focusTo(targetPos: Vector3, targetQuat: Quaternion | Euler, distance: number, time: number, onGoing?: (() => void) | null, onFinished?: (() => void) | null): void;
103
104
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lythreeframe",
3
- "version": "1.2.59",
3
+ "version": "1.2.60",
4
4
  "description": "Three.js 封装",
5
5
  "main": "dist/bundle.cjs.js",
6
6
  "module": "dist/bundle.esm.js",