[javascript-dev] How to get matrixoutput from jit.gl.gridshape
Jack Phillips
jackwphillips at gmail.com
Sat Dec 29 23:14:07 MST 2007
- Previous message: [javascript-dev] jsui border color
- Next message: [javascript-dev] How to get matrixoutput from jit.gl.gridshape
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi list,
I'm currently trying to get the hang of javascript with jitter, but
I've hit a bit of a snag. I'm trying to recreate Andrew's Jitter
Recipe 12: Texture Distortion in js. I need to be able to grab the
output matrix of a jit.gl.gridshape object in matrixoutput mode. 1)
How do I do this? and 2) Is it necessary to declare a render
destination if the gridshape is only used in matrixoutput mode?
Here's the relevant code:
var myShape = new JitterObject("jit.gl.gridshape"); //Render
destination necessary?
myShape.shape = "plane";
myShape.dim = [2, 2];
myShape.matrixoutput = 1;
var shapeMatrix = new JitterMatrix(3, "float32", 2, 2);
function bang() {
myShape.matrixcalc(shapeMatrix, shapeMatrix) //What's the right
method call?
outlet(0, "jit_matrix", shapeMatrix.name);
}
Thanks for any insights.
- Previous message: [javascript-dev] jsui border color
- Next message: [javascript-dev] How to get matrixoutput from jit.gl.gridshape
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
