mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-09 13:01:49 +00:00
Improved docs (#708)
* начало переписи доков * extensions update * libapp update * libfile update * io_stream update * Update io_stream.md * io_stream update x3 * io_stream update x4 * libtime update * libgui update + make bytearray.md * libinput update * Update libapp.md * Update libapp.md * libgui update * events.md ru fix * да ну не надо так делать --> не имеет смысла, ибо гитхаб -> показывает адекватно * types refactoring * fixes * Update libblock.md * Update libblock.md * Update libbyteutil.md
This commit is contained in:
parent
8b31bdeb78
commit
ac02bc0c8e
43 changed files with 1107 additions and 1314 deletions
|
|
@ -15,14 +15,14 @@
|
|||
```lua
|
||||
-- Возвращает индекс слота эффектов по имени (пак:имя_слота).
|
||||
-- При отсутствии указанного слота возвращает -1
|
||||
gfx.posteffects.index(name: str) --> int
|
||||
gfx.posteffects.index(name: string) -> int
|
||||
|
||||
-- Назначает эффект на слот
|
||||
gfx.posteffects.set_effect(slot: int, effect: str)
|
||||
gfx.posteffects.set_effect(slot: int, effect: string)
|
||||
|
||||
-- Возвращает интенсивность эффекта (от 0.0 до 1.0)
|
||||
-- Если слот пуст, возвращает 0.0
|
||||
gfx.posteffects.get_intensity(slot: int) --> number
|
||||
gfx.posteffects.get_intensity(slot: int) -> number
|
||||
|
||||
-- Устанавливает интенсивность эффекта (от 0.0 до 1.0)
|
||||
-- (Корректность обработки параметра между значениями 0.0 и 1.0 зависит
|
||||
|
|
@ -30,7 +30,7 @@ gfx.posteffects.get_intensity(slot: int) --> number
|
|||
gfx.posteffects.set_intensity(slot: int, intensity: number)
|
||||
|
||||
-- Возвращает true если слот не пуст и интенсивность эффекта ненулевая
|
||||
gfx.posteffects.is_active(slot: int) --> bool
|
||||
gfx.posteffects.is_active(slot: int) -> boolean
|
||||
|
||||
-- Устанавливает значения параметров (директивы 'param')
|
||||
gfx.posteffects.set_params(slot: int, params: table)
|
||||
|
|
@ -40,9 +40,9 @@ gfx.posteffects.set_array(
|
|||
-- индекс слота эффектов
|
||||
slot: int,
|
||||
-- имя параметра (массива)
|
||||
name: str
|
||||
name: string
|
||||
-- строка данных (используйте функцию Bytearray_as_string)
|
||||
data: str
|
||||
data: string
|
||||
)
|
||||
|
||||
-- Пример заполнения массива `#param vec3 u_имяМассива[64]`:
|
||||
|
|
@ -54,4 +54,4 @@ for i = 0, 63 do
|
|||
Bytearray.append(buffer, byteutil.pack("fff", x, y, z))
|
||||
end
|
||||
gfx.posteffects.set_array(slot, "u_имяМассива", Bytearray_as_string(buffer))
|
||||
```
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue