three.js - Distributing colour swatch to IcosahedronGeometry faces -


i have icosahedrongeometry , distributed array of 3 blue colours evenly possible on icosahedrongeometry faces adjacent faces use different colour array. change array have 4 colours if work better?

i don't understand math enough know in order faces applied icosahedrongeometry.

i've tried like:

var colours = [0x62a5dc, 0x4577b9, 0x2b2b5d];  ( var = 0; < geometry.faces.length; ++ )  {   if(i<5) geometry.faces[ ].color.sethex( colours[0] );   else if(i<10) geometry.faces[ ].color.sethex( colours[1] );   else geometry.faces[ ].color.sethex( colours[2] ); } 

but didn't have great result

have @ utility program http://threejs.org/examples/misc_uv_tests.html.

it shows uv map, , can see faces share edge.

remember, wraps. face numbers wrap, too. in image below, face numbers on right edge 19 , 14.

three.js r.58

enter image description here


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -