jsui (javascript) VERY basic question

Dec 30, 2011 at 4:28pm

jsui (javascript) VERY basic question


my first try to use jsui – I started by editing (a copy of) the 360° dial (the one which is in the help file), and want to get rid of the background (the white square in which is the dial) – to have just the round dial.

If I got it right the colors are in the RGBA values, and when i can change the color of the background, I can not make it disappear

what i do is messing with
var vbrgb = [1.,1.,1.,1];

changing the values of the first 3 params (RGB) works, when the last one (A) does not seem to make any effect

why is it so? any advice?

many thanks



360 dial

arguments: fgred fggreen fgblue bgred bggreen bgblue dialred dialgreen dialblue


var val = 0;
var vbrgb = [1.,1.,1.,1];
var vfrgb = [0.2,0.2,0.2,1];
var vrgb2 = [0.7,0.7,0.7,1];
var last_x = 0;
var last_y = 0;

Dec 30, 2011 at 6:37pm

Hi Kasper,

I think (emphasis on “think” here) that is the alpha-color. Try setting it to zero and my guess is that the color won’t show. Or set it to 0.5 and place another object behind it, if my assumptions are correct it will be partially transparent.


Dec 30, 2011 at 11:28pm

well yes, i also THOUGHT this.
but doing so i see no difference

i hoped that with alpha at zero and anything behind i would see onlt what is behind. but no



Dec 31, 2011 at 12:59am

I think you may be stuck with a white background but other things you draw should be able to have variable opacity. I could be wrong but I remember a discussion about the pros and cons of [jsui] by itself and [js] with [lcd] which can have a transparent background.

Dec 31, 2011 at 6:26am

Check out some of the jsui mgraphics examples. They do transparency.

Dec 31, 2011 at 7:06am


some of your design? could not find what it is…….

any pointer?

thank you


Dec 31, 2011 at 7:17am

Sorry. In the Max examples folder. /Max6/examples/javasript/ui-mgraphics/ holds some patches… look for mgraphics-yellowfade.maxpat.


Dec 31, 2011 at 12:54pm




You must be logged in to reply to this topic.