add doc/*/scripting/builtins/libgfx-blockwraps.md
This commit is contained in:
parent
14650562c2
commit
a5609f3e0c
@ -15,6 +15,7 @@ Subsections:
|
||||
- [cameras](scripting/builtins/libcameras.md)
|
||||
- [entities](scripting/builtins/libentities.md)
|
||||
- [file](scripting/builtins/libfile.md)
|
||||
- [gfx.blockwraps](scripting/builtins/libgfx-blockwraps.md)
|
||||
- [gfx.particles](particles.md#gfxparticles-library)
|
||||
- [gfx.text3d](3d-text.md#gfxtext3d-library)
|
||||
- [gui](scripting/builtins/libgui.md)
|
||||
|
||||
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`.
|
||||
@ -15,6 +15,7 @@
|
||||
- [cameras](scripting/builtins/libcameras.md)
|
||||
- [entities](scripting/builtins/libentities.md)
|
||||
- [file](scripting/builtins/libfile.md)
|
||||
- [gfx.blockwraps](scripting/builtins/libgfx-blockwraps.md)
|
||||
- [gfx.particles](particles.md#библиотека-gfxparticles)
|
||||
- [gfx.text3d](3d-text.md#библиотека-gfxtext3d)
|
||||
- [gui](scripting/builtins/libgui.md)
|
||||
|
||||
23
doc/ru/scripting/builtins/libgfx-blockwraps.md
Normal file
23
doc/ru/scripting/builtins/libgfx-blockwraps.md
Normal file
@ -0,0 +1,23 @@
|
||||
# Библиотека *gfx.blockwraps*
|
||||
|
||||
Библиотека для работы с *обертками блоков*.
|
||||
|
||||
Обёртки блоков введены для реализации анимации разрушения блоков и могут
|
||||
использоваться для иных задач.
|
||||
|
||||
```lua
|
||||
-- Создаёт обертку на указанной позиции, с указанной текстурой.
|
||||
-- Возвращает id обёртки.
|
||||
gfx.blockwraps.wrap(position: vec3, texture: str) --> int
|
||||
|
||||
-- Удаляет обертку, если она существует.
|
||||
gfx.blockwraps.unwrap(id: int)
|
||||
|
||||
-- Меняет позицию обёртки, если она существует.
|
||||
gfx.blockwraps.set_pos(id: int, position: vec3)
|
||||
|
||||
-- Меняет текстуру обёртки, если она существует.
|
||||
gfx.blockwraps.set_texture(id: int, texture: str)
|
||||
```
|
||||
|
||||
Обертки не удаляются автоматически без вызова `unwrap`.
|
||||
Loading…
x
Reference in New Issue
Block a user