Forums > Jitter

How to send attributes values of jit.gl.camera in Max from JS ??

May 25, 2012 | 10:21 am

Hello,

I know how to pass data from an object to a JS object. ok.
I know how to listen specific outputs of object encapsulated/instantiated inside a JS. ok.

I miss how to listen position attributes of jit.gl.camera (for instance) from a JS.

Is the only way to trigger for each cam move the message (getposition) to jit.gl.camera and handle this from my JS code ?
raw… no?

any clue for me?


May 25, 2012 | 6:16 pm

if your gl.camera is instantiated inside of js, simply create a js function to poll whatever attributes you are interested in:

function bang() {
var campos = mycamera.position;
// do amazing things with campos
}


May 25, 2012 | 6:30 pm

if it is instantiated outside the js, I guess the more natural way is a patch cable, a function etc…


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