From 016336ee4da46c702bde332a3bbb8ab05ce45928 Mon Sep 17 00:00:00 2001 From: MihailRis Date: Mon, 28 Oct 2024 10:07:56 +0300 Subject: [PATCH] update doc/*/world-generator.md --- doc/en/world-generator.md | 10 +++++++++- doc/ru/world-generator.md | 10 +++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/doc/en/world-generator.md b/doc/en/world-generator.md index b6e053ac..47f46b80 100644 --- a/doc/en/world-generator.md +++ b/doc/en/world-generator.md @@ -351,7 +351,15 @@ generation.save_fragment( The fragment size is available as the `size` property. -A fragment can be cropped to fit its contents (air is ignored) by calling the `fragment:crop()` method. +### Methods + +```lua +-- Crop a fragment to content +fragment:crop() + +-- Set a fragment to the world at the specified position +fragment:place(position: vec3, [optional] rotation:int=0) +``` ## Generating a height map diff --git a/doc/ru/world-generator.md b/doc/ru/world-generator.md index 5ccdbc68..284ea067 100644 --- a/doc/ru/world-generator.md +++ b/doc/ru/world-generator.md @@ -355,7 +355,15 @@ generation.save_fragment( Размер фрагмента доступен как свойство `size`. -Фрагмент может быть обрезан до размеров содержимого (воздух игнорируется) вызовом метода `fragment:crop()`. +### Методы + +```lua +-- Обрезает фрагмент до размеров содержимого +fragment:crop() + +-- Устанавливает фрагмент в мир на указанной позиции +fragment:place(position: vec3, [опционально] rotation:int=0) +``` ## Генерация карты высот