diff --git a/doc/en/scripting/builtins/libgfx-blockwraps.md b/doc/en/scripting/builtins/libgfx-blockwraps.md index e03374dd7..9ab0d27d6 100644 --- a/doc/en/scripting/builtins/libgfx-blockwraps.md +++ b/doc/en/scripting/builtins/libgfx-blockwraps.md @@ -7,7 +7,14 @@ Block wrappers are introduced to implement block destruction animation and can b ```lua -- Creates a wrapper at the specified position, with the specified texture. -- Returns the wrapper id. -gfx.blockwraps.wrap(position: vec3, texture: str) --> int +gfx.blockwraps.wrap( + -- block position + position: vec3, + -- wrap texture + texture: string, + -- emission [0.0; 1.0] + [optional] emission: number = 1.0 +) -> int -- Removes the wrapper, if it exists. gfx.blockwraps.unwrap(id: int) @@ -17,6 +24,21 @@ 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) + +-- Sets the face textures (-X, +X, -Y, +Y, -Z, +Z). +-- - nil - disables face rendering. +-- - "" - monotone texture. +gfx.blockwraps.set_faces( + -- wrapper id + id: int, + -- face texture 1 (-X) + face1?: string, + -- face texture 2 (+X) + face2?: string, + ... + -- face texture 6 (+Z) + face6?: string +) ``` Wrappers are not automatically removed without calling `unwrap`. diff --git a/doc/ru/scripting/builtins/libgfx-blockwraps.md b/doc/ru/scripting/builtins/libgfx-blockwraps.md index 645df7ec9..aaecfebe6 100644 --- a/doc/ru/scripting/builtins/libgfx-blockwraps.md +++ b/doc/ru/scripting/builtins/libgfx-blockwraps.md @@ -8,7 +8,14 @@ ```lua -- Создаёт обертку на указанной позиции, с указанной текстурой. -- Возвращает id обёртки. -gfx.blockwraps.wrap(position: vec3, texture: string) -> int +gfx.blockwraps.wrap( + -- Позиция блока + position: vec3, + -- Текстура обёртки + texture: string, + -- Излучение [0.0; 1.0] + [опционально] emission: number = 1.0 +) -> int -- Удаляет обертку, если она существует. gfx.blockwraps.unwrap(id: int) @@ -18,6 +25,21 @@ gfx.blockwraps.set_pos(id: int, position: vec3) -- Меняет текстуру обёртки, если она существует. gfx.blockwraps.set_texture(id: int, texture: string) + +-- Устанавливает текстуры сторон (-X, +X, -Y, +Y, -Z, +Z). +-- - nil - отключает отображение стороны. +-- - "" - монотонная текстура. +gfx.blockwraps.set_faces( + -- id обёртки + id: int, + -- текстура стороны 1 (-X) + face1?: string, + -- текстура стороны 2 (+X) + face2?: string, + ... + -- текстура стороны 6 (+Z) + face6?: string +) ``` -Обертки не удаляются автоматически без вызова `unwrap`. \ No newline at end of file +Обертки не удаляются автоматически без вызова `unwrap`.