natiny.render.tag
Lua
natiny.render.tag(tag_or_tags [, sort])
Draws every visible model and particle system whose own material has the
requested tag or all requested tags. Per-part materials and a material bound
with natiny.material.bind do not affect selection.
Parameters
| Name |
Type |
Default |
Description |
tag_or_tags |
string or table |
|
One tag name or a list of distinct tag names |
sort |
integer |
natiny.render.SORT_MATERIAL |
Draw order; one of the constants below |
Constants
| Constant |
Description |
natiny.render.SORT_MATERIAL |
Group by model material, then mesh |
natiny.render.SORT_NONE |
Keep model storage order without sorting |
natiny.render.SORT_BACK_TO_FRONT |
Sort model bounds centers from farthest to nearest |
natiny.render.SORT_FRONT_TO_BACK |
Sort model bounds centers from nearest to farthest |
Example
Lua
natiny.render.tag({ "world", "transparent" }, natiny.render.SORT_BACK_TO_FRONT)