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

Nov 20, 2009 at 5:36am

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

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

#46540
Nov 21, 2009 at 5:19pm

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.

#167473

You must be logged in to reply to this topic.