Spaces:
Runtime error
Runtime error
Download streaming-react-app/src/react-xr/ThreeMeshUIText.tsx from MACXXX/seamless-streaming: direct link, hf CLI and curl.
- Browser
- Download file 742 Bytes
-
https://huggingface.co/spaces/MACXXX/seamless-streaming/resolve/main/streaming-react-app/src/react-xr/ThreeMeshUIText.tsx
- Command line
-
hf download hf://spaces/MACXXX/seamless-streaming/streaming-react-app/src/react-xr/ThreeMeshUIText.tsx
-
curl -L -o ThreeMeshUIText.tsx https://huggingface.co/spaces/MACXXX/seamless-streaming/resolve/main/streaming-react-app/src/react-xr/ThreeMeshUIText.tsx
742 Bytes
| import {extend} from '@react-three/fiber'; | |
| import {forwardRef} from 'react'; | |
| import ThreeMeshUI, {TextOptions} from 'three-mesh-ui'; | |
| extend(ThreeMeshUI); | |
| /** | |
| * Hacky but component that wraps <text> since this has typescript issues because it collides with | |
| * the native <text> SVG element. Simple enough so abstracting it away in this file | |
| * so it could be used in other places with low risk. e.g: | |
| * <ThreeMeshUIText content="Hello" /> | |
| */ | |
| // eslint-disable-next-line @typescript-eslint/no-explicit-any | |
| export type ThreeMeshUITextType = any; | |
| const ThreeMeshUIText = forwardRef<ThreeMeshUITextType, TextOptions>( | |
| function ThreeMeshUIText(props, ref) { | |
| return <text {...props} ref={ref} />; | |
| }, | |
| ); | |
| export default ThreeMeshUIText; | |