Skip to content

Commit

Permalink
Lua_api.txt: Move item def section nearby node def (#7636)
Browse files Browse the repository at this point in the history
  • Loading branch information
ClobberXD authored and paramat committed Aug 12, 2018
1 parent ea26076 commit 6bd4cb9
Showing 1 changed file with 56 additions and 56 deletions.
112 changes: 56 additions & 56 deletions doc/lua_api.txt
Expand Up @@ -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
---------------

Expand Down Expand Up @@ -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
---------------

Expand Down

0 comments on commit 6bd4cb9

Please sign in to comment.