@playcanvas/blocks
Version:
High level abstract 3D primitives for React
10 lines (9 loc) • 525 B
TypeScript
import { Entity as PcEntity } from "playcanvas";
/**
* A custom React hook that triggers rendering when the camera's transform or projection matrix changes.
* Only renders when the camera is visible in the viewport.
*
* @param {Entity | null} entity - The PlayCanvas entity representing the camera. If null, the hook does nothing.
* @returns {void} This hook does not return a value but updates the rendering state of the application.
*/
export declare const useRenderOnCameraChange: (entity: PcEntity | null) => void;