[javascript-dev] Re: Re: slabs and planes in js
Tyler
junk at odbol.com
Thu May 22 01:45:48 MDT 2008
- Previous message: [javascript-dev] ;max
- Next message: [javascript-dev] reloading jsextensions
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Ahhh, thank you so much for this code.. it's exactly what I needed. However, moving a bit further ahead I am stuck:
Right now I'm compositing an array of these effect chains with multiple videoplanes stacked on one another. I change the opacity of the videoplane to blend the clip with the others, however this is not quite the effect I want. Before I was using a jit.gl.slab Max object with "43j-fourwaymix.jxs" from the tutorial. I'm trying to get it to work in Javascript using the mixer and just one videoplane, but I can't figure out how to input FOUR textures into a slab object - it only has the one .texture property.
I tried something like this:
//this code isn't quite complete. it's riffing off of your example just to give the basic idea...
var GL_CONTEXT = "foo";
var outplane = null;
outplane = new JitterObject("jit.gl.videoplane",GL_CONTEXT);
outplane.automatic = 0;
outplane.transform_reset = 2;
var mixerObj = null;
mixerObj = new JitterObject("jit.gl.slab", GL_CONTEXT);
mixerObj.file = "43j-fourwaymix.jxs";
mixerObj.param("a", 1.0); //set first clip to be visible
var outslab = null;
outslab = new JitterObject("jit.gl.slab",GL_CONTEXT);
outslab.file = "co.normal.jxs";
outslab.param("amount",0.5);
function jit_matrix(m) {
outslab.activeinput = inlet;
outslab.jit_matrix(m);
outslab.draw();
//use a slab's texture as the first input to the mixer.
/******this is the part I can't get to work!******/
mixerObj.param("tex0", outslab.capture);
//output mixer to screen
mixerObj.draw();
outplane.texture = mixerObj.capture;
outplane.draw();
}
- Previous message: [javascript-dev] ;max
- Next message: [javascript-dev] reloading jsextensions
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
