jitter matrix input to javascript

    Aug 01 2011 | 4:56 pm
    hi 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 joł

    • Aug 01 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: https://cycling74.com/forums/extracting-the-state-of-a-toggle-in-javascript
      good luck in your programming journey !
    • Apr 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?
    • Apr 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");
    • Aug 01 2015 | 3:33 pm
      Hi, I'm very new to Javascript and have the exactly same question as you Tobias ; have you the solution for this specific patch ?