XML Feeds

.

[javascript-dev] bug? with jit.matrix and planemap in js

pnyboer pnyboer at slambassador.com
Mon Aug 13 17:30:13 MDT 2007


I'm trying to map the green channel to the alpha channel using planemap in javascript.  the js and patch below show that (what I belive to be) equivalent situations produce different results - works in 'visual' max, but not in js max.


//-----begin map.js

	var mov = new JitterObject("jit.qt.movie");
	mov.autostart = 1;
	mov.adapt = 1;

	var outmatrix = new JitterMatrix(4,"char");
	outmatrix.adapt = 1;
	outmatrix.planemap = [2,1,2,3];

function bang(){	
	mov.matrixcalc(outmatrix,outmatrix);
	outlet(0,"jit_matrix",outmatrix.name);
}

function read(v){
	rv = mov.read(v);
}

function getit(){
	post("planemap is: ",outmatrix.planemap[0],outmatrix.planemap[1],outmatrix.planemap[2],outmatrix.planemap[3]);
}

//////------end map.js-------------

-----begin patch map.js.help----

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P comment 557 260 100 196617 it works here!;
#P user jit.pwindow 801 195 82 62 0 1 0 0 1 0;
#P user jit.pwindow 720 195 82 62 0 1 0 0 1 0;
#P user jit.pwindow 639 195 82 62 0 1 0 0 1 0;
#P user jit.pwindow 558 195 82 62 0 1 0 0 1 0;
#P newex 683 146 66 196617 jit.unpack;
#P newex 577 125 143 196617 jit.matrix @planemap 2 1 2 3;
#P newex 577 104 63 196617 jit.qt.movie;
#P comment 184 308 235 196617 <--according to the report \, the @ is correctly set;
#P message 151 306 31 196617 getit;
#P newex 126 128 21 196617 t 1;
#P user jit.pwindow 441 196 82 62 0 1 0 0 1 0;
#P user jit.pwindow 360 196 82 62 0 1 0 0 1 0;
#P user jit.pwindow 279 196 82 62 0 1 0 0 1 0;
#P user jit.pwindow 198 196 82 62 0 1 0 0 1 0;
#P newex 323 147 66 196617 jit.unpack;
#P toggle 174 110 15 0;
#P newex 175 131 46 196617 metro 3;
#P user jit.pwindow 64 195 82 62 0 1 0 0 1 0;
#P user dropfile 48 19 154 117 1;
#P window linecount 2;
#P comment 51 55 100 196617 drag and drop a file here...;
#P window linecount 1;
#P newex 53 127 68 196617 prepend read;
#P newex 57 158 52 196617 js map.js;
#P window linecount 3;
#P comment 195 263 100 196617 why isn't the planemap in the js doing its job?;
#P connect 4 0 2 0;
#P connect 6 0 1 0;
#P connect 2 0 1 0;
#P connect 14 0 1 0;
#P connect 1 0 5 0;
#P connect 2 0 13 0;
#P connect 13 0 7 0;
#P connect 7 0 6 0;
#P connect 8 0 9 0;
#P connect 8 1 10 0;
#P connect 1 0 8 0;
#P connect 8 2 11 0;
#P connect 8 3 12 0;
#P connect 18 0 19 0;
#P connect 6 0 16 0;
#P connect 2 0 16 0;
#P connect 16 0 17 0;
#P connect 18 1 20 0;
#P connect 17 0 18 0;
#P connect 18 2 21 0;
#P connect 18 3 22 0;
#P window clipboard copycount 24;

-----end patch map.js.help--------

--
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The Lifespan
2 oz brandy
1/2 oz orgeat
1/2 oz maraschino
3/4 oz mix of (meyer) lemon and (yellow) grapefruit juice
Shake with ice and serve in a Pernod-rinsed cocktail glass


More information about the javascript-dev mailing list