Replies: 1 comment 4 replies
-
line is reserved by the dom. unfortunately this is a typescript bug. they assume that react is dom-only, there are open issues for this. the workaround import { ReactThreeFiber, extend } from '@react-three/fiber'
extend({ Line_: THREE.Line })
declare global {
namespace JSX {
interface IntrinsicElements {
line_: ReactThreeFiber.Object3DNode<THREE.Line, typeof THREE.Line>
}
}
}
<line_ ... /> same applies to @joshuaellis should we maybe type line_ and audio_ by default? then at least we won't have to pierce into the global types like that. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I follow https://codesandbox.io/embed/react-three-fiber-line-1v25t
I use this section to draw lines
When I use
const ref = useRef<THREE.Line>(null);
My gulp shows
When I use const ref = useRef(null);
My gulp shows
package versions
Beta Was this translation helpful? Give feedback.
All reactions