cnr-isti-vclab / meshlabjs

A javascript client based mesh processing tool. Built using vcg library, emscripten and webgl
http://www.meshlabjs.net
GNU Affero General Public License v3.0
228 stars 51 forks source link

changing Albedo Color programatically #111

Open mrweix opened 8 years ago

mrweix commented 8 years ago

What would be a correct way to change the Albedo Color programatically? Which function is called? I only find

flags.onChange(hsb, hex, rgb, el, bySetColor);

in Component.js. How can I call something similar from outside? Thanks for any tips!

cignoni commented 8 years ago

the correct way to programmatically change the color of a mesh is to use the new color function filters that allow to define r g b for each vertex/face of the mesh according to a user defined function. Currently they are added in the muparser branch but, hopefully this branch will soon be merged into master one.