-
Notifications
You must be signed in to change notification settings - Fork 27
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
Mesh with colored vertices component #4
Comments
I don't think I'll be able to sort his out for 0.2. The component is blocked out and populates a [colors] array on the mesh object ... but this isn't enough for the json parser. Option 1 - We hack it ourselves on the viewer side by looping over the geometry after it is parsed (and the json containing the color data that was ignored) and in the scene and populating face vertex colors based on the mesh's colors array (this is the road I went down ... felt sloppy and I never really got it to work). Option 2- we figure out how to assign vertex colors using the three.json 3 rules for face data. See here: https://github.com/mrdoob/three.js/wiki/JSON-Model-format-3 It looks like we can assign vertex colors, face colors, and materials (as well as quads) by setting a type. We have always just been setting 0 ... which is a triangle. I don't know if I forgot that from the hackathon or just never knew ... but the Three.js json loader is set up to test for these types. This seems like the robust solution. |
See my response to issue #3 On Thu, Nov 13, 2014 at 12:06 PM, Ben Howes notifications@github.com
|
Take a mesh with color data (and optional attribute names and values) and output a json representation of the mesh and a list of all necessary materials for the compiler to consume.
The text was updated successfully, but these errors were encountered: