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

May 25, 2012 at 10:21am

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

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?

#57800
May 25, 2012 at 6:16pm

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
}

#207370
May 25, 2012 at 6:30pm

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

#207371

You must be logged in to reply to this topic.