diff --git a/doc/en/entity-properties.md b/doc/en/entity-properties.md index a6530191f..bb12dcd86 100644 --- a/doc/en/entity-properties.md +++ b/doc/en/entity-properties.md @@ -95,6 +95,23 @@ Example: 0. A rectangular area with a width, height and length of 0.4 m, centered at 0.0. 1. Radial area with a radius of 1.6 m. +### *solid* + +Makes the entity's hitbox an obstacle. When enabling this property for `dynamic` body, a mass must be specified. + +### *mass* + +Defines the entity's mass. Kilograms are used as the default. +For `kinematic` bodies, an infinite mass is used instead. + +### *elasticity* + +Defines the entity's elasticity (affects the bounce on collision). + +### *step-height* + +Defines the maximum height of an obstacle an entity can step onto without jumping. + ## View ### *skeleton-name* diff --git a/doc/en/scripting/builtins/libgfx-weather.md b/doc/en/scripting/builtins/libgfx-weather.md index 62d8ec33b..669ebc5ea 100644 --- a/doc/en/scripting/builtins/libgfx-weather.md +++ b/doc/en/scripting/builtins/libgfx-weather.md @@ -4,14 +4,17 @@ A library for managing audio/visual weather effects. Weather settings: -| Property | Description | Default | -| ------------ | ------------------------------ | ------- | -| fall | Precipitation (see table 2) | {} | -| clouds | Cloudiness [0.0, 1.0] | 0.0 | -| fog_opacity | Maximum fog density [0.0, 1.0] | 0.0 | -| fog_dencity | Fog density | 1.0 | -| fog_curve | Fog curve | 1.0 | -| thunder_rate | Thunder rate [0.0, 1.0] | 0.0 | +| Property | Description | Default | +| ------------- | -------------------------------- | ----------------- | +| fall | Precipitation (see table 2) | {} | +| clouds | Cloudiness [0.0, 1.0] | 0.0 | +| fog_opacity | Maximum fog density [0.0, 1.0] | 0.0 | +| fog_dencity | Fog density | 1.0 | +| fog_curve | Fog curve | 1.0 | +| thunder_rate | Thunder rate [0.0, 1.0] | 0.0 | +| sky_tint | Sky color multiplier | {1, 1, 1} | +| clouds_tint | Cloud color multiplier | {1, 1, 1} | +| min_sky_light | Minimum sky-emitted light (moon) | {0.2, 0.25, 0.33} | Precipitation: diff --git a/doc/en/scripting/ecs.md b/doc/en/scripting/ecs.md index 79289cbe5..e0c6b69c6 100644 --- a/doc/en/scripting/ecs.md +++ b/doc/en/scripting/ecs.md @@ -119,6 +119,16 @@ body:set_body_type(type: str) body:get_material() -> str -- Sets the body material body:set_material(material: str) + +-- Returns the body's mass +body:get_mass() -> number +-- Sets the body's mass +body:set_mass(mass: number) + +-- Returns the body's elasticity +body:get_elasticity() -> number +-- Sets the body's elasticity +body:set_elasticity(elasticity: number) ``` ### Skeleton diff --git a/doc/en/xml-ui-layouts.md b/doc/en/xml-ui-layouts.md index aeb71dd62..0bd1b5353 100644 --- a/doc/en/xml-ui-layouts.md +++ b/doc/en/xml-ui-layouts.md @@ -98,6 +98,7 @@ A panel that controls the size and position of two elements. Allows the user to Inner text is a button text. +- `font` - font name - `text-align` - inner text alignment (*left/center/right*). Type: string. ## *checkbox* @@ -108,6 +109,7 @@ Inner text is a button text. ## *label* +- `font` - font name - `text-align` - text alignment (*left/center/right*). Type: string. - `valign` - vertical text alignment: top/center/bottom. - `supplier` - text supplier (called every frame). @@ -131,6 +133,7 @@ Inner text is a button text. Inner text - initially entered text +- `font` - font name - `placeholder` - placeholder text (used if the text field is empty) - `hint` - text displayed if the text field is empty (not sent to consumer, sub-consumer and validator). - `supplier` - text supplier (called every frame) @@ -190,6 +193,14 @@ Example of list description: - `selected` - initially selected value. Default: "". - `onselect` - function to which the user-selected value is passed +## *bindbox* + +An element for displaying and editing key or mouse button bindings. + +- `font` - font name. Type: string. +- `binding` - binding name. Type: string. +- `padding` - padding between text and element borders. Type: number. Default: 6 + # Inventory elements ## *inventory* diff --git a/doc/ru/entity-properties.md b/doc/ru/entity-properties.md index 3489e3aae..50b3b1499 100644 --- a/doc/ru/entity-properties.md +++ b/doc/ru/entity-properties.md @@ -95,6 +95,23 @@ 0. Прямоугольная область шириной, высотой и длиной в 0.4 м. с центром в 0.0. 1. Радиальная область с радиусом 1.6 м. +### Осязаемость - *solid* + +Делает хитбокс сущности осязаемым препятствием. Вместе с включением данного свойства у `dynamic` тел следует указать массу (mass). + +### Масса - *mass* + +Определяет массу сущности. За стандарт приняты килограммы. +В случае `kinematic` тела вместо указанной используется бесконечная масса. + +### Эластичность - *elasticity* + +Определяет упругость сущности. + +### Высота шага - *step-height* + +Определяет максимальную высоту препятствия, на которое сущность может шагнуть без прыжка. + ## Вид ### Имя скелета - *skeleton-name* diff --git a/doc/ru/scripting/builtins/libgfx-weather.md b/doc/ru/scripting/builtins/libgfx-weather.md index add94550b..b51bd58e1 100644 --- a/doc/ru/scripting/builtins/libgfx-weather.md +++ b/doc/ru/scripting/builtins/libgfx-weather.md @@ -4,14 +4,17 @@ Настройки погоды: -| Свойство | Описание | По-умолчанию | -| ------------ | ---------------------------------------- | ------------ | -| fall | Осадки (см. таблица 2) | {} | -| clouds | Облачность [0.0, 1.0] | 0.0 | -| fog_opacity | Максимальная плотность тумана [0.0, 1.0] | 0.0 | -| fog_dencity | Плотность тумана | 1.0 | -| fog_curve | Кривая тумана | 1.0 | -| thunder_rate | Частота грома [0.0, 1.0] | 0.0 | +| Свойство | Описание | По-умолчанию | +| ------------- | ------------------------------------------ | ----------------- | +| fall | Осадки (см. таблица 2) | {} | +| clouds | Облачность [0.0, 1.0] | 0.0 | +| fog_opacity | Максимальная плотность тумана [0.0, 1.0] | 0.0 | +| fog_dencity | Плотность тумана | 1.0 | +| fog_curve | Кривая тумана | 1.0 | +| thunder_rate | Частота грома [0.0, 1.0] | 0.0 | +| sky_tint | Множитель цвета неба | {1, 1, 1} | +| clouds_tint | Множитель цвета облаков | {1, 1, 1} | +| min_sky_light | Минимальный свет излучаемый небом (лунный) | {0.2, 0.25, 0.33} | Осадки: @@ -50,4 +53,4 @@ gfx.weather.get_fall_intensity() -> number -- Проверяет, происходит ли в данный момент переключение погоды gfx.weather.is_transition() -> boolean -``` \ No newline at end of file +``` diff --git a/doc/ru/scripting/ecs.md b/doc/ru/scripting/ecs.md index 4bc13bc31..50735913a 100644 --- a/doc/ru/scripting/ecs.md +++ b/doc/ru/scripting/ecs.md @@ -119,6 +119,16 @@ body:set_body_type(type: str) body:get_material() -> str -- Устанавливает материал тела body:set_material(material: str) + +-- Возвращает массу тела +body:get_mass() -> number +-- Устанавливает массу тела +body:set_mass(mass: number) + +-- Возвращает упругость тела +body:get_elasticity() -> number +-- Устанавливает упругость тела +body:set_elasticity(elasticity: number) ``` ### Skeleton diff --git a/doc/ru/xml-ui-layouts.md b/doc/ru/xml-ui-layouts.md index 2e93e6f0a..2ca6da1ce 100644 --- a/doc/ru/xml-ui-layouts.md +++ b/doc/ru/xml-ui-layouts.md @@ -100,6 +100,7 @@ Внутренний текст - текст кнопки. +- `font` - имя шрифта - `text-align` - выравнивание текста ("left", "center" или "right"). Тип: строка. ## Флажок - *checkbox* @@ -110,6 +111,7 @@ ## Метка - *label* +- `font` - имя шрифта - `text-align` - выравнивание текста ("left", "center" или "right"). Тип: строка. - `valign` - вертикальное выравнивание текста: top/center/bottom - `supplier` - поставщик текста (вызывается каждый кадр) @@ -132,6 +134,7 @@ Внутренний текст - изначально введенный текст +- `font` - имя шрифта - `placeholder` - текст подстановки (используется если текстовое поле пусто) - `hint` - текст, отображаемый, если текстовое поле пусто (не отправляется в consumer, sub-consumer и validator). - `supplier` - поставщик текста (вызывается каждый кадр) @@ -191,6 +194,14 @@ - `selected` - изначально выбранное значение. По-умолчанию: "". - `onselect` - функция, в которую передаётся выбранное пользователем значение +## Привязка ввода - *bindbox* + +Элемент для отображения и изменения привязки клавиш или кнопок мыши. + +- `font` - имя шрифта. Тип: строка. +- `binding` - имя привязки. Тип: строка. +- `padding` - отступ между текстом и границами элемента. Тип: число. По-умолчанию: 6 + # Элементы инвентаря ## Инвентарь - *inventory*