Merge pull request #814 from MihailRis/update-docs

Update 0.31 docs
This commit is contained in:
MihailRis 2026-03-16 00:38:17 +03:00 • committed by GitHub
commit 6cccb3876b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 99 additions and 17 deletions

View file

@ -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*

View file

@ -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:

View file

@ -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

View file

@ -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*

View file

@ -95,6 +95,23 @@
0. Прямоугольная область шириной, высотой и длиной в 0.4 м. с центром в 0.0.
1. Радиальная область с радиусом 1.6 м.
### Осязаемость - *solid*
Делает хитбокс сущности осязаемым препятствием. Вместе с включением данного свойства у `dynamic` тел следует указать массу (mass).
### Масса - *mass*
Определяет массу сущности. За стандарт приняты килограммы.
В случае `kinematic` тела вместо указанной используется бесконечная масса.
### Эластичность - *elasticity*
Определяет упругость сущности.
### Высота шага - *step-height*
Определяет максимальную высоту препятствия, на которое сущность может шагнуть без прыжка.
## Вид
### Имя скелета - *skeleton-name*

View file

@ -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
```
```

View file

@ -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

View file

@ -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*