Difference between revisions of "ParticleSystem:getColors"

m (Synopsis: s/set/get/)
(This method has always returned tables.)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
 
{{newin|[[0.9.0]]|090|type=function}}
 
{{newin|[[0.9.0]]|090|type=function}}
 
Gets the series of colors applied to the particle sprite.
 
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 ==
 
== Function ==
 
=== 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-255).}}
+
{{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-255).}}
+
{{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-255).}}
+
{{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-255).}}
 
{{param|number|r2|Second color, red component (0-255).}}
 
{{param|number|g2|Second color, green component (0-255).}}
 
{{param|number|b2|Second color, blue component (0-255).}}
 
{{param|number|a2|Second color, alpha component (0-255).}}
 
{{param|number|r8|Eighth color, red component (0-255).}}
 
{{param|number|g8|Eighth color, green component (0-255).}}
 
{{param|number|b8|Eighth color, blue component (0-255).}}
 
{{param|number|a8|Eighth color, alpha component (0-255).}}
 
 
== 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