UNPKG

soonspacejs

Version:
38 lines (37 loc) 1.8 kB
import { Object3D, Vector3, Euler, Box3, Object3DEventMap } from 'three'; import { Tween } from 'three/examples/jsm/libs/tween.module.js'; import { Position, Rotation, Scale, Level, BaseObject3DInfo, AnimationOptions } from '../Interface'; export interface BaseObject3DEventMap extends Object3DEventMap { click: object; rightClick: object; dblClick: object; load: object; } declare class BaseObject3D extends Object3D<BaseObject3DEventMap> { sid: string; stype: string; level: Level; handleHide: boolean; isEventPropagation: boolean; extraIds: string[]; onLoad: ((object: any) => void) | null; onClick: ((object: any) => void) | null; onDblClick: ((object: any) => void) | null; onRightClick: ((object: any) => void) | null; constructor(params?: BaseObject3DInfo); eventPropagation(): void; show(): void; hide(): void; setMove(position: Position | Vector3, options?: AnimationOptions, onUpdate?: (source: Position, tween: Tween<Position>) => void, onStart?: (tween: Tween<Position>) => void): Promise<void>; setRotate(rotation: Rotation | Euler, options?: AnimationOptions, onUpdate?: (source: Rotation, tween: Tween<Rotation>) => void, onStart?: (tween: Tween<Rotation>) => void): Promise<void>; setScale(scale: Scale | Vector3, options?: AnimationOptions, onUpdate?: (source: Scale, tween: Tween<Scale>) => void, onStart?: (tween: Tween<Scale>) => void): Promise<void>; getBoundingBox(): Box3; getSpaceAttribute(isFromWorld?: boolean): { position: Vector3; rotation: Euler; scale: Vector3; }; syncSpaceAttribute(object: Object3D, isFromWorld?: boolean): void; copy(source: this, recursive?: boolean): this; } export { BaseObject3D, };