Errors caused by relocated geometries (to examples/jsm/geometry/... in three.js) #1742
Answered
by
CodyJasonBennett
polymorpher
asked this question in
Q&A
-
Some geometries are moved outside the main three.js module, for example, https://threejs.org/docs/#examples/en/geometries/TextGeometry Therefore, when they are rendered using the standard way, i,e, Is there a way to instruct r3f to look for the particular module in |
Beta Was this translation helpful? Give feedback.
Answered by
CodyJasonBennett
Oct 15, 2021
Replies: 1 comment 9 replies
-
Yes, as it's not a part of the three namespace, you can import the module from examples and import { TextGeometry } from 'three/examples/jsm/geometries/TextGeometry'
import { extend } from '@react-three/fiber'
extend({ TextGeometry })
return <textGeometry args={[ ... ]} /> See: |
Beta Was this translation helpful? Give feedback.
9 replies
Answer selected by
joshuaellis
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes, as it's not a part of the three namespace, you can import the module from examples and
extend
it.See: