Add PackedVector4Array Variant type

Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
This commit is contained in:
K. S. Ernest (iFire) Lee
2024-04-08 07:51:34 -07:00
committed by Rémi Verschelde
parent b9e022302a
commit f9b488508c
79 changed files with 1037 additions and 89 deletions
@@ -345,3 +345,12 @@ func test():
prints(x and true)
prints(x or false)
prints(x or true)
# TYPE_PACKED_VECTOR4_ARRAY
x = PackedVector4Array([Vector4.ONE])
prints("TYPE_PACKED_VECTOR4_ARRAY")
prints(not x)
prints(x and false)
prints(x and true)
prints(x or false)
prints(x or true)
@@ -227,3 +227,9 @@ false
true
true
true
TYPE_PACKED_VECTOR4_ARRAY
false
false
true
true
true
@@ -63,6 +63,7 @@ var temp_packed_float64_array: PackedFloat64Array
var temp_packed_color_array: PackedColorArray
var temp_packed_vector2_array: PackedVector2Array
var temp_packed_vector3_array: PackedVector3Array
var temp_packed_vector4_array: PackedVector4Array
@export var test_weak_packed_byte_array = temp_packed_byte_array
@export var test_weak_packed_int32_array = temp_packed_int32_array
@@ -72,6 +73,7 @@ var temp_packed_vector3_array: PackedVector3Array
@export var test_weak_packed_color_array = temp_packed_color_array
@export var test_weak_packed_vector2_array = temp_packed_vector2_array
@export var test_weak_packed_vector3_array = temp_packed_vector3_array
@export var test_weak_packed_vector4_array = temp_packed_vector4_array
@export_range(1, 10) var test_range_weak_packed_byte_array = temp_packed_byte_array
@export_range(1, 10) var test_range_weak_packed_int32_array = temp_packed_int32_array
@@ -123,6 +123,8 @@ var test_weak_packed_vector2_array: PackedVector2Array
hint=TYPE_STRING hint_string="Vector2:Vector2" usage=DEFAULT|SCRIPT_VARIABLE
var test_weak_packed_vector3_array: PackedVector3Array
hint=TYPE_STRING hint_string="Vector3:Vector3" usage=DEFAULT|SCRIPT_VARIABLE
var test_weak_packed_vector4_array: PackedVector4Array
hint=TYPE_STRING hint_string="Vector4:Vector4" usage=DEFAULT|SCRIPT_VARIABLE
var test_range_weak_packed_byte_array: PackedByteArray
hint=TYPE_STRING hint_string="int/RANGE:1,10" usage=DEFAULT|SCRIPT_VARIABLE
var test_range_weak_packed_int32_array: PackedInt32Array
@@ -140,3 +140,7 @@ func test():
# PackedColorArray
value = PackedColorArray()
print(value == null)
# PackedVector4Array
value = PackedVector4Array()
print(value == null)
@@ -34,3 +34,4 @@ false
false
false
false
false
@@ -140,3 +140,7 @@ func test():
# PackedColorArray
value = PackedColorArray()
print(value != null)
# PackedVector4Array
value = PackedVector4Array()
print(value != null)
@@ -34,3 +34,4 @@ true
true
true
true
true
@@ -136,3 +136,7 @@ func test():
# PackedColorArray
value = PackedColorArray()
print(null == value)
# PackedVector4Array
value = PackedVector4Array()
print(null == value)
@@ -33,3 +33,4 @@ false
false
false
false
false
@@ -136,3 +136,7 @@ func test():
# PackedColorArray
value = PackedColorArray()
print(null != value)
# PackedVector4Array
value = PackedVector4Array()
print(null != value)
@@ -33,3 +33,4 @@ true
true
true
true
true
@@ -40,3 +40,4 @@ func test():
print(PackedVector2Array([Vector2.ONE, Vector2.ZERO]))
print(PackedVector3Array([Vector3.ONE, Vector3.ZERO]))
print(PackedColorArray([Color.RED, Color.BLUE, Color.GREEN]))
print(PackedVector4Array([Vector4.ONE, Vector4.ZERO]))
@@ -32,3 +32,4 @@ Node::[signal]property_list_changed
[(1, 1), (0, 0)]
[(1, 1, 1), (0, 0, 0)]
[(1, 0, 0, 1), (0, 0, 1, 1), (0, 1, 0, 1)]
[(1, 1, 1, 1), (0, 0, 0, 0)]