Difference between revisions of "ParticleSystem:getColors"

(Updated for 11.0)
(This method has always returned tables.)
 
Line 6: Line 6:
 
=== Synopsis ===
 
=== Synopsis ===
 
<source lang="lua">
 
<source lang="lua">
r1, g1, b1, a1, r2, g2, b2, a2, ..., r8, g8, b8, a8 = ParticleSystem:getColors( )
+
rgba1, rgba2, ..., rgba8 = ParticleSystem:getColors( )
 
</source>
 
</source>
 
=== Arguments ===
 
=== Arguments ===
 
Nothing.
 
Nothing.
 
=== Returns ===
 
=== Returns ===
{{param|number|r1|First color, red component (0-1).}}
+
{{param|table|rgba1|First color, a numerical indexed table with the red, green, blue and alpha values as numbers (0-1).}}
{{param|number|g1|First color, green component (0-1).}}
+
{{param|table|rgba2|Second color, a numerical indexed table with the red, green, blue and alpha values as numbers (0-1).}}
{{param|number|b1|First color, blue component (0-1).}}
+
{{param|table|rgba8|Eighth color, a numerical indexed table with the red, green, blue and alpha values as numbers (0-1).}}
{{param|number|a1|First color, alpha component (0-1).}}
 
{{param|number|r2|Second color, red component (0-1).}}
 
{{param|number|g2|Second color, green component (0-1).}}
 
{{param|number|b2|Second color, blue component (0-1).}}
 
{{param|number|a2|Second color, alpha component (0-1).}}
 
{{param|number|r8|Eighth color, red component (0-1).}}
 
{{param|number|g8|Eighth color, green component (0-1).}}
 
{{param|number|b8|Eighth color, blue component (0-1).}}
 
{{param|number|a8|Eighth color, alpha component (0-1).}}
 
 
== See Also ==
 
== See Also ==
 
* [[parent::ParticleSystem]]
 
* [[parent::ParticleSystem]]

Latest revision as of 15:35, 17 May 2020

Available since LÖVE 0.9.0
This function is not supported in earlier versions.

Gets the series of colors applied to the particle sprite.

In versions prior to 11.0, color component values were within the range of 0 to 255 instead of 0 to 1.

Function

Synopsis

rgba1, rgba2, ..., rgba8 = ParticleSystem:getColors( )

Arguments

Nothing.

Returns

table rgba1
First color, a numerical indexed table with the red, green, blue and alpha values as numbers (0-1).
table rgba2
Second color, a numerical indexed table with the red, green, blue and alpha values as numbers (0-1).
table rgba8
Eighth color, a numerical indexed table with the red, green, blue and alpha values as numbers (0-1).

See Also

Other Languages