transparency in jsui

May 19, 2008 at 9:02pm

transparency in jsui

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

#37886
May 19, 2008 at 9:35pm

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

#131210
May 20, 2008 at 5:31am

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

#131211
May 20, 2008 at 7:33am

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

#131212
Jun 7, 2010 at 7:23pm

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

#131213
Jun 7, 2010 at 11:34pm

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.

#131214
Dec 27, 2013 at 10:52am

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

Thanks!

#276762
Dec 27, 2013 at 11:49am

Hi :)
with mgraphics you can use transparency in jsui

#276763

You must be logged in to reply to this topic.