lythreeframe 2.0.3 → 2.0.4

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.
@@ -49,6 +49,17 @@ export interface ActorHoverEvent {
49
49
  hit: Intersection | null;
50
50
  handled: boolean;
51
51
  }
52
+ /** focusToBounds 选项 */
53
+ export interface FocusToBoundsOptions {
54
+ /** 是否计算最优朝向 */
55
+ computeOptimalQuat?: boolean;
56
+ /** 持续回调 */
57
+ onGoing?: (() => void) | null;
58
+ /** 完成回调 */
59
+ onFinished?: (() => void) | null;
60
+ /** 目标屏幕占比,默认 sqrt(0.5) ≈ 0.707 */
61
+ targetScreenRatio?: number;
62
+ }
52
63
  export declare class Controller {
53
64
  protected _app: ThreeJsApp;
54
65
  protected _pawn: Pawn | null;
@@ -169,6 +180,6 @@ export declare class Controller {
169
180
  getAllHitResultUnderCursor(_checkInteractable?: boolean): HitResult[] | null;
170
181
  protected getAllHitResultFromScreenPoint(x: number, y: number): HitResult[];
171
182
  focusTo(targetPos: Vector3, targetQuat: Quaternion | Euler, distance: number, time: number, onGoing?: (() => void) | null, onFinished?: (() => void) | null): void;
172
- focusToBounds(bounds: Box3, time: number, computeOptimalQuat?: boolean, onGoing?: (() => void) | null, onFinished?: (() => void) | null): void;
173
- focusToObject(targetObejct: Object3D, time: number, computeOptimalQuat?: boolean, onGoing?: (() => void) | null, onFinished?: (() => void) | null): void;
183
+ focusToBounds(bounds: Box3, time: number, options?: FocusToBoundsOptions): void;
184
+ focusToObject(targetObejct: Object3D, time: number, options?: FocusToBoundsOptions): void;
174
185
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lythreeframe",
3
- "version": "2.0.3",
3
+ "version": "2.0.4",
4
4
  "description": "Three.js 封装",
5
5
  "main": "dist/bundle.cjs.js",
6
6
  "module": "dist/bundle.esm.js",