_G

_G

_G


_VERSION

string

accelerometer_event

accelerometer_event

accelerometer_event

x

number

y

number

z

number

affectorObj


affector_color_step

affector_color_step

affector_color_step

[1]

number

Age

[2]

ncine.color

Color


affector_position_step

[1]

number

Age

[2]

ncine.vec2

position


affector_position_step

affector_position_step

affector_rotation_step

[1]

number

Age

[2]

number

Angle


affector_rotation_step

affector_rotation_step

affector_size_step

[1]

number

Age

[2]

ncine.vec2

Scale


affector_size_step

affector_size_step

affector_velocity_step

[1]

number

Age

[2]

ncine.vec2

Velocity


affector_velocity_step

affector_velocity_step

animatedspriteObj


any


arg

string[]

assert

function assert(v?: <T>, message?: any, ...any)
  -> <T>
  2. ...any

audio_auto_wah_properties

audio_auto_wah_properties

audio_auto_wah_properties

attack_time

number

peak_gain

number

release_time

number

resonance

number

audio_chorus_properties

audio_chorus_properties

audio_chorus_properties

delay

number

depth

number

feedback

number

phase

integer

rate

number

waveform

integer

0 for sinusoid, 1 for triangle


audio_compressor_properties

audio_compressor_properties

audio_compressor_properties

on_off

integer

0 or 1


audio_distortion_properties

edge

number

eq_bandwidth

number

eq_center

number

gain

number

lowpass_cutoff

number

audio_distortion_properties

audio_distortion_properties

audio_eax_reverb_properties

air_absorption_gain_hf

number

decay_hf_limit

integer

decay_hf_ratio

number

decay_lf_ratio

number

decay_time

number

density

number

diffusion

number

echo_depth

number

echo_time

number

gain

number

gain_hf

number

gain_lf

number

hf_reference

number

late_reverb_delay

number

late_reverb_gain

number

late_reverb_pan

ncine.vec3

A three component vector

lf_reference

number

modulation_depth

number

modulation_time

number

reflections_delay

number

reflections_gain

number

reflections_pan

ncine.vec3

A three component vector

room_rolloff_factor

number

audio_eax_reverb_properties

audio_eax_reverb_properties

audio_echo_properties

audio_echo_properties

audio_echo_properties

damping

number

delay

number

feedback

number

lr_delay

number

spread

number

audio_equalizer_properties

high_cutoff

number

high_gain

number

low_cutoff

number

low_gain

number

mid1_center

number

mid1_gain

number

mid1_width

number

mid2_center

number

mid2_gain

number

mid2_width

number

audio_equalizer_properties

audio_equalizer_properties

audio_filter_properties

gain

number

gain_hf

number

gain_lf

number

type

ncine.audio_filter_type

Audio filter types


audio_filter_properties

audio_filter_properties

audio_flanger_properties

audio_flanger_properties

audio_flanger_properties

delay

number

depth

number

feedback

number

phase

integer

rate

number

waveform

integer

0 for sinusoid, 1 for triangle


audio_frequency_shifter_properties

audio_frequency_shifter_properties

audio_frequency_shifter_properties

frequency

number

left_direction

integer

From 0 to 2

right_direction

integer

From 0 to 2


audio_pitch_shifter_properties

audio_pitch_shifter_properties

audio_pitch_shifter_properties

coarse_tune

integer

From -12 to 12

fineTune

integer

From -50 to 50


audio_reverb_properties

audio_reverb_properties

audio_reverb_properties

air_absorption_gain_hf

number

decay_hf_limit

integer

decay_hf_ratio

number

decay_time

number

density

number

diffusion

number

gain

number

gain_hf

number

late_reverb_delay

number

late_reverb_gain

number

reflections_delay

number

reflections_gain

number

room_rolloff_factor

number

audio_ring_modulator_properties

frequency

number

highpass_cutoff

number

waveform

integer

0 for sinusoid, 1 for sawtooth, 2 for square


audio_ring_modulator_properties

audio_ring_modulator_properties

audio_vocal_morpher_properties

audio_vocal_morpher_properties

audio_vocal_morpher_properties

phoneme_a

integer

From 0 to 29 (A to Z)

phoneme_a_coarse_tuning

integer

From -24 to 24

phoneme_b

integer

From 0 to 29 (A to Z)

phoneme_b_coarse_tuning

integer

From -24 to 24

rate

number

waveform

integer

0 for sinusoid, 1 for triangle, 2 for sawtooth


audiobufferObj


audiobufferplayerObj


audioeffectObj


audioeffectpropertiesObj


audioeffectslotObj


audiofilterObj


audioplayerObj


audiostreamplayerObj


basespriteObj


boolean


cameraObj


camera_projection_values

bottom

number

left

number

right

number

top

number

camera_view_values

rotation

number

scale

number

x

number

y

number

collectgarbage

function collectgarbage(opt?: "collect"|"count"|"generational"|"incremental"|"isrunning"...(+3), ...any)
  -> any

coroutine

coroutinelib

coroutine.close

function coroutine.close(co: thread)
  -> noerror: boolean
  2. errorobject: any

coroutine.create

function coroutine.create(f: fun(...any):...unknown)
  -> thread

coroutine.isyieldable

function coroutine.isyieldable(co?: thread)
  -> boolean

coroutine.resume

function coroutine.resume(co: thread, val1?: any, ...any)
  -> success: boolean
  2. ...any

coroutine.running

function coroutine.running()
  -> running: thread
  2. ismain: boolean

coroutine.status

function coroutine.status(co: thread)
  -> "dead"|"normal"|"running"|"suspended"

coroutine.wrap

function coroutine.wrap(f: fun(...any):...unknown)
  -> fun(...any):...unknown

coroutine.yield

(async) function coroutine.yield(...any)
  -> ...any

coroutinelib

close

function coroutine.close(co: thread)
  -> noerror: boolean
  2. errorobject: any

Closes coroutine co , closing all its pending to-be-closed variables and putting the coroutine in a dead state.

View documents

create

function coroutine.create(f: fun(...any):...unknown)
  -> thread

Creates a new coroutine, with body f. f must be a function. Returns this new coroutine, an object with type "thread".

View documents

isyieldable

function coroutine.isyieldable(co?: thread)
  -> boolean

Returns true when the coroutine co can yield. The default for co is the running coroutine.

View documents

resume

function coroutine.resume(co: thread, val1?: any, ...any)
  -> success: boolean
  2. ...any

Starts or continues the execution of coroutine co.

View documents

running

function coroutine.running()
  -> running: thread
  2. ismain: boolean

Returns the running coroutine plus a boolean, true when the running coroutine is the main one.

View documents

status

function coroutine.status(co: thread)
  -> "dead"|"normal"|"running"|"suspended"

Returns the status of coroutine co.

View documents

return #1:
    | "running" -- Is running.
    | "suspended" -- Is suspended or not started.
    | "normal" -- Is active but not running.
    | "dead" -- Has finished or stopped with an error.

wrap

function coroutine.wrap(f: fun(...any):...unknown)
  -> fun(...any):...unknown

Creates a new coroutine, with body f; f must be a function. Returns a function that resumes the coroutine each time it is called.

View documents

yield

(async) function coroutine.yield(...any)
  -> ...any

Suspends the execution of the calling coroutine.

View documents


debug

debuglib

debug.debug

function debug.debug()

debug.getfenv

function debug.getfenv(o: any)
  -> table

debug.gethook

function debug.gethook(co?: thread)
  -> hook: function
  2. mask: string
  3. count: integer

debug.getinfo

function debug.getinfo(thread: thread, f: integer|fun(...any):...unknown, what?: string|"L"|"S"|"f"|"l"...(+4))
  -> debuginfo

debug.getlocal

function debug.getlocal(thread: thread, f: integer|fun(...any):...unknown, index: integer)
  -> name: string
  2. value: any

debug.getmetatable

function debug.getmetatable(object: any)
  -> metatable: table

debug.getregistry

function debug.getregistry()
  -> table

debug.getupvalue

function debug.getupvalue(f: fun(...any):...unknown, up: integer)
  -> name: string
  2. value: any

debug.getuservalue

function debug.getuservalue(u: userdata, n?: integer)
  -> any
  2. boolean

debug.setcstacklimit

function debug.setcstacklimit(limit: integer)
  -> boolean|integer

debug.setfenv

function debug.setfenv(object: <T>, env: table)
  -> object: <T>

debug.sethook

function debug.sethook(thread: thread, hook: fun(...any):...unknown, mask: string|"c"|"l"|"r", count?: integer)

debug.setlocal

function debug.setlocal(thread: thread, level: integer, index: integer, value: any)
  -> name: string

debug.setmetatable

function debug.setmetatable(value: <T>, meta?: table)
  -> value: <T>

debug.setupvalue

function debug.setupvalue(f: fun(...any):...unknown, up: integer, value: any)
  -> name: string

debug.setuservalue

function debug.setuservalue(udata: userdata, value: any, n?: integer)
  -> udata: userdata

debug.traceback

function debug.traceback(thread: thread, message?: any, level?: integer)
  -> message: string

debug.upvalueid

function debug.upvalueid(f: fun(...any):...unknown, n: integer)
  -> id: lightuserdata

debug.upvaluejoin

function debug.upvaluejoin(f1: fun(...any):...unknown, n1: integer, f2: fun(...any):...unknown, n2: integer)

debug_overlay_settings

info_text

boolean

True if showing the information text

interface

boolean

True if showing the debug interface

profiler_graphs

boolean

True if showing the profiler graphs


debug_overlay_settings

debug_overlay_settings

debuginfo

activelines

table

currentline

integer

ftransfer

integer

func

function

istailcall

boolean

isvararg

boolean

lastlinedefined

integer

linedefined

integer

name

string

namewhat

string

nparams

integer

ntransfer

integer

nups

integer

short_src

string

source

string

what

string

debuglib

debug

function debug.debug()

Enters an interactive mode with the user, running each string that the user enters.

View documents

getfenv

function debug.getfenv(o: any)
  -> table

Returns the environment of object o .

View documents

gethook

function debug.gethook(co?: thread)
  -> hook: function
  2. mask: string
  3. count: integer

Returns the current hook settings of the thread.

View documents

getinfo

function debug.getinfo(thread: thread, f: integer|fun(...any):...unknown, what?: string|"L"|"S"|"f"|"l"...(+4))
  -> debuginfo

Returns a table with information about a function.

View documents


what:
   +> "n" -- `name` and `namewhat`
   +> "S" -- `source`, `short_src`, `linedefined`, `lastlinedefined`, and `what`
   +> "l" -- `currentline`
   +> "t" -- `istailcall`
   +> "u" -- `nups`, `nparams`, and `isvararg`
   +> "f" -- `func`
   +> "r" -- `ftransfer` and `ntransfer`
   +> "L" -- `activelines`

getlocal

function debug.getlocal(thread: thread, f: integer|fun(...any):...unknown, index: integer)
  -> name: string
  2. value: any

Returns the name and the value of the local variable with index local of the function at level f of the stack.

View documents

getmetatable

function debug.getmetatable(object: any)
  -> metatable: table

Returns the metatable of the given value.

View documents

getregistry

function debug.getregistry()
  -> table

Returns the registry table.

View documents

getupvalue

function debug.getupvalue(f: fun(...any):...unknown, up: integer)
  -> name: string
  2. value: any

Returns the name and the value of the upvalue with index up of the function.

View documents

getuservalue

function debug.getuservalue(u: userdata, n?: integer)
  -> any
  2. boolean

Returns the n-th user value associated to the userdata u plus a boolean, false if the userdata does not have that value.

View documents

setcstacklimit

function debug.setcstacklimit(limit: integer)
  -> boolean|integer

Deprecated in Lua 5.4.2

Sets a new limit for the C stack. This limit controls how deeply nested calls can go in Lua, with the intent of avoiding a stack overflow.

In case of success, this function returns the old limit. In case of error, it returns false.

View documents

setfenv

function debug.setfenv(object: <T>, env: table)
  -> object: <T>

Sets the environment of the given object to the given table .

View documents

sethook

function debug.sethook(thread: thread, hook: fun(...any):...unknown, mask: string|"c"|"l"|"r", count?: integer)

Sets the given function as a hook.

View documents


mask:
   +> "c" -- Calls hook when Lua calls a function.
   +> "r" -- Calls hook when Lua returns from a function.
   +> "l" -- Calls hook when Lua enters a new line of code.

setlocal

function debug.setlocal(thread: thread, level: integer, index: integer, value: any)
  -> name: string

Assigns the value to the local variable with index local of the function at level of the stack.

View documents

setmetatable

function debug.setmetatable(value: <T>, meta?: table)
  -> value: <T>

Sets the metatable for the given value to the given table (which can be nil).

View documents

setupvalue

function debug.setupvalue(f: fun(...any):...unknown, up: integer, value: any)
  -> name: string

Assigns the value to the upvalue with index up of the function.

View documents

setuservalue

function debug.setuservalue(udata: userdata, value: any, n?: integer)
  -> udata: userdata

Sets the given value as the n-th user value associated to the given udata. udata must be a full userdata.

View documents

traceback

function debug.traceback(thread: thread, message?: any, level?: integer)
  -> message: string

Returns a string with a traceback of the call stack. The optional message string is appended at the beginning of the traceback.

View documents

upvalueid

function debug.upvalueid(f: fun(...any):...unknown, n: integer)
  -> id: lightuserdata

Returns a unique identifier (as a light userdata) for the upvalue numbered n from the given function.

View documents

upvaluejoin

function debug.upvaluejoin(f1: fun(...any):...unknown, n1: integer, f2: fun(...any):...unknown, n2: integer)

Make the n1-th upvalue of the Lua closure f1 refer to the n2-th upvalue of the Lua closure f2.

View documents


dofile

function dofile(filename?: string)
  -> ...any

drawablenodeObj


error

function error(message: any, level?: integer)

exitcode


false


file*

close

(method) file*:close()
  -> suc: boolean?
  2. exitcode: ("exit"|"signal")?
  3. code: integer?

Close file.

View documents

exitcode:
    | "exit"
    | "signal"

flush

(method) file*:flush()

Saves any written data to file.

View documents

lines

(method) file*:lines(...string|integer|"L"|"a"|"l"...(+1))
  -> fun():any, ...unknown

for c in file:lines(...) do
    body
end

View documents

...(param):
    | "n" -- Reads a numeral and returns it as number.
    | "a" -- Reads the whole file.
   -> "l" -- Reads the next line skipping the end of line.
    | "L" -- Reads the next line keeping the end of line.

read

(method) file*:read(...string|integer|"L"|"a"|"l"...(+1))
  -> any
  2. ...any

Reads the file, according to the given formats, which specify what to read.

View documents

...(param):
    | "n" -- Reads a numeral and returns it as number.
    | "a" -- Reads the whole file.
   -> "l" -- Reads the next line skipping the end of line.
    | "L" -- Reads the next line keeping the end of line.

seek

(method) file*:seek(whence?: "cur"|"end"|"set", offset?: integer)
  -> offset: integer
  2. errmsg: string?

Sets and gets the file position, measured from the beginning of the file.

View documents

whence:
    | "set" -- Base is beginning of the file.
   -> "cur" -- Base is current position.
    | "end" -- Base is end of file.

setvbuf

(method) file*:setvbuf(mode: "full"|"line"|"no", size?: integer)

Sets the buffering mode for an output file.

View documents

mode:
    | "no" -- Output operation appears immediately.
    | "full" -- Performed only when the buffer is full.
    | "line" -- Buffered until a newline is output.

write

(method) file*:write(...string|number)
  -> file*?
  2. errmsg: string?

Writes the value of each of its arguments to file.

View documents


file_date

day

integer

hour

integer

minute

integer

month

integer

second

integer

week_day

integer

year

integer

filetype


fontObj


function


gcoptions


getfenv

function getfenv(f?: integer|fun(...any):...unknown)
  -> table

getmetatable

function getmetatable(object: any)
  -> metatable: table

gui_settings

imgui_layer

integer

ImGui drawable node layer

imgui_viewport

viewportObj

ImGui viewport

nuklearLayer

integer

Nuklear drawable node layer

nuklear_viewport

viewportObj

Nuklear viewport


gui_settings

gui_settings

hookmask


infowhat


integer


io

iolib

io.close

function io.close(file?: file*)
  -> suc: boolean?
  2. exitcode: ("exit"|"signal")?
  3. code: integer?

io.flush

function io.flush()

io.input

function io.input(file: string|file*)

io.lines

function io.lines(filename?: string, ...string|integer|"L"|"a"|"l"...(+1))
  -> fun():any, ...unknown

io.open

function io.open(filename: string, mode?: "a"|"a+"|"a+b"|"ab"|"r"...(+7))
  -> file*?
  2. errmsg: string?

io.output

function io.output(file: string|file*)

io.popen

function io.popen(prog: string, mode?: "r"|"w")
  -> file*?
  2. errmsg: string?

io.read

function io.read(...string|integer|"L"|"a"|"l"...(+1))
  -> any
  2. ...any

io.tmpfile

function io.tmpfile()
  -> file*

io.type

function io.type(file: file*)
  -> "closed file"|"file"|`nil`

io.write

function io.write(...any)
  -> file*
  2. errmsg: string?

iolib

close

function io.close(file?: file*)
  -> suc: boolean?
  2. exitcode: ("exit"|"signal")?
  3. code: integer?

Close file or default output file.

View documents

exitcode:
    | "exit"
    | "signal"

flush

function io.flush()

Saves any written data to default output file.

View documents

input

function io.input(file: string|file*)

Sets file as the default input file.

View documents

lines

function io.lines(filename?: string, ...string|integer|"L"|"a"|"l"...(+1))
  -> fun():any, ...unknown

for c in io.lines(filename, ...) do
    body
end

View documents

...(param):
    | "n" -- Reads a numeral and returns it as number.
    | "a" -- Reads the whole file.
   -> "l" -- Reads the next line skipping the end of line.
    | "L" -- Reads the next line keeping the end of line.

open

function io.open(filename: string, mode?: "a"|"a+"|"a+b"|"ab"|"r"...(+7))
  -> file*?
  2. errmsg: string?

Opens a file, in the mode specified in the string mode.

View documents

mode:
   -> "r" -- Read mode.
    | "w" -- Write mode.
    | "a" -- Append mode.
    | "r+" -- Update mode, all previous data is preserved.
    | "w+" -- Update mode, all previous data is erased.
    | "a+" -- Append update mode, previous data is preserved, writing is only allowed at the end of file.
    | "rb" -- Read mode. (in binary mode.)
    | "wb" -- Write mode. (in binary mode.)
    | "ab" -- Append mode. (in binary mode.)
    | "r+b" -- Update mode, all previous data is preserved. (in binary mode.)
    | "w+b" -- Update mode, all previous data is erased. (in binary mode.)
    | "a+b" -- Append update mode, previous data is preserved, writing is only allowed at the end of file. (in binary mode.)

output

function io.output(file: string|file*)

Sets file as the default output file.

View documents

popen

function io.popen(prog: string, mode?: "r"|"w")
  -> file*?
  2. errmsg: string?

Starts program prog in a separated process.

View documents

mode:
    | "r" -- Read data from this program by `file`.
    | "w" -- Write data to this program by `file`.

read

function io.read(...string|integer|"L"|"a"|"l"...(+1))
  -> any
  2. ...any

Reads the file, according to the given formats, which specify what to read.

View documents

...(param):
    | "n" -- Reads a numeral and returns it as number.
    | "a" -- Reads the whole file.
   -> "l" -- Reads the next line skipping the end of line.
    | "L" -- Reads the next line keeping the end of line.

stderr

file*

standard error.

View documents

stdin

file*

standard input.

View documents

stdout

file*

standard output.

View documents

tmpfile

function io.tmpfile()
  -> file*

In case of success, returns a handle for a temporary file.

View documents

type

function io.type(file: file*)
  -> "closed file"|"file"|`nil`

Checks whether obj is a valid file handle.

View documents

return #1:
    | "file" -- Is an open file handle.
    | "closed file" -- Is a closed file handle.
    | `nil` -- Is not a file handle.

write

function io.write(...any)
  -> file*
  2. errmsg: string?

Writes the value of each of its arguments to default output file.

View documents


ipairs

function ipairs(t: <T:table>)
  -> fun(table: <V>[], i?: integer):integer, <V>
  2. <T:table>
  3. i: integer

is_gui_hidden

function is_gui_hidden()
  -> boolean

joy_axis_event

joy_axis_event

joy_axis_event

axis_id

integer

joy_id

integer

norm_value

number

value

number

joy_button_event

button_id

integer

joy_id

integer

joy_button_event

joy_button_event

joy_connection_event

joy_connection_event

joy_connection_event

joy_id

integer

joy_hat_event

hat_id

integer

hat_state

ncine.joy_hat_state

Joystick hat states

joy_id

integer

joy_hat_event

joy_hat_event

joy_mapped_axis_event

joymapped_axis_event

joy_mapped_button_event

joymapped_button_event

joymapped_axis_event

axis

ncine.joy_axis

Joystick axis names

joy_id

integer

value

number

joymapped_button_event

button

ncine.joy_button

Joystick button names

joy_id

integer

joymappedstateObj


joystickstateObj


keyboard_event

mod

integer

scancode

integer

sym

integer

keyboard_event

keyboard_event

keystateObj


lightuserdata


load

function load(chunk: string|function, chunkname?: string, mode?: "b"|"bt"|"t", env?: table)
  -> function?
  2. error_message: string?

loadfile

function loadfile(filename?: string, mode?: "b"|"bt"|"t", env?: table)
  -> function?
  2. error_message: string?

loadmode


loadstring

function loadstring(text: string, chunkname?: string)
  -> function?
  2. error_message: string?

localecategory


math

mathlib

math.abs

function math.abs(x: <Number:number>)
  -> <Number:number>

math.acos

function math.acos(x: number)
  -> number

math.asin

function math.asin(x: number)
  -> number

math.atan

function math.atan(y: number, x?: number)
  -> number

math.atan2

function math.atan2(y: number, x: number)
  -> number

math.ceil

function math.ceil(x: number)
  -> integer

math.cos

function math.cos(x: number)
  -> number

math.cosh

function math.cosh(x: number)
  -> number

math.deg

function math.deg(x: number)
  -> number

math.exp

function math.exp(x: number)
  -> number

math.floor

function math.floor(x: number)
  -> integer

math.fmod

function math.fmod(x: number, y: number)
  -> number

math.frexp

function math.frexp(x: number)
  -> m: number
  2. e: number

math.ldexp

function math.ldexp(m: number, e: number)
  -> number

math.log

function math.log(x: number, base?: integer)
  -> number

math.log10

function math.log10(x: number)
  -> number

math.max

function math.max(x: <Number:number>, ...<Number:number>)
  -> <Number:number>

math.min

function math.min(x: <Number:number>, ...<Number:number>)
  -> <Number:number>

math.modf

function math.modf(x: number)
  -> integer
  2. number

math.pow

function math.pow(x: number, y: number)
  -> number

math.rad

function math.rad(x: number)
  -> number

math.random

function math.random(m: integer, n: integer)
  -> integer

math.randomseed

function math.randomseed(x?: integer, y?: integer)

math.sin

function math.sin(x: number)
  -> number

math.sinh

function math.sinh(x: number)
  -> number

math.sqrt

function math.sqrt(x: number)
  -> number

math.tan

function math.tan(x: number)
  -> number

math.tanh

function math.tanh(x: number)
  -> number

math.tointeger

function math.tointeger(x: any)
  -> integer?

math.type

function math.type(x: any)
  -> "float"|"integer"|'nil'

math.ult

function math.ult(m: integer, n: integer)
  -> boolean

mathlib

abs

function math.abs(x: <Number:number>)
  -> <Number:number>

Returns the absolute value of x.

View documents

acos

function math.acos(x: number)
  -> number

Returns the arc cosine of x (in radians).

View documents

asin

function math.asin(x: number)
  -> number

Returns the arc sine of x (in radians).

View documents

atan

function math.atan(y: number, x?: number)
  -> number

Returns the arc tangent of y/x (in radians).

View documents

atan2

function math.atan2(y: number, x: number)
  -> number

Returns the arc tangent of y/x (in radians).

View documents

ceil

function math.ceil(x: number)
  -> integer

Returns the smallest integral value larger than or equal to x.

View documents

cos

function math.cos(x: number)
  -> number

Returns the cosine of x (assumed to be in radians).

View documents

cosh

function math.cosh(x: number)
  -> number

Returns the hyperbolic cosine of x (assumed to be in radians).

View documents

deg

function math.deg(x: number)
  -> number

Converts the angle x from radians to degrees.

View documents

exp

function math.exp(x: number)
  -> number

Returns the value e^x (where e is the base of natural logarithms).

View documents

floor

function math.floor(x: number)
  -> integer

Returns the largest integral value smaller than or equal to x.

View documents

fmod

function math.fmod(x: number, y: number)
  -> number

Returns the remainder of the division of x by y that rounds the quotient towards zero.

View documents

frexp

function math.frexp(x: number)
  -> m: number
  2. e: number

Decompose x into tails and exponents. Returns m and e such that x = m * (2 ^ e), e is an integer and the absolute value of m is in the range [0.5, 1) (or zero when x is zero).

View documents

huge

number

A value larger than any other numeric value.

View documents

ldexp

function math.ldexp(m: number, e: number)
  -> number

Returns m * (2 ^ e) .

View documents

log

function math.log(x: number, base?: integer)
  -> number

Returns the logarithm of x in the given base.

View documents

log10

function math.log10(x: number)
  -> number

Returns the base-10 logarithm of x.

View documents

max

function math.max(x: <Number:number>, ...<Number:number>)
  -> <Number:number>

Returns the argument with the maximum value, according to the Lua operator <.

View documents

maxinteger

integer

Miss locale <math.maxinteger>

View documents

min

function math.min(x: <Number:number>, ...<Number:number>)
  -> <Number:number>

Returns the argument with the minimum value, according to the Lua operator <.

View documents

mininteger

integer

Miss locale <math.mininteger>

View documents

modf

function math.modf(x: number)
  -> integer
  2. number

Returns the integral part of x and the fractional part of x.

View documents

pi

number

The value of π.

View documents

pow

function math.pow(x: number, y: number)
  -> number

Returns x ^ y .

View documents

rad

function math.rad(x: number)
  -> number

Converts the angle x from degrees to radians.

View documents

random

function math.random(m: integer, n: integer)
  -> integer

View documents

randomseed

function math.randomseed(x?: integer, y?: integer)

View documents

sin

function math.sin(x: number)
  -> number

Returns the sine of x (assumed to be in radians).

View documents

sinh

function math.sinh(x: number)
  -> number

Returns the hyperbolic sine of x (assumed to be in radians).

View documents

sqrt

function math.sqrt(x: number)
  -> number

Returns the square root of x.

View documents

tan

function math.tan(x: number)
  -> number

Returns the tangent of x (assumed to be in radians).

View documents

tanh

function math.tanh(x: number)
  -> number

Returns the hyperbolic tangent of x (assumed to be in radians).

View documents

tointeger

function math.tointeger(x: any)
  -> integer?

Miss locale <math.tointeger>

View documents

type

function math.type(x: any)
  -> "float"|"integer"|'nil'

Miss locale <math.type>

View documents

return #1:
    | "integer"
    | "float"
    | 'nil'

ult

function math.ult(m: integer, n: integer)
  -> boolean

Miss locale <math.ult>

View documents


mesh_sprite_vertex

u

number

v

number

x

number

y

number

mesh_sprite_vertex

mesh_sprite_vertex

mesh_sprite_vertex_notexture

mesh_sprite_vertex_notexture

mesh_sprite_vertex_notexture

x

number

y

number

meshspriteObj


metatable

__add

fun(t1: any, t2: any):any|nil

__band

fun(t1: any, t2: any):any|nil

__bnot

fun(t: any):any|nil

__bor

fun(t1: any, t2: any):any|nil

__bxor

fun(t1: any, t2: any):any|nil

__call

fun(t: any, ...any):...unknown|nil

__close

fun(t: any, errobj: any):any|nil

__concat

fun(t1: any, t2: any):any|nil

__div

fun(t1: any, t2: any):any|nil

__eq

fun(t1: any, t2: any):boolean|nil

__gc

fun(t: any)|nil

__idiv

fun(t1: any, t2: any):any|nil

__index

table|fun(t: any, k: any):any|nil

__le

fun(t1: any, t2: any):boolean|nil

__len

fun(t: any):integer|nil

__lt

fun(t1: any, t2: any):boolean|nil

__metatable

any

__mod

fun(t1: any, t2: any):any|nil

__mode

'k'|'kv'|'v'|nil

__mul

fun(t1: any, t2: any):any|nil

__newindex

table|fun(t: any, k: any, v: any)|nil

__pairs

fun(t: any):fun(t: any, k: any, v: any):any, any, any, any|nil

__pow

fun(t1: any, t2: any):any|nil

__shl

fun(t1: any, t2: any):any|nil

__shr

fun(t1: any, t2: any):any|nil

__sub

fun(t1: any, t2: any):any|nil

__tostring

fun(t: any):string|nil

__unm

fun(t: any):any|nil

module

function module(name: string, ...any)

monitor

dpi

ncine.vec2

The horizontal and vertical dots per inch

name

string

The monitor name

num_video_modes

integer

The number of video modes in the array

position

ncine.vec2

The position of the monitor's viewport on the virtual screen

scale

ncine.vec2

The content scale factor

video_modes

video_mode[]

The array of supported video modes


monitor

monitor

mouse_event

button

ncine.mouse_button

Mouse buttons

x

number

y

number

mouse_event

mouse_event

mouse_state

fifth_pressed

boolean

It is true if the fifth mouse button is pressed

fourth_pressed

boolean

It is true if the fourth mouse button is pressed

left_pressed

boolean

It is true if the left mouse button is pressed

middle_pressed

boolean

It is true if the middle mouse button is pressed

right_pressed

boolean

TIt is true if the right mouse button is pressed

x

integer

Pointer position on the X axis

y

integer

Pointer position on the Y axis


mouse_state

mouse_state

ncine

ncine

ncine

ANDROID

boolean

True if running on Android

DEBUG

boolean

True if linked with a debug build of the nCine library

EMSCRIPTEN

boolean

True if running on the web via Emscripten

LINUX

boolean

True if running on Linux

MACOS

boolean

True if running on macOS

MINGW

boolean

True if running on MinGW

WINDOWS

boolean

True if running on Windows

_GITBRANCH

string

The git branch

_GITLATCOMMITDATE

string

The git last commit date

_GITREVCOUNT

string

The git revision count

_GITSHORTHASH

string

The git short hash

_GITTAG

string

The git tag

_VERSION

string

The version string

affector_type

enum ncine.affector_type

animated_sprite

ncine.animated_sprite

The table containing animated sprite related functions

app_onfiguration

ncine.app_configuration

The application configuration table

application

ncine.application

The table containing application related functions

audio_device

ncine.audio_device

The table containing the audio device related functions

audio_effect

ncine.audio_effect

The table containing audio effect related functions

audio_effect_properties

ncine.audio_effect_properties

The table containing audio effect properties related functions

audio_effect_slot

ncine.audio_effect_slot

The table containing audio effect slot related functions

audio_effect_type

enum ncine.audio_effect_type

audio_filter

ncine.audio_filter

The table containing audio filter related functions

audio_filter_type

enum ncine.audio_filter_type

audio_player

ncine.audio_player

The table containing audio player related functions

audiobuffer

ncine.audiobuffer

The table containing audio buffer related functions

audiobuffer_player

ncine.audiobuffer_player

The table containing audio buffer player related functions

audiostream_player

ncine.audiostream_player

The table containing audio stream player related functions

base_sprite

ncine.base_sprite

The table containing base sprite related functions

blending_factor

enum ncine.blending_factor

blending_preset

enum ncine.blending_preset

camera

ncine.camera

The table containing camera related functions

clear_mode

enum ncine.clear_mode

color

ncine.color

A RGBA color

colors

table

depth_stencil_format

enum ncine.depth_stencil_format

drawable_node

ncine.drawable_node

The table containing drawable node related functions

efx_reverb_presets

enum ncine.efx_reverb_presets

font

ncine.font

The table containing font related functions

font_render_mode

enum ncine.font_render_mode

frame_timer

ncine.frame_timer

The table containing frame timer related functions

fs

ncine.fs

The table containing filesystem related functions

gfx_device

ncine.gfx_device

The table containing the graphics device related functions

hash64

table

Utility methods to calculate a 64bit hash from strings or files

input

ncine.input

The table containing the input manager related functions

joy_axis

enum ncine.joy_axis

joy_button

enum ncine.joy_button

joy_dead_zone

table

Joystick dead zone values for various axes

From XInput.h in DirectX SDK

joy_hat_state

enum ncine.joy_hat_state

keymod

enum ncine.keymod

keysym

enum ncine.keysym

log

ncine.log

The logging class

log_level

enum ncine.log_level

loop_mode

enum ncine.loop_mode

mesh_sprite

ncine.mesh_sprite

The table containing mesh sprite related functions

mouse_button

enum ncine.mouse_button

mouse_cursor_mode

enum ncine.mouse_cursor_mode

on_acceleration

function ncine.on_acceleration(event: accelerometer_event)

Callback function called at fixed time with the updated reading from the accelerometer sensor

on_change_scaling_factor

function ncine.on_change_scaling_factor(factor: number)

A callback that is called every time the window scaling factor changes

@param factor — The new scaling factor

on_draw_viewport

function ncine.on_draw_viewport(viewport: viewportObj)

A callback that is called every time a viewport is going to be drawn

@param viewport — The viewport currently being drawn

on_frame_end

function ncine.on_frame_end()

A callback that is called at the end of each frame, just before swapping drawing buffers

on_frame_start

function ncine.on_frame_start()

A callback that is called every time a new frame starts

on_init

function ncine.on_init()

A callback that is called once, after the nCine has been initialized.

It can be used to construct the object required by the scene.

on_joy_axis_moved

function ncine.on_joy_axis_moved(event: joy_axis_event)

Callback function called every time a joystick axis is moved

on_joy_button_pressed

function ncine.on_joy_button_pressed(event: joy_button_event)

Callback function called every time a joystick button is pressed

on_joy_button_released

function ncine.on_joy_button_released(event: joy_button_event)

Callback function called every time a joystick button is released

on_joy_connected

function ncine.on_joy_connected(event: joy_connection_event)

Callback function called every time a joystick is connected

on_joy_disconnected

function ncine.on_joy_disconnected(event: joy_connection_event)

Callback function called every time a joystick is disconnected

on_joy_hat_moved

function ncine.on_joy_hat_moved(event: joy_hat_event)

Callback function called every time a joystick hat is moved

on_joymapped_axis_moved

function ncine.on_joymapped_axis_moved(event: joymapped_axis_event)

Callback function called every time an axis of a joystick with mapping is moved

on_joymapped_button_pressed

function ncine.on_joymapped_button_pressed(event: joymapped_button_event)

Callback function called every time a button of a joystick with mapping is pressed

on_joymapped_button_released

function ncine.on_joymapped_button_released(event: joymapped_button_event)

Callback function called every time a button of a joystick with mapping is released

on_key_pressed

function ncine.on_key_pressed(event: keyboard_event)

Callback function called every time a key is pressed

on_key_released

function ncine.on_key_released(event: keyboard_event)

Callback function called every time a key is released

on_mouse_button_pressed

function ncine.on_mouse_button_pressed(event: mouse_event)

Callback function called every time a mouse button is pressed

on_mouse_button_released

function ncine.on_mouse_button_released(event: mouse_event)

Callback function called every time a mouse button is released

on_mouse_moved

function ncine.on_mouse_moved(event: mouse_state)

Callback function called every time the mouse is moved

on_pointer_down

function ncine.on_pointer_down(event: touch_event)

Callback function called every time a screen touch different than the first one is made

on_pointer_up

function ncine.on_pointer_up(event: touch_event)

Callback function called every time a screen touch different than the last one is released

on_post_update

function ncine.on_post_update()

A callback that is called every time the scenegraph has been traversed and all nodes have been transformed

on_pre_init

function ncine.on_pre_init(cfg: ncine.app_configuration)

A callback that is called once, before the nCine is initialized.

It can be used to change the initialization settings.

@param cfg — The configuration table

on_quit_request

function ncine.on_quit_request()
  -> boolean

Callback function called when the system sends a quit event, for example when the user clicks the window close button

Returns true if the application should quit

on_resize_window

function ncine.on_resize_window(width: integer, height: integer)

A callback that is called every time the window is resized (by the system or the user)

@param width — The new width of the window

@param height — The new height of the window

on_resume

function ncine.on_resume()

A callback that is called every time the application resumes from suspension

on_scroll_input

function ncine.on_scroll_input(event: scroll_event)

Callback function called every time a scroll input occurs (mouse wheel, touchpad gesture, etc.)

on_shutdown

function ncine.on_shutdown()

A callback that is called once, before the nCine shuts down

It can be used to destroy objects constructed in ncine.on_init()

on_suspend

function ncine.on_suspend()

A callback that is called every time the application needs to be suspended

on_text_input

function ncine.on_text_input(event: text_input_event)

Callback function called every time a text input is generated

on_touch_down

function ncine.on_touch_down(event: touch_event)

Callback function called every time the first screen touch is made

on_touch_move

function ncine.on_touch_move(event: touch_event)

Callback function called every time a screen touch is moved

on_touch_up

function ncine.on_touch_up(event: touch_event)

Callback function called every time the last screen touch is released

particle_affector

ncine.particle_affector

The table containing particle affectors related functions

particle_system

ncine.particle_system

The table containing particle system related functions

permission

enum ncine.permission

rect

ncine.rect

A rectangle in 2D

rect_animation

ncine.rect_animation

A rectangle based animation data table

rewind_mode

enum ncine.rewind_mode

scenenode

ncine.scenenode

The table containing scenenode related functions.

A scene node is the base class for many other classes that can be organized in a scene graph.

shader

ncine.shader

The table containing shader related functions

shader_default_fragment

enum ncine.shader_default_fragment

shader_default_vertex

enum ncine.shader_default_vertex

shader_introspection

enum ncine.shader_introspection

shaderstate

ncine.shaderstate

The table containing shader state related functions

sprite

ncine.sprite

The table containing sprite related functions

start

function ncine.start()

Starts the application game loop

This function should be called after defining the required callback functions, and only if launching the script from the stand-alone lua interpreter.

For example:

if ncine == nil then
	local names = { "ncine", "ncine_d", "libncine", "libncine_d" }
	for i, name in ipairs(names) do
		local ok, mod = pcall(require, name)
		if ok then
			break
		end
	end
	needs_start = true
end

function nc.on_init()
	[...]
end

function nc.on_frame_start()
	[...]
end

if needs_start then
	nc.start()
end

tex_filtering

enum ncine.tex_filtering

tex_format

enum ncine.tex_format

tex_wrap

enum ncine.tex_wrap

text_alignment

enum ncine.text_alignment

textnode

ncine.textnode

The table containing textnode related functions

texture

ncine.texture

The table containing texture related functions

texture_cut_mode

enum ncine.texture_cut_mode

timestamp

table

Timestamping related functions

vec2

ncine.vec2

A two component vector

vec3

ncine.vec3

A three component vector

vec4

ncine.vec4

A four component vector

viewport

ncine.viewport

The table containing viewport related functions

viewport_type

enum ncine.viewport_type

visit_order_state

enum ncine.visit_order_state

ncine.affector_type

enum ncine.affector_type

ncine.animated_sprite

add_animation

function ncine.animated_sprite.add_animation(sprite: animatedspriteObj, anim: ncine.rect_animation)

Adds a new animation

An example of a valid animation table is the following:

local animation = {
    frame_duration = 0.5, -- half a second
    loop_mode = nc.loop_mode.ENABLED,
    rewind_mode = nc.rewind_mode.FROM_START,
    rect_size = { x = 32, y = 32 },
    source_rect = { x = 0, y = 0, w = 96, h = 48 },
    num_rectangles_to_skip = 0, -- default is 0 if the field is not specified
    padding = { x = 0, y = 0 }, -- default is {x = 0, y = 0} if the field is not specified
}

add_child

function ncine.scenenode.add_child(parent: scenenodeObj, node: scenenodeObj)
  -> boolean

Adds a child node to the specified parent

@returntrue if the node has been added

clear_animations

function ncine.animated_sprite.clear_animations(sprite: animatedspriteObj)

Deletes all animations

clone

function ncine.animated_sprite.clone(sprite: animatedspriteObj)
  -> animatedspriteObj

Constructs a new animated sprite object as a clone of the specified one

Don't forget to call delete when you are done with it!

@param sprite — The sprite object to be cloned

@return — The cloned animated sprite object

delete

function ncine.animated_sprite.delete(sprite: animatedspriteObj)

Destroys an animated sprite object and releases its memory

@param sprite — The animated sprite object to be destroyed

get_aabb

function ncine.drawable_node.get_aabb(node: drawablenodeObj)
  -> ncine.rect

Returns the axis-aligned bounding box of the node area in the last frame

get_abs_anchor_point

function ncine.scenenode.get_abs_anchor_point(node: scenenodeObj)
  -> ncine.vec2

Returns the absolute transformation anchor point in pixels

get_alpha

function ncine.scenenode.get_alpha(node: scenenodeObj)
  -> number

Returns the node alpha color component

get_anchor_point

function ncine.drawable_node.get_anchor_point(node: drawablenodeObj)
  -> ncine.vec2

Returns the transformation anchor point

get_animation_index

function ncine.animated_sprite.get_animation_index(sprite: animatedspriteObj)
  -> integer

Returns the index of current animation

get_child

function ncine.scenenode.get_child(node: scenenodeObj, index: integer)
  -> scenenodeObj?

Returns the n-th child

get_child_order_index

function ncine.scenenode.get_child_order_index(node: scenenodeObj)
  -> integer

Returns the order index of this node among its siblings

@return — The order index or zero if the node has no parent

get_children

function ncine.scenenode.get_children(node: scenenodeObj)
  -> scenenodeObj[]

Returns the array of children

get_color

function ncine.scenenode.get_color(node: scenenodeObj)
  -> ncine.color

Returns the node color

get_dest_blending_factor

function ncine.drawable_node.get_dest_blending_factor(node: drawablenodeObj)
  -> ncine.blending_factor

Returns the destination blending factor

get_frame

function ncine.animated_sprite.get_frame(sprite: animatedspriteObj)
  -> integer

Returns the frame number in current animation

get_height

function ncine.drawable_node.get_height(node: drawablenodeObj)
  -> number

Returns the height of the node area

get_last_frame_rendered

function ncine.drawable_node.get_last_frame_rendered(node: drawablenodeObj)
  -> integer

Returns the last frame in which any of the viewports have rendered this node (node was not culled)

get_last_frame_updated

function ncine.scenenode.get_last_frame_updated(node: scenenodeObj)
  -> integer

Returns the last frame in which any of the viewports have updated this node

get_layer

function ncine.scenenode.get_layer(node: scenenodeObj)
  -> integer

Returns the node rendering layer

get_parent

function ncine.scenenode.get_parent(node: scenenodeObj)
  -> scenenodeObj?

Returns the parent node, if there is any

get_position

function ncine.scenenode.get_position(node: scenenodeObj)
  -> ncine.vec2

Returns the node position relative to its parent

get_rotation

function ncine.scenenode.get_rotation(node: scenenodeObj)
  -> number

Returns the node rotation in degress

get_scale

function ncine.scenenode.get_scale(node: scenenodeObj)
  -> ncine.vec2

Returns the node scale factors

get_size

function ncine.drawable_node.get_size(node: drawablenodeObj)
  -> ncine.vec2

Returns the size of the node area

get_src_blending_factor

function ncine.drawable_node.get_src_blending_factor(node: drawablenodeObj)
  -> ncine.blending_factor

eturns the source blending factor

get_texrect

function ncine.base_sprite.get_texrect(sprite: basespriteObj)
  -> ncine.rect

Returns the texture source rectangle for blitting

get_texture

function ncine.base_sprite.get_texture(sprite: basespriteObj)
  -> textureObj?

Returns the texture object

get_visit_order_index

function ncine.scenenode.get_visit_order_index(node: scenenodeObj)
  -> integer

Returns the visit drawing order of the node

get_visit_order_state

function ncine.scenenode.get_visit_order_state(node: scenenodeObj)
  -> ncine.visit_order_state

Returns the visit order state for the specified node

get_width

function ncine.drawable_node.get_width(node: drawablenodeObj)
  -> number

Returns the width of the node area

is_blending_enabled

function ncine.drawable_node.is_blending_enabled(node: drawablenodeObj)
  -> boolean

Returns true if the node renders with blending enabled

is_enabled

function ncine.scenenode.is_enabled(node: scenenodeObj)
  -> boolean

Returns true if the node is both updating and drawing

is_flipped_x

function ncine.base_sprite.is_flipped_x(sprite: basespriteObj)
  -> boolean

Returns true if the sprite texture is horizontally flipped

is_flipped_y

function ncine.base_sprite.is_flipped_y(sprite: basespriteObj)
  -> boolean

Returns true if the sprite texture is vertically flipped

is_paused

function ncine.animated_sprite.is_paused(sprite: animatedspriteObj)
  -> boolean

Returns true if the current animation is paused

new

function ncine.animated_sprite.new(parent?: scenenodeObj, texture?: textureObj, x: number, y: number)
  -> animatedspriteObj

Constructs an animated sprite object with a parent scene node, a texture, and position components

Don't forget to call delete when you are done with it!

@param parent — The parent scenenode

@param texture — The texture object

@param x — The X component of the position

@param y — The Y component of the position

@return — A new animated sprite object

num_animations

function ncine.animated_sprite.num_animations(sprite: animatedspriteObj)
  -> integer

Returns the number of animations

num_children

function ncine.scenenode.num_children(node: scenenodeObj)
  -> integer

Returns the number of children

num_frames

function ncine.animated_sprite.num_frames(sprite: animatedspriteObj)
  -> integer

Returns the number of frames in current animation

remove_all_children

function ncine.scenenode.remove_all_children(parent: scenenodeObj, index: any)
  -> boolean

Removes all children from the specified parent

@returntrue if there were at least one node to remove

remove_child

function ncine.scenenode.remove_child(parent: scenenodeObj, node: scenenodeObj)
  -> boolean

Removes a child node from the specified parent

@returntrue if the node has been removed

remove_child_at

function ncine.scenenode.remove_child_at(parent: scenenodeObj, index: integer)
  -> boolean

Removes a child node at the specified index from the specified parent

@returntrue if the node has been removed

reset_texture

function ncine.base_sprite.reset_texture(sprite: basespriteObj)

Triggers a texture update without setting a new texture

set_abs_anchor_point

function ncine.scenenode.set_abs_anchor_point(node: scenenodeObj, pos: ncine.vec2)

Sets the absolute transformation anchor point in pixels

set_alpha

function ncine.scenenode.set_alpha(node: scenenodeObj, alpha: number)

Sets the node alpha color component

set_anchor_point

function ncine.drawable_node.set_anchor_point(node: drawablenodeObj, anchor_point: ncine.vec2)

Sets the transformation anchor point

set_animation_index

function ncine.animated_sprite.set_animation_index(sprite: animatedspriteObj, index: integer)

Sets current animation index

set_blending_enabled

function ncine.drawable_node.set_blending_enabled(node: drawablenodeObj, enabled: boolean)

Sets the blending state for node rendering

set_blending_factors

function ncine.drawable_node.set_blending_factors(node: drawablenodeObj, src_factor: ncine.blending_factor, dest_factor: ncine.blending_factor)

Sets a specific source and destination blending factors

set_blending_preset

function ncine.drawable_node.set_blending_preset(node: drawablenodeObj, preset: ncine.blending_preset)

Sets a blending preset for source and destination blending factors

set_color

function ncine.scenenode.set_color(node: scenenodeObj, color: ncine.color)

Sets the node color

set_enabled

function ncine.scenenode.set_enabled(node: scenenodeObj, newValue: boolean)

Enables or disables both node updating and drawing

set_flipped_x

function ncine.base_sprite.set_flipped_x(sprite: basespriteObj, flipped_x: boolean)

Flips the texture rect horizontally

set_flipped_y

function ncine.base_sprite.set_flipped_y(sprite: basespriteObj, flipped_y: boolean)

Flips the texture rect vertically

set_frame

function ncine.animated_sprite.set_frame(sprite: animatedspriteObj, frame: integer)

Sets current animation to a specified frame number

set_layer

function ncine.scenenode.set_layer(node: scenenodeObj, layer: integer)

Sets the node rendering layer

The lowest value (bottom) is 0 and the highest one (top) is 65535.
When the value is 0, the final layer value is inherited from the parent.

set_parent

function ncine.scenenode.set_parent(node: scenenodeObj, parent?: scenenodeObj)
  -> boolean

Sets the parent node

@returntrue if the parent has been set

set_paused

function ncine.animated_sprite.set_paused(sprite: animatedspriteObj, paused: boolean)

Sets the pause state for the animation

set_position

function ncine.scenenode.set_position(node: scenenodeObj, pos: ncine.vec2)

Sets a new position for the node

set_rotation

function ncine.scenenode.set_rotation(node: scenenodeObj, rot: number)

Sets the node rotation in degrees

@param rot — The amount of degrees

set_scale

function ncine.scenenode.set_scale(node: scenenodeObj, factor: number)

Sets both node scale factors to the specified value

set_scale_x

function ncine.scenenode.set_scale_x(node: scenenodeObj, factor: number)

Sets the node scale X factor

set_scale_y

function ncine.scenenode.set_scale_y(node: scenenodeObj, factor: number)

Sets the node scale Y factor

set_size

function ncine.base_sprite.set_size(sprite: basespriteObj, width: number, height: number)

Sets the sprite size

set_texrect

function ncine.base_sprite.set_texrect(sprite: basespriteObj, rect: ncine.rect)

Sets the texture source rectangle for blitting

set_texture

function ncine.base_sprite.set_texture(sprite: basespriteObj, texture?: textureObj)

Sets the texture object

set_visit_order_state

function ncine.scenenode.set_visit_order_state(node: scenenodeObj, state: ncine.visit_order_state)

Sets the visit order state for the specified node

swap_children

function ncine.scenenode.swap_children(parent: scenenodeObj, firstIndex: integer, secondIndex: integer)
  -> boolean

Swaps two children at the specified indices

@returntrue if the two nodes have been swapped

swap_node_back

function ncine.scenenode.swap_node_back(node: scenenodeObj)
  -> boolean

Brings this node one node back in the parent's list of children

@returntrue if the node has been brought one position back

swap_node_forward

function ncine.scenenode.swap_node_forward(node: scenenodeObj)
  -> boolean

Brings this node one node forward in the parent's list of children

@returntrue if the node has been brought one position forward

unlink_child

function ncine.scenenode.unlink_child(parent: scenenodeObj, node: scenenodeObj)
  -> boolean

Unlinks a child node from the specified parent

The children of the unlinked node will be reparented with the grandparent node

@returntrue if the node has been unlinked


ncine.animated_sprite

ncine.animated_sprite

ncine.animated_sprite.add_animation

function ncine.animated_sprite.add_animation(sprite: animatedspriteObj, anim: ncine.rect_animation)

ncine.animated_sprite.clear_animations

function ncine.animated_sprite.clear_animations(sprite: animatedspriteObj)

ncine.animated_sprite.clone

function ncine.animated_sprite.clone(sprite: animatedspriteObj)
  -> animatedspriteObj

ncine.animated_sprite.delete

function ncine.animated_sprite.delete(sprite: animatedspriteObj)

ncine.animated_sprite.get_animation_index

function ncine.animated_sprite.get_animation_index(sprite: animatedspriteObj)
  -> integer

ncine.animated_sprite.get_frame

function ncine.animated_sprite.get_frame(sprite: animatedspriteObj)
  -> integer

ncine.animated_sprite.is_paused

function ncine.animated_sprite.is_paused(sprite: animatedspriteObj)
  -> boolean

ncine.animated_sprite.new

function ncine.animated_sprite.new(parent?: scenenodeObj, texture?: textureObj, x: number, y: number)
  -> animatedspriteObj
function ncine.animated_sprite.new(parent?: scenenodeObj, texture?: textureObj, pos: ncine.vec2)
  -> animatedspriteObj

ncine.animated_sprite.num_animations

function ncine.animated_sprite.num_animations(sprite: animatedspriteObj)
  -> integer

ncine.animated_sprite.num_frames

function ncine.animated_sprite.num_frames(sprite: animatedspriteObj)
  -> integer

ncine.animated_sprite.set_animation_index

function ncine.animated_sprite.set_animation_index(sprite: animatedspriteObj, index: integer)

ncine.animated_sprite.set_frame

function ncine.animated_sprite.set_frame(sprite: animatedspriteObj, frame: integer)

ncine.animated_sprite.set_paused

function ncine.animated_sprite.set_paused(sprite: animatedspriteObj, paused: boolean)

ncine.app_configuration

argc

integer

The number of arguments passed on the command line

argv

string[]

The array of arguments passed on the command line

audio

boolean

The flag is true if the audio subsystem is enabled

binary_shader_cache

boolean

The flag is true if the shader cache is enabled to load and save binary shader programs

buffer_mapping

boolean

The flag is true if mapping is used to update OpenGL buffers

compile_batched_shaders_twice

boolean

The flag is true if, on devices with UBOs smaller than 64 KB, batched shaders will be compiled twice to identify their maximum batch size

console_colors

boolean

The flag is true if console log messages should use colors

console_log_level

ncine.log_level

ncine.log_level # The minimum level that a log message needs to have to be printed in the console

data_path

string

The data path

debug_overlay

boolean

The flag is true if the debug overlay is enabled

defer_shader_queries

boolean

The flag is true when error checking and introspection of shader programs are deferred to first use

file_log_level

ncine.log_level

The minimum level that a log message needs to have to be written to the log file

fixed_batch_size

integer

Fixed size of render commands to be collected for batching on Emscripten and ANGLE

frame_limit

integer

The maximum number of frames to render per second or 0 for no limit

full_screen

boolean

The flag is true if the application is going to be in full screen mode

gl_debug_context

boolean

The flag is true if the OpenGL debug context is enabled

ibo_size

integer

The maximum size in bytes for each IBO collecting index data

log_file

string

The file used when logging to file is enabled

log_interval

number

The interval for frame timer accumulation average and log

mono_audio_sources

integer

The number of mono audio sources

opengl_core_profile

boolean

True if the OpenGL profile is going to be core (read-only)

opengl_forward_compatible

boolean

True if the OpenGL context is going to be forward compatible (read-only)

opengl_major_version

integer

The major version number of the OpenGL context (read-only)

opengl_minor_version

integer

The minor version number of the OpenGL context (read-only)

output_audio_frequency

integer

The output frequency of the audio system

profile_text_update_time

number

The update time in seconds for the profile text nodes (read-only)

refresh_rate

number

The refresh rate of the screen mode used to go in full screen.
If it is zero or negative, when requesting a full screen mode the current refresh rate will not be changed.

rendercommand_pool_size

integer

The initial size for the pool of render commands

resizable

boolean

The flag is true if the window is going to be resizable

resolution

ncine.vec2

The window size or the resolution of the closest video mode if going full screen.
If either x or y are zero or negative, the application will go in full screen at the current screen resolution.

scenegraph

boolean

The flag is true if the scenegraph based rendering is enabled

shader_cache_dirname

string

The directory name (not the complete path) for the binary shaders cache

stereo_audio_sources

integer

The number of stereo audio sources

threads

boolean

The flag is true if the threading subsystem is enabled

vao_pool_size

integer

The maximum size for the pool of VAOs

vbo_size

integer

The maximum size in bytes for each VBO collecting geometry data

vsync

boolean

The flag is true if the vertical synchronization is enabled

window_icon

string

The window icon filename

window_position

ncine.vec2

The window position coordinates in the virtual screen made of all the connected monitors

window_scaling

boolean

The flag is true if the window size is automatically scaled according to the display factor

window_title

string

The window title


ncine.app_onfiguration

ncine.app_configuration

ncine.application

ncine.application

ncine.application

get_app_configuration

function ncine.application.get_app_configuration()
  -> ncine.app_configuration

Returns the configuration used to initialize the application

get_auto_suspension

function ncine.application.get_auto_suspension()
  -> boolean

Returns true if the application should auto-suspend when it loses focus

get_debugoverlay_settings

function ncine.application.get_debugoverlay_settings()
  -> debug_overlay_settings

Returns the run-time debug overlay settings, if debug overlay is available

get_gui_settings

function ncine.application.get_gui_settings()
  -> gui_settings

Returns the run-time GUI settings

get_height

function ncine.application.get_height()
  -> number

Returns the drawable screen height

get_interval

function ncine.application.get_interval()
  -> number

Returns the time in seconds that last frame took to complete

get_num_frames

function ncine.application.get_num_frames()
  -> integer

Returns the total number of frames already rendered

get_rendering_settings

function ncine.application.get_rendering_settings()
  -> rendering_settings

Returns the run-time rendering settings

get_resolution

function ncine.application.get_resolution()
  -> ncine.vec2

Returns the drawable screen resolution vector

get_rootnode

function ncine.application.get_rootnode()
  -> scenenodeObj

Returns the root node of the transformation graph

get_screen_viewport

function ncine.application.get_screen_viewport()
  -> viewportObj

Returns the screen viewport

get_width

function ncine.application.get_width()
  -> number

Returns the drawable screen width

is_suspended

function ncine.application.is_suspended()
  -> boolean

Returns true if the application is suspended.

A suspended application will not update nor receive events.

quit

function ncine.application.quit()

Asks the application to quit as soon as possible

set_auto_suspension

function ncine.application.set_auto_suspension(flag: boolean)

Sets a new value for the auto-suspension flag

set_debugoverlay_settings

function ncine.application.set_debugoverlay_settings(settings: debug_overlay_settings)

Sets the run-time debug overlay settings

set_gui_settings

function ncine.application.set_gui_settings(settings: gui_settings)

Sets the run-time GUI settings

set_rendering_settings

function ncine.application.set_rendering_settings(settings: rendering_settings)

Sets the run-time rendering settings

set_suspended

function ncine.application.set_suspended(flag: boolean)

Sets a new value for the suspension flag


ncine.application.get_app_configuration

function ncine.application.get_app_configuration()
  -> ncine.app_configuration

ncine.application.get_auto_suspension

function ncine.application.get_auto_suspension()
  -> boolean

ncine.application.get_debugoverlay_settings

function ncine.application.get_debugoverlay_settings()
  -> debug_overlay_settings

ncine.application.get_gui_settings

function ncine.application.get_gui_settings()
  -> gui_settings

ncine.application.get_height

function ncine.application.get_height()
  -> number

ncine.application.get_interval

function ncine.application.get_interval()
  -> number

ncine.application.get_num_frames

function ncine.application.get_num_frames()
  -> integer

ncine.application.get_rendering_settings

function ncine.application.get_rendering_settings()
  -> rendering_settings

ncine.application.get_resolution

function ncine.application.get_resolution()
  -> ncine.vec2

ncine.application.get_rootnode

function ncine.application.get_rootnode()
  -> scenenodeObj

ncine.application.get_screen_viewport

function ncine.application.get_screen_viewport()
  -> viewportObj

ncine.application.get_width

function ncine.application.get_width()
  -> number

ncine.application.is_suspended

function ncine.application.is_suspended()
  -> boolean

ncine.application.quit

function ncine.application.quit()

ncine.application.set_auto_suspension

function ncine.application.set_auto_suspension(flag: boolean)

ncine.application.set_debugoverlay_settings

function ncine.application.set_debugoverlay_settings(settings: debug_overlay_settings)

ncine.application.set_gui_settings

function ncine.application.set_gui_settings(settings: gui_settings)

ncine.application.set_rendering_settings

function ncine.application.set_rendering_settings(settings: rendering_settings)

ncine.application.set_suspended

function ncine.application.set_suspended(flag: boolean)

ncine.audio_device

ncine.audio_device

ncine.audio_device

get_gain

function ncine.audio_device.get_gain()
  -> number

Returns the listener gain value

get_max_num_sources

function ncine.audio_device.get_max_num_sources()
  -> integer

Returns the maximum number of audio sources

get_num_available_sources

function ncine.audio_device.get_num_available_sources()
  -> integer

Returns the number of available audio sources

get_num_players

function ncine.audio_device.get_num_players()
  -> integer

Returns the number of active players

get_player

function ncine.audio_device.get_player(index: integer)
  -> audioplayerObj?

Returns the specified active player object

get_position

function ncine.audio_device.get_position()
  -> ncine.vec3

Returns the listener position vector

get_velocity

function ncine.audio_device.get_velocity()
  -> ncine.vec3

Returns the listener velocity vector

has_efx_extension

function ncine.audio_device.has_efx_extension()
  -> boolean

Returns true if the OpenAL EFX extension is available

name

function ncine.audio_device.name()
  -> string

Returns the name of the audio device

pause_device

function ncine.audio_device.pause_device()

Pauses all audio device activities using an OpenAL-soft extension (if available)

If the extension is not available, all players are paused.

pause_players

function ncine.audio_device.pause_players()

Pauses every player currently playing

Paused players can be resumed with resume_players().

resume_device

function ncine.audio_device.resume_device()

Resumes all audio device activities using an OpenAL-soft extension (if available)

If the extension is not available, all paused players resume playing.

resume_players

function ncine.audio_device.resume_players()

Resumes all and only the players that were paused by a pause_players() call

set_gain

function ncine.audio_device.set_gain(gain: number)

Sets the listener gain value

set_position

function ncine.audio_device.set_position(position: ncine.vec3)

Sets the listener position vector

set_velocity

function ncine.audio_device.set_velocity(velocity: ncine.vec3)

Sets the listener velocity vector

stop_players

function ncine.audio_device.stop_players()

Stops every player currently playing


ncine.audio_device.get_gain

function ncine.audio_device.get_gain()
  -> number

ncine.audio_device.get_max_num_sources

function ncine.audio_device.get_max_num_sources()
  -> integer

ncine.audio_device.get_num_available_sources

function ncine.audio_device.get_num_available_sources()
  -> integer

ncine.audio_device.get_num_players

function ncine.audio_device.get_num_players()
  -> integer

ncine.audio_device.get_player

function ncine.audio_device.get_player(index: integer)
  -> audioplayerObj?

ncine.audio_device.get_position

function ncine.audio_device.get_position()
  -> ncine.vec3

ncine.audio_device.get_velocity

function ncine.audio_device.get_velocity()
  -> ncine.vec3

ncine.audio_device.has_efx_extension

function ncine.audio_device.has_efx_extension()
  -> boolean

ncine.audio_device.name

function ncine.audio_device.name()
  -> string

ncine.audio_device.pause_device

function ncine.audio_device.pause_device()

ncine.audio_device.pause_players

function ncine.audio_device.pause_players()

ncine.audio_device.resume_device

function ncine.audio_device.resume_device()

ncine.audio_device.resume_players

function ncine.audio_device.resume_players()

ncine.audio_device.set_gain

function ncine.audio_device.set_gain(gain: number)

ncine.audio_device.set_position

function ncine.audio_device.set_position(position: ncine.vec3)
function ncine.audio_device.set_position(position_x: number, position_y: number, position_z: number)
function ncine.audio_device.set_position(velocity_x: number, velocity_y: number, velocity_z: number)

ncine.audio_device.set_velocity

function ncine.audio_device.set_velocity(velocity: ncine.vec3)

ncine.audio_device.stop_players

function ncine.audio_device.stop_players()

ncine.audio_effect

apply_properties

function ncine.audio_effect.apply_properties(audio_effect: audioeffectObj, properties: audioeffectpropertiesObj)

Sets an effect type with all of its properties

delete

function ncine.audio_effect.delete(audio_effect: audioeffectObj)

Destroys an audio effect object and releases its memory

@param audio_effect — The audio effect object to be destroyed

get_effect_id

function ncine.audio_effect.get_effect_id(audio_effect: audioeffectObj)
  -> integer

Returns the OpenAL effect id

get_type

function ncine.audio_effect.get_type(audio_effect: audioeffectObj)
  -> ncine.audio_effect_type

Returns the effect type

new

function ncine.audio_effect.new()
  -> audioeffectObj

Constructs an audio effect object

Don't forget to call delete when you are done with it!

@return — A new audio effect object


ncine.audio_effect

ncine.audio_effect

ncine.audio_effect.apply_properties

function ncine.audio_effect.apply_properties(audio_effect: audioeffectObj, properties: audioeffectpropertiesObj)

ncine.audio_effect.delete

function ncine.audio_effect.delete(audio_effect: audioeffectObj)

ncine.audio_effect.get_effect_id

function ncine.audio_effect.get_effect_id(audio_effect: audioeffectObj)
  -> integer

ncine.audio_effect.get_type

function ncine.audio_effect.get_type(audio_effect: audioeffectObj)
  -> ncine.audio_effect_type

ncine.audio_effect.new

function ncine.audio_effect.new()
  -> audioeffectObj

ncine.audio_effect_properties

delete

function ncine.audio_effect_properties.delete(audio_effect_properties: audioeffectpropertiesObj)

Destroys an audio effect properties object and releases its memory

@param audio_effect_properties — The audio effect properties object to be destroyed

get_auto_wah_properties

function ncine.audio_effect_properties.get_auto_wah_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_auto_wah_properties

Returns the current values for the auto wah effect properties

get_chorus_properties

function ncine.audio_effect_properties.get_chorus_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_chorus_properties

Returns the current values for the chorus effect properties

get_compressor_properties

function ncine.audio_effect_properties.get_compressor_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_compressor_properties

Returns the current values for the compressor effect properties

get_distortion_properties

function ncine.audio_effect_properties.get_distortion_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_distortion_properties

Returns the current values for the distortion effect properties

get_eax_reverb_properties

function ncine.audio_effect_properties.get_eax_reverb_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_eax_reverb_properties

Returns the current values for the EAX reverb effect properties

get_echo_properties

function ncine.audio_effect_properties.get_echo_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_echo_properties

Returns the current values for the echo effect properties

get_equalizer_properties

function ncine.audio_effect_properties.get_equalizer_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_equalizer_properties

Returns the current values for the equalizer effect properties

get_flanger_properties

function ncine.audio_effect_properties.get_flanger_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_flanger_properties

Returns the current values for the flanger effect properties

get_frequency_shifter_properties

function ncine.audio_effect_properties.get_frequency_shifter_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_frequency_shifter_properties

Returns the current values for the frequency shifter effect properties

get_max_auto_wah_properties

function ncine.audio_effect_properties.get_max_auto_wah_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_auto_wah_properties

Returns the maximum values for the auto wah effect properties

get_max_chorus_properties

function ncine.audio_effect_properties.get_max_chorus_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_chorus_properties

Returns the maximum values for the chorus effect properties

get_max_compressor_properties

function ncine.audio_effect_properties.get_max_compressor_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_compressor_properties

Returns the maximum values for the compressor effect properties

get_max_distortion_properties

function ncine.audio_effect_properties.get_max_distortion_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_distortion_properties

Returns the maximum values for the distortion effect properties

get_max_eax_reverb_properties

function ncine.audio_effect_properties.get_max_eax_reverb_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_eax_reverb_properties

Returns the maximum values for the EAX reverb effect properties

get_max_echo_properties

function ncine.audio_effect_properties.get_max_echo_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_echo_properties

Returns the maximum values for the echo effect properties

get_max_equalizer_properties

function ncine.audio_effect_properties.get_max_equalizer_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_equalizer_properties

Returns the maximum values for the equalizer effect properties

get_max_flanger_properties

function ncine.audio_effect_properties.get_max_flanger_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_flanger_properties

Returns the maximum values for the flanger effect properties

get_max_frequency_shifter_properties

function ncine.audio_effect_properties.get_max_frequency_shifter_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_frequency_shifter_properties

Returns the maximum values for the frequency shifter effect properties

get_max_pitch_shifter_properties

function ncine.audio_effect_properties.get_max_pitch_shifter_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_pitch_shifter_properties

Returns the maximum values for the pitch shifter effect properties

get_max_reverb_properties

function ncine.audio_effect_properties.get_max_reverb_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_reverb_properties

Returns the maximum values for the reverb effect properties

get_max_ring_modulator_properties

function ncine.audio_effect_properties.get_max_ring_modulator_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_ring_modulator_properties

Returns the maximum values for the ring modulator effect properties

get_max_vocal_morpher_properties

function ncine.audio_effect_properties.get_max_vocal_morpher_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_vocal_morpher_properties

Returns the maximum values for the vocal morpher effect properties

get_min_auto_wah_properties

function ncine.audio_effect_properties.get_min_auto_wah_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_auto_wah_properties

Returns the minimum values for the auto wah effect properties

get_min_chorus_properties

function ncine.audio_effect_properties.get_min_chorus_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_chorus_properties

Returns the minimum values for the chorus effect properties

get_min_compressor_properties

function ncine.audio_effect_properties.get_min_compressor_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_compressor_properties

Returns the minimum values for the compressor effect properties

get_min_distortion_properties

function ncine.audio_effect_properties.get_min_distortion_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_distortion_properties

Returns the minimum values for the distortion effect properties

get_min_eax_reverb_properties

function ncine.audio_effect_properties.get_min_eax_reverb_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_eax_reverb_properties

Returns the minimum values for the EAX reverb effect properties

get_min_echo_properties

function ncine.audio_effect_properties.get_min_echo_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_echo_properties

Returns the minimum values for the echo effect properties

get_min_equalizer_properties

function ncine.audio_effect_properties.get_min_equalizer_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_equalizer_properties

Returns the minimum values for the equalizer effect properties

get_min_flanger_properties

function ncine.audio_effect_properties.get_min_flanger_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_flanger_properties

Returns the minimum values for the flanger effect properties

get_min_frequency_shifter_properties

function ncine.audio_effect_properties.get_min_frequency_shifter_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_frequency_shifter_properties

Returns the minimum values for the frequency shifter effect properties

get_min_pitch_shifter_properties

function ncine.audio_effect_properties.get_min_pitch_shifter_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_pitch_shifter_properties

Returns the minimum values for the pitch shifter effect properties

get_min_reverb_properties

function ncine.audio_effect_properties.get_min_reverb_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_reverb_properties

Returns the minimum values for the reverb effect properties

get_min_ring_modulator_properties

function ncine.audio_effect_properties.get_min_ring_modulator_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_ring_modulator_properties

Returns the minimum values for the ring modulator effect properties

get_min_vocal_morpher_properties

function ncine.audio_effect_properties.get_min_vocal_morpher_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_vocal_morpher_properties

Returns the minimum values for the vocal morpher effect properties

get_pitch_shifter_properties

function ncine.audio_effect_properties.get_pitch_shifter_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_pitch_shifter_properties

Returns the current values for the pitch shifter effect properties

get_reverb_properties

function ncine.audio_effect_properties.get_reverb_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_reverb_properties

Returns the current values for the reverb effect properties

get_ring_modulator_properties

function ncine.audio_effect_properties.get_ring_modulator_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_ring_modulator_properties

Returns the current values for the ring modulator effect properties

get_type

function ncine.audio_effect_properties.get_type(audio_effect_properties: audioeffectpropertiesObj)
  -> ncine.audio_effect_type

Returns the effect properties type

get_vocal_morpher_properties

function ncine.audio_effect_properties.get_vocal_morpher_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_vocal_morpher_properties

Returns the current values for the vocal morpher effect properties

load_efx_reverb_preset

function ncine.audio_effect_properties.load_efx_reverb_preset(audio_effect_properties: audioeffectpropertiesObj, preset: ncine.efx_reverb_presets)

Loads and sets the effect properties from an EFX reverb preset

new

function ncine.audio_effect_properties.new()
  -> audioeffectpropertiesObj

Constructs an audio effect properties object

Don't forget to call delete when you are done with it!

@return — A new audio effect properties object

reset_auto_wah_properties

function ncine.audio_effect_properties.reset_auto_wah_properties(audio_effect_properties: audioeffectpropertiesObj)

Resets all property values for the auto wah effect to thir default

reset_chorus_properties

function ncine.audio_effect_properties.reset_chorus_properties(audio_effect_properties: audioeffectpropertiesObj)

Resets all property values for the chorus effect to thir default

reset_compressor_properties

function ncine.audio_effect_properties.reset_compressor_properties(audio_effect_properties: audioeffectpropertiesObj)

Resets all property values for the compressor effect to thir default

reset_distortion_properties

function ncine.audio_effect_properties.reset_distortion_properties(audio_effect_properties: audioeffectpropertiesObj)

Resets all property values for the distortion effect to thir default

reset_eax_reverb_properties

function ncine.audio_effect_properties.reset_eax_reverb_properties(audio_effect_properties: audioeffectpropertiesObj)

Resets all property values for the EAX reverb effect to thir default

reset_echo_properties

function ncine.audio_effect_properties.reset_echo_properties(audio_effect_properties: audioeffectpropertiesObj)

Resets all property values for the echo effect to thir default

reset_equalizer_properties

function ncine.audio_effect_properties.reset_equalizer_properties(audio_effect_properties: audioeffectpropertiesObj)

Resets all property values for the equalizer effect to thir default

reset_flanger_properties

function ncine.audio_effect_properties.reset_flanger_properties(audio_effect_properties: audioeffectpropertiesObj)

Resets all property values for the flanger effect to thir default

reset_frequency_shifter_properties

function ncine.audio_effect_properties.reset_frequency_shifter_properties(audio_effect_properties: audioeffectpropertiesObj)

Resets all property values for the frequency shifter effect to thir default

reset_pitch_shifter_properties

function ncine.audio_effect_properties.reset_pitch_shifter_properties(audio_effect_properties: audioeffectpropertiesObj)

Resets all property values for the pitch shifter effect to thir default

reset_reverb_properties

function ncine.audio_effect_properties.reset_reverb_properties(audio_effect_properties: audioeffectpropertiesObj)

Resets all property values for the reverb effect to thir default

reset_ring_modulator_properties

function ncine.audio_effect_properties.reset_ring_modulator_properties(audio_effect_properties: audioeffectpropertiesObj)

Resets all property values for the ring modulator effect to thir default

reset_vocal_morpher_properties

function ncine.audio_effect_properties.reset_vocal_morpher_properties(audio_effect_properties: audioeffectpropertiesObj)

Resets all property values for the vocal morpher effect to thir default

set_auto_wah_properties

function ncine.audio_effect_properties.set_auto_wah_properties(audio_effect_properties: audioeffectpropertiesObj, properties: audio_auto_wah_properties)

Sets all values for the auto wah effect properties

set_chorus_properties

function ncine.audio_effect_properties.set_chorus_properties(audio_effect_properties: audioeffectpropertiesObj, properties: audio_chorus_properties)

Sets all values for the chorus effect properties

set_compressor_properties

function ncine.audio_effect_properties.set_compressor_properties(audio_effect_properties: audioeffectpropertiesObj, properties: audio_compressor_properties)

Sets all values for the compressor effect properties

set_distortion_properties

function ncine.audio_effect_properties.set_distortion_properties(audio_effect_properties: audioeffectpropertiesObj, properties: audio_distortion_properties)

Sets all values for the distortion effect properties

set_eax_reverb_properties

function ncine.audio_effect_properties.set_eax_reverb_properties(audio_effect_properties: audioeffectpropertiesObj, properties: audio_eax_reverb_properties)

Sets all values for the EAX reverb effect properties

set_echo_properties

function ncine.audio_effect_properties.set_echo_properties(audio_effect_properties: audioeffectpropertiesObj, properties: audio_echo_properties)

Sets all values for the echo effect properties

set_equalizer_properties

function ncine.audio_effect_properties.set_equalizer_properties(audio_effect_properties: audioeffectpropertiesObj, properties: audio_equalizer_properties)

Sets all values for the equalizer effect properties

set_flanger_properties

function ncine.audio_effect_properties.set_flanger_properties(audio_effect_properties: audioeffectpropertiesObj, properties: audio_flanger_properties)

Sets all values for the flanger effect properties

set_frequency_shifter_properties

function ncine.audio_effect_properties.set_frequency_shifter_properties(audio_effect_properties: audioeffectpropertiesObj, properties: audio_frequency_shifter_properties)

Sets all values for the frequency shifter effect properties

set_pitch_shifter_properties

function ncine.audio_effect_properties.set_pitch_shifter_properties(audio_effect_properties: audioeffectpropertiesObj, properties: audio_pitch_shifter_properties)

Sets all values for the pitch shifter effect properties

set_reverb_properties

function ncine.audio_effect_properties.set_reverb_properties(audio_effect_properties: audioeffectpropertiesObj, properties: audio_reverb_properties)

Sets all values for the reverb effect properties

set_ring_modulator_properties

function ncine.audio_effect_properties.set_ring_modulator_properties(audio_effect_properties: audioeffectpropertiesObj, properties: audio_ring_modulator_properties)

Sets all values for the ring modulator effect properties

set_type

function ncine.audio_effect_properties.set_type(audio_effect_properties: audioeffectpropertiesObj, audio_effect_type: ncine.audio_effect_type)

Sets the effect properties type

set_vocal_morpher_properties

function ncine.audio_effect_properties.set_vocal_morpher_properties(audio_effect_properties: audioeffectpropertiesObj, properties: audio_vocal_morpher_properties)

Sets all values for the vocal morpher effect properties


ncine.audio_effect_properties

ncine.audio_effect_properties

ncine.audio_effect_properties.delete

function ncine.audio_effect_properties.delete(audio_effect_properties: audioeffectpropertiesObj)

ncine.audio_effect_properties.get_auto_wah_properties

function ncine.audio_effect_properties.get_auto_wah_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_auto_wah_properties

ncine.audio_effect_properties.get_chorus_properties

function ncine.audio_effect_properties.get_chorus_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_chorus_properties

ncine.audio_effect_properties.get_compressor_properties

function ncine.audio_effect_properties.get_compressor_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_compressor_properties

ncine.audio_effect_properties.get_distortion_properties

function ncine.audio_effect_properties.get_distortion_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_distortion_properties

ncine.audio_effect_properties.get_eax_reverb_properties

function ncine.audio_effect_properties.get_eax_reverb_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_eax_reverb_properties

ncine.audio_effect_properties.get_echo_properties

function ncine.audio_effect_properties.get_echo_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_echo_properties

ncine.audio_effect_properties.get_equalizer_properties

function ncine.audio_effect_properties.get_equalizer_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_equalizer_properties

ncine.audio_effect_properties.get_flanger_properties

function ncine.audio_effect_properties.get_flanger_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_flanger_properties

ncine.audio_effect_properties.get_frequency_shifter_properties

function ncine.audio_effect_properties.get_frequency_shifter_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_frequency_shifter_properties

ncine.audio_effect_properties.get_max_auto_wah_properties

function ncine.audio_effect_properties.get_max_auto_wah_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_auto_wah_properties

ncine.audio_effect_properties.get_max_chorus_properties

function ncine.audio_effect_properties.get_max_chorus_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_chorus_properties

ncine.audio_effect_properties.get_max_compressor_properties

function ncine.audio_effect_properties.get_max_compressor_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_compressor_properties

ncine.audio_effect_properties.get_max_distortion_properties

function ncine.audio_effect_properties.get_max_distortion_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_distortion_properties

ncine.audio_effect_properties.get_max_eax_reverb_properties

function ncine.audio_effect_properties.get_max_eax_reverb_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_eax_reverb_properties

ncine.audio_effect_properties.get_max_echo_properties

function ncine.audio_effect_properties.get_max_echo_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_echo_properties

ncine.audio_effect_properties.get_max_equalizer_properties

function ncine.audio_effect_properties.get_max_equalizer_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_equalizer_properties

ncine.audio_effect_properties.get_max_flanger_properties

function ncine.audio_effect_properties.get_max_flanger_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_flanger_properties

ncine.audio_effect_properties.get_max_frequency_shifter_properties

function ncine.audio_effect_properties.get_max_frequency_shifter_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_frequency_shifter_properties

ncine.audio_effect_properties.get_max_pitch_shifter_properties

function ncine.audio_effect_properties.get_max_pitch_shifter_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_pitch_shifter_properties

ncine.audio_effect_properties.get_max_reverb_properties

function ncine.audio_effect_properties.get_max_reverb_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_reverb_properties

ncine.audio_effect_properties.get_max_ring_modulator_properties

function ncine.audio_effect_properties.get_max_ring_modulator_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_ring_modulator_properties

ncine.audio_effect_properties.get_max_vocal_morpher_properties

function ncine.audio_effect_properties.get_max_vocal_morpher_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_vocal_morpher_properties

ncine.audio_effect_properties.get_min_auto_wah_properties

function ncine.audio_effect_properties.get_min_auto_wah_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_auto_wah_properties

ncine.audio_effect_properties.get_min_chorus_properties

function ncine.audio_effect_properties.get_min_chorus_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_chorus_properties

ncine.audio_effect_properties.get_min_compressor_properties

function ncine.audio_effect_properties.get_min_compressor_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_compressor_properties

ncine.audio_effect_properties.get_min_distortion_properties

function ncine.audio_effect_properties.get_min_distortion_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_distortion_properties

ncine.audio_effect_properties.get_min_eax_reverb_properties

function ncine.audio_effect_properties.get_min_eax_reverb_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_eax_reverb_properties

ncine.audio_effect_properties.get_min_echo_properties

function ncine.audio_effect_properties.get_min_echo_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_echo_properties

ncine.audio_effect_properties.get_min_equalizer_properties

function ncine.audio_effect_properties.get_min_equalizer_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_equalizer_properties

ncine.audio_effect_properties.get_min_flanger_properties

function ncine.audio_effect_properties.get_min_flanger_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_flanger_properties

ncine.audio_effect_properties.get_min_frequency_shifter_properties

function ncine.audio_effect_properties.get_min_frequency_shifter_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_frequency_shifter_properties

ncine.audio_effect_properties.get_min_pitch_shifter_properties

function ncine.audio_effect_properties.get_min_pitch_shifter_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_pitch_shifter_properties

ncine.audio_effect_properties.get_min_reverb_properties

function ncine.audio_effect_properties.get_min_reverb_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_reverb_properties

ncine.audio_effect_properties.get_min_ring_modulator_properties

function ncine.audio_effect_properties.get_min_ring_modulator_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_ring_modulator_properties

ncine.audio_effect_properties.get_min_vocal_morpher_properties

function ncine.audio_effect_properties.get_min_vocal_morpher_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_vocal_morpher_properties

ncine.audio_effect_properties.get_pitch_shifter_properties

function ncine.audio_effect_properties.get_pitch_shifter_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_pitch_shifter_properties

ncine.audio_effect_properties.get_reverb_properties

function ncine.audio_effect_properties.get_reverb_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_reverb_properties

ncine.audio_effect_properties.get_ring_modulator_properties

function ncine.audio_effect_properties.get_ring_modulator_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_ring_modulator_properties

ncine.audio_effect_properties.get_type

function ncine.audio_effect_properties.get_type(audio_effect_properties: audioeffectpropertiesObj)
  -> ncine.audio_effect_type

ncine.audio_effect_properties.get_vocal_morpher_properties

function ncine.audio_effect_properties.get_vocal_morpher_properties(audio_effect_properties: audioeffectpropertiesObj)
  -> audio_vocal_morpher_properties

ncine.audio_effect_properties.load_efx_reverb_preset

function ncine.audio_effect_properties.load_efx_reverb_preset(audio_effect_properties: audioeffectpropertiesObj, preset: ncine.efx_reverb_presets)

ncine.audio_effect_properties.new

function ncine.audio_effect_properties.new()
  -> audioeffectpropertiesObj

ncine.audio_effect_properties.reset_auto_wah_properties

function ncine.audio_effect_properties.reset_auto_wah_properties(audio_effect_properties: audioeffectpropertiesObj)

ncine.audio_effect_properties.reset_chorus_properties

function ncine.audio_effect_properties.reset_chorus_properties(audio_effect_properties: audioeffectpropertiesObj)

ncine.audio_effect_properties.reset_compressor_properties

function ncine.audio_effect_properties.reset_compressor_properties(audio_effect_properties: audioeffectpropertiesObj)

ncine.audio_effect_properties.reset_distortion_properties

function ncine.audio_effect_properties.reset_distortion_properties(audio_effect_properties: audioeffectpropertiesObj)

ncine.audio_effect_properties.reset_eax_reverb_properties

function ncine.audio_effect_properties.reset_eax_reverb_properties(audio_effect_properties: audioeffectpropertiesObj)

ncine.audio_effect_properties.reset_echo_properties

function ncine.audio_effect_properties.reset_echo_properties(audio_effect_properties: audioeffectpropertiesObj)

ncine.audio_effect_properties.reset_equalizer_properties

function ncine.audio_effect_properties.reset_equalizer_properties(audio_effect_properties: audioeffectpropertiesObj)

ncine.audio_effect_properties.reset_flanger_properties

function ncine.audio_effect_properties.reset_flanger_properties(audio_effect_properties: audioeffectpropertiesObj)

ncine.audio_effect_properties.reset_frequency_shifter_properties

function ncine.audio_effect_properties.reset_frequency_shifter_properties(audio_effect_properties: audioeffectpropertiesObj)

ncine.audio_effect_properties.reset_pitch_shifter_properties

function ncine.audio_effect_properties.reset_pitch_shifter_properties(audio_effect_properties: audioeffectpropertiesObj)

ncine.audio_effect_properties.reset_reverb_properties

function ncine.audio_effect_properties.reset_reverb_properties(audio_effect_properties: audioeffectpropertiesObj)

ncine.audio_effect_properties.reset_ring_modulator_properties

function ncine.audio_effect_properties.reset_ring_modulator_properties(audio_effect_properties: audioeffectpropertiesObj)

ncine.audio_effect_properties.reset_vocal_morpher_properties

function ncine.audio_effect_properties.reset_vocal_morpher_properties(audio_effect_properties: audioeffectpropertiesObj)

ncine.audio_effect_properties.set_auto_wah_properties

function ncine.audio_effect_properties.set_auto_wah_properties(audio_effect_properties: audioeffectpropertiesObj, properties: audio_auto_wah_properties)

ncine.audio_effect_properties.set_chorus_properties

function ncine.audio_effect_properties.set_chorus_properties(audio_effect_properties: audioeffectpropertiesObj, properties: audio_chorus_properties)

ncine.audio_effect_properties.set_compressor_properties

function ncine.audio_effect_properties.set_compressor_properties(audio_effect_properties: audioeffectpropertiesObj, properties: audio_compressor_properties)

ncine.audio_effect_properties.set_distortion_properties

function ncine.audio_effect_properties.set_distortion_properties(audio_effect_properties: audioeffectpropertiesObj, properties: audio_distortion_properties)

ncine.audio_effect_properties.set_eax_reverb_properties

function ncine.audio_effect_properties.set_eax_reverb_properties(audio_effect_properties: audioeffectpropertiesObj, properties: audio_eax_reverb_properties)

ncine.audio_effect_properties.set_echo_properties

function ncine.audio_effect_properties.set_echo_properties(audio_effect_properties: audioeffectpropertiesObj, properties: audio_echo_properties)

ncine.audio_effect_properties.set_equalizer_properties

function ncine.audio_effect_properties.set_equalizer_properties(audio_effect_properties: audioeffectpropertiesObj, properties: audio_equalizer_properties)

ncine.audio_effect_properties.set_flanger_properties

function ncine.audio_effect_properties.set_flanger_properties(audio_effect_properties: audioeffectpropertiesObj, properties: audio_flanger_properties)

ncine.audio_effect_properties.set_frequency_shifter_properties

function ncine.audio_effect_properties.set_frequency_shifter_properties(audio_effect_properties: audioeffectpropertiesObj, properties: audio_frequency_shifter_properties)

ncine.audio_effect_properties.set_pitch_shifter_properties

function ncine.audio_effect_properties.set_pitch_shifter_properties(audio_effect_properties: audioeffectpropertiesObj, properties: audio_pitch_shifter_properties)

ncine.audio_effect_properties.set_reverb_properties

function ncine.audio_effect_properties.set_reverb_properties(audio_effect_properties: audioeffectpropertiesObj, properties: audio_reverb_properties)

ncine.audio_effect_properties.set_ring_modulator_properties

function ncine.audio_effect_properties.set_ring_modulator_properties(audio_effect_properties: audioeffectpropertiesObj, properties: audio_ring_modulator_properties)

ncine.audio_effect_properties.set_type

function ncine.audio_effect_properties.set_type(audio_effect_properties: audioeffectpropertiesObj, audio_effect_type: ncine.audio_effect_type)

ncine.audio_effect_properties.set_vocal_morpher_properties

function ncine.audio_effect_properties.set_vocal_morpher_properties(audio_effect_properties: audioeffectpropertiesObj, properties: audio_vocal_morpher_properties)

ncine.audio_effect_slot

apply_effect

function ncine.audio_effect_slot.apply_effect(audio_effect_slot: audioeffectslotObj, audio_effect: audioeffectObj)

Applies the effect parameters from an effect object

delete

function ncine.audio_effect_slot.delete(audio_effect_slot: audioeffectslotObj)

Destroys an audio effect slot object and releases its memory

@param audio_effect_slot — The audio effect slot object to be destroyed

get_aux_send_auto

function ncine.audio_effect_slot.get_aux_send_auto(audio_effect_slot: audioeffectslotObj)
  -> boolean

Returns the state of the auxilary slot send auto flag

The property is used to enable or disable automatic send adjustments based on the physical positions of the sources and the listener.

get_effect_slot_id

function ncine.audio_effect_slot.get_effect_slot_id(audio_effect_slot: audioeffectslotObj)
  -> integer

Returns the OpenAL auxilary effect slot id

get_gain

function ncine.audio_effect_slot.get_gain(audio_effect_slot: audioeffectslotObj)
  -> number

Returns the gain output level of the auxilary effect slot

new

function ncine.audio_effect_slot.new()
  -> audioeffectslotObj

Constructs an audio effect slot object

Don't forget to call delete when you are done with it!

@return — A new audio effect slot object

set_aux_send_auto

function ncine.audio_effect_slot.set_aux_send_auto(audio_effect_slot: audioeffectslotObj, aux_send_auto: boolean)

Sets the state of the auxilary slot send auto flag

The property is used to enable or disable automatic send adjustments based on the physical positions of the sources and the listener.

set_gain

function ncine.audio_effect_slot.set_gain(audio_effect_slot: audioeffectslotObj, gain: number)

Sets the gain output level of the auxilary effect slot


ncine.audio_effect_slot

ncine.audio_effect_slot

ncine.audio_effect_slot.apply_effect

function ncine.audio_effect_slot.apply_effect(audio_effect_slot: audioeffectslotObj, audio_effect: audioeffectObj)

ncine.audio_effect_slot.delete

function ncine.audio_effect_slot.delete(audio_effect_slot: audioeffectslotObj)

ncine.audio_effect_slot.get_aux_send_auto

function ncine.audio_effect_slot.get_aux_send_auto(audio_effect_slot: audioeffectslotObj)
  -> boolean

ncine.audio_effect_slot.get_effect_slot_id

function ncine.audio_effect_slot.get_effect_slot_id(audio_effect_slot: audioeffectslotObj)
  -> integer

ncine.audio_effect_slot.get_gain

function ncine.audio_effect_slot.get_gain(audio_effect_slot: audioeffectslotObj)
  -> number

ncine.audio_effect_slot.new

function ncine.audio_effect_slot.new()
  -> audioeffectslotObj

ncine.audio_effect_slot.set_aux_send_auto

function ncine.audio_effect_slot.set_aux_send_auto(audio_effect_slot: audioeffectslotObj, aux_send_auto: boolean)

ncine.audio_effect_slot.set_gain

function ncine.audio_effect_slot.set_gain(audio_effect_slot: audioeffectslotObj, gain: number)

ncine.audio_effect_type

enum ncine.audio_effect_type

ncine.audio_filter

apply_properties

function ncine.audio_filter.apply_properties(audio_filter: audiofilterObj, properties: audio_filter_properties)

Sets the filter type and all of its properties

delete

function ncine.audio_filter.delete(audio_filter: audiofilterObj)

Destroys an audio filter object and releases its memory

@param audio_filter — The audio filter object to be destroyed

get_default_properties

function ncine.audio_filter.get_default_properties()
  -> audio_filter_properties

Returns a table with the default filter type and properties

The table is only returned as a reference.

get_filter_id

function ncine.audio_filter.get_filter_id(audio_filter: audiofilterObj)
  -> integer

Returns the OpenAL filter id

get_type

function ncine.audio_filter.get_type(audio_filter: audiofilterObj)
  -> ncine.audio_filter_type

Returns the filter type

new

function ncine.audio_filter.new()
  -> audiofilterObj

Constructs an audio filter object

Don't forget to call delete when you are done with it!

@return — A new audio filter object


ncine.audio_filter

ncine.audio_filter

ncine.audio_filter.apply_properties

function ncine.audio_filter.apply_properties(audio_filter: audiofilterObj, properties: audio_filter_properties)

ncine.audio_filter.delete

function ncine.audio_filter.delete(audio_filter: audiofilterObj)

ncine.audio_filter.get_default_properties

function ncine.audio_filter.get_default_properties()
  -> audio_filter_properties

ncine.audio_filter.get_filter_id

function ncine.audio_filter.get_filter_id(audio_filter: audiofilterObj)
  -> integer

ncine.audio_filter.get_type

function ncine.audio_filter.get_type(audio_filter: audiofilterObj)
  -> ncine.audio_filter_type

ncine.audio_filter.new

function ncine.audio_filter.new()
  -> audiofilterObj

ncine.audio_filter_type

enum ncine.audio_filter_type

ncine.audio_player

ncine.audio_player

ncine.audio_player

buffer_id

function ncine.audio_player.buffer_id(player: audioplayerObj)
  -> integer

Returns the OpenAL id of the currently playing buffer

buffer_size

function ncine.audio_player.buffer_size(player: audioplayerObj)
  -> integer

Returns the size of the currently playing buffer in bytes

bytes_per_sample

function ncine.audio_player.bytes_per_sample(player: audioplayerObj)
  -> integer

Returns the number of bytes per sample

duration

function ncine.audio_player.duration(player: audioplayerObj)
  -> number

Returns the duration in seconds

frequency

function ncine.audio_player.frequency(player: audioplayerObj)
  -> integer

Returns the samples frequency of the currently playing buffer

get_air_absorption_factor

function ncine.audio_player.get_air_absorption_factor(player: audioplayerObj)
  -> number

Returns the player air absorption factor

get_aux_filter_id

function ncine.audio_player.get_aux_filter_id(player: audioplayerObj)
  -> integer

Returns the OpenAL id of the auxiliary filter

get_cone_inner_angle

function ncine.audio_player.get_cone_inner_angle(player: audioplayerObj)
  -> number

Returns the player inside angle of the sound cone in degrees

get_cone_outer_angle

function ncine.audio_player.get_cone_outer_angle(player: audioplayerObj)
  -> number

Returns the player outside angle of the sound cone in degrees

get_cone_outer_gain

function ncine.audio_player.get_cone_outer_gain(player: audioplayerObj)
  -> number

Returns the player multiplication factor to determine the gain outside the cone

get_cone_outer_gain_hf

function ncine.audio_player.get_cone_outer_gain_hf(player: audioplayerObj)
  -> number

Returns the player cone outer gain HF value

get_direct_filter_id

function ncine.audio_player.get_direct_filter_id(player: audioplayerObj)
  -> integer

Returns the OpenAL id of the direct filter

get_direction

function ncine.audio_player.get_direction(player: audioplayerObj)
  -> ncine.vec3

Returns the player direction vector

get_effect_slot_id

function ncine.audio_player.get_effect_slot_id(player: audioplayerObj)
  -> integer

Returns the OpenAL id of the effect slot

get_gain

function ncine.audio_player.get_gain(player: audioplayerObj)
  -> number

Returns the player gain value

get_pitch

function ncine.audio_player.get_pitch(player: audioplayerObj)
  -> number

Returns the player pitch value

get_position

function ncine.audio_player.get_position(player: audioplayerObj)
  -> ncine.vec3

Returns the player position vector

get_room_rolloff_factor

function ncine.audio_player.get_room_rolloff_factor(player: audioplayerObj)
  -> number

Returns the player room rolloff factor

get_sample_offset

function ncine.audio_player.get_sample_offset(player: audioplayerObj)
  -> integer

Returns the size of the currently playing buffer in bytes

get_velocity

function ncine.audio_player.get_velocity(player: audioplayerObj)
  -> ncine.vec3

Returns the player velocity vector

has_aux_filter

function ncine.audio_player.has_aux_filter(player: audioplayerObj)
  -> boolean

Returns true if a valid OpenAL auxiliary filter is currently assigned to the player

has_direct_filter

function ncine.audio_player.has_direct_filter(player: audioplayerObj)
  -> boolean

Returns true if a valid OpenAL direct filter is currently assigned to the player

has_effect_slot

function ncine.audio_player.has_effect_slot(player: audioplayerObj)
  -> boolean

Returns true if a valid OpenAL effect slot is currently assigned to the player

has_source

function ncine.audio_player.has_source(player: audioplayerObj)
  -> boolean

Returns true if a valid OpenAL source is currently assigned to the player

is_looping

function ncine.audio_player.is_looping(player: audioplayerObj)
  -> boolean

Returns the looping property of the player

is_paused

function ncine.audio_player.is_paused(player: audioplayerObj)
  -> boolean

Returns true if the player is paused

is_playing

function ncine.audio_player.is_playing(player: audioplayerObj)
  -> boolean

Returns true if the player is playing

is_source_locked

function ncine.audio_player.is_source_locked(player: audioplayerObj)
  -> boolean

Returns true if the OpenAL source is locked

is_stopped

function ncine.audio_player.is_stopped(player: audioplayerObj)
  -> boolean

Returns true if the player is stopped

num_channels

function ncine.audio_player.num_channels(player: audioplayerObj)
  -> integer

Returns the number of audio channels of the currently playing buffer

num_samples

function ncine.audio_player.num_samples(player: audioplayerObj)
  -> integer

Returns the number of samples

pause

function ncine.audio_player.pause(player: audioplayerObj)

Pauses playing

play

function ncine.audio_player.play(player: audioplayerObj)

Starts playing

set_air_absorption_factor

function ncine.audio_player.set_air_absorption_factor(player: audioplayerObj, factor: number)

Sets the player air absorption factor

set_cone_inner_angle

function ncine.audio_player.set_cone_inner_angle(player: audioplayerObj, angle: number)

Sets the player inside angle of the sound cone in degrees

set_cone_outer_angle

function ncine.audio_player.set_cone_outer_angle(player: audioplayerObj, angle: number)

Sets the player outside angle of the sound cone in degrees

set_cone_outer_gain

function ncine.audio_player.set_cone_outer_gain(player: audioplayerObj, gain: number)

Sets the player multiplication factor to determine the gain outside the cone

set_cone_outer_gain_hf

function ncine.audio_player.set_cone_outer_gain_hf(player: audioplayerObj, gain: number)

Sets the player cone outer gain HF value

set_direct_filter

function ncine.audio_player.set_direct_filter(player: audioplayerObj, audio_filter?: audiofilterObj)

Sets or removes the filter parameters from a filter object to the direct signal

set_direction

function ncine.audio_player.set_direction(player: audioplayerObj, direction: ncine.vec3)

Sets the player direction vector

set_effect_slot

function ncine.audio_player.set_effect_slot(player: audioplayerObj, audio_effect_slot?: audioeffectslotObj, audio_filter?: audiofilterObj)

Sets or removes an affect slot, with an optional auxiliary filter, to the player

set_gain

function ncine.audio_player.set_gain(player: audioplayerObj, gain: number)

Sets the player gain value

set_looping

function ncine.audio_player.set_looping(player: audioplayerObj, looping: boolean)

Sets the looping property of the player

set_pitch

function ncine.audio_player.set_pitch(player: audioplayerObj, pitch: number)

Sets the player pitch value

set_position

function ncine.audio_player.set_position(player: audioplayerObj, position: ncine.vec3)

Sets the player position vector

set_room_rolloff_factor

function ncine.audio_player.set_room_rolloff_factor(player: audioplayerObj, factor: number)

Sets the player room rolloff factor

set_sample_offset

function ncine.audio_player.set_sample_offset(player: audioplayerObj, offset: integer)

Returns the size of the currently playing buffer in bytes

set_source_locked

function ncine.audio_player.set_source_locked(player: audioplayerObj, locked: boolean)

Locks an OpenAL source so it is not released to the pool when the player stops

set_velocity

function ncine.audio_player.set_velocity(player: audioplayerObj, velocity: ncine.vec3)

Sets the player velocity vector

source_id

function ncine.audio_player.source_id(player: audioplayerObj)
  -> integer

Returns the OpenAL id of the player source

stop

function ncine.audio_player.stop(player: audioplayerObj)

Stops playing and rewinds


ncine.audio_player.buffer_id

function ncine.audio_player.buffer_id(player: audioplayerObj)
  -> integer

ncine.audio_player.buffer_size

function ncine.audio_player.buffer_size(player: audioplayerObj)
  -> integer

ncine.audio_player.bytes_per_sample

function ncine.audio_player.bytes_per_sample(player: audioplayerObj)
  -> integer

ncine.audio_player.duration

function ncine.audio_player.duration(player: audioplayerObj)
  -> number

ncine.audio_player.frequency

function ncine.audio_player.frequency(player: audioplayerObj)
  -> integer

ncine.audio_player.get_air_absorption_factor

function ncine.audio_player.get_air_absorption_factor(player: audioplayerObj)
  -> number

ncine.audio_player.get_aux_filter_id

function ncine.audio_player.get_aux_filter_id(player: audioplayerObj)
  -> integer

ncine.audio_player.get_cone_inner_angle

function ncine.audio_player.get_cone_inner_angle(player: audioplayerObj)
  -> number

ncine.audio_player.get_cone_outer_angle

function ncine.audio_player.get_cone_outer_angle(player: audioplayerObj)
  -> number

ncine.audio_player.get_cone_outer_gain

function ncine.audio_player.get_cone_outer_gain(player: audioplayerObj)
  -> number

ncine.audio_player.get_cone_outer_gain_hf

function ncine.audio_player.get_cone_outer_gain_hf(player: audioplayerObj)
  -> number

ncine.audio_player.get_direct_filter_id

function ncine.audio_player.get_direct_filter_id(player: audioplayerObj)
  -> integer

ncine.audio_player.get_direction

function ncine.audio_player.get_direction(player: audioplayerObj)
  -> ncine.vec3

ncine.audio_player.get_effect_slot_id

function ncine.audio_player.get_effect_slot_id(player: audioplayerObj)
  -> integer

ncine.audio_player.get_gain

function ncine.audio_player.get_gain(player: audioplayerObj)
  -> number

ncine.audio_player.get_pitch

function ncine.audio_player.get_pitch(player: audioplayerObj)
  -> number

ncine.audio_player.get_position

function ncine.audio_player.get_position(player: audioplayerObj)
  -> ncine.vec3

ncine.audio_player.get_room_rolloff_factor

function ncine.audio_player.get_room_rolloff_factor(player: audioplayerObj)
  -> number

ncine.audio_player.get_sample_offset

function ncine.audio_player.get_sample_offset(player: audioplayerObj)
  -> integer

ncine.audio_player.get_velocity

function ncine.audio_player.get_velocity(player: audioplayerObj)
  -> ncine.vec3

ncine.audio_player.has_aux_filter

function ncine.audio_player.has_aux_filter(player: audioplayerObj)
  -> boolean

ncine.audio_player.has_direct_filter

function ncine.audio_player.has_direct_filter(player: audioplayerObj)
  -> boolean

ncine.audio_player.has_effect_slot

function ncine.audio_player.has_effect_slot(player: audioplayerObj)
  -> boolean

ncine.audio_player.has_source

function ncine.audio_player.has_source(player: audioplayerObj)
  -> boolean

ncine.audio_player.is_looping

function ncine.audio_player.is_looping(player: audioplayerObj)
  -> boolean

ncine.audio_player.is_paused

function ncine.audio_player.is_paused(player: audioplayerObj)
  -> boolean

ncine.audio_player.is_playing

function ncine.audio_player.is_playing(player: audioplayerObj)
  -> boolean

ncine.audio_player.is_source_locked

function ncine.audio_player.is_source_locked(player: audioplayerObj)
  -> boolean

ncine.audio_player.is_stopped

function ncine.audio_player.is_stopped(player: audioplayerObj)
  -> boolean

ncine.audio_player.num_channels

function ncine.audio_player.num_channels(player: audioplayerObj)
  -> integer

ncine.audio_player.num_samples

function ncine.audio_player.num_samples(player: audioplayerObj)
  -> integer

ncine.audio_player.pause

function ncine.audio_player.pause(player: audioplayerObj)

ncine.audio_player.play

function ncine.audio_player.play(player: audioplayerObj)

ncine.audio_player.set_air_absorption_factor

function ncine.audio_player.set_air_absorption_factor(player: audioplayerObj, factor: number)

ncine.audio_player.set_cone_inner_angle

function ncine.audio_player.set_cone_inner_angle(player: audioplayerObj, angle: number)

ncine.audio_player.set_cone_outer_angle

function ncine.audio_player.set_cone_outer_angle(player: audioplayerObj, angle: number)

ncine.audio_player.set_cone_outer_gain

function ncine.audio_player.set_cone_outer_gain(player: audioplayerObj, gain: number)

ncine.audio_player.set_cone_outer_gain_hf

function ncine.audio_player.set_cone_outer_gain_hf(player: audioplayerObj, gain: number)

ncine.audio_player.set_direct_filter

function ncine.audio_player.set_direct_filter(player: audioplayerObj, audio_filter?: audiofilterObj)

ncine.audio_player.set_direction

function ncine.audio_player.set_direction(player: audioplayerObj, direction: ncine.vec3)
function ncine.audio_player.set_direction(player: audioplayerObj, direction_x: number, direction_y: number, direction_z: number)

ncine.audio_player.set_effect_slot

function ncine.audio_player.set_effect_slot(player: audioplayerObj, audio_effect_slot?: audioeffectslotObj, audio_filter?: audiofilterObj)

ncine.audio_player.set_gain

function ncine.audio_player.set_gain(player: audioplayerObj, gain: number)

ncine.audio_player.set_looping

function ncine.audio_player.set_looping(player: audioplayerObj, looping: boolean)

ncine.audio_player.set_pitch

function ncine.audio_player.set_pitch(player: audioplayerObj, pitch: number)

ncine.audio_player.set_position

function ncine.audio_player.set_position(player: audioplayerObj, position: ncine.vec3)
function ncine.audio_player.set_position(player: audioplayerObj, position_x: number, position_y: number, position_z: number)

ncine.audio_player.set_room_rolloff_factor

function ncine.audio_player.set_room_rolloff_factor(player: audioplayerObj, factor: number)

ncine.audio_player.set_sample_offset

function ncine.audio_player.set_sample_offset(player: audioplayerObj, offset: integer)

ncine.audio_player.set_source_locked

function ncine.audio_player.set_source_locked(player: audioplayerObj, locked: boolean)

ncine.audio_player.set_velocity

function ncine.audio_player.set_velocity(player: audioplayerObj, velocity: ncine.vec3)
function ncine.audio_player.set_velocity(player: audioplayerObj, velocity_x: number, velocity_y: number, velocity_z: number)

ncine.audio_player.source_id

function ncine.audio_player.source_id(player: audioplayerObj)
  -> integer

ncine.audio_player.stop

function ncine.audio_player.stop(player: audioplayerObj)

ncine.audiobuffer

buffer_id

function ncine.audiobuffer.buffer_id(audiobuffer: audiobufferObj)
  -> integer

Returns the OpenAL buffer id

buffer_size

function ncine.audiobuffer.buffer_size(audiobuffer: audiobufferObj)
  -> integer

Returns the size of the buffer in bytes

bytes_per_sample

function ncine.audiobuffer.bytes_per_sample(audiobuffer: audiobufferObj)
  -> integer

Returns the number of bytes per sample

delete

function ncine.audiobuffer.delete(audiobuffer: audiobufferObj)

Destroys an audio buffer object and releases its memory

@param audiobuffer — The audio buffer object to be destroyed

duration

function ncine.audiobuffer.duration(audiobuffer: audiobufferObj)
  -> number

Returns the duration in seconds

frequency

function ncine.audiobuffer.frequency(audiobuffer: audiobufferObj)
  -> integer

Returns the samples frequency

new

function ncine.audiobuffer.new(filename: string)
  -> audiobufferObj

Constructs an audio buffer object from an audio file

Don't forget to call delete when you are done with it!

@param filename — The path to an audio file

@return — A new audio buffer object

num_channels

function ncine.audiobuffer.num_channels(audiobuffer: audiobufferObj)
  -> integer

Returns the number of audio channels

num_samples

function ncine.audiobuffer.num_samples(audiobuffer: audiobufferObj)
  -> integer

Returns number of samples


ncine.audiobuffer

ncine.audiobuffer

ncine.audiobuffer.buffer_id

function ncine.audiobuffer.buffer_id(audiobuffer: audiobufferObj)
  -> integer

ncine.audiobuffer.buffer_size

function ncine.audiobuffer.buffer_size(audiobuffer: audiobufferObj)
  -> integer

ncine.audiobuffer.bytes_per_sample

function ncine.audiobuffer.bytes_per_sample(audiobuffer: audiobufferObj)
  -> integer

ncine.audiobuffer.delete

function ncine.audiobuffer.delete(audiobuffer: audiobufferObj)

ncine.audiobuffer.duration

function ncine.audiobuffer.duration(audiobuffer: audiobufferObj)
  -> number

ncine.audiobuffer.frequency

function ncine.audiobuffer.frequency(audiobuffer: audiobufferObj)
  -> integer

ncine.audiobuffer.new

function ncine.audiobuffer.new(filename: string)
  -> audiobufferObj

ncine.audiobuffer.num_channels

function ncine.audiobuffer.num_channels(audiobuffer: audiobufferObj)
  -> integer

ncine.audiobuffer.num_samples

function ncine.audiobuffer.num_samples(audiobuffer: audiobufferObj)
  -> integer

ncine.audiobuffer_player

ncine.audiobuffer_player

ncine.audiobuffer_player

buffer_id

function ncine.audio_player.buffer_id(player: audioplayerObj)
  -> integer

Returns the OpenAL id of the currently playing buffer

buffer_size

function ncine.audio_player.buffer_size(player: audioplayerObj)
  -> integer

Returns the size of the currently playing buffer in bytes

bytes_per_sample

function ncine.audio_player.bytes_per_sample(player: audioplayerObj)
  -> integer

Returns the number of bytes per sample

delete

function ncine.audiobuffer_player.delete(player: audiobufferplayerObj)

Destroys an audio buffer player object and releases its memory

@param player — The audio buffer player object to be destroyed

duration

function ncine.audio_player.duration(player: audioplayerObj)
  -> number

Returns the duration in seconds

frequency

function ncine.audio_player.frequency(player: audioplayerObj)
  -> integer

Returns the samples frequency of the currently playing buffer

get_air_absorption_factor

function ncine.audio_player.get_air_absorption_factor(player: audioplayerObj)
  -> number

Returns the player air absorption factor

get_audiobuffer

function ncine.audiobuffer_player.get_audiobuffer(player: audiobufferplayerObj)
  -> audiobufferObj

Gets the audio buffer used for playing

get_aux_filter_id

function ncine.audio_player.get_aux_filter_id(player: audioplayerObj)
  -> integer

Returns the OpenAL id of the auxiliary filter

get_cone_inner_angle

function ncine.audio_player.get_cone_inner_angle(player: audioplayerObj)
  -> number

Returns the player inside angle of the sound cone in degrees

get_cone_outer_angle

function ncine.audio_player.get_cone_outer_angle(player: audioplayerObj)
  -> number

Returns the player outside angle of the sound cone in degrees

get_cone_outer_gain

function ncine.audio_player.get_cone_outer_gain(player: audioplayerObj)
  -> number

Returns the player multiplication factor to determine the gain outside the cone

get_cone_outer_gain_hf

function ncine.audio_player.get_cone_outer_gain_hf(player: audioplayerObj)
  -> number

Returns the player cone outer gain HF value

get_direct_filter_id

function ncine.audio_player.get_direct_filter_id(player: audioplayerObj)
  -> integer

Returns the OpenAL id of the direct filter

get_direction

function ncine.audio_player.get_direction(player: audioplayerObj)
  -> ncine.vec3

Returns the player direction vector

get_effect_slot_id

function ncine.audio_player.get_effect_slot_id(player: audioplayerObj)
  -> integer

Returns the OpenAL id of the effect slot

get_gain

function ncine.audio_player.get_gain(player: audioplayerObj)
  -> number

Returns the player gain value

get_pitch

function ncine.audio_player.get_pitch(player: audioplayerObj)
  -> number

Returns the player pitch value

get_position

function ncine.audio_player.get_position(player: audioplayerObj)
  -> ncine.vec3

Returns the player position vector

get_room_rolloff_factor

function ncine.audio_player.get_room_rolloff_factor(player: audioplayerObj)
  -> number

Returns the player room rolloff factor

get_sample_offset

function ncine.audio_player.get_sample_offset(player: audioplayerObj)
  -> integer

Returns the size of the currently playing buffer in bytes

get_velocity

function ncine.audio_player.get_velocity(player: audioplayerObj)
  -> ncine.vec3

Returns the player velocity vector

has_aux_filter

function ncine.audio_player.has_aux_filter(player: audioplayerObj)
  -> boolean

Returns true if a valid OpenAL auxiliary filter is currently assigned to the player

has_direct_filter

function ncine.audio_player.has_direct_filter(player: audioplayerObj)
  -> boolean

Returns true if a valid OpenAL direct filter is currently assigned to the player

has_effect_slot

function ncine.audio_player.has_effect_slot(player: audioplayerObj)
  -> boolean

Returns true if a valid OpenAL effect slot is currently assigned to the player

has_source

function ncine.audio_player.has_source(player: audioplayerObj)
  -> boolean

Returns true if a valid OpenAL source is currently assigned to the player

is_looping

function ncine.audio_player.is_looping(player: audioplayerObj)
  -> boolean

Returns the looping property of the player

is_paused

function ncine.audio_player.is_paused(player: audioplayerObj)
  -> boolean

Returns true if the player is paused

is_playing

function ncine.audio_player.is_playing(player: audioplayerObj)
  -> boolean

Returns true if the player is playing

is_source_locked

function ncine.audio_player.is_source_locked(player: audioplayerObj)
  -> boolean

Returns true if the OpenAL source is locked

is_stopped

function ncine.audio_player.is_stopped(player: audioplayerObj)
  -> boolean

Returns true if the player is stopped

new

function ncine.audiobuffer_player.new(buffer: audiobufferObj)
  -> audiobufferplayerObj

Constructs an audio buffer player object from an audio buffer

Don't forget to call delete when you are done with it!

@return — A new audio buffer player object

num_channels

function ncine.audio_player.num_channels(player: audioplayerObj)
  -> integer

Returns the number of audio channels of the currently playing buffer

num_samples

function ncine.audio_player.num_samples(player: audioplayerObj)
  -> integer

Returns the number of samples

pause

function ncine.audio_player.pause(player: audioplayerObj)

Pauses playing

play

function ncine.audio_player.play(player: audioplayerObj)

Starts playing

set_air_absorption_factor

function ncine.audio_player.set_air_absorption_factor(player: audioplayerObj, factor: number)

Sets the player air absorption factor

set_audiobuffer

function ncine.audiobuffer_player.set_audiobuffer(player: audiobufferplayerObj, buffer: audiobufferObj)

Sets the audio buffer used for playing

set_cone_inner_angle

function ncine.audio_player.set_cone_inner_angle(player: audioplayerObj, angle: number)

Sets the player inside angle of the sound cone in degrees

set_cone_outer_angle

function ncine.audio_player.set_cone_outer_angle(player: audioplayerObj, angle: number)

Sets the player outside angle of the sound cone in degrees

set_cone_outer_gain

function ncine.audio_player.set_cone_outer_gain(player: audioplayerObj, gain: number)

Sets the player multiplication factor to determine the gain outside the cone

set_cone_outer_gain_hf

function ncine.audio_player.set_cone_outer_gain_hf(player: audioplayerObj, gain: number)

Sets the player cone outer gain HF value

set_direct_filter

function ncine.audio_player.set_direct_filter(player: audioplayerObj, audio_filter?: audiofilterObj)

Sets or removes the filter parameters from a filter object to the direct signal

set_direction

function ncine.audio_player.set_direction(player: audioplayerObj, direction: ncine.vec3)

Sets the player direction vector

set_effect_slot

function ncine.audio_player.set_effect_slot(player: audioplayerObj, audio_effect_slot?: audioeffectslotObj, audio_filter?: audiofilterObj)

Sets or removes an affect slot, with an optional auxiliary filter, to the player

set_gain

function ncine.audio_player.set_gain(player: audioplayerObj, gain: number)

Sets the player gain value

set_looping

function ncine.audio_player.set_looping(player: audioplayerObj, looping: boolean)

Sets the looping property of the player

set_pitch

function ncine.audio_player.set_pitch(player: audioplayerObj, pitch: number)

Sets the player pitch value

set_position

function ncine.audio_player.set_position(player: audioplayerObj, position: ncine.vec3)

Sets the player position vector

set_room_rolloff_factor

function ncine.audio_player.set_room_rolloff_factor(player: audioplayerObj, factor: number)

Sets the player room rolloff factor

set_sample_offset

function ncine.audio_player.set_sample_offset(player: audioplayerObj, offset: integer)

Returns the size of the currently playing buffer in bytes

set_source_locked

function ncine.audio_player.set_source_locked(player: audioplayerObj, locked: boolean)

Locks an OpenAL source so it is not released to the pool when the player stops

set_velocity

function ncine.audio_player.set_velocity(player: audioplayerObj, velocity: ncine.vec3)

Sets the player velocity vector

source_id

function ncine.audio_player.source_id(player: audioplayerObj)
  -> integer

Returns the OpenAL id of the player source

stop

function ncine.audio_player.stop(player: audioplayerObj)

Stops playing and rewinds


ncine.audiobuffer_player.delete

function ncine.audiobuffer_player.delete(player: audiobufferplayerObj)

ncine.audiobuffer_player.get_audiobuffer

function ncine.audiobuffer_player.get_audiobuffer(player: audiobufferplayerObj)
  -> audiobufferObj

ncine.audiobuffer_player.new

function ncine.audiobuffer_player.new(buffer: audiobufferObj)
  -> audiobufferplayerObj

ncine.audiobuffer_player.set_audiobuffer

function ncine.audiobuffer_player.set_audiobuffer(player: audiobufferplayerObj, buffer: audiobufferObj)

ncine.audiostream_player

buffer_id

function ncine.audio_player.buffer_id(player: audioplayerObj)
  -> integer

Returns the OpenAL id of the currently playing buffer

buffer_size

function ncine.audio_player.buffer_size(player: audioplayerObj)
  -> integer

Returns the size of the currently playing buffer in bytes

bytes_per_sample

function ncine.audio_player.bytes_per_sample(player: audioplayerObj)
  -> integer

Returns the number of bytes per sample

delete

function ncine.audiostream_player.delete(player: audiostreamplayerObj)

Destroys an audio stream player object and releases its memory

@param player — The audio stream player object to be destroyed

duration

function ncine.audio_player.duration(player: audioplayerObj)
  -> number

Returns the duration in seconds

frequency

function ncine.audio_player.frequency(player: audioplayerObj)
  -> integer

Returns the samples frequency of the currently playing buffer

get_air_absorption_factor

function ncine.audio_player.get_air_absorption_factor(player: audioplayerObj)
  -> number

Returns the player air absorption factor

get_aux_filter_id

function ncine.audio_player.get_aux_filter_id(player: audioplayerObj)
  -> integer

Returns the OpenAL id of the auxiliary filter

get_cone_inner_angle

function ncine.audio_player.get_cone_inner_angle(player: audioplayerObj)
  -> number

Returns the player inside angle of the sound cone in degrees

get_cone_outer_angle

function ncine.audio_player.get_cone_outer_angle(player: audioplayerObj)
  -> number

Returns the player outside angle of the sound cone in degrees

get_cone_outer_gain

function ncine.audio_player.get_cone_outer_gain(player: audioplayerObj)
  -> number

Returns the player multiplication factor to determine the gain outside the cone

get_cone_outer_gain_hf

function ncine.audio_player.get_cone_outer_gain_hf(player: audioplayerObj)
  -> number

Returns the player cone outer gain HF value

get_direct_filter_id

function ncine.audio_player.get_direct_filter_id(player: audioplayerObj)
  -> integer

Returns the OpenAL id of the direct filter

get_direction

function ncine.audio_player.get_direction(player: audioplayerObj)
  -> ncine.vec3

Returns the player direction vector

get_effect_slot_id

function ncine.audio_player.get_effect_slot_id(player: audioplayerObj)
  -> integer

Returns the OpenAL id of the effect slot

get_gain

function ncine.audio_player.get_gain(player: audioplayerObj)
  -> number

Returns the player gain value

get_pitch

function ncine.audio_player.get_pitch(player: audioplayerObj)
  -> number

Returns the player pitch value

get_position

function ncine.audio_player.get_position(player: audioplayerObj)
  -> ncine.vec3

Returns the player position vector

get_room_rolloff_factor

function ncine.audio_player.get_room_rolloff_factor(player: audioplayerObj)
  -> number

Returns the player room rolloff factor

get_sample_offset

function ncine.audio_player.get_sample_offset(player: audioplayerObj)
  -> integer

Returns the size of the currently playing buffer in bytes

get_velocity

function ncine.audio_player.get_velocity(player: audioplayerObj)
  -> ncine.vec3

Returns the player velocity vector

has_aux_filter

function ncine.audio_player.has_aux_filter(player: audioplayerObj)
  -> boolean

Returns true if a valid OpenAL auxiliary filter is currently assigned to the player

has_direct_filter

function ncine.audio_player.has_direct_filter(player: audioplayerObj)
  -> boolean

Returns true if a valid OpenAL direct filter is currently assigned to the player

has_effect_slot

function ncine.audio_player.has_effect_slot(player: audioplayerObj)
  -> boolean

Returns true if a valid OpenAL effect slot is currently assigned to the player

has_source

function ncine.audio_player.has_source(player: audioplayerObj)
  -> boolean

Returns true if a valid OpenAL source is currently assigned to the player

is_looping

function ncine.audio_player.is_looping(player: audioplayerObj)
  -> boolean

Returns the looping property of the player

is_paused

function ncine.audio_player.is_paused(player: audioplayerObj)
  -> boolean

Returns true if the player is paused

is_playing

function ncine.audio_player.is_playing(player: audioplayerObj)
  -> boolean

Returns true if the player is playing

is_source_locked

function ncine.audio_player.is_source_locked(player: audioplayerObj)
  -> boolean

Returns true if the OpenAL source is locked

is_stopped

function ncine.audio_player.is_stopped(player: audioplayerObj)
  -> boolean

Returns true if the player is stopped

new

function ncine.audiostream_player.new(filename: string)
  -> audiostreamplayerObj

Constructs an audio stream player object from an audio file

Don't forget to call delete when you are done with it!

@param filename — The path to an audio file

@return — A new audio stream player object

num_channels

function ncine.audio_player.num_channels(player: audioplayerObj)
  -> integer

Returns the number of audio channels of the currently playing buffer

num_samples

function ncine.audio_player.num_samples(player: audioplayerObj)
  -> integer

Returns the number of samples

num_samples_in_streambuffer

function ncine.audiostream_player.num_samples_in_streambuffer(player: audiostreamplayerObj)
  -> integer

Returns the number of samples in the streaming buffer

pause

function ncine.audio_player.pause(player: audioplayerObj)

Pauses playing

play

function ncine.audio_player.play(player: audioplayerObj)

Starts playing

sample_offset_in_stream

function ncine.audiostream_player.sample_offset_in_stream(player: audiostreamplayerObj)
  -> integer

Returns the sample offset relative to the whole stream

set_air_absorption_factor

function ncine.audio_player.set_air_absorption_factor(player: audioplayerObj, factor: number)

Sets the player air absorption factor

set_cone_inner_angle

function ncine.audio_player.set_cone_inner_angle(player: audioplayerObj, angle: number)

Sets the player inside angle of the sound cone in degrees

set_cone_outer_angle

function ncine.audio_player.set_cone_outer_angle(player: audioplayerObj, angle: number)

Sets the player outside angle of the sound cone in degrees

set_cone_outer_gain

function ncine.audio_player.set_cone_outer_gain(player: audioplayerObj, gain: number)

Sets the player multiplication factor to determine the gain outside the cone

set_cone_outer_gain_hf

function ncine.audio_player.set_cone_outer_gain_hf(player: audioplayerObj, gain: number)

Sets the player cone outer gain HF value

set_direct_filter

function ncine.audio_player.set_direct_filter(player: audioplayerObj, audio_filter?: audiofilterObj)

Sets or removes the filter parameters from a filter object to the direct signal

set_direction

function ncine.audio_player.set_direction(player: audioplayerObj, direction: ncine.vec3)

Sets the player direction vector

set_effect_slot

function ncine.audio_player.set_effect_slot(player: audioplayerObj, audio_effect_slot?: audioeffectslotObj, audio_filter?: audiofilterObj)

Sets or removes an affect slot, with an optional auxiliary filter, to the player

set_gain

function ncine.audio_player.set_gain(player: audioplayerObj, gain: number)

Sets the player gain value

set_looping

function ncine.audio_player.set_looping(player: audioplayerObj, looping: boolean)

Sets the looping property of the player

set_pitch

function ncine.audio_player.set_pitch(player: audioplayerObj, pitch: number)

Sets the player pitch value

set_position

function ncine.audio_player.set_position(player: audioplayerObj, position: ncine.vec3)

Sets the player position vector

set_room_rolloff_factor

function ncine.audio_player.set_room_rolloff_factor(player: audioplayerObj, factor: number)

Sets the player room rolloff factor

set_sample_offset

function ncine.audio_player.set_sample_offset(player: audioplayerObj, offset: integer)

Returns the size of the currently playing buffer in bytes

set_source_locked

function ncine.audio_player.set_source_locked(player: audioplayerObj, locked: boolean)

Locks an OpenAL source so it is not released to the pool when the player stops

set_velocity

function ncine.audio_player.set_velocity(player: audioplayerObj, velocity: ncine.vec3)

Sets the player velocity vector

source_id

function ncine.audio_player.source_id(player: audioplayerObj)
  -> integer

Returns the OpenAL id of the player source

stop

function ncine.audio_player.stop(player: audioplayerObj)

Stops playing and rewinds

streambuffer_size

function ncine.audiostream_player.streambuffer_size(player: audiostreamplayerObj)
  -> integer

Returns the size of the streaming buffer in bytes


ncine.audiostream_player

ncine.audiostream_player

ncine.audiostream_player.delete

function ncine.audiostream_player.delete(player: audiostreamplayerObj)

ncine.audiostream_player.new

function ncine.audiostream_player.new(filename: string)
  -> audiostreamplayerObj

ncine.audiostream_player.num_samples_in_streambuffer

function ncine.audiostream_player.num_samples_in_streambuffer(player: audiostreamplayerObj)
  -> integer

ncine.audiostream_player.sample_offset_in_stream

function ncine.audiostream_player.sample_offset_in_stream(player: audiostreamplayerObj)
  -> integer

ncine.audiostream_player.streambuffer_size

function ncine.audiostream_player.streambuffer_size(player: audiostreamplayerObj)
  -> integer

ncine.base_sprite

ncine.base_sprite

ncine.base_sprite

add_child

function ncine.scenenode.add_child(parent: scenenodeObj, node: scenenodeObj)
  -> boolean

Adds a child node to the specified parent

@returntrue if the node has been added

get_aabb

function ncine.drawable_node.get_aabb(node: drawablenodeObj)
  -> ncine.rect

Returns the axis-aligned bounding box of the node area in the last frame

get_abs_anchor_point

function ncine.scenenode.get_abs_anchor_point(node: scenenodeObj)
  -> ncine.vec2

Returns the absolute transformation anchor point in pixels

get_alpha

function ncine.scenenode.get_alpha(node: scenenodeObj)
  -> number

Returns the node alpha color component

get_anchor_point

function ncine.drawable_node.get_anchor_point(node: drawablenodeObj)
  -> ncine.vec2

Returns the transformation anchor point

get_child

function ncine.scenenode.get_child(node: scenenodeObj, index: integer)
  -> scenenodeObj?

Returns the n-th child

get_child_order_index

function ncine.scenenode.get_child_order_index(node: scenenodeObj)
  -> integer

Returns the order index of this node among its siblings

@return — The order index or zero if the node has no parent

get_children

function ncine.scenenode.get_children(node: scenenodeObj)
  -> scenenodeObj[]

Returns the array of children

get_color

function ncine.scenenode.get_color(node: scenenodeObj)
  -> ncine.color

Returns the node color

get_dest_blending_factor

function ncine.drawable_node.get_dest_blending_factor(node: drawablenodeObj)
  -> ncine.blending_factor

Returns the destination blending factor

get_height

function ncine.drawable_node.get_height(node: drawablenodeObj)
  -> number

Returns the height of the node area

get_last_frame_rendered

function ncine.drawable_node.get_last_frame_rendered(node: drawablenodeObj)
  -> integer

Returns the last frame in which any of the viewports have rendered this node (node was not culled)

get_last_frame_updated

function ncine.scenenode.get_last_frame_updated(node: scenenodeObj)
  -> integer

Returns the last frame in which any of the viewports have updated this node

get_layer

function ncine.scenenode.get_layer(node: scenenodeObj)
  -> integer

Returns the node rendering layer

get_parent

function ncine.scenenode.get_parent(node: scenenodeObj)
  -> scenenodeObj?

Returns the parent node, if there is any

get_position

function ncine.scenenode.get_position(node: scenenodeObj)
  -> ncine.vec2

Returns the node position relative to its parent

get_rotation

function ncine.scenenode.get_rotation(node: scenenodeObj)
  -> number

Returns the node rotation in degress

get_scale

function ncine.scenenode.get_scale(node: scenenodeObj)
  -> ncine.vec2

Returns the node scale factors

get_size

function ncine.drawable_node.get_size(node: drawablenodeObj)
  -> ncine.vec2

Returns the size of the node area

get_src_blending_factor

function ncine.drawable_node.get_src_blending_factor(node: drawablenodeObj)
  -> ncine.blending_factor

eturns the source blending factor

get_texrect

function ncine.base_sprite.get_texrect(sprite: basespriteObj)
  -> ncine.rect

Returns the texture source rectangle for blitting

get_texture

function ncine.base_sprite.get_texture(sprite: basespriteObj)
  -> textureObj?

Returns the texture object

get_visit_order_index

function ncine.scenenode.get_visit_order_index(node: scenenodeObj)
  -> integer

Returns the visit drawing order of the node

get_visit_order_state

function ncine.scenenode.get_visit_order_state(node: scenenodeObj)
  -> ncine.visit_order_state

Returns the visit order state for the specified node

get_width

function ncine.drawable_node.get_width(node: drawablenodeObj)
  -> number

Returns the width of the node area

is_blending_enabled

function ncine.drawable_node.is_blending_enabled(node: drawablenodeObj)
  -> boolean

Returns true if the node renders with blending enabled

is_enabled

function ncine.scenenode.is_enabled(node: scenenodeObj)
  -> boolean

Returns true if the node is both updating and drawing

is_flipped_x

function ncine.base_sprite.is_flipped_x(sprite: basespriteObj)
  -> boolean

Returns true if the sprite texture is horizontally flipped

is_flipped_y

function ncine.base_sprite.is_flipped_y(sprite: basespriteObj)
  -> boolean

Returns true if the sprite texture is vertically flipped

num_children

function ncine.scenenode.num_children(node: scenenodeObj)
  -> integer

Returns the number of children

remove_all_children

function ncine.scenenode.remove_all_children(parent: scenenodeObj, index: any)
  -> boolean

Removes all children from the specified parent

@returntrue if there were at least one node to remove

remove_child

function ncine.scenenode.remove_child(parent: scenenodeObj, node: scenenodeObj)
  -> boolean

Removes a child node from the specified parent

@returntrue if the node has been removed

remove_child_at

function ncine.scenenode.remove_child_at(parent: scenenodeObj, index: integer)
  -> boolean

Removes a child node at the specified index from the specified parent

@returntrue if the node has been removed

reset_texture

function ncine.base_sprite.reset_texture(sprite: basespriteObj)

Triggers a texture update without setting a new texture

set_abs_anchor_point

function ncine.scenenode.set_abs_anchor_point(node: scenenodeObj, pos: ncine.vec2)

Sets the absolute transformation anchor point in pixels

set_alpha

function ncine.scenenode.set_alpha(node: scenenodeObj, alpha: number)

Sets the node alpha color component

set_anchor_point

function ncine.drawable_node.set_anchor_point(node: drawablenodeObj, anchor_point: ncine.vec2)

Sets the transformation anchor point

set_blending_enabled

function ncine.drawable_node.set_blending_enabled(node: drawablenodeObj, enabled: boolean)

Sets the blending state for node rendering

set_blending_factors

function ncine.drawable_node.set_blending_factors(node: drawablenodeObj, src_factor: ncine.blending_factor, dest_factor: ncine.blending_factor)

Sets a specific source and destination blending factors

set_blending_preset

function ncine.drawable_node.set_blending_preset(node: drawablenodeObj, preset: ncine.blending_preset)

Sets a blending preset for source and destination blending factors

set_color

function ncine.scenenode.set_color(node: scenenodeObj, color: ncine.color)

Sets the node color

set_enabled

function ncine.scenenode.set_enabled(node: scenenodeObj, newValue: boolean)

Enables or disables both node updating and drawing

set_flipped_x

function ncine.base_sprite.set_flipped_x(sprite: basespriteObj, flipped_x: boolean)

Flips the texture rect horizontally

set_flipped_y

function ncine.base_sprite.set_flipped_y(sprite: basespriteObj, flipped_y: boolean)

Flips the texture rect vertically

set_layer

function ncine.scenenode.set_layer(node: scenenodeObj, layer: integer)

Sets the node rendering layer

The lowest value (bottom) is 0 and the highest one (top) is 65535.
When the value is 0, the final layer value is inherited from the parent.

set_parent

function ncine.scenenode.set_parent(node: scenenodeObj, parent?: scenenodeObj)
  -> boolean

Sets the parent node

@returntrue if the parent has been set

set_position

function ncine.scenenode.set_position(node: scenenodeObj, pos: ncine.vec2)

Sets a new position for the node

set_rotation

function ncine.scenenode.set_rotation(node: scenenodeObj, rot: number)

Sets the node rotation in degrees

@param rot — The amount of degrees

set_scale

function ncine.scenenode.set_scale(node: scenenodeObj, factor: number)

Sets both node scale factors to the specified value

set_scale_x

function ncine.scenenode.set_scale_x(node: scenenodeObj, factor: number)

Sets the node scale X factor

set_scale_y

function ncine.scenenode.set_scale_y(node: scenenodeObj, factor: number)

Sets the node scale Y factor

set_size

function ncine.base_sprite.set_size(sprite: basespriteObj, width: number, height: number)

Sets the sprite size

set_texrect

function ncine.base_sprite.set_texrect(sprite: basespriteObj, rect: ncine.rect)

Sets the texture source rectangle for blitting

set_texture

function ncine.base_sprite.set_texture(sprite: basespriteObj, texture?: textureObj)

Sets the texture object

set_visit_order_state

function ncine.scenenode.set_visit_order_state(node: scenenodeObj, state: ncine.visit_order_state)

Sets the visit order state for the specified node

swap_children

function ncine.scenenode.swap_children(parent: scenenodeObj, firstIndex: integer, secondIndex: integer)
  -> boolean

Swaps two children at the specified indices

@returntrue if the two nodes have been swapped

swap_node_back

function ncine.scenenode.swap_node_back(node: scenenodeObj)
  -> boolean

Brings this node one node back in the parent's list of children

@returntrue if the node has been brought one position back

swap_node_forward

function ncine.scenenode.swap_node_forward(node: scenenodeObj)
  -> boolean

Brings this node one node forward in the parent's list of children

@returntrue if the node has been brought one position forward

unlink_child

function ncine.scenenode.unlink_child(parent: scenenodeObj, node: scenenodeObj)
  -> boolean

Unlinks a child node from the specified parent

The children of the unlinked node will be reparented with the grandparent node

@returntrue if the node has been unlinked


ncine.base_sprite.get_texrect

function ncine.base_sprite.get_texrect(sprite: basespriteObj)
  -> ncine.rect

ncine.base_sprite.get_texture

function ncine.base_sprite.get_texture(sprite: basespriteObj)
  -> textureObj?

ncine.base_sprite.is_flipped_x

function ncine.base_sprite.is_flipped_x(sprite: basespriteObj)
  -> boolean

ncine.base_sprite.is_flipped_y

function ncine.base_sprite.is_flipped_y(sprite: basespriteObj)
  -> boolean

ncine.base_sprite.reset_texture

function ncine.base_sprite.reset_texture(sprite: basespriteObj)

ncine.base_sprite.set_flipped_x

function ncine.base_sprite.set_flipped_x(sprite: basespriteObj, flipped_x: boolean)

ncine.base_sprite.set_flipped_y

function ncine.base_sprite.set_flipped_y(sprite: basespriteObj, flipped_y: boolean)

ncine.base_sprite.set_size

function ncine.base_sprite.set_size(sprite: basespriteObj, width: number, height: number)

ncine.base_sprite.set_texrect

function ncine.base_sprite.set_texrect(sprite: basespriteObj, rect: ncine.rect)

ncine.base_sprite.set_texture

function ncine.base_sprite.set_texture(sprite: basespriteObj, texture?: textureObj)

ncine.blending_factor

enum ncine.blending_factor

ncine.blending_preset

enum ncine.blending_preset

ncine.camera

ncine.camera

ncine.camera

delete

function ncine.camera.delete(camera: cameraObj)

Destroys a camera object and releases its memory

@param camera — The camera object to be destroyed

get_projection_values

function ncine.camera.get_projection_values(camera: cameraObj)
  -> camera_projection_values

Returns the projection values that are used to create the projection matrix

get_view_values

function ncine.camera.get_view_values(camera: cameraObj)
  -> camera_view_values

Returns the view values that are used to create the model matrix

new

function ncine.camera.new()
  -> cameraObj

Constructs a camera object

Don't forget to call delete when you are done with it!

@return — A new camera object

set_ortho_projection

function ncine.camera.set_ortho_projection(camera: cameraObj, projection_values: camera_projection_values)

Updates the projection matrix using the projection values from the table

set_view

function ncine.camera.set_view(camera: cameraObj, view_values: camera_view_values)

Updates the model matrix using the view values from the table


ncine.camera.delete

function ncine.camera.delete(camera: cameraObj)

ncine.camera.get_projection_values

function ncine.camera.get_projection_values(camera: cameraObj)
  -> camera_projection_values

ncine.camera.get_view_values

function ncine.camera.get_view_values(camera: cameraObj)
  -> camera_view_values

ncine.camera.new

function ncine.camera.new()
  -> cameraObj

ncine.camera.set_ortho_projection

function ncine.camera.set_ortho_projection(camera: cameraObj, projection_values: camera_projection_values)

ncine.camera.set_view

function ncine.camera.set_view(camera: cameraObj, view_values: camera_view_values)

ncine.clear_mode

enum ncine.clear_mode

ncine.color

a

number

The alpha component

add

function ncine.color.add(color0: ncine.color, color1: ncine.color)
  -> ncine.color

Adds two colors together, component-wise, clamping to 1.0

b

number

The blue component

create

function ncine.color.create(r: number, g: number, b: number, a: number)
  -> ncine.color

Creates a color table from its components

@param r — The red component

@param g — The green component

@param b — The blue component

@param a — The alpha component

g

number

The green component

mul

function ncine.color.mul(color0: ncine.color, color1: ncine.color)
  -> ncine.color

Multiplies two colors together, component-wise, clamping to 1.0

r

number

The red component

sub

function ncine.color.sub(color0: ncine.color, color1: ncine.color)
  -> ncine.color

Subtracts the second color from the first one, component-wise, clamping to 0.0


ncine.color

ncine.color

ncine.color.add

function ncine.color.add(color0: ncine.color, color1: ncine.color)
  -> ncine.color

ncine.color.create

function ncine.color.create(r: number, g: number, b: number, a: number)
  -> ncine.color

ncine.color.mul

function ncine.color.mul(color0: ncine.color, color1: ncine.color)
  -> ncine.color
function ncine.color.mul(color0: ncine.color, scalar: number)
  -> ncine.color

ncine.color.sub

function ncine.color.sub(color0: ncine.color, color1: ncine.color)
  -> ncine.color

ncine.colors

table

ncine.colors.BLACK

table

ncine.colors.BLUE

table

ncine.colors.CYAN

table

ncine.colors.GREEN

table

ncine.colors.MAGENTA

table

ncine.colors.RED

table

ncine.colors.WHITE

table

ncine.colors.YELLOW

table

ncine.depth_stencil_format

enum ncine.depth_stencil_format

ncine.drawable_node

add_child

function ncine.scenenode.add_child(parent: scenenodeObj, node: scenenodeObj)
  -> boolean

Adds a child node to the specified parent

@returntrue if the node has been added

get_aabb

function ncine.drawable_node.get_aabb(node: drawablenodeObj)
  -> ncine.rect

Returns the axis-aligned bounding box of the node area in the last frame

get_abs_anchor_point

function ncine.scenenode.get_abs_anchor_point(node: scenenodeObj)
  -> ncine.vec2

Returns the absolute transformation anchor point in pixels

get_alpha

function ncine.scenenode.get_alpha(node: scenenodeObj)
  -> number

Returns the node alpha color component

get_anchor_point

function ncine.drawable_node.get_anchor_point(node: drawablenodeObj)
  -> ncine.vec2

Returns the transformation anchor point

get_child

function ncine.scenenode.get_child(node: scenenodeObj, index: integer)
  -> scenenodeObj?

Returns the n-th child

get_child_order_index

function ncine.scenenode.get_child_order_index(node: scenenodeObj)
  -> integer

Returns the order index of this node among its siblings

@return — The order index or zero if the node has no parent

get_children

function ncine.scenenode.get_children(node: scenenodeObj)
  -> scenenodeObj[]

Returns the array of children

get_color

function ncine.scenenode.get_color(node: scenenodeObj)
  -> ncine.color

Returns the node color

get_dest_blending_factor

function ncine.drawable_node.get_dest_blending_factor(node: drawablenodeObj)
  -> ncine.blending_factor

Returns the destination blending factor

get_height

function ncine.drawable_node.get_height(node: drawablenodeObj)
  -> number

Returns the height of the node area

get_last_frame_rendered

function ncine.drawable_node.get_last_frame_rendered(node: drawablenodeObj)
  -> integer

Returns the last frame in which any of the viewports have rendered this node (node was not culled)

get_last_frame_updated

function ncine.scenenode.get_last_frame_updated(node: scenenodeObj)
  -> integer

Returns the last frame in which any of the viewports have updated this node

get_layer

function ncine.scenenode.get_layer(node: scenenodeObj)
  -> integer

Returns the node rendering layer

get_parent

function ncine.scenenode.get_parent(node: scenenodeObj)
  -> scenenodeObj?

Returns the parent node, if there is any

get_position

function ncine.scenenode.get_position(node: scenenodeObj)
  -> ncine.vec2

Returns the node position relative to its parent

get_rotation

function ncine.scenenode.get_rotation(node: scenenodeObj)
  -> number

Returns the node rotation in degress

get_scale

function ncine.scenenode.get_scale(node: scenenodeObj)
  -> ncine.vec2

Returns the node scale factors

get_size

function ncine.drawable_node.get_size(node: drawablenodeObj)
  -> ncine.vec2

Returns the size of the node area

get_src_blending_factor

function ncine.drawable_node.get_src_blending_factor(node: drawablenodeObj)
  -> ncine.blending_factor

eturns the source blending factor

get_visit_order_index

function ncine.scenenode.get_visit_order_index(node: scenenodeObj)
  -> integer

Returns the visit drawing order of the node

get_visit_order_state

function ncine.scenenode.get_visit_order_state(node: scenenodeObj)
  -> ncine.visit_order_state

Returns the visit order state for the specified node

get_width

function ncine.drawable_node.get_width(node: drawablenodeObj)
  -> number

Returns the width of the node area

is_blending_enabled

function ncine.drawable_node.is_blending_enabled(node: drawablenodeObj)
  -> boolean

Returns true if the node renders with blending enabled

is_enabled

function ncine.scenenode.is_enabled(node: scenenodeObj)
  -> boolean

Returns true if the node is both updating and drawing

num_children

function ncine.scenenode.num_children(node: scenenodeObj)
  -> integer

Returns the number of children

remove_all_children

function ncine.scenenode.remove_all_children(parent: scenenodeObj, index: any)
  -> boolean

Removes all children from the specified parent

@returntrue if there were at least one node to remove

remove_child

function ncine.scenenode.remove_child(parent: scenenodeObj, node: scenenodeObj)
  -> boolean

Removes a child node from the specified parent

@returntrue if the node has been removed

remove_child_at

function ncine.scenenode.remove_child_at(parent: scenenodeObj, index: integer)
  -> boolean

Removes a child node at the specified index from the specified parent

@returntrue if the node has been removed

set_abs_anchor_point

function ncine.scenenode.set_abs_anchor_point(node: scenenodeObj, pos: ncine.vec2)

Sets the absolute transformation anchor point in pixels

set_alpha

function ncine.scenenode.set_alpha(node: scenenodeObj, alpha: number)

Sets the node alpha color component

set_anchor_point

function ncine.drawable_node.set_anchor_point(node: drawablenodeObj, anchor_point: ncine.vec2)

Sets the transformation anchor point

set_blending_enabled

function ncine.drawable_node.set_blending_enabled(node: drawablenodeObj, enabled: boolean)

Sets the blending state for node rendering

set_blending_factors

function ncine.drawable_node.set_blending_factors(node: drawablenodeObj, src_factor: ncine.blending_factor, dest_factor: ncine.blending_factor)

Sets a specific source and destination blending factors

set_blending_preset

function ncine.drawable_node.set_blending_preset(node: drawablenodeObj, preset: ncine.blending_preset)

Sets a blending preset for source and destination blending factors

set_color

function ncine.scenenode.set_color(node: scenenodeObj, color: ncine.color)

Sets the node color

set_enabled

function ncine.scenenode.set_enabled(node: scenenodeObj, newValue: boolean)

Enables or disables both node updating and drawing

set_layer

function ncine.scenenode.set_layer(node: scenenodeObj, layer: integer)

Sets the node rendering layer

The lowest value (bottom) is 0 and the highest one (top) is 65535.
When the value is 0, the final layer value is inherited from the parent.

set_parent

function ncine.scenenode.set_parent(node: scenenodeObj, parent?: scenenodeObj)
  -> boolean

Sets the parent node

@returntrue if the parent has been set

set_position

function ncine.scenenode.set_position(node: scenenodeObj, pos: ncine.vec2)

Sets a new position for the node

set_rotation

function ncine.scenenode.set_rotation(node: scenenodeObj, rot: number)

Sets the node rotation in degrees

@param rot — The amount of degrees

set_scale

function ncine.scenenode.set_scale(node: scenenodeObj, factor: number)

Sets both node scale factors to the specified value

set_scale_x

function ncine.scenenode.set_scale_x(node: scenenodeObj, factor: number)

Sets the node scale X factor

set_scale_y

function ncine.scenenode.set_scale_y(node: scenenodeObj, factor: number)

Sets the node scale Y factor

set_visit_order_state

function ncine.scenenode.set_visit_order_state(node: scenenodeObj, state: ncine.visit_order_state)

Sets the visit order state for the specified node

swap_children

function ncine.scenenode.swap_children(parent: scenenodeObj, firstIndex: integer, secondIndex: integer)
  -> boolean

Swaps two children at the specified indices

@returntrue if the two nodes have been swapped

swap_node_back

function ncine.scenenode.swap_node_back(node: scenenodeObj)
  -> boolean

Brings this node one node back in the parent's list of children

@returntrue if the node has been brought one position back

swap_node_forward

function ncine.scenenode.swap_node_forward(node: scenenodeObj)
  -> boolean

Brings this node one node forward in the parent's list of children

@returntrue if the node has been brought one position forward

unlink_child

function ncine.scenenode.unlink_child(parent: scenenodeObj, node: scenenodeObj)
  -> boolean

Unlinks a child node from the specified parent

The children of the unlinked node will be reparented with the grandparent node

@returntrue if the node has been unlinked


ncine.drawable_node

ncine.drawable_node

ncine.drawable_node.get_aabb

function ncine.drawable_node.get_aabb(node: drawablenodeObj)
  -> ncine.rect

ncine.drawable_node.get_anchor_point

function ncine.drawable_node.get_anchor_point(node: drawablenodeObj)
  -> ncine.vec2

ncine.drawable_node.get_dest_blending_factor

function ncine.drawable_node.get_dest_blending_factor(node: drawablenodeObj)
  -> ncine.blending_factor

ncine.drawable_node.get_height

function ncine.drawable_node.get_height(node: drawablenodeObj)
  -> number

ncine.drawable_node.get_last_frame_rendered

function ncine.drawable_node.get_last_frame_rendered(node: drawablenodeObj)
  -> integer

ncine.drawable_node.get_size

function ncine.drawable_node.get_size(node: drawablenodeObj)
  -> ncine.vec2

ncine.drawable_node.get_src_blending_factor

function ncine.drawable_node.get_src_blending_factor(node: drawablenodeObj)
  -> ncine.blending_factor

ncine.drawable_node.get_width

function ncine.drawable_node.get_width(node: drawablenodeObj)
  -> number

ncine.drawable_node.is_blending_enabled

function ncine.drawable_node.is_blending_enabled(node: drawablenodeObj)
  -> boolean

ncine.drawable_node.set_anchor_point

function ncine.drawable_node.set_anchor_point(node: drawablenodeObj, anchor_point: ncine.vec2)
function ncine.drawable_node.set_anchor_point(node: drawablenodeObj, x: number, y: number)

ncine.drawable_node.set_blending_enabled

function ncine.drawable_node.set_blending_enabled(node: drawablenodeObj, enabled: boolean)

ncine.drawable_node.set_blending_factors

function ncine.drawable_node.set_blending_factors(node: drawablenodeObj, src_factor: ncine.blending_factor, dest_factor: ncine.blending_factor)

ncine.drawable_node.set_blending_preset

function ncine.drawable_node.set_blending_preset(node: drawablenodeObj, preset: ncine.blending_preset)

ncine.efx_reverb_presets

enum ncine.efx_reverb_presets

ncine.font

delete

function ncine.font.delete(font: fontObj)

Destroys a font object and releases its memory

@param font — The font object to be destroyed

get_base

function ncine.font.get_base(font: fontObj)
  -> integer

Returns the font base

get_line_height

function ncine.font.get_line_height(font: fontObj)
  -> integer

Returns the font line height

get_render_mode

function ncine.font.get_render_mode(font: fontObj)
  -> ncine.font_render_mode

Returns the mode detected by the font to render text nodes

get_texture

function ncine.font.get_texture(font: fontObj)
  -> textureObj?

Returns the texture object in use by the font

get_texture_size

function ncine.font.get_texture_size(font: fontObj)
  -> ncine.vec2

Returns the texture atlas size

new

function ncine.font.new(fnt_file: string, texture_file: string)
  -> fontObj

Constructs the font object from an AngelCode's FNT file and a texture file

If the texture_file parameter is an empty string, then a texture with the same name as the FNT file is searched in the same path

Don't forget to call delete when you are done with it!

@param fnt_file — The path to a FNT file

@param texture_file — The path to a texture file

@return — A new font object

num_glyphs

function ncine.font.num_glyphs(font: fontObj)
  -> integer

Returns the number of glyphs

num_kernings

function ncine.font.num_kernings(font: fontObj)
  -> integer

Returns the number of kerning pairs

set_texture

function ncine.font.set_texture(font: fontObj, texture?: textureObj)

Sets a new shared texture object without modifying any glyphs or kerning data


ncine.font

ncine.font

ncine.font.delete

function ncine.font.delete(font: fontObj)

ncine.font.get_base

function ncine.font.get_base(font: fontObj)
  -> integer

ncine.font.get_line_height

function ncine.font.get_line_height(font: fontObj)
  -> integer

ncine.font.get_render_mode

function ncine.font.get_render_mode(font: fontObj)
  -> ncine.font_render_mode

ncine.font.get_texture

function ncine.font.get_texture(font: fontObj)
  -> textureObj?

ncine.font.get_texture_size

function ncine.font.get_texture_size(font: fontObj)
  -> ncine.vec2

ncine.font.new

function ncine.font.new(fnt_file: string, texture_file: string)
  -> fontObj

ncine.font.num_glyphs

function ncine.font.num_glyphs(font: fontObj)
  -> integer

ncine.font.num_kernings

function ncine.font.num_kernings(font: fontObj)
  -> integer

ncine.font.set_texture

function ncine.font.set_texture(font: fontObj, texture?: textureObj)

ncine.font_render_mode

enum ncine.font_render_mode

ncine.frame_timer

ncine.frame_timer

ncine.frame_timer

average_fps

function ncine.frame_timer.average_fps()
  -> number

Returns the average FPS during the update interval

average_frame_time

function ncine.frame_timer.average_frame_time()
  -> number

Returns the average frame time in seconds during the update interval

current_frame_duration

function ncine.frame_timer.current_frame_duration()
  -> number

Returns the elapsed time in seconds since current frame started

get_average_interval

function ncine.frame_timer.get_average_interval()
  -> number

Returns the number of seconds between two average FPS calculations

get_log_level

function ncine.frame_timer.get_log_level()
  -> ncine.log_level

Returns the level for the logging events

get_logging_interval

function ncine.frame_timer.get_logging_interval()
  -> number

Returns the number of seconds between two logging events

A different and independent average is calculated over this time interval.

is_average_enabled

function ncine.frame_timer.is_average_enabled()
  -> boolean

Returns true if the average FPS calculation is enabled

is_logging_enabled

function ncine.frame_timer.is_logging_enabled()
  -> boolean

Returns true if logging of averages is enabled

last_frame_duration

function ncine.frame_timer.last_frame_duration()
  -> number

Returns the time in seconds that last frame took to complete

set_average_interval

function ncine.frame_timer.set_average_interval(interval: number)

Sets the number of seconds between two average FPS calculations

set_log_level

function ncine.frame_timer.set_log_level(log_level: ncine.log_level)

Sets the level for the logging events

set_logging_interval

function ncine.frame_timer.set_logging_interval(interval: number)

Sets the number of seconds between two logging events

total_number_frames

function ncine.frame_timer.total_number_frames()
  -> integer

Returns the total number of frames rendered since the application started


ncine.frame_timer.average_fps

function ncine.frame_timer.average_fps()
  -> number

ncine.frame_timer.average_frame_time

function ncine.frame_timer.average_frame_time()
  -> number

ncine.frame_timer.current_frame_duration

function ncine.frame_timer.current_frame_duration()
  -> number

ncine.frame_timer.get_average_interval

function ncine.frame_timer.get_average_interval()
  -> number

ncine.frame_timer.get_log_level

function ncine.frame_timer.get_log_level()
  -> ncine.log_level

ncine.frame_timer.get_logging_interval

function ncine.frame_timer.get_logging_interval()
  -> number

ncine.frame_timer.is_average_enabled

function ncine.frame_timer.is_average_enabled()
  -> boolean

ncine.frame_timer.is_logging_enabled

function ncine.frame_timer.is_logging_enabled()
  -> boolean

ncine.frame_timer.last_frame_duration

function ncine.frame_timer.last_frame_duration()
  -> number

ncine.frame_timer.set_average_interval

function ncine.frame_timer.set_average_interval(interval: number)

ncine.frame_timer.set_log_level

function ncine.frame_timer.set_log_level(log_level: ncine.log_level)

ncine.frame_timer.set_logging_interval

function ncine.frame_timer.set_logging_interval(interval: number)

ncine.frame_timer.total_number_frames

function ncine.frame_timer.total_number_frames()
  -> integer

ncine.fs

ncine.fs

ncine.fs

absolute_join_path

function ncine.fs.absolute_join_path(first: string, second: string)
  -> string

Returns the absolute path after joining together two path components

absolute_path

function ncine.fs.absolute_path(path: string)
  -> string

Returns an absolute path from a relative one

It also resolves dot references to current and parent directories, and double separators.

add_permissions

function ncine.fs.add_permissions(path: string, mode: integer)
  -> boolean

Adds the permissions in the mask to a file or a directory

@param mode — A mask created from values in ncine.permission

@return — True if the new permission mode was added

See: ncine.permission

basename

function ncine.fs.basename(path: string)
  -> string

Returns the path component after the final separator

change_permissions

function ncine.fs.change_permissions(path: string, mode: integer)
  -> boolean

Returns the file or directory permissions in a mask

@param mode — A mask created from values in ncine.permission

@return — True if the permission mode was changed

See: ncine.permission

copy

function ncine.fs.copy(old_path: string, new_path: string)
  -> boolean

Copies a file

@return — True if the file has been copied

create_dir

function ncine.fs.create_dir(path: string)
  -> boolean

Creates a new directory

@return — True if the new directory has been created

delete_empty_dir

function ncine.fs.delete_empty_dir(path: string)
  -> boolean

Deletes an empty directory

@return — True if the empty directory has been deleted

delete_file

function ncine.fs.delete_file(path: string)
  -> boolean

Deletes a file

@return — True if the file has been deleted

dirname

function ncine.fs.dirname(path: string)
  -> string

Returns the path up to, but not including, the final separator

exists

function ncine.fs.exists(path: string)
  -> boolean

Returns true if the file or directory exists

file_size

function ncine.fs.file_size(path: string)
  -> integer

Returns the file size in bytes

get_cache_path

function ncine.fs.get_cache_path()
  -> string

Returns the writable directory for saving cache data

get_current_dir

function ncine.fs.get_current_dir()
  -> string

Returns the path of the current working directory

get_data_path

function ncine.fs.get_data_path()
  -> string

Returns the base directory for data loading

get_extension

function ncine.fs.get_extension(path: string)
  -> string?

Returns the extension position in the string or nil if it is not found

get_home_path

function ncine.fs.get_home_path()
  -> string

Returns the current user home directory

get_permissions

function ncine.fs.get_permissions(path: string)
  -> integer

Returns the file or directory permissions in a mask

@return — A mask created from values in ncine.permission

See: ncine.permission

get_save_path

function ncine.fs.get_save_path()
  -> string

Returns the writable directory for saving data

has_extension

function ncine.fs.has_extension(path: string, extension: string)
  -> boolean

Returns true if the path has the specified extension (case-insensitive comparison)

is_directory

function ncine.fs.is_directory(path: string)
  -> boolean

Returns true if the specified path is a directory

is_executable

function ncine.fs.is_executable(path: string)
  -> boolean

Returns true if the file or directory is executable

is_file

function ncine.fs.is_file(path: string)
  -> boolean

Returns true if the specified path is a file

is_hidden

function ncine.fs.is_hidden(path: string)
  -> boolean

Returns true if the file or directory is hidden

is_readable

function ncine.fs.is_readable(path: string)
  -> boolean

Returns true if the file or directory is readable

is_readable_file

function ncine.fs.is_readable_file(path: string)
  -> boolean

Returns true if the path is a file and is readable

is_writable

function ncine.fs.is_writable(path: string)
  -> boolean

Returns true if the file or directory is writable

is_writable_file

function ncine.fs.is_writable_file(path: string)
  -> boolean

Returns true if the path is a file and is writeable

join_path

function ncine.fs.join_path(first: string, second: string)
  -> string

Joins together two path components

last_access_time

function ncine.fs.last_access_time(path: string)
  -> file_date

Returns the last time the file or directory was accessed

See: file_date

last_modification_time

function ncine.fs.last_modification_time(path: string)
  -> file_date

Returns the last time the file or directory was modified

See: file_date

logical_drive_strings

function ncine.fs.logical_drive_strings()
  -> string

Returns a buffer with strings that specify valid drives in the system on Windows

logical_drives

function ncine.fs.logical_drives()
  -> integer

Returns a bitmask representing the currently available disk drives on Windows

remove_permissions

function ncine.fs.remove_permissions(path: string, mode: integer)
  -> boolean

Removes the permissions in the mask from a file or a directory

@param mode — A mask created from values in ncine.permission

@return — True if the permission mode was removed

See: ncine.permission

rename

function ncine.fs.rename(old_path: string, new_path: string)
  -> boolean

Renames or moves a file or a directory

@return — True if the file or directory has been renamed or moved

set_current_dir

function ncine.fs.set_current_dir(path: string)
  -> boolean

Sets the current working directory, the starting point for interpreting relative paths

@return — True if the directory has been successfully changed

set_hidden

function ncine.fs.set_hidden(path: string, hidden: boolean)
  -> boolean

Makes a file or a directory hidden or not

@return — True if the new hidden state has been successfully set


ncine.fs.absolute_join_path

function ncine.fs.absolute_join_path(first: string, second: string)
  -> string

ncine.fs.absolute_path

function ncine.fs.absolute_path(path: string)
  -> string

ncine.fs.add_permissions

function ncine.fs.add_permissions(path: string, mode: integer)
  -> boolean

ncine.fs.basename

function ncine.fs.basename(path: string)
  -> string

ncine.fs.change_permissions

function ncine.fs.change_permissions(path: string, mode: integer)
  -> boolean

ncine.fs.copy

function ncine.fs.copy(old_path: string, new_path: string)
  -> boolean

ncine.fs.create_dir

function ncine.fs.create_dir(path: string)
  -> boolean

ncine.fs.delete_empty_dir

function ncine.fs.delete_empty_dir(path: string)
  -> boolean

ncine.fs.delete_file

function ncine.fs.delete_file(path: string)
  -> boolean

ncine.fs.dirname

function ncine.fs.dirname(path: string)
  -> string

ncine.fs.exists

function ncine.fs.exists(path: string)
  -> boolean

ncine.fs.file_size

function ncine.fs.file_size(path: string)
  -> integer

ncine.fs.get_cache_path

function ncine.fs.get_cache_path()
  -> string

ncine.fs.get_current_dir

function ncine.fs.get_current_dir()
  -> string

ncine.fs.get_data_path

function ncine.fs.get_data_path()
  -> string

ncine.fs.get_extension

function ncine.fs.get_extension(path: string)
  -> string?

ncine.fs.get_home_path

function ncine.fs.get_home_path()
  -> string

ncine.fs.get_permissions

function ncine.fs.get_permissions(path: string)
  -> integer

ncine.fs.get_save_path

function ncine.fs.get_save_path()
  -> string

ncine.fs.has_extension

function ncine.fs.has_extension(path: string, extension: string)
  -> boolean

ncine.fs.is_directory

function ncine.fs.is_directory(path: string)
  -> boolean

ncine.fs.is_executable

function ncine.fs.is_executable(path: string)
  -> boolean

ncine.fs.is_file

function ncine.fs.is_file(path: string)
  -> boolean

ncine.fs.is_hidden

function ncine.fs.is_hidden(path: string)
  -> boolean

ncine.fs.is_readable

function ncine.fs.is_readable(path: string)
  -> boolean

ncine.fs.is_readable_file

function ncine.fs.is_readable_file(path: string)
  -> boolean

ncine.fs.is_writable

function ncine.fs.is_writable(path: string)
  -> boolean

ncine.fs.is_writable_file

function ncine.fs.is_writable_file(path: string)
  -> boolean

ncine.fs.join_path

function ncine.fs.join_path(first: string, second: string)
  -> string

ncine.fs.last_access_time

function ncine.fs.last_access_time(path: string)
  -> file_date

ncine.fs.last_modification_time

function ncine.fs.last_modification_time(path: string)
  -> file_date

ncine.fs.logical_drive_strings

function ncine.fs.logical_drive_strings()
  -> string

ncine.fs.logical_drives

function ncine.fs.logical_drives()
  -> integer

ncine.fs.remove_permissions

function ncine.fs.remove_permissions(path: string, mode: integer)
  -> boolean

ncine.fs.rename

function ncine.fs.rename(old_path: string, new_path: string)
  -> boolean

ncine.fs.set_current_dir

function ncine.fs.set_current_dir(path: string)
  -> boolean

ncine.fs.set_hidden

function ncine.fs.set_hidden(path: string, hidden: boolean)
  -> boolean

ncine.gfx_device

flash_window

function ncine.gfx_device.flash_window()

Highlights the application window to notify the user

get_aspect_ratio

function ncine.gfx_device.get_aspect_ratio()
  -> number

Returns the window or video mode resolution aspect ratio

get_current_video_mode

function ncine.gfx_device.get_current_video_mode()
  -> video_mode

Returns the current video mode for the specified monitor`

get_drawable_resolution

function ncine.gfx_device.get_drawable_resolution()
  -> ncine.vec2

Returns the window resolution in pixels as a ncine.vec2

It may differs from width() on HiDPI screens

get_drawable_width

function ncine.gfx_device.get_drawable_width()
  -> integer

Returns the window width in pixels

It may differs from width() on HiDPI screens

get_hdrawable_eight

function ncine.gfx_device.get_hdrawable_eight()
  -> integer

Returns the window height in pixels

It may differs from width() on HiDPI screens

get_height

function ncine.gfx_device.get_height()
  -> integer

Returns the window or video mode height in screen coordinates

get_monitor

function ncine.gfx_device.get_monitor(index: integer)
  -> monitor

Returns the specified monitor

get_primary_monitor_index

function ncine.gfx_device.get_primary_monitor_index()
  -> integer

Returns the array index of the primary monitor

This is usually the monitor where elements like the task bar or global menu bar are located

get_resolution

function ncine.gfx_device.get_resolution()
  -> ncine.vec2

Returns the window or video mode resolution in screen coordinates as a ncine.vec2

get_width

function ncine.gfx_device.get_width()
  -> integer

Returns the window or video mode width in screen coordinates

get_window_monitor_index

function ncine.gfx_device.get_window_monitor_index()
  -> integer

Returns the array index of the monitor associated with the window

get_window_position

function ncine.gfx_device.get_window_position()
  -> ncine.vec2

Returns the window position as a ncine.vec2

get_window_position_x

function ncine.gfx_device.get_window_position_x()
  -> integer

Returns the window horizontal position

get_window_position_y

function ncine.gfx_device.get_window_position_y()
  -> integer

Returns the window vertical position

get_window_scaling_factor

function ncine.gfx_device.get_window_scaling_factor()
  -> number

Returns the scaling factor for application window

is_fullscreen

function ncine.gfx_device.is_fullscreen()
  -> boolean

Returns true if the device renders in full screen

is_resizable

function ncine.gfx_device.is_resizable()
  -> boolean

Returns true if the window is resizable

num_monitors

function ncine.gfx_device.num_monitors()
  -> integer

Returns the number of connected monitors

set_fullscreen

function ncine.gfx_device.set_fullscreen(in_fullscreen: boolean)

Sets the full screen flag of the window

set_swap_interval

function ncine.gfx_device.set_swap_interval(interval: integer)

Sets the number of vertical blanks to occur before a buffer swap

An interval of -1 will enable adaptive v-sync if available.

set_video_mode

function ncine.gfx_device.set_video_mode(mode_index: integer)

Sets the video mode that will be used in full screen by the monitor that hosts the window

Call this method before enabling full screen.

set_window_icon

function ncine.gfx_device.set_window_icon(icon_filename: string)

Sets the application window icon

set_window_position

function ncine.gfx_device.set_window_position(position: ncine.vec2)

Sets the position of the application window with a ncine.vec2

set_window_size

function ncine.gfx_device.set_window_size(size: ncine.vec2)

Sets the window size with a ncine.vec2

If the application is in full screen this method will have no effect.

set_window_title

function ncine.gfx_device.set_window_title(title: string)

Sets the application window title


ncine.gfx_device

ncine.gfx_device

ncine.gfx_device.flash_window

function ncine.gfx_device.flash_window()

ncine.gfx_device.get_aspect_ratio

function ncine.gfx_device.get_aspect_ratio()
  -> number

ncine.gfx_device.get_current_video_mode

function ncine.gfx_device.get_current_video_mode()
  -> video_mode

ncine.gfx_device.get_drawable_resolution

function ncine.gfx_device.get_drawable_resolution()
  -> ncine.vec2

ncine.gfx_device.get_drawable_width

function ncine.gfx_device.get_drawable_width()
  -> integer

ncine.gfx_device.get_hdrawable_eight

function ncine.gfx_device.get_hdrawable_eight()
  -> integer

ncine.gfx_device.get_height

function ncine.gfx_device.get_height()
  -> integer

ncine.gfx_device.get_monitor

function ncine.gfx_device.get_monitor(index: integer)
  -> monitor

ncine.gfx_device.get_primary_monitor_index

function ncine.gfx_device.get_primary_monitor_index()
  -> integer

ncine.gfx_device.get_resolution

function ncine.gfx_device.get_resolution()
  -> ncine.vec2

ncine.gfx_device.get_width

function ncine.gfx_device.get_width()
  -> integer

ncine.gfx_device.get_window_monitor_index

function ncine.gfx_device.get_window_monitor_index()
  -> integer

ncine.gfx_device.get_window_position

function ncine.gfx_device.get_window_position()
  -> ncine.vec2

ncine.gfx_device.get_window_position_x

function ncine.gfx_device.get_window_position_x()
  -> integer

ncine.gfx_device.get_window_position_y

function ncine.gfx_device.get_window_position_y()
  -> integer

ncine.gfx_device.get_window_scaling_factor

function ncine.gfx_device.get_window_scaling_factor()
  -> number

ncine.gfx_device.is_fullscreen

function ncine.gfx_device.is_fullscreen()
  -> boolean

ncine.gfx_device.is_resizable

function ncine.gfx_device.is_resizable()
  -> boolean

ncine.gfx_device.num_monitors

function ncine.gfx_device.num_monitors()
  -> integer

ncine.gfx_device.set_fullscreen

function ncine.gfx_device.set_fullscreen(in_fullscreen: boolean)

ncine.gfx_device.set_swap_interval

function ncine.gfx_device.set_swap_interval(interval: integer)

ncine.gfx_device.set_video_mode

function ncine.gfx_device.set_video_mode(mode_index: integer)

ncine.gfx_device.set_window_icon

function ncine.gfx_device.set_window_icon(icon_filename: string)

ncine.gfx_device.set_window_position

function ncine.gfx_device.set_window_position(position: ncine.vec2)
function ncine.gfx_device.set_window_position(position_x: integer, position_y: integer)

ncine.gfx_device.set_window_size

function ncine.gfx_device.set_window_size(size: ncine.vec2)
function ncine.gfx_device.set_window_size(width: integer, height: integer)

ncine.gfx_device.set_window_title

function ncine.gfx_device.set_window_title(title: string)

ncine.hash64

table

ncine.input

ncine.input

ncine.input

add_joymappings_from_file

function ncine.input.add_joymappings_from_file(filename: string)

Adds joystick mapping configurations from a text file

add_joymappings_from_strings

function ncine.input.add_joymappings_from_strings(strings: string[])

Adds joystick mapping configurations from a strings array

deadzone_normalize

function ncine.input.deadzone_normalize(joy_vector: ncine.vec2, deadzone_value: number)

Modifies the joystick axis vector to account for a dead zone

get_mouse_cursor_mode

function ncine.input.get_mouse_cursor_mode(joy_id: any)
  -> ncine.mouse_cursor_mode

Returns current mouse cursor mode

joy_axis_normvalue

function ncine.input.joy_axis_normvalue(joystick_state: joystickstateObj, axis_id: integer)
  -> number

Returns a normalized value between -1.0 and 1.0 for a joystick axis

joy_axis_value

function ncine.input.joy_axis_value(joystick_state: joystickstateObj, axis_id: integer)
  -> integer

Returns a value between -32768 and 32767 for a joystick axis

joy_button_pressed

function ncine.input.joy_button_pressed(joystick_state: joystickstateObj, button_id: integer)
  -> boolean

Returns true if the specified joystick button is pressed

joy_guid

function ncine.input.joy_guid(joy_id: integer)
  -> string

Returns the GUID of the specified joystick

joy_hat_state

function ncine.input.joy_hat_state(joystick_state: joystickstateObj, hat_id: integer)
  -> ncine.joy_hat_state

Returns the state of the specified hat

joy_mapped

function ncine.input.joy_mapped(joy_id: integer)
  -> boolean

Returns true if the joystick has a valid mapping configuration

joy_name

function ncine.input.joy_name(joy_id: integer)
  -> string

joy_id

joy_num_axes

function ncine.input.joy_num_axes(joy_id: integer)
  -> integer

Returns the number of available axes for the specified joystick

joy_num_buttons

function ncine.input.joy_num_buttons(joy_id: integer)
  -> integer

Returns the number of available buttons for the specified joystick

joy_num_hats

function ncine.input.joy_num_hats(joy_id: integer)
  -> integer

Returns the number of available hats for the specified joystick

joy_present

function ncine.input.joy_present(joy_id: integer)
  -> boolean

Returns true if the specified joystick is connected

joy_state

function ncine.input.joy_state()
  -> joystickstateObj

Returns the state of the joystick

joymapped_state

function ncine.input.joymapped_state()
  -> joymappedstateObj

Returns the state of the mapped joystick

key_down

function ncine.input.key_down(key_state: keystateObj, keysym: integer)
  -> boolean

Returns true if the specified key is down

key_state

function ncine.input.key_state()
  -> keystateObj

Returns current keyboard state

mouse_state

function ncine.input.mouse_state()
  -> mouse_state

Returns current mouse state

num_joymappings

function ncine.input.num_joymappings(strings: any)
  -> integer

Returns the current number of valid joystick mappings

set_mouse_cursor_mode

function ncine.input.set_mouse_cursor_mode(mouse_cursor_mode: ncine.mouse_cursor_mode)

Sets the mouse cursor mode


ncine.input.add_joymappings_from_file

function ncine.input.add_joymappings_from_file(filename: string)

ncine.input.add_joymappings_from_strings

function ncine.input.add_joymappings_from_strings(strings: string[])

ncine.input.deadzone_normalize

function ncine.input.deadzone_normalize(joy_vector: ncine.vec2, deadzone_value: number)

ncine.input.get_mouse_cursor_mode

function ncine.input.get_mouse_cursor_mode(joy_id: any)
  -> ncine.mouse_cursor_mode

ncine.input.joy_axis_normvalue

function ncine.input.joy_axis_normvalue(joystick_state: joystickstateObj, axis_id: integer)
  -> number

ncine.input.joy_axis_value

function ncine.input.joy_axis_value(joystick_state: joystickstateObj, axis_id: integer)
  -> integer
function ncine.input.joy_axis_value(joystick_state: joymappedstateObj, axis_name: ncine.joy_axis)
  -> number

ncine.input.joy_button_pressed

function ncine.input.joy_button_pressed(joystick_state: joystickstateObj, button_id: integer)
  -> boolean
function ncine.input.joy_button_pressed(joystick_state: joymappedstateObj, button_name: ncine.joy_button)
  -> boolean

ncine.input.joy_guid

function ncine.input.joy_guid(joy_id: integer)
  -> string

ncine.input.joy_hat_state

function ncine.input.joy_hat_state(joystick_state: joystickstateObj, hat_id: integer)
  -> ncine.joy_hat_state

ncine.input.joy_mapped

function ncine.input.joy_mapped(joy_id: integer)
  -> boolean

ncine.input.joy_name

function ncine.input.joy_name(joy_id: integer)
  -> string

ncine.input.joy_num_axes

function ncine.input.joy_num_axes(joy_id: integer)
  -> integer

ncine.input.joy_num_buttons

function ncine.input.joy_num_buttons(joy_id: integer)
  -> integer

ncine.input.joy_num_hats

function ncine.input.joy_num_hats(joy_id: integer)
  -> integer

ncine.input.joy_present

function ncine.input.joy_present(joy_id: integer)
  -> boolean

ncine.input.joy_state

function ncine.input.joy_state()
  -> joystickstateObj

ncine.input.joymapped_state

function ncine.input.joymapped_state()
  -> joymappedstateObj

ncine.input.key_down

function ncine.input.key_down(key_state: keystateObj, keysym: integer)
  -> boolean

ncine.input.key_state

function ncine.input.key_state()
  -> keystateObj

ncine.input.mouse_state

function ncine.input.mouse_state()
  -> mouse_state

ncine.input.num_joymappings

function ncine.input.num_joymappings(strings: any)
  -> integer

ncine.input.set_mouse_cursor_mode

function ncine.input.set_mouse_cursor_mode(mouse_cursor_mode: ncine.mouse_cursor_mode)

ncine.joy_axis

enum ncine.joy_axis

ncine.joy_button

enum ncine.joy_button

ncine.joy_dead_zone

table

ncine.joy_hat_state

enum ncine.joy_hat_state

ncine.keymod

enum ncine.keymod

ncine.keysym

enum ncine.keysym

ncine.log

debug

function ncine.log.debug(msg: string)

Logs a message with a ncine.log_level.DEBUG level

error

function ncine.log.error(msg: string)

Logs a message with a ncine.log_level.ERROR level

fatal

function ncine.log.fatal(msg: string)

Logs a message with a ncine.log_level.FATAL level

info

function ncine.log.info(msg: string)

Logs a message with a ncine.log_level.INFO level

verbose

function ncine.log.verbose(msg: string)

Logs a message with a ncine.log_level.VERBOSE level

warn

function ncine.log.warn(msg: string)

Logs a message with a ncine.log_level.WARN level


ncine.log

ncine.log

ncine.log.debug

function ncine.log.debug(msg: string)

ncine.log.error

function ncine.log.error(msg: string)

ncine.log.fatal

function ncine.log.fatal(msg: string)

ncine.log.info

function ncine.log.info(msg: string)

ncine.log.verbose

function ncine.log.verbose(msg: string)

ncine.log.warn

function ncine.log.warn(msg: string)

ncine.log_level

enum ncine.log_level

ncine.loop_mode

enum ncine.loop_mode

ncine.mesh_sprite

add_child

function ncine.scenenode.add_child(parent: scenenodeObj, node: scenenodeObj)
  -> boolean

Adds a child node to the specified parent

@returntrue if the node has been added

are_unique_indices

function ncine.mesh_sprite.are_unique_indices(sprite: meshspriteObj)
  -> boolean

Returns true if the indices belong to the sprite and are not stored externally

are_unique_vertices

function ncine.mesh_sprite.are_unique_vertices(sprite: meshspriteObj)
  -> boolean

Returns true if the vertices belong to the sprite and are not stored externally

clone

function ncine.mesh_sprite.clone(sprite: meshspriteObj)
  -> meshspriteObj

Constructs a new mesh sprite object as a clone of the specified one

Don't forget to call delete when you are done with it!

@param sprite — The sprite object to be cloned

@return — The cloned mesh sprite object

copy_indices

function ncine.mesh_sprite.copy_indices(sprite: meshspriteObj, indices: integer[])

Copies the indices data from a table into the sprite (no texture version)

copy_vertices

function ncine.mesh_sprite.copy_vertices(sprite: meshspriteObj, vertices: mesh_sprite_vertex[])

Copies the vertices data from a table into the sprite

create_vertices_from_texels

function ncine.mesh_sprite.create_vertices_from_texels(sprite: meshspriteObj, texels: ncine.vec2[], texture_cut_mode: ncine.texture_cut_mode)

Creates an internal set of vertices from an external table of points in texture space, with optional texture cut mode

delete

function ncine.mesh_sprite.delete(sprite: meshspriteObj)

Destroys a mesh sprite object and releases its memory

@param sprite — The mesh sprite object to be destroyed

emplace_indices

function ncine.mesh_sprite.emplace_indices(sprite: meshspriteObj, indices: integer[])

Emplaces the indices data from an array of integers into the sprite

emplace_vertices

function ncine.mesh_sprite.emplace_vertices(sprite: meshspriteObj, vertices: number[])

Emplaces the vertices data from an array of numbers into the sprite

get_aabb

function ncine.drawable_node.get_aabb(node: drawablenodeObj)
  -> ncine.rect

Returns the axis-aligned bounding box of the node area in the last frame

get_abs_anchor_point

function ncine.scenenode.get_abs_anchor_point(node: scenenodeObj)
  -> ncine.vec2

Returns the absolute transformation anchor point in pixels

get_alpha

function ncine.scenenode.get_alpha(node: scenenodeObj)
  -> number

Returns the node alpha color component

get_anchor_point

function ncine.drawable_node.get_anchor_point(node: drawablenodeObj)
  -> ncine.vec2

Returns the transformation anchor point

get_bytes_per_vertex

function ncine.mesh_sprite.get_bytes_per_vertex(sprite: meshspriteObj)
  -> integer

Returns the number of bytes used by each vertex

get_child

function ncine.scenenode.get_child(node: scenenodeObj, index: integer)
  -> scenenodeObj?

Returns the n-th child

get_child_order_index

function ncine.scenenode.get_child_order_index(node: scenenodeObj)
  -> integer

Returns the order index of this node among its siblings

@return — The order index or zero if the node has no parent

get_children

function ncine.scenenode.get_children(node: scenenodeObj)
  -> scenenodeObj[]

Returns the array of children

get_color

function ncine.scenenode.get_color(node: scenenodeObj)
  -> ncine.color

Returns the node color

get_dest_blending_factor

function ncine.drawable_node.get_dest_blending_factor(node: drawablenodeObj)
  -> ncine.blending_factor

Returns the destination blending factor

get_height

function ncine.drawable_node.get_height(node: drawablenodeObj)
  -> number

Returns the height of the node area

get_indices

function ncine.mesh_sprite.get_indices(sprite: meshspriteObj)
  -> integer[]

Returns the indices used to draw the sprite mesh

get_last_frame_rendered

function ncine.drawable_node.get_last_frame_rendered(node: drawablenodeObj)
  -> integer

Returns the last frame in which any of the viewports have rendered this node (node was not culled)

get_last_frame_updated

function ncine.scenenode.get_last_frame_updated(node: scenenodeObj)
  -> integer

Returns the last frame in which any of the viewports have updated this node

get_layer

function ncine.scenenode.get_layer(node: scenenodeObj)
  -> integer

Returns the node rendering layer

get_parent

function ncine.scenenode.get_parent(node: scenenodeObj)
  -> scenenodeObj?

Returns the parent node, if there is any

get_position

function ncine.scenenode.get_position(node: scenenodeObj)
  -> ncine.vec2

Returns the node position relative to its parent

get_rotation

function ncine.scenenode.get_rotation(node: scenenodeObj)
  -> number

Returns the node rotation in degress

get_scale

function ncine.scenenode.get_scale(node: scenenodeObj)
  -> ncine.vec2

Returns the node scale factors

get_size

function ncine.drawable_node.get_size(node: drawablenodeObj)
  -> ncine.vec2

Returns the size of the node area

get_src_blending_factor

function ncine.drawable_node.get_src_blending_factor(node: drawablenodeObj)
  -> ncine.blending_factor

eturns the source blending factor

get_texrect

function ncine.base_sprite.get_texrect(sprite: basespriteObj)
  -> ncine.rect

Returns the texture source rectangle for blitting

get_texture

function ncine.base_sprite.get_texture(sprite: basespriteObj)
  -> textureObj?

Returns the texture object

get_vertices

function ncine.mesh_sprite.get_vertices(sprite: meshspriteObj)
  -> number[]

Returns the vertices data of the sprite mesh

get_visit_order_index

function ncine.scenenode.get_visit_order_index(node: scenenodeObj)
  -> integer

Returns the visit drawing order of the node

get_visit_order_state

function ncine.scenenode.get_visit_order_state(node: scenenodeObj)
  -> ncine.visit_order_state

Returns the visit order state for the specified node

get_width

function ncine.drawable_node.get_width(node: drawablenodeObj)
  -> number

Returns the width of the node area

is_blending_enabled

function ncine.drawable_node.is_blending_enabled(node: drawablenodeObj)
  -> boolean

Returns true if the node renders with blending enabled

is_enabled

function ncine.scenenode.is_enabled(node: scenenodeObj)
  -> boolean

Returns true if the node is both updating and drawing

is_flipped_x

function ncine.base_sprite.is_flipped_x(sprite: basespriteObj)
  -> boolean

Returns true if the sprite texture is horizontally flipped

is_flipped_y

function ncine.base_sprite.is_flipped_y(sprite: basespriteObj)
  -> boolean

Returns true if the sprite texture is vertically flipped

new

function ncine.mesh_sprite.new(parent?: scenenodeObj, texture?: textureObj, x: number, y: number)
  -> meshspriteObj

Constructs a mesh sprite object with a parent scene node, a texture, and position components

Don't forget to call delete when you are done with it!

@param parent — The parent scenenode

@param texture — The texture object

@param x — The X component of the position

@param y — The Y component of the position

@return — A new mesh sprite object

num_bytes

function ncine.mesh_sprite.num_bytes(sprite: meshspriteObj)
  -> integer

Returns the total number of bytes used by all sprite's vertices

num_children

function ncine.scenenode.num_children(node: scenenodeObj)
  -> integer

Returns the number of children

num_indices

function ncine.mesh_sprite.num_indices(sprite: meshspriteObj)
  -> integer

Returns the number of indices used to draw the sprite mesh

num_vertices

function ncine.mesh_sprite.num_vertices(sprite: meshspriteObj)
  -> integer

Returns the number of vertices of the sprite mesh

remove_all_children

function ncine.scenenode.remove_all_children(parent: scenenodeObj, index: any)
  -> boolean

Removes all children from the specified parent

@returntrue if there were at least one node to remove

remove_child

function ncine.scenenode.remove_child(parent: scenenodeObj, node: scenenodeObj)
  -> boolean

Removes a child node from the specified parent

@returntrue if the node has been removed

remove_child_at

function ncine.scenenode.remove_child_at(parent: scenenodeObj, index: integer)
  -> boolean

Removes a child node at the specified index from the specified parent

@returntrue if the node has been removed

reset_texture

function ncine.base_sprite.reset_texture(sprite: basespriteObj)

Triggers a texture update without setting a new texture

set_abs_anchor_point

function ncine.scenenode.set_abs_anchor_point(node: scenenodeObj, pos: ncine.vec2)

Sets the absolute transformation anchor point in pixels

set_alpha

function ncine.scenenode.set_alpha(node: scenenodeObj, alpha: number)

Sets the node alpha color component

set_anchor_point

function ncine.drawable_node.set_anchor_point(node: drawablenodeObj, anchor_point: ncine.vec2)

Sets the transformation anchor point

set_blending_enabled

function ncine.drawable_node.set_blending_enabled(node: drawablenodeObj, enabled: boolean)

Sets the blending state for node rendering

set_blending_factors

function ncine.drawable_node.set_blending_factors(node: drawablenodeObj, src_factor: ncine.blending_factor, dest_factor: ncine.blending_factor)

Sets a specific source and destination blending factors

set_blending_preset

function ncine.drawable_node.set_blending_preset(node: drawablenodeObj, preset: ncine.blending_preset)

Sets a blending preset for source and destination blending factors

set_color

function ncine.scenenode.set_color(node: scenenodeObj, color: ncine.color)

Sets the node color

set_enabled

function ncine.scenenode.set_enabled(node: scenenodeObj, newValue: boolean)

Enables or disables both node updating and drawing

set_flipped_x

function ncine.base_sprite.set_flipped_x(sprite: basespriteObj, flipped_x: boolean)

Flips the texture rect horizontally

set_flipped_y

function ncine.base_sprite.set_flipped_y(sprite: basespriteObj, flipped_y: boolean)

Flips the texture rect vertically

set_indices

function ncine.mesh_sprite.set_indices(sprite: meshspriteObj, source_sprite: meshspriteObj)

Sets the indices data to the data used by another sprite

set_layer

function ncine.scenenode.set_layer(node: scenenodeObj, layer: integer)

Sets the node rendering layer

The lowest value (bottom) is 0 and the highest one (top) is 65535.
When the value is 0, the final layer value is inherited from the parent.

set_parent

function ncine.scenenode.set_parent(node: scenenodeObj, parent?: scenenodeObj)
  -> boolean

Sets the parent node

@returntrue if the parent has been set

set_position

function ncine.scenenode.set_position(node: scenenodeObj, pos: ncine.vec2)

Sets a new position for the node

set_rotation

function ncine.scenenode.set_rotation(node: scenenodeObj, rot: number)

Sets the node rotation in degrees

@param rot — The amount of degrees

set_scale

function ncine.scenenode.set_scale(node: scenenodeObj, factor: number)

Sets both node scale factors to the specified value

set_scale_x

function ncine.scenenode.set_scale_x(node: scenenodeObj, factor: number)

Sets the node scale X factor

set_scale_y

function ncine.scenenode.set_scale_y(node: scenenodeObj, factor: number)

Sets the node scale Y factor

set_size

function ncine.base_sprite.set_size(sprite: basespriteObj, width: number, height: number)

Sets the sprite size

set_texrect

function ncine.base_sprite.set_texrect(sprite: basespriteObj, rect: ncine.rect)

Sets the texture source rectangle for blitting

set_texture

function ncine.base_sprite.set_texture(sprite: basespriteObj, texture?: textureObj)

Sets the texture object

set_vertices

function ncine.mesh_sprite.set_vertices(sprite: meshspriteObj, source_sprite: meshspriteObj)

Sets the vertices data to the data used by another sprite

set_visit_order_state

function ncine.scenenode.set_visit_order_state(node: scenenodeObj, state: ncine.visit_order_state)

Sets the visit order state for the specified node

swap_children

function ncine.scenenode.swap_children(parent: scenenodeObj, firstIndex: integer, secondIndex: integer)
  -> boolean

Swaps two children at the specified indices

@returntrue if the two nodes have been swapped

swap_node_back

function ncine.scenenode.swap_node_back(node: scenenodeObj)
  -> boolean

Brings this node one node back in the parent's list of children

@returntrue if the node has been brought one position back

swap_node_forward

function ncine.scenenode.swap_node_forward(node: scenenodeObj)
  -> boolean

Brings this node one node forward in the parent's list of children

@returntrue if the node has been brought one position forward

unlink_child

function ncine.scenenode.unlink_child(parent: scenenodeObj, node: scenenodeObj)
  -> boolean

Unlinks a child node from the specified parent

The children of the unlinked node will be reparented with the grandparent node

@returntrue if the node has been unlinked


ncine.mesh_sprite

ncine.mesh_sprite

ncine.mesh_sprite.are_unique_indices

function ncine.mesh_sprite.are_unique_indices(sprite: meshspriteObj)
  -> boolean

ncine.mesh_sprite.are_unique_vertices

function ncine.mesh_sprite.are_unique_vertices(sprite: meshspriteObj)
  -> boolean

ncine.mesh_sprite.clone

function ncine.mesh_sprite.clone(sprite: meshspriteObj)
  -> meshspriteObj

ncine.mesh_sprite.copy_indices

function ncine.mesh_sprite.copy_indices(sprite: meshspriteObj, indices: integer[])

ncine.mesh_sprite.copy_vertices

function ncine.mesh_sprite.copy_vertices(sprite: meshspriteObj, vertices: mesh_sprite_vertex[])
function ncine.mesh_sprite.copy_vertices(sprite: meshspriteObj, vertices: mesh_sprite_vertex_notexture[])

ncine.mesh_sprite.create_vertices_from_texels

function ncine.mesh_sprite.create_vertices_from_texels(sprite: meshspriteObj, texels: ncine.vec2[], texture_cut_mode: ncine.texture_cut_mode)

ncine.mesh_sprite.delete

function ncine.mesh_sprite.delete(sprite: meshspriteObj)

ncine.mesh_sprite.emplace_indices

function ncine.mesh_sprite.emplace_indices(sprite: meshspriteObj, indices: integer[])

ncine.mesh_sprite.emplace_vertices

function ncine.mesh_sprite.emplace_vertices(sprite: meshspriteObj, vertices: number[])

ncine.mesh_sprite.get_bytes_per_vertex

function ncine.mesh_sprite.get_bytes_per_vertex(sprite: meshspriteObj)
  -> integer

ncine.mesh_sprite.get_indices

function ncine.mesh_sprite.get_indices(sprite: meshspriteObj)
  -> integer[]

ncine.mesh_sprite.get_vertices

function ncine.mesh_sprite.get_vertices(sprite: meshspriteObj)
  -> number[]

ncine.mesh_sprite.new

function ncine.mesh_sprite.new(parent?: scenenodeObj, texture?: textureObj, x: number, y: number)
  -> meshspriteObj
function ncine.mesh_sprite.new(parent?: scenenodeObj, texture?: textureObj, pos: ncine.vec2)
  -> meshspriteObj

ncine.mesh_sprite.num_bytes

function ncine.mesh_sprite.num_bytes(sprite: meshspriteObj)
  -> integer

ncine.mesh_sprite.num_indices

function ncine.mesh_sprite.num_indices(sprite: meshspriteObj)
  -> integer

ncine.mesh_sprite.num_vertices

function ncine.mesh_sprite.num_vertices(sprite: meshspriteObj)
  -> integer

ncine.mesh_sprite.set_indices

function ncine.mesh_sprite.set_indices(sprite: meshspriteObj, source_sprite: meshspriteObj)

ncine.mesh_sprite.set_vertices

function ncine.mesh_sprite.set_vertices(sprite: meshspriteObj, source_sprite: meshspriteObj)

ncine.mouse_button

enum ncine.mouse_button

ncine.mouse_cursor_mode

enum ncine.mouse_cursor_mode

ncine.on_acceleration

function ncine.on_acceleration(event: accelerometer_event)

ncine.on_change_scaling_factor

function ncine.on_change_scaling_factor(factor: number)

ncine.on_draw_viewport

function ncine.on_draw_viewport(viewport: viewportObj)

ncine.on_frame_end

function ncine.on_frame_end()

ncine.on_frame_start

function ncine.on_frame_start()

ncine.on_init

function ncine.on_init()

ncine.on_joy_axis_moved

function ncine.on_joy_axis_moved(event: joy_axis_event)

ncine.on_joy_button_pressed

function ncine.on_joy_button_pressed(event: joy_button_event)

ncine.on_joy_button_released

function ncine.on_joy_button_released(event: joy_button_event)

ncine.on_joy_connected

function ncine.on_joy_connected(event: joy_connection_event)

ncine.on_joy_disconnected

function ncine.on_joy_disconnected(event: joy_connection_event)

ncine.on_joy_hat_moved

function ncine.on_joy_hat_moved(event: joy_hat_event)

ncine.on_joymapped_axis_moved

function ncine.on_joymapped_axis_moved(event: joymapped_axis_event)

ncine.on_joymapped_button_pressed

function ncine.on_joymapped_button_pressed(event: joymapped_button_event)

ncine.on_joymapped_button_released

function ncine.on_joymapped_button_released(event: joymapped_button_event)

ncine.on_key_pressed

function ncine.on_key_pressed(event: keyboard_event)

ncine.on_key_released

function ncine.on_key_released(event: keyboard_event)

ncine.on_mouse_button_pressed

function ncine.on_mouse_button_pressed(event: mouse_event)

ncine.on_mouse_button_released

function ncine.on_mouse_button_released(event: mouse_event)

ncine.on_mouse_moved

function ncine.on_mouse_moved(event: mouse_state)

ncine.on_pointer_down

function ncine.on_pointer_down(event: touch_event)

ncine.on_pointer_up

function ncine.on_pointer_up(event: touch_event)

ncine.on_post_update

function ncine.on_post_update()

ncine.on_pre_init

function ncine.on_pre_init(cfg: ncine.app_configuration)

ncine.on_quit_request

function ncine.on_quit_request()
  -> boolean

ncine.on_resize_window

function ncine.on_resize_window(width: integer, height: integer)

ncine.on_resume

function ncine.on_resume()

ncine.on_scroll_input

function ncine.on_scroll_input(event: scroll_event)

ncine.on_shutdown

function ncine.on_shutdown()

ncine.on_suspend

function ncine.on_suspend()

ncine.on_text_input

function ncine.on_text_input(event: text_input_event)

ncine.on_touch_down

function ncine.on_touch_down(event: touch_event)

ncine.on_touch_move

function ncine.on_touch_move(event: touch_event)

ncine.on_touch_up

function ncine.on_touch_up(event: touch_event)

ncine.particle_affector

ncine.particle_affector

ncine.particle_affector

add_color_step

function ncine.particle_affector.add_color_step(affector: affectorObj, age: number, color: ncine.color)

Adds a color step (if the affector type is COLOR)

add_position_step

function ncine.particle_affector.add_position_step(affector: affectorObj, age: number, position: ncine.vec2)

Adds a position step (if the affector type is POSITION)

add_rotation_step

function ncine.particle_affector.add_rotation_step(affector: affectorObj, age: number, angle: number)

Adds a rotation step (if the affector type is ROTATION)

add_size_step

function ncine.particle_affector.add_size_step(affector: affectorObj, age: number, scale: ncine.vec2)

Adds a size step (if the affector type is SIZE)

add_velocity_step

function ncine.particle_affector.add_velocity_step(affector: affectorObj, age: number, velocity: ncine.vec2)

Adds a velocity step (if the affector type is VELOCITY)

clear_steps

function ncine.particle_affector.clear_steps(affector: affectorObj)

Removes all steps

get_base_scale

function ncine.particle_affector.get_base_scale(affector: affectorObj)
  -> (ncine.vec2)?

Returns a base scale factor that will be multiplied by all size steps

The affector type should be SIZE or the function will return nil.

get_color_steps

function ncine.particle_affector.get_color_steps(affector: affectorObj)
  -> affector_color_step[]?

Returns the color steps as a table (or nil if the affector type is not COLOR)

get_position_steps

function ncine.particle_affector.get_position_steps(affector: affectorObj)
  -> affector_position_step[]?

Returns the color steps as a table (or nil if the affector type is not POSITION)

get_rotation_steps

function ncine.particle_affector.get_rotation_steps(affector: affectorObj)
  -> affector_rotation_step[]?

Returns the color steps as a table (or nil if the affector type is not ROTATION)

get_size_steps

function ncine.particle_affector.get_size_steps(affector: affectorObj)
  -> affector_size_step[]?

Returns the color steps as a table (or nil if the affector type is not SIZE)

get_type

function ncine.particle_affector.get_type(affector: affectorObj)
  -> ncine.affector_type

Returns the affector type

get_velocity_steps

function ncine.particle_affector.get_velocity_steps(affector: affectorObj)
  -> affector_velocity_step[]?

Returns the color steps as a table (or nil if the affector type is not VELOCITY)

is_enabled

function ncine.particle_affector.is_enabled(affector: affectorObj)
  -> boolean

Returns true if the affector is enabled

num_steps

function ncine.particle_affector.num_steps(affector: affectorObj)
  -> integer

Returns the number of steps

remove_steps

function ncine.particle_affector.remove_steps(affector: affectorObj, index: integer)

Removes the step at the specified position index

set_base_scale

function ncine.particle_affector.set_base_scale(affector: affectorObj, base_scale: ncine.vec2)

Sets a base scale factor that will be multiplied by all size steps

The affector type should be SIZE or the function will do nothing.

set_enabled

function ncine.particle_affector.set_enabled(affector: affectorObj, enabled: boolean)

Enables or disables the affector


ncine.particle_affector.add_color_step

function ncine.particle_affector.add_color_step(affector: affectorObj, age: number, color: ncine.color)
function ncine.particle_affector.add_color_step(affector: affectorObj, age: number, red: number, green: number, blue: number, alpha: number)

ncine.particle_affector.add_position_step

function ncine.particle_affector.add_position_step(affector: affectorObj, age: number, position: ncine.vec2)
function ncine.particle_affector.add_position_step(affector: affectorObj, age: number, position_x: number, position_y: number)

ncine.particle_affector.add_rotation_step

function ncine.particle_affector.add_rotation_step(affector: affectorObj, age: number, angle: number)

ncine.particle_affector.add_size_step

function ncine.particle_affector.add_size_step(affector: affectorObj, age: number, scale: ncine.vec2)
function ncine.particle_affector.add_size_step(affector: affectorObj, age: number, scale_x: number, scale_y: number)

ncine.particle_affector.add_velocity_step

function ncine.particle_affector.add_velocity_step(affector: affectorObj, age: number, velocity: ncine.vec2)
function ncine.particle_affector.add_velocity_step(affector: affectorObj, age: number, velocity_x: number, velocity_y: number)

ncine.particle_affector.clear_steps

function ncine.particle_affector.clear_steps(affector: affectorObj)

ncine.particle_affector.get_base_scale

function ncine.particle_affector.get_base_scale(affector: affectorObj)
  -> (ncine.vec2)?

ncine.particle_affector.get_color_steps

function ncine.particle_affector.get_color_steps(affector: affectorObj)
  -> affector_color_step[]?

ncine.particle_affector.get_position_steps

function ncine.particle_affector.get_position_steps(affector: affectorObj)
  -> affector_position_step[]?

ncine.particle_affector.get_rotation_steps

function ncine.particle_affector.get_rotation_steps(affector: affectorObj)
  -> affector_rotation_step[]?

ncine.particle_affector.get_size_steps

function ncine.particle_affector.get_size_steps(affector: affectorObj)
  -> affector_size_step[]?

ncine.particle_affector.get_type

function ncine.particle_affector.get_type(affector: affectorObj)
  -> ncine.affector_type

ncine.particle_affector.get_velocity_steps

function ncine.particle_affector.get_velocity_steps(affector: affectorObj)
  -> affector_velocity_step[]?

ncine.particle_affector.is_enabled

function ncine.particle_affector.is_enabled(affector: affectorObj)
  -> boolean

ncine.particle_affector.num_steps

function ncine.particle_affector.num_steps(affector: affectorObj)
  -> integer

ncine.particle_affector.remove_steps

function ncine.particle_affector.remove_steps(affector: affectorObj, index: integer)

ncine.particle_affector.set_base_scale

function ncine.particle_affector.set_base_scale(affector: affectorObj, base_scale: ncine.vec2)

ncine.particle_affector.set_enabled

function ncine.particle_affector.set_enabled(affector: affectorObj, enabled: boolean)

ncine.particle_system

ncine.particle_system

ncine.particle_system

add_child

function ncine.scenenode.add_child(parent: scenenodeObj, node: scenenodeObj)
  -> boolean

Adds a child node to the specified parent

@returntrue if the node has been added

add_color_affector

function ncine.particle_system.add_color_affector(particle_system: particlesystemObj, color_steps: affector_color_step[])

Adds a color particle affector

add_position_affector

function ncine.particle_system.add_position_affector(particle_system: particlesystemObj, position_steps: affector_position_step[])

Adds a position particle affector

add_rotation_affector

function ncine.particle_system.add_rotation_affector(particle_system: particlesystemObj, rotation_steps: affector_rotation_step[])

Adds a rotation particle affector

add_size_affector

function ncine.particle_system.add_size_affector(particle_system: particlesystemObj, base_scale: number, size_steps: affector_size_step[])

Adds a size particle affector

add_velocity_affector

function ncine.particle_system.add_velocity_affector(particle_system: particlesystemObj, velocity_steps: affector_velocity_step[])

Adds a velocity particle affector

clear_affectors

function ncine.particle_system.clear_affectors(particle_system: particlesystemObj)

Deletes all particle affectors

clone

function ncine.particle_system.clone(particle_system: particlesystemObj)
  -> particlesystemObj

Constructs a new particle system object as a clone of the specified one

Don't forget to call delete when you are done with it!

@param particle_system — The particle system object to be cloned

@return — The cloned particle system object

delete

function ncine.particle_system.delete(particle_system: particlesystemObj)

Destroys a particle system object and releases its memory

@param particle_system — The particle system object to be destroyed

emit_particles

function ncine.particle_system.emit_particles(particle_system: particlesystemObj, initializer: particle_initializer)

Emits particles with the specified initialization parameters

get_abs_anchor_point

function ncine.scenenode.get_abs_anchor_point(node: scenenodeObj)
  -> ncine.vec2

Returns the absolute transformation anchor point in pixels

get_affector

function ncine.particle_system.get_affector(particle_system: particlesystemObj, index: integer)
  -> affectorObj?

Returns the affector at the specified index

get_affectors_enabled

function ncine.particle_system.get_affectors_enabled(particle_system: particlesystemObj)
  -> boolean

Returns true if affectors are modifying particles properties

get_alpha

function ncine.scenenode.get_alpha(node: scenenodeObj)
  -> number

Returns the node alpha color component

get_child

function ncine.scenenode.get_child(node: scenenodeObj, index: integer)
  -> scenenodeObj?

Returns the n-th child

get_child_order_index

function ncine.scenenode.get_child_order_index(node: scenenodeObj)
  -> integer

Returns the order index of this node among its siblings

@return — The order index or zero if the node has no parent

get_children

function ncine.scenenode.get_children(node: scenenodeObj)
  -> scenenodeObj[]

Returns the array of children

get_color

function ncine.scenenode.get_color(node: scenenodeObj)
  -> ncine.color

Returns the node color

get_in_local_space

function ncine.particle_system.get_in_local_space(particle_system: particlesystemObj)
  -> boolean

Returns true if particles are positioned using the particle system as their origin

get_last_frame_updated

function ncine.scenenode.get_last_frame_updated(node: scenenodeObj)
  -> integer

Returns the last frame in which any of the viewports have updated this node

get_layer

function ncine.scenenode.get_layer(node: scenenodeObj)
  -> integer

Returns the node rendering layer

get_parent

function ncine.scenenode.get_parent(node: scenenodeObj)
  -> scenenodeObj?

Returns the parent node, if there is any

get_particles_update_enabled

function ncine.particle_system.get_particles_update_enabled(particle_system: particlesystemObj)
  -> boolean

Returns true if particles are updating

get_position

function ncine.scenenode.get_position(node: scenenodeObj)
  -> ncine.vec2

Returns the node position relative to its parent

get_rotation

function ncine.scenenode.get_rotation(node: scenenodeObj)
  -> number

Returns the node rotation in degress

get_scale

function ncine.scenenode.get_scale(node: scenenodeObj)
  -> ncine.vec2

Returns the node scale factors

get_visit_order_index

function ncine.scenenode.get_visit_order_index(node: scenenodeObj)
  -> integer

Returns the visit drawing order of the node

get_visit_order_state

function ncine.scenenode.get_visit_order_state(node: scenenodeObj)
  -> ncine.visit_order_state

Returns the visit order state for the specified node

is_enabled

function ncine.scenenode.is_enabled(node: scenenodeObj)
  -> boolean

Returns true if the node is both updating and drawing

kill_particles

function ncine.particle_system.kill_particles(particle_system: particlesystemObj)

Kills all alive particles

new

function ncine.particle_system.new(parent?: scenenodeObj, count: integer, texture?: textureObj, tex_rect: ncine.rect)
  -> particlesystemObj

Constructs a particle system

Don't forget to call delete when you are done with it!

@param parent — The parent scenenode

@param count — Maximum amount of particles

@return — A new particle system object

num_affectors

function ncine.particle_system.num_affectors(particle_system: particlesystemObj)
  -> integer

Returns the number of affectors

num_alive_particles

function ncine.particle_system.num_alive_particles(particle_system: particlesystemObj)
  -> integer

Returns the number of particles currently alive

num_children

function ncine.scenenode.num_children(node: scenenodeObj)
  -> integer

Returns the number of children

num_particles

function ncine.particle_system.num_particles(particle_system: particlesystemObj)
  -> integer

Returns the total number of particles in the system

remove_affector

function ncine.particle_system.remove_affector(particle_system: particlesystemObj, index: integer)

Removes the affector at the specified index

remove_all_children

function ncine.scenenode.remove_all_children(parent: scenenodeObj, index: any)
  -> boolean

Removes all children from the specified parent

@returntrue if there were at least one node to remove

remove_child

function ncine.scenenode.remove_child(parent: scenenodeObj, node: scenenodeObj)
  -> boolean

Removes a child node from the specified parent

@returntrue if the node has been removed

remove_child_at

function ncine.scenenode.remove_child_at(parent: scenenodeObj, index: integer)
  -> boolean

Removes a child node at the specified index from the specified parent

@returntrue if the node has been removed

set_abs_anchor_point

function ncine.scenenode.set_abs_anchor_point(node: scenenodeObj, pos: ncine.vec2)

Sets the absolute transformation anchor point in pixels

set_affectors_enabled

function ncine.particle_system.set_affectors_enabled(particle_system: particlesystemObj, enabled: boolean)

Enables or disables affectors modifying particles properties

set_alpha

function ncine.scenenode.set_alpha(node: scenenodeObj, alpha: number)

Sets the node alpha color component

set_anchor_point

function ncine.particle_system.set_anchor_point(particle_system: particlesystemObj, point: ncine.vec2)

Sets the transformation anchor point for every particle in the system with a ncine.vec2

set_blending_factors

function ncine.particle_system.set_blending_factors(particle_system: particlesystemObj, src_factor: ncine.blending_factor, dest_factor: ncine.blending_factor)

Sets the source and destination blending factors for every particle in the system

set_blending_preset

function ncine.particle_system.set_blending_preset(particle_system: particlesystemObj, blending_preset: ncine.blending_preset)

Sets the blending factors preset for every particle in the system

set_color

function ncine.scenenode.set_color(node: scenenodeObj, color: ncine.color)

Sets the node color

set_enabled

function ncine.scenenode.set_enabled(node: scenenodeObj, newValue: boolean)

Enables or disables both node updating and drawing

set_flipped_x

function ncine.particle_system.set_flipped_x(particle_system: particlesystemObj, flipped_x: boolean)

Flips the texture rect horizontally for every particle in the system

set_flipped_y

function ncine.particle_system.set_flipped_y(particle_system: particlesystemObj, flipped_y: boolean)

Flips the texture rect vertically for every particle in the system

set_in_local_space

function ncine.particle_system.set_in_local_space(particle_system: particlesystemObj, local_space: boolean)

Sets or clears the local space flag, to move particles around the particle system or freely

set_layer

function ncine.particle_system.set_layer(particle_system: particlesystemObj, layer: integer)

Sets the rendering layer for every particle in the system

set_parent

function ncine.scenenode.set_parent(node: scenenodeObj, parent?: scenenodeObj)
  -> boolean

Sets the parent node

@returntrue if the parent has been set

set_particles_update_enabled

function ncine.particle_system.set_particles_update_enabled(particle_system: particlesystemObj, enabled: boolean)

Enables or disables particles updating

set_position

function ncine.scenenode.set_position(node: scenenodeObj, pos: ncine.vec2)

Sets a new position for the node

set_rotation

function ncine.scenenode.set_rotation(node: scenenodeObj, rot: number)

Sets the node rotation in degrees

@param rot — The amount of degrees

set_scale

function ncine.scenenode.set_scale(node: scenenodeObj, factor: number)

Sets both node scale factors to the specified value

set_scale_x

function ncine.scenenode.set_scale_x(node: scenenodeObj, factor: number)

Sets the node scale X factor

set_scale_y

function ncine.scenenode.set_scale_y(node: scenenodeObj, factor: number)

Sets the node scale Y factor

set_texture

function ncine.particle_system.set_texture(particle_system: particlesystemObj, texture: textureObj)

Sets the texture object for every particle in the system

set_texture_rect

function ncine.particle_system.set_texture_rect(particle_system: particlesystemObj, tex_rect: ncine.rect)

Sets the texture source rectangle for every particle in the system

set_visit_order_state

function ncine.scenenode.set_visit_order_state(node: scenenodeObj, state: ncine.visit_order_state)

Sets the visit order state for the specified node

swap_children

function ncine.scenenode.swap_children(parent: scenenodeObj, firstIndex: integer, secondIndex: integer)
  -> boolean

Swaps two children at the specified indices

@returntrue if the two nodes have been swapped

swap_node_back

function ncine.scenenode.swap_node_back(node: scenenodeObj)
  -> boolean

Brings this node one node back in the parent's list of children

@returntrue if the node has been brought one position back

swap_node_forward

function ncine.scenenode.swap_node_forward(node: scenenodeObj)
  -> boolean

Brings this node one node forward in the parent's list of children

@returntrue if the node has been brought one position forward

unlink_child

function ncine.scenenode.unlink_child(parent: scenenodeObj, node: scenenodeObj)
  -> boolean

Unlinks a child node from the specified parent

The children of the unlinked node will be reparented with the grandparent node

@returntrue if the node has been unlinked


ncine.particle_system.add_color_affector

function ncine.particle_system.add_color_affector(particle_system: particlesystemObj, color_steps: affector_color_step[])

ncine.particle_system.add_position_affector

function ncine.particle_system.add_position_affector(particle_system: particlesystemObj, position_steps: affector_position_step[])

ncine.particle_system.add_rotation_affector

function ncine.particle_system.add_rotation_affector(particle_system: particlesystemObj, rotation_steps: affector_rotation_step[])

ncine.particle_system.add_size_affector

function ncine.particle_system.add_size_affector(particle_system: particlesystemObj, base_scale: number, size_steps: affector_size_step[])

ncine.particle_system.add_velocity_affector

function ncine.particle_system.add_velocity_affector(particle_system: particlesystemObj, velocity_steps: affector_velocity_step[])

ncine.particle_system.clear_affectors

function ncine.particle_system.clear_affectors(particle_system: particlesystemObj)

ncine.particle_system.clone

function ncine.particle_system.clone(particle_system: particlesystemObj)
  -> particlesystemObj

ncine.particle_system.delete

function ncine.particle_system.delete(particle_system: particlesystemObj)

ncine.particle_system.emit_particles

function ncine.particle_system.emit_particles(particle_system: particlesystemObj, initializer: particle_initializer)

ncine.particle_system.get_affector

function ncine.particle_system.get_affector(particle_system: particlesystemObj, index: integer)
  -> affectorObj?

ncine.particle_system.get_affectors_enabled

function ncine.particle_system.get_affectors_enabled(particle_system: particlesystemObj)
  -> boolean

ncine.particle_system.get_in_local_space

function ncine.particle_system.get_in_local_space(particle_system: particlesystemObj)
  -> boolean

ncine.particle_system.get_particles_update_enabled

function ncine.particle_system.get_particles_update_enabled(particle_system: particlesystemObj)
  -> boolean

ncine.particle_system.kill_particles

function ncine.particle_system.kill_particles(particle_system: particlesystemObj)

ncine.particle_system.new

function ncine.particle_system.new(parent?: scenenodeObj, count: integer, texture?: textureObj, tex_rect: ncine.rect)
  -> particlesystemObj

ncine.particle_system.num_affectors

function ncine.particle_system.num_affectors(particle_system: particlesystemObj)
  -> integer

ncine.particle_system.num_alive_particles

function ncine.particle_system.num_alive_particles(particle_system: particlesystemObj)
  -> integer

ncine.particle_system.num_particles

function ncine.particle_system.num_particles(particle_system: particlesystemObj)
  -> integer

ncine.particle_system.remove_affector

function ncine.particle_system.remove_affector(particle_system: particlesystemObj, index: integer)

ncine.particle_system.set_affectors_enabled

function ncine.particle_system.set_affectors_enabled(particle_system: particlesystemObj, enabled: boolean)

ncine.particle_system.set_anchor_point

function ncine.particle_system.set_anchor_point(particle_system: particlesystemObj, point: ncine.vec2)
function ncine.particle_system.set_anchor_point(particle_system: particlesystemObj, point_x: number, point_y: number)

ncine.particle_system.set_blending_factors

function ncine.particle_system.set_blending_factors(particle_system: particlesystemObj, src_factor: ncine.blending_factor, dest_factor: ncine.blending_factor)

ncine.particle_system.set_blending_preset

function ncine.particle_system.set_blending_preset(particle_system: particlesystemObj, blending_preset: ncine.blending_preset)

ncine.particle_system.set_flipped_x

function ncine.particle_system.set_flipped_x(particle_system: particlesystemObj, flipped_x: boolean)

ncine.particle_system.set_flipped_y

function ncine.particle_system.set_flipped_y(particle_system: particlesystemObj, flipped_y: boolean)

ncine.particle_system.set_in_local_space

function ncine.particle_system.set_in_local_space(particle_system: particlesystemObj, local_space: boolean)

ncine.particle_system.set_layer

function ncine.particle_system.set_layer(particle_system: particlesystemObj, layer: integer)

ncine.particle_system.set_particles_update_enabled

function ncine.particle_system.set_particles_update_enabled(particle_system: particlesystemObj, enabled: boolean)

ncine.particle_system.set_texture

function ncine.particle_system.set_texture(particle_system: particlesystemObj, texture: textureObj)

ncine.particle_system.set_texture_rect

function ncine.particle_system.set_texture_rect(particle_system: particlesystemObj, tex_rect: ncine.rect)

ncine.permission

enum ncine.permission

ncine.rect

create

function ncine.rect.create(x: number, y: number, w: number, h: number)
  -> ncine.rect

Creates a rect table from top-left point and size

@param x — The top-left X coordinate (left with positive width)

@param y — The top-left Y coordinate (top with positive height)

@param w — The width

@param h — The height

create_center_size

function ncine.rect.create_center_size(x: number, y: number, w: number, h: number)
  -> ncine.rect

Creates a vec2 table from center and size

@param x — The center X coordinate

@param y — The center Y coordinate

@param w — The width

@param h — The height

create_min_max

function ncine.rect.create_min_max(min_x: number, min_y: number, max_x: number, max_y: number)
  -> ncine.rect

Creates a vec2 table from its components

@param min_x — The minimum X coordinate

@param min_y — The minimum Y coordinate

@param max_x — The maximum X coordinate

@param max_y — The maximum Y coordinate

h

number

The height

set_min_max

function ncine.rect.set_min_max(min_x: number, min_y: number, max_x: number, max_y: number)
  -> ncine.rect

Sets rectangle minimum and maximum coordinates

w

number

The width

x

number

The top-left X coordinate (left with positive width)

y

number

The top-left Y coordinate (top with positive height)


ncine.rect

ncine.rect

ncine.rect.create

function ncine.rect.create(x: number, y: number, w: number, h: number)
  -> ncine.rect

ncine.rect.create_center_size

function ncine.rect.create_center_size(x: number, y: number, w: number, h: number)
  -> ncine.rect

ncine.rect.create_min_max

function ncine.rect.create_min_max(min_x: number, min_y: number, max_x: number, max_y: number)
  -> ncine.rect

ncine.rect.set_min_max

function ncine.rect.set_min_max(min_x: number, min_y: number, max_x: number, max_y: number)
  -> ncine.rect

ncine.rect_animation

ncine.rect_animation

ncine.rect_animation

frame_duration

number

Frame duration in seconds

loop

ncine.loop_mode

Loop state

num_rectangles_to_skip

integer?

Optional field, default is 0

padding

(ncine.vec2)?

Optional field, default is { x = 0, y = 0 }

rect_size

ncine.vec2

A two component vector

rewind

ncine.rewind_mode

Rewind modes

source_rect

ncine.rect

A rectangle in 2D


ncine.rewind_mode

enum ncine.rewind_mode

ncine.scenenode

ncine.scenenode

ncine.scenenode

add_child

function ncine.scenenode.add_child(parent: scenenodeObj, node: scenenodeObj)
  -> boolean

Adds a child node to the specified parent

@returntrue if the node has been added

get_abs_anchor_point

function ncine.scenenode.get_abs_anchor_point(node: scenenodeObj)
  -> ncine.vec2

Returns the absolute transformation anchor point in pixels

get_alpha

function ncine.scenenode.get_alpha(node: scenenodeObj)
  -> number

Returns the node alpha color component

get_child

function ncine.scenenode.get_child(node: scenenodeObj, index: integer)
  -> scenenodeObj?

Returns the n-th child

get_child_order_index

function ncine.scenenode.get_child_order_index(node: scenenodeObj)
  -> integer

Returns the order index of this node among its siblings

@return — The order index or zero if the node has no parent

get_children

function ncine.scenenode.get_children(node: scenenodeObj)
  -> scenenodeObj[]

Returns the array of children

get_color

function ncine.scenenode.get_color(node: scenenodeObj)
  -> ncine.color

Returns the node color

get_last_frame_updated

function ncine.scenenode.get_last_frame_updated(node: scenenodeObj)
  -> integer

Returns the last frame in which any of the viewports have updated this node

get_layer

function ncine.scenenode.get_layer(node: scenenodeObj)
  -> integer

Returns the node rendering layer

get_parent

function ncine.scenenode.get_parent(node: scenenodeObj)
  -> scenenodeObj?

Returns the parent node, if there is any

get_position

function ncine.scenenode.get_position(node: scenenodeObj)
  -> ncine.vec2

Returns the node position relative to its parent

get_rotation

function ncine.scenenode.get_rotation(node: scenenodeObj)
  -> number

Returns the node rotation in degress

get_scale

function ncine.scenenode.get_scale(node: scenenodeObj)
  -> ncine.vec2

Returns the node scale factors

get_visit_order_index

function ncine.scenenode.get_visit_order_index(node: scenenodeObj)
  -> integer

Returns the visit drawing order of the node

get_visit_order_state

function ncine.scenenode.get_visit_order_state(node: scenenodeObj)
  -> ncine.visit_order_state

Returns the visit order state for the specified node

is_enabled

function ncine.scenenode.is_enabled(node: scenenodeObj)
  -> boolean

Returns true if the node is both updating and drawing

num_children

function ncine.scenenode.num_children(node: scenenodeObj)
  -> integer

Returns the number of children

remove_all_children

function ncine.scenenode.remove_all_children(parent: scenenodeObj, index: any)
  -> boolean

Removes all children from the specified parent

@returntrue if there were at least one node to remove

remove_child

function ncine.scenenode.remove_child(parent: scenenodeObj, node: scenenodeObj)
  -> boolean

Removes a child node from the specified parent

@returntrue if the node has been removed

remove_child_at

function ncine.scenenode.remove_child_at(parent: scenenodeObj, index: integer)
  -> boolean

Removes a child node at the specified index from the specified parent

@returntrue if the node has been removed

set_abs_anchor_point

function ncine.scenenode.set_abs_anchor_point(node: scenenodeObj, pos: ncine.vec2)

Sets the absolute transformation anchor point in pixels

set_alpha

function ncine.scenenode.set_alpha(node: scenenodeObj, alpha: number)

Sets the node alpha color component

set_color

function ncine.scenenode.set_color(node: scenenodeObj, color: ncine.color)

Sets the node color

set_enabled

function ncine.scenenode.set_enabled(node: scenenodeObj, newValue: boolean)

Enables or disables both node updating and drawing

set_layer

function ncine.scenenode.set_layer(node: scenenodeObj, layer: integer)

Sets the node rendering layer

The lowest value (bottom) is 0 and the highest one (top) is 65535.
When the value is 0, the final layer value is inherited from the parent.

set_parent

function ncine.scenenode.set_parent(node: scenenodeObj, parent?: scenenodeObj)
  -> boolean

Sets the parent node

@returntrue if the parent has been set

set_position

function ncine.scenenode.set_position(node: scenenodeObj, pos: ncine.vec2)

Sets a new position for the node

set_rotation

function ncine.scenenode.set_rotation(node: scenenodeObj, rot: number)

Sets the node rotation in degrees

@param rot — The amount of degrees

set_scale

function ncine.scenenode.set_scale(node: scenenodeObj, factor: number)

Sets both node scale factors to the specified value

set_scale_x

function ncine.scenenode.set_scale_x(node: scenenodeObj, factor: number)

Sets the node scale X factor

set_scale_y

function ncine.scenenode.set_scale_y(node: scenenodeObj, factor: number)

Sets the node scale Y factor

set_visit_order_state

function ncine.scenenode.set_visit_order_state(node: scenenodeObj, state: ncine.visit_order_state)

Sets the visit order state for the specified node

swap_children

function ncine.scenenode.swap_children(parent: scenenodeObj, firstIndex: integer, secondIndex: integer)
  -> boolean

Swaps two children at the specified indices

@returntrue if the two nodes have been swapped

swap_node_back

function ncine.scenenode.swap_node_back(node: scenenodeObj)
  -> boolean

Brings this node one node back in the parent's list of children

@returntrue if the node has been brought one position back

swap_node_forward

function ncine.scenenode.swap_node_forward(node: scenenodeObj)
  -> boolean

Brings this node one node forward in the parent's list of children

@returntrue if the node has been brought one position forward

unlink_child

function ncine.scenenode.unlink_child(parent: scenenodeObj, node: scenenodeObj)
  -> boolean

Unlinks a child node from the specified parent

The children of the unlinked node will be reparented with the grandparent node

@returntrue if the node has been unlinked


ncine.scenenode.add_child

function ncine.scenenode.add_child(parent: scenenodeObj, node: scenenodeObj)
  -> boolean

ncine.scenenode.get_abs_anchor_point

function ncine.scenenode.get_abs_anchor_point(node: scenenodeObj)
  -> ncine.vec2

ncine.scenenode.get_alpha

function ncine.scenenode.get_alpha(node: scenenodeObj)
  -> number

ncine.scenenode.get_child

function ncine.scenenode.get_child(node: scenenodeObj, index: integer)
  -> scenenodeObj?

ncine.scenenode.get_child_order_index

function ncine.scenenode.get_child_order_index(node: scenenodeObj)
  -> integer

ncine.scenenode.get_children

function ncine.scenenode.get_children(node: scenenodeObj)
  -> scenenodeObj[]

ncine.scenenode.get_color

function ncine.scenenode.get_color(node: scenenodeObj)
  -> ncine.color

ncine.scenenode.get_last_frame_updated

function ncine.scenenode.get_last_frame_updated(node: scenenodeObj)
  -> integer

ncine.scenenode.get_layer

function ncine.scenenode.get_layer(node: scenenodeObj)
  -> integer

ncine.scenenode.get_parent

function ncine.scenenode.get_parent(node: scenenodeObj)
  -> scenenodeObj?

ncine.scenenode.get_position

function ncine.scenenode.get_position(node: scenenodeObj)
  -> ncine.vec2

ncine.scenenode.get_rotation

function ncine.scenenode.get_rotation(node: scenenodeObj)
  -> number

ncine.scenenode.get_scale

function ncine.scenenode.get_scale(node: scenenodeObj)
  -> ncine.vec2

ncine.scenenode.get_visit_order_index

function ncine.scenenode.get_visit_order_index(node: scenenodeObj)
  -> integer

ncine.scenenode.get_visit_order_state

function ncine.scenenode.get_visit_order_state(node: scenenodeObj)
  -> ncine.visit_order_state

ncine.scenenode.is_enabled

function ncine.scenenode.is_enabled(node: scenenodeObj)
  -> boolean

ncine.scenenode.num_children

function ncine.scenenode.num_children(node: scenenodeObj)
  -> integer

ncine.scenenode.remove_all_children

function ncine.scenenode.remove_all_children(parent: scenenodeObj, index: any)
  -> boolean

ncine.scenenode.remove_child

function ncine.scenenode.remove_child(parent: scenenodeObj, node: scenenodeObj)
  -> boolean

ncine.scenenode.remove_child_at

function ncine.scenenode.remove_child_at(parent: scenenodeObj, index: integer)
  -> boolean

ncine.scenenode.set_abs_anchor_point

function ncine.scenenode.set_abs_anchor_point(node: scenenodeObj, pos: ncine.vec2)
function ncine.scenenode.set_abs_anchor_point(node: scenenodeObj, x: number, y: number)

ncine.scenenode.set_alpha

function ncine.scenenode.set_alpha(node: scenenodeObj, alpha: number)

ncine.scenenode.set_color

function ncine.scenenode.set_color(node: scenenodeObj, color: ncine.color)
function ncine.scenenode.set_color(node: scenenodeObj, red: number, green: number, blue: number, alpha: number)

ncine.scenenode.set_enabled

function ncine.scenenode.set_enabled(node: scenenodeObj, newValue: boolean)

ncine.scenenode.set_layer

function ncine.scenenode.set_layer(node: scenenodeObj, layer: integer)

ncine.scenenode.set_parent

function ncine.scenenode.set_parent(node: scenenodeObj, parent?: scenenodeObj)
  -> boolean

ncine.scenenode.set_position

function ncine.scenenode.set_position(node: scenenodeObj, pos: ncine.vec2)
function ncine.scenenode.set_position(node: scenenodeObj, x: number, y: number)

ncine.scenenode.set_rotation

function ncine.scenenode.set_rotation(node: scenenodeObj, rot: number)

ncine.scenenode.set_scale

function ncine.scenenode.set_scale(node: scenenodeObj, factor: number)

ncine.scenenode.set_scale_x

function ncine.scenenode.set_scale_x(node: scenenodeObj, factor: number)

ncine.scenenode.set_scale_y

function ncine.scenenode.set_scale_y(node: scenenodeObj, factor: number)

ncine.scenenode.set_visit_order_state

function ncine.scenenode.set_visit_order_state(node: scenenodeObj, state: ncine.visit_order_state)

ncine.scenenode.swap_children

function ncine.scenenode.swap_children(parent: scenenodeObj, firstIndex: integer, secondIndex: integer)
  -> boolean

ncine.scenenode.swap_node_back

function ncine.scenenode.swap_node_back(node: scenenodeObj)
  -> boolean

ncine.scenenode.swap_node_forward

function ncine.scenenode.swap_node_forward(node: scenenodeObj)
  -> boolean

ncine.scenenode.unlink_child

function ncine.scenenode.unlink_child(parent: scenenodeObj, node: scenenodeObj)
  -> boolean

ncine.shader

ncine.shader

ncine.shader

delete

function ncine.shader.delete(shader: shaderObj)

Destroys a shader object and releases its memory

@param shader — The shader object to be destroyed

get_log_on_errors

function ncine.shader.get_log_on_errors(shader: shaderObj)
  -> boolean

Returns the automatic log on errors flag

is_binary_cache_enabled

function ncine.shader.is_binary_cache_enabled()
  -> boolean

Returns true if the binary shader cache is enabled

is_linked

function ncine.shader.is_linked(shader: shaderObj)
  -> boolean

Returns true if the shader is linked and can therefore be used

load_from_file

function ncine.shader.load_from_file(shader: shaderObj, name: string, introspection: ncine.shader_introspection, vertex: string, fragment: string)
  -> boolean

Compiles a shader program after loading shader sources from files

@param name — The name of the shader

@param vertex — The vertex shader source filename

@param fragment — The fragment shader source filename

@return — True if the shader program has been successfully linked

load_from_file_default_fragment

function ncine.shader.load_from_file_default_fragment(shader: shaderObj, name: string, introspection: ncine.shader_introspection, vertex: string, fragment: ncine.shader_default_fragment)
  -> boolean

Compiles a shader program after loading the vertex shader source from a file

The fragment shader is a default one, in this case.

@param name — The name of the shader

@param vertex — The vertex shader source filename

@param fragment — The default fragment shader

@return — True if the shader program has been successfully linked

load_from_file_default_vertex

function ncine.shader.load_from_file_default_vertex(shader: shaderObj, name: string, introspection: ncine.shader_introspection, vertex: ncine.shader_default_vertex, fragment: string)
  -> boolean

Compiles a shader program after loading the fragment shader source from a file

The vertex shader is a default one, in this case.

@param name — The name of the shader

@param vertex — The default vertex shader

@param fragment — The fragment shader source filename

@return — True if the shader program has been successfully linked

load_from_memory

function ncine.shader.load_from_memory(shader: shaderObj, name: string, introspection: ncine.shader_introspection, vertex: string, fragment: string)
  -> boolean

Compiles a shader program after loading shader sources from strings

@param name — The name of the shader

@param vertex — The vertex shader GLSL source code

@param fragment — The fragment shader GLSL source code

@return — True if the shader program has been successfully linked

load_from_memory_default_fragment

function ncine.shader.load_from_memory_default_fragment(shader: shaderObj, name: string, introspection: ncine.shader_introspection, vertex: string, fragment: ncine.shader_default_fragment)
  -> boolean

Compiles a shader program after loading the vertex shader source from a string

The fragment shader is a default one, in this case.

@param name — The name of the shader

@param vertex — The vertex shader GLSL source code

@param fragment — The default fragment shader

@return — True if the shader program has been successfully linked

load_from_memory_default_vertex

function ncine.shader.load_from_memory_default_vertex(shader: shaderObj, name: string, introspection: ncine.shader_introspection, vertex: ncine.shader_default_vertex, fragment: string)
  -> boolean

Compiles a shader program after loading the fragment shader source from a string

The vertex shader is a default one, in this case.

@param name — The name of the shader

@param vertex — The default vertex shader

@param fragment — The fragment shader GLSL source code

@return — True if the shader program has been successfully linked

load_from_memory_with_hashes

function ncine.shader.load_from_memory_with_hashes(shader: shaderObj, name: string, introspection: ncine.shader_introspection, vertex: string, fragment: string, vertex_hash: integer, fragment_hash: integer)
  -> boolean

Compiles a shader program after loading shader sources from strings

In this case custom hashes can be passed to the function.

@param name — The name of the shader

@param vertex — The vertex shader GLSL source code

@param fragment — The fragment shader GLSL source code

@return — True if the shader program has been successfully linked

new

function ncine.shader.new()
  -> shaderObj

Constructs a shader object

Don't forget to call delete when you are done with it!

@return — A new shader object

register_batched_shader

function ncine.shader.register_batched_shader(shader: shaderObj, batched_shader: shaderObj)

Registers a shader to be used for batches of render commands

retrieve_infolog

function ncine.shader.retrieve_infolog(shader: shaderObj)
  -> string

Retrieves the information log

retrieve_infolog_length

function ncine.shader.retrieve_infolog_length(shader: shaderObj)
  -> integer

Returns the length of the information log including the null termination character

set_attribute

function ncine.shader.set_attribute(shader: shaderObj, attribute: string, stride: integer, pointer: integer)
  -> boolean

Sets the VBO stride and pointer for the specified vertex attribute

@param attribute — The name of the vertex attribute

@return — True if the vertex attribute was found

set_binary_cache_enabled

function ncine.shader.set_binary_cache_enabled(enable: boolean)

Enables or disables the binary shader cache

set_glshaderprogram_label

function ncine.shader.set_glshaderprogram_label(shader: shaderObj, label: string)

Sets the OpenGL object label for the shader program

set_log_on_errors

function ncine.shader.set_log_on_errors(shader: shaderObj, should_log: boolean)

Sets the automatic log on errors flag

If the flag is set to true, the shader will automatically log compilation and linking errors.


ncine.shader.delete

function ncine.shader.delete(shader: shaderObj)

ncine.shader.get_log_on_errors

function ncine.shader.get_log_on_errors(shader: shaderObj)
  -> boolean

ncine.shader.is_binary_cache_enabled

function ncine.shader.is_binary_cache_enabled()
  -> boolean

ncine.shader.is_linked

function ncine.shader.is_linked(shader: shaderObj)
  -> boolean

ncine.shader.load_from_file

function ncine.shader.load_from_file(shader: shaderObj, name: string, introspection: ncine.shader_introspection, vertex: string, fragment: string)
  -> boolean

ncine.shader.load_from_file_default_fragment

function ncine.shader.load_from_file_default_fragment(shader: shaderObj, name: string, introspection: ncine.shader_introspection, vertex: string, fragment: ncine.shader_default_fragment)
  -> boolean

ncine.shader.load_from_file_default_vertex

function ncine.shader.load_from_file_default_vertex(shader: shaderObj, name: string, introspection: ncine.shader_introspection, vertex: ncine.shader_default_vertex, fragment: string)
  -> boolean

ncine.shader.load_from_memory

function ncine.shader.load_from_memory(shader: shaderObj, name: string, introspection: ncine.shader_introspection, vertex: string, fragment: string)
  -> boolean

ncine.shader.load_from_memory_default_fragment

function ncine.shader.load_from_memory_default_fragment(shader: shaderObj, name: string, introspection: ncine.shader_introspection, vertex: string, fragment: ncine.shader_default_fragment)
  -> boolean

ncine.shader.load_from_memory_default_vertex

function ncine.shader.load_from_memory_default_vertex(shader: shaderObj, name: string, introspection: ncine.shader_introspection, vertex: ncine.shader_default_vertex, fragment: string)
  -> boolean

ncine.shader.load_from_memory_with_hashes

function ncine.shader.load_from_memory_with_hashes(shader: shaderObj, name: string, introspection: ncine.shader_introspection, vertex: string, fragment: string, vertex_hash: integer, fragment_hash: integer)
  -> boolean

ncine.shader.new

function ncine.shader.new()
  -> shaderObj

ncine.shader.register_batched_shader

function ncine.shader.register_batched_shader(shader: shaderObj, batched_shader: shaderObj)

ncine.shader.retrieve_infolog

function ncine.shader.retrieve_infolog(shader: shaderObj)
  -> string

ncine.shader.retrieve_infolog_length

function ncine.shader.retrieve_infolog_length(shader: shaderObj)
  -> integer

ncine.shader.set_attribute

function ncine.shader.set_attribute(shader: shaderObj, attribute: string, stride: integer, pointer: integer)
  -> boolean

ncine.shader.set_binary_cache_enabled

function ncine.shader.set_binary_cache_enabled(enable: boolean)

ncine.shader.set_glshaderprogram_label

function ncine.shader.set_glshaderprogram_label(shader: shaderObj, label: string)

ncine.shader.set_log_on_errors

function ncine.shader.set_log_on_errors(shader: shaderObj, should_log: boolean)

ncine.shader_default_fragment

enum ncine.shader_default_fragment

ncine.shader_default_vertex

enum ncine.shader_default_vertex

ncine.shader_introspection

enum ncine.shader_introspection

ncine.shaderstate

ncine.shaderstate

ncine.shaderstate

delete

function ncine.shaderstate.delete(shaderstate: shaderstateObj)

Destroys a shaderstate object and releases its memory

@param shaderstate — The shaderstate object to be destroyed

get_node

function ncine.shaderstate.get_node(shaderstate: shaderstateObj)
  -> drawablenodeObj?

Returns the drawable node affected by the shader state

get_shader

function ncine.shaderstate.get_shader(shaderstate: shaderstateObj)
  -> shaderObj?

Return the associated custom shader

new

function ncine.shaderstate.new(node: drawablenodeObj, shader: shaderObj)
  -> shaderstateObj

Constructs a shaderstate object and assigns to it a node and a shader

Don't forget to call delete when you are done with it!

@return — A new shader object

reset_shader

function ncine.shaderstate.reset_shader(shaderstate: shaderstateObj)

Triggers a shader update without setting a new shader

set_node

function ncine.shaderstate.set_node(shaderstate: shaderstateObj, node?: drawablenodeObj)

Sets the drawable node affected by the shader state

set_shader

function ncine.shaderstate.set_shader(shaderstate: shaderstateObj, shader?: shaderObj)
  -> boolean

Sets the associated custom shader

@return — True if the shader has been changed

set_texture

function ncine.shaderstate.set_texture(shaderstate: shaderstateObj, unit: integer, texture?: textureObj)
  -> boolean

Assigns a texture to the specified texture unit

@return — True if the texture has been assigned

set_uniform_float_color

function ncine.shaderstate.set_uniform_float_color(shaderstate: shaderstateObj, block_name: string, name: string, color: ncine.color)
  -> boolean

Sets a float uniform with a ncine.color

@param block_name — It can be an empty string

@param name — Uniform name

@return — True if the uniform has been found and updated

set_uniform_float_value1

function ncine.shaderstate.set_uniform_float_value1(shaderstate: shaderstateObj, block_name: string, name: string, value0: number)
  -> boolean

Sets a float uniform with one value

@param block_name — It can be an empty string

@param name — Uniform name

@return — True if the uniform has been found and updated

set_uniform_float_value2

function ncine.shaderstate.set_uniform_float_value2(shaderstate: shaderstateObj, block_name: string, name: string, value0: number, value1: number)
  -> boolean

Sets a float uniform with two values

@param block_name — It can be an empty string

@param name — Uniform name

@return — True if the uniform has been found and updated

set_uniform_float_value3

function ncine.shaderstate.set_uniform_float_value3(shaderstate: shaderstateObj, block_name: string, name: string, value0: number, value1: number, value2: number)
  -> boolean

Sets a float uniform with three values

@param block_name — It can be an empty string

@param name — Uniform name

@return — True if the uniform has been found and updated

set_uniform_float_value4

function ncine.shaderstate.set_uniform_float_value4(shaderstate: shaderstateObj, block_name: string, name: string, value0: number, value1: number, value2: number, value3: number)
  -> boolean

Sets a float uniform with four values

@param block_name — It can be an empty string

@param name — Uniform name

@return — True if the uniform has been found and updated

set_uniform_float_vector

function ncine.shaderstate.set_uniform_float_vector(shaderstate: shaderstateObj, block_name: string, name: string, vector: number[])
  -> boolean

Sets a float uniform with an array of values

@param block_name — It can be an empty string

@param name — Uniform name

@param vector — An array of 1 to 4 float elements

@return — True if the uniform has been found and updated

set_uniform_float_vector2

function ncine.shaderstate.set_uniform_float_vector2(shaderstate: shaderstateObj, block_name: string, name: string, vector: ncine.vec2)
  -> boolean

Sets a float uniform with a ncine.vec2

@param block_name — It can be an empty string

@param name — Uniform name

@return — True if the uniform has been found and updated

set_uniform_float_vector3

function ncine.shaderstate.set_uniform_float_vector3(shaderstate: shaderstateObj, block_name: string, name: string, vector: ncine.vec3)
  -> boolean

Sets a float uniform with a ncine.vec3

@param block_name — It can be an empty string

@param name — Uniform name

@return — True if the uniform has been found and updated

set_uniform_float_vector4

function ncine.shaderstate.set_uniform_float_vector4(shaderstate: shaderstateObj, block_name: string, name: string, vector: ncine.vec4)
  -> boolean

Sets a float uniform with a ncine.vec4

@param block_name — It can be an empty string

@param name — Uniform name

@return — True if the uniform has been found and updated

set_uniform_int_value1

function ncine.shaderstate.set_uniform_int_value1(shaderstate: shaderstateObj, block_name: string, name: string, value0: integer)
  -> boolean

Sets an integer uniform with one value

@param block_name — It can be an empty string

@param name — Uniform name

@return — True if the uniform has been found and updated

set_uniform_int_value2

function ncine.shaderstate.set_uniform_int_value2(shaderstate: shaderstateObj, block_name: string, name: string, value0: integer, value1: integer)
  -> boolean

Sets an integer uniform with two values

@param block_name — It can be an empty string

@param name — Uniform name

@return — True if the uniform has been found and updated

set_uniform_int_value3

function ncine.shaderstate.set_uniform_int_value3(shaderstate: shaderstateObj, block_name: string, name: string, value0: integer, value1: integer, value2: integer)
  -> boolean

Sets an integer uniform with three values

@param block_name — It can be an empty string

@param name — Uniform name

@return — True if the uniform has been found and updated

set_uniform_int_value4

function ncine.shaderstate.set_uniform_int_value4(shaderstate: shaderstateObj, block_name: string, name: string, value0: integer, value1: integer, value2: integer, value3: integer)
  -> boolean

Sets an integer uniform with four values

@param block_name — It can be an empty string

@param name — Uniform name

@return — True if the uniform has been found and updated

set_uniform_int_vector

function ncine.shaderstate.set_uniform_int_vector(shaderstate: shaderstateObj, block_name: string, name: string, vector: integer[])
  -> boolean

Sets an integer uniform with an array of values

@param block_name — It can be an empty string

@param name — Uniform name

@param vector — An array of 1 to 4 integer elements

@return — True if the uniform has been found and updated

set_uniform_int_vector2

function ncine.shaderstate.set_uniform_int_vector2(shaderstate: shaderstateObj, block_name: string, name: string, vector: ncine.vec2)
  -> boolean

Sets an integer uniform with a ncine.vec2

@param block_name — It can be an empty string

@param name — Uniform name

@return — True if the uniform has been found and updated

set_uniform_int_vector3

function ncine.shaderstate.set_uniform_int_vector3(shaderstate: shaderstateObj, block_name: string, name: string, vector: ncine.vec3)
  -> boolean

Sets an integer uniform with a ncine.vec3

@param block_name — It can be an empty string

@param name — Uniform name

@return — True if the uniform has been found and updated

set_uniform_int_vector4

function ncine.shaderstate.set_uniform_int_vector4(shaderstate: shaderstateObj, block_name: string, name: string, vector: ncine.vec4)
  -> boolean

Sets an integer uniform with a ncine.vec4

@param block_name — It can be an empty string

@param name — Uniform name

@return — True if the uniform has been found and updated


ncine.shaderstate.delete

function ncine.shaderstate.delete(shaderstate: shaderstateObj)

ncine.shaderstate.get_node

function ncine.shaderstate.get_node(shaderstate: shaderstateObj)
  -> drawablenodeObj?

ncine.shaderstate.get_shader

function ncine.shaderstate.get_shader(shaderstate: shaderstateObj)
  -> shaderObj?

ncine.shaderstate.new

function ncine.shaderstate.new(node: drawablenodeObj, shader: shaderObj)
  -> shaderstateObj

ncine.shaderstate.reset_shader

function ncine.shaderstate.reset_shader(shaderstate: shaderstateObj)

ncine.shaderstate.set_node

function ncine.shaderstate.set_node(shaderstate: shaderstateObj, node?: drawablenodeObj)

ncine.shaderstate.set_shader

function ncine.shaderstate.set_shader(shaderstate: shaderstateObj, shader?: shaderObj)
  -> boolean

ncine.shaderstate.set_texture

function ncine.shaderstate.set_texture(shaderstate: shaderstateObj, unit: integer, texture?: textureObj)
  -> boolean

ncine.shaderstate.set_uniform_float_color

function ncine.shaderstate.set_uniform_float_color(shaderstate: shaderstateObj, block_name: string, name: string, color: ncine.color)
  -> boolean

ncine.shaderstate.set_uniform_float_value1

function ncine.shaderstate.set_uniform_float_value1(shaderstate: shaderstateObj, block_name: string, name: string, value0: number)
  -> boolean

ncine.shaderstate.set_uniform_float_value2

function ncine.shaderstate.set_uniform_float_value2(shaderstate: shaderstateObj, block_name: string, name: string, value0: number, value1: number)
  -> boolean

ncine.shaderstate.set_uniform_float_value3

function ncine.shaderstate.set_uniform_float_value3(shaderstate: shaderstateObj, block_name: string, name: string, value0: number, value1: number, value2: number)
  -> boolean

ncine.shaderstate.set_uniform_float_value4

function ncine.shaderstate.set_uniform_float_value4(shaderstate: shaderstateObj, block_name: string, name: string, value0: number, value1: number, value2: number, value3: number)
  -> boolean

ncine.shaderstate.set_uniform_float_vector

function ncine.shaderstate.set_uniform_float_vector(shaderstate: shaderstateObj, block_name: string, name: string, vector: number[])
  -> boolean

ncine.shaderstate.set_uniform_float_vector2

function ncine.shaderstate.set_uniform_float_vector2(shaderstate: shaderstateObj, block_name: string, name: string, vector: ncine.vec2)
  -> boolean

ncine.shaderstate.set_uniform_float_vector3

function ncine.shaderstate.set_uniform_float_vector3(shaderstate: shaderstateObj, block_name: string, name: string, vector: ncine.vec3)
  -> boolean

ncine.shaderstate.set_uniform_float_vector4

function ncine.shaderstate.set_uniform_float_vector4(shaderstate: shaderstateObj, block_name: string, name: string, vector: ncine.vec4)
  -> boolean

ncine.shaderstate.set_uniform_int_value1

function ncine.shaderstate.set_uniform_int_value1(shaderstate: shaderstateObj, block_name: string, name: string, value0: integer)
  -> boolean

ncine.shaderstate.set_uniform_int_value2

function ncine.shaderstate.set_uniform_int_value2(shaderstate: shaderstateObj, block_name: string, name: string, value0: integer, value1: integer)
  -> boolean

ncine.shaderstate.set_uniform_int_value3

function ncine.shaderstate.set_uniform_int_value3(shaderstate: shaderstateObj, block_name: string, name: string, value0: integer, value1: integer, value2: integer)
  -> boolean

ncine.shaderstate.set_uniform_int_value4

function ncine.shaderstate.set_uniform_int_value4(shaderstate: shaderstateObj, block_name: string, name: string, value0: integer, value1: integer, value2: integer, value3: integer)
  -> boolean

ncine.shaderstate.set_uniform_int_vector

function ncine.shaderstate.set_uniform_int_vector(shaderstate: shaderstateObj, block_name: string, name: string, vector: integer[])
  -> boolean

ncine.shaderstate.set_uniform_int_vector2

function ncine.shaderstate.set_uniform_int_vector2(shaderstate: shaderstateObj, block_name: string, name: string, vector: ncine.vec2)
  -> boolean

ncine.shaderstate.set_uniform_int_vector3

function ncine.shaderstate.set_uniform_int_vector3(shaderstate: shaderstateObj, block_name: string, name: string, vector: ncine.vec3)
  -> boolean

ncine.shaderstate.set_uniform_int_vector4

function ncine.shaderstate.set_uniform_int_vector4(shaderstate: shaderstateObj, block_name: string, name: string, vector: ncine.vec4)
  -> boolean

ncine.sprite

ncine.sprite

ncine.sprite

add_child

function ncine.scenenode.add_child(parent: scenenodeObj, node: scenenodeObj)
  -> boolean

Adds a child node to the specified parent

@returntrue if the node has been added

clone

function ncine.sprite.clone(sprite: spriteObj)
  -> spriteObj

Constructs a new sprite object as a clone of the specified one

Don't forget to call delete when you are done with it!

@param sprite — The sprite object to be cloned

@return — The cloned sprite object

delete

function ncine.sprite.delete(sprite: spriteObj)

Destroys a sprite object and releases its memory

@param sprite — The sprite object to be destroyed

get_aabb

function ncine.drawable_node.get_aabb(node: drawablenodeObj)
  -> ncine.rect

Returns the axis-aligned bounding box of the node area in the last frame

get_abs_anchor_point

function ncine.scenenode.get_abs_anchor_point(node: scenenodeObj)
  -> ncine.vec2

Returns the absolute transformation anchor point in pixels

get_alpha

function ncine.scenenode.get_alpha(node: scenenodeObj)
  -> number

Returns the node alpha color component

get_anchor_point

function ncine.drawable_node.get_anchor_point(node: drawablenodeObj)
  -> ncine.vec2

Returns the transformation anchor point

get_child

function ncine.scenenode.get_child(node: scenenodeObj, index: integer)
  -> scenenodeObj?

Returns the n-th child

get_child_order_index

function ncine.scenenode.get_child_order_index(node: scenenodeObj)
  -> integer

Returns the order index of this node among its siblings

@return — The order index or zero if the node has no parent

get_children

function ncine.scenenode.get_children(node: scenenodeObj)
  -> scenenodeObj[]

Returns the array of children

get_color

function ncine.scenenode.get_color(node: scenenodeObj)
  -> ncine.color

Returns the node color

get_dest_blending_factor

function ncine.drawable_node.get_dest_blending_factor(node: drawablenodeObj)
  -> ncine.blending_factor

Returns the destination blending factor

get_height

function ncine.drawable_node.get_height(node: drawablenodeObj)
  -> number

Returns the height of the node area

get_last_frame_rendered

function ncine.drawable_node.get_last_frame_rendered(node: drawablenodeObj)
  -> integer

Returns the last frame in which any of the viewports have rendered this node (node was not culled)

get_last_frame_updated

function ncine.scenenode.get_last_frame_updated(node: scenenodeObj)
  -> integer

Returns the last frame in which any of the viewports have updated this node

get_layer

function ncine.scenenode.get_layer(node: scenenodeObj)
  -> integer

Returns the node rendering layer

get_parent

function ncine.scenenode.get_parent(node: scenenodeObj)
  -> scenenodeObj?

Returns the parent node, if there is any

get_position

function ncine.scenenode.get_position(node: scenenodeObj)
  -> ncine.vec2

Returns the node position relative to its parent

get_rotation

function ncine.scenenode.get_rotation(node: scenenodeObj)
  -> number

Returns the node rotation in degress

get_scale

function ncine.scenenode.get_scale(node: scenenodeObj)
  -> ncine.vec2

Returns the node scale factors

get_size

function ncine.drawable_node.get_size(node: drawablenodeObj)
  -> ncine.vec2

Returns the size of the node area

get_src_blending_factor

function ncine.drawable_node.get_src_blending_factor(node: drawablenodeObj)
  -> ncine.blending_factor

eturns the source blending factor

get_texrect

function ncine.base_sprite.get_texrect(sprite: basespriteObj)
  -> ncine.rect

Returns the texture source rectangle for blitting

get_texture

function ncine.base_sprite.get_texture(sprite: basespriteObj)
  -> textureObj?

Returns the texture object

get_visit_order_index

function ncine.scenenode.get_visit_order_index(node: scenenodeObj)
  -> integer

Returns the visit drawing order of the node

get_visit_order_state

function ncine.scenenode.get_visit_order_state(node: scenenodeObj)
  -> ncine.visit_order_state

Returns the visit order state for the specified node

get_width

function ncine.drawable_node.get_width(node: drawablenodeObj)
  -> number

Returns the width of the node area

is_blending_enabled

function ncine.drawable_node.is_blending_enabled(node: drawablenodeObj)
  -> boolean

Returns true if the node renders with blending enabled

is_enabled

function ncine.scenenode.is_enabled(node: scenenodeObj)
  -> boolean

Returns true if the node is both updating and drawing

is_flipped_x

function ncine.base_sprite.is_flipped_x(sprite: basespriteObj)
  -> boolean

Returns true if the sprite texture is horizontally flipped

is_flipped_y

function ncine.base_sprite.is_flipped_y(sprite: basespriteObj)
  -> boolean

Returns true if the sprite texture is vertically flipped

new

function ncine.sprite.new(parent?: scenenodeObj, texture?: textureObj, x: number, y: number)
  -> spriteObj

Constructs a sprite object with a parent scene node, a texture, and position components

Don't forget to call delete when you are done with it!

@param parent — The parent scenenode

@param texture — The texture object

@param x — The X component of the position

@param y — The Y component of the position

@return — A new sprite object

num_children

function ncine.scenenode.num_children(node: scenenodeObj)
  -> integer

Returns the number of children

remove_all_children

function ncine.scenenode.remove_all_children(parent: scenenodeObj, index: any)
  -> boolean

Removes all children from the specified parent

@returntrue if there were at least one node to remove

remove_child

function ncine.scenenode.remove_child(parent: scenenodeObj, node: scenenodeObj)
  -> boolean

Removes a child node from the specified parent

@returntrue if the node has been removed

remove_child_at

function ncine.scenenode.remove_child_at(parent: scenenodeObj, index: integer)
  -> boolean

Removes a child node at the specified index from the specified parent

@returntrue if the node has been removed

reset_texture

function ncine.base_sprite.reset_texture(sprite: basespriteObj)

Triggers a texture update without setting a new texture

set_abs_anchor_point

function ncine.scenenode.set_abs_anchor_point(node: scenenodeObj, pos: ncine.vec2)

Sets the absolute transformation anchor point in pixels

set_alpha

function ncine.scenenode.set_alpha(node: scenenodeObj, alpha: number)

Sets the node alpha color component

set_anchor_point

function ncine.drawable_node.set_anchor_point(node: drawablenodeObj, anchor_point: ncine.vec2)

Sets the transformation anchor point

set_blending_enabled

function ncine.drawable_node.set_blending_enabled(node: drawablenodeObj, enabled: boolean)

Sets the blending state for node rendering

set_blending_factors

function ncine.drawable_node.set_blending_factors(node: drawablenodeObj, src_factor: ncine.blending_factor, dest_factor: ncine.blending_factor)

Sets a specific source and destination blending factors

set_blending_preset

function ncine.drawable_node.set_blending_preset(node: drawablenodeObj, preset: ncine.blending_preset)

Sets a blending preset for source and destination blending factors

set_color

function ncine.scenenode.set_color(node: scenenodeObj, color: ncine.color)

Sets the node color

set_enabled

function ncine.scenenode.set_enabled(node: scenenodeObj, newValue: boolean)

Enables or disables both node updating and drawing

set_flipped_x

function ncine.base_sprite.set_flipped_x(sprite: basespriteObj, flipped_x: boolean)

Flips the texture rect horizontally

set_flipped_y

function ncine.base_sprite.set_flipped_y(sprite: basespriteObj, flipped_y: boolean)

Flips the texture rect vertically

set_layer

function ncine.scenenode.set_layer(node: scenenodeObj, layer: integer)

Sets the node rendering layer

The lowest value (bottom) is 0 and the highest one (top) is 65535.
When the value is 0, the final layer value is inherited from the parent.

set_parent

function ncine.scenenode.set_parent(node: scenenodeObj, parent?: scenenodeObj)
  -> boolean

Sets the parent node

@returntrue if the parent has been set

set_position

function ncine.scenenode.set_position(node: scenenodeObj, pos: ncine.vec2)

Sets a new position for the node

set_rotation

function ncine.scenenode.set_rotation(node: scenenodeObj, rot: number)

Sets the node rotation in degrees

@param rot — The amount of degrees

set_scale

function ncine.scenenode.set_scale(node: scenenodeObj, factor: number)

Sets both node scale factors to the specified value

set_scale_x

function ncine.scenenode.set_scale_x(node: scenenodeObj, factor: number)

Sets the node scale X factor

set_scale_y

function ncine.scenenode.set_scale_y(node: scenenodeObj, factor: number)

Sets the node scale Y factor

set_size

function ncine.base_sprite.set_size(sprite: basespriteObj, width: number, height: number)

Sets the sprite size

set_texrect

function ncine.base_sprite.set_texrect(sprite: basespriteObj, rect: ncine.rect)

Sets the texture source rectangle for blitting

set_texture

function ncine.base_sprite.set_texture(sprite: basespriteObj, texture?: textureObj)

Sets the texture object

set_visit_order_state

function ncine.scenenode.set_visit_order_state(node: scenenodeObj, state: ncine.visit_order_state)

Sets the visit order state for the specified node

swap_children

function ncine.scenenode.swap_children(parent: scenenodeObj, firstIndex: integer, secondIndex: integer)
  -> boolean

Swaps two children at the specified indices

@returntrue if the two nodes have been swapped

swap_node_back

function ncine.scenenode.swap_node_back(node: scenenodeObj)
  -> boolean

Brings this node one node back in the parent's list of children

@returntrue if the node has been brought one position back

swap_node_forward

function ncine.scenenode.swap_node_forward(node: scenenodeObj)
  -> boolean

Brings this node one node forward in the parent's list of children

@returntrue if the node has been brought one position forward

unlink_child

function ncine.scenenode.unlink_child(parent: scenenodeObj, node: scenenodeObj)
  -> boolean

Unlinks a child node from the specified parent

The children of the unlinked node will be reparented with the grandparent node

@returntrue if the node has been unlinked


ncine.sprite.clone

function ncine.sprite.clone(sprite: spriteObj)
  -> spriteObj

ncine.sprite.delete

function ncine.sprite.delete(sprite: spriteObj)

ncine.sprite.new

function ncine.sprite.new(parent?: scenenodeObj, texture?: textureObj, x: number, y: number)
  -> spriteObj
function ncine.sprite.new(parent?: scenenodeObj, texture?: textureObj, pos: ncine.vec2)
  -> spriteObj

ncine.start

function ncine.start()

ncine.tex_filtering

enum ncine.tex_filtering

ncine.tex_format

enum ncine.tex_format

ncine.tex_wrap

enum ncine.tex_wrap

ncine.text_alignment

enum ncine.text_alignment

ncine.textnode

add_child

function ncine.scenenode.add_child(parent: scenenodeObj, node: scenenodeObj)
  -> boolean

Adds a child node to the specified parent

@returntrue if the node has been added

calculate_boundaries

function ncine.textnode.calculate_boundaries(font: fontObj, with_kerning: boolean, string: string)
  -> ncine.vec2

Calculates the rectangle boundaries needed to render the provided string with the specified font

clone

function ncine.textnode.clone(textnode: textnodeObj)
  -> textnodeObj

Constructs a new textnode object as a clone of the specified one

Don't forget to call delete when you are done with it!

@param textnode — The textnode object to be cloned

@return — The cloned textnode object

delete

function ncine.textnode.delete(textnode: textnodeObj)

Destroys a textnode object and releases its memory

@param textnode — The textnode object to be destroyed

get_aabb

function ncine.drawable_node.get_aabb(node: drawablenodeObj)
  -> ncine.rect

Returns the axis-aligned bounding box of the node area in the last frame

get_abs_anchor_point

function ncine.scenenode.get_abs_anchor_point(node: scenenodeObj)
  -> ncine.vec2

Returns the absolute transformation anchor point in pixels

get_absheight

function ncine.textnode.get_absheight(textnode: textnodeObj)
  -> number

Returns the absolute height of rendered text

get_abslineheight

function ncine.textnode.get_abslineheight(textnode: textnodeObj)
  -> number

Returns the text node line height multiplied by the absolute vertical scale factor

get_abswidth

function ncine.textnode.get_abswidth(textnode: textnodeObj)
  -> number

Returns the absolute width of rendered text

get_alignment

function ncine.textnode.get_alignment(textnode: textnodeObj)
  -> ncine.text_alignment

Returns the horizontal text alignment of multiple lines

get_alpha

function ncine.scenenode.get_alpha(node: scenenodeObj)
  -> number

Returns the node alpha color component

get_anchor_point

function ncine.drawable_node.get_anchor_point(node: drawablenodeObj)
  -> ncine.vec2

Returns the transformation anchor point

get_child

function ncine.scenenode.get_child(node: scenenodeObj, index: integer)
  -> scenenodeObj?

Returns the n-th child

get_child_order_index

function ncine.scenenode.get_child_order_index(node: scenenodeObj)
  -> integer

Returns the order index of this node among its siblings

@return — The order index or zero if the node has no parent

get_children

function ncine.scenenode.get_children(node: scenenodeObj)
  -> scenenodeObj[]

Returns the array of children

get_color

function ncine.scenenode.get_color(node: scenenodeObj)
  -> ncine.color

Returns the node color

get_dest_blending_factor

function ncine.drawable_node.get_dest_blending_factor(node: drawablenodeObj)
  -> ncine.blending_factor

Returns the destination blending factor

get_font

function ncine.textnode.get_font(textnode: textnodeObj)
  -> fontObj

Returns the font object used by the textnode

get_height

function ncine.textnode.get_height(textnode: textnodeObj)
  -> number

Returns the height of rendered text

get_kerning

function ncine.textnode.get_kerning(textnode: textnodeObj)
  -> boolean

Returns true if kerning is enabled for this node rendering

get_last_frame_rendered

function ncine.drawable_node.get_last_frame_rendered(node: drawablenodeObj)
  -> integer

Returns the last frame in which any of the viewports have rendered this node (node was not culled)

get_last_frame_updated

function ncine.scenenode.get_last_frame_updated(node: scenenodeObj)
  -> integer

Returns the last frame in which any of the viewports have updated this node

get_layer

function ncine.scenenode.get_layer(node: scenenodeObj)
  -> integer

Returns the node rendering layer

get_lineheight

function ncine.textnode.get_lineheight(textnode: textnodeObj)
  -> number

Returns the text node line height

get_parent

function ncine.scenenode.get_parent(node: scenenodeObj)
  -> scenenodeObj?

Returns the parent node, if there is any

get_position

function ncine.scenenode.get_position(node: scenenodeObj)
  -> ncine.vec2

Returns the node position relative to its parent

get_render_mode

function ncine.textnode.get_render_mode(textnode: textnodeObj)
  -> ncine.font_render_mode

Returns the render mode used to render this text node

get_rotation

function ncine.scenenode.get_rotation(node: scenenodeObj)
  -> number

Returns the node rotation in degress

get_scale

function ncine.scenenode.get_scale(node: scenenodeObj)
  -> ncine.vec2

Returns the node scale factors

get_size

function ncine.drawable_node.get_size(node: drawablenodeObj)
  -> ncine.vec2

Returns the size of the node area

get_src_blending_factor

function ncine.drawable_node.get_src_blending_factor(node: drawablenodeObj)
  -> ncine.blending_factor

eturns the source blending factor

get_string

function ncine.textnode.get_string(textnode: textnodeObj)
  -> string

Returns the string to render

get_visit_order_index

function ncine.scenenode.get_visit_order_index(node: scenenodeObj)
  -> integer

Returns the visit drawing order of the node

get_visit_order_state

function ncine.scenenode.get_visit_order_state(node: scenenodeObj)
  -> ncine.visit_order_state

Returns the visit order state for the specified node

get_width

function ncine.textnode.get_width(textnode: textnodeObj)
  -> number

Returns the width of rendered text

is_blending_enabled

function ncine.drawable_node.is_blending_enabled(node: drawablenodeObj)
  -> boolean

Returns true if the node renders with blending enabled

is_enabled

function ncine.scenenode.is_enabled(node: scenenodeObj)
  -> boolean

Returns true if the node is both updating and drawing

new

function ncine.textnode.new(parent?: scenenodeObj, font?: fontObj, max_string_length: integer)
  -> textnodeObj

Constructs a textnode object with a parent scene node, a font, and a maximum text string length

Don't forget to call delete when you are done with it!

@param parent — The parent scenenode

@param font — The font object

@param max_string_length — The maximum length for the text

@return — A new textnode object

num_children

function ncine.scenenode.num_children(node: scenenodeObj)
  -> integer

Returns the number of children

remove_all_children

function ncine.scenenode.remove_all_children(parent: scenenodeObj, index: any)
  -> boolean

Removes all children from the specified parent

@returntrue if there were at least one node to remove

remove_child

function ncine.scenenode.remove_child(parent: scenenodeObj, node: scenenodeObj)
  -> boolean

Removes a child node from the specified parent

@returntrue if the node has been removed

remove_child_at

function ncine.scenenode.remove_child_at(parent: scenenodeObj, index: integer)
  -> boolean

Removes a child node at the specified index from the specified parent

@returntrue if the node has been removed

set_abs_anchor_point

function ncine.scenenode.set_abs_anchor_point(node: scenenodeObj, pos: ncine.vec2)

Sets the absolute transformation anchor point in pixels

set_alignment

function ncine.textnode.set_alignment(textnode: textnodeObj, text_alignment: ncine.text_alignment)

Sets the horizontal text alignment of multiple lines

set_alpha

function ncine.scenenode.set_alpha(node: scenenodeObj, alpha: number)

Sets the node alpha color component

set_anchor_point

function ncine.drawable_node.set_anchor_point(node: drawablenodeObj, anchor_point: ncine.vec2)

Sets the transformation anchor point

set_blending_enabled

function ncine.drawable_node.set_blending_enabled(node: drawablenodeObj, enabled: boolean)

Sets the blending state for node rendering

set_blending_factors

function ncine.drawable_node.set_blending_factors(node: drawablenodeObj, src_factor: ncine.blending_factor, dest_factor: ncine.blending_factor)

Sets a specific source and destination blending factors

set_blending_preset

function ncine.drawable_node.set_blending_preset(node: drawablenodeObj, preset: ncine.blending_preset)

Sets a blending preset for source and destination blending factors

set_color

function ncine.scenenode.set_color(node: scenenodeObj, color: ncine.color)

Sets the node color

set_enabled

function ncine.scenenode.set_enabled(node: scenenodeObj, newValue: boolean)

Enables or disables both node updating and drawing

set_font

function ncine.textnode.set_font(textnode: textnodeObj, font: fontObj)

Sets the font object to be used by the textnode

set_kerning

function ncine.textnode.set_kerning(textnode: textnodeObj, with_kerning: boolean)

Sets the kerning flag for this node rendering

set_layer

function ncine.scenenode.set_layer(node: scenenodeObj, layer: integer)

Sets the node rendering layer

The lowest value (bottom) is 0 and the highest one (top) is 65535.
When the value is 0, the final layer value is inherited from the parent.

set_lineheight

function ncine.textnode.set_lineheight(textnode: textnodeObj, line_height: number)

Sets the text node line height

set_parent

function ncine.scenenode.set_parent(node: scenenodeObj, parent?: scenenodeObj)
  -> boolean

Sets the parent node

@returntrue if the parent has been set

set_position

function ncine.scenenode.set_position(node: scenenodeObj, pos: ncine.vec2)

Sets a new position for the node

set_render_mode

function ncine.textnode.set_render_mode(textnode: textnodeObj, font_render_mode: ncine.font_render_mode)

Sets the render mode used to render this text node, overriding the font one

set_rotation

function ncine.scenenode.set_rotation(node: scenenodeObj, rot: number)

Sets the node rotation in degrees

@param rot — The amount of degrees

set_scale

function ncine.scenenode.set_scale(node: scenenodeObj, factor: number)

Sets both node scale factors to the specified value

set_scale_x

function ncine.scenenode.set_scale_x(node: scenenodeObj, factor: number)

Sets the node scale X factor

set_scale_y

function ncine.scenenode.set_scale_y(node: scenenodeObj, factor: number)

Sets the node scale Y factor

set_string

function ncine.textnode.set_string(textnode: textnodeObj, string: string)

Sets the string to render

set_visit_order_state

function ncine.scenenode.set_visit_order_state(node: scenenodeObj, state: ncine.visit_order_state)

Sets the visit order state for the specified node

swap_children

function ncine.scenenode.swap_children(parent: scenenodeObj, firstIndex: integer, secondIndex: integer)
  -> boolean

Swaps two children at the specified indices

@returntrue if the two nodes have been swapped

swap_node_back

function ncine.scenenode.swap_node_back(node: scenenodeObj)
  -> boolean

Brings this node one node back in the parent's list of children

@returntrue if the node has been brought one position back

swap_node_forward

function ncine.scenenode.swap_node_forward(node: scenenodeObj)
  -> boolean

Brings this node one node forward in the parent's list of children

@returntrue if the node has been brought one position forward

unlink_child

function ncine.scenenode.unlink_child(parent: scenenodeObj, node: scenenodeObj)
  -> boolean

Unlinks a child node from the specified parent

The children of the unlinked node will be reparented with the grandparent node

@returntrue if the node has been unlinked


ncine.textnode

ncine.textnode

ncine.textnode.calculate_boundaries

function ncine.textnode.calculate_boundaries(font: fontObj, with_kerning: boolean, string: string)
  -> ncine.vec2

ncine.textnode.clone

function ncine.textnode.clone(textnode: textnodeObj)
  -> textnodeObj

ncine.textnode.delete

function ncine.textnode.delete(textnode: textnodeObj)

ncine.textnode.get_absheight

function ncine.textnode.get_absheight(textnode: textnodeObj)
  -> number

ncine.textnode.get_abslineheight

function ncine.textnode.get_abslineheight(textnode: textnodeObj)
  -> number

ncine.textnode.get_abswidth

function ncine.textnode.get_abswidth(textnode: textnodeObj)
  -> number

ncine.textnode.get_alignment

function ncine.textnode.get_alignment(textnode: textnodeObj)
  -> ncine.text_alignment

ncine.textnode.get_font

function ncine.textnode.get_font(textnode: textnodeObj)
  -> fontObj

ncine.textnode.get_height

function ncine.textnode.get_height(textnode: textnodeObj)
  -> number

ncine.textnode.get_kerning

function ncine.textnode.get_kerning(textnode: textnodeObj)
  -> boolean

ncine.textnode.get_lineheight

function ncine.textnode.get_lineheight(textnode: textnodeObj)
  -> number

ncine.textnode.get_render_mode

function ncine.textnode.get_render_mode(textnode: textnodeObj)
  -> ncine.font_render_mode

ncine.textnode.get_string

function ncine.textnode.get_string(textnode: textnodeObj)
  -> string

ncine.textnode.get_width

function ncine.textnode.get_width(textnode: textnodeObj)
  -> number

ncine.textnode.new

function ncine.textnode.new(parent?: scenenodeObj, font?: fontObj, max_string_length: integer)
  -> textnodeObj

ncine.textnode.set_alignment

function ncine.textnode.set_alignment(textnode: textnodeObj, text_alignment: ncine.text_alignment)

ncine.textnode.set_font

function ncine.textnode.set_font(textnode: textnodeObj, font: fontObj)

ncine.textnode.set_kerning

function ncine.textnode.set_kerning(textnode: textnodeObj, with_kerning: boolean)

ncine.textnode.set_lineheight

function ncine.textnode.set_lineheight(textnode: textnodeObj, line_height: number)

ncine.textnode.set_render_mode

function ncine.textnode.set_render_mode(textnode: textnodeObj, font_render_mode: ncine.font_render_mode)

ncine.textnode.set_string

function ncine.textnode.set_string(textnode: textnodeObj, string: string)

ncine.texture

datasize

function ncine.texture.datasize(texture: textureObj)
  -> integer

Returns the amount of video memory needed to load the texture

delete

function ncine.texture.delete(texture: textureObj)

Destroys a texture object and releases its memory

@param texture — The texture object to be destroyed

get_chromakey_color

function ncine.texture.get_chromakey_color(texture: textureObj)
  -> ncine.color

Returns the color treated as transparent when loading a texture

get_format

function ncine.texture.get_format(texture: textureObj)
  -> ncine.tex_format

Returns the texture format

get_height

function ncine.texture.get_height(texture: textureObj)
  -> integer

Returns the texture height

get_mag_filtering

function ncine.texture.get_mag_filtering(texture: textureObj)
  -> ncine.tex_filtering

Returns the filtering mode used for magnification

get_min_filtering

function ncine.texture.get_min_filtering(texture: textureObj)
  -> ncine.tex_filtering

Returns the filtering mode used for minification

get_width

function ncine.texture.get_width(texture: textureObj)
  -> integer

Returns the texture width

get_wrap

function ncine.texture.get_wrap(texture: textureObj)
  -> ncine.tex_wrap

Returns the wrap mode used for the s and t directions

init

function ncine.texture.init(texture: textureObj, name: string, format: ncine.tex_format, mip_count: integer, size: ncine.vec2)

Initializes a texture object to a blank texture

@param name — The name for the new texture object

@param format — The texture format

@param mip_count — The number of MIP map levels

@param size — The texture size

is_chromakey_enabled

function ncine.texture.is_chromakey_enabled(texture: textureObj)
  -> boolean

Returns true if chroma key transparency will be used when loading

is_compressed

function ncine.texture.is_compressed(texture: textureObj)
  -> boolean

Returns true if the texture holds compressed data

mip_levels

function ncine.texture.mip_levels(texture: textureObj)
  -> integer

Returns the number of MIP map levels

new

function ncine.texture.new(filename: string)
  -> textureObj

Constructs a texture object from an image file

Don't forget to call delete when you are done with it!

@param filename — The path to an image file

@return — A new texture object

new_init

function ncine.texture.new_init(name: string, format: ncine.tex_format, mip_count: integer, size: ncine.vec2)
  -> textureObj

Constructs a blank texture

Don't forget to call delete when you are done with it!

@param name — The name for the new texture object

@param format — The texture format

@param mip_count — The number of MIP map levels

@param size — The texture size

@return — A new texture object

num_channels

function ncine.texture.num_channels(texture: textureObj)
  -> integer

Returns the number of color channels

set_chromakey_color

function ncine.texture.set_chromakey_color(texture: textureObj, color: ncine.color)

Sets the color to be treated as transparent when loading a texture through a ncine.color table

set_chromakey_enabled

function ncine.texture.set_chromakey_enabled(texture: textureObj, state: boolean)

Sets the chroma key transparency state to use when loading

set_gltexture_label

function ncine.texture.set_gltexture_label(texture: textureObj, label: string)

Sets the OpenGL object label for the texture

set_mag_filtering

function ncine.texture.set_mag_filtering(texture: textureObj, filtering: ncine.tex_filtering)

Sets the filtering mode used for magnification

set_min_filtering

function ncine.texture.set_min_filtering(texture: textureObj, filtering: ncine.tex_filtering)

Sets the filtering mode used for minification

set_wrap

function ncine.texture.set_wrap(texture: textureObj, wrap: ncine.tex_wrap)

Sets the wrap mode used for the s and t directions


ncine.texture

ncine.texture

ncine.texture.datasize

function ncine.texture.datasize(texture: textureObj)
  -> integer

ncine.texture.delete

function ncine.texture.delete(texture: textureObj)

ncine.texture.get_chromakey_color

function ncine.texture.get_chromakey_color(texture: textureObj)
  -> ncine.color

ncine.texture.get_format

function ncine.texture.get_format(texture: textureObj)
  -> ncine.tex_format

ncine.texture.get_height

function ncine.texture.get_height(texture: textureObj)
  -> integer

ncine.texture.get_mag_filtering

function ncine.texture.get_mag_filtering(texture: textureObj)
  -> ncine.tex_filtering

ncine.texture.get_min_filtering

function ncine.texture.get_min_filtering(texture: textureObj)
  -> ncine.tex_filtering

ncine.texture.get_width

function ncine.texture.get_width(texture: textureObj)
  -> integer

ncine.texture.get_wrap

function ncine.texture.get_wrap(texture: textureObj)
  -> ncine.tex_wrap

ncine.texture.init

function ncine.texture.init(texture: textureObj, name: string, format: ncine.tex_format, mip_count: integer, size: ncine.vec2)
function ncine.texture.init(texture: textureObj, name: string, format: ncine.tex_format, mip_count: integer, x: integer, y: integer)

ncine.texture.is_chromakey_enabled

function ncine.texture.is_chromakey_enabled(texture: textureObj)
  -> boolean

ncine.texture.is_compressed

function ncine.texture.is_compressed(texture: textureObj)
  -> boolean

ncine.texture.mip_levels

function ncine.texture.mip_levels(texture: textureObj)
  -> integer

ncine.texture.new

function ncine.texture.new(filename: string)
  -> textureObj

ncine.texture.new_init

function ncine.texture.new_init(name: string, format: ncine.tex_format, mip_count: integer, size: ncine.vec2)
  -> textureObj
function ncine.texture.new_init(name: string, format: ncine.tex_format, mip_count: integer, x: integer, y: integer)
  -> textureObj

ncine.texture.num_channels

function ncine.texture.num_channels(texture: textureObj)
  -> integer

ncine.texture.set_chromakey_color

function ncine.texture.set_chromakey_color(texture: textureObj, color: ncine.color)
function ncine.texture.set_chromakey_color(texture: textureObj, r: number, g: number, b: number, a: number)

ncine.texture.set_chromakey_enabled

function ncine.texture.set_chromakey_enabled(texture: textureObj, state: boolean)

ncine.texture.set_gltexture_label

function ncine.texture.set_gltexture_label(texture: textureObj, label: string)

ncine.texture.set_mag_filtering

function ncine.texture.set_mag_filtering(texture: textureObj, filtering: ncine.tex_filtering)

ncine.texture.set_min_filtering

function ncine.texture.set_min_filtering(texture: textureObj, filtering: ncine.tex_filtering)

ncine.texture.set_wrap

function ncine.texture.set_wrap(texture: textureObj, wrap: ncine.tex_wrap)

ncine.texture_cut_mode

enum ncine.texture_cut_mode

ncine.timestamp

table

ncine.timestamp.hash_file_stat

function ncine.timestamp.hash_file_stat(filepath: string)
  -> integer

ncine.timestamp.hash_string

function ncine.timestamp.hash_string(string: string)
  -> integer

ncine.timestamp.microseconds

function ncine.timestamp.microseconds(counter: integer)
  -> number

ncine.timestamp.microseconds_since

function ncine.timestamp.microseconds_since(counter: integer)
  -> number

ncine.timestamp.milliseconds

function ncine.timestamp.milliseconds(counter: integer)
  -> number

ncine.timestamp.milliseconds_since

function ncine.timestamp.milliseconds_since(counter: integer)
  -> number

ncine.timestamp.nanoseconds

function ncine.timestamp.nanoseconds(counter: integer)
  -> number

ncine.timestamp.nanoseconds_since

function ncine.timestamp.nanoseconds_since(counter: integer)
  -> number

ncine.timestamp.now

function ncine.timestamp.now()
  -> integer

ncine.timestamp.scan_hash_string

function ncine.timestamp.scan_hash_string(string: string)
  -> integer

ncine.timestamp.seconds

function ncine.timestamp.seconds(counter: integer)
  -> number

ncine.timestamp.seconds_since

function ncine.timestamp.seconds_since(counter: integer)
  -> number

ncine.timestamp.ticks_since

function ncine.timestamp.ticks_since(counter: integer)
  -> integer

ncine.vec2

ncine.vec2

ncine.vec2

add

function ncine.vec2.add(vec0: ncine.vec2, vec1: ncine.vec2)
  -> ncine.vec2

Adds two vectors together, component-wise

contains

function ncine.vec2.contains(rect0: ncine.rect, rect1: ncine.rect)
  -> boolean

Returns true if the other rectangle is contained inside this one

contains_point

function ncine.vec2.contains_point(rect: ncine.rect, x: number, y: number)
  -> boolean

Returns true if the point is inside this rectangle

create

function ncine.vec2.create(x: number, y: number)
  -> ncine.vec2

Creates a vec2 table from its components

@param x — The X component

@param y — The Y component

div

function ncine.vec2.div(vec0: ncine.vec2, vec1: ncine.vec2)
  -> ncine.vec2

Divides the first vector by the second one, component-wise

dot

function ncine.vec2.dot(vec0: ncine.vec2, vec1: ncine.vec2)
  -> number

Returns the dot product between the two vectors

get_center

function ncine.vec2.get_center(rect: ncine.rect)
  -> ncine.vec2

Calculates the center of the rectangle

@return — The center coordinates

get_max

function ncine.vec2.get_max(rect: ncine.rect)
  -> ncine.vec2

Calculates the maximum coordinates of the rectangle

@return — The maximum coordinates

get_min

function ncine.vec2.get_min(rect: ncine.rect)
  -> ncine.vec2

Calculates the minimum coordinates of the rectangle

@return — The minimum coordinates

intersect

function ncine.vec2.intersect(rect0: ncine.rect, rect1: ncine.rect)
  -> ncine.rect

Intersects this rectangle with the other rectangle

invert_size

function ncine.vec2.invert_size(rect: ncine.rect)
  -> ncine.rect

Inverts rectangle size and moves (x, y) to a different angle

length

function ncine.vec2.length(vec: ncine.vec2)
  -> number

Returns the length of the vector

mul

function ncine.vec2.mul(vec0: ncine.vec2, vec1: ncine.vec2)
  -> ncine.vec2

Multiplies two vectors together, component-wise

normalized

function ncine.vec2.normalized(vec: ncine.vec2)
  -> ncine.vec2

Returns a normalized version of the vector

overlaps

function ncine.vec2.overlaps(rect0: ncine.rect, rect1: ncine.rect)
  -> boolean

Returns true if this rect does overlap the other rectangle in any way

set_center

function ncine.vec2.set_center(rect: ncine.rect, x: number, y: number)

Retains rectangle size but moves its center to another position

sqrlength

function ncine.vec2.sqrlength(vec: ncine.vec2)
  -> number

Returns the squared length of the vector

sub

function ncine.vec2.sub(vec0: ncine.vec2, vec1: ncine.vec2)
  -> ncine.vec2

Subtracts the second vector from the first one, component-wise

x

number

The X component

y

number

The Y component


ncine.vec2.add

function ncine.vec2.add(vec0: ncine.vec2, vec1: ncine.vec2)
  -> ncine.vec2
function ncine.vec2.add(vec0: ncine.vec2, scalar: number)
  -> ncine.vec2

ncine.vec2.contains

function ncine.vec2.contains(rect0: ncine.rect, rect1: ncine.rect)
  -> boolean

ncine.vec2.contains_point

function ncine.vec2.contains_point(rect: ncine.rect, x: number, y: number)
  -> boolean

ncine.vec2.create

function ncine.vec2.create(x: number, y: number)
  -> ncine.vec2

ncine.vec2.div

function ncine.vec2.div(vec0: ncine.vec2, vec1: ncine.vec2)
  -> ncine.vec2
function ncine.vec2.div(vec: ncine.vec2, scalar: number)
  -> ncine.vec2

ncine.vec2.dot

function ncine.vec2.dot(vec0: ncine.vec2, vec1: ncine.vec2)
  -> number

ncine.vec2.get_center

function ncine.vec2.get_center(rect: ncine.rect)
  -> ncine.vec2

ncine.vec2.get_max

function ncine.vec2.get_max(rect: ncine.rect)
  -> ncine.vec2

ncine.vec2.get_min

function ncine.vec2.get_min(rect: ncine.rect)
  -> ncine.vec2

ncine.vec2.intersect

function ncine.vec2.intersect(rect0: ncine.rect, rect1: ncine.rect)
  -> ncine.rect

ncine.vec2.invert_size

function ncine.vec2.invert_size(rect: ncine.rect)
  -> ncine.rect

ncine.vec2.length

function ncine.vec2.length(vec: ncine.vec2)
  -> number

ncine.vec2.mul

function ncine.vec2.mul(vec0: ncine.vec2, vec1: ncine.vec2)
  -> ncine.vec2
function ncine.vec2.mul(vec: ncine.vec2, scalar: number)
  -> ncine.vec2

ncine.vec2.normalized

function ncine.vec2.normalized(vec: ncine.vec2)
  -> ncine.vec2

ncine.vec2.overlaps

function ncine.vec2.overlaps(rect0: ncine.rect, rect1: ncine.rect)
  -> boolean

ncine.vec2.set_center

function ncine.vec2.set_center(rect: ncine.rect, x: number, y: number)

ncine.vec2.sqrlength

function ncine.vec2.sqrlength(vec: ncine.vec2)
  -> number

ncine.vec2.sub

function ncine.vec2.sub(vec0: ncine.vec2, vec1: ncine.vec2)
  -> ncine.vec2
function ncine.vec2.sub(vec: ncine.vec2, scalar: number)
  -> ncine.vec2

ncine.vec3

ncine.vec3

ncine.vec3

add

function ncine.vec3.add(vec0: ncine.vec3, vec1: ncine.vec3)
  -> ncine.vec3

Adds two vectors together, component-wise

create

function ncine.vec3.create(x: number, y: number, z: number)
  -> ncine.vec3

Creates a vec3 table from its components

@param x — The X component

@param y — The Y component

@param z — The Z component

div

function ncine.vec3.div(vec0: ncine.vec3, vec1: ncine.vec3)
  -> ncine.vec3

Divides the first vector by the second one, component-wise

dot

function ncine.vec3.dot(vec0: ncine.vec3, vec1: ncine.vec3)
  -> number

Returns the dot product between the two vectors

length

function ncine.vec3.length(vec: ncine.vec3)
  -> number

Returns the length of the vector

mul

function ncine.vec3.mul(vec0: ncine.vec3, vec1: ncine.vec3)
  -> ncine.vec3

Multiplies two vectors together, component-wise

normalized

function ncine.vec3.normalized(vec: ncine.vec3)
  -> ncine.vec3

Returns a normalized version of the vector

sqrlength

function ncine.vec3.sqrlength(vec: ncine.vec3)
  -> number

Returns the squared length of the vector

sub

function ncine.vec3.sub(vec0: ncine.vec3, vec1: ncine.vec3)
  -> ncine.vec3

Subtracts the second vector from the first one, component-wise

x

number

The X component

y

number

The Y component

z

number

The Z component


ncine.vec3.add

function ncine.vec3.add(vec0: ncine.vec3, vec1: ncine.vec3)
  -> ncine.vec3
function ncine.vec3.add(vec0: ncine.vec3, scalar: number)
  -> ncine.vec3

ncine.vec3.create

function ncine.vec3.create(x: number, y: number, z: number)
  -> ncine.vec3

ncine.vec3.div

function ncine.vec3.div(vec0: ncine.vec3, vec1: ncine.vec3)
  -> ncine.vec3
function ncine.vec3.div(vec: ncine.vec3, scalar: number)
  -> ncine.vec3

ncine.vec3.dot

function ncine.vec3.dot(vec0: ncine.vec3, vec1: ncine.vec3)
  -> number

ncine.vec3.length

function ncine.vec3.length(vec: ncine.vec3)
  -> number

ncine.vec3.mul

function ncine.vec3.mul(vec0: ncine.vec3, vec1: ncine.vec3)
  -> ncine.vec3
function ncine.vec3.mul(vec: ncine.vec3, scalar: number)
  -> ncine.vec3

ncine.vec3.normalized

function ncine.vec3.normalized(vec: ncine.vec3)
  -> ncine.vec3

ncine.vec3.sqrlength

function ncine.vec3.sqrlength(vec: ncine.vec3)
  -> number

ncine.vec3.sub

function ncine.vec3.sub(vec0: ncine.vec3, vec1: ncine.vec3)
  -> ncine.vec3
function ncine.vec3.sub(vec: ncine.vec3, scalar: number)
  -> ncine.vec3

ncine.vec4

add

function ncine.vec4.add(vec0: ncine.vec4, vec1: ncine.vec4)
  -> ncine.vec4

Adds two vectors together, component-wise

create

function ncine.vec4.create(x: number, y: number, z: number, w: number)
  -> ncine.vec4

Creates a vec4 table from its components

@param x — The X component

@param y — The Y component

@param z — The Z component

@param w — The W component

div

function ncine.vec4.div(vec0: ncine.vec4, vec1: ncine.vec4)
  -> ncine.vec4

Divides the first vector by the second one, component-wise

dot

function ncine.vec4.dot(vec0: ncine.vec4, vec1: ncine.vec4)
  -> number

Returns the dot product between the two vectors

length

function ncine.vec4.length(vec: ncine.vec4)
  -> number

Returns the length of the vector

mul

function ncine.vec4.mul(vec0: ncine.vec4, vec1: ncine.vec4)
  -> ncine.vec4

Multiplies two vectors together, component-wise

normalized

function ncine.vec4.normalized(vec: ncine.vec4)
  -> ncine.vec4

Returns a normalized version of the vector

sqrlength

function ncine.vec4.sqrlength(vec: ncine.vec4)
  -> number

Returns the squared length of the vector

sub

function ncine.vec4.sub(vec0: ncine.vec4, vec1: ncine.vec4)
  -> ncine.vec4

Subtracts the second vector from the first one, component-wise

w

number

The W component

x

number

The X component

y

number

The Y component

z

number

The Z component


ncine.vec4

ncine.vec4

ncine.vec4.add

function ncine.vec4.add(vec0: ncine.vec4, vec1: ncine.vec4)
  -> ncine.vec4
function ncine.vec4.add(vec0: ncine.vec4, scalar: number)
  -> ncine.vec4

ncine.vec4.create

function ncine.vec4.create(x: number, y: number, z: number, w: number)
  -> ncine.vec4

ncine.vec4.div

function ncine.vec4.div(vec0: ncine.vec4, vec1: ncine.vec4)
  -> ncine.vec4
function ncine.vec4.div(vec: ncine.vec4, scalar: number)
  -> ncine.vec4

ncine.vec4.dot

function ncine.vec4.dot(vec0: ncine.vec4, vec1: ncine.vec4)
  -> number

ncine.vec4.length

function ncine.vec4.length(vec: ncine.vec4)
  -> number

ncine.vec4.mul

function ncine.vec4.mul(vec0: ncine.vec4, vec1: ncine.vec4)
  -> ncine.vec4
function ncine.vec4.mul(vec: ncine.vec4, scalar: number)
  -> ncine.vec4

ncine.vec4.normalized

function ncine.vec4.normalized(vec: ncine.vec4)
  -> ncine.vec4

ncine.vec4.sqrlength

function ncine.vec4.sqrlength(vec: ncine.vec4)
  -> number

ncine.vec4.sub

function ncine.vec4.sub(vec0: ncine.vec4, vec1: ncine.vec4)
  -> ncine.vec4
function ncine.vec4.sub(vec: ncine.vec4, scalar: number)
  -> ncine.vec4

ncine.viewport

ncine.viewport

ncine.viewport

clear_chain

function ncine.viewport.clear_chain()

Clears the array of viewports to be drawn before the screen

delete

function ncine.viewport.delete(viewport: viewportObj)

Destroys a viewport object and releases its memory

@param viewport — The viewport object to be destroyed

get_camera

function ncine.viewport.get_camera(viewport: viewportObj)
  -> cameraObj?

Returns the camera used for rendering

get_clear_color

function ncine.viewport.get_clear_color(viewport: viewportObj)
  -> ncine.color

Returns the viewport clear color as a ncine.color table

get_clear_mode

function ncine.viewport.get_clear_mode(viewport: viewportObj)
  -> ncine.clear_mode

Returns the viewport clear mode

get_culling_rect

function ncine.viewport.get_culling_rect(viewport: viewportObj)
  -> ncine.rect

Returns the rectangle for screen culling

get_depth_stencil_format

function ncine.viewport.get_depth_stencil_format(viewport: viewportObj)
  -> ncine.depth_stencil_format

Returns the depth and stencil format of the viewport's FBO renderbuffer

get_height

function ncine.viewport.get_height(viewport: viewportObj)
  -> integer

Returns viewport's FBO height or zero if no texture is present

get_last_frame_cleared

function ncine.viewport.get_last_frame_cleared(viewport: viewportObj)
  -> integer

Returns the last frame this viewport was cleared

get_num_color_attachments

function ncine.viewport.get_num_color_attachments(viewport: viewportObj)
  -> integer

Returns the number of color attachments of the viewport's FBO

get_rootnode

function ncine.viewport.get_rootnode(viewport: viewportObj)
  -> scenenodeObj?

Returns the root node

get_scissor_rect

function ncine.viewport.get_scissor_rect(viewport: viewportObj)
  -> ncine.rect

Returns the OpenGL scissor test rectangle

get_texture

function ncine.viewport.get_texture(viewport: viewportObj, index: integer)
  -> textureObj?

Returns the texture at the specified viewport's FBO color attachment index, if any

get_type

function ncine.viewport.get_type(viewport: viewportObj)
  -> ncine.viewport_type

Returns the viewport type

get_viewport_rect

function ncine.viewport.get_viewport_rect(viewport: viewportObj)
  -> ncine.rect

Returns the OpenGL viewport rectangle

get_width

function ncine.viewport.get_width(viewport: viewportObj)
  -> integer

Returns viewport's FBO width or zero if no texture is present

new

function ncine.viewport.new()
  -> viewportObj

Constructs a viewport object

Don't forget to call delete when you are done with it!

@return — A new viewport object

push_back_chain

function ncine.viewport.push_back_chain(viewport: viewportObj)

Pushes a viewport to the back of the array of viewports to be drawn before the screen

push_front_chain

function ncine.viewport.push_front_chain(viewport: viewportObj)

Pushes a viewport to the front of the array of viewports to be drawn before the screen

remove_all_textures

function ncine.viewport.remove_all_textures(viewport: viewportObj)
  -> boolean

Removes all textures and the depth stencil renderbuffer from the viewport's FBO

@return — True if the viewport is not the screen and all textures have been removed

set_camera

function ncine.viewport.set_camera(viewport: viewportObj, camera?: cameraObj)

Sets the camera to be used for rendering

@param camera — Can be nil to use the default one

set_clear_color

function ncine.viewport.set_clear_color(viewport: viewportObj, clear_color: ncine.color)

Sets the viewport clear color through a ncine.color table

set_clear_mode

function ncine.viewport.set_clear_mode(viewport: viewportObj, clear_mode: ncine.clear_mode)

Sets the viewport clear mode

set_depth_stencil_format

function ncine.viewport.set_depth_stencil_format(viewport: viewportObj, depth_stencil_format: ncine.depth_stencil_format)
  -> boolean

Sets the depth and stencil format of the viewport's FBO renderbuffer

@return — True if a new depth and stencil format has been successfully set

set_glframebuffer_label

function ncine.viewport.set_glframebuffer_label(viewport: viewportObj, label: string)

Sets the OpenGL object label for the viewport framebuffer object

set_rootnode

function ncine.viewport.set_rootnode(viewport: viewportObj, rootnode?: scenenodeObj)

Sets or removes the root node

set_scissor_rect

function ncine.viewport.set_scissor_rect(viewport: viewportObj, rect: ncine.rect)

Sets the OpenGL scissor test rectangle through a ncine.rect table

set_texture

function ncine.viewport.set_texture(viewport: viewportObj, index: integer, texture?: textureObj)
  -> boolean

Adds or removes a texture at the specified viewport's FBO color attachment index

@return — True if a texture has been added or removed successfully

set_viewport_rect

function ncine.viewport.set_viewport_rect(viewport: viewportObj, rect: ncine.rect)

Sets the OpenGL viewport rectangle through a ncine.rect table


ncine.viewport.clear_chain

function ncine.viewport.clear_chain()

ncine.viewport.delete

function ncine.viewport.delete(viewport: viewportObj)

ncine.viewport.get_camera

function ncine.viewport.get_camera(viewport: viewportObj)
  -> cameraObj?

ncine.viewport.get_clear_color

function ncine.viewport.get_clear_color(viewport: viewportObj)
  -> ncine.color

ncine.viewport.get_clear_mode

function ncine.viewport.get_clear_mode(viewport: viewportObj)
  -> ncine.clear_mode

ncine.viewport.get_culling_rect

function ncine.viewport.get_culling_rect(viewport: viewportObj)
  -> ncine.rect

ncine.viewport.get_depth_stencil_format

function ncine.viewport.get_depth_stencil_format(viewport: viewportObj)
  -> ncine.depth_stencil_format

ncine.viewport.get_height

function ncine.viewport.get_height(viewport: viewportObj)
  -> integer

ncine.viewport.get_last_frame_cleared

function ncine.viewport.get_last_frame_cleared(viewport: viewportObj)
  -> integer

ncine.viewport.get_num_color_attachments

function ncine.viewport.get_num_color_attachments(viewport: viewportObj)
  -> integer

ncine.viewport.get_rootnode

function ncine.viewport.get_rootnode(viewport: viewportObj)
  -> scenenodeObj?

ncine.viewport.get_scissor_rect

function ncine.viewport.get_scissor_rect(viewport: viewportObj)
  -> ncine.rect

ncine.viewport.get_texture

function ncine.viewport.get_texture(viewport: viewportObj, index: integer)
  -> textureObj?

ncine.viewport.get_type

function ncine.viewport.get_type(viewport: viewportObj)
  -> ncine.viewport_type

ncine.viewport.get_viewport_rect

function ncine.viewport.get_viewport_rect(viewport: viewportObj)
  -> ncine.rect

ncine.viewport.get_width

function ncine.viewport.get_width(viewport: viewportObj)
  -> integer

ncine.viewport.new

function ncine.viewport.new()
  -> viewportObj

ncine.viewport.push_back_chain

function ncine.viewport.push_back_chain(viewport: viewportObj)

ncine.viewport.push_front_chain

function ncine.viewport.push_front_chain(viewport: viewportObj)

ncine.viewport.remove_all_textures

function ncine.viewport.remove_all_textures(viewport: viewportObj)
  -> boolean

ncine.viewport.set_camera

function ncine.viewport.set_camera(viewport: viewportObj, camera?: cameraObj)

ncine.viewport.set_clear_color

function ncine.viewport.set_clear_color(viewport: viewportObj, clear_color: ncine.color)
function ncine.viewport.set_clear_color(viewport: viewportObj, r: number, g: number, b: number, a: number)

ncine.viewport.set_clear_mode

function ncine.viewport.set_clear_mode(viewport: viewportObj, clear_mode: ncine.clear_mode)

ncine.viewport.set_depth_stencil_format

function ncine.viewport.set_depth_stencil_format(viewport: viewportObj, depth_stencil_format: ncine.depth_stencil_format)
  -> boolean

ncine.viewport.set_glframebuffer_label

function ncine.viewport.set_glframebuffer_label(viewport: viewportObj, label: string)

ncine.viewport.set_rootnode

function ncine.viewport.set_rootnode(viewport: viewportObj, rootnode?: scenenodeObj)

ncine.viewport.set_scissor_rect

function ncine.viewport.set_scissor_rect(viewport: viewportObj, rect: ncine.rect)
function ncine.viewport.set_scissor_rect(viewport: viewportObj, x: integer, y: integer, w: integer, h: integer)

ncine.viewport.set_texture

function ncine.viewport.set_texture(viewport: viewportObj, index: integer, texture?: textureObj)
  -> boolean

ncine.viewport.set_viewport_rect

function ncine.viewport.set_viewport_rect(viewport: viewportObj, rect: ncine.rect)
function ncine.viewport.set_viewport_rect(viewport: viewportObj, x: integer, y: integer, w: integer, h: integer)

ncine.viewport_type

enum ncine.viewport_type

ncine.visit_order_state

enum ncine.visit_order_state

newproxy

function newproxy(proxy: boolean|table|userdata)
  -> userdata

next

function next(table: table<<K>, <V>>, index?: <K>)
  -> <K>?
  2. <V>?

nil


number


openmode


os

oslib

os.clock

function os.clock()
  -> number

os.date

function os.date(format?: string, time?: integer)
  -> string|osdate

os.difftime

function os.difftime(t2: integer, t1: integer)
  -> integer

os.execute

function os.execute(command?: string)
  -> suc: boolean?
  2. exitcode: ("exit"|"signal")?
  3. code: integer?

os.exit

function os.exit(code?: boolean|integer, close?: boolean)

os.getenv

function os.getenv(varname: string)
  -> string?

os.remove

function os.remove(filename: string)
  -> suc: boolean
  2. errmsg: string?

os.rename

function os.rename(oldname: string, newname: string)
  -> suc: boolean
  2. errmsg: string?

os.setlocale

function os.setlocale(locale: string|nil, category?: "all"|"collate"|"ctype"|"monetary"|"numeric"...(+1))
  -> localecategory: string

os.time

function os.time(date?: osdateparam)
  -> integer

os.tmpname

function os.tmpname()
  -> string

osdate

day

string|integer

1-31

View documents

hour

string|integer

0-23

View documents

isdst

boolean

daylight saving flag, a boolean

View documents

min

string|integer

0-59

View documents

month

string|integer

1-12

View documents

sec

string|integer

0-61

View documents

wday

string|integer

weekday, 1–7, Sunday is 1

View documents

yday

string|integer

day of the year, 1–366

View documents

year

string|integer

four digits

View documents


osdateparam

day

string|integer

1-31

View documents

hour

(string|integer)?

0-23

View documents

isdst

boolean?

daylight saving flag, a boolean

View documents

min

(string|integer)?

0-59

View documents

month

string|integer

1-12

View documents

sec

(string|integer)?

0-61

View documents

wday

(string|integer)?

weekday, 1–7, Sunday is 1

View documents

yday

(string|integer)?

day of the year, 1–366

View documents

year

string|integer

four digits

View documents


oslib

clock

function os.clock()
  -> number

Returns an approximation of the amount in seconds of CPU time used by the program.

View documents

date

function os.date(format?: string, time?: integer)
  -> string|osdate

Returns a string or a table containing date and time, formatted according to the given string format.

View documents

difftime

function os.difftime(t2: integer, t1: integer)
  -> integer

Returns the difference, in seconds, from time t1 to time t2.

View documents

execute

function os.execute(command?: string)
  -> suc: boolean?
  2. exitcode: ("exit"|"signal")?
  3. code: integer?

Passes command to be executed by an operating system shell.

View documents

exitcode:
    | "exit"
    | "signal"

exit

function os.exit(code?: boolean|integer, close?: boolean)

Calls the ISO C function exit to terminate the host program.

View documents

getenv

function os.getenv(varname: string)
  -> string?

Returns the value of the process environment variable varname.

View documents

remove

function os.remove(filename: string)
  -> suc: boolean
  2. errmsg: string?

Deletes the file with the given name.

View documents

rename

function os.rename(oldname: string, newname: string)
  -> suc: boolean
  2. errmsg: string?

Renames the file or directory named oldname to newname.

View documents

setlocale

function os.setlocale(locale: string|nil, category?: "all"|"collate"|"ctype"|"monetary"|"numeric"...(+1))
  -> localecategory: string

Sets the current locale of the program.

View documents

category:
   -> "all"
    | "collate"
    | "ctype"
    | "monetary"
    | "numeric"
    | "time"

time

function os.time(date?: osdateparam)
  -> integer

Returns the current time when called without arguments, or a time representing the local date and time specified by the given table.

View documents

tmpname

function os.tmpname()
  -> string

Returns a string with a file name that can be used for a temporary file.

View documents


package

packagelib

package.config

string

package.loaders

table

package.loadlib

function package.loadlib(libname: string, funcname: string)
  -> any

package.searchers

table

package.searchpath

function package.searchpath(name: string, path: string, sep?: string, rep?: string)
  -> filename: string?
  2. errmsg: string?

package.seeall

function package.seeall(module: table)

packagelib

config

string

A string describing some compile-time configurations for packages.

View documents

cpath

string

The path used by require to search for a C loader.

View documents

loaded

table

A table used by require to control which modules are already loaded.

View documents

loaders

table

A table used by require to control how to load modules.

View documents

loadlib

function package.loadlib(libname: string, funcname: string)
  -> any

Dynamically links the host program with the C library libname.

View documents

path

string

The path used by require to search for a Lua loader.

View documents

preload

table

A table to store loaders for specific modules.

View documents

searchers

table

A table used by require to control how to load modules.

View documents

searchpath

function package.searchpath(name: string, path: string, sep?: string, rep?: string)
  -> filename: string?
  2. errmsg: string?

Searches for the given name in the given path.

View documents

seeall

function package.seeall(module: table)

Sets a metatable for module with its __index field referring to the global environment, so that this module inherits values from the global environment. To be used as an option to function module .

View documents


pairs

function pairs(t: <T:table>)
  -> fun(table: table<<K>, <V>>, index?: <K>):<K>, <V>
  2. <T:table>

particle_initializer

amount

number|number[]

life

number|number[]

position

ncine.vec2|ncine.vec2[]

A two component vector

rotation

number|number[]

velocity

ncine.vec2|ncine.vec2[]

A two component vector


particle_initializer

particle_initializer

particlesystemObj


pcall

function pcall(f: fun(...any):...unknown, arg1?: any, ...any)
  -> success: boolean
  2. result: any
  3. ...any

pointer

id

integer

x

number

y

number

pointer

pointer

popenmode


print

function print(...any)

rawequal

function rawequal(v1: any, v2: any)
  -> boolean

rawget

function rawget(table: table, index: any)
  -> any

rawlen

function rawlen(v: string|table)
  -> len: integer

rawset

function rawset(table: table, index: any, value: any)
  -> table

readmode


reload_script

function reload_script()

rendering_settings

rendering_settings

rendering_settings

batching

boolean

True if sprite batching is enabled

batching_with_indices

boolean

True if using indices for vertex batching

culling

boolean

True if node culling is enabled

max_batch_size

integer

Maximum size for a batch before a forced split

min_batch_size

integer

Minimum size for a batch to be collected


require

function require(modname: string)
  -> unknown
  2. loaderdata: unknown

scenenodeObj


scroll_event

scroll_event

scroll_event

x

number

y

number

seekwhence


select

function select(index: integer|"#", ...any)
  -> any

setfenv

function setfenv(f: integer|fun(...any):...unknown, table: table)
  -> function

setmetatable

function setmetatable(table: table, metatable?: table|metatable)
  -> table

shaderObj


shaderstateObj


show_gui

function show_gui(show: boolean)

spriteObj


string

stringlib

string

byte

function string.byte(s: string|number, i?: integer, j?: integer)
  -> ...integer

Returns the internal numeric codes of the characters s[i], s[i+1], ..., s[j].

View documents

char

function string.char(byte: integer, ...integer)
  -> string

Returns a string with length equal to the number of arguments, in which each character has the internal numeric code equal to its corresponding argument.

View documents

dump

function string.dump(f: fun(...any):...unknown, strip?: boolean)
  -> string

Returns a string containing a binary representation (a binary chunk) of the given function.

View documents

find

function string.find(s: string|number, pattern: string|number, init?: integer, plain?: boolean)
  -> start: integer|nil
  2. end: integer|nil
  3. ...any

Looks for the first match of pattern (see §6.4.1) in the string.

View documents

@return start

@return end

@return ... — captured

format

function string.format(s: string|number, ...any)
  -> string

Returns a formatted version of its variable number of arguments following the description given in its first argument.

View documents

gmatch

function string.gmatch(s: string|number, pattern: string|number, init?: integer)
  -> fun():string, ...unknown

Returns an iterator function that, each time it is called, returns the next captures from pattern (see §6.4.1) over the string s.

As an example, the following loop will iterate over all the words from string s, printing one per line:

    s =
"hello world from Lua"
    for w in string.gmatch(s, "%a+") do
        print(w)
    end

View documents

gsub

function string.gsub(s: string|number, pattern: string|number, repl: string|number|function|table, n?: integer)
  -> string
  2. count: integer

Returns a copy of s in which all (or the first n, if given) occurrences of the pattern (see §6.4.1) have been replaced by a replacement string specified by repl.

View documents

len

function string.len(s: string|number)
  -> integer

Returns its length.

View documents

lower

function string.lower(s: string|number)
  -> string

Returns a copy of this string with all uppercase letters changed to lowercase.

View documents

match

function string.match(s: string|number, pattern: string|number, init?: integer)
  -> ...any

Looks for the first match of pattern (see §6.4.1) in the string.

View documents

pack

function string.pack(fmt: string, v1: string|number, v2?: string|number, ...string|number)
  -> binary: string

Returns a binary string containing the values v1, v2, etc. packed (that is, serialized in binary form) according to the format string fmt (see §6.4.2) .

View documents

packsize

function string.packsize(fmt: string)
  -> integer

Returns the size of a string resulting from string.pack with the given format string fmt (see §6.4.2) .

View documents

rep

function string.rep(s: string|number, n: integer, sep?: string|number)
  -> string

Returns a string that is the concatenation of n copies of the string s separated by the string sep.

View documents

reverse

function string.reverse(s: string|number)
  -> string

Returns a string that is the string s reversed.

View documents

sub

function string.sub(s: string|number, i: integer, j?: integer)
  -> string

Returns the substring of the string that starts at i and continues until j.

View documents

unpack

function string.unpack(fmt: string, s: string, pos?: integer)
  -> ...any
  2. offset: integer

Returns the values packed in string according to the format string fmt (see §6.4.2) .

View documents

upper

function string.upper(s: string|number)
  -> string

Returns a copy of this string with all lowercase letters changed to uppercase.

View documents


string.byte

function string.byte(s: string|number, i?: integer, j?: integer)
  -> ...integer

string.char

function string.char(byte: integer, ...integer)
  -> string

string.dump

function string.dump(f: fun(...any):...unknown, strip?: boolean)
  -> string

string.find

function string.find(s: string|number, pattern: string|number, init?: integer, plain?: boolean)
  -> start: integer|nil
  2. end: integer|nil
  3. ...any

string.format

function string.format(s: string|number, ...any)
  -> string

string.gmatch

function string.gmatch(s: string|number, pattern: string|number, init?: integer)
  -> fun():string, ...unknown

string.gsub

function string.gsub(s: string|number, pattern: string|number, repl: string|number|function|table, n?: integer)
  -> string
  2. count: integer

string.len

function string.len(s: string|number)
  -> integer

string.lower

function string.lower(s: string|number)
  -> string

string.match

function string.match(s: string|number, pattern: string|number, init?: integer)
  -> ...any

string.pack

function string.pack(fmt: string, v1: string|number, v2?: string|number, ...string|number)
  -> binary: string

string.packsize

function string.packsize(fmt: string)
  -> integer

string.rep

function string.rep(s: string|number, n: integer, sep?: string|number)
  -> string

string.reverse

function string.reverse(s: string|number)
  -> string

string.sub

function string.sub(s: string|number, i: integer, j?: integer)
  -> string

string.unpack

function string.unpack(fmt: string, s: string, pos?: integer)
  -> ...any
  2. offset: integer

string.upper

function string.upper(s: string|number)
  -> string

stringlib

byte

function string.byte(s: string|number, i?: integer, j?: integer)
  -> ...integer

Returns the internal numeric codes of the characters s[i], s[i+1], ..., s[j].

View documents

char

function string.char(byte: integer, ...integer)
  -> string

Returns a string with length equal to the number of arguments, in which each character has the internal numeric code equal to its corresponding argument.

View documents

dump

function string.dump(f: fun(...any):...unknown, strip?: boolean)
  -> string

Returns a string containing a binary representation (a binary chunk) of the given function.

View documents

find

function string.find(s: string|number, pattern: string|number, init?: integer, plain?: boolean)
  -> start: integer|nil
  2. end: integer|nil
  3. ...any

Looks for the first match of pattern (see §6.4.1) in the string.

View documents

@return start

@return end

@return ... — captured

format

function string.format(s: string|number, ...any)
  -> string

Returns a formatted version of its variable number of arguments following the description given in its first argument.

View documents

gmatch

function string.gmatch(s: string|number, pattern: string|number, init?: integer)
  -> fun():string, ...unknown

Returns an iterator function that, each time it is called, returns the next captures from pattern (see §6.4.1) over the string s.

As an example, the following loop will iterate over all the words from string s, printing one per line:

    s =
"hello world from Lua"
    for w in string.gmatch(s, "%a+") do
        print(w)
    end

View documents

gsub

function string.gsub(s: string|number, pattern: string|number, repl: string|number|function|table, n?: integer)
  -> string
  2. count: integer

Returns a copy of s in which all (or the first n, if given) occurrences of the pattern (see §6.4.1) have been replaced by a replacement string specified by repl.

View documents

len

function string.len(s: string|number)
  -> integer

Returns its length.

View documents

lower

function string.lower(s: string|number)
  -> string

Returns a copy of this string with all uppercase letters changed to lowercase.

View documents

match

function string.match(s: string|number, pattern: string|number, init?: integer)
  -> ...any

Looks for the first match of pattern (see §6.4.1) in the string.

View documents

pack

function string.pack(fmt: string, v1: string|number, v2?: string|number, ...string|number)
  -> binary: string

Returns a binary string containing the values v1, v2, etc. packed (that is, serialized in binary form) according to the format string fmt (see §6.4.2) .

View documents

packsize

function string.packsize(fmt: string)
  -> integer

Returns the size of a string resulting from string.pack with the given format string fmt (see §6.4.2) .

View documents

rep

function string.rep(s: string|number, n: integer, sep?: string|number)
  -> string

Returns a string that is the concatenation of n copies of the string s separated by the string sep.

View documents

reverse

function string.reverse(s: string|number)
  -> string

Returns a string that is the string s reversed.

View documents

sub

function string.sub(s: string|number, i: integer, j?: integer)
  -> string

Returns the substring of the string that starts at i and continues until j.

View documents

unpack

function string.unpack(fmt: string, s: string, pos?: integer)
  -> ...any
  2. offset: integer

Returns the values packed in string according to the format string fmt (see §6.4.2) .

View documents

upper

function string.upper(s: string|number)
  -> string

Returns a copy of this string with all lowercase letters changed to uppercase.

View documents


table

tablelib

table


table.concat

function table.concat(list: table, sep?: string, i?: integer, j?: integer)
  -> string

table.foreach

function table.foreach(list: any, callback: fun(key: string, value: any):<T>|nil)
  -> <T>|nil

table.foreachi

function table.foreachi(list: any, callback: fun(key: string, value: any):<T>|nil)
  -> <T>|nil

table.getn

function table.getn(list: <T>[])
  -> integer

table.insert

function table.insert(list: table, pos: integer, value: any)

table.maxn

function table.maxn(table: table)
  -> integer

table.move

function table.move(a1: table, f: integer, e: integer, t: integer, a2?: table)
  -> a2: table

table.pack

function table.pack(...any)
  -> table

table.remove

function table.remove(list: table, pos?: integer)
  -> any

table.sort

function table.sort(list: <T>[], comp?: fun(a: <T>, b: <T>):boolean)

table.unpack

function table.unpack(list: <T>[], i?: integer, j?: integer)
  -> ...<T>

tablelib

concat

function table.concat(list: table, sep?: string, i?: integer, j?: integer)
  -> string

Given a list where all elements are strings or numbers, returns the string list[i]..sep..list[i+1] ··· sep..list[j].

View documents

foreach

function table.foreach(list: any, callback: fun(key: string, value: any):<T>|nil)
  -> <T>|nil

Executes the given f over all elements of table. For each element, f is called with the index and respective value as arguments. If f returns a non-nil value, then the loop is broken, and this value is returned as the final value of foreach.

View documents

foreachi

function table.foreachi(list: any, callback: fun(key: string, value: any):<T>|nil)
  -> <T>|nil

Executes the given f over the numerical indices of table. For each index, f is called with the index and respective value as arguments. Indices are visited in sequential order, from 1 to n, where n is the size of the table. If f returns a non-nil value, then the loop is broken and this value is returned as the result of foreachi.

View documents

getn

function table.getn(list: <T>[])
  -> integer

Returns the number of elements in the table. This function is equivalent to #list.

View documents

insert

function table.insert(list: table, pos: integer, value: any)

Inserts element value at position pos in list.

View documents

maxn

function table.maxn(table: table)
  -> integer

Returns the largest positive numerical index of the given table, or zero if the table has no positive numerical indices.

View documents

move

function table.move(a1: table, f: integer, e: integer, t: integer, a2?: table)
  -> a2: table

Moves elements from table a1 to table a2.

a2[t],··· =
a1[f],···,a1[e]
return a2

View documents

pack

function table.pack(...any)
  -> table

Returns a new table with all arguments stored into keys 1, 2, etc. and with a field "n" with the total number of arguments.

View documents

remove

function table.remove(list: table, pos?: integer)
  -> any

Removes from list the element at position pos, returning the value of the removed element.

View documents

sort

function table.sort(list: <T>[], comp?: fun(a: <T>, b: <T>):boolean)

Sorts list elements in a given order, in-place, from list[1] to list[#list].

View documents

unpack

function table.unpack(list: <T>[], i?: integer, j?: integer)
  -> ...<T>

Returns the elements from the given list. This function is equivalent to

    return list[i], list[i+1], ···, list[j]

By default, i is 1 and j is #list.

View documents


text_input_event

text_input_event

text_input_event

text

string

textnodeObj


textureObj


thread


tonumber

function tonumber(e: any)
  -> number?

tostring

function tostring(v: any)
  -> string

touch_event

action_index

integer

count

integer

pointers

pointer[]

touch_event

touch_event

true


type


type

function type(v: any)
  -> type: "boolean"|"function"|"nil"|"number"|"string"...(+3)

unknown


unpack

function unpack(list: <T>[], i?: integer, j?: integer)
  -> ...<T>
function unpack(list: { [1]: <T1>, [2]: <T2>, [3]: <T3>, [4]: <T4>, [5]: <T5>, [6]: <T6>, [7]: <T7>, [8]: <T8>, [9]: <T9> })
  -> <T1>
  2. <T2>
  3. <T3>
  4. <T4>
  5. <T5>
  6. <T6>
  7. <T7>
  8. <T8>
  9. <T9>

userdata


utf8

utf8lib

utf8.char

function utf8.char(code: integer, ...integer)
  -> string

utf8.codepoint

function utf8.codepoint(s: string, i?: integer, j?: integer, lax?: boolean)
  -> code: integer
  2. ...integer

utf8.codes

function utf8.codes(s: string, lax?: boolean)
  -> fun(s: string, p: integer):integer, integer

utf8.len

function utf8.len(s: string, i?: integer, j?: integer, lax?: boolean)
  -> integer?
  2. errpos: integer?

utf8.offset

function utf8.offset(s: string, n: integer, i?: integer)
  -> p: integer

utf8lib

char

function utf8.char(code: integer, ...integer)
  -> string

Receives zero or more integers, converts each one to its corresponding UTF-8 byte sequence and returns a string with the concatenation of all these sequences.

View documents

charpattern

string

The pattern which matches exactly one UTF-8 byte sequence, assuming that the subject is a valid UTF-8 string.

View documents

codepoint

function utf8.codepoint(s: string, i?: integer, j?: integer, lax?: boolean)
  -> code: integer
  2. ...integer

Returns the codepoints (as integers) from all characters in s that start between byte position i and j (both included).

View documents

codes

function utf8.codes(s: string, lax?: boolean)
  -> fun(s: string, p: integer):integer, integer

Returns values so that the construction

for p, c in utf8.codes(s) do
    body
end

will iterate over all UTF-8 characters in string s, with p being the position (in bytes) and c the code point of each character. It raises an error if it meets any invalid byte sequence.

View documents

len

function utf8.len(s: string, i?: integer, j?: integer, lax?: boolean)
  -> integer?
  2. errpos: integer?

Returns the number of UTF-8 characters in string s that start between positions i and j (both inclusive).

View documents

offset

function utf8.offset(s: string, n: integer, i?: integer)
  -> p: integer

Returns the position (in bytes) where the encoding of the n-th character of s (counting from position i) starts.

View documents


vbuf


video_mode

video_mode

video_mode

blue_bits

integer

The number of bits for the blue channel

green_bits

integer

The number of bits for the green channel

height

integer

The video height

red_bits

integer

The number of bits for the red channel

refresh_rate

number

The refresh rate in Hz

width

integer

The video width


viewportObj


warn

function warn(message: string, ...any)

xpcall

function xpcall(f: fun(...any):...unknown, msgh: function, arg1?: any, ...any)
  -> success: boolean
  2. result: any
  3. ...any