PackedColorArray¶
A packed array of Colors.
Description¶
An array specifically designed to hold Color. Packs data tightly, so it saves memory for large array sizes.
Note
There are notable differences when using this API with C#. See C# API differences to GDScript for more information.
Constructors¶
PackedColorArray ( ) |
|
PackedColorArray ( PackedColorArray from ) |
|
PackedColorArray ( Array from ) |
Methods¶
void |
append_array ( PackedColorArray array ) |
void |
clear ( ) |
duplicate ( ) |
|
void |
|
is_empty ( ) const |
|
void |
|
void |
reverse ( ) |
void |
|
size ( ) const |
|
void |
sort ( ) |
to_byte_array ( ) const |
Operators¶
operator != ( PackedColorArray right ) |
|
operator + ( PackedColorArray right ) |
|
operator == ( PackedColorArray right ) |
|
operator [] ( int index ) |
Constructor Descriptions¶
PackedColorArray PackedColorArray ( )
Constructs an empty PackedColorArray.
PackedColorArray PackedColorArray ( PackedColorArray from )
Constructs a PackedColorArray as a copy of the given PackedColorArray.
PackedColorArray PackedColorArray ( Array from )
Constructs a new PackedColorArray. Optionally, you can pass in a generic Array that will be converted.
Note: When initializing a PackedColorArray with elements, it must be initialized with an Array of Color values:
var array = PackedColorArray([Color(0.1, 0.2, 0.3), Color(0.4,