@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.
32 lines (31 loc) • 935 B
TypeScript
import { Behaviour } from "./Component.js";
/**
* UsageMarker indicates an object is currently being interacted with.
* Components like {@link DragControls} add this to prevent accidental deletion
* by {@link DeleteBox} while the user is dragging.
*
* @example Check if object is in use
* ```ts
* const marker = object.getComponent(UsageMarker);
* if (marker?.isUsed) {
* console.log("Object is being used by:", marker.usedBy);
* }
* ```
*
* @summary Marks object as currently being interacted with
* @category Interactivity
* @group Components
* @see {@link DeleteBox} respects this marker
* @see {@link DragControls} adds this during drag
*/
export declare class UsageMarker extends Behaviour {
isUsed: boolean;
usedBy: any;
}
/**
* An empty component that can be used to mark an object as interactable.
* @group Components
*/
/** @deprecated */
export declare class Interactable extends Behaviour {
}