[javascript-dev] jsui mysketch
Samuel Freeman
samuel.freeman at gmail.com
Thu Dec 20 08:12:01 MST 2007
- Previous message: [javascript-dev] jsui mysketch
- Next message: [javascript-dev] jsui mysketch
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Perhaps someone else will be of more help, but I started with js in max at a very similar position, and very soon just gave up on newSketch() / sprite-ish approach an just redraw the whole sketch, that's the way all the examples I've seen work do it. Try having separate functions for the various sliders which will each be called by a master drawing function. On the other hand, I too would still be interested to find out how to get the newSketch thing going... Sam On 20/12/2007, klaus filip <klaus at klingt.org> wrote: > hi > i am trying to build a multi-2D slider as jsui and hanging at the > very basics. > since i don't want to redraw all sliders i want to use multiple > sketches (like sprites). > below is my basic misunderstanding, the function dsketch works, > but the function dsketch2 is doing nothing... > > if somebody already did a jsui for multiple 2D-sliders and wants to > share this, i would not mind as well ;-) > > thanks > klaus > > autowatch = 1; > inlets = 2; > outlets = 1; > sketch.default2d(); > var vbrgb = [0.3,0.3,0.6,0.5]; > var vfrgb = [0.8,0.8,0.3,0.5]; > var width = box.rect[2] - box.rect[0]; > var height = box.rect[3] - box.rect[1]; > > var sketch2 = new Sketch(width,height); > sketch2.default2d(); > > > > function dsketch() > { > with (sketch) > { > glclearcolor(vbrgb); > glclear(); > refresh(); > } > } > > function dsketch2() > { > with (sketch2) > { > glclearcolor(vbrgb); > glclear(); > refresh(); > } > } > _______________________________________________ > javascript-dev mailing list > javascript-dev at cycling74.com > http://www.cycling74.com/mailman/listinfo/javascript-dev >
- Previous message: [javascript-dev] jsui mysketch
- Next message: [javascript-dev] jsui mysketch
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
