diff options
author | ClobberXD <ClobberXD@gmail.com> | 2018-08-13 03:06:16 +0530 |
---|---|---|
committer | Paramat <paramat@users.noreply.github.com> | 2018-08-12 22:36:16 +0100 |
commit | 6bd4cb9f7e83afaf16c11a1b5451753144c6521c (patch) | |
tree | b18db3b1b04afc7d87b601b8e11db1e868767ae2 | |
parent | ea26076bcb032584c3af0a4e8e47f13afea6286b (diff) | |
download | minetest-6bd4cb9f7e83afaf16c11a1b5451753144c6521c.tar.gz minetest-6bd4cb9f7e83afaf16c11a1b5451753144c6521c.tar.bz2 minetest-6bd4cb9f7e83afaf16c11a1b5451753144c6521c.zip |
Lua_api.txt: Move item def section nearby node def (#7636)
-rw-r--r-- | doc/lua_api.txt | 112 |
1 files changed, 56 insertions, 56 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt index f03145fb8..3a4e2e0ab 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -5414,6 +5414,62 @@ Used by `minetest.register_lbm`. action = func(pos, node), } +Tile definition +--------------- + +* `"image.png"` +* `{name="image.png", animation={Tile Animation definition}}` +* `{name="image.png", backface_culling=bool, tileable_vertical=bool, + tileable_horizontal=bool, align_style="node"/"world"/"user", scale=int}` + * backface culling enabled by default for most nodes + * tileable flags are info for shaders, how they should treat texture + when displacement mapping is used. + Directions are from the point of view of the tile texture, + not the node it's on. + * align style determines whether the texture will be rotated with the node + or kept aligned with its surroundings. "user" means that client + setting will be used, similar to `glasslike_framed_optional`. + Note: supported by solid nodes and nodeboxes only. + * scale is used to make texture span several (exactly `scale`) nodes, + instead of just one, in each direction. Works for world-aligned + textures only. + Note that as the effect is applied on per-mapblock basis, `16` should + be equally divisible by `scale` or you may get wrong results. +* `{name="image.png", color=ColorSpec}` + * the texture's color will be multiplied with this color. + * the tile's color overrides the owning node's color in all cases. +* deprecated, yet still supported field names: + * `image` (name) + +Tile animation definition +------------------------- + + { + type = "vertical_frames", + + aspect_w = 16, + -- Width of a frame in pixels + + aspect_h = 16, + -- Height of a frame in pixels + + length = 3.0, + -- Full loop length + } + + { + type = "sheet_2d", + + frames_w = 5, + -- Width in number of frames + + frames_h = 3, + -- Height in number of frames + + frame_length = 0.5, + -- Length of a single frame + } + Item definition --------------- @@ -5530,62 +5586,6 @@ Used by `minetest.register_node`, `minetest.register_craftitem`, and -- usage. } -Tile definition ---------------- - -* `"image.png"` -* `{name="image.png", animation={Tile Animation definition}}` -* `{name="image.png", backface_culling=bool, tileable_vertical=bool, - tileable_horizontal=bool, align_style="node"/"world"/"user", scale=int}` - * backface culling enabled by default for most nodes - * tileable flags are info for shaders, how they should treat texture - when displacement mapping is used. - Directions are from the point of view of the tile texture, - not the node it's on. - * align style determines whether the texture will be rotated with the node - or kept aligned with its surroundings. "user" means that client - setting will be used, similar to `glasslike_framed_optional`. - Note: supported by solid nodes and nodeboxes only. - * scale is used to make texture span several (exactly `scale`) nodes, - instead of just one, in each direction. Works for world-aligned - textures only. - Note that as the effect is applied on per-mapblock basis, `16` should - be equally divisible by `scale` or you may get wrong results. -* `{name="image.png", color=ColorSpec}` - * the texture's color will be multiplied with this color. - * the tile's color overrides the owning node's color in all cases. -* deprecated, yet still supported field names: - * `image` (name) - -Tile animation definition -------------------------- - - { - type = "vertical_frames", - - aspect_w = 16, - -- Width of a frame in pixels - - aspect_h = 16, - -- Height of a frame in pixels - - length = 3.0, - -- Full loop length - } - - { - type = "sheet_2d", - - frames_w = 5, - -- Width in number of frames - - frames_h = 3, - -- Height in number of frames - - frame_length = 0.5, - -- Length of a single frame - } - Node definition --------------- |