Module luax

Defold Lua extended module

Functions

luax.math.step(current, target, step) This function returns the next step that is currently at `current` and should eventually end at `target`.
luax.math.lerp(a, b, t) This code samples a point on the line between a and b where t is the "interpolation factor" (0 = a, 1 = b)
luax.math.lerp_box() math.lerp_box
luax.math.clamp() math.clamp
luax.math.clamp_box(pos, box[, size[, change_point]]) math.clamp_box
luax.math.round() math.round
luax.math.is() math.is
luax.math.chance() math.chance
luax.math.distance() math.distance
luax.math.distance() math.distance_check
luax.math.manhattan() math.manhattan
luax.math.vec2rad() math.vec2rad
luax.math.random_sign() math.randm_sign
luax.table.clear() table.clear
luax.table.get_item_from_array() table.get_item_from_array
luax.table.contains() table.contains
luax.table.length() table.length
luax.table.remove_item() table.remove_item
luax.table.remove_by_dict() table.remove_by_dict
luax.table.is_empty() table.is_empty
luax.table.extend() table.extend
luax.table.random() table.random
luax.table.weight_random() table.weight_random
luax.table.shuffle() table.shuffle
luax.table.copy() table.copy array
luax.table.deepcopy() table.deepcopy
luax.table.override() table.override
luax.table.list() table.list
luax.table.tostring() table.tostring
luax.string.is_empty() string.is_empty
luax.string.split() string.split
luax.string.add_prefix_zeros() string.add_prefix_zeros
luax.string.split_by_rank() string.split_by_rank
luax.string.starts() string.starts
luax.string.ends() string.ends
luax.string.random() string.random
luax.go.set_alpha() go.set_alpha
luax.gui.set_alpha() gui.set_alpha
luax.gui.set_x() gui.set_x
luax.gui.add_x() gui.add_x
luax.gui.set_y() gui.set_y
luax.gui.add_y() gui.add_y
luax.gui.set_z() gui.set_z
luax.gui.add_z() gui.add_z
luax.gui.get_alpha() gui.get_alpha
luax.debug.timelog() debug.timelog
luax.gui.is_chain_enabled() gui.is_chain_enabled
luax.vmath.rad2vec() vmath.rad2vec
luax.vmath.vec2rad() vmath.vec2rad
luax.vmath.rad2quat() vmath.rad2quat
luax.vmath.vec2quat() vmath.vec2quat
luax.vmath.distance() vmath.distance
luax.operators.lt() operators.lt
luax.operators.le() operators.le
luax.operators.gt() operators.gt
luax.operators.ge() operators.ge
luax.operators.eq() operators.eq
luax.operators.neq() operators.neq
luax.timer.trigger_and_delay(delay, calback) Trigger callback and schedule timer on it


Functions

luax.math.step(current, target, step)
This function returns the next step that is currently at `current` and should eventually end at `target`. The `step` value is the maximum amount that the animation can move in a single step.

Parameters:

  • current number Current value
  • target number Target value
  • step number Maximum amount that can move in a single step

Returns:

    number The next step
luax.math.lerp(a, b, t)
This code samples a point on the line between a and b where t is the "interpolation factor" (0 = a, 1 = b)

Parameters:

  • a number
  • b number
  • t number

Returns:

    number
luax.math.lerp_box()
math.lerp_box
luax.math.clamp()
math.clamp
luax.math.clamp_box(pos, box[, size[, change_point]])
math.clamp_box

Parameters:

  • pos vector3
  • box vector4
  • size vector3 (optional)
  • change_point bool (optional)
luax.math.round()
math.round
luax.math.is()
math.is
luax.math.chance()
math.chance
luax.math.distance()
math.distance
luax.math.distance()
math.distance_check
luax.math.manhattan()
math.manhattan
luax.math.vec2rad()
math.vec2rad
luax.math.random_sign()
math.randm_sign
luax.table.clear()
table.clear
luax.table.get_item_from_array()
table.get_item_from_array
luax.table.contains()
table.contains
luax.table.length()
table.length
luax.table.remove_item()
table.remove_item
luax.table.remove_by_dict()
table.remove_by_dict
luax.table.is_empty()
table.is_empty
luax.table.extend()
table.extend
luax.table.random()
table.random
luax.table.weight_random()
table.weight_random
luax.table.shuffle()
table.shuffle
luax.table.copy()
table.copy array
luax.table.deepcopy()
table.deepcopy
luax.table.override()
table.override
luax.table.list()
table.list
luax.table.tostring()
table.tostring
luax.string.is_empty()
string.is_empty
luax.string.split()
string.split
luax.string.add_prefix_zeros()
string.add_prefix_zeros
luax.string.split_by_rank()
string.split_by_rank
luax.string.starts()
string.starts
luax.string.ends()
string.ends
luax.string.random()
string.random
luax.go.set_alpha()
go.set_alpha
luax.gui.set_alpha()
gui.set_alpha
luax.gui.set_x()
gui.set_x
luax.gui.add_x()
gui.add_x
luax.gui.set_y()
gui.set_y
luax.gui.add_y()
gui.add_y
luax.gui.set_z()
gui.set_z
luax.gui.add_z()
gui.add_z
luax.gui.get_alpha()
gui.get_alpha
luax.debug.timelog()
debug.timelog
luax.gui.is_chain_enabled()
gui.is_chain_enabled
luax.vmath.rad2vec()
vmath.rad2vec
luax.vmath.vec2rad()
vmath.vec2rad
luax.vmath.rad2quat()
vmath.rad2quat
luax.vmath.vec2quat()
vmath.vec2quat
luax.vmath.distance()
vmath.distance
luax.operators.lt()
operators.lt
luax.operators.le()
operators.le
luax.operators.gt()
operators.gt
luax.operators.ge()
operators.ge
luax.operators.eq()
operators.eq
luax.operators.neq()
operators.neq
luax.timer.trigger_and_delay(delay, calback)
Trigger callback and schedule timer on it

Parameters:

  • delay number ยง
  • calback function

Returns:

    hash The timer id
generated by LDoc 1.4.6 Last updated 2023-05-09 21:59:57