Forums > Javascript

transparency in jsui

May 19, 2008 | 9:02 pm

I wanted to get a transparent back ground in the jsui_360dial.js. I
simply replaced the line

var vbrgb = [1.,1.,1.,1.];

with

var vbrgb = [1.,1.,1.,0.];

It doesn’t seem to work. Is it possible at all, or do I miss the too
obvious?…

I thought

glclearcolor(vbrgb[0],vbrgb[1],vbrgb[2],vbrgb[3]);

or

glclearcolor(vbrgb);

followed by

glclear()

should just execute it…

The other question would be, if it is possible to define attributes in
js which would appear in the jsui inspector. That would be nice for
colours for example…

Stefan


Stefan Tiedje————x——-
–_____———–|————–
–(_|_ —-|—–|—–()——-
– _|_)—-|—–()————–
———-()——–www.ccmix.com


May 19, 2008 | 9:35 pm

On 19 mai 08, at 23:02, Stefan Tiedje wrote:

> I wanted to get a transparent back ground in the jsui_360dial.js. I
> simply replaced the line

Transparency of a jsui object is not currently available. This is
something which will happen at some point in the future though.

> The other question would be, if it is possible to define attributes
> in js which would appear in the jsui inspector. That would be nice
> for colours for example…

If you declare an attribute, it automatically appears in the js/jsui
inspector:

var foo = 74;
declareattribute(foo);

HTH,
ej


May 20, 2008 | 5:31 am

Emmanuel Jourdan schrieb:
> Transparency of a jsui object is not currently available. This is
> something which will happen at some point in the future though.

Too bad, is there a way to find out the colour a jsui is sitting on? The
I could do a fake transparency…

> If you declare an attribute, it automatically appears in the js/jsui
> inspector:
>
> var foo = 74;
> declareattribute(foo);

I tried this and simply added:

declareattribute(vbrgb);
declareattribute(vfrgb);
declareattribute(vrgb2);

and yes they show up, but instead of the attribute name I see the
default values, not too helpful as description, and when changing them
they don’t seem to pass the values…

And if it would work, it would be nice if the examples of all these jsui
examples in the help file reflect this. Then it would not be necessary
to define the colours with arguments…

Stefan


Stefan Tiedje————x——-
–_____———–|————–
–(_|_ —-|—–|—–()——-
– _|_)—-|—–()————–
———-()——–www.ccmix.com


May 20, 2008 | 7:33 am

On 20 mai 08, at 07:31, Stefan Tiedje wrote:

> Too bad, is there a way to find out the colour a jsui is sitting on?
> The I could do a fake transparency…

suckhah? If you need real transparency, you can also send commands to
lcd.

> I tried this and simply added:
>
> declareattribute(vbrgb);
> declareattribute(vfrgb);
> declareattribute(vrgb2);
>
> and yes they show up, but instead of the attribute name I see the
> default values, not too helpful as description, and when changing
> them they don’t seem to pass the values…
>
> And if it would work, it would be nice if the examples of all these
> jsui examples in the help file reflect this. Then it would not be
> necessary to define the colours with arguments…

Here’s an example. It display toto and bgcolor as attribute name in
the inspector. bgcolor is saved with the patcher.

var toto = 74;
var bgcolor = [ 1., 1., 0.6, 0.8 ];

declareattribute("toto");
declareattribute("bgcolor", null, null, 1);

function bang()
{
post(toto, "n");
post(bgcolor, "n");

}

ej


June 7, 2010 | 7:23 pm

Did transparency in jsui ever happen? Is it still planned?


June 7, 2010 | 11:34 pm

It will happen eventually, but I don’t see it happening in a foreseeable future. In the meantime, lcd (or C, with jgraphics) can do transparency.


December 27, 2013 | 10:52 am

Hi, anything new on this over the past three years?

Thanks!


December 27, 2013 | 11:49 am

Hi :)
with mgraphics you can use transparency in jsui


Viewing 8 posts - 1 through 8 (of 8 total)