fix particles docs

This commit is contained in:
MihailRis 2026-07-16 23:37:08 +03:00
parent 66c99adab9
commit b2ed5122e7
2 changed files with 9 additions and 7 deletions

View file

@ -9,14 +9,14 @@ Particles are a table, all fields of which are optional.
| lighting | Lighting. | true |
| collision | Collision detection. | true |
| max_distance | Maximum distance from the camera at which particles may spawn. | 16.0 |
| spawn_interval | Particle spawn interval in seconds. | 1.0 |
| spawn_interval | Particle spawn interval in seconds. Also initial spawn delay | 1.0 |
| lifetime | Average lifetime of particles in seconds. | 5.0 |
| lifetime_spread | Maximum deviation of particle lifetime (from 0.0 to 1.0). | 0.2 |
| velocity | Initial linear velocity of particles. | {0, 0, 0} |
| acceleration | Particles acceleration. | {0, -16, 0} |
| explosion | Force of particles explosion on spawn. | {2, 2, 2} |
| size | Size of particles. | {0.1, 0.1, 0.1} |
| size_spread | Maximum particle size spread over time. | 0.2 |
| size_spread | Maximum particle size spread. | 0.2 |
| angle_spread | Maximum initial rotation angle spread (0 to 1) | 0.0 |
| min_angular_vel | Minimum angular velocity (radians per sec). Non-negative. | 0.0 |
| max_angular_vel | Maximum angular velocity (radians per sec). Non-negative. | 0.0 |
@ -35,7 +35,8 @@ gfx.particles.emit(
count: int,
-- particle settings table
preset: table,
-- additional particle settings table
-- particle settings table overriding 'preset' parameters
-- use it instead of 'presets' table copying for modification
[optional] extension: table
) -> int
```
@ -63,7 +64,7 @@ Returns the static position or uid of the entity the emitter is bound to.
Returns nil if the emitter does not exist.
``lua
```lua
gfx.particles.set_origin(id: int, origin: vec3 | int)
```

View file

@ -10,14 +10,14 @@
| lighting | Освещение. | true |
| collision | Обнаружение столкновений. | true |
| max_distance | Максимальная дистанция от камеры, при которой происходит спавн частиц. | 16.0 |
| spawn_interval | Интервал спавна частиц в секундах. | 1.0 |
| spawn_interval | Интервал спавна частиц в секундах, также задержка перед спавном первой. | 1.0 |
| lifetime | Среднее время жизни частиц в секундах. | 5.0 |
| lifetime_spread | Максимальное отклонение времени жизни частицы (от 0.0 до 1.0). | 0.2 |
| velocity | Начальная линейная скорость частиц. | {0, 0, 0} |
| acceleration | Ускорение частиц. | {0, -16, 0} |
| explosion | Сила разлёта частиц при спавне. | {2, 2, 2} |
| size | Размер частиц. | {0.1, 0.1, 0.1} |
| size_spread | Максимальное отклонение времени размера частиц. | 0.2 |
| size_spread | Максимальное отклонение размера частиц. | 0.2 |
| angle_spread | Максимальное отклонение начального угла поворота (от 0 до 1) | 0.0 |
| min_angular_vel | Минимальная угловая скорость (радианы в сек.). Неотрицательное. | 0.0 |
| max_angular_vel | Максимальная угловая скорость (радианы в сек.). Неотрицательное. | 0.0 |
@ -36,7 +36,8 @@ gfx.particles.emit(
count: int,
-- таблица настроек частиц
preset: table,
-- дополнительная таблица настроек частиц
-- таблица настроек частиц перезаписывающая значения параметров
-- используется вместо копирования и модификации 'preset'
[опционально] extension: table
) -> int
```