Forums > Javascript

jitter matrix input to javascript

August 1, 2011 | 4:56 pm

i am getting into javascript, but its quite hard for me, without any programming background.. can someone help me, with getting values, from one plane, float matrix, with fixed dimension?
thanks tor help

August 1, 2011 | 9:31 pm

unfortunately i don’t know much about jit.matrix… i would guess it will come as an array to javascript, than you will have to do a "for" loop in your script to go through all cells..

if you post a simple example patch, with a jit matrix being filled and than dumped out, would be super easy to help ( :

might be from your interested this simple javascript example i put in this topic, and surely would help you to understand some stuff in javascript:

good luck in your programming journey !

April 27, 2013 | 10:35 am

i am trying to learn some javascript and want to understand how to get a jitter-matrix input into js-code. As an example in the Jitter tutorial 46: In the attached JS-File there is a jit.noise object generated for the attractors.

// create a [jit.noise] object for attractor generation
var attgen = new JitterObject("jit.noise");
attgen.dim = ATTRACTOR_COUNT;
attgen.planecount = 3;
attgen.type = "float32";

if I don’t want random attractor points, but generate a 3plane float32 matrix in Jitter, how can I then feed this jitter-generated-matrix into the JS-File and replace the jit.noise with it?

April 29, 2013 | 10:33 pm

create a named jitter matrix in your patch:
[ jit.matrix mymatrix 4 char 80 60 ]

reference it in js:
var mat = new JitterMatrix("mymatrix");

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

Forums > Javascript