UNPKG

@three.ez/batched-mesh-extensions

Version:
31 lines 1.58 kB
import { BatchedMesh, Sphere, Vector3 } from 'three'; declare module 'three' { interface BatchedMesh { /** * Retrieves the position of a specific instance. * @param index The index of the instance. * @param target Optional `Vector3` to store the result. * @returns The position of the instance as a `Vector3`. */ getPositionAt(index: number, target?: Vector3): Vector3; /** * Retrieves the position and maximum scale on any axis of a specific instance. * @param index The index of the instance. * @param position Optional `Vector3` to store the position result. * @returns The maximum scale on any axis. */ getPositionAndMaxScaleOnAxisAt(index: number, position: Vector3): number; /** * Applies the transformation matrix of a specific instance to a sphere. * @param index The index of the instance. * @param sphere The sphere to transform. * @param center TODO * @param radius TODO */ applyMatrixAtToSphere(index: number, sphere: Sphere, center: Vector3, radius: number): void; } } export declare function getPositionAt(this: BatchedMesh, index: number, target?: Vector3): Vector3; export declare function getPositionAndMaxScaleOnAxisAt(this: BatchedMesh, index: number, position: Vector3): number; export declare function applyMatrixAtToSphere(this: BatchedMesh, index: number, sphere: Sphere, center: Vector3, radius: number): void; //# sourceMappingURL=GetPositionAt.d.ts.map