@playcanvas/react
Version:
A React renderer for PlayCanvas – build interactive 3D applications using React's declarative paradigm.
15 lines (14 loc) • 376 B
TypeScript
import { GltfContextValue } from '../types.ts';
/**
* Hook to access the Gltf context
* Provides access to the hierarchy cache and utilities
*
* @returns The Gltf context value
* @throws Error if used outside of a Gltf component
*
* @example
* ```tsx
* const { hierarchyCache, rootEntity } = useGltf();
* ```
*/
export declare function useGltf(): GltfContextValue;