tt-acm / Spectacles.GrasshopperExporter

A Spectacles Exporter for Grasshopper
MIT License
7 stars 12 forks source link

Mesh with colored vertices component #7

Open bhowes-tt opened 9 years ago

bhowes-tt commented 9 years ago

Take a mesh with color data and output a json representation of the mesh and a list of all necessary materials for the three.js loader to consume.

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.