data-types
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
data-types [2021/06/18 15:46] – maxime | data-types [2023/09/14 14:52] (current) – [vec2f] polymorphgames | ||
---|---|---|---|
Line 11: | Line 11: | ||
---- | ---- | ||
- | ==== integer ==== | + | ==== integer and unsigned |
- | Integer number | + | Integer number. Cannot be negative for unsigned integers. |
<file lua> | <file lua> | ||
Line 45: | Line 45: | ||
<file lua> | <file lua> | ||
local value = " | local value = " | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== guid ==== | ||
+ | |||
+ | GUID are unique identifiers used to reference Assets or Game Objects. It can be interpreted from a string. | ||
+ | |||
+ | <file lua> | ||
+ | local value = " | ||
</ | </ | ||
Line 57: | Line 67: | ||
local value = { 54, 97 } | local value = { 54, 97 } | ||
</ | </ | ||
+ | |||
+ | [[api: | ||
---- | ---- | ||
Line 68: | Line 80: | ||
local value = { 73.0, 15.66 } | local value = { 73.0, 15.66 } | ||
</ | </ | ||
+ | |||
+ | [[api: | ||
---- | ---- | ||
Line 79: | Line 93: | ||
local value = { 19, 86, 45 } | local value = { 19, 86, 45 } | ||
</ | </ | ||
+ | |||
+ | [[api: | ||
---- | ---- | ||
Line 84: | Line 100: | ||
==== vec3f ==== | ==== vec3f ==== | ||
- | 3D float vector | + | 3D float vector. |
To initialize a '' | To initialize a '' | ||
Line 90: | Line 106: | ||
local value = { -15.71, -71.0, 93.03 } | local value = { -15.71, -71.0, 93.03 } | ||
</ | </ | ||
+ | |||
+ | [[api: | ||
---- | ---- | ||
Line 103: | Line 121: | ||
Quaternion properties can also be set with a '' | Quaternion properties can also be set with a '' | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== matrix ==== | ||
+ | |||
+ | 4x4 matrix representing a spatial transformation | ||
+ | |||
+ | Matrices can be initialized with an array of 16 float numbers. | ||
+ | <file lua> | ||
+ | local value = { | ||
+ | 1, 0, 0, 0, | ||
+ | 0, 1, 0, 0, | ||
+ | 0, 0, 1, 0, | ||
+ | 0, 0, 0, 1 | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | Matrices can also be initialized with a dictionary containing three fields: '' | ||
+ | |||
+ | <file lua> | ||
+ | local value = { | ||
+ | Position = { 0, 0, 0 }, | ||
+ | Rotation = { 0, 0, 0 }, | ||
+ | Scale = { 1, 1, 1 } | ||
+ | } | ||
+ | </ | ||
---- | ---- | ||
Line 161: | Line 205: | ||
GRASS_CLEAR = true | GRASS_CLEAR = true | ||
} | } | ||
+ | </ | ||
+ | |||
+ | ==== component type ==== | ||
+ | |||
+ | Type of a component, represented as a string | ||
+ | |||
+ | <file lua> | ||
+ | local componentType = " | ||
</ | </ | ||
Line 203: | Line 255: | ||
mod: | mod: | ||
</ | </ | ||
+ | |||
+ | An example of use can be found in the [[example-mods|Example 02 mod]], in the script file '' | ||
==== fixed_sized_map ==== | ==== fixed_sized_map ==== |
data-types.1624045573.txt.gz · Last modified: 2021/06/18 15:46 by maxime