Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

guidance for using this library with TextGeometry? #11

Open
prechapl opened this issue Feb 28, 2023 · 2 comments
Open

guidance for using this library with TextGeometry? #11

prechapl opened this issue Feb 28, 2023 · 2 comments

Comments

@prechapl
Copy link

I'd like to to subtract text geometry from a mesh but I have not been able to get it to work. I get this error:

TypeError: Cannot read properties of undefined (reading 'count')
at ensureIndex (buildFunctions.js:13:1)
at buildTree (buildFunctions.js:737:1)
at buildPackedTree (buildFunctions.js:791:1)
at new MeshBVH (MeshBVH.js:164:1)
at Brush.prepareGeometry (Brush.js:68:1)
at Evaluator.evaluate (Evaluator.js:137:1)
at index.js:68:1
at index.js:91:1
at commitHookEffectListMount (react-reconciler.development.js:14669:1)
at commitLayoutEffectOnFiber (react-reconciler.development.js:14781:1)

@marcofiletto
Copy link

Hi! I have the same issue.
What I did to partially solve it was to use inside (my case)
<textGeometry args={['Test', { font, size: 1, height: 1 }]} />
where font is
const font = new FontLoader().parse(myFont);
and myFont it's a custom imported font
import myFont from '/fonts/GreatVibes_Regular.json';

However, it seems that this approach requires more resources, because it takes longer to process.

@marcofiletto
Copy link

#17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants