summaryrefslogtreecommitdiff
path: root/doc/classes
diff options
context:
space:
mode:
authorJordan Schidlowsky <jordan@winterpixel.com>2020-12-17 14:26:05 -0600
committerJordan Schidlowsky <jordan@noodlecake.com>2020-12-17 16:09:32 -0600
commit2d56e092765affde1904e76fe912329db0e9eab6 (patch)
treec3e918c0f993d75c4fbf13519eeb4b2db6bb8041 /doc/classes
parent2c0d1c3b91a048c8aab6856c9821a98280ad82e6 (diff)
packed*arrays are pass by ref now. support duplicate and update documentation
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/PackedByteArray.xml8
-rw-r--r--doc/classes/PackedColorArray.xml8
-rw-r--r--doc/classes/PackedFloat32Array.xml8
-rw-r--r--doc/classes/PackedFloat64Array.xml8
-rw-r--r--doc/classes/PackedInt32Array.xml8
-rw-r--r--doc/classes/PackedInt64Array.xml8
-rw-r--r--doc/classes/PackedStringArray.xml8
-rw-r--r--doc/classes/PackedVector2Array.xml8
-rw-r--r--doc/classes/PackedVector3Array.xml8
9 files changed, 63 insertions, 9 deletions
diff --git a/doc/classes/PackedByteArray.xml b/doc/classes/PackedByteArray.xml
index 91d066260b..0cef26df79 100644
--- a/doc/classes/PackedByteArray.xml
+++ b/doc/classes/PackedByteArray.xml
@@ -5,7 +5,6 @@
</brief_description>
<description>
An [Array] specifically designed to hold bytes. Packs data tightly, so it saves memory for large array sizes.
- [b]Note:[/b] This type is passed by value and not by reference.
</description>
<tutorials>
</tutorials>
@@ -86,6 +85,13 @@
GZIP has a maximal compression ratio of 1032:1, meaning it's very possible for a small compressed payload to decompress to a potentially very large output. To guard against this, you may provide a maximum size this function is allowed to allocate in bytes via [code]max_output_size[/code]. Passing -1 will allow for unbounded output. If any positive value is passed, and the decompression exceeds that amount in bytes, then an error will be returned.
</description>
</method>
+ <method name="duplicate">
+ <return type="PackedByteArray">
+ </return>
+ <description>
+ Creates a copy of the array, and returns it.
+ </description>
+ </method>
<method name="empty">
<return type="bool">
</return>
diff --git a/doc/classes/PackedColorArray.xml b/doc/classes/PackedColorArray.xml
index 3065d16945..b45e2cbe2e 100644
--- a/doc/classes/PackedColorArray.xml
+++ b/doc/classes/PackedColorArray.xml
@@ -5,7 +5,6 @@
</brief_description>
<description>
An [Array] specifically designed to hold [Color]. Packs data tightly, so it saves memory for large array sizes.
- [b]Note:[/b] This type is passed by value and not by reference.
</description>
<tutorials>
</tutorials>
@@ -53,6 +52,13 @@
Appends a [PackedColorArray] at the end of this array.
</description>
</method>
+ <method name="duplicate">
+ <return type="PackedColorArray">
+ </return>
+ <description>
+ Creates a copy of the array, and returns it.
+ </description>
+ </method>
<method name="empty">
<return type="bool">
</return>
diff --git a/doc/classes/PackedFloat32Array.xml b/doc/classes/PackedFloat32Array.xml
index ab9594d2e3..d6825dbcd7 100644
--- a/doc/classes/PackedFloat32Array.xml
+++ b/doc/classes/PackedFloat32Array.xml
@@ -5,7 +5,6 @@
</brief_description>
<description>
An [Array] specifically designed to hold 32-bit floating-point values. Packs data tightly, so it saves memory for large array sizes.
- [b]Note:[/b] This type is passed by value and not by reference.
If you need to pack 64-bit floats tightly, see [PackedFloat64Array].
</description>
<tutorials>
@@ -54,6 +53,13 @@
Appends a [PackedFloat32Array] at the end of this array.
</description>
</method>
+ <method name="duplicate">
+ <return type="PackedFloat32Array">
+ </return>
+ <description>
+ Creates a copy of the array, and returns it.
+ </description>
+ </method>
<method name="empty">
<return type="bool">
</return>
diff --git a/doc/classes/PackedFloat64Array.xml b/doc/classes/PackedFloat64Array.xml
index 3088aee483..9b6df93cf5 100644
--- a/doc/classes/PackedFloat64Array.xml
+++ b/doc/classes/PackedFloat64Array.xml
@@ -5,7 +5,6 @@
</brief_description>
<description>
An [Array] specifically designed to hold 64-bit floating-point values. Packs data tightly, so it saves memory for large array sizes.
- [b]Note:[/b] This type is passed by value and not by reference.
If you only need to pack 32-bit floats tightly, see [PackedFloat32Array] for a more memory-friendly alternative.
</description>
<tutorials>
@@ -54,6 +53,13 @@
Appends a [PackedFloat64Array] at the end of this array.
</description>
</method>
+ <method name="duplicate">
+ <return type="PackedFloat64Array">
+ </return>
+ <description>
+ Creates a copy of the array, and returns it.
+ </description>
+ </method>
<method name="empty">
<return type="bool">
</return>
diff --git a/doc/classes/PackedInt32Array.xml b/doc/classes/PackedInt32Array.xml
index eded545de8..7923b268a4 100644
--- a/doc/classes/PackedInt32Array.xml
+++ b/doc/classes/PackedInt32Array.xml
@@ -5,7 +5,6 @@
</brief_description>
<description>
An [Array] specifically designed to hold 32-bit integer values. Packs data tightly, so it saves memory for large array sizes.
- [b]Note:[/b] This type is passed by value and not by reference.
[b]Note:[/b] This type stores signed 32-bit integers, which means it can take values in the interval [code][-2^31, 2^31 - 1][/code], i.e. [code][-2147483648, 2147483647][/code]. Exceeding those bounds will wrap around. In comparison, [int] uses signed 64-bit integers which can hold much larger values. If you need to pack 64-bit integers tightly, see [PackedInt64Array].
</description>
<tutorials>
@@ -54,6 +53,13 @@
Appends a [PackedInt32Array] at the end of this array.
</description>
</method>
+ <method name="duplicate">
+ <return type="PackedInt32Array">
+ </return>
+ <description>
+ Creates a copy of the array, and returns it.
+ </description>
+ </method>
<method name="empty">
<return type="bool">
</return>
diff --git a/doc/classes/PackedInt64Array.xml b/doc/classes/PackedInt64Array.xml
index 83731b1023..f7e9128410 100644
--- a/doc/classes/PackedInt64Array.xml
+++ b/doc/classes/PackedInt64Array.xml
@@ -5,7 +5,6 @@
</brief_description>
<description>
An [Array] specifically designed to hold 64-bit integer values. Packs data tightly, so it saves memory for large array sizes.
- [b]Note:[/b] This type is passed by value and not by reference.
[b]Note:[/b] This type stores signed 64-bit integers, which means it can take values in the interval [code][-2^63, 2^63 - 1][/code], i.e. [code][-9223372036854775808, 9223372036854775807][/code]. Exceeding those bounds will wrap around. If you only need to pack 32-bit integers tightly, see [PackedInt32Array] for a more memory-friendly alternative.
</description>
<tutorials>
@@ -54,6 +53,13 @@
Appends a [PackedInt64Array] at the end of this array.
</description>
</method>
+ <method name="duplicate">
+ <return type="PackedInt64Array">
+ </return>
+ <description>
+ Creates a copy of the array, and returns it.
+ </description>
+ </method>
<method name="empty">
<return type="bool">
</return>
diff --git a/doc/classes/PackedStringArray.xml b/doc/classes/PackedStringArray.xml
index c71f5ffa7e..1ae0d55177 100644
--- a/doc/classes/PackedStringArray.xml
+++ b/doc/classes/PackedStringArray.xml
@@ -5,7 +5,6 @@
</brief_description>
<description>
An [Array] specifically designed to hold [String]s. Packs data tightly, so it saves memory for large array sizes.
- [b]Note:[/b] This type is passed by value and not by reference.
</description>
<tutorials>
<link title="OS Test Demo">https://godotengine.org/asset-library/asset/677</link>
@@ -54,6 +53,13 @@
Appends a [PackedStringArray] at the end of this array.
</description>
</method>
+ <method name="duplicate">
+ <return type="PackedStringArray">
+ </return>
+ <description>
+ Creates a copy of the array, and returns it.
+ </description>
+ </method>
<method name="empty">
<return type="bool">
</return>
diff --git a/doc/classes/PackedVector2Array.xml b/doc/classes/PackedVector2Array.xml
index 5f68d9256d..9ab3a03edb 100644
--- a/doc/classes/PackedVector2Array.xml
+++ b/doc/classes/PackedVector2Array.xml
@@ -5,7 +5,6 @@
</brief_description>
<description>
An [Array] specifically designed to hold [Vector2]. Packs data tightly, so it saves memory for large array sizes.
- [b]Note:[/b] This type is passed by value and not by reference.
</description>
<tutorials>
<link title="2D Navigation Astar Demo">https://godotengine.org/asset-library/asset/519</link>
@@ -54,6 +53,13 @@
Appends a [PackedVector2Array] at the end of this array.
</description>
</method>
+ <method name="duplicate">
+ <return type="PackedVector2Array">
+ </return>
+ <description>
+ Creates a copy of the array, and returns it.
+ </description>
+ </method>
<method name="empty">
<return type="bool">
</return>
diff --git a/doc/classes/PackedVector3Array.xml b/doc/classes/PackedVector3Array.xml
index e681e1deb7..80787547ac 100644
--- a/doc/classes/PackedVector3Array.xml
+++ b/doc/classes/PackedVector3Array.xml
@@ -5,7 +5,6 @@
</brief_description>
<description>
An [Array] specifically designed to hold [Vector3]. Packs data tightly, so it saves memory for large array sizes.
- [b]Note:[/b] This type is passed by value and not by reference.
</description>
<tutorials>
</tutorials>
@@ -53,6 +52,13 @@
Appends a [PackedVector3Array] at the end of this array.
</description>
</method>
+ <method name="duplicate">
+ <return type="PackedVector3Array">
+ </return>
+ <description>
+ Creates a copy of the array, and returns it.
+ </description>
+ </method>
<method name="empty">
<return type="bool">
</return>