Forums > Javascript

how come I can't send the 'color' msg to a jit.gl.mesh in javascript?

November 20, 2009 | 5:36 am

if i have a jit.gl.mesh object called myMesh, I can’t send it myMesh.color = [1.0, 0., 0., 1.0]; although the same command works natively in Jitter (feeding a jit.gl.mesh a color $1 0. 0. 1.0) The reason I need it is because I need to be able to send a jit.gl.mesh a color change msg for each individual instance of 5000 meshes and creating a new color matrix each time slows it down…
any suggestions?
thanks-
brian


November 21, 2009 | 5:19 pm

worked around it by using a setall command to a temp matrix, copied into a myMesh.color_matrix() for each object, and it seems to work ok. still, wouldve liked the js equivalent of color = $1 $2 $3 $4 to work.


Viewing 2 posts - 1 through 2 (of 2 total)