mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-09 13:01:49 +00:00
add doc/*/scripting/builtins/libgfx-blockwraps.md
This commit is contained in:
parent
14650562c2
commit
a5609f3e0c
4 changed files with 47 additions and 0 deletions
22
doc/en/scripting/builtins/libgfx-blockwraps.md
Normal file
22
doc/en/scripting/builtins/libgfx-blockwraps.md
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
# Library *gfx.blockwraps*
|
||||
|
||||
Library for working with *block wrappers*.
|
||||
|
||||
Block wrappers are introduced to implement block destruction animation and can be used for other purposes.
|
||||
|
||||
```lua
|
||||
-- Creates a wrapper at the specified position, with the specified texture.
|
||||
-- Returns the wrapper id.
|
||||
gfx.blockwraps.wrap(position: vec3, texture: str) --> int
|
||||
|
||||
-- Removes the wrapper, if it exists.
|
||||
gfx.blockwraps.unwrap(id: int)
|
||||
|
||||
-- Changes the position of the wrapper, if it exists.
|
||||
gfx.blockwraps.set_pos(id: int, position: vec3)
|
||||
|
||||
-- Changes the texture of the wrapper, if it exists.
|
||||
gfx.blockwraps.set_texture(id: int, texture: str)
|
||||
```
|
||||
|
||||
Wrappers are not automatically removed without calling `unwrap`.
|
||||
Loading…
Add table
Add a link
Reference in a new issue