-
Notifications
You must be signed in to change notification settings - Fork 720
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
Multiple materials with RoundedBox #180
Comments
This goes a little bit over my knowledge of three, but material arrays are handled using geometry groups, which have to be created when constructing the geometry: https://github.com/mrdoob/three.js/blob/master/src/geometries/BoxBufferGeometry.js try searching in the code for "group" and you'll see what I'm talking about. I don't think rounded box, with our implementation, can support this, since we don't know the number of vertices before creating the geometry, since it's created via extrusion. The soon-to-be-released official version of this geometry ( https://github.com/mrdoob/three.js/blob/45b0103e4dd9904b341d05ed991113f2f9edcc70/examples/jsm/geometries/RoundedBoxBufferGeometry.js ) also doesn't seem to support multi material, so you may be out of luck |
Ok thanks, guess i'll stick to boxGeom :/ |
@gsimone Can I reimplement this component? |
Sure! |
Hello and amazing job with this lib drei !
I want to display a Dice with colored faces (and another with dotted faces), so multiple materials.
I discovered your nice RoundedBox component and tried to apply an array of materials but does not work :
i'm getting this :
looks like my array of materials is not reaching the boxBufferGeometry inside the RoundeBox ?
What can i do to apply my materials ?
The text was updated successfully, but these errors were encountered: