Go to file
GreenXenith cd16117b83 Freeze-frame 2021-06-09 17:59:26 -07:00
textures Freeze-frame 2021-06-09 17:59:26 -07:00
.luacheckrc Freeze-frame 2021-06-09 17:59:26 -07:00
LICENSE.txt Freeze-frame 2021-06-09 17:59:26 -07:00
README.md Freeze-frame 2021-06-09 17:59:26 -07:00
init.lua Freeze-frame 2021-06-09 17:59:26 -07:00
mod.conf Freeze-frame 2021-06-09 17:59:26 -07:00

README.md

Animated Entity Textures

Created as an exercise in entity and texture handling for a Discord challenge.

The _tiles key should be a table of tiles. Animated tiles should use the tile animation definition (optional).

Minimum Example

minetest.register_entity("modname:verticalframes", {
    _tiles = {{
        name = "vertical_frames.png",
        animation = {type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 1}
    }},
})

minetest.register_entity("modname:sheet2d", {
    _tiles = {{
        name = "sheet_2d.png",
        animation = {type = "sheet_2d", frames_w = 4, frames_h = 2, frame_length = 0.25}
    }},
})

Set TEST to true in init.lua to register these testing entities.