fix gfx.posteffects docs
This commit is contained in:
parent
5ea90dec42
commit
0627358c0e
@ -15,28 +15,28 @@ The effect slot is a resource and must be declared in resources.json in the root
|
|||||||
```lua
|
```lua
|
||||||
-- Returns the index of the effect slot by name (pack:slot_name).
|
-- Returns the index of the effect slot by name (pack:slot_name).
|
||||||
-- If the specified slot does not exist, returns -1
|
-- If the specified slot does not exist, returns -1
|
||||||
gfx.posteffect.index(name: str) --> int
|
gfx.posteffects.index(name: str) --> int
|
||||||
|
|
||||||
-- Assigns the effect to the slot
|
-- Assigns the effect to the slot
|
||||||
gfx.posteffect.set(slot: int, effect: str)
|
gfx.posteffects.set_effect(slot: int, effect: str)
|
||||||
|
|
||||||
-- Returns the effect intensity (from 0.0 to 1.0)
|
-- Returns the effect intensity (from 0.0 to 1.0)
|
||||||
-- If the slot is empty, returns 0.0
|
-- If the slot is empty, returns 0.0
|
||||||
gfx.posteffect.get_intensity(slot: int) --> number
|
gfx.posteffects.get_intensity(slot: int) --> number
|
||||||
|
|
||||||
-- Sets the effect intensity (from 0.0 to 1.0)
|
-- Sets the effect intensity (from 0.0 to 1.0)
|
||||||
-- (The correctness of processing the parameter between 0.0 and 1.0
|
-- (The correctness of processing the parameter between 0.0 and 1.0
|
||||||
-- depends on the effect)
|
-- depends on the effect)
|
||||||
gfx.posteffect.set_intensity(slot: int, intensity: number)
|
gfx.posteffects.set_intensity(slot: int, intensity: number)
|
||||||
|
|
||||||
-- Returns true if the slot is not empty and the effect intensity is non-zero
|
-- Returns true if the slot is not empty and the effect intensity is non-zero
|
||||||
gfx.posteffect.is_active(slot: int) --> bool
|
gfx.posteffects.is_active(slot: int) --> bool
|
||||||
|
|
||||||
-- Sets parameters values ('param' directives)
|
-- Sets parameters values ('param' directives)
|
||||||
gfx.posteffect.set_params(params: table)
|
gfx.posteffects.set_params(slot: int, params: table)
|
||||||
|
|
||||||
-- Sets values to an array
|
-- Sets values to an array
|
||||||
gfx.posteffect.set_array(
|
gfx.posteffects.set_array(
|
||||||
-- effect slot index
|
-- effect slot index
|
||||||
slot: int,
|
slot: int,
|
||||||
-- parameter (array) name
|
-- parameter (array) name
|
||||||
|
|||||||
@ -15,28 +15,28 @@
|
|||||||
```lua
|
```lua
|
||||||
-- Возвращает индекс слота эффектов по имени (пак:имя_слота).
|
-- Возвращает индекс слота эффектов по имени (пак:имя_слота).
|
||||||
-- При отсутствии указанного слота возвращает -1
|
-- При отсутствии указанного слота возвращает -1
|
||||||
gfx.posteffect.index(name: str) --> int
|
gfx.posteffects.index(name: str) --> int
|
||||||
|
|
||||||
-- Назначает эффект на слот
|
-- Назначает эффект на слот
|
||||||
gfx.posteffect.set(slot: int, effect: str)
|
gfx.posteffects.set_effect(slot: int, effect: str)
|
||||||
|
|
||||||
-- Возвращает интенсивность эффекта (от 0.0 до 1.0)
|
-- Возвращает интенсивность эффекта (от 0.0 до 1.0)
|
||||||
-- Если слот пуст, возвращает 0.0
|
-- Если слот пуст, возвращает 0.0
|
||||||
gfx.posteffect.get_intensity(slot: int) --> number
|
gfx.posteffects.get_intensity(slot: int) --> number
|
||||||
|
|
||||||
-- Устанавливает интенсивность эффекта (от 0.0 до 1.0)
|
-- Устанавливает интенсивность эффекта (от 0.0 до 1.0)
|
||||||
-- (Корректность обработки параметра между значениями 0.0 и 1.0 зависит
|
-- (Корректность обработки параметра между значениями 0.0 и 1.0 зависит
|
||||||
-- от эффекта
|
-- от эффекта
|
||||||
gfx.posteffect.set_intensity(slot: int, intensity: number)
|
gfx.posteffects.set_intensity(slot: int, intensity: number)
|
||||||
|
|
||||||
-- Возвращает true если слот не пуст и интенсивность эффекта ненулевая
|
-- Возвращает true если слот не пуст и интенсивность эффекта ненулевая
|
||||||
gfx.posteffect.is_active(slot: int) --> bool
|
gfx.posteffects.is_active(slot: int) --> bool
|
||||||
|
|
||||||
-- Устанавливает значения параметров (директивы 'param')
|
-- Устанавливает значения параметров (директивы 'param')
|
||||||
gfx.posteffect.set_params(params: table)
|
gfx.posteffects.set_params(slot: int, params: table)
|
||||||
|
|
||||||
-- Устанавливает значения в массив
|
-- Устанавливает значения в массив
|
||||||
gfx.posteffect.set_array(
|
gfx.posteffects.set_array(
|
||||||
-- индекс слота эффектов
|
-- индекс слота эффектов
|
||||||
slot: int,
|
slot: int,
|
||||||
-- имя параметра (массива)
|
-- имя параметра (массива)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user