Bitmasking utils
- Source:
Methods
(inner) get4MaskFront(grid, x, y, connects_to, prop_pathopt) → {number}
- Source:
Get a bitmask texture offset for always front-facing tiles, like walls
Example texture:
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
grid |
Grid | |||
x |
number | |||
y |
number | |||
connects_to |
Array | |||
prop_path |
string |
<optional> |
"type"
|
the property path if its an object, otherwise pass null |
Returns:
- Type
- number
(inner) get4MaskRotated(grid, x, y, connects_to, prop_pathopt) → {number}
- Source:
Get a bitmask texture offset for tiles without corners (tiles with 6 textures that can be rotated)
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
grid |
Grid | |||
x |
number | |||
y |
number | |||
connects_to |
Array | |||
prop_path |
string |
<optional> |
"type"
|
the property path if its an object, otherwise pass null |
Returns:
- Type
- number
(inner) get8Mask(grid, x, y, connects_to, prop_pathopt) → {number}
- Source:
Get a bitmask texture offset for oriented tiles with corners (tiles with 48 textures that can't be rotated)
Example texture:
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
grid |
Grid | |||
x |
number | |||
y |
number | |||
connects_to |
Array | |||
prop_path |
string |
<optional> |
"type"
|
the property path if its an object, otherwise pass null |
Returns:
- Type
- number
(inner) get8MaskRotated(grid, x, y, connects_to, prop_pathopt) → {number}
- Source:
Get a bitmask texture offset for tiles with corners (tiles with 15 textures that can be rotated)
Example texture:
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
grid |
Grid | |||
x |
number | |||
y |
number | |||
connects_to |
Array | |||
prop_path |
string |
<optional> |
"type"
|
the property path if its an object, otherwise pass null |
Returns:
- Type
- number