Assign array to gl color?

Brodie Matthews's icon

Hey still going through some basics cant seem to update glcolor from function newargs?

Brodie Matthews's icon

newargs1.js
js 0.40 KB


Rob Ramirez's icon

sketch.glcolor ?

Brodie Matthews's icon

haha...okkk ill sit down in a sec

Brodie Matthews's icon

Perfect! Thanks Rob.

Brodie Matthews's icon

Any tips to interpolate between colors?

Rob Ramirez's icon

you can do a simple linear crossfade using vexpr (or implement the same expression in JS):

Max Patch
Copy patch and select New From Clipboard in Max.

Brodie Matthews's icon

Cool i could create a function to mix from a to b.Thanks

Brodie Matthews's icon

id need to create 2 matrix for color a and color b, create an array for $f3 being 0. to 1. and * each matrice? or could i minus one array from another and add or minus from the specific array?

im way over my programming ability, my goal be able to fade alphas and slide between positions.maybe i could try some smaller systems.

Brodie Matthews's icon

ill look into multiplying matrices, at the moment i can manage running the calculations independently.ill try use task as mix 0/100, let me your thoughts?