Archmage.Vec3
A 3D vector, the type of a vector field whose elements are not 32-bit, such as int64, uint16 or float64.
Inherits: RefCounted
A vector field whose elements are 32-bit, such as int32 or float32, is a Vector3i or Vector3 instead.
Properties
Section titled “Properties”var x: VariantAn int or a float, as the element type of the field.
var y: VariantAn int or a float, as the element type of the field.
var z: VariantAn int or a float, as the element type of the field.
Methods
Section titled “Methods”from_json()
Section titled “from_json()”static func from_json(d: Variant, conv: Callable, e: Archmage.ParseError = null) -> Archmage.Vec3Returns the vector in d, a parsed JSON object, converting each element with conv.call(value, e), which returns the zero value for null. For null, returns the zero vector. For any other value that is not an object, returns the zero vector too and records the type mismatch in e (see Archmage.ParseError.report_mismatch()).
to_json()
Section titled “to_json()”func to_json() -> DictionaryReturns the vector as a JSON object.
to_godot()
Section titled “to_godot()”func to_godot() -> VariantReturns a Vector3i when the elements are integers, or a Vector3 otherwise. A Vector3i keeps only the low 32 bits of each integer, and a Vector3 stores 32-bit floats unless Godot is built with double precision.