Skip to content
Permalink
Browse files

Lua_api.txt: Move item def section nearby node def (#7636)

  • Loading branch information...
ClobberXD authored and paramat committed Aug 12, 2018
1 parent ea26076 commit 6bd4cb9f7e83afaf16c11a1b5451753144c6521c
Showing with 56 additions and 56 deletions.
  1. +56 −56 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
---------------

0 comments on commit 6bd4cb9

Please sign in to comment.
You can’t perform that action at this time.