Using jit.iter and jit.spill in JavaScript

Apr 19, 2007 at 5:50pm

Using jit.iter and jit.spill in JavaScript

I have an application that uses JitterMatrix objects in JavaScript. Some of the matrices have a 2D array in a single plane with 1024 cells. I would like to rapidly and efficiently traverse these matrices retrieving the cell values, but not use the JitterMatrix.getcell() method within a for-loop. Is it possible to use a jit.iter or jit.spill object within JavaScript to quickly extract JitterMatrix array data? If so, I’ve been unable so far to find any JavaScript examples of how to use these 2 objects. The Jitter tutorial PDF mentions that they can be used, but I didn’t see any JavaScript examples of their usage. I also searched in the Jitter JavaScript examples directories of the installation materials, but couldn’t find anything there, either.

Any advice would be greatly appreciated.

Thanks.

#31481
Apr 20, 2007 at 9:56pm

On Apr 19, 2007, at 10:50 AM, Steve Bursch wrote:

>
> I have an application that uses JitterMatrix objects in
> JavaScript. Some of the matrices have a 2D array in a single plane
> with 1024 cells. I would like to rapidly and efficiently traverse
> these matrices retrieving the cell values, but not use the
> JitterMatrix.getcell() method within a for-loop. Is it possible to
> use a jit.iter or jit.spill object within JavaScript to quickly
> extract JitterMatrix array data?

Sorry, these object won’t work within JS. The JS equivalent would be
exactly the getcell strategy you describe. However, if you’re going
to process the values you might want to try and use jit.expr even
from within JS. See the tutorials and the jsglsurface-example.pat for
some demonstrations of this jit.expr from JS technique.

-Joshua

#102486
Apr 20, 2007 at 10:02pm

Okay, thanks. I’ll take a look at the jit.expr object.

—Steve

#102487
Jun 5, 2013 at 3:00pm

Hey folks, I was trying to instantiate a jit.iter in my javascript like so…

var jititer = new JitterObject(“jit.iter”);

But get the following error…

jsjitterobject_Constructor: null class pointer jit_iter

From the post above it would appear that jit.iter is not supported in js.
Is this still the case? I want to iterate through a matrix, what is the best
method to do this in js now?

Thanks,

Anthony

#251803
Jun 5, 2013 at 3:48pm

Hey Anthony,

As JKC mentioned above, the best way to do this is still JitterMatrix.getcell().

-Ben

#251809

You must be logged in to reply to this topic.