hi there...
does anybody know if it is possible to tween rgba values ?
for example rgba(0,0,0,0) to rgba(255,255,0,1.0);
best,
index
hi there...
does anybody know if it is possible to tween rgba values ?
for example rgba(0,0,0,0) to rgba(255,255,0,1.0);
best,
index
Hi,
krpano colors values in hexadecimal format - yes:
https://krpano.com/docu/actions/#tween
Best regards,
Klaus
the docs say:
When the variable name contains the word 'color', then process the variable value as 32bit ARGB color value.
somehow i dont get it... i do this:
set(plugin[filter].color,'#000000');
tween(plugin[filter].color,'#ff00ff',1.0);
but that doesnt seem to work,
the pugin gets strange values then.
:/
do you have to use the alpha? like this? #ffff00ff?
or 0xff00ff... ?
rgba(255,0,255,1.0) ?
The krpano action system supports only integer numbers as color values.
And integer numbers itself either can be written either in normal decimal format or in the '0x' hexadecimal format (e.g. 0xAARRGGBB).
The html color strings with the '#' prefix or rgb()/rgba() functions are not supported.
E.g. try:
ok, tx klaus,
extended the color interpreter in the plugin to read 0x hex and decimal values :)
hm sorry.. doch noch eine letzte frage:
werden beim tweenen von colors
die r,g,b,a channels eigentlich intern aufgesplittet und separat getweent?
zb: wenn ich 0x0000ff nach 0xff00ff tweene...
müsste es eigentlich so funktionieren, oder?
0x0000ff, 0x1100ff, 0x2200ff, ..., 0xdd00ff, 0xee00ff, 0xff00ff
oder ist es einfach nur nominell....
0x0000ff, 0x000100, 0x000101, 0x000102, etc...
indx
werden beim tweenen von colors
die r,g,b,a channels eigentlich intern aufgesplittet und separat getweent?
Ja - in A,R,G,B - alles andere wäre relativ sinnlos
:P true...
dennoch hab ich probleme...
wenn ich ARGB 0x00ff00ff (violett, invisible) nach ARGB 0xff00ff00 (grün,visible) tweene,
funktioniert das zwar mit den farben, aber der alpha bleibt 0 und springt erst mit dem letzten wert auf 1!
es scheint auch, dass du bei einem tween ziel von 0xff00ff0 automatisch nach 0x10000ff00 tweenst,
um ein alpha von 1.0 zu erreichen... stimmt das?
erst dort verändert sich jedenfalls auch der alpha wert... vorher bleibt er immer 0x00
lg index
hier der console output während des tweens von 0x00ff00ff nach 0xff00ff00...
[Log] GET tintcolor=0x00ff00ff
[Log] GET tintcolor=0x00d727d7
[Log] GET tintcolor=0x00a559a5
[Log] GET tintcolor=0x00926c92
[Log] GET tintcolor=0x00867886
[Log] GET tintcolor=0x006d916d
[Log] GET tintcolor=0x0059a559
[Log] GET tintcolor=0x0046b846
[Log] GET tintcolor=0x0034ca34
[Log] GET tintcolor=0x0027d727
[Log] GET tintcolor=0x001ae41a
[Log] GET tintcolor=0x0010ee10
[Log] GET tintcolor=0x0009f509
[Log] GET tintcolor=0x0004fa04
[Log] GET tintcolor=0x0000fe00
[Log] GET tintcolor=0x10000ff00
Hi,
stimmt da gibt es einen kleinen Bug - ich hatte leider nicht bedacht das Javascript intern bei bestimmten Bit-Operationen mit vorzeichenbehafteten 32bit Integer Variablen rechnet - das führt bei der Aufteilung des 32bit ARGB Farbwertes in die einzelnen Farben bei dem Alpha Wert zu numerischen Problemen...
Da bei den meisten krpano Farbvariablen RGB Werte mit separaten Alpha Wert verwendet werden, fiel das Problem bisher leider noch nicht auf.
In der nächsten krpano Version wird dies aber auf alle Fälle behoben sein.
Schöne Grüße,
Klaus
Don’t have an account yet? Register yourself now and be a part of our community!