UNPKG

@needle-tools/engine

Version:

Needle Engine is a web-based runtime for 3D apps. It runs on your machine for development with great integrations into editors like Unity or Blender - and can be deployed onto any device! It is flexible, extensible and networking and XR are built-in.

31 lines (30 loc) 1.24 kB
import { Intersection } from "three"; import { type IRaycastOptions, RaycastOptions } from "../../engine/engine_physics.js"; import { Behaviour } from "../Component.js"; /** Derive from this class to create your own custom Raycaster * If you override awake, onEnable or onDisable, be sure to call the base class methods * Implement `performRaycast` to perform your custom raycasting logic */ export declare abstract class Raycaster extends Behaviour { awake(): void; onEnable(): void; onDisable(): void; abstract performRaycast(_opts?: IRaycastOptions | RaycastOptions | null): Intersection[] | null; } export declare class ObjectRaycaster extends Raycaster { private targets; private raycastHits; ignoreSkinnedMeshes: boolean; start(): void; performRaycast(opts?: IRaycastOptions | RaycastOptions | null): Intersection[] | null; } export declare class GraphicRaycaster extends ObjectRaycaster { constructor(); } export declare class SpatialGrabRaycaster extends Raycaster { /** * Use to disable SpatialGrabRaycaster globally */ static allow: boolean; performRaycast(_opts?: IRaycastOptions | RaycastOptions | null): Intersection[] | null; }