jit.gl.handle
I'm trying to do the following and I'm certain that I'm missing something obvious:
var jsketch = new JitterObject("jit.gl.sketch","context");
var jhand = new JitterObject("jit.gl.handle",jsketch.name);
All I want to do is to have the jhand obj be linked to the jsketch obj. (?)
FWIW, I know I can do:
var jsketch = new JitterObject("jit.gl.sketch","context");
var jhand = new JitterObject("jit.gl.handle","context");
And I've also tried:
var jhand = new JitterObject("jit.gl.handle",jsketch);
jml
i'm thinking something along the lines of the following would work in my draw function:
jsketch.rotate = jhand.rotate;
but i'm missing something there as well. :(
jml
I found this thread, where Joshua points out what the correct syntax would be for what I'm trying to do, but it doesn't seem to work in my example.
I am now trying:
function bang()
{
jsketch.glrotate(jhand.rotate);
}
?
Check out jitterhittest.js example provided in the javascript ui
examples:
handledest.position = handle.position;
handledest.rotate = handle.rotate;
You probably don't want to add a glrotate to your command list, but
rather do it for the sketch object's position and rotate attributes
like the above, unless you're doing something really advanced with
jit.gl.sketch's immediate mode.
-Joshua
you're right.
i certainly don't need any extra commands in there. :)
thanks for pointing me in the right direction.
that answers all of my q's about contexts for handlin'.
jml