_G
string
accelerometer_event
number
number
number
affector_color_step
number
Age
ncine.color
Color
number
Age
ncine.vec2
position
affector_position_step
number
Age
number
Angle
affector_rotation_step
number
Age
ncine.vec2
Scale
affector_size_step
number
Age
ncine.vec2
Velocity
affector_velocity_step
string[]
function assert(v?: <T>, message?: any, ...any)
-> <T>
2. ...any
audio_auto_wah_properties
number
number
number
number
audio_chorus_properties
number
number
number
integer
number
integer
0 for sinusoid, 1 for triangle
audio_compressor_properties
integer
0 or 1
number
number
number
number
number
audio_distortion_properties
number
integer
number
number
number
number
number
number
number
number
number
number
number
number
number
ncine.vec3
A three component vector
number
number
number
number
number
ncine.vec3
A three component vector
number
audio_eax_reverb_properties
audio_echo_properties
number
number
number
number
number
number
number
number
number
number
number
number
number
number
number
audio_equalizer_properties
number
number
number
ncine.audio_filter_type
Audio filter types
audio_filter_properties
audio_flanger_properties
number
number
number
integer
number
integer
0 for sinusoid, 1 for triangle
audio_frequency_shifter_properties
number
integer
From 0 to 2
integer
From 0 to 2
audio_pitch_shifter_properties
integer
From -12 to 12
integer
From -50 to 50
audio_reverb_properties
number
integer
number
number
number
number
number
number
number
number
number
number
number
number
number
integer
0 for sinusoid, 1 for sawtooth, 2 for square
audio_ring_modulator_properties
audio_vocal_morpher_properties
integer
From 0 to 29 (A to Z)
integer
From -24 to 24
integer
From 0 to 29 (A to Z)
integer
From -24 to 24
number
integer
0 for sinusoid, 1 for triangle, 2 for sawtooth
number
number
number
number
number
number
number
number
function collectgarbage(opt?: "collect"|"count"|"generational"|"incremental"|"isrunning"...(+3), ...any)
-> any
coroutinelib
function coroutine.close(co: thread)
-> noerror: boolean
2. errorobject: any
function coroutine.create(f: fun(...any):...unknown)
-> thread
function coroutine.isyieldable(co?: thread)
-> boolean
function coroutine.resume(co: thread, val1?: any, ...any)
-> success: boolean
2. ...any
function coroutine.running()
-> running: thread
2. ismain: boolean
function coroutine.status(co: thread)
-> "dead"|"normal"|"running"|"suspended"
function coroutine.wrap(f: fun(...any):...unknown)
-> fun(...any):...unknown
(async) function coroutine.yield(...any)
-> ...any
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
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
function coroutine.isyieldable(co?: thread)
-> boolean
Returns true when the coroutine co
can yield. The default for co
is the running coroutine.
View documents
function coroutine.resume(co: thread, val1?: any, ...any)
-> success: boolean
2. ...any
Starts or continues the execution of coroutine co
.
View documents
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
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.
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
(async) function coroutine.yield(...any)
-> ...any
Suspends the execution of the calling coroutine.
View documents
debuglib
function debug.debug()
function debug.getfenv(o: any)
-> table
function debug.gethook(co?: thread)
-> hook: function
2. mask: string
3. count: integer
function debug.getinfo(thread: thread, f: integer|fun(...any):...unknown, what?: string|"L"|"S"|"f"|"l"...(+4))
-> debuginfo
function debug.getlocal(thread: thread, f: integer|fun(...any):...unknown, index: integer)
-> name: string
2. value: any
function debug.getmetatable(object: any)
-> metatable: table
function debug.getregistry()
-> table
function debug.getupvalue(f: fun(...any):...unknown, up: integer)
-> name: string
2. value: any
function debug.getuservalue(u: userdata, n?: integer)
-> any
2. boolean
function debug.setcstacklimit(limit: integer)
-> boolean|integer
function debug.setfenv(object: <T>, env: table)
-> object: <T>
function debug.sethook(thread: thread, hook: fun(...any):...unknown, mask: string|"c"|"l"|"r", count?: integer)
function debug.setlocal(thread: thread, level: integer, index: integer, value: any)
-> name: string
function debug.setmetatable(value: <T>, meta?: table)
-> value: <T>
function debug.setupvalue(f: fun(...any):...unknown, up: integer, value: any)
-> name: string
function debug.setuservalue(udata: userdata, value: any, n?: integer)
-> udata: userdata
function debug.traceback(thread: thread, message?: any, level?: integer)
-> message: string
function debug.upvalueid(f: fun(...any):...unknown, n: integer)
-> id: lightuserdata
function debug.upvaluejoin(f1: fun(...any):...unknown, n1: integer, f2: fun(...any):...unknown, n2: integer)
boolean
True if showing the information text
boolean
True if showing the debug interface
boolean
True if showing the profiler graphs
debug_overlay_settings
table
integer
integer
function
boolean
boolean
integer
integer
string
string
integer
integer
integer
string
string
string
function debug.debug()
Enters an interactive mode with the user, running each string that the user enters.
View documents
function debug.getfenv(o: any)
-> table
Returns the environment of object o
.
View documents
function debug.gethook(co?: thread)
-> hook: function
2. mask: string
3. count: integer
Returns the current hook settings of the thread.
View documents
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`
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
function debug.getmetatable(object: any)
-> metatable: table
Returns the metatable of the given value.
View documents
function debug.getregistry()
-> table
Returns the registry table.
View documents
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
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
function debug.setcstacklimit(limit: integer)
-> boolean|integer
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
function debug.setfenv(object: <T>, env: table)
-> object: <T>
Sets the environment of the given object
to the given table
.
View documents
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.
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
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
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
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
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
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
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
function dofile(filename?: string)
-> ...any
function error(message: any, level?: integer)
(method) file*:close()
-> suc: boolean?
2. exitcode: ("exit"|"signal")?
3. code: integer?
Close file
.
View documents
exitcode:
| "exit"
| "signal"
(method) file*:flush()
Saves any written data to file
.
View documents
(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.
(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.
(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.
(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.
(method) file*:write(...string|number)
-> file*?
2. errmsg: string?
Writes the value of each of its arguments to file
.
View documents
integer
integer
integer
integer
integer
integer
integer
function getfenv(f?: integer|fun(...any):...unknown)
-> table
function getmetatable(object: any)
-> metatable: table
integer
ImGui drawable node layer
viewportObj
ImGui viewport
integer
Nuklear drawable node layer
viewportObj
Nuklear viewport
gui_settings
iolib
function io.close(file?: file*)
-> suc: boolean?
2. exitcode: ("exit"|"signal")?
3. code: integer?
function io.flush()
function io.input(file: string|file*)
function io.lines(filename?: string, ...string|integer|"L"|"a"|"l"...(+1))
-> fun():any, ...unknown
function io.open(filename: string, mode?: "a"|"a+"|"a+b"|"ab"|"r"...(+7))
-> file*?
2. errmsg: string?
function io.output(file: string|file*)
function io.popen(prog: string, mode?: "r"|"w")
-> file*?
2. errmsg: string?
function io.read(...string|integer|"L"|"a"|"l"...(+1))
-> any
2. ...any
function io.tmpfile()
-> file*
function io.type(file: file*)
-> "closed file"|"file"|`nil`
function io.write(...any)
-> file*
2. errmsg: string?
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"
function io.flush()
Saves any written data to default output file.
View documents
function io.input(file: string|file*)
Sets file
as the default input file.
View documents
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.
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.)
function io.output(file: string|file*)
Sets file
as the default output file.
View documents
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`.
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.
file*
standard error.
View documents
file*
standard input.
View documents
file*
standard output.
View documents
function io.tmpfile()
-> file*
In case of success, returns a handle for a temporary file.
View documents
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.
function io.write(...any)
-> file*
2. errmsg: string?
Writes the value of each of its arguments to default output file.
View documents
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
integer
integer
number
number
integer
integer
joy_button_event
joy_connection_event
integer
integer
ncine.joy_hat_state
Joystick hat states
integer
joy_hat_event
joymapped_axis_event
joymapped_button_event
ncine.joy_axis
Joystick axis names
integer
number
ncine.joy_button
Joystick button names
integer
integer
integer
integer
keyboard_event
function load(chunk: string|function, chunkname?: string, mode?: "b"|"bt"|"t", env?: table)
-> function?
2. error_message: string?
function loadfile(filename?: string, mode?: "b"|"bt"|"t", env?: table)
-> function?
2. error_message: string?
function loadstring(text: string, chunkname?: string)
-> function?
2. error_message: string?
mathlib
function math.abs(x: <Number:number>)
-> <Number:number>
function math.acos(x: number)
-> number
function math.asin(x: number)
-> number
function math.atan(y: number, x?: number)
-> number
function math.atan2(y: number, x: number)
-> number
function math.ceil(x: number)
-> integer
function math.cos(x: number)
-> number
function math.cosh(x: number)
-> number
function math.deg(x: number)
-> number
function math.exp(x: number)
-> number
function math.floor(x: number)
-> integer
function math.fmod(x: number, y: number)
-> number
function math.frexp(x: number)
-> m: number
2. e: number
function math.ldexp(m: number, e: number)
-> number
function math.log(x: number, base?: integer)
-> number
function math.log10(x: number)
-> number
function math.max(x: <Number:number>, ...<Number:number>)
-> <Number:number>
function math.min(x: <Number:number>, ...<Number:number>)
-> <Number:number>
function math.modf(x: number)
-> integer
2. number
function math.pow(x: number, y: number)
-> number
function math.rad(x: number)
-> number
function math.random(m: integer, n: integer)
-> integer
function math.randomseed(x?: integer, y?: integer)
function math.sin(x: number)
-> number
function math.sinh(x: number)
-> number
function math.sqrt(x: number)
-> number
function math.tan(x: number)
-> number
function math.tanh(x: number)
-> number
function math.tointeger(x: any)
-> integer?
function math.type(x: any)
-> "float"|"integer"|'nil'
function math.ult(m: integer, n: integer)
-> boolean
function math.abs(x: <Number:number>)
-> <Number:number>
Returns the absolute value of x
.
View documents
function math.acos(x: number)
-> number
Returns the arc cosine of x
(in radians).
View documents
function math.asin(x: number)
-> number
Returns the arc sine of x
(in radians).
View documents
function math.atan(y: number, x?: number)
-> number
Returns the arc tangent of y/x
(in radians).
View documents
function math.atan2(y: number, x: number)
-> number
Returns the arc tangent of y/x
(in radians).
View documents
function math.ceil(x: number)
-> integer
Returns the smallest integral value larger than or equal to x
.
View documents
function math.cos(x: number)
-> number
Returns the cosine of x
(assumed to be in radians).
View documents
function math.cosh(x: number)
-> number
Returns the hyperbolic cosine of x
(assumed to be in radians).
View documents
function math.deg(x: number)
-> number
Converts the angle x
from radians to degrees.
View documents
function math.exp(x: number)
-> number
Returns the value e^x
(where e
is the base of natural logarithms).
View documents
function math.floor(x: number)
-> integer
Returns the largest integral value smaller than or equal to x
.
View documents
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
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
number
A value larger than any other numeric value.
View documents
function math.ldexp(m: number, e: number)
-> number
Returns m * (2 ^ e)
.
View documents
function math.log(x: number, base?: integer)
-> number
Returns the logarithm of x
in the given base.
View documents
function math.log10(x: number)
-> number
Returns the base-10 logarithm of x.
View documents
function math.max(x: <Number:number>, ...<Number:number>)
-> <Number:number>
Returns the argument with the maximum value, according to the Lua operator <
.
View documents
integer
Miss locale <math.maxinteger>
View documents
function math.min(x: <Number:number>, ...<Number:number>)
-> <Number:number>
Returns the argument with the minimum value, according to the Lua operator <
.
View documents
integer
Miss locale <math.mininteger>
View documents
function math.modf(x: number)
-> integer
2. number
Returns the integral part of x
and the fractional part of x
.
View documents
number
The value of π.
View documents
function math.pow(x: number, y: number)
-> number
Returns x ^ y
.
View documents
function math.rad(x: number)
-> number
Converts the angle x
from degrees to radians.
View documents
function math.random(m: integer, n: integer)
-> integer
-
math.random()
: Returns a float in the range [0,1). -
math.random(n)
: Returns a integer in the range [1, n]. -
math.random(m, n)
: Returns a integer in the range [m, n].
View documents
function math.randomseed(x?: integer, y?: integer)
-
math.randomseed(x, y)
: Concatenatex
andy
into a 128-bitseed
to reinitialize the pseudo-random generator. -
math.randomseed(x)
: Equate tomath.randomseed(x, 0)
. -
math.randomseed()
: Generates a seed with a weak attempt for randomness.
View documents
function math.sin(x: number)
-> number
Returns the sine of x
(assumed to be in radians).
View documents
function math.sinh(x: number)
-> number
Returns the hyperbolic sine of x
(assumed to be in radians).
View documents
function math.sqrt(x: number)
-> number
Returns the square root of x
.
View documents
function math.tan(x: number)
-> number
Returns the tangent of x
(assumed to be in radians).
View documents
function math.tanh(x: number)
-> number
Returns the hyperbolic tangent of x
(assumed to be in radians).
View documents
function math.tointeger(x: any)
-> integer?
Miss locale <math.tointeger>
View documents
function math.type(x: any)
-> "float"|"integer"|'nil'
Miss locale <math.type>
View documents
return #1:
| "integer"
| "float"
| 'nil'
function math.ult(m: integer, n: integer)
-> boolean
Miss locale <math.ult>
View documents
number
number
number
number
mesh_sprite_vertex
mesh_sprite_vertex_notexture
number
number
fun(t1: any, t2: any):any|nil
fun(t1: any, t2: any):any|nil
fun(t: any):any|nil
fun(t1: any, t2: any):any|nil
fun(t1: any, t2: any):any|nil
fun(t: any, ...any):...unknown|nil
fun(t: any, errobj: any):any|nil
fun(t1: any, t2: any):any|nil
fun(t1: any, t2: any):any|nil
fun(t1: any, t2: any):boolean|nil
fun(t: any)|nil
fun(t1: any, t2: any):any|nil
table|fun(t: any, k: any):any|nil
fun(t1: any, t2: any):boolean|nil
fun(t: any):integer|nil
fun(t1: any, t2: any):boolean|nil
any
fun(t1: any, t2: any):any|nil
'k'|'kv'|'v'|nil
fun(t1: any, t2: any):any|nil
table|fun(t: any, k: any, v: any)|nil
fun(t: any):fun(t: any, k: any, v: any):any, any, any, any|nil
fun(t1: any, t2: any):any|nil
fun(t1: any, t2: any):any|nil
fun(t1: any, t2: any):any|nil
fun(t1: any, t2: any):any|nil
fun(t: any):string|nil
fun(t: any):any|nil
function module(name: string, ...any)
ncine.vec2
The horizontal and vertical dots per inch
string
The monitor name
integer
The number of video modes in the array
ncine.vec2
The position of the monitor's viewport on the virtual screen
ncine.vec2
The content scale factor
video_mode[]
The array of supported video modes
monitor
ncine.mouse_button
Mouse buttons
number
number
mouse_event
boolean
It is true
if the fifth mouse button is pressed
boolean
It is true
if the fourth mouse button is pressed
boolean
It is true
if the left mouse button is pressed
boolean
It is true
if the middle mouse button is pressed
boolean
TIt is true
if the right mouse button is pressed
integer
Pointer position on the X axis
integer
Pointer position on the Y axis
mouse_state
ncine
boolean
True if running on Android
boolean
True if linked with a debug build of the nCine library
boolean
True if running on the web via Emscripten
boolean
True if running on Linux
boolean
True if running on macOS
boolean
True if running on MinGW
boolean
True if running on Windows
string
The git branch
string
The git last commit date
string
The git revision count
string
The git short hash
string
The git tag
string
The version string
enum ncine.affector_type
ncine.animated_sprite
The table containing animated sprite related functions
ncine.app_configuration
The application configuration table
ncine.application
The table containing application related functions
ncine.audio_device
The table containing the audio device related functions
ncine.audio_effect
The table containing audio effect related functions
ncine.audio_effect_properties
The table containing audio effect properties related functions
ncine.audio_effect_slot
The table containing audio effect slot related functions
enum ncine.audio_effect_type
ncine.audio_filter
The table containing audio filter related functions
enum ncine.audio_filter_type
ncine.audio_player
The table containing audio player related functions
ncine.audiobuffer
The table containing audio buffer related functions
ncine.audiobuffer_player
The table containing audio buffer player related functions
ncine.audiostream_player
The table containing audio stream player related functions
ncine.base_sprite
The table containing base sprite related functions
enum ncine.blending_factor
enum ncine.blending_preset
ncine.camera
The table containing camera related functions
enum ncine.clear_mode
ncine.color
A RGBA color
table
enum ncine.depth_stencil_format
ncine.drawable_node
The table containing drawable node related functions
enum ncine.efx_reverb_presets
ncine.font
The table containing font related functions
enum ncine.font_render_mode
ncine.frame_timer
The table containing frame timer related functions
ncine.fs
The table containing filesystem related functions
ncine.gfx_device
The table containing the graphics device related functions
table
Utility methods to calculate a 64bit hash from strings or files
ncine.input
The table containing the input manager related functions
enum ncine.joy_axis
enum ncine.joy_button
table
Joystick dead zone values for various axes
From XInput.h
in DirectX SDK
enum ncine.joy_hat_state
enum ncine.keymod
enum ncine.keysym
ncine.log
The logging class
enum ncine.log_level
enum ncine.loop_mode
ncine.mesh_sprite
The table containing mesh sprite related functions
enum ncine.mouse_button
enum ncine.mouse_cursor_mode
function ncine.on_acceleration(event: accelerometer_event)
Callback function called at fixed time with the updated reading from the accelerometer sensor
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
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
function ncine.on_frame_end()
A callback that is called at the end of each frame, just before swapping drawing buffers
function ncine.on_frame_start()
A callback that is called every time a new frame starts
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.
function ncine.on_joy_axis_moved(event: joy_axis_event)
Callback function called every time a joystick axis is moved
function ncine.on_joy_button_pressed(event: joy_button_event)
Callback function called every time a joystick button is pressed
function ncine.on_joy_button_released(event: joy_button_event)
Callback function called every time a joystick button is released
function ncine.on_joy_connected(event: joy_connection_event)
Callback function called every time a joystick is connected
function ncine.on_joy_disconnected(event: joy_connection_event)
Callback function called every time a joystick is disconnected
function ncine.on_joy_hat_moved(event: joy_hat_event)
Callback function called every time a joystick hat is 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
function ncine.on_joymapped_button_pressed(event: joymapped_button_event)
Callback function called every time a button of a joystick with mapping is pressed
function ncine.on_joymapped_button_released(event: joymapped_button_event)
Callback function called every time a button of a joystick with mapping is released
function ncine.on_key_pressed(event: keyboard_event)
Callback function called every time a key is pressed
function ncine.on_key_released(event: keyboard_event)
Callback function called every time a key is released
function ncine.on_mouse_button_pressed(event: mouse_event)
Callback function called every time a mouse button is pressed
function ncine.on_mouse_button_released(event: mouse_event)
Callback function called every time a mouse button is released
function ncine.on_mouse_moved(event: mouse_state)
Callback function called every time the mouse is moved
function ncine.on_pointer_down(event: touch_event)
Callback function called every time a screen touch different than the first one is made
function ncine.on_pointer_up(event: touch_event)
Callback function called every time a screen touch different than the last one is released
function ncine.on_post_update()
A callback that is called every time the scenegraph has been traversed and all nodes have been transformed
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
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
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
function ncine.on_resume()
A callback that is called every time the application resumes from suspension
function ncine.on_scroll_input(event: scroll_event)
Callback function called every time a scroll input occurs (mouse wheel, touchpad gesture, etc.)
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()
function ncine.on_suspend()
A callback that is called every time the application needs to be suspended
function ncine.on_text_input(event: text_input_event)
Callback function called every time a text input is generated
function ncine.on_touch_down(event: touch_event)
Callback function called every time the first screen touch is made
function ncine.on_touch_move(event: touch_event)
Callback function called every time a screen touch is moved
function ncine.on_touch_up(event: touch_event)
Callback function called every time the last screen touch is released
ncine.particle_affector
The table containing particle affectors related functions
ncine.particle_system
The table containing particle system related functions
enum ncine.permission
ncine.rect
A rectangle in 2D
ncine.rect_animation
A rectangle based animation data table
enum ncine.rewind_mode
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.
ncine.shader
The table containing shader related functions
enum ncine.shader_default_fragment
enum ncine.shader_default_vertex
enum ncine.shader_introspection
ncine.shaderstate
The table containing shader state related functions
ncine.sprite
The table containing sprite related functions
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
enum ncine.tex_filtering
enum ncine.tex_format
enum ncine.tex_wrap
enum ncine.text_alignment
ncine.textnode
The table containing textnode related functions
ncine.texture
The table containing texture related functions
enum ncine.texture_cut_mode
table
Timestamping related functions
ncine.vec2
A two component vector
ncine.vec3
A three component vector
ncine.vec4
A four component vector
ncine.viewport
The table containing viewport related functions
enum ncine.viewport_type
enum ncine.visit_order_state
enum ncine.affector_type
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
}
function ncine.scenenode.add_child(parent: scenenodeObj, node: scenenodeObj)
-> boolean
Adds a child node to the specified parent
@return — true
if the node has been added
function ncine.animated_sprite.clear_animations(sprite: animatedspriteObj)
Deletes all animations
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
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
function ncine.drawable_node.get_aabb(node: drawablenodeObj)
-> ncine.rect
Returns the axis-aligned bounding box of the node area in the last frame
function ncine.scenenode.get_abs_anchor_point(node: scenenodeObj)
-> ncine.vec2
Returns the absolute transformation anchor point in pixels
function ncine.scenenode.get_alpha(node: scenenodeObj)
-> number
Returns the node alpha color component
function ncine.drawable_node.get_anchor_point(node: drawablenodeObj)
-> ncine.vec2
Returns the transformation anchor point
function ncine.animated_sprite.get_animation_index(sprite: animatedspriteObj)
-> integer
Returns the index of current animation
function ncine.scenenode.get_child(node: scenenodeObj, index: integer)
-> scenenodeObj?
Returns the n-th child
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
function ncine.scenenode.get_children(node: scenenodeObj)
-> scenenodeObj[]
Returns the array of children
function ncine.scenenode.get_color(node: scenenodeObj)
-> ncine.color
Returns the node color
function ncine.drawable_node.get_dest_blending_factor(node: drawablenodeObj)
-> ncine.blending_factor
Returns the destination blending factor
function ncine.animated_sprite.get_frame(sprite: animatedspriteObj)
-> integer
Returns the frame number in current animation
function ncine.drawable_node.get_height(node: drawablenodeObj)
-> number
Returns the height of the node area
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)
function ncine.scenenode.get_last_frame_updated(node: scenenodeObj)
-> integer
Returns the last frame in which any of the viewports have updated this node
function ncine.scenenode.get_layer(node: scenenodeObj)
-> integer
Returns the node rendering layer
function ncine.scenenode.get_parent(node: scenenodeObj)
-> scenenodeObj?
Returns the parent node, if there is any
function ncine.scenenode.get_position(node: scenenodeObj)
-> ncine.vec2
Returns the node position relative to its parent
function ncine.scenenode.get_rotation(node: scenenodeObj)
-> number
Returns the node rotation in degress
function ncine.scenenode.get_scale(node: scenenodeObj)
-> ncine.vec2
Returns the node scale factors
function ncine.drawable_node.get_size(node: drawablenodeObj)
-> ncine.vec2
Returns the size of the node area
function ncine.drawable_node.get_src_blending_factor(node: drawablenodeObj)
-> ncine.blending_factor
eturns the source blending factor
function ncine.base_sprite.get_texrect(sprite: basespriteObj)
-> ncine.rect
Returns the texture source rectangle for blitting
function ncine.base_sprite.get_texture(sprite: basespriteObj)
-> textureObj?
Returns the texture object
function ncine.scenenode.get_visit_order_index(node: scenenodeObj)
-> integer
Returns the visit drawing order of the node
function ncine.scenenode.get_visit_order_state(node: scenenodeObj)
-> ncine.visit_order_state
Returns the visit order state for the specified node
function ncine.drawable_node.get_width(node: drawablenodeObj)
-> number
Returns the width of the node area
function ncine.drawable_node.is_blending_enabled(node: drawablenodeObj)
-> boolean
Returns true
if the node renders with blending enabled
function ncine.scenenode.is_enabled(node: scenenodeObj)
-> boolean
Returns true
if the node is both updating and drawing
function ncine.base_sprite.is_flipped_x(sprite: basespriteObj)
-> boolean
Returns true
if the sprite texture is horizontally flipped
function ncine.base_sprite.is_flipped_y(sprite: basespriteObj)
-> boolean
Returns true
if the sprite texture is vertically flipped
function ncine.animated_sprite.is_paused(sprite: animatedspriteObj)
-> boolean
Returns true
if the current animation is paused
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
function ncine.animated_sprite.num_animations(sprite: animatedspriteObj)
-> integer
Returns the number of animations
function ncine.scenenode.num_children(node: scenenodeObj)
-> integer
Returns the number of children
function ncine.animated_sprite.num_frames(sprite: animatedspriteObj)
-> integer
Returns the number of frames in current animation
function ncine.scenenode.remove_all_children(parent: scenenodeObj, index: any)
-> boolean
Removes all children from the specified parent
@return — true
if there were at least one node to remove
function ncine.scenenode.remove_child(parent: scenenodeObj, node: scenenodeObj)
-> boolean
Removes a child node from the specified parent
@return — true
if the node has been removed
function ncine.scenenode.remove_child_at(parent: scenenodeObj, index: integer)
-> boolean
Removes a child node at the specified index from the specified parent
@return — true
if the node has been removed
function ncine.base_sprite.reset_texture(sprite: basespriteObj)
Triggers a texture update without setting a new texture
function ncine.scenenode.set_abs_anchor_point(node: scenenodeObj, pos: ncine.vec2)
Sets the absolute transformation anchor point in pixels
function ncine.scenenode.set_alpha(node: scenenodeObj, alpha: number)
Sets the node alpha color component
function ncine.drawable_node.set_anchor_point(node: drawablenodeObj, anchor_point: ncine.vec2)
Sets the transformation anchor point
function ncine.animated_sprite.set_animation_index(sprite: animatedspriteObj, index: integer)
Sets current animation index
function ncine.drawable_node.set_blending_enabled(node: drawablenodeObj, enabled: boolean)
Sets the blending state for node rendering
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
function ncine.drawable_node.set_blending_preset(node: drawablenodeObj, preset: ncine.blending_preset)
Sets a blending preset for source and destination blending factors
function ncine.scenenode.set_color(node: scenenodeObj, color: ncine.color)
Sets the node color
function ncine.scenenode.set_enabled(node: scenenodeObj, newValue: boolean)
Enables or disables both node updating and drawing
function ncine.base_sprite.set_flipped_x(sprite: basespriteObj, flipped_x: boolean)
Flips the texture rect horizontally
function ncine.base_sprite.set_flipped_y(sprite: basespriteObj, flipped_y: boolean)
Flips the texture rect vertically
function ncine.animated_sprite.set_frame(sprite: animatedspriteObj, frame: integer)
Sets current animation to a specified frame number
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.
function ncine.scenenode.set_parent(node: scenenodeObj, parent?: scenenodeObj)
-> boolean
Sets the parent node
@return — true
if the parent has been set
function ncine.animated_sprite.set_paused(sprite: animatedspriteObj, paused: boolean)
Sets the pause state for the animation
function ncine.scenenode.set_position(node: scenenodeObj, pos: ncine.vec2)
Sets a new position for the node
function ncine.scenenode.set_rotation(node: scenenodeObj, rot: number)
Sets the node rotation in degrees
@param rot
— The amount of degrees
function ncine.scenenode.set_scale(node: scenenodeObj, factor: number)
Sets both node scale factors to the specified value
function ncine.scenenode.set_scale_x(node: scenenodeObj, factor: number)
Sets the node scale X factor
function ncine.scenenode.set_scale_y(node: scenenodeObj, factor: number)
Sets the node scale Y factor
function ncine.base_sprite.set_size(sprite: basespriteObj, width: number, height: number)
Sets the sprite size
function ncine.base_sprite.set_texrect(sprite: basespriteObj, rect: ncine.rect)
Sets the texture source rectangle for blitting
function ncine.base_sprite.set_texture(sprite: basespriteObj, texture?: textureObj)
Sets the texture object
function ncine.scenenode.set_visit_order_state(node: scenenodeObj, state: ncine.visit_order_state)
Sets the visit order state for the specified node
function ncine.scenenode.swap_children(parent: scenenodeObj, firstIndex: integer, secondIndex: integer)
-> boolean
Swaps two children at the specified indices
@return — true
if the two nodes have been swapped
function ncine.scenenode.swap_node_back(node: scenenodeObj)
-> boolean
Brings this node one node back in the parent's list of children
@return — true
if the node has been brought one position back
function ncine.scenenode.swap_node_forward(node: scenenodeObj)
-> boolean
Brings this node one node forward in the parent's list of children
@return — true
if the node has been brought one position forward
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
@return — true
if the node has been unlinked
ncine.animated_sprite
function ncine.animated_sprite.add_animation(sprite: animatedspriteObj, anim: ncine.rect_animation)
function ncine.animated_sprite.clear_animations(sprite: animatedspriteObj)
function ncine.animated_sprite.clone(sprite: animatedspriteObj)
-> animatedspriteObj
function ncine.animated_sprite.delete(sprite: animatedspriteObj)
function ncine.animated_sprite.get_animation_index(sprite: animatedspriteObj)
-> integer
function ncine.animated_sprite.get_frame(sprite: animatedspriteObj)
-> integer
function ncine.animated_sprite.is_paused(sprite: animatedspriteObj)
-> boolean
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
function ncine.animated_sprite.num_animations(sprite: animatedspriteObj)
-> integer
function ncine.animated_sprite.num_frames(sprite: animatedspriteObj)
-> integer
function ncine.animated_sprite.set_animation_index(sprite: animatedspriteObj, index: integer)
function ncine.animated_sprite.set_frame(sprite: animatedspriteObj, frame: integer)
function ncine.animated_sprite.set_paused(sprite: animatedspriteObj, paused: boolean)
integer
The number of arguments passed on the command line
string[]
The array of arguments passed on the command line
boolean
The flag is true
if the audio subsystem is enabled
boolean
The flag is true
if the shader cache is enabled to load and save binary shader programs
boolean
The flag is true
if mapping is used to update OpenGL buffers
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
boolean
The flag is true
if console log messages should use colors
ncine.log_level
ncine.log_level # The minimum level that a log message needs to have to be printed in the console
string
The data path
boolean
The flag is true
if the debug overlay is enabled
boolean
The flag is true
when error checking and introspection of shader programs are deferred to first use
ncine.log_level
The minimum level that a log message needs to have to be written to the log file
integer
Fixed size of render commands to be collected for batching on Emscripten and ANGLE
integer
The maximum number of frames to render per second or 0 for no limit
boolean
The flag is true
if the application is going to be in full screen mode
boolean
The flag is true
if the OpenGL debug context is enabled
integer
The maximum size in bytes for each IBO collecting index data
string
The file used when logging to file is enabled
number
The interval for frame timer accumulation average and log
integer
The number of mono audio sources
boolean
True if the OpenGL profile is going to be core (read-only)
boolean
True if the OpenGL context is going to be forward compatible (read-only)
integer
The major version number of the OpenGL context (read-only)
integer
The minor version number of the OpenGL context (read-only)
integer
The output frequency of the audio system
number
The update time in seconds for the profile text nodes (read-only)
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.
integer
The initial size for the pool of render commands
boolean
The flag is true
if the window is going to be resizable
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.
boolean
The flag is true
if the scenegraph based rendering is enabled
string
The directory name (not the complete path) for the binary shaders cache
integer
The number of stereo audio sources
boolean
The flag is true
if the threading subsystem is enabled
integer
The maximum size for the pool of VAOs
integer
The maximum size in bytes for each VBO collecting geometry data
boolean
The flag is true
if the vertical synchronization is enabled
string
The window icon filename
ncine.vec2
The window position coordinates in the virtual screen made of all the connected monitors
boolean
The flag is true
if the window size is automatically scaled according to the display factor
string
The window title
ncine.app_configuration
ncine.application
function ncine.application.get_app_configuration()
-> ncine.app_configuration
Returns the configuration used to initialize the application
function ncine.application.get_auto_suspension()
-> boolean
Returns true
if the application should auto-suspend when it loses focus
function ncine.application.get_debugoverlay_settings()
-> debug_overlay_settings
Returns the run-time debug overlay settings, if debug overlay is available
function ncine.application.get_gui_settings()
-> gui_settings
Returns the run-time GUI settings
function ncine.application.get_height()
-> number
Returns the drawable screen height
function ncine.application.get_interval()
-> number
Returns the time in seconds that last frame took to complete
function ncine.application.get_num_frames()
-> integer
Returns the total number of frames already rendered
function ncine.application.get_rendering_settings()
-> rendering_settings
Returns the run-time rendering settings
function ncine.application.get_resolution()
-> ncine.vec2
Returns the drawable screen resolution vector
function ncine.application.get_rootnode()
-> scenenodeObj
Returns the root node of the transformation graph
function ncine.application.get_screen_viewport()
-> viewportObj
Returns the screen viewport
function ncine.application.get_width()
-> number
Returns the drawable screen width
function ncine.application.is_suspended()
-> boolean
Returns true
if the application is suspended.
A suspended application will not update nor receive events.
function ncine.application.quit()
Asks the application to quit as soon as possible
function ncine.application.set_auto_suspension(flag: boolean)
Sets a new value for the auto-suspension flag
function ncine.application.set_debugoverlay_settings(settings: debug_overlay_settings)
Sets the run-time debug overlay settings
function ncine.application.set_gui_settings(settings: gui_settings)
Sets the run-time GUI settings
function ncine.application.set_rendering_settings(settings: rendering_settings)
Sets the run-time rendering settings
function ncine.application.set_suspended(flag: boolean)
Sets a new value for the suspension flag
function ncine.application.get_app_configuration()
-> ncine.app_configuration
function ncine.application.get_auto_suspension()
-> boolean
function ncine.application.get_debugoverlay_settings()
-> debug_overlay_settings
function ncine.application.get_gui_settings()
-> gui_settings
function ncine.application.get_height()
-> number
function ncine.application.get_interval()
-> number
function ncine.application.get_num_frames()
-> integer
function ncine.application.get_rendering_settings()
-> rendering_settings
function ncine.application.get_resolution()
-> ncine.vec2
function ncine.application.get_rootnode()
-> scenenodeObj
function ncine.application.get_screen_viewport()
-> viewportObj
function ncine.application.get_width()
-> number
function ncine.application.is_suspended()
-> boolean
function ncine.application.quit()
function ncine.application.set_auto_suspension(flag: boolean)
function ncine.application.set_debugoverlay_settings(settings: debug_overlay_settings)
function ncine.application.set_gui_settings(settings: gui_settings)
function ncine.application.set_rendering_settings(settings: rendering_settings)
function ncine.application.set_suspended(flag: boolean)
ncine.audio_device
function ncine.audio_device.get_gain()
-> number
Returns the listener gain value
function ncine.audio_device.get_max_num_sources()
-> integer
Returns the maximum number of audio sources
function ncine.audio_device.get_num_available_sources()
-> integer
Returns the number of available audio sources
function ncine.audio_device.get_num_players()
-> integer
Returns the number of active players
function ncine.audio_device.get_player(index: integer)
-> audioplayerObj?
Returns the specified active player object
function ncine.audio_device.get_position()
-> ncine.vec3
Returns the listener position vector
function ncine.audio_device.get_velocity()
-> ncine.vec3
Returns the listener velocity vector
function ncine.audio_device.has_efx_extension()
-> boolean
Returns true
if the OpenAL EFX extension is available
function ncine.audio_device.name()
-> string
Returns the name of the audio 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.
function ncine.audio_device.pause_players()
Pauses every player currently playing
Paused players can be resumed with resume_players()
.
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.
function ncine.audio_device.resume_players()
Resumes all and only the players that were paused by a pause_players()
call
function ncine.audio_device.set_gain(gain: number)
Sets the listener gain value
function ncine.audio_device.set_position(position: ncine.vec3)
Sets the listener position vector
function ncine.audio_device.set_velocity(velocity: ncine.vec3)
Sets the listener velocity vector
function ncine.audio_device.stop_players()
Stops every player currently playing
function ncine.audio_device.get_gain()
-> number
function ncine.audio_device.get_max_num_sources()
-> integer
function ncine.audio_device.get_num_available_sources()
-> integer
function ncine.audio_device.get_num_players()
-> integer
function ncine.audio_device.get_player(index: integer)
-> audioplayerObj?
function ncine.audio_device.get_position()
-> ncine.vec3
function ncine.audio_device.get_velocity()
-> ncine.vec3
function ncine.audio_device.has_efx_extension()
-> boolean
function ncine.audio_device.name()
-> string
function ncine.audio_device.pause_device()
function ncine.audio_device.pause_players()
function ncine.audio_device.resume_device()
function ncine.audio_device.resume_players()
function ncine.audio_device.set_gain(gain: number)
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)
function ncine.audio_device.set_velocity(velocity: ncine.vec3)
function ncine.audio_device.stop_players()
function ncine.audio_effect.apply_properties(audio_effect: audioeffectObj, properties: audioeffectpropertiesObj)
Sets an effect type with all of its properties
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
function ncine.audio_effect.get_effect_id(audio_effect: audioeffectObj)
-> integer
Returns the OpenAL effect id
function ncine.audio_effect.get_type(audio_effect: audioeffectObj)
-> ncine.audio_effect_type
Returns the effect type
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
function ncine.audio_effect.apply_properties(audio_effect: audioeffectObj, properties: audioeffectpropertiesObj)
function ncine.audio_effect.delete(audio_effect: audioeffectObj)
function ncine.audio_effect.get_effect_id(audio_effect: audioeffectObj)
-> integer
function ncine.audio_effect.get_type(audio_effect: audioeffectObj)
-> ncine.audio_effect_type
function ncine.audio_effect.new()
-> audioeffectObj
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
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
function ncine.audio_effect_properties.get_chorus_properties(audio_effect_properties: audioeffectpropertiesObj)
-> audio_chorus_properties
Returns the current values for the chorus effect 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
function ncine.audio_effect_properties.get_distortion_properties(audio_effect_properties: audioeffectpropertiesObj)
-> audio_distortion_properties
Returns the current values for the distortion effect 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
function ncine.audio_effect_properties.get_echo_properties(audio_effect_properties: audioeffectpropertiesObj)
-> audio_echo_properties
Returns the current values for the echo effect 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
function ncine.audio_effect_properties.get_flanger_properties(audio_effect_properties: audioeffectpropertiesObj)
-> audio_flanger_properties
Returns the current values for the flanger effect 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
function ncine.audio_effect_properties.get_reverb_properties(audio_effect_properties: audioeffectpropertiesObj)
-> audio_reverb_properties
Returns the current values for the reverb effect 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
function ncine.audio_effect_properties.get_type(audio_effect_properties: audioeffectpropertiesObj)
-> ncine.audio_effect_type
Returns the effect properties type
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
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
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
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
function ncine.audio_effect_properties.reset_chorus_properties(audio_effect_properties: audioeffectpropertiesObj)
Resets all property values for the chorus effect to thir default
function ncine.audio_effect_properties.reset_compressor_properties(audio_effect_properties: audioeffectpropertiesObj)
Resets all property values for the compressor effect to thir default
function ncine.audio_effect_properties.reset_distortion_properties(audio_effect_properties: audioeffectpropertiesObj)
Resets all property values for the distortion effect to thir default
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
function ncine.audio_effect_properties.reset_echo_properties(audio_effect_properties: audioeffectpropertiesObj)
Resets all property values for the echo effect to thir default
function ncine.audio_effect_properties.reset_equalizer_properties(audio_effect_properties: audioeffectpropertiesObj)
Resets all property values for the equalizer effect to thir default
function ncine.audio_effect_properties.reset_flanger_properties(audio_effect_properties: audioeffectpropertiesObj)
Resets all property values for the flanger effect to thir default
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
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
function ncine.audio_effect_properties.reset_reverb_properties(audio_effect_properties: audioeffectpropertiesObj)
Resets all property values for the reverb effect to thir default
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
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
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
function ncine.audio_effect_properties.set_chorus_properties(audio_effect_properties: audioeffectpropertiesObj, properties: audio_chorus_properties)
Sets all values for the chorus effect 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
function ncine.audio_effect_properties.set_distortion_properties(audio_effect_properties: audioeffectpropertiesObj, properties: audio_distortion_properties)
Sets all values for the distortion effect 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
function ncine.audio_effect_properties.set_echo_properties(audio_effect_properties: audioeffectpropertiesObj, properties: audio_echo_properties)
Sets all values for the echo effect 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
function ncine.audio_effect_properties.set_flanger_properties(audio_effect_properties: audioeffectpropertiesObj, properties: audio_flanger_properties)
Sets all values for the flanger effect 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
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
function ncine.audio_effect_properties.set_reverb_properties(audio_effect_properties: audioeffectpropertiesObj, properties: audio_reverb_properties)
Sets all values for the reverb effect 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
function ncine.audio_effect_properties.set_type(audio_effect_properties: audioeffectpropertiesObj, audio_effect_type: ncine.audio_effect_type)
Sets the effect properties type
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
function ncine.audio_effect_properties.delete(audio_effect_properties: audioeffectpropertiesObj)
function ncine.audio_effect_properties.get_auto_wah_properties(audio_effect_properties: audioeffectpropertiesObj)
-> audio_auto_wah_properties
function ncine.audio_effect_properties.get_chorus_properties(audio_effect_properties: audioeffectpropertiesObj)
-> audio_chorus_properties
function ncine.audio_effect_properties.get_compressor_properties(audio_effect_properties: audioeffectpropertiesObj)
-> audio_compressor_properties
function ncine.audio_effect_properties.get_distortion_properties(audio_effect_properties: audioeffectpropertiesObj)
-> audio_distortion_properties
function ncine.audio_effect_properties.get_eax_reverb_properties(audio_effect_properties: audioeffectpropertiesObj)
-> audio_eax_reverb_properties
function ncine.audio_effect_properties.get_echo_properties(audio_effect_properties: audioeffectpropertiesObj)
-> audio_echo_properties
function ncine.audio_effect_properties.get_equalizer_properties(audio_effect_properties: audioeffectpropertiesObj)
-> audio_equalizer_properties
function ncine.audio_effect_properties.get_flanger_properties(audio_effect_properties: audioeffectpropertiesObj)
-> audio_flanger_properties
function ncine.audio_effect_properties.get_frequency_shifter_properties(audio_effect_properties: audioeffectpropertiesObj)
-> audio_frequency_shifter_properties
function ncine.audio_effect_properties.get_max_auto_wah_properties(audio_effect_properties: audioeffectpropertiesObj)
-> audio_auto_wah_properties
function ncine.audio_effect_properties.get_max_chorus_properties(audio_effect_properties: audioeffectpropertiesObj)
-> audio_chorus_properties
function ncine.audio_effect_properties.get_max_compressor_properties(audio_effect_properties: audioeffectpropertiesObj)
-> audio_compressor_properties
function ncine.audio_effect_properties.get_max_distortion_properties(audio_effect_properties: audioeffectpropertiesObj)
-> audio_distortion_properties
function ncine.audio_effect_properties.get_max_eax_reverb_properties(audio_effect_properties: audioeffectpropertiesObj)
-> audio_eax_reverb_properties
function ncine.audio_effect_properties.get_max_echo_properties(audio_effect_properties: audioeffectpropertiesObj)
-> audio_echo_properties
function ncine.audio_effect_properties.get_max_equalizer_properties(audio_effect_properties: audioeffectpropertiesObj)
-> audio_equalizer_properties
function ncine.audio_effect_properties.get_max_flanger_properties(audio_effect_properties: audioeffectpropertiesObj)
-> audio_flanger_properties
function ncine.audio_effect_properties.get_max_frequency_shifter_properties(audio_effect_properties: audioeffectpropertiesObj)
-> audio_frequency_shifter_properties
function ncine.audio_effect_properties.get_max_pitch_shifter_properties(audio_effect_properties: audioeffectpropertiesObj)
-> audio_pitch_shifter_properties
function ncine.audio_effect_properties.get_max_reverb_properties(audio_effect_properties: audioeffectpropertiesObj)
-> audio_reverb_properties
function ncine.audio_effect_properties.get_max_ring_modulator_properties(audio_effect_properties: audioeffectpropertiesObj)
-> audio_ring_modulator_properties
function ncine.audio_effect_properties.get_max_vocal_morpher_properties(audio_effect_properties: audioeffectpropertiesObj)
-> audio_vocal_morpher_properties
function ncine.audio_effect_properties.get_min_auto_wah_properties(audio_effect_properties: audioeffectpropertiesObj)
-> audio_auto_wah_properties
function ncine.audio_effect_properties.get_min_chorus_properties(audio_effect_properties: audioeffectpropertiesObj)
-> audio_chorus_properties
function ncine.audio_effect_properties.get_min_compressor_properties(audio_effect_properties: audioeffectpropertiesObj)
-> audio_compressor_properties
function ncine.audio_effect_properties.get_min_distortion_properties(audio_effect_properties: audioeffectpropertiesObj)
-> audio_distortion_properties
function ncine.audio_effect_properties.get_min_eax_reverb_properties(audio_effect_properties: audioeffectpropertiesObj)
-> audio_eax_reverb_properties
function ncine.audio_effect_properties.get_min_echo_properties(audio_effect_properties: audioeffectpropertiesObj)
-> audio_echo_properties
function ncine.audio_effect_properties.get_min_equalizer_properties(audio_effect_properties: audioeffectpropertiesObj)
-> audio_equalizer_properties
function ncine.audio_effect_properties.get_min_flanger_properties(audio_effect_properties: audioeffectpropertiesObj)
-> audio_flanger_properties
function ncine.audio_effect_properties.get_min_frequency_shifter_properties(audio_effect_properties: audioeffectpropertiesObj)
-> audio_frequency_shifter_properties
function ncine.audio_effect_properties.get_min_pitch_shifter_properties(audio_effect_properties: audioeffectpropertiesObj)
-> audio_pitch_shifter_properties
function ncine.audio_effect_properties.get_min_reverb_properties(audio_effect_properties: audioeffectpropertiesObj)
-> audio_reverb_properties
function ncine.audio_effect_properties.get_min_ring_modulator_properties(audio_effect_properties: audioeffectpropertiesObj)
-> audio_ring_modulator_properties
function ncine.audio_effect_properties.get_min_vocal_morpher_properties(audio_effect_properties: audioeffectpropertiesObj)
-> audio_vocal_morpher_properties
function ncine.audio_effect_properties.get_pitch_shifter_properties(audio_effect_properties: audioeffectpropertiesObj)
-> audio_pitch_shifter_properties
function ncine.audio_effect_properties.get_reverb_properties(audio_effect_properties: audioeffectpropertiesObj)
-> audio_reverb_properties
function ncine.audio_effect_properties.get_ring_modulator_properties(audio_effect_properties: audioeffectpropertiesObj)
-> audio_ring_modulator_properties
function ncine.audio_effect_properties.get_type(audio_effect_properties: audioeffectpropertiesObj)
-> ncine.audio_effect_type
function ncine.audio_effect_properties.get_vocal_morpher_properties(audio_effect_properties: audioeffectpropertiesObj)
-> audio_vocal_morpher_properties
function ncine.audio_effect_properties.load_efx_reverb_preset(audio_effect_properties: audioeffectpropertiesObj, preset: ncine.efx_reverb_presets)
function ncine.audio_effect_properties.new()
-> audioeffectpropertiesObj
function ncine.audio_effect_properties.reset_auto_wah_properties(audio_effect_properties: audioeffectpropertiesObj)
function ncine.audio_effect_properties.reset_chorus_properties(audio_effect_properties: audioeffectpropertiesObj)
function ncine.audio_effect_properties.reset_compressor_properties(audio_effect_properties: audioeffectpropertiesObj)
function ncine.audio_effect_properties.reset_distortion_properties(audio_effect_properties: audioeffectpropertiesObj)
function ncine.audio_effect_properties.reset_eax_reverb_properties(audio_effect_properties: audioeffectpropertiesObj)
function ncine.audio_effect_properties.reset_echo_properties(audio_effect_properties: audioeffectpropertiesObj)
function ncine.audio_effect_properties.reset_equalizer_properties(audio_effect_properties: audioeffectpropertiesObj)
function ncine.audio_effect_properties.reset_flanger_properties(audio_effect_properties: audioeffectpropertiesObj)
function ncine.audio_effect_properties.reset_frequency_shifter_properties(audio_effect_properties: audioeffectpropertiesObj)
function ncine.audio_effect_properties.reset_pitch_shifter_properties(audio_effect_properties: audioeffectpropertiesObj)
function ncine.audio_effect_properties.reset_reverb_properties(audio_effect_properties: audioeffectpropertiesObj)
function ncine.audio_effect_properties.reset_ring_modulator_properties(audio_effect_properties: audioeffectpropertiesObj)
function ncine.audio_effect_properties.reset_vocal_morpher_properties(audio_effect_properties: audioeffectpropertiesObj)
function ncine.audio_effect_properties.set_auto_wah_properties(audio_effect_properties: audioeffectpropertiesObj, properties: audio_auto_wah_properties)
function ncine.audio_effect_properties.set_chorus_properties(audio_effect_properties: audioeffectpropertiesObj, properties: audio_chorus_properties)
function ncine.audio_effect_properties.set_compressor_properties(audio_effect_properties: audioeffectpropertiesObj, properties: audio_compressor_properties)
function ncine.audio_effect_properties.set_distortion_properties(audio_effect_properties: audioeffectpropertiesObj, properties: audio_distortion_properties)
function ncine.audio_effect_properties.set_eax_reverb_properties(audio_effect_properties: audioeffectpropertiesObj, properties: audio_eax_reverb_properties)
function ncine.audio_effect_properties.set_echo_properties(audio_effect_properties: audioeffectpropertiesObj, properties: audio_echo_properties)
function ncine.audio_effect_properties.set_equalizer_properties(audio_effect_properties: audioeffectpropertiesObj, properties: audio_equalizer_properties)
function ncine.audio_effect_properties.set_flanger_properties(audio_effect_properties: audioeffectpropertiesObj, properties: audio_flanger_properties)
function ncine.audio_effect_properties.set_frequency_shifter_properties(audio_effect_properties: audioeffectpropertiesObj, properties: audio_frequency_shifter_properties)
function ncine.audio_effect_properties.set_pitch_shifter_properties(audio_effect_properties: audioeffectpropertiesObj, properties: audio_pitch_shifter_properties)
function ncine.audio_effect_properties.set_reverb_properties(audio_effect_properties: audioeffectpropertiesObj, properties: audio_reverb_properties)
function ncine.audio_effect_properties.set_ring_modulator_properties(audio_effect_properties: audioeffectpropertiesObj, properties: audio_ring_modulator_properties)
function ncine.audio_effect_properties.set_type(audio_effect_properties: audioeffectpropertiesObj, audio_effect_type: ncine.audio_effect_type)
function ncine.audio_effect_properties.set_vocal_morpher_properties(audio_effect_properties: audioeffectpropertiesObj, properties: audio_vocal_morpher_properties)
function ncine.audio_effect_slot.apply_effect(audio_effect_slot: audioeffectslotObj, audio_effect: audioeffectObj)
Applies the effect parameters from an effect object
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
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.
function ncine.audio_effect_slot.get_effect_slot_id(audio_effect_slot: audioeffectslotObj)
-> integer
Returns the OpenAL auxilary effect slot id
function ncine.audio_effect_slot.get_gain(audio_effect_slot: audioeffectslotObj)
-> number
Returns the gain output level of the auxilary effect slot
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
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.
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
function ncine.audio_effect_slot.apply_effect(audio_effect_slot: audioeffectslotObj, audio_effect: audioeffectObj)
function ncine.audio_effect_slot.delete(audio_effect_slot: audioeffectslotObj)
function ncine.audio_effect_slot.get_aux_send_auto(audio_effect_slot: audioeffectslotObj)
-> boolean
function ncine.audio_effect_slot.get_effect_slot_id(audio_effect_slot: audioeffectslotObj)
-> integer
function ncine.audio_effect_slot.get_gain(audio_effect_slot: audioeffectslotObj)
-> number
function ncine.audio_effect_slot.new()
-> audioeffectslotObj
function ncine.audio_effect_slot.set_aux_send_auto(audio_effect_slot: audioeffectslotObj, aux_send_auto: boolean)
function ncine.audio_effect_slot.set_gain(audio_effect_slot: audioeffectslotObj, gain: number)
enum ncine.audio_effect_type
function ncine.audio_filter.apply_properties(audio_filter: audiofilterObj, properties: audio_filter_properties)
Sets the filter type and all of its properties
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
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.
function ncine.audio_filter.get_filter_id(audio_filter: audiofilterObj)
-> integer
Returns the OpenAL filter id
function ncine.audio_filter.get_type(audio_filter: audiofilterObj)
-> ncine.audio_filter_type
Returns the filter type
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
function ncine.audio_filter.apply_properties(audio_filter: audiofilterObj, properties: audio_filter_properties)
function ncine.audio_filter.delete(audio_filter: audiofilterObj)
function ncine.audio_filter.get_default_properties()
-> audio_filter_properties
function ncine.audio_filter.get_filter_id(audio_filter: audiofilterObj)
-> integer
function ncine.audio_filter.get_type(audio_filter: audiofilterObj)
-> ncine.audio_filter_type
function ncine.audio_filter.new()
-> audiofilterObj
enum ncine.audio_filter_type
ncine.audio_player
function ncine.audio_player.buffer_id(player: audioplayerObj)
-> integer
Returns the OpenAL id of the currently playing buffer
function ncine.audio_player.buffer_size(player: audioplayerObj)
-> integer
Returns the size of the currently playing buffer in bytes
function ncine.audio_player.bytes_per_sample(player: audioplayerObj)
-> integer
Returns the number of bytes per sample
function ncine.audio_player.duration(player: audioplayerObj)
-> number
Returns the duration in seconds
function ncine.audio_player.frequency(player: audioplayerObj)
-> integer
Returns the samples frequency of the currently playing buffer
function ncine.audio_player.get_air_absorption_factor(player: audioplayerObj)
-> number
Returns the player air absorption factor
function ncine.audio_player.get_aux_filter_id(player: audioplayerObj)
-> integer
Returns the OpenAL id of the auxiliary filter
function ncine.audio_player.get_cone_inner_angle(player: audioplayerObj)
-> number
Returns the player inside angle of the sound cone in degrees
function ncine.audio_player.get_cone_outer_angle(player: audioplayerObj)
-> number
Returns the player outside angle of the sound cone in degrees
function ncine.audio_player.get_cone_outer_gain(player: audioplayerObj)
-> number
Returns the player multiplication factor to determine the gain outside the cone
function ncine.audio_player.get_cone_outer_gain_hf(player: audioplayerObj)
-> number
Returns the player cone outer gain HF value
function ncine.audio_player.get_direct_filter_id(player: audioplayerObj)
-> integer
Returns the OpenAL id of the direct filter
function ncine.audio_player.get_direction(player: audioplayerObj)
-> ncine.vec3
Returns the player direction vector
function ncine.audio_player.get_effect_slot_id(player: audioplayerObj)
-> integer
Returns the OpenAL id of the effect slot
function ncine.audio_player.get_gain(player: audioplayerObj)
-> number
Returns the player gain value
function ncine.audio_player.get_pitch(player: audioplayerObj)
-> number
Returns the player pitch value
function ncine.audio_player.get_position(player: audioplayerObj)
-> ncine.vec3
Returns the player position vector
function ncine.audio_player.get_room_rolloff_factor(player: audioplayerObj)
-> number
Returns the player room rolloff factor
function ncine.audio_player.get_sample_offset(player: audioplayerObj)
-> integer
Returns the size of the currently playing buffer in bytes
function ncine.audio_player.get_velocity(player: audioplayerObj)
-> ncine.vec3
Returns the player velocity vector
function ncine.audio_player.has_aux_filter(player: audioplayerObj)
-> boolean
Returns true
if a valid OpenAL auxiliary filter is currently assigned to the player
function ncine.audio_player.has_direct_filter(player: audioplayerObj)
-> boolean
Returns true
if a valid OpenAL direct filter is currently assigned to the player
function ncine.audio_player.has_effect_slot(player: audioplayerObj)
-> boolean
Returns true
if a valid OpenAL effect slot is currently assigned to the player
function ncine.audio_player.has_source(player: audioplayerObj)
-> boolean
Returns true
if a valid OpenAL source is currently assigned to the player
function ncine.audio_player.is_looping(player: audioplayerObj)
-> boolean
Returns the looping property of the player
function ncine.audio_player.is_paused(player: audioplayerObj)
-> boolean
Returns true
if the player is paused
function ncine.audio_player.is_playing(player: audioplayerObj)
-> boolean
Returns true
if the player is playing
function ncine.audio_player.is_source_locked(player: audioplayerObj)
-> boolean
Returns true
if the OpenAL source is locked
function ncine.audio_player.is_stopped(player: audioplayerObj)
-> boolean
Returns true
if the player is stopped
function ncine.audio_player.num_channels(player: audioplayerObj)
-> integer
Returns the number of audio channels of the currently playing buffer
function ncine.audio_player.num_samples(player: audioplayerObj)
-> integer
Returns the number of samples
function ncine.audio_player.pause(player: audioplayerObj)
Pauses playing
function ncine.audio_player.play(player: audioplayerObj)
Starts playing
function ncine.audio_player.set_air_absorption_factor(player: audioplayerObj, factor: number)
Sets the player air absorption factor
function ncine.audio_player.set_cone_inner_angle(player: audioplayerObj, angle: number)
Sets the player inside angle of the sound cone in degrees
function ncine.audio_player.set_cone_outer_angle(player: audioplayerObj, angle: number)
Sets the player outside angle of the sound cone in degrees
function ncine.audio_player.set_cone_outer_gain(player: audioplayerObj, gain: number)
Sets the player multiplication factor to determine the gain outside the cone
function ncine.audio_player.set_cone_outer_gain_hf(player: audioplayerObj, gain: number)
Sets the player cone outer gain HF value
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
function ncine.audio_player.set_direction(player: audioplayerObj, direction: ncine.vec3)
Sets the player direction vector
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
function ncine.audio_player.set_gain(player: audioplayerObj, gain: number)
Sets the player gain value
function ncine.audio_player.set_looping(player: audioplayerObj, looping: boolean)
Sets the looping property of the player
function ncine.audio_player.set_pitch(player: audioplayerObj, pitch: number)
Sets the player pitch value
function ncine.audio_player.set_position(player: audioplayerObj, position: ncine.vec3)
Sets the player position vector
function ncine.audio_player.set_room_rolloff_factor(player: audioplayerObj, factor: number)
Sets the player room rolloff factor
function ncine.audio_player.set_sample_offset(player: audioplayerObj, offset: integer)
Returns the size of the currently playing buffer in bytes
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
function ncine.audio_player.set_velocity(player: audioplayerObj, velocity: ncine.vec3)
Sets the player velocity vector
function ncine.audio_player.source_id(player: audioplayerObj)
-> integer
Returns the OpenAL id of the player source
function ncine.audio_player.stop(player: audioplayerObj)
Stops playing and rewinds
function ncine.audio_player.buffer_id(player: audioplayerObj)
-> integer
function ncine.audio_player.buffer_size(player: audioplayerObj)
-> integer
function ncine.audio_player.bytes_per_sample(player: audioplayerObj)
-> integer
function ncine.audio_player.duration(player: audioplayerObj)
-> number
function ncine.audio_player.frequency(player: audioplayerObj)
-> integer
function ncine.audio_player.get_air_absorption_factor(player: audioplayerObj)
-> number
function ncine.audio_player.get_aux_filter_id(player: audioplayerObj)
-> integer
function ncine.audio_player.get_cone_inner_angle(player: audioplayerObj)
-> number
function ncine.audio_player.get_cone_outer_angle(player: audioplayerObj)
-> number
function ncine.audio_player.get_cone_outer_gain(player: audioplayerObj)
-> number
function ncine.audio_player.get_cone_outer_gain_hf(player: audioplayerObj)
-> number
function ncine.audio_player.get_direct_filter_id(player: audioplayerObj)
-> integer
function ncine.audio_player.get_direction(player: audioplayerObj)
-> ncine.vec3
function ncine.audio_player.get_effect_slot_id(player: audioplayerObj)
-> integer
function ncine.audio_player.get_gain(player: audioplayerObj)
-> number
function ncine.audio_player.get_pitch(player: audioplayerObj)
-> number
function ncine.audio_player.get_position(player: audioplayerObj)
-> ncine.vec3
function ncine.audio_player.get_room_rolloff_factor(player: audioplayerObj)
-> number
function ncine.audio_player.get_sample_offset(player: audioplayerObj)
-> integer
function ncine.audio_player.get_velocity(player: audioplayerObj)
-> ncine.vec3
function ncine.audio_player.has_aux_filter(player: audioplayerObj)
-> boolean
function ncine.audio_player.has_direct_filter(player: audioplayerObj)
-> boolean
function ncine.audio_player.has_effect_slot(player: audioplayerObj)
-> boolean
function ncine.audio_player.has_source(player: audioplayerObj)
-> boolean
function ncine.audio_player.is_looping(player: audioplayerObj)
-> boolean
function ncine.audio_player.is_paused(player: audioplayerObj)
-> boolean
function ncine.audio_player.is_playing(player: audioplayerObj)
-> boolean
function ncine.audio_player.is_source_locked(player: audioplayerObj)
-> boolean
function ncine.audio_player.is_stopped(player: audioplayerObj)
-> boolean
function ncine.audio_player.num_channels(player: audioplayerObj)
-> integer
function ncine.audio_player.num_samples(player: audioplayerObj)
-> integer
function ncine.audio_player.pause(player: audioplayerObj)
function ncine.audio_player.play(player: audioplayerObj)
function ncine.audio_player.set_air_absorption_factor(player: audioplayerObj, factor: number)
function ncine.audio_player.set_cone_inner_angle(player: audioplayerObj, angle: number)
function ncine.audio_player.set_cone_outer_angle(player: audioplayerObj, angle: number)
function ncine.audio_player.set_cone_outer_gain(player: audioplayerObj, gain: number)
function ncine.audio_player.set_cone_outer_gain_hf(player: audioplayerObj, gain: number)
function ncine.audio_player.set_direct_filter(player: audioplayerObj, audio_filter?: audiofilterObj)
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)
function ncine.audio_player.set_effect_slot(player: audioplayerObj, audio_effect_slot?: audioeffectslotObj, audio_filter?: audiofilterObj)
function ncine.audio_player.set_gain(player: audioplayerObj, gain: number)
function ncine.audio_player.set_looping(player: audioplayerObj, looping: boolean)
function ncine.audio_player.set_pitch(player: audioplayerObj, pitch: number)
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)
function ncine.audio_player.set_room_rolloff_factor(player: audioplayerObj, factor: number)
function ncine.audio_player.set_sample_offset(player: audioplayerObj, offset: integer)
function ncine.audio_player.set_source_locked(player: audioplayerObj, locked: boolean)
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)
function ncine.audio_player.source_id(player: audioplayerObj)
-> integer
function ncine.audio_player.stop(player: audioplayerObj)
function ncine.audiobuffer.buffer_id(audiobuffer: audiobufferObj)
-> integer
Returns the OpenAL buffer id
function ncine.audiobuffer.buffer_size(audiobuffer: audiobufferObj)
-> integer
Returns the size of the buffer in bytes
function ncine.audiobuffer.bytes_per_sample(audiobuffer: audiobufferObj)
-> integer
Returns the number of bytes per sample
function ncine.audiobuffer.delete(audiobuffer: audiobufferObj)
Destroys an audio buffer object and releases its memory
@param audiobuffer
— The audio buffer object to be destroyed
function ncine.audiobuffer.duration(audiobuffer: audiobufferObj)
-> number
Returns the duration in seconds
function ncine.audiobuffer.frequency(audiobuffer: audiobufferObj)
-> integer
Returns the samples frequency
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
function ncine.audiobuffer.num_channels(audiobuffer: audiobufferObj)
-> integer
Returns the number of audio channels
function ncine.audiobuffer.num_samples(audiobuffer: audiobufferObj)
-> integer
Returns number of samples
ncine.audiobuffer
function ncine.audiobuffer.buffer_id(audiobuffer: audiobufferObj)
-> integer
function ncine.audiobuffer.buffer_size(audiobuffer: audiobufferObj)
-> integer
function ncine.audiobuffer.bytes_per_sample(audiobuffer: audiobufferObj)
-> integer
function ncine.audiobuffer.delete(audiobuffer: audiobufferObj)
function ncine.audiobuffer.duration(audiobuffer: audiobufferObj)
-> number
function ncine.audiobuffer.frequency(audiobuffer: audiobufferObj)
-> integer
function ncine.audiobuffer.new(filename: string)
-> audiobufferObj
function ncine.audiobuffer.num_channels(audiobuffer: audiobufferObj)
-> integer
function ncine.audiobuffer.num_samples(audiobuffer: audiobufferObj)
-> integer
ncine.audiobuffer_player
function ncine.audio_player.buffer_id(player: audioplayerObj)
-> integer
Returns the OpenAL id of the currently playing buffer
function ncine.audio_player.buffer_size(player: audioplayerObj)
-> integer
Returns the size of the currently playing buffer in bytes
function ncine.audio_player.bytes_per_sample(player: audioplayerObj)
-> integer
Returns the number of bytes per sample
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
function ncine.audio_player.duration(player: audioplayerObj)
-> number
Returns the duration in seconds
function ncine.audio_player.frequency(player: audioplayerObj)
-> integer
Returns the samples frequency of the currently playing buffer
function ncine.audio_player.get_air_absorption_factor(player: audioplayerObj)
-> number
Returns the player air absorption factor
function ncine.audiobuffer_player.get_audiobuffer(player: audiobufferplayerObj)
-> audiobufferObj
Gets the audio buffer used for playing
function ncine.audio_player.get_aux_filter_id(player: audioplayerObj)
-> integer
Returns the OpenAL id of the auxiliary filter
function ncine.audio_player.get_cone_inner_angle(player: audioplayerObj)
-> number
Returns the player inside angle of the sound cone in degrees
function ncine.audio_player.get_cone_outer_angle(player: audioplayerObj)
-> number
Returns the player outside angle of the sound cone in degrees
function ncine.audio_player.get_cone_outer_gain(player: audioplayerObj)
-> number
Returns the player multiplication factor to determine the gain outside the cone
function ncine.audio_player.get_cone_outer_gain_hf(player: audioplayerObj)
-> number
Returns the player cone outer gain HF value
function ncine.audio_player.get_direct_filter_id(player: audioplayerObj)
-> integer
Returns the OpenAL id of the direct filter
function ncine.audio_player.get_direction(player: audioplayerObj)
-> ncine.vec3
Returns the player direction vector
function ncine.audio_player.get_effect_slot_id(player: audioplayerObj)
-> integer
Returns the OpenAL id of the effect slot
function ncine.audio_player.get_gain(player: audioplayerObj)
-> number
Returns the player gain value
function ncine.audio_player.get_pitch(player: audioplayerObj)
-> number
Returns the player pitch value
function ncine.audio_player.get_position(player: audioplayerObj)
-> ncine.vec3
Returns the player position vector
function ncine.audio_player.get_room_rolloff_factor(player: audioplayerObj)
-> number
Returns the player room rolloff factor
function ncine.audio_player.get_sample_offset(player: audioplayerObj)
-> integer
Returns the size of the currently playing buffer in bytes
function ncine.audio_player.get_velocity(player: audioplayerObj)
-> ncine.vec3
Returns the player velocity vector
function ncine.audio_player.has_aux_filter(player: audioplayerObj)
-> boolean
Returns true
if a valid OpenAL auxiliary filter is currently assigned to the player
function ncine.audio_player.has_direct_filter(player: audioplayerObj)
-> boolean
Returns true
if a valid OpenAL direct filter is currently assigned to the player
function ncine.audio_player.has_effect_slot(player: audioplayerObj)
-> boolean
Returns true
if a valid OpenAL effect slot is currently assigned to the player
function ncine.audio_player.has_source(player: audioplayerObj)
-> boolean
Returns true
if a valid OpenAL source is currently assigned to the player
function ncine.audio_player.is_looping(player: audioplayerObj)
-> boolean
Returns the looping property of the player
function ncine.audio_player.is_paused(player: audioplayerObj)
-> boolean
Returns true
if the player is paused
function ncine.audio_player.is_playing(player: audioplayerObj)
-> boolean
Returns true
if the player is playing
function ncine.audio_player.is_source_locked(player: audioplayerObj)
-> boolean
Returns true
if the OpenAL source is locked
function ncine.audio_player.is_stopped(player: audioplayerObj)
-> boolean
Returns true
if the player is stopped
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
function ncine.audio_player.num_channels(player: audioplayerObj)
-> integer
Returns the number of audio channels of the currently playing buffer
function ncine.audio_player.num_samples(player: audioplayerObj)
-> integer
Returns the number of samples
function ncine.audio_player.pause(player: audioplayerObj)
Pauses playing
function ncine.audio_player.play(player: audioplayerObj)
Starts playing
function ncine.audio_player.set_air_absorption_factor(player: audioplayerObj, factor: number)
Sets the player air absorption factor
function ncine.audiobuffer_player.set_audiobuffer(player: audiobufferplayerObj, buffer: audiobufferObj)
Sets the audio buffer used for playing
function ncine.audio_player.set_cone_inner_angle(player: audioplayerObj, angle: number)
Sets the player inside angle of the sound cone in degrees
function ncine.audio_player.set_cone_outer_angle(player: audioplayerObj, angle: number)
Sets the player outside angle of the sound cone in degrees
function ncine.audio_player.set_cone_outer_gain(player: audioplayerObj, gain: number)
Sets the player multiplication factor to determine the gain outside the cone
function ncine.audio_player.set_cone_outer_gain_hf(player: audioplayerObj, gain: number)
Sets the player cone outer gain HF value
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
function ncine.audio_player.set_direction(player: audioplayerObj, direction: ncine.vec3)
Sets the player direction vector
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
function ncine.audio_player.set_gain(player: audioplayerObj, gain: number)
Sets the player gain value
function ncine.audio_player.set_looping(player: audioplayerObj, looping: boolean)
Sets the looping property of the player
function ncine.audio_player.set_pitch(player: audioplayerObj, pitch: number)
Sets the player pitch value
function ncine.audio_player.set_position(player: audioplayerObj, position: ncine.vec3)
Sets the player position vector
function ncine.audio_player.set_room_rolloff_factor(player: audioplayerObj, factor: number)
Sets the player room rolloff factor
function ncine.audio_player.set_sample_offset(player: audioplayerObj, offset: integer)
Returns the size of the currently playing buffer in bytes
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
function ncine.audio_player.set_velocity(player: audioplayerObj, velocity: ncine.vec3)
Sets the player velocity vector
function ncine.audio_player.source_id(player: audioplayerObj)
-> integer
Returns the OpenAL id of the player source
function ncine.audio_player.stop(player: audioplayerObj)
Stops playing and rewinds
function ncine.audiobuffer_player.delete(player: audiobufferplayerObj)
function ncine.audiobuffer_player.get_audiobuffer(player: audiobufferplayerObj)
-> audiobufferObj
function ncine.audiobuffer_player.new(buffer: audiobufferObj)
-> audiobufferplayerObj
function ncine.audiobuffer_player.set_audiobuffer(player: audiobufferplayerObj, buffer: audiobufferObj)
function ncine.audio_player.buffer_id(player: audioplayerObj)
-> integer
Returns the OpenAL id of the currently playing buffer
function ncine.audio_player.buffer_size(player: audioplayerObj)
-> integer
Returns the size of the currently playing buffer in bytes
function ncine.audio_player.bytes_per_sample(player: audioplayerObj)
-> integer
Returns the number of bytes per sample
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
function ncine.audio_player.duration(player: audioplayerObj)
-> number
Returns the duration in seconds
function ncine.audio_player.frequency(player: audioplayerObj)
-> integer
Returns the samples frequency of the currently playing buffer
function ncine.audio_player.get_air_absorption_factor(player: audioplayerObj)
-> number
Returns the player air absorption factor
function ncine.audio_player.get_aux_filter_id(player: audioplayerObj)
-> integer
Returns the OpenAL id of the auxiliary filter
function ncine.audio_player.get_cone_inner_angle(player: audioplayerObj)
-> number
Returns the player inside angle of the sound cone in degrees
function ncine.audio_player.get_cone_outer_angle(player: audioplayerObj)
-> number
Returns the player outside angle of the sound cone in degrees
function ncine.audio_player.get_cone_outer_gain(player: audioplayerObj)
-> number
Returns the player multiplication factor to determine the gain outside the cone
function ncine.audio_player.get_cone_outer_gain_hf(player: audioplayerObj)
-> number
Returns the player cone outer gain HF value
function ncine.audio_player.get_direct_filter_id(player: audioplayerObj)
-> integer
Returns the OpenAL id of the direct filter
function ncine.audio_player.get_direction(player: audioplayerObj)
-> ncine.vec3
Returns the player direction vector
function ncine.audio_player.get_effect_slot_id(player: audioplayerObj)
-> integer
Returns the OpenAL id of the effect slot
function ncine.audio_player.get_gain(player: audioplayerObj)
-> number
Returns the player gain value
function ncine.audio_player.get_pitch(player: audioplayerObj)
-> number
Returns the player pitch value
function ncine.audio_player.get_position(player: audioplayerObj)
-> ncine.vec3
Returns the player position vector
function ncine.audio_player.get_room_rolloff_factor(player: audioplayerObj)
-> number
Returns the player room rolloff factor
function ncine.audio_player.get_sample_offset(player: audioplayerObj)
-> integer
Returns the size of the currently playing buffer in bytes
function ncine.audio_player.get_velocity(player: audioplayerObj)
-> ncine.vec3
Returns the player velocity vector
function ncine.audio_player.has_aux_filter(player: audioplayerObj)
-> boolean
Returns true
if a valid OpenAL auxiliary filter is currently assigned to the player
function ncine.audio_player.has_direct_filter(player: audioplayerObj)
-> boolean
Returns true
if a valid OpenAL direct filter is currently assigned to the player
function ncine.audio_player.has_effect_slot(player: audioplayerObj)
-> boolean
Returns true
if a valid OpenAL effect slot is currently assigned to the player
function ncine.audio_player.has_source(player: audioplayerObj)
-> boolean
Returns true
if a valid OpenAL source is currently assigned to the player
function ncine.audio_player.is_looping(player: audioplayerObj)
-> boolean
Returns the looping property of the player
function ncine.audio_player.is_paused(player: audioplayerObj)
-> boolean
Returns true
if the player is paused
function ncine.audio_player.is_playing(player: audioplayerObj)
-> boolean
Returns true
if the player is playing
function ncine.audio_player.is_source_locked(player: audioplayerObj)
-> boolean
Returns true
if the OpenAL source is locked
function ncine.audio_player.is_stopped(player: audioplayerObj)
-> boolean
Returns true
if the player is stopped
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
function ncine.audio_player.num_channels(player: audioplayerObj)
-> integer
Returns the number of audio channels of the currently playing buffer
function ncine.audio_player.num_samples(player: audioplayerObj)
-> integer
Returns the number of samples
function ncine.audiostream_player.num_samples_in_streambuffer(player: audiostreamplayerObj)
-> integer
Returns the number of samples in the streaming buffer
function ncine.audio_player.pause(player: audioplayerObj)
Pauses playing
function ncine.audio_player.play(player: audioplayerObj)
Starts playing
function ncine.audiostream_player.sample_offset_in_stream(player: audiostreamplayerObj)
-> integer
Returns the sample offset relative to the whole stream
function ncine.audio_player.set_air_absorption_factor(player: audioplayerObj, factor: number)
Sets the player air absorption factor
function ncine.audio_player.set_cone_inner_angle(player: audioplayerObj, angle: number)
Sets the player inside angle of the sound cone in degrees
function ncine.audio_player.set_cone_outer_angle(player: audioplayerObj, angle: number)
Sets the player outside angle of the sound cone in degrees
function ncine.audio_player.set_cone_outer_gain(player: audioplayerObj, gain: number)
Sets the player multiplication factor to determine the gain outside the cone
function ncine.audio_player.set_cone_outer_gain_hf(player: audioplayerObj, gain: number)
Sets the player cone outer gain HF value
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
function ncine.audio_player.set_direction(player: audioplayerObj, direction: ncine.vec3)
Sets the player direction vector
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
function ncine.audio_player.set_gain(player: audioplayerObj, gain: number)
Sets the player gain value
function ncine.audio_player.set_looping(player: audioplayerObj, looping: boolean)
Sets the looping property of the player
function ncine.audio_player.set_pitch(player: audioplayerObj, pitch: number)
Sets the player pitch value
function ncine.audio_player.set_position(player: audioplayerObj, position: ncine.vec3)
Sets the player position vector
function ncine.audio_player.set_room_rolloff_factor(player: audioplayerObj, factor: number)
Sets the player room rolloff factor
function ncine.audio_player.set_sample_offset(player: audioplayerObj, offset: integer)
Returns the size of the currently playing buffer in bytes
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
function ncine.audio_player.set_velocity(player: audioplayerObj, velocity: ncine.vec3)
Sets the player velocity vector
function ncine.audio_player.source_id(player: audioplayerObj)
-> integer
Returns the OpenAL id of the player source
function ncine.audio_player.stop(player: audioplayerObj)
Stops playing and rewinds
function ncine.audiostream_player.streambuffer_size(player: audiostreamplayerObj)
-> integer
Returns the size of the streaming buffer in bytes
ncine.audiostream_player
function ncine.audiostream_player.delete(player: audiostreamplayerObj)
function ncine.audiostream_player.new(filename: string)
-> audiostreamplayerObj
function ncine.audiostream_player.num_samples_in_streambuffer(player: audiostreamplayerObj)
-> integer
function ncine.audiostream_player.sample_offset_in_stream(player: audiostreamplayerObj)
-> integer
function ncine.audiostream_player.streambuffer_size(player: audiostreamplayerObj)
-> integer
ncine.base_sprite
function ncine.scenenode.add_child(parent: scenenodeObj, node: scenenodeObj)
-> boolean
Adds a child node to the specified parent
@return — true
if the node has been added
function ncine.drawable_node.get_aabb(node: drawablenodeObj)
-> ncine.rect
Returns the axis-aligned bounding box of the node area in the last frame
function ncine.scenenode.get_abs_anchor_point(node: scenenodeObj)
-> ncine.vec2
Returns the absolute transformation anchor point in pixels
function ncine.scenenode.get_alpha(node: scenenodeObj)
-> number
Returns the node alpha color component
function ncine.drawable_node.get_anchor_point(node: drawablenodeObj)
-> ncine.vec2
Returns the transformation anchor point
function ncine.scenenode.get_child(node: scenenodeObj, index: integer)
-> scenenodeObj?
Returns the n-th child
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
function ncine.scenenode.get_children(node: scenenodeObj)
-> scenenodeObj[]
Returns the array of children
function ncine.scenenode.get_color(node: scenenodeObj)
-> ncine.color
Returns the node color
function ncine.drawable_node.get_dest_blending_factor(node: drawablenodeObj)
-> ncine.blending_factor
Returns the destination blending factor
function ncine.drawable_node.get_height(node: drawablenodeObj)
-> number
Returns the height of the node area
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)
function ncine.scenenode.get_last_frame_updated(node: scenenodeObj)
-> integer
Returns the last frame in which any of the viewports have updated this node
function ncine.scenenode.get_layer(node: scenenodeObj)
-> integer
Returns the node rendering layer
function ncine.scenenode.get_parent(node: scenenodeObj)
-> scenenodeObj?
Returns the parent node, if there is any
function ncine.scenenode.get_position(node: scenenodeObj)
-> ncine.vec2
Returns the node position relative to its parent
function ncine.scenenode.get_rotation(node: scenenodeObj)
-> number
Returns the node rotation in degress
function ncine.scenenode.get_scale(node: scenenodeObj)
-> ncine.vec2
Returns the node scale factors
function ncine.drawable_node.get_size(node: drawablenodeObj)
-> ncine.vec2
Returns the size of the node area
function ncine.drawable_node.get_src_blending_factor(node: drawablenodeObj)
-> ncine.blending_factor
eturns the source blending factor
function ncine.base_sprite.get_texrect(sprite: basespriteObj)
-> ncine.rect
Returns the texture source rectangle for blitting
function ncine.base_sprite.get_texture(sprite: basespriteObj)
-> textureObj?
Returns the texture object
function ncine.scenenode.get_visit_order_index(node: scenenodeObj)
-> integer
Returns the visit drawing order of the node
function ncine.scenenode.get_visit_order_state(node: scenenodeObj)
-> ncine.visit_order_state
Returns the visit order state for the specified node
function ncine.drawable_node.get_width(node: drawablenodeObj)
-> number
Returns the width of the node area
function ncine.drawable_node.is_blending_enabled(node: drawablenodeObj)
-> boolean
Returns true
if the node renders with blending enabled
function ncine.scenenode.is_enabled(node: scenenodeObj)
-> boolean
Returns true
if the node is both updating and drawing
function ncine.base_sprite.is_flipped_x(sprite: basespriteObj)
-> boolean
Returns true
if the sprite texture is horizontally flipped
function ncine.base_sprite.is_flipped_y(sprite: basespriteObj)
-> boolean
Returns true
if the sprite texture is vertically flipped
function ncine.scenenode.num_children(node: scenenodeObj)
-> integer
Returns the number of children
function ncine.scenenode.remove_all_children(parent: scenenodeObj, index: any)
-> boolean
Removes all children from the specified parent
@return — true
if there were at least one node to remove
function ncine.scenenode.remove_child(parent: scenenodeObj, node: scenenodeObj)
-> boolean
Removes a child node from the specified parent
@return — true
if the node has been removed
function ncine.scenenode.remove_child_at(parent: scenenodeObj, index: integer)
-> boolean
Removes a child node at the specified index from the specified parent
@return — true
if the node has been removed
function ncine.base_sprite.reset_texture(sprite: basespriteObj)
Triggers a texture update without setting a new texture
function ncine.scenenode.set_abs_anchor_point(node: scenenodeObj, pos: ncine.vec2)
Sets the absolute transformation anchor point in pixels
function ncine.scenenode.set_alpha(node: scenenodeObj, alpha: number)
Sets the node alpha color component
function ncine.drawable_node.set_anchor_point(node: drawablenodeObj, anchor_point: ncine.vec2)
Sets the transformation anchor point
function ncine.drawable_node.set_blending_enabled(node: drawablenodeObj, enabled: boolean)
Sets the blending state for node rendering
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
function ncine.drawable_node.set_blending_preset(node: drawablenodeObj, preset: ncine.blending_preset)
Sets a blending preset for source and destination blending factors
function ncine.scenenode.set_color(node: scenenodeObj, color: ncine.color)
Sets the node color
function ncine.scenenode.set_enabled(node: scenenodeObj, newValue: boolean)
Enables or disables both node updating and drawing
function ncine.base_sprite.set_flipped_x(sprite: basespriteObj, flipped_x: boolean)
Flips the texture rect horizontally
function ncine.base_sprite.set_flipped_y(sprite: basespriteObj, flipped_y: boolean)
Flips the texture rect vertically
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.
function ncine.scenenode.set_parent(node: scenenodeObj, parent?: scenenodeObj)
-> boolean
Sets the parent node
@return — true
if the parent has been set
function ncine.scenenode.set_position(node: scenenodeObj, pos: ncine.vec2)
Sets a new position for the node
function ncine.scenenode.set_rotation(node: scenenodeObj, rot: number)
Sets the node rotation in degrees
@param rot
— The amount of degrees
function ncine.scenenode.set_scale(node: scenenodeObj, factor: number)
Sets both node scale factors to the specified value
function ncine.scenenode.set_scale_x(node: scenenodeObj, factor: number)
Sets the node scale X factor
function ncine.scenenode.set_scale_y(node: scenenodeObj, factor: number)
Sets the node scale Y factor
function ncine.base_sprite.set_size(sprite: basespriteObj, width: number, height: number)
Sets the sprite size
function ncine.base_sprite.set_texrect(sprite: basespriteObj, rect: ncine.rect)
Sets the texture source rectangle for blitting
function ncine.base_sprite.set_texture(sprite: basespriteObj, texture?: textureObj)
Sets the texture object
function ncine.scenenode.set_visit_order_state(node: scenenodeObj, state: ncine.visit_order_state)
Sets the visit order state for the specified node
function ncine.scenenode.swap_children(parent: scenenodeObj, firstIndex: integer, secondIndex: integer)
-> boolean
Swaps two children at the specified indices
@return — true
if the two nodes have been swapped
function ncine.scenenode.swap_node_back(node: scenenodeObj)
-> boolean
Brings this node one node back in the parent's list of children
@return — true
if the node has been brought one position back
function ncine.scenenode.swap_node_forward(node: scenenodeObj)
-> boolean
Brings this node one node forward in the parent's list of children
@return — true
if the node has been brought one position forward
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
@return — true
if the node has been unlinked
function ncine.base_sprite.get_texrect(sprite: basespriteObj)
-> ncine.rect
function ncine.base_sprite.get_texture(sprite: basespriteObj)
-> textureObj?
function ncine.base_sprite.is_flipped_x(sprite: basespriteObj)
-> boolean
function ncine.base_sprite.is_flipped_y(sprite: basespriteObj)
-> boolean
function ncine.base_sprite.reset_texture(sprite: basespriteObj)
function ncine.base_sprite.set_flipped_x(sprite: basespriteObj, flipped_x: boolean)
function ncine.base_sprite.set_flipped_y(sprite: basespriteObj, flipped_y: boolean)
function ncine.base_sprite.set_size(sprite: basespriteObj, width: number, height: number)
function ncine.base_sprite.set_texrect(sprite: basespriteObj, rect: ncine.rect)
function ncine.base_sprite.set_texture(sprite: basespriteObj, texture?: textureObj)
enum ncine.blending_factor
enum ncine.blending_preset
ncine.camera
function ncine.camera.delete(camera: cameraObj)
Destroys a camera object and releases its memory
@param camera
— The camera object to be destroyed
function ncine.camera.get_projection_values(camera: cameraObj)
-> camera_projection_values
Returns the projection values that are used to create the projection matrix
function ncine.camera.get_view_values(camera: cameraObj)
-> camera_view_values
Returns the view values that are used to create the model matrix
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
function ncine.camera.set_ortho_projection(camera: cameraObj, projection_values: camera_projection_values)
Updates the projection matrix using the projection values from the table
function ncine.camera.set_view(camera: cameraObj, view_values: camera_view_values)
Updates the model matrix using the view values from the table
function ncine.camera.delete(camera: cameraObj)
function ncine.camera.get_projection_values(camera: cameraObj)
-> camera_projection_values
function ncine.camera.get_view_values(camera: cameraObj)
-> camera_view_values
function ncine.camera.new()
-> cameraObj
function ncine.camera.set_ortho_projection(camera: cameraObj, projection_values: camera_projection_values)
function ncine.camera.set_view(camera: cameraObj, view_values: camera_view_values)
enum ncine.clear_mode
number
The alpha component
function ncine.color.add(color0: ncine.color, color1: ncine.color)
-> ncine.color
Adds two colors together, component-wise, clamping to 1.0
number
The blue component
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
number
The green component
function ncine.color.mul(color0: ncine.color, color1: ncine.color)
-> ncine.color
Multiplies two colors together, component-wise, clamping to 1.0
number
The red component
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
function ncine.color.add(color0: ncine.color, color1: ncine.color)
-> ncine.color
function ncine.color.create(r: number, g: number, b: number, a: number)
-> ncine.color
function ncine.color.mul(color0: ncine.color, color1: ncine.color)
-> ncine.color
function ncine.color.mul(color0: ncine.color, scalar: number)
-> ncine.color
function ncine.color.sub(color0: ncine.color, color1: ncine.color)
-> ncine.color
table
table
table
table
table
table
table
table
table
enum ncine.depth_stencil_format
function ncine.scenenode.add_child(parent: scenenodeObj, node: scenenodeObj)
-> boolean
Adds a child node to the specified parent
@return — true
if the node has been added
function ncine.drawable_node.get_aabb(node: drawablenodeObj)
-> ncine.rect
Returns the axis-aligned bounding box of the node area in the last frame
function ncine.scenenode.get_abs_anchor_point(node: scenenodeObj)
-> ncine.vec2
Returns the absolute transformation anchor point in pixels
function ncine.scenenode.get_alpha(node: scenenodeObj)
-> number
Returns the node alpha color component
function ncine.drawable_node.get_anchor_point(node: drawablenodeObj)
-> ncine.vec2
Returns the transformation anchor point
function ncine.scenenode.get_child(node: scenenodeObj, index: integer)
-> scenenodeObj?
Returns the n-th child
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
function ncine.scenenode.get_children(node: scenenodeObj)
-> scenenodeObj[]
Returns the array of children
function ncine.scenenode.get_color(node: scenenodeObj)
-> ncine.color
Returns the node color
function ncine.drawable_node.get_dest_blending_factor(node: drawablenodeObj)
-> ncine.blending_factor
Returns the destination blending factor
function ncine.drawable_node.get_height(node: drawablenodeObj)
-> number
Returns the height of the node area
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)
function ncine.scenenode.get_last_frame_updated(node: scenenodeObj)
-> integer
Returns the last frame in which any of the viewports have updated this node
function ncine.scenenode.get_layer(node: scenenodeObj)
-> integer
Returns the node rendering layer
function ncine.scenenode.get_parent(node: scenenodeObj)
-> scenenodeObj?
Returns the parent node, if there is any
function ncine.scenenode.get_position(node: scenenodeObj)
-> ncine.vec2
Returns the node position relative to its parent
function ncine.scenenode.get_rotation(node: scenenodeObj)
-> number
Returns the node rotation in degress
function ncine.scenenode.get_scale(node: scenenodeObj)
-> ncine.vec2
Returns the node scale factors
function ncine.drawable_node.get_size(node: drawablenodeObj)
-> ncine.vec2
Returns the size of the node area
function ncine.drawable_node.get_src_blending_factor(node: drawablenodeObj)
-> ncine.blending_factor
eturns the source blending factor
function ncine.scenenode.get_visit_order_index(node: scenenodeObj)
-> integer
Returns the visit drawing order of the node
function ncine.scenenode.get_visit_order_state(node: scenenodeObj)
-> ncine.visit_order_state
Returns the visit order state for the specified node
function ncine.drawable_node.get_width(node: drawablenodeObj)
-> number
Returns the width of the node area
function ncine.drawable_node.is_blending_enabled(node: drawablenodeObj)
-> boolean
Returns true
if the node renders with blending enabled
function ncine.scenenode.is_enabled(node: scenenodeObj)
-> boolean
Returns true
if the node is both updating and drawing
function ncine.scenenode.num_children(node: scenenodeObj)
-> integer
Returns the number of children
function ncine.scenenode.remove_all_children(parent: scenenodeObj, index: any)
-> boolean
Removes all children from the specified parent
@return — true
if there were at least one node to remove
function ncine.scenenode.remove_child(parent: scenenodeObj, node: scenenodeObj)
-> boolean
Removes a child node from the specified parent
@return — true
if the node has been removed
function ncine.scenenode.remove_child_at(parent: scenenodeObj, index: integer)
-> boolean
Removes a child node at the specified index from the specified parent
@return — true
if the node has been removed
function ncine.scenenode.set_abs_anchor_point(node: scenenodeObj, pos: ncine.vec2)
Sets the absolute transformation anchor point in pixels
function ncine.scenenode.set_alpha(node: scenenodeObj, alpha: number)
Sets the node alpha color component
function ncine.drawable_node.set_anchor_point(node: drawablenodeObj, anchor_point: ncine.vec2)
Sets the transformation anchor point
function ncine.drawable_node.set_blending_enabled(node: drawablenodeObj, enabled: boolean)
Sets the blending state for node rendering
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
function ncine.drawable_node.set_blending_preset(node: drawablenodeObj, preset: ncine.blending_preset)
Sets a blending preset for source and destination blending factors
function ncine.scenenode.set_color(node: scenenodeObj, color: ncine.color)
Sets the node color
function ncine.scenenode.set_enabled(node: scenenodeObj, newValue: boolean)
Enables or disables both node updating and drawing
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.
function ncine.scenenode.set_parent(node: scenenodeObj, parent?: scenenodeObj)
-> boolean
Sets the parent node
@return — true
if the parent has been set
function ncine.scenenode.set_position(node: scenenodeObj, pos: ncine.vec2)
Sets a new position for the node
function ncine.scenenode.set_rotation(node: scenenodeObj, rot: number)
Sets the node rotation in degrees
@param rot
— The amount of degrees
function ncine.scenenode.set_scale(node: scenenodeObj, factor: number)
Sets both node scale factors to the specified value
function ncine.scenenode.set_scale_x(node: scenenodeObj, factor: number)
Sets the node scale X factor
function ncine.scenenode.set_scale_y(node: scenenodeObj, factor: number)
Sets the node scale Y factor
function ncine.scenenode.set_visit_order_state(node: scenenodeObj, state: ncine.visit_order_state)
Sets the visit order state for the specified node
function ncine.scenenode.swap_children(parent: scenenodeObj, firstIndex: integer, secondIndex: integer)
-> boolean
Swaps two children at the specified indices
@return — true
if the two nodes have been swapped
function ncine.scenenode.swap_node_back(node: scenenodeObj)
-> boolean
Brings this node one node back in the parent's list of children
@return — true
if the node has been brought one position back
function ncine.scenenode.swap_node_forward(node: scenenodeObj)
-> boolean
Brings this node one node forward in the parent's list of children
@return — true
if the node has been brought one position forward
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
@return — true
if the node has been unlinked
ncine.drawable_node
function ncine.drawable_node.get_aabb(node: drawablenodeObj)
-> ncine.rect
function ncine.drawable_node.get_anchor_point(node: drawablenodeObj)
-> ncine.vec2
function ncine.drawable_node.get_dest_blending_factor(node: drawablenodeObj)
-> ncine.blending_factor
function ncine.drawable_node.get_height(node: drawablenodeObj)
-> number
function ncine.drawable_node.get_last_frame_rendered(node: drawablenodeObj)
-> integer
function ncine.drawable_node.get_size(node: drawablenodeObj)
-> ncine.vec2
function ncine.drawable_node.get_src_blending_factor(node: drawablenodeObj)
-> ncine.blending_factor
function ncine.drawable_node.get_width(node: drawablenodeObj)
-> number
function ncine.drawable_node.is_blending_enabled(node: drawablenodeObj)
-> boolean
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)
function ncine.drawable_node.set_blending_enabled(node: drawablenodeObj, enabled: boolean)
function ncine.drawable_node.set_blending_factors(node: drawablenodeObj, src_factor: ncine.blending_factor, dest_factor: ncine.blending_factor)
function ncine.drawable_node.set_blending_preset(node: drawablenodeObj, preset: ncine.blending_preset)
enum ncine.efx_reverb_presets
function ncine.font.delete(font: fontObj)
Destroys a font object and releases its memory
@param font
— The font object to be destroyed
function ncine.font.get_base(font: fontObj)
-> integer
Returns the font base
function ncine.font.get_line_height(font: fontObj)
-> integer
Returns the font line height
function ncine.font.get_render_mode(font: fontObj)
-> ncine.font_render_mode
Returns the mode detected by the font to render text nodes
function ncine.font.get_texture(font: fontObj)
-> textureObj?
Returns the texture object in use by the font
function ncine.font.get_texture_size(font: fontObj)
-> ncine.vec2
Returns the texture atlas size
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
function ncine.font.num_glyphs(font: fontObj)
-> integer
Returns the number of glyphs
function ncine.font.num_kernings(font: fontObj)
-> integer
Returns the number of kerning pairs
function ncine.font.set_texture(font: fontObj, texture?: textureObj)
Sets a new shared texture object without modifying any glyphs or kerning data
ncine.font
function ncine.font.delete(font: fontObj)
function ncine.font.get_base(font: fontObj)
-> integer
function ncine.font.get_line_height(font: fontObj)
-> integer
function ncine.font.get_render_mode(font: fontObj)
-> ncine.font_render_mode
function ncine.font.get_texture(font: fontObj)
-> textureObj?
function ncine.font.get_texture_size(font: fontObj)
-> ncine.vec2
function ncine.font.new(fnt_file: string, texture_file: string)
-> fontObj
function ncine.font.num_glyphs(font: fontObj)
-> integer
function ncine.font.num_kernings(font: fontObj)
-> integer
function ncine.font.set_texture(font: fontObj, texture?: textureObj)
enum ncine.font_render_mode
ncine.frame_timer
function ncine.frame_timer.average_fps()
-> number
Returns the average FPS during the update interval
function ncine.frame_timer.average_frame_time()
-> number
Returns the average frame time in seconds during the update interval
function ncine.frame_timer.current_frame_duration()
-> number
Returns the elapsed time in seconds since current frame started
function ncine.frame_timer.get_average_interval()
-> number
Returns the number of seconds between two average FPS calculations
function ncine.frame_timer.get_log_level()
-> ncine.log_level
Returns the level for the logging events
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.
function ncine.frame_timer.is_average_enabled()
-> boolean
Returns true
if the average FPS calculation is enabled
function ncine.frame_timer.is_logging_enabled()
-> boolean
Returns true
if logging of averages is enabled
function ncine.frame_timer.last_frame_duration()
-> number
Returns the time in seconds that last frame took to complete
function ncine.frame_timer.set_average_interval(interval: number)
Sets the number of seconds between two average FPS calculations
function ncine.frame_timer.set_log_level(log_level: ncine.log_level)
Sets the level for the logging events
function ncine.frame_timer.set_logging_interval(interval: number)
Sets the number of seconds between two logging events
function ncine.frame_timer.total_number_frames()
-> integer
Returns the total number of frames rendered since the application started
function ncine.frame_timer.average_fps()
-> number
function ncine.frame_timer.average_frame_time()
-> number
function ncine.frame_timer.current_frame_duration()
-> number
function ncine.frame_timer.get_average_interval()
-> number
function ncine.frame_timer.get_log_level()
-> ncine.log_level
function ncine.frame_timer.get_logging_interval()
-> number
function ncine.frame_timer.is_average_enabled()
-> boolean
function ncine.frame_timer.is_logging_enabled()
-> boolean
function ncine.frame_timer.last_frame_duration()
-> number
function ncine.frame_timer.set_average_interval(interval: number)
function ncine.frame_timer.set_log_level(log_level: ncine.log_level)
function ncine.frame_timer.set_logging_interval(interval: number)
function ncine.frame_timer.total_number_frames()
-> integer
ncine.fs
function ncine.fs.absolute_join_path(first: string, second: string)
-> string
Returns the absolute path after joining together two path components
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.
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
function ncine.fs.basename(path: string)
-> string
Returns the path component after the final separator
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
function ncine.fs.copy(old_path: string, new_path: string)
-> boolean
Copies a file
@return — True if the file has been copied
function ncine.fs.create_dir(path: string)
-> boolean
Creates a new directory
@return — True if the new directory has been created
function ncine.fs.delete_empty_dir(path: string)
-> boolean
Deletes an empty directory
@return — True if the empty directory has been deleted
function ncine.fs.delete_file(path: string)
-> boolean
Deletes a file
@return — True if the file has been deleted
function ncine.fs.dirname(path: string)
-> string
Returns the path up to, but not including, the final separator
function ncine.fs.exists(path: string)
-> boolean
Returns true
if the file or directory exists
function ncine.fs.file_size(path: string)
-> integer
Returns the file size in bytes
function ncine.fs.get_cache_path()
-> string
Returns the writable directory for saving cache data
function ncine.fs.get_current_dir()
-> string
Returns the path of the current working directory
function ncine.fs.get_data_path()
-> string
Returns the base directory for data loading
function ncine.fs.get_extension(path: string)
-> string?
Returns the extension position in the string or nil
if it is not found
function ncine.fs.get_home_path()
-> string
Returns the current user home directory
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
function ncine.fs.get_save_path()
-> string
Returns the writable directory for saving data
function ncine.fs.has_extension(path: string, extension: string)
-> boolean
Returns true
if the path has the specified extension (case-insensitive comparison)
function ncine.fs.is_directory(path: string)
-> boolean
Returns true
if the specified path is a directory
function ncine.fs.is_executable(path: string)
-> boolean
Returns true
if the file or directory is executable
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
function ncine.fs.is_readable(path: string)
-> boolean
Returns true
if the file or directory is readable
function ncine.fs.is_readable_file(path: string)
-> boolean
Returns true
if the path is a file and is readable
function ncine.fs.is_writable(path: string)
-> boolean
Returns true
if the file or directory is writable
function ncine.fs.is_writable_file(path: string)
-> boolean
Returns true
if the path is a file and is writeable
function ncine.fs.join_path(first: string, second: string)
-> string
Joins together two path components
function ncine.fs.last_access_time(path: string)
-> file_date
Returns the last time the file or directory was accessed
See: file_date
function ncine.fs.last_modification_time(path: string)
-> file_date
Returns the last time the file or directory was modified
See: file_date
function ncine.fs.logical_drive_strings()
-> string
Returns a buffer with strings that specify valid drives in the system on Windows
function ncine.fs.logical_drives()
-> integer
Returns a bitmask representing the currently available disk drives on Windows
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
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
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
function ncine.fs.absolute_join_path(first: string, second: string)
-> string
function ncine.fs.absolute_path(path: string)
-> string
function ncine.fs.add_permissions(path: string, mode: integer)
-> boolean
function ncine.fs.basename(path: string)
-> string
function ncine.fs.change_permissions(path: string, mode: integer)
-> boolean
function ncine.fs.copy(old_path: string, new_path: string)
-> boolean
function ncine.fs.create_dir(path: string)
-> boolean
function ncine.fs.delete_empty_dir(path: string)
-> boolean
function ncine.fs.delete_file(path: string)
-> boolean
function ncine.fs.dirname(path: string)
-> string
function ncine.fs.exists(path: string)
-> boolean
function ncine.fs.file_size(path: string)
-> integer
function ncine.fs.get_cache_path()
-> string
function ncine.fs.get_current_dir()
-> string
function ncine.fs.get_data_path()
-> string
function ncine.fs.get_extension(path: string)
-> string?
function ncine.fs.get_home_path()
-> string
function ncine.fs.get_permissions(path: string)
-> integer
function ncine.fs.get_save_path()
-> string
function ncine.fs.has_extension(path: string, extension: string)
-> boolean
function ncine.fs.is_directory(path: string)
-> boolean
function ncine.fs.is_executable(path: string)
-> boolean
function ncine.fs.is_file(path: string)
-> boolean
ncine.fs.is_hidden
function ncine.fs.is_hidden(path: string)
-> boolean
function ncine.fs.is_readable(path: string)
-> boolean
function ncine.fs.is_readable_file(path: string)
-> boolean
function ncine.fs.is_writable(path: string)
-> boolean
function ncine.fs.is_writable_file(path: string)
-> boolean
function ncine.fs.join_path(first: string, second: string)
-> string
function ncine.fs.last_access_time(path: string)
-> file_date
function ncine.fs.last_modification_time(path: string)
-> file_date
function ncine.fs.logical_drive_strings()
-> string
function ncine.fs.logical_drives()
-> integer
function ncine.fs.remove_permissions(path: string, mode: integer)
-> boolean
function ncine.fs.rename(old_path: string, new_path: string)
-> boolean
function ncine.fs.set_current_dir(path: string)
-> boolean
ncine.fs.set_hidden
function ncine.fs.set_hidden(path: string, hidden: boolean)
-> boolean
function ncine.gfx_device.flash_window()
Highlights the application window to notify the user
function ncine.gfx_device.get_aspect_ratio()
-> number
Returns the window or video mode resolution aspect ratio
function ncine.gfx_device.get_current_video_mode()
-> video_mode
Returns the current video mode for the specified monitor`
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
function ncine.gfx_device.get_drawable_width()
-> integer
Returns the window width in pixels
It may differs from width()
on HiDPI screens
function ncine.gfx_device.get_hdrawable_eight()
-> integer
Returns the window height in pixels
It may differs from width()
on HiDPI screens
function ncine.gfx_device.get_height()
-> integer
Returns the window or video mode height in screen coordinates
function ncine.gfx_device.get_monitor(index: integer)
-> monitor
Returns the specified monitor
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
function ncine.gfx_device.get_resolution()
-> ncine.vec2
Returns the window or video mode resolution in screen coordinates as a ncine.vec2
function ncine.gfx_device.get_width()
-> integer
Returns the window or video mode width in screen coordinates
function ncine.gfx_device.get_window_monitor_index()
-> integer
Returns the array index of the monitor associated with the window
function ncine.gfx_device.get_window_position()
-> ncine.vec2
Returns the window position as a ncine.vec2
function ncine.gfx_device.get_window_position_x()
-> integer
Returns the window horizontal position
function ncine.gfx_device.get_window_position_y()
-> integer
Returns the window vertical position
function ncine.gfx_device.get_window_scaling_factor()
-> number
Returns the scaling factor for application window
function ncine.gfx_device.is_fullscreen()
-> boolean
Returns true
if the device renders in full screen
function ncine.gfx_device.is_resizable()
-> boolean
Returns true
if the window is resizable
function ncine.gfx_device.num_monitors()
-> integer
Returns the number of connected monitors
function ncine.gfx_device.set_fullscreen(in_fullscreen: boolean)
Sets the full screen flag of the window
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.
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.
function ncine.gfx_device.set_window_icon(icon_filename: string)
Sets the application window icon
function ncine.gfx_device.set_window_position(position: ncine.vec2)
Sets the position of the application window with a ncine.vec2
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.
function ncine.gfx_device.set_window_title(title: string)
Sets the application window title
ncine.gfx_device
function ncine.gfx_device.flash_window()
function ncine.gfx_device.get_aspect_ratio()
-> number
function ncine.gfx_device.get_current_video_mode()
-> video_mode
function ncine.gfx_device.get_drawable_resolution()
-> ncine.vec2
function ncine.gfx_device.get_drawable_width()
-> integer
function ncine.gfx_device.get_hdrawable_eight()
-> integer
function ncine.gfx_device.get_height()
-> integer
function ncine.gfx_device.get_monitor(index: integer)
-> monitor
function ncine.gfx_device.get_primary_monitor_index()
-> integer
function ncine.gfx_device.get_resolution()
-> ncine.vec2
function ncine.gfx_device.get_width()
-> integer
function ncine.gfx_device.get_window_monitor_index()
-> integer
function ncine.gfx_device.get_window_position()
-> ncine.vec2
function ncine.gfx_device.get_window_position_x()
-> integer
function ncine.gfx_device.get_window_position_y()
-> integer
function ncine.gfx_device.get_window_scaling_factor()
-> number
function ncine.gfx_device.is_fullscreen()
-> boolean
function ncine.gfx_device.is_resizable()
-> boolean
function ncine.gfx_device.num_monitors()
-> integer
function ncine.gfx_device.set_fullscreen(in_fullscreen: boolean)
function ncine.gfx_device.set_swap_interval(interval: integer)
function ncine.gfx_device.set_video_mode(mode_index: integer)
function ncine.gfx_device.set_window_icon(icon_filename: string)
function ncine.gfx_device.set_window_position(position: ncine.vec2)
function ncine.gfx_device.set_window_position(position_x: integer, position_y: integer)
function ncine.gfx_device.set_window_size(size: ncine.vec2)
function ncine.gfx_device.set_window_size(width: integer, height: integer)
function ncine.gfx_device.set_window_title(title: string)
table
ncine.input
function ncine.input.add_joymappings_from_file(filename: string)
Adds joystick mapping configurations from a text file
function ncine.input.add_joymappings_from_strings(strings: string[])
Adds joystick mapping configurations from a strings array
function ncine.input.deadzone_normalize(joy_vector: ncine.vec2, deadzone_value: number)
Modifies the joystick axis vector to account for a dead zone
function ncine.input.get_mouse_cursor_mode(joy_id: any)
-> ncine.mouse_cursor_mode
Returns current mouse cursor mode
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
function ncine.input.joy_axis_value(joystick_state: joystickstateObj, axis_id: integer)
-> integer
Returns a value between -32768
and 32767
for a joystick axis
function ncine.input.joy_button_pressed(joystick_state: joystickstateObj, button_id: integer)
-> boolean
Returns true
if the specified joystick button is pressed
function ncine.input.joy_guid(joy_id: integer)
-> string
Returns the GUID of the specified joystick
function ncine.input.joy_hat_state(joystick_state: joystickstateObj, hat_id: integer)
-> ncine.joy_hat_state
Returns the state of the specified hat
function ncine.input.joy_mapped(joy_id: integer)
-> boolean
Returns true
if the joystick has a valid mapping configuration
function ncine.input.joy_name(joy_id: integer)
-> string
joy_id
function ncine.input.joy_num_axes(joy_id: integer)
-> integer
Returns the number of available axes for the specified joystick
function ncine.input.joy_num_buttons(joy_id: integer)
-> integer
Returns the number of available buttons for the specified joystick
function ncine.input.joy_num_hats(joy_id: integer)
-> integer
Returns the number of available hats for the specified joystick
function ncine.input.joy_present(joy_id: integer)
-> boolean
Returns true
if the specified joystick is connected
function ncine.input.joy_state()
-> joystickstateObj
Returns the state of the joystick
function ncine.input.joymapped_state()
-> joymappedstateObj
Returns the state of the mapped joystick
function ncine.input.key_down(key_state: keystateObj, keysym: integer)
-> boolean
Returns true
if the specified key is down
function ncine.input.key_state()
-> keystateObj
Returns current keyboard state
function ncine.input.mouse_state()
-> mouse_state
Returns current mouse state
function ncine.input.num_joymappings(strings: any)
-> integer
Returns the current number of valid joystick mappings
function ncine.input.set_mouse_cursor_mode(mouse_cursor_mode: ncine.mouse_cursor_mode)
Sets the mouse cursor mode
function ncine.input.add_joymappings_from_file(filename: string)
function ncine.input.add_joymappings_from_strings(strings: string[])
function ncine.input.deadzone_normalize(joy_vector: ncine.vec2, deadzone_value: number)
function ncine.input.get_mouse_cursor_mode(joy_id: any)
-> ncine.mouse_cursor_mode
function ncine.input.joy_axis_normvalue(joystick_state: joystickstateObj, axis_id: integer)
-> number
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
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
function ncine.input.joy_guid(joy_id: integer)
-> string
function ncine.input.joy_hat_state(joystick_state: joystickstateObj, hat_id: integer)
-> ncine.joy_hat_state
function ncine.input.joy_mapped(joy_id: integer)
-> boolean
function ncine.input.joy_name(joy_id: integer)
-> string
function ncine.input.joy_num_axes(joy_id: integer)
-> integer
function ncine.input.joy_num_buttons(joy_id: integer)
-> integer
function ncine.input.joy_num_hats(joy_id: integer)
-> integer
function ncine.input.joy_present(joy_id: integer)
-> boolean
function ncine.input.joy_state()
-> joystickstateObj
function ncine.input.joymapped_state()
-> joymappedstateObj
function ncine.input.key_down(key_state: keystateObj, keysym: integer)
-> boolean
function ncine.input.key_state()
-> keystateObj
function ncine.input.mouse_state()
-> mouse_state
function ncine.input.num_joymappings(strings: any)
-> integer
function ncine.input.set_mouse_cursor_mode(mouse_cursor_mode: ncine.mouse_cursor_mode)
enum ncine.joy_axis
enum ncine.joy_button
table
enum ncine.joy_hat_state
enum ncine.keymod
enum ncine.keysym
function ncine.log.debug(msg: string)
Logs a message with a ncine.log_level.DEBUG
level
function ncine.log.error(msg: string)
Logs a message with a ncine.log_level.ERROR
level
function ncine.log.fatal(msg: string)
Logs a message with a ncine.log_level.FATAL
level
function ncine.log.info(msg: string)
Logs a message with a ncine.log_level.INFO
level
function ncine.log.verbose(msg: string)
Logs a message with a ncine.log_level.VERBOSE
level
function ncine.log.warn(msg: string)
Logs a message with a ncine.log_level.WARN
level
ncine.log
function ncine.log.debug(msg: string)
function ncine.log.error(msg: string)
function ncine.log.fatal(msg: string)
function ncine.log.info(msg: string)
function ncine.log.verbose(msg: string)
function ncine.log.warn(msg: string)
enum ncine.log_level
enum ncine.loop_mode
function ncine.scenenode.add_child(parent: scenenodeObj, node: scenenodeObj)
-> boolean
Adds a child node to the specified parent
@return — true
if the node has been added
function ncine.mesh_sprite.are_unique_indices(sprite: meshspriteObj)
-> boolean
Returns true
if the indices belong to the sprite and are not stored externally
function ncine.mesh_sprite.are_unique_vertices(sprite: meshspriteObj)
-> boolean
Returns true
if the vertices belong to the sprite and are not stored externally
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
function ncine.mesh_sprite.copy_indices(sprite: meshspriteObj, indices: integer[])
Copies the indices data from a table into the sprite (no texture version)
function ncine.mesh_sprite.copy_vertices(sprite: meshspriteObj, vertices: mesh_sprite_vertex[])
Copies the vertices data from a table into the sprite
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
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
function ncine.mesh_sprite.emplace_indices(sprite: meshspriteObj, indices: integer[])
Emplaces the indices data from an array of integers into the sprite
function ncine.mesh_sprite.emplace_vertices(sprite: meshspriteObj, vertices: number[])
Emplaces the vertices data from an array of numbers into the sprite
function ncine.drawable_node.get_aabb(node: drawablenodeObj)
-> ncine.rect
Returns the axis-aligned bounding box of the node area in the last frame
function ncine.scenenode.get_abs_anchor_point(node: scenenodeObj)
-> ncine.vec2
Returns the absolute transformation anchor point in pixels
function ncine.scenenode.get_alpha(node: scenenodeObj)
-> number
Returns the node alpha color component
function ncine.drawable_node.get_anchor_point(node: drawablenodeObj)
-> ncine.vec2
Returns the transformation anchor point
function ncine.mesh_sprite.get_bytes_per_vertex(sprite: meshspriteObj)
-> integer
Returns the number of bytes used by each vertex
function ncine.scenenode.get_child(node: scenenodeObj, index: integer)
-> scenenodeObj?
Returns the n-th child
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
function ncine.scenenode.get_children(node: scenenodeObj)
-> scenenodeObj[]
Returns the array of children
function ncine.scenenode.get_color(node: scenenodeObj)
-> ncine.color
Returns the node color
function ncine.drawable_node.get_dest_blending_factor(node: drawablenodeObj)
-> ncine.blending_factor
Returns the destination blending factor
function ncine.drawable_node.get_height(node: drawablenodeObj)
-> number
Returns the height of the node area
function ncine.mesh_sprite.get_indices(sprite: meshspriteObj)
-> integer[]
Returns the indices used to draw the sprite mesh
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)
function ncine.scenenode.get_last_frame_updated(node: scenenodeObj)
-> integer
Returns the last frame in which any of the viewports have updated this node
function ncine.scenenode.get_layer(node: scenenodeObj)
-> integer
Returns the node rendering layer
function ncine.scenenode.get_parent(node: scenenodeObj)
-> scenenodeObj?
Returns the parent node, if there is any
function ncine.scenenode.get_position(node: scenenodeObj)
-> ncine.vec2
Returns the node position relative to its parent
function ncine.scenenode.get_rotation(node: scenenodeObj)
-> number
Returns the node rotation in degress
function ncine.scenenode.get_scale(node: scenenodeObj)
-> ncine.vec2
Returns the node scale factors
function ncine.drawable_node.get_size(node: drawablenodeObj)
-> ncine.vec2
Returns the size of the node area
function ncine.drawable_node.get_src_blending_factor(node: drawablenodeObj)
-> ncine.blending_factor
eturns the source blending factor
function ncine.base_sprite.get_texrect(sprite: basespriteObj)
-> ncine.rect
Returns the texture source rectangle for blitting
function ncine.base_sprite.get_texture(sprite: basespriteObj)
-> textureObj?
Returns the texture object
function ncine.mesh_sprite.get_vertices(sprite: meshspriteObj)
-> number[]
Returns the vertices data of the sprite mesh
function ncine.scenenode.get_visit_order_index(node: scenenodeObj)
-> integer
Returns the visit drawing order of the node
function ncine.scenenode.get_visit_order_state(node: scenenodeObj)
-> ncine.visit_order_state
Returns the visit order state for the specified node
function ncine.drawable_node.get_width(node: drawablenodeObj)
-> number
Returns the width of the node area
function ncine.drawable_node.is_blending_enabled(node: drawablenodeObj)
-> boolean
Returns true
if the node renders with blending enabled
function ncine.scenenode.is_enabled(node: scenenodeObj)
-> boolean
Returns true
if the node is both updating and drawing
function ncine.base_sprite.is_flipped_x(sprite: basespriteObj)
-> boolean
Returns true
if the sprite texture is horizontally flipped
function ncine.base_sprite.is_flipped_y(sprite: basespriteObj)
-> boolean
Returns true
if the sprite texture is vertically flipped
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
function ncine.mesh_sprite.num_bytes(sprite: meshspriteObj)
-> integer
Returns the total number of bytes used by all sprite's vertices
function ncine.scenenode.num_children(node: scenenodeObj)
-> integer
Returns the number of children
function ncine.mesh_sprite.num_indices(sprite: meshspriteObj)
-> integer
Returns the number of indices used to draw the sprite mesh
function ncine.mesh_sprite.num_vertices(sprite: meshspriteObj)
-> integer
Returns the number of vertices of the sprite mesh
function ncine.scenenode.remove_all_children(parent: scenenodeObj, index: any)
-> boolean
Removes all children from the specified parent
@return — true
if there were at least one node to remove
function ncine.scenenode.remove_child(parent: scenenodeObj, node: scenenodeObj)
-> boolean
Removes a child node from the specified parent
@return — true
if the node has been removed
function ncine.scenenode.remove_child_at(parent: scenenodeObj, index: integer)
-> boolean
Removes a child node at the specified index from the specified parent
@return — true
if the node has been removed
function ncine.base_sprite.reset_texture(sprite: basespriteObj)
Triggers a texture update without setting a new texture
function ncine.scenenode.set_abs_anchor_point(node: scenenodeObj, pos: ncine.vec2)
Sets the absolute transformation anchor point in pixels
function ncine.scenenode.set_alpha(node: scenenodeObj, alpha: number)
Sets the node alpha color component
function ncine.drawable_node.set_anchor_point(node: drawablenodeObj, anchor_point: ncine.vec2)
Sets the transformation anchor point
function ncine.drawable_node.set_blending_enabled(node: drawablenodeObj, enabled: boolean)
Sets the blending state for node rendering
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
function ncine.drawable_node.set_blending_preset(node: drawablenodeObj, preset: ncine.blending_preset)
Sets a blending preset for source and destination blending factors
function ncine.scenenode.set_color(node: scenenodeObj, color: ncine.color)
Sets the node color
function ncine.scenenode.set_enabled(node: scenenodeObj, newValue: boolean)
Enables or disables both node updating and drawing
function ncine.base_sprite.set_flipped_x(sprite: basespriteObj, flipped_x: boolean)
Flips the texture rect horizontally
function ncine.base_sprite.set_flipped_y(sprite: basespriteObj, flipped_y: boolean)
Flips the texture rect vertically
function ncine.mesh_sprite.set_indices(sprite: meshspriteObj, source_sprite: meshspriteObj)
Sets the indices data to the data used by another sprite
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.
function ncine.scenenode.set_parent(node: scenenodeObj, parent?: scenenodeObj)
-> boolean
Sets the parent node
@return — true
if the parent has been set
function ncine.scenenode.set_position(node: scenenodeObj, pos: ncine.vec2)
Sets a new position for the node
function ncine.scenenode.set_rotation(node: scenenodeObj, rot: number)
Sets the node rotation in degrees
@param rot
— The amount of degrees
function ncine.scenenode.set_scale(node: scenenodeObj, factor: number)
Sets both node scale factors to the specified value
function ncine.scenenode.set_scale_x(node: scenenodeObj, factor: number)
Sets the node scale X factor
function ncine.scenenode.set_scale_y(node: scenenodeObj, factor: number)
Sets the node scale Y factor
function ncine.base_sprite.set_size(sprite: basespriteObj, width: number, height: number)
Sets the sprite size
function ncine.base_sprite.set_texrect(sprite: basespriteObj, rect: ncine.rect)
Sets the texture source rectangle for blitting
function ncine.base_sprite.set_texture(sprite: basespriteObj, texture?: textureObj)
Sets the texture object
function ncine.mesh_sprite.set_vertices(sprite: meshspriteObj, source_sprite: meshspriteObj)
Sets the vertices data to the data used by another sprite
function ncine.scenenode.set_visit_order_state(node: scenenodeObj, state: ncine.visit_order_state)
Sets the visit order state for the specified node
function ncine.scenenode.swap_children(parent: scenenodeObj, firstIndex: integer, secondIndex: integer)
-> boolean
Swaps two children at the specified indices
@return — true
if the two nodes have been swapped
function ncine.scenenode.swap_node_back(node: scenenodeObj)
-> boolean
Brings this node one node back in the parent's list of children
@return — true
if the node has been brought one position back
function ncine.scenenode.swap_node_forward(node: scenenodeObj)
-> boolean
Brings this node one node forward in the parent's list of children
@return — true
if the node has been brought one position forward
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
@return — true
if the node has been unlinked
ncine.mesh_sprite
function ncine.mesh_sprite.are_unique_indices(sprite: meshspriteObj)
-> boolean
function ncine.mesh_sprite.are_unique_vertices(sprite: meshspriteObj)
-> boolean
function ncine.mesh_sprite.clone(sprite: meshspriteObj)
-> meshspriteObj
function ncine.mesh_sprite.copy_indices(sprite: meshspriteObj, indices: integer[])
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[])
function ncine.mesh_sprite.create_vertices_from_texels(sprite: meshspriteObj, texels: ncine.vec2[], texture_cut_mode: ncine.texture_cut_mode)
function ncine.mesh_sprite.delete(sprite: meshspriteObj)
function ncine.mesh_sprite.emplace_indices(sprite: meshspriteObj, indices: integer[])
function ncine.mesh_sprite.emplace_vertices(sprite: meshspriteObj, vertices: number[])
function ncine.mesh_sprite.get_bytes_per_vertex(sprite: meshspriteObj)
-> integer
function ncine.mesh_sprite.get_indices(sprite: meshspriteObj)
-> integer[]
function ncine.mesh_sprite.get_vertices(sprite: meshspriteObj)
-> number[]
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
function ncine.mesh_sprite.num_bytes(sprite: meshspriteObj)
-> integer
function ncine.mesh_sprite.num_indices(sprite: meshspriteObj)
-> integer
function ncine.mesh_sprite.num_vertices(sprite: meshspriteObj)
-> integer
function ncine.mesh_sprite.set_indices(sprite: meshspriteObj, source_sprite: meshspriteObj)
function ncine.mesh_sprite.set_vertices(sprite: meshspriteObj, source_sprite: meshspriteObj)
enum ncine.mouse_button
enum ncine.mouse_cursor_mode
function ncine.on_acceleration(event: accelerometer_event)
function ncine.on_change_scaling_factor(factor: number)
function ncine.on_draw_viewport(viewport: viewportObj)
function ncine.on_frame_end()
function ncine.on_frame_start()
function ncine.on_init()
function ncine.on_joy_axis_moved(event: joy_axis_event)
function ncine.on_joy_button_pressed(event: joy_button_event)
function ncine.on_joy_button_released(event: joy_button_event)
function ncine.on_joy_connected(event: joy_connection_event)
function ncine.on_joy_disconnected(event: joy_connection_event)
function ncine.on_joy_hat_moved(event: joy_hat_event)
function ncine.on_joymapped_axis_moved(event: joymapped_axis_event)
function ncine.on_joymapped_button_pressed(event: joymapped_button_event)
function ncine.on_joymapped_button_released(event: joymapped_button_event)
function ncine.on_key_pressed(event: keyboard_event)
function ncine.on_key_released(event: keyboard_event)
function ncine.on_mouse_button_pressed(event: mouse_event)
function ncine.on_mouse_button_released(event: mouse_event)
function ncine.on_mouse_moved(event: mouse_state)
function ncine.on_pointer_down(event: touch_event)
function ncine.on_pointer_up(event: touch_event)
function ncine.on_post_update()
function ncine.on_pre_init(cfg: ncine.app_configuration)
function ncine.on_quit_request()
-> boolean
function ncine.on_resize_window(width: integer, height: integer)
function ncine.on_resume()
function ncine.on_scroll_input(event: scroll_event)
function ncine.on_shutdown()
function ncine.on_suspend()
function ncine.on_text_input(event: text_input_event)
function ncine.on_touch_down(event: touch_event)
function ncine.on_touch_move(event: touch_event)
function ncine.on_touch_up(event: touch_event)
ncine.particle_affector
function ncine.particle_affector.add_color_step(affector: affectorObj, age: number, color: ncine.color)
Adds a color step (if the affector type is COLOR
)
function ncine.particle_affector.add_position_step(affector: affectorObj, age: number, position: ncine.vec2)
Adds a position step (if the affector type is POSITION
)
function ncine.particle_affector.add_rotation_step(affector: affectorObj, age: number, angle: number)
Adds a rotation step (if the affector type is ROTATION
)
function ncine.particle_affector.add_size_step(affector: affectorObj, age: number, scale: ncine.vec2)
Adds a size step (if the affector type is SIZE
)
function ncine.particle_affector.add_velocity_step(affector: affectorObj, age: number, velocity: ncine.vec2)
Adds a velocity step (if the affector type is VELOCITY
)
function ncine.particle_affector.clear_steps(affector: affectorObj)
Removes all steps
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
.
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
)
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
)
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
)
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
)
function ncine.particle_affector.get_type(affector: affectorObj)
-> ncine.affector_type
Returns the affector type
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
)
function ncine.particle_affector.is_enabled(affector: affectorObj)
-> boolean
Returns true
if the affector is enabled
function ncine.particle_affector.num_steps(affector: affectorObj)
-> integer
Returns the number of steps
function ncine.particle_affector.remove_steps(affector: affectorObj, index: integer)
Removes the step at the specified position index
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.
function ncine.particle_affector.set_enabled(affector: affectorObj, enabled: boolean)
Enables or disables the affector
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)
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)
function ncine.particle_affector.add_rotation_step(affector: affectorObj, age: number, angle: number)
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)
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)
function ncine.particle_affector.clear_steps(affector: affectorObj)
function ncine.particle_affector.get_base_scale(affector: affectorObj)
-> (ncine.vec2)?
function ncine.particle_affector.get_color_steps(affector: affectorObj)
-> affector_color_step[]?
function ncine.particle_affector.get_position_steps(affector: affectorObj)
-> affector_position_step[]?
function ncine.particle_affector.get_rotation_steps(affector: affectorObj)
-> affector_rotation_step[]?
function ncine.particle_affector.get_size_steps(affector: affectorObj)
-> affector_size_step[]?
function ncine.particle_affector.get_type(affector: affectorObj)
-> ncine.affector_type
function ncine.particle_affector.get_velocity_steps(affector: affectorObj)
-> affector_velocity_step[]?
function ncine.particle_affector.is_enabled(affector: affectorObj)
-> boolean
function ncine.particle_affector.num_steps(affector: affectorObj)
-> integer
function ncine.particle_affector.remove_steps(affector: affectorObj, index: integer)
function ncine.particle_affector.set_base_scale(affector: affectorObj, base_scale: ncine.vec2)
function ncine.particle_affector.set_enabled(affector: affectorObj, enabled: boolean)
ncine.particle_system
function ncine.scenenode.add_child(parent: scenenodeObj, node: scenenodeObj)
-> boolean
Adds a child node to the specified parent
@return — true
if the node has been added
function ncine.particle_system.add_color_affector(particle_system: particlesystemObj, color_steps: affector_color_step[])
Adds a color particle affector
function ncine.particle_system.add_position_affector(particle_system: particlesystemObj, position_steps: affector_position_step[])
Adds a position particle affector
function ncine.particle_system.add_rotation_affector(particle_system: particlesystemObj, rotation_steps: affector_rotation_step[])
Adds a rotation particle affector
function ncine.particle_system.add_size_affector(particle_system: particlesystemObj, base_scale: number, size_steps: affector_size_step[])
Adds a size particle affector
function ncine.particle_system.add_velocity_affector(particle_system: particlesystemObj, velocity_steps: affector_velocity_step[])
Adds a velocity particle affector
function ncine.particle_system.clear_affectors(particle_system: particlesystemObj)
Deletes all particle affectors
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
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
function ncine.particle_system.emit_particles(particle_system: particlesystemObj, initializer: particle_initializer)
Emits particles with the specified initialization parameters
function ncine.scenenode.get_abs_anchor_point(node: scenenodeObj)
-> ncine.vec2
Returns the absolute transformation anchor point in pixels
function ncine.particle_system.get_affector(particle_system: particlesystemObj, index: integer)
-> affectorObj?
Returns the affector at the specified index
function ncine.particle_system.get_affectors_enabled(particle_system: particlesystemObj)
-> boolean
Returns true
if affectors are modifying particles properties
function ncine.scenenode.get_alpha(node: scenenodeObj)
-> number
Returns the node alpha color component
function ncine.scenenode.get_child(node: scenenodeObj, index: integer)
-> scenenodeObj?
Returns the n-th child
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
function ncine.scenenode.get_children(node: scenenodeObj)
-> scenenodeObj[]
Returns the array of children
function ncine.scenenode.get_color(node: scenenodeObj)
-> ncine.color
Returns the node color
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
function ncine.scenenode.get_last_frame_updated(node: scenenodeObj)
-> integer
Returns the last frame in which any of the viewports have updated this node
function ncine.scenenode.get_layer(node: scenenodeObj)
-> integer
Returns the node rendering layer
function ncine.scenenode.get_parent(node: scenenodeObj)
-> scenenodeObj?
Returns the parent node, if there is any
function ncine.particle_system.get_particles_update_enabled(particle_system: particlesystemObj)
-> boolean
Returns true
if particles are updating
function ncine.scenenode.get_position(node: scenenodeObj)
-> ncine.vec2
Returns the node position relative to its parent
function ncine.scenenode.get_rotation(node: scenenodeObj)
-> number
Returns the node rotation in degress
function ncine.scenenode.get_scale(node: scenenodeObj)
-> ncine.vec2
Returns the node scale factors
function ncine.scenenode.get_visit_order_index(node: scenenodeObj)
-> integer
Returns the visit drawing order of the node
function ncine.scenenode.get_visit_order_state(node: scenenodeObj)
-> ncine.visit_order_state
Returns the visit order state for the specified node
function ncine.scenenode.is_enabled(node: scenenodeObj)
-> boolean
Returns true
if the node is both updating and drawing
function ncine.particle_system.kill_particles(particle_system: particlesystemObj)
Kills all alive particles
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
function ncine.particle_system.num_affectors(particle_system: particlesystemObj)
-> integer
Returns the number of affectors
function ncine.particle_system.num_alive_particles(particle_system: particlesystemObj)
-> integer
Returns the number of particles currently alive
function ncine.scenenode.num_children(node: scenenodeObj)
-> integer
Returns the number of children
function ncine.particle_system.num_particles(particle_system: particlesystemObj)
-> integer
Returns the total number of particles in the system
function ncine.particle_system.remove_affector(particle_system: particlesystemObj, index: integer)
Removes the affector at the specified index
function ncine.scenenode.remove_all_children(parent: scenenodeObj, index: any)
-> boolean
Removes all children from the specified parent
@return — true
if there were at least one node to remove
function ncine.scenenode.remove_child(parent: scenenodeObj, node: scenenodeObj)
-> boolean
Removes a child node from the specified parent
@return — true
if the node has been removed
function ncine.scenenode.remove_child_at(parent: scenenodeObj, index: integer)
-> boolean
Removes a child node at the specified index from the specified parent
@return — true
if the node has been removed
function ncine.scenenode.set_abs_anchor_point(node: scenenodeObj, pos: ncine.vec2)
Sets the absolute transformation anchor point in pixels
function ncine.particle_system.set_affectors_enabled(particle_system: particlesystemObj, enabled: boolean)
Enables or disables affectors modifying particles properties
function ncine.scenenode.set_alpha(node: scenenodeObj, alpha: number)
Sets the node alpha color component
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
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
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
function ncine.scenenode.set_color(node: scenenodeObj, color: ncine.color)
Sets the node color
function ncine.scenenode.set_enabled(node: scenenodeObj, newValue: boolean)
Enables or disables both node updating and drawing
function ncine.particle_system.set_flipped_x(particle_system: particlesystemObj, flipped_x: boolean)
Flips the texture rect horizontally for every particle in the system
function ncine.particle_system.set_flipped_y(particle_system: particlesystemObj, flipped_y: boolean)
Flips the texture rect vertically for every particle in the system
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
function ncine.particle_system.set_layer(particle_system: particlesystemObj, layer: integer)
Sets the rendering layer for every particle in the system
function ncine.scenenode.set_parent(node: scenenodeObj, parent?: scenenodeObj)
-> boolean
Sets the parent node
@return — true
if the parent has been set
function ncine.particle_system.set_particles_update_enabled(particle_system: particlesystemObj, enabled: boolean)
Enables or disables particles updating
function ncine.scenenode.set_position(node: scenenodeObj, pos: ncine.vec2)
Sets a new position for the node
function ncine.scenenode.set_rotation(node: scenenodeObj, rot: number)
Sets the node rotation in degrees
@param rot
— The amount of degrees
function ncine.scenenode.set_scale(node: scenenodeObj, factor: number)
Sets both node scale factors to the specified value
function ncine.scenenode.set_scale_x(node: scenenodeObj, factor: number)
Sets the node scale X factor
function ncine.scenenode.set_scale_y(node: scenenodeObj, factor: number)
Sets the node scale Y factor
function ncine.particle_system.set_texture(particle_system: particlesystemObj, texture: textureObj)
Sets the texture object for every particle in the system
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
function ncine.scenenode.set_visit_order_state(node: scenenodeObj, state: ncine.visit_order_state)
Sets the visit order state for the specified node
function ncine.scenenode.swap_children(parent: scenenodeObj, firstIndex: integer, secondIndex: integer)
-> boolean
Swaps two children at the specified indices
@return — true
if the two nodes have been swapped
function ncine.scenenode.swap_node_back(node: scenenodeObj)
-> boolean
Brings this node one node back in the parent's list of children
@return — true
if the node has been brought one position back
function ncine.scenenode.swap_node_forward(node: scenenodeObj)
-> boolean
Brings this node one node forward in the parent's list of children
@return — true
if the node has been brought one position forward
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
@return — true
if the node has been unlinked
function ncine.particle_system.add_color_affector(particle_system: particlesystemObj, color_steps: affector_color_step[])
function ncine.particle_system.add_position_affector(particle_system: particlesystemObj, position_steps: affector_position_step[])
function ncine.particle_system.add_rotation_affector(particle_system: particlesystemObj, rotation_steps: affector_rotation_step[])
function ncine.particle_system.add_size_affector(particle_system: particlesystemObj, base_scale: number, size_steps: affector_size_step[])
function ncine.particle_system.add_velocity_affector(particle_system: particlesystemObj, velocity_steps: affector_velocity_step[])
function ncine.particle_system.clear_affectors(particle_system: particlesystemObj)
function ncine.particle_system.clone(particle_system: particlesystemObj)
-> particlesystemObj
function ncine.particle_system.delete(particle_system: particlesystemObj)
function ncine.particle_system.emit_particles(particle_system: particlesystemObj, initializer: particle_initializer)
function ncine.particle_system.get_affector(particle_system: particlesystemObj, index: integer)
-> affectorObj?
function ncine.particle_system.get_affectors_enabled(particle_system: particlesystemObj)
-> boolean
function ncine.particle_system.get_in_local_space(particle_system: particlesystemObj)
-> boolean
function ncine.particle_system.get_particles_update_enabled(particle_system: particlesystemObj)
-> boolean
function ncine.particle_system.kill_particles(particle_system: particlesystemObj)
function ncine.particle_system.new(parent?: scenenodeObj, count: integer, texture?: textureObj, tex_rect: ncine.rect)
-> particlesystemObj
function ncine.particle_system.num_affectors(particle_system: particlesystemObj)
-> integer
function ncine.particle_system.num_alive_particles(particle_system: particlesystemObj)
-> integer
function ncine.particle_system.num_particles(particle_system: particlesystemObj)
-> integer
function ncine.particle_system.remove_affector(particle_system: particlesystemObj, index: integer)
function ncine.particle_system.set_affectors_enabled(particle_system: particlesystemObj, enabled: boolean)
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)
function ncine.particle_system.set_blending_factors(particle_system: particlesystemObj, src_factor: ncine.blending_factor, dest_factor: ncine.blending_factor)
function ncine.particle_system.set_blending_preset(particle_system: particlesystemObj, blending_preset: ncine.blending_preset)
function ncine.particle_system.set_flipped_x(particle_system: particlesystemObj, flipped_x: boolean)
function ncine.particle_system.set_flipped_y(particle_system: particlesystemObj, flipped_y: boolean)
function ncine.particle_system.set_in_local_space(particle_system: particlesystemObj, local_space: boolean)
function ncine.particle_system.set_layer(particle_system: particlesystemObj, layer: integer)
function ncine.particle_system.set_particles_update_enabled(particle_system: particlesystemObj, enabled: boolean)
function ncine.particle_system.set_texture(particle_system: particlesystemObj, texture: textureObj)
function ncine.particle_system.set_texture_rect(particle_system: particlesystemObj, tex_rect: ncine.rect)
enum ncine.permission
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
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
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
number
The height
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
number
The width
number
The top-left X coordinate (left with positive width)
number
The top-left Y coordinate (top with positive height)
ncine.rect
function ncine.rect.create(x: number, y: number, w: number, h: number)
-> ncine.rect
function ncine.rect.create_center_size(x: number, y: number, w: number, h: number)
-> ncine.rect
function ncine.rect.create_min_max(min_x: number, min_y: number, max_x: number, max_y: number)
-> ncine.rect
function ncine.rect.set_min_max(min_x: number, min_y: number, max_x: number, max_y: number)
-> ncine.rect
ncine.rect_animation
number
Frame duration in seconds
ncine.loop_mode
Loop state
integer?
Optional field, default is 0
(ncine.vec2)?
Optional field, default is { x = 0, y = 0 }
ncine.vec2
A two component vector
ncine.rewind_mode
Rewind modes
ncine.rect
A rectangle in 2D
enum ncine.rewind_mode
ncine.scenenode
function ncine.scenenode.add_child(parent: scenenodeObj, node: scenenodeObj)
-> boolean
Adds a child node to the specified parent
@return — true
if the node has been added
function ncine.scenenode.get_abs_anchor_point(node: scenenodeObj)
-> ncine.vec2
Returns the absolute transformation anchor point in pixels
function ncine.scenenode.get_alpha(node: scenenodeObj)
-> number
Returns the node alpha color component
function ncine.scenenode.get_child(node: scenenodeObj, index: integer)
-> scenenodeObj?
Returns the n-th child
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
function ncine.scenenode.get_children(node: scenenodeObj)
-> scenenodeObj[]
Returns the array of children
function ncine.scenenode.get_color(node: scenenodeObj)
-> ncine.color
Returns the node color
function ncine.scenenode.get_last_frame_updated(node: scenenodeObj)
-> integer
Returns the last frame in which any of the viewports have updated this node
function ncine.scenenode.get_layer(node: scenenodeObj)
-> integer
Returns the node rendering layer
function ncine.scenenode.get_parent(node: scenenodeObj)
-> scenenodeObj?
Returns the parent node, if there is any
function ncine.scenenode.get_position(node: scenenodeObj)
-> ncine.vec2
Returns the node position relative to its parent
function ncine.scenenode.get_rotation(node: scenenodeObj)
-> number
Returns the node rotation in degress
function ncine.scenenode.get_scale(node: scenenodeObj)
-> ncine.vec2
Returns the node scale factors
function ncine.scenenode.get_visit_order_index(node: scenenodeObj)
-> integer
Returns the visit drawing order of the node
function ncine.scenenode.get_visit_order_state(node: scenenodeObj)
-> ncine.visit_order_state
Returns the visit order state for the specified node
function ncine.scenenode.is_enabled(node: scenenodeObj)
-> boolean
Returns true
if the node is both updating and drawing
function ncine.scenenode.num_children(node: scenenodeObj)
-> integer
Returns the number of children
function ncine.scenenode.remove_all_children(parent: scenenodeObj, index: any)
-> boolean
Removes all children from the specified parent
@return — true
if there were at least one node to remove
function ncine.scenenode.remove_child(parent: scenenodeObj, node: scenenodeObj)
-> boolean
Removes a child node from the specified parent
@return — true
if the node has been removed
function ncine.scenenode.remove_child_at(parent: scenenodeObj, index: integer)
-> boolean
Removes a child node at the specified index from the specified parent
@return — true
if the node has been removed
function ncine.scenenode.set_abs_anchor_point(node: scenenodeObj, pos: ncine.vec2)
Sets the absolute transformation anchor point in pixels
function ncine.scenenode.set_alpha(node: scenenodeObj, alpha: number)
Sets the node alpha color component
function ncine.scenenode.set_color(node: scenenodeObj, color: ncine.color)
Sets the node color
function ncine.scenenode.set_enabled(node: scenenodeObj, newValue: boolean)
Enables or disables both node updating and drawing
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.
function ncine.scenenode.set_parent(node: scenenodeObj, parent?: scenenodeObj)
-> boolean
Sets the parent node
@return — true
if the parent has been set
function ncine.scenenode.set_position(node: scenenodeObj, pos: ncine.vec2)
Sets a new position for the node
function ncine.scenenode.set_rotation(node: scenenodeObj, rot: number)
Sets the node rotation in degrees
@param rot
— The amount of degrees
function ncine.scenenode.set_scale(node: scenenodeObj, factor: number)
Sets both node scale factors to the specified value
function ncine.scenenode.set_scale_x(node: scenenodeObj, factor: number)
Sets the node scale X factor
function ncine.scenenode.set_scale_y(node: scenenodeObj, factor: number)
Sets the node scale Y factor
function ncine.scenenode.set_visit_order_state(node: scenenodeObj, state: ncine.visit_order_state)
Sets the visit order state for the specified node
function ncine.scenenode.swap_children(parent: scenenodeObj, firstIndex: integer, secondIndex: integer)
-> boolean
Swaps two children at the specified indices
@return — true
if the two nodes have been swapped
function ncine.scenenode.swap_node_back(node: scenenodeObj)
-> boolean
Brings this node one node back in the parent's list of children
@return — true
if the node has been brought one position back
function ncine.scenenode.swap_node_forward(node: scenenodeObj)
-> boolean
Brings this node one node forward in the parent's list of children
@return — true
if the node has been brought one position forward
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
@return — true
if the node has been unlinked
function ncine.scenenode.add_child(parent: scenenodeObj, node: scenenodeObj)
-> boolean
function ncine.scenenode.get_abs_anchor_point(node: scenenodeObj)
-> ncine.vec2
function ncine.scenenode.get_alpha(node: scenenodeObj)
-> number
function ncine.scenenode.get_child(node: scenenodeObj, index: integer)
-> scenenodeObj?
function ncine.scenenode.get_child_order_index(node: scenenodeObj)
-> integer
function ncine.scenenode.get_children(node: scenenodeObj)
-> scenenodeObj[]
function ncine.scenenode.get_color(node: scenenodeObj)
-> ncine.color
function ncine.scenenode.get_last_frame_updated(node: scenenodeObj)
-> integer
function ncine.scenenode.get_layer(node: scenenodeObj)
-> integer
function ncine.scenenode.get_parent(node: scenenodeObj)
-> scenenodeObj?
function ncine.scenenode.get_position(node: scenenodeObj)
-> ncine.vec2
function ncine.scenenode.get_rotation(node: scenenodeObj)
-> number
function ncine.scenenode.get_scale(node: scenenodeObj)
-> ncine.vec2
function ncine.scenenode.get_visit_order_index(node: scenenodeObj)
-> integer
function ncine.scenenode.get_visit_order_state(node: scenenodeObj)
-> ncine.visit_order_state
function ncine.scenenode.is_enabled(node: scenenodeObj)
-> boolean
function ncine.scenenode.num_children(node: scenenodeObj)
-> integer
function ncine.scenenode.remove_all_children(parent: scenenodeObj, index: any)
-> boolean
function ncine.scenenode.remove_child(parent: scenenodeObj, node: scenenodeObj)
-> boolean
function ncine.scenenode.remove_child_at(parent: scenenodeObj, index: integer)
-> boolean
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)
function ncine.scenenode.set_alpha(node: scenenodeObj, alpha: number)
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)
function ncine.scenenode.set_enabled(node: scenenodeObj, newValue: boolean)
function ncine.scenenode.set_layer(node: scenenodeObj, layer: integer)
function ncine.scenenode.set_parent(node: scenenodeObj, parent?: scenenodeObj)
-> boolean
function ncine.scenenode.set_position(node: scenenodeObj, pos: ncine.vec2)
function ncine.scenenode.set_position(node: scenenodeObj, x: number, y: number)
function ncine.scenenode.set_rotation(node: scenenodeObj, rot: number)
function ncine.scenenode.set_scale(node: scenenodeObj, factor: number)
function ncine.scenenode.set_scale_x(node: scenenodeObj, factor: number)
function ncine.scenenode.set_scale_y(node: scenenodeObj, factor: number)
function ncine.scenenode.set_visit_order_state(node: scenenodeObj, state: ncine.visit_order_state)
function ncine.scenenode.swap_children(parent: scenenodeObj, firstIndex: integer, secondIndex: integer)
-> boolean
function ncine.scenenode.swap_node_back(node: scenenodeObj)
-> boolean
function ncine.scenenode.swap_node_forward(node: scenenodeObj)
-> boolean
function ncine.scenenode.unlink_child(parent: scenenodeObj, node: scenenodeObj)
-> boolean
ncine.shader
function ncine.shader.delete(shader: shaderObj)
Destroys a shader object and releases its memory
@param shader
— The shader object to be destroyed
function ncine.shader.get_log_on_errors(shader: shaderObj)
-> boolean
Returns the automatic log on errors flag
function ncine.shader.is_binary_cache_enabled()
-> boolean
Returns true
if the binary shader cache is enabled
function ncine.shader.is_linked(shader: shaderObj)
-> boolean
Returns true
if the shader is linked and can therefore be used
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
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
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
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
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
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
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
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
function ncine.shader.register_batched_shader(shader: shaderObj, batched_shader: shaderObj)
Registers a shader to be used for batches of render commands
function ncine.shader.retrieve_infolog(shader: shaderObj)
-> string
Retrieves the information log
function ncine.shader.retrieve_infolog_length(shader: shaderObj)
-> integer
Returns the length of the information log including the null termination character
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
function ncine.shader.set_binary_cache_enabled(enable: boolean)
Enables or disables the binary shader cache
function ncine.shader.set_glshaderprogram_label(shader: shaderObj, label: string)
Sets the OpenGL object label for the shader program
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.
function ncine.shader.delete(shader: shaderObj)
function ncine.shader.get_log_on_errors(shader: shaderObj)
-> boolean
function ncine.shader.is_binary_cache_enabled()
-> boolean
function ncine.shader.is_linked(shader: shaderObj)
-> boolean
function ncine.shader.load_from_file(shader: shaderObj, name: string, introspection: ncine.shader_introspection, vertex: string, fragment: string)
-> boolean
function ncine.shader.load_from_file_default_fragment(shader: shaderObj, name: string, introspection: ncine.shader_introspection, vertex: string, fragment: ncine.shader_default_fragment)
-> boolean
function ncine.shader.load_from_file_default_vertex(shader: shaderObj, name: string, introspection: ncine.shader_introspection, vertex: ncine.shader_default_vertex, fragment: string)
-> boolean
function ncine.shader.load_from_memory(shader: shaderObj, name: string, introspection: ncine.shader_introspection, vertex: string, fragment: string)
-> boolean
function ncine.shader.load_from_memory_default_fragment(shader: shaderObj, name: string, introspection: ncine.shader_introspection, vertex: string, fragment: ncine.shader_default_fragment)
-> boolean
function ncine.shader.load_from_memory_default_vertex(shader: shaderObj, name: string, introspection: ncine.shader_introspection, vertex: ncine.shader_default_vertex, fragment: string)
-> boolean
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
function ncine.shader.new()
-> shaderObj
function ncine.shader.register_batched_shader(shader: shaderObj, batched_shader: shaderObj)
function ncine.shader.retrieve_infolog(shader: shaderObj)
-> string
function ncine.shader.retrieve_infolog_length(shader: shaderObj)
-> integer
function ncine.shader.set_attribute(shader: shaderObj, attribute: string, stride: integer, pointer: integer)
-> boolean
function ncine.shader.set_binary_cache_enabled(enable: boolean)
function ncine.shader.set_glshaderprogram_label(shader: shaderObj, label: string)
function ncine.shader.set_log_on_errors(shader: shaderObj, should_log: boolean)
enum ncine.shader_default_fragment
enum ncine.shader_default_vertex
enum ncine.shader_introspection
ncine.shaderstate
function ncine.shaderstate.delete(shaderstate: shaderstateObj)
Destroys a shaderstate object and releases its memory
@param shaderstate
— The shaderstate object to be destroyed
function ncine.shaderstate.get_node(shaderstate: shaderstateObj)
-> drawablenodeObj?
Returns the drawable node affected by the shader state
function ncine.shaderstate.get_shader(shaderstate: shaderstateObj)
-> shaderObj?
Return the associated custom shader
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
function ncine.shaderstate.reset_shader(shaderstate: shaderstateObj)
Triggers a shader update without setting a new shader
function ncine.shaderstate.set_node(shaderstate: shaderstateObj, node?: drawablenodeObj)
Sets the drawable node affected by the shader state
function ncine.shaderstate.set_shader(shaderstate: shaderstateObj, shader?: shaderObj)
-> boolean
Sets the associated custom shader
@return — True if the shader has been changed
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
function ncine.shaderstate.delete(shaderstate: shaderstateObj)
function ncine.shaderstate.get_node(shaderstate: shaderstateObj)
-> drawablenodeObj?
function ncine.shaderstate.get_shader(shaderstate: shaderstateObj)
-> shaderObj?
function ncine.shaderstate.new(node: drawablenodeObj, shader: shaderObj)
-> shaderstateObj
function ncine.shaderstate.reset_shader(shaderstate: shaderstateObj)
function ncine.shaderstate.set_node(shaderstate: shaderstateObj, node?: drawablenodeObj)
function ncine.shaderstate.set_shader(shaderstate: shaderstateObj, shader?: shaderObj)
-> boolean
function ncine.shaderstate.set_texture(shaderstate: shaderstateObj, unit: integer, texture?: textureObj)
-> boolean
function ncine.shaderstate.set_uniform_float_color(shaderstate: shaderstateObj, block_name: string, name: string, color: ncine.color)
-> boolean
function ncine.shaderstate.set_uniform_float_value1(shaderstate: shaderstateObj, block_name: string, name: string, value0: number)
-> boolean
function ncine.shaderstate.set_uniform_float_value2(shaderstate: shaderstateObj, block_name: string, name: string, value0: number, value1: number)
-> boolean
function ncine.shaderstate.set_uniform_float_value3(shaderstate: shaderstateObj, block_name: string, name: string, value0: number, value1: number, value2: number)
-> boolean
function ncine.shaderstate.set_uniform_float_value4(shaderstate: shaderstateObj, block_name: string, name: string, value0: number, value1: number, value2: number, value3: number)
-> boolean
function ncine.shaderstate.set_uniform_float_vector(shaderstate: shaderstateObj, block_name: string, name: string, vector: number[])
-> boolean
function ncine.shaderstate.set_uniform_float_vector2(shaderstate: shaderstateObj, block_name: string, name: string, vector: ncine.vec2)
-> boolean
function ncine.shaderstate.set_uniform_float_vector3(shaderstate: shaderstateObj, block_name: string, name: string, vector: ncine.vec3)
-> boolean
function ncine.shaderstate.set_uniform_float_vector4(shaderstate: shaderstateObj, block_name: string, name: string, vector: ncine.vec4)
-> boolean
function ncine.shaderstate.set_uniform_int_value1(shaderstate: shaderstateObj, block_name: string, name: string, value0: integer)
-> boolean
function ncine.shaderstate.set_uniform_int_value2(shaderstate: shaderstateObj, block_name: string, name: string, value0: integer, value1: integer)
-> boolean
function ncine.shaderstate.set_uniform_int_value3(shaderstate: shaderstateObj, block_name: string, name: string, value0: integer, value1: integer, value2: integer)
-> boolean
function ncine.shaderstate.set_uniform_int_value4(shaderstate: shaderstateObj, block_name: string, name: string, value0: integer, value1: integer, value2: integer, value3: integer)
-> boolean
function ncine.shaderstate.set_uniform_int_vector(shaderstate: shaderstateObj, block_name: string, name: string, vector: integer[])
-> boolean
function ncine.shaderstate.set_uniform_int_vector2(shaderstate: shaderstateObj, block_name: string, name: string, vector: ncine.vec2)
-> boolean
function ncine.shaderstate.set_uniform_int_vector3(shaderstate: shaderstateObj, block_name: string, name: string, vector: ncine.vec3)
-> boolean
function ncine.shaderstate.set_uniform_int_vector4(shaderstate: shaderstateObj, block_name: string, name: string, vector: ncine.vec4)
-> boolean
ncine.sprite
function ncine.scenenode.add_child(parent: scenenodeObj, node: scenenodeObj)
-> boolean
Adds a child node to the specified parent
@return — true
if the node has been added
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
function ncine.sprite.delete(sprite: spriteObj)
Destroys a sprite object and releases its memory
@param sprite
— The sprite object to be destroyed
function ncine.drawable_node.get_aabb(node: drawablenodeObj)
-> ncine.rect
Returns the axis-aligned bounding box of the node area in the last frame
function ncine.scenenode.get_abs_anchor_point(node: scenenodeObj)
-> ncine.vec2
Returns the absolute transformation anchor point in pixels
function ncine.scenenode.get_alpha(node: scenenodeObj)
-> number
Returns the node alpha color component
function ncine.drawable_node.get_anchor_point(node: drawablenodeObj)
-> ncine.vec2
Returns the transformation anchor point
function ncine.scenenode.get_child(node: scenenodeObj, index: integer)
-> scenenodeObj?
Returns the n-th child
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
function ncine.scenenode.get_children(node: scenenodeObj)
-> scenenodeObj[]
Returns the array of children
function ncine.scenenode.get_color(node: scenenodeObj)
-> ncine.color
Returns the node color
function ncine.drawable_node.get_dest_blending_factor(node: drawablenodeObj)
-> ncine.blending_factor
Returns the destination blending factor
function ncine.drawable_node.get_height(node: drawablenodeObj)
-> number
Returns the height of the node area
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)
function ncine.scenenode.get_last_frame_updated(node: scenenodeObj)
-> integer
Returns the last frame in which any of the viewports have updated this node
function ncine.scenenode.get_layer(node: scenenodeObj)
-> integer
Returns the node rendering layer
function ncine.scenenode.get_parent(node: scenenodeObj)
-> scenenodeObj?
Returns the parent node, if there is any
function ncine.scenenode.get_position(node: scenenodeObj)
-> ncine.vec2
Returns the node position relative to its parent
function ncine.scenenode.get_rotation(node: scenenodeObj)
-> number
Returns the node rotation in degress
function ncine.scenenode.get_scale(node: scenenodeObj)
-> ncine.vec2
Returns the node scale factors
function ncine.drawable_node.get_size(node: drawablenodeObj)
-> ncine.vec2
Returns the size of the node area
function ncine.drawable_node.get_src_blending_factor(node: drawablenodeObj)
-> ncine.blending_factor
eturns the source blending factor
function ncine.base_sprite.get_texrect(sprite: basespriteObj)
-> ncine.rect
Returns the texture source rectangle for blitting
function ncine.base_sprite.get_texture(sprite: basespriteObj)
-> textureObj?
Returns the texture object
function ncine.scenenode.get_visit_order_index(node: scenenodeObj)
-> integer
Returns the visit drawing order of the node
function ncine.scenenode.get_visit_order_state(node: scenenodeObj)
-> ncine.visit_order_state
Returns the visit order state for the specified node
function ncine.drawable_node.get_width(node: drawablenodeObj)
-> number
Returns the width of the node area
function ncine.drawable_node.is_blending_enabled(node: drawablenodeObj)
-> boolean
Returns true
if the node renders with blending enabled
function ncine.scenenode.is_enabled(node: scenenodeObj)
-> boolean
Returns true
if the node is both updating and drawing
function ncine.base_sprite.is_flipped_x(sprite: basespriteObj)
-> boolean
Returns true
if the sprite texture is horizontally flipped
function ncine.base_sprite.is_flipped_y(sprite: basespriteObj)
-> boolean
Returns true
if the sprite texture is vertically flipped
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
function ncine.scenenode.num_children(node: scenenodeObj)
-> integer
Returns the number of children
function ncine.scenenode.remove_all_children(parent: scenenodeObj, index: any)
-> boolean
Removes all children from the specified parent
@return — true
if there were at least one node to remove
function ncine.scenenode.remove_child(parent: scenenodeObj, node: scenenodeObj)
-> boolean
Removes a child node from the specified parent
@return — true
if the node has been removed
function ncine.scenenode.remove_child_at(parent: scenenodeObj, index: integer)
-> boolean
Removes a child node at the specified index from the specified parent
@return — true
if the node has been removed
function ncine.base_sprite.reset_texture(sprite: basespriteObj)
Triggers a texture update without setting a new texture
function ncine.scenenode.set_abs_anchor_point(node: scenenodeObj, pos: ncine.vec2)
Sets the absolute transformation anchor point in pixels
function ncine.scenenode.set_alpha(node: scenenodeObj, alpha: number)
Sets the node alpha color component
function ncine.drawable_node.set_anchor_point(node: drawablenodeObj, anchor_point: ncine.vec2)
Sets the transformation anchor point
function ncine.drawable_node.set_blending_enabled(node: drawablenodeObj, enabled: boolean)
Sets the blending state for node rendering
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
function ncine.drawable_node.set_blending_preset(node: drawablenodeObj, preset: ncine.blending_preset)
Sets a blending preset for source and destination blending factors
function ncine.scenenode.set_color(node: scenenodeObj, color: ncine.color)
Sets the node color
function ncine.scenenode.set_enabled(node: scenenodeObj, newValue: boolean)
Enables or disables both node updating and drawing
function ncine.base_sprite.set_flipped_x(sprite: basespriteObj, flipped_x: boolean)
Flips the texture rect horizontally
function ncine.base_sprite.set_flipped_y(sprite: basespriteObj, flipped_y: boolean)
Flips the texture rect vertically
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.
function ncine.scenenode.set_parent(node: scenenodeObj, parent?: scenenodeObj)
-> boolean
Sets the parent node
@return — true
if the parent has been set
function ncine.scenenode.set_position(node: scenenodeObj, pos: ncine.vec2)
Sets a new position for the node
function ncine.scenenode.set_rotation(node: scenenodeObj, rot: number)
Sets the node rotation in degrees
@param rot
— The amount of degrees
function ncine.scenenode.set_scale(node: scenenodeObj, factor: number)
Sets both node scale factors to the specified value
function ncine.scenenode.set_scale_x(node: scenenodeObj, factor: number)
Sets the node scale X factor
function ncine.scenenode.set_scale_y(node: scenenodeObj, factor: number)
Sets the node scale Y factor
function ncine.base_sprite.set_size(sprite: basespriteObj, width: number, height: number)
Sets the sprite size
function ncine.base_sprite.set_texrect(sprite: basespriteObj, rect: ncine.rect)
Sets the texture source rectangle for blitting
function ncine.base_sprite.set_texture(sprite: basespriteObj, texture?: textureObj)
Sets the texture object
function ncine.scenenode.set_visit_order_state(node: scenenodeObj, state: ncine.visit_order_state)
Sets the visit order state for the specified node
function ncine.scenenode.swap_children(parent: scenenodeObj, firstIndex: integer, secondIndex: integer)
-> boolean
Swaps two children at the specified indices
@return — true
if the two nodes have been swapped
function ncine.scenenode.swap_node_back(node: scenenodeObj)
-> boolean
Brings this node one node back in the parent's list of children
@return — true
if the node has been brought one position back
function ncine.scenenode.swap_node_forward(node: scenenodeObj)
-> boolean
Brings this node one node forward in the parent's list of children
@return — true
if the node has been brought one position forward
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
@return — true
if the node has been unlinked
function ncine.sprite.clone(sprite: spriteObj)
-> spriteObj
function ncine.sprite.delete(sprite: spriteObj)
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
function ncine.start()
enum ncine.tex_filtering
enum ncine.tex_format
enum ncine.tex_wrap
enum ncine.text_alignment
function ncine.scenenode.add_child(parent: scenenodeObj, node: scenenodeObj)
-> boolean
Adds a child node to the specified parent
@return — true
if the node has been added
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
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
function ncine.textnode.delete(textnode: textnodeObj)
Destroys a textnode object and releases its memory
@param textnode
— The textnode object to be destroyed
function ncine.drawable_node.get_aabb(node: drawablenodeObj)
-> ncine.rect
Returns the axis-aligned bounding box of the node area in the last frame
function ncine.scenenode.get_abs_anchor_point(node: scenenodeObj)
-> ncine.vec2
Returns the absolute transformation anchor point in pixels
function ncine.textnode.get_absheight(textnode: textnodeObj)
-> number
Returns the absolute height of rendered text
function ncine.textnode.get_abslineheight(textnode: textnodeObj)
-> number
Returns the text node line height multiplied by the absolute vertical scale factor
function ncine.textnode.get_abswidth(textnode: textnodeObj)
-> number
Returns the absolute width of rendered text
function ncine.textnode.get_alignment(textnode: textnodeObj)
-> ncine.text_alignment
Returns the horizontal text alignment of multiple lines
function ncine.scenenode.get_alpha(node: scenenodeObj)
-> number
Returns the node alpha color component
function ncine.drawable_node.get_anchor_point(node: drawablenodeObj)
-> ncine.vec2
Returns the transformation anchor point
function ncine.scenenode.get_child(node: scenenodeObj, index: integer)
-> scenenodeObj?
Returns the n-th child
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
function ncine.scenenode.get_children(node: scenenodeObj)
-> scenenodeObj[]
Returns the array of children
function ncine.scenenode.get_color(node: scenenodeObj)
-> ncine.color
Returns the node color
function ncine.drawable_node.get_dest_blending_factor(node: drawablenodeObj)
-> ncine.blending_factor
Returns the destination blending factor
function ncine.textnode.get_font(textnode: textnodeObj)
-> fontObj
Returns the font object used by the textnode
function ncine.textnode.get_height(textnode: textnodeObj)
-> number
Returns the height of rendered text
function ncine.textnode.get_kerning(textnode: textnodeObj)
-> boolean
Returns true
if kerning is enabled for this node rendering
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)
function ncine.scenenode.get_last_frame_updated(node: scenenodeObj)
-> integer
Returns the last frame in which any of the viewports have updated this node
function ncine.scenenode.get_layer(node: scenenodeObj)
-> integer
Returns the node rendering layer
function ncine.textnode.get_lineheight(textnode: textnodeObj)
-> number
Returns the text node line height
function ncine.scenenode.get_parent(node: scenenodeObj)
-> scenenodeObj?
Returns the parent node, if there is any
function ncine.scenenode.get_position(node: scenenodeObj)
-> ncine.vec2
Returns the node position relative to its parent
function ncine.textnode.get_render_mode(textnode: textnodeObj)
-> ncine.font_render_mode
Returns the render mode used to render this text node
function ncine.scenenode.get_rotation(node: scenenodeObj)
-> number
Returns the node rotation in degress
function ncine.scenenode.get_scale(node: scenenodeObj)
-> ncine.vec2
Returns the node scale factors
function ncine.drawable_node.get_size(node: drawablenodeObj)
-> ncine.vec2
Returns the size of the node area
function ncine.drawable_node.get_src_blending_factor(node: drawablenodeObj)
-> ncine.blending_factor
eturns the source blending factor
function ncine.textnode.get_string(textnode: textnodeObj)
-> string
Returns the string to render
function ncine.scenenode.get_visit_order_index(node: scenenodeObj)
-> integer
Returns the visit drawing order of the node
function ncine.scenenode.get_visit_order_state(node: scenenodeObj)
-> ncine.visit_order_state
Returns the visit order state for the specified node
function ncine.textnode.get_width(textnode: textnodeObj)
-> number
Returns the width of rendered text
function ncine.drawable_node.is_blending_enabled(node: drawablenodeObj)
-> boolean
Returns true
if the node renders with blending enabled
function ncine.scenenode.is_enabled(node: scenenodeObj)
-> boolean
Returns true
if the node is both updating and drawing
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
function ncine.scenenode.num_children(node: scenenodeObj)
-> integer
Returns the number of children
function ncine.scenenode.remove_all_children(parent: scenenodeObj, index: any)
-> boolean
Removes all children from the specified parent
@return — true
if there were at least one node to remove
function ncine.scenenode.remove_child(parent: scenenodeObj, node: scenenodeObj)
-> boolean
Removes a child node from the specified parent
@return — true
if the node has been removed
function ncine.scenenode.remove_child_at(parent: scenenodeObj, index: integer)
-> boolean
Removes a child node at the specified index from the specified parent
@return — true
if the node has been removed
function ncine.scenenode.set_abs_anchor_point(node: scenenodeObj, pos: ncine.vec2)
Sets the absolute transformation anchor point in pixels
function ncine.textnode.set_alignment(textnode: textnodeObj, text_alignment: ncine.text_alignment)
Sets the horizontal text alignment of multiple lines
function ncine.scenenode.set_alpha(node: scenenodeObj, alpha: number)
Sets the node alpha color component
function ncine.drawable_node.set_anchor_point(node: drawablenodeObj, anchor_point: ncine.vec2)
Sets the transformation anchor point
function ncine.drawable_node.set_blending_enabled(node: drawablenodeObj, enabled: boolean)
Sets the blending state for node rendering
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
function ncine.drawable_node.set_blending_preset(node: drawablenodeObj, preset: ncine.blending_preset)
Sets a blending preset for source and destination blending factors
function ncine.scenenode.set_color(node: scenenodeObj, color: ncine.color)
Sets the node color
function ncine.scenenode.set_enabled(node: scenenodeObj, newValue: boolean)
Enables or disables both node updating and drawing
function ncine.textnode.set_font(textnode: textnodeObj, font: fontObj)
Sets the font object to be used by the textnode
function ncine.textnode.set_kerning(textnode: textnodeObj, with_kerning: boolean)
Sets the kerning flag for this node rendering
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.
function ncine.textnode.set_lineheight(textnode: textnodeObj, line_height: number)
Sets the text node line height
function ncine.scenenode.set_parent(node: scenenodeObj, parent?: scenenodeObj)
-> boolean
Sets the parent node
@return — true
if the parent has been set
function ncine.scenenode.set_position(node: scenenodeObj, pos: ncine.vec2)
Sets a new position for the node
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
function ncine.scenenode.set_rotation(node: scenenodeObj, rot: number)
Sets the node rotation in degrees
@param rot
— The amount of degrees
function ncine.scenenode.set_scale(node: scenenodeObj, factor: number)
Sets both node scale factors to the specified value
function ncine.scenenode.set_scale_x(node: scenenodeObj, factor: number)
Sets the node scale X factor
function ncine.scenenode.set_scale_y(node: scenenodeObj, factor: number)
Sets the node scale Y factor
function ncine.textnode.set_string(textnode: textnodeObj, string: string)
Sets the string to render
function ncine.scenenode.set_visit_order_state(node: scenenodeObj, state: ncine.visit_order_state)
Sets the visit order state for the specified node
function ncine.scenenode.swap_children(parent: scenenodeObj, firstIndex: integer, secondIndex: integer)
-> boolean
Swaps two children at the specified indices
@return — true
if the two nodes have been swapped
function ncine.scenenode.swap_node_back(node: scenenodeObj)
-> boolean
Brings this node one node back in the parent's list of children
@return — true
if the node has been brought one position back
function ncine.scenenode.swap_node_forward(node: scenenodeObj)
-> boolean
Brings this node one node forward in the parent's list of children
@return — true
if the node has been brought one position forward
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
@return — true
if the node has been unlinked
ncine.textnode
function ncine.textnode.calculate_boundaries(font: fontObj, with_kerning: boolean, string: string)
-> ncine.vec2
function ncine.textnode.clone(textnode: textnodeObj)
-> textnodeObj
function ncine.textnode.delete(textnode: textnodeObj)
function ncine.textnode.get_absheight(textnode: textnodeObj)
-> number
function ncine.textnode.get_abslineheight(textnode: textnodeObj)
-> number
function ncine.textnode.get_abswidth(textnode: textnodeObj)
-> number
function ncine.textnode.get_alignment(textnode: textnodeObj)
-> ncine.text_alignment
function ncine.textnode.get_font(textnode: textnodeObj)
-> fontObj
function ncine.textnode.get_height(textnode: textnodeObj)
-> number
function ncine.textnode.get_kerning(textnode: textnodeObj)
-> boolean
function ncine.textnode.get_lineheight(textnode: textnodeObj)
-> number
function ncine.textnode.get_render_mode(textnode: textnodeObj)
-> ncine.font_render_mode
function ncine.textnode.get_string(textnode: textnodeObj)
-> string
function ncine.textnode.get_width(textnode: textnodeObj)
-> number
function ncine.textnode.new(parent?: scenenodeObj, font?: fontObj, max_string_length: integer)
-> textnodeObj
function ncine.textnode.set_alignment(textnode: textnodeObj, text_alignment: ncine.text_alignment)
function ncine.textnode.set_font(textnode: textnodeObj, font: fontObj)
function ncine.textnode.set_kerning(textnode: textnodeObj, with_kerning: boolean)
function ncine.textnode.set_lineheight(textnode: textnodeObj, line_height: number)
function ncine.textnode.set_render_mode(textnode: textnodeObj, font_render_mode: ncine.font_render_mode)
function ncine.textnode.set_string(textnode: textnodeObj, string: string)
function ncine.texture.datasize(texture: textureObj)
-> integer
Returns the amount of video memory needed to load the texture
function ncine.texture.delete(texture: textureObj)
Destroys a texture object and releases its memory
@param texture
— The texture object to be destroyed
function ncine.texture.get_chromakey_color(texture: textureObj)
-> ncine.color
Returns the color treated as transparent when loading a texture
function ncine.texture.get_format(texture: textureObj)
-> ncine.tex_format
Returns the texture format
function ncine.texture.get_height(texture: textureObj)
-> integer
Returns the texture height
function ncine.texture.get_mag_filtering(texture: textureObj)
-> ncine.tex_filtering
Returns the filtering mode used for magnification
function ncine.texture.get_min_filtering(texture: textureObj)
-> ncine.tex_filtering
Returns the filtering mode used for minification
function ncine.texture.get_width(texture: textureObj)
-> integer
Returns the texture width
function ncine.texture.get_wrap(texture: textureObj)
-> ncine.tex_wrap
Returns the wrap mode used for the s
and t
directions
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
function ncine.texture.is_chromakey_enabled(texture: textureObj)
-> boolean
Returns true
if chroma key transparency will be used when loading
function ncine.texture.is_compressed(texture: textureObj)
-> boolean
Returns true
if the texture holds compressed data
function ncine.texture.mip_levels(texture: textureObj)
-> integer
Returns the number of MIP map levels
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
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
function ncine.texture.num_channels(texture: textureObj)
-> integer
Returns the number of color channels
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
function ncine.texture.set_chromakey_enabled(texture: textureObj, state: boolean)
Sets the chroma key transparency state to use when loading
function ncine.texture.set_gltexture_label(texture: textureObj, label: string)
Sets the OpenGL object label for the texture
function ncine.texture.set_mag_filtering(texture: textureObj, filtering: ncine.tex_filtering)
Sets the filtering mode used for magnification
function ncine.texture.set_min_filtering(texture: textureObj, filtering: ncine.tex_filtering)
Sets the filtering mode used for minification
function ncine.texture.set_wrap(texture: textureObj, wrap: ncine.tex_wrap)
Sets the wrap mode used for the s
and t
directions
ncine.texture
function ncine.texture.datasize(texture: textureObj)
-> integer
function ncine.texture.delete(texture: textureObj)
function ncine.texture.get_chromakey_color(texture: textureObj)
-> ncine.color
function ncine.texture.get_format(texture: textureObj)
-> ncine.tex_format
function ncine.texture.get_height(texture: textureObj)
-> integer
function ncine.texture.get_mag_filtering(texture: textureObj)
-> ncine.tex_filtering
function ncine.texture.get_min_filtering(texture: textureObj)
-> ncine.tex_filtering
function ncine.texture.get_width(texture: textureObj)
-> integer
function ncine.texture.get_wrap(texture: textureObj)
-> ncine.tex_wrap
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)
function ncine.texture.is_chromakey_enabled(texture: textureObj)
-> boolean
function ncine.texture.is_compressed(texture: textureObj)
-> boolean
function ncine.texture.mip_levels(texture: textureObj)
-> integer
function ncine.texture.new(filename: string)
-> textureObj
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
function ncine.texture.num_channels(texture: textureObj)
-> integer
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)
function ncine.texture.set_chromakey_enabled(texture: textureObj, state: boolean)
function ncine.texture.set_gltexture_label(texture: textureObj, label: string)
function ncine.texture.set_mag_filtering(texture: textureObj, filtering: ncine.tex_filtering)
function ncine.texture.set_min_filtering(texture: textureObj, filtering: ncine.tex_filtering)
function ncine.texture.set_wrap(texture: textureObj, wrap: ncine.tex_wrap)
enum ncine.texture_cut_mode
table
function ncine.timestamp.hash_file_stat(filepath: string)
-> integer
function ncine.timestamp.hash_string(string: string)
-> integer
function ncine.timestamp.microseconds(counter: integer)
-> number
function ncine.timestamp.microseconds_since(counter: integer)
-> number
function ncine.timestamp.milliseconds(counter: integer)
-> number
function ncine.timestamp.milliseconds_since(counter: integer)
-> number
function ncine.timestamp.nanoseconds(counter: integer)
-> number
function ncine.timestamp.nanoseconds_since(counter: integer)
-> number
function ncine.timestamp.now()
-> integer
function ncine.timestamp.scan_hash_string(string: string)
-> integer
function ncine.timestamp.seconds(counter: integer)
-> number
function ncine.timestamp.seconds_since(counter: integer)
-> number
function ncine.timestamp.ticks_since(counter: integer)
-> integer
ncine.vec2
function ncine.vec2.add(vec0: ncine.vec2, vec1: ncine.vec2)
-> ncine.vec2
Adds two vectors together, component-wise
function ncine.vec2.contains(rect0: ncine.rect, rect1: ncine.rect)
-> boolean
Returns true
if the other rectangle is contained inside this one
function ncine.vec2.contains_point(rect: ncine.rect, x: number, y: number)
-> boolean
Returns true
if the point is inside this rectangle
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
function ncine.vec2.div(vec0: ncine.vec2, vec1: ncine.vec2)
-> ncine.vec2
Divides the first vector by the second one, component-wise
function ncine.vec2.dot(vec0: ncine.vec2, vec1: ncine.vec2)
-> number
Returns the dot product between the two vectors
function ncine.vec2.get_center(rect: ncine.rect)
-> ncine.vec2
Calculates the center of the rectangle
@return — The center coordinates
function ncine.vec2.get_max(rect: ncine.rect)
-> ncine.vec2
Calculates the maximum coordinates of the rectangle
@return — The maximum coordinates
function ncine.vec2.get_min(rect: ncine.rect)
-> ncine.vec2
Calculates the minimum coordinates of the rectangle
@return — The minimum coordinates
function ncine.vec2.intersect(rect0: ncine.rect, rect1: ncine.rect)
-> ncine.rect
Intersects this rectangle with the other rectangle
function ncine.vec2.invert_size(rect: ncine.rect)
-> ncine.rect
Inverts rectangle size and moves (x, y) to a different angle
function ncine.vec2.length(vec: ncine.vec2)
-> number
Returns the length of the vector
function ncine.vec2.mul(vec0: ncine.vec2, vec1: ncine.vec2)
-> ncine.vec2
Multiplies two vectors together, component-wise
function ncine.vec2.normalized(vec: ncine.vec2)
-> ncine.vec2
Returns a normalized version of the vector
function ncine.vec2.overlaps(rect0: ncine.rect, rect1: ncine.rect)
-> boolean
Returns true
if this rect does overlap the other rectangle in any way
function ncine.vec2.set_center(rect: ncine.rect, x: number, y: number)
Retains rectangle size but moves its center to another position
function ncine.vec2.sqrlength(vec: ncine.vec2)
-> number
Returns the squared length of the vector
function ncine.vec2.sub(vec0: ncine.vec2, vec1: ncine.vec2)
-> ncine.vec2
Subtracts the second vector from the first one, component-wise
number
The X component
number
The Y component
function ncine.vec2.add(vec0: ncine.vec2, vec1: ncine.vec2)
-> ncine.vec2
function ncine.vec2.add(vec0: ncine.vec2, scalar: number)
-> ncine.vec2
function ncine.vec2.contains(rect0: ncine.rect, rect1: ncine.rect)
-> boolean
function ncine.vec2.contains_point(rect: ncine.rect, x: number, y: number)
-> boolean
function ncine.vec2.create(x: number, y: number)
-> ncine.vec2
function ncine.vec2.div(vec0: ncine.vec2, vec1: ncine.vec2)
-> ncine.vec2
function ncine.vec2.div(vec: ncine.vec2, scalar: number)
-> ncine.vec2
function ncine.vec2.dot(vec0: ncine.vec2, vec1: ncine.vec2)
-> number
function ncine.vec2.get_center(rect: ncine.rect)
-> ncine.vec2
function ncine.vec2.get_max(rect: ncine.rect)
-> ncine.vec2
function ncine.vec2.get_min(rect: ncine.rect)
-> ncine.vec2
function ncine.vec2.intersect(rect0: ncine.rect, rect1: ncine.rect)
-> ncine.rect
function ncine.vec2.invert_size(rect: ncine.rect)
-> ncine.rect
function ncine.vec2.length(vec: ncine.vec2)
-> number
function ncine.vec2.mul(vec0: ncine.vec2, vec1: ncine.vec2)
-> ncine.vec2
function ncine.vec2.mul(vec: ncine.vec2, scalar: number)
-> ncine.vec2
function ncine.vec2.normalized(vec: ncine.vec2)
-> ncine.vec2
function ncine.vec2.overlaps(rect0: ncine.rect, rect1: ncine.rect)
-> boolean
function ncine.vec2.set_center(rect: ncine.rect, x: number, y: number)
function ncine.vec2.sqrlength(vec: ncine.vec2)
-> number
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
function ncine.vec3.add(vec0: ncine.vec3, vec1: ncine.vec3)
-> ncine.vec3
Adds two vectors together, component-wise
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
function ncine.vec3.div(vec0: ncine.vec3, vec1: ncine.vec3)
-> ncine.vec3
Divides the first vector by the second one, component-wise
function ncine.vec3.dot(vec0: ncine.vec3, vec1: ncine.vec3)
-> number
Returns the dot product between the two vectors
function ncine.vec3.length(vec: ncine.vec3)
-> number
Returns the length of the vector
function ncine.vec3.mul(vec0: ncine.vec3, vec1: ncine.vec3)
-> ncine.vec3
Multiplies two vectors together, component-wise
function ncine.vec3.normalized(vec: ncine.vec3)
-> ncine.vec3
Returns a normalized version of the vector
function ncine.vec3.sqrlength(vec: ncine.vec3)
-> number
Returns the squared length of the vector
function ncine.vec3.sub(vec0: ncine.vec3, vec1: ncine.vec3)
-> ncine.vec3
Subtracts the second vector from the first one, component-wise
number
The X component
number
The Y component
number
The Z component
function ncine.vec3.add(vec0: ncine.vec3, vec1: ncine.vec3)
-> ncine.vec3
function ncine.vec3.add(vec0: ncine.vec3, scalar: number)
-> ncine.vec3
function ncine.vec3.create(x: number, y: number, z: number)
-> ncine.vec3
function ncine.vec3.div(vec0: ncine.vec3, vec1: ncine.vec3)
-> ncine.vec3
function ncine.vec3.div(vec: ncine.vec3, scalar: number)
-> ncine.vec3
function ncine.vec3.dot(vec0: ncine.vec3, vec1: ncine.vec3)
-> number
function ncine.vec3.length(vec: ncine.vec3)
-> number
function ncine.vec3.mul(vec0: ncine.vec3, vec1: ncine.vec3)
-> ncine.vec3
function ncine.vec3.mul(vec: ncine.vec3, scalar: number)
-> ncine.vec3
function ncine.vec3.normalized(vec: ncine.vec3)
-> ncine.vec3
function ncine.vec3.sqrlength(vec: ncine.vec3)
-> number
function ncine.vec3.sub(vec0: ncine.vec3, vec1: ncine.vec3)
-> ncine.vec3
function ncine.vec3.sub(vec: ncine.vec3, scalar: number)
-> ncine.vec3
function ncine.vec4.add(vec0: ncine.vec4, vec1: ncine.vec4)
-> ncine.vec4
Adds two vectors together, component-wise
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
function ncine.vec4.div(vec0: ncine.vec4, vec1: ncine.vec4)
-> ncine.vec4
Divides the first vector by the second one, component-wise
function ncine.vec4.dot(vec0: ncine.vec4, vec1: ncine.vec4)
-> number
Returns the dot product between the two vectors
function ncine.vec4.length(vec: ncine.vec4)
-> number
Returns the length of the vector
function ncine.vec4.mul(vec0: ncine.vec4, vec1: ncine.vec4)
-> ncine.vec4
Multiplies two vectors together, component-wise
function ncine.vec4.normalized(vec: ncine.vec4)
-> ncine.vec4
Returns a normalized version of the vector
function ncine.vec4.sqrlength(vec: ncine.vec4)
-> number
Returns the squared length of the vector
function ncine.vec4.sub(vec0: ncine.vec4, vec1: ncine.vec4)
-> ncine.vec4
Subtracts the second vector from the first one, component-wise
number
The W component
number
The X component
number
The Y component
number
The Z component
ncine.vec4
function ncine.vec4.add(vec0: ncine.vec4, vec1: ncine.vec4)
-> ncine.vec4
function ncine.vec4.add(vec0: ncine.vec4, scalar: number)
-> ncine.vec4
function ncine.vec4.create(x: number, y: number, z: number, w: number)
-> ncine.vec4
function ncine.vec4.div(vec0: ncine.vec4, vec1: ncine.vec4)
-> ncine.vec4
function ncine.vec4.div(vec: ncine.vec4, scalar: number)
-> ncine.vec4
function ncine.vec4.dot(vec0: ncine.vec4, vec1: ncine.vec4)
-> number
function ncine.vec4.length(vec: ncine.vec4)
-> number
function ncine.vec4.mul(vec0: ncine.vec4, vec1: ncine.vec4)
-> ncine.vec4
function ncine.vec4.mul(vec: ncine.vec4, scalar: number)
-> ncine.vec4
function ncine.vec4.normalized(vec: ncine.vec4)
-> ncine.vec4
function ncine.vec4.sqrlength(vec: ncine.vec4)
-> number
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
function ncine.viewport.clear_chain()
Clears the array of viewports to be drawn before the screen
function ncine.viewport.delete(viewport: viewportObj)
Destroys a viewport object and releases its memory
@param viewport
— The viewport object to be destroyed
function ncine.viewport.get_camera(viewport: viewportObj)
-> cameraObj?
Returns the camera used for rendering
function ncine.viewport.get_clear_color(viewport: viewportObj)
-> ncine.color
Returns the viewport clear color as a ncine.color
table
function ncine.viewport.get_clear_mode(viewport: viewportObj)
-> ncine.clear_mode
Returns the viewport clear mode
function ncine.viewport.get_culling_rect(viewport: viewportObj)
-> ncine.rect
Returns the rectangle for screen culling
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
function ncine.viewport.get_height(viewport: viewportObj)
-> integer
Returns viewport's FBO height or zero if no texture is present
function ncine.viewport.get_last_frame_cleared(viewport: viewportObj)
-> integer
Returns the last frame this viewport was cleared
function ncine.viewport.get_num_color_attachments(viewport: viewportObj)
-> integer
Returns the number of color attachments of the viewport's FBO
function ncine.viewport.get_rootnode(viewport: viewportObj)
-> scenenodeObj?
Returns the root node
function ncine.viewport.get_scissor_rect(viewport: viewportObj)
-> ncine.rect
Returns the OpenGL scissor test rectangle
function ncine.viewport.get_texture(viewport: viewportObj, index: integer)
-> textureObj?
Returns the texture at the specified viewport's FBO color attachment index, if any
function ncine.viewport.get_type(viewport: viewportObj)
-> ncine.viewport_type
Returns the viewport type
function ncine.viewport.get_viewport_rect(viewport: viewportObj)
-> ncine.rect
Returns the OpenGL viewport rectangle
function ncine.viewport.get_width(viewport: viewportObj)
-> integer
Returns viewport's FBO width or zero if no texture is present
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
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
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
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
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
function ncine.viewport.set_clear_color(viewport: viewportObj, clear_color: ncine.color)
Sets the viewport clear color through a ncine.color
table
function ncine.viewport.set_clear_mode(viewport: viewportObj, clear_mode: ncine.clear_mode)
Sets the viewport clear mode
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
function ncine.viewport.set_glframebuffer_label(viewport: viewportObj, label: string)
Sets the OpenGL object label for the viewport framebuffer object
function ncine.viewport.set_rootnode(viewport: viewportObj, rootnode?: scenenodeObj)
Sets or removes the root node
function ncine.viewport.set_scissor_rect(viewport: viewportObj, rect: ncine.rect)
Sets the OpenGL scissor test rectangle through a ncine.rect
table
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
function ncine.viewport.set_viewport_rect(viewport: viewportObj, rect: ncine.rect)
Sets the OpenGL viewport rectangle through a ncine.rect
table
function ncine.viewport.clear_chain()
function ncine.viewport.delete(viewport: viewportObj)
function ncine.viewport.get_camera(viewport: viewportObj)
-> cameraObj?
function ncine.viewport.get_clear_color(viewport: viewportObj)
-> ncine.color
function ncine.viewport.get_clear_mode(viewport: viewportObj)
-> ncine.clear_mode
function ncine.viewport.get_culling_rect(viewport: viewportObj)
-> ncine.rect
function ncine.viewport.get_depth_stencil_format(viewport: viewportObj)
-> ncine.depth_stencil_format
function ncine.viewport.get_height(viewport: viewportObj)
-> integer
function ncine.viewport.get_last_frame_cleared(viewport: viewportObj)
-> integer
function ncine.viewport.get_num_color_attachments(viewport: viewportObj)
-> integer
function ncine.viewport.get_rootnode(viewport: viewportObj)
-> scenenodeObj?
function ncine.viewport.get_scissor_rect(viewport: viewportObj)
-> ncine.rect
function ncine.viewport.get_texture(viewport: viewportObj, index: integer)
-> textureObj?
function ncine.viewport.get_type(viewport: viewportObj)
-> ncine.viewport_type
function ncine.viewport.get_viewport_rect(viewport: viewportObj)
-> ncine.rect
function ncine.viewport.get_width(viewport: viewportObj)
-> integer
function ncine.viewport.new()
-> viewportObj
function ncine.viewport.push_back_chain(viewport: viewportObj)
function ncine.viewport.push_front_chain(viewport: viewportObj)
function ncine.viewport.remove_all_textures(viewport: viewportObj)
-> boolean
function ncine.viewport.set_camera(viewport: viewportObj, camera?: cameraObj)
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)
function ncine.viewport.set_clear_mode(viewport: viewportObj, clear_mode: ncine.clear_mode)
function ncine.viewport.set_depth_stencil_format(viewport: viewportObj, depth_stencil_format: ncine.depth_stencil_format)
-> boolean
function ncine.viewport.set_glframebuffer_label(viewport: viewportObj, label: string)
function ncine.viewport.set_rootnode(viewport: viewportObj, rootnode?: scenenodeObj)
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)
function ncine.viewport.set_texture(viewport: viewportObj, index: integer, texture?: textureObj)
-> boolean
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)
enum ncine.viewport_type
enum ncine.visit_order_state
function newproxy(proxy: boolean|table|userdata)
-> userdata
function next(table: table<<K>, <V>>, index?: <K>)
-> <K>?
2. <V>?
oslib
function os.clock()
-> number
function os.date(format?: string, time?: integer)
-> string|osdate
function os.difftime(t2: integer, t1: integer)
-> integer
function os.execute(command?: string)
-> suc: boolean?
2. exitcode: ("exit"|"signal")?
3. code: integer?
function os.exit(code?: boolean|integer, close?: boolean)
function os.getenv(varname: string)
-> string?
function os.remove(filename: string)
-> suc: boolean
2. errmsg: string?
function os.rename(oldname: string, newname: string)
-> suc: boolean
2. errmsg: string?
function os.setlocale(locale: string|nil, category?: "all"|"collate"|"ctype"|"monetary"|"numeric"...(+1))
-> localecategory: string
function os.time(date?: osdateparam)
-> integer
function os.tmpname()
-> string
string|integer
1-31
View documents
string|integer
0-23
View documents
boolean
daylight saving flag, a boolean
View documents
string|integer
0-59
View documents
string|integer
1-12
View documents
string|integer
0-61
View documents
string|integer
weekday, 1–7, Sunday is 1
View documents
string|integer
day of the year, 1–366
View documents
string|integer
four digits
View documents
string|integer
1-31
View documents
(string|integer)?
0-23
View documents
boolean?
daylight saving flag, a boolean
View documents
(string|integer)?
0-59
View documents
string|integer
1-12
View documents
(string|integer)?
0-61
View documents
(string|integer)?
weekday, 1–7, Sunday is 1
View documents
(string|integer)?
day of the year, 1–366
View documents
string|integer
four digits
View documents
function os.clock()
-> number
Returns an approximation of the amount in seconds of CPU time used by the program.
View documents
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
function os.difftime(t2: integer, t1: integer)
-> integer
Returns the difference, in seconds, from time t1
to time t2
.
View documents
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"
function os.exit(code?: boolean|integer, close?: boolean)
Calls the ISO C function exit
to terminate the host program.
View documents
function os.getenv(varname: string)
-> string?
Returns the value of the process environment variable varname
.
View documents
function os.remove(filename: string)
-> suc: boolean
2. errmsg: string?
Deletes the file with the given name.
View documents
function os.rename(oldname: string, newname: string)
-> suc: boolean
2. errmsg: string?
Renames the file or directory named oldname
to newname
.
View documents
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"
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
function os.tmpname()
-> string
Returns a string with a file name that can be used for a temporary file.
View documents
packagelib
string
table
function package.loadlib(libname: string, funcname: string)
-> any
table
function package.searchpath(name: string, path: string, sep?: string, rep?: string)
-> filename: string?
2. errmsg: string?
function package.seeall(module: table)
string
A string describing some compile-time configurations for packages.
View documents
string
The path used by require
to search for a C loader.
View documents
table
A table used by require
to control which modules are already loaded.
View documents
table
A table used by require
to control how to load modules.
View documents
function package.loadlib(libname: string, funcname: string)
-> any
Dynamically links the host program with the C library libname
.
View documents
string
The path used by require
to search for a Lua loader.
View documents
table
A table to store loaders for specific modules.
View documents
table
A table used by require
to control how to load modules.
View documents
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
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
function pairs(t: <T:table>)
-> fun(table: table<<K>, <V>>, index?: <K>):<K>, <V>
2. <T:table>
number|number[]
number|number[]
ncine.vec2|ncine.vec2[]
A two component vector
number|number[]
ncine.vec2|ncine.vec2[]
A two component vector
particle_initializer
function pcall(f: fun(...any):...unknown, arg1?: any, ...any)
-> success: boolean
2. result: any
3. ...any
integer
number
number
pointer
function print(...any)
function rawequal(v1: any, v2: any)
-> boolean
function rawget(table: table, index: any)
-> any
function rawlen(v: string|table)
-> len: integer
function rawset(table: table, index: any, value: any)
-> table
function reload_script()
rendering_settings
boolean
True if sprite batching is enabled
boolean
True if using indices for vertex batching
boolean
True if node culling is enabled
integer
Maximum size for a batch before a forced split
integer
Minimum size for a batch to be collected
function require(modname: string)
-> unknown
2. loaderdata: unknown
scroll_event
number
number
function select(index: integer|"#", ...any)
-> any
function setfenv(f: integer|fun(...any):...unknown, table: table)
-> function
function setmetatable(table: table, metatable?: table|metatable)
-> table
function show_gui(show: boolean)
stringlib
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
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
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
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
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
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
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
function string.len(s: string|number)
-> integer
Returns its length.
View documents
function string.lower(s: string|number)
-> string
Returns a copy of this string with all uppercase letters changed to lowercase.
View documents
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
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
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
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
function string.reverse(s: string|number)
-> string
Returns a string that is the string s
reversed.
View documents
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
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
function string.upper(s: string|number)
-> string
Returns a copy of this string with all lowercase letters changed to uppercase.
View documents
function string.byte(s: string|number, i?: integer, j?: integer)
-> ...integer
function string.char(byte: integer, ...integer)
-> string
function string.dump(f: fun(...any):...unknown, strip?: boolean)
-> string
function string.find(s: string|number, pattern: string|number, init?: integer, plain?: boolean)
-> start: integer|nil
2. end: integer|nil
3. ...any
function string.format(s: string|number, ...any)
-> string
function string.gmatch(s: string|number, pattern: string|number, init?: integer)
-> fun():string, ...unknown
function string.gsub(s: string|number, pattern: string|number, repl: string|number|function|table, n?: integer)
-> string
2. count: integer
function string.len(s: string|number)
-> integer
function string.lower(s: string|number)
-> string
function string.match(s: string|number, pattern: string|number, init?: integer)
-> ...any
function string.pack(fmt: string, v1: string|number, v2?: string|number, ...string|number)
-> binary: string
function string.packsize(fmt: string)
-> integer
function string.rep(s: string|number, n: integer, sep?: string|number)
-> string
function string.reverse(s: string|number)
-> string
function string.sub(s: string|number, i: integer, j?: integer)
-> string
function string.unpack(fmt: string, s: string, pos?: integer)
-> ...any
2. offset: integer
function string.upper(s: string|number)
-> string
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
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
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
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
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
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
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
function string.len(s: string|number)
-> integer
Returns its length.
View documents
function string.lower(s: string|number)
-> string
Returns a copy of this string with all uppercase letters changed to lowercase.
View documents
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
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
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
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
function string.reverse(s: string|number)
-> string
Returns a string that is the string s
reversed.
View documents
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
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
function string.upper(s: string|number)
-> string
Returns a copy of this string with all lowercase letters changed to uppercase.
View documents
tablelib
function table.concat(list: table, sep?: string, i?: integer, j?: integer)
-> string
function table.foreach(list: any, callback: fun(key: string, value: any):<T>|nil)
-> <T>|nil
function table.foreachi(list: any, callback: fun(key: string, value: any):<T>|nil)
-> <T>|nil
function table.getn(list: <T>[])
-> integer
function table.insert(list: table, pos: integer, value: any)
function table.maxn(table: table)
-> integer
function table.move(a1: table, f: integer, e: integer, t: integer, a2?: table)
-> a2: table
function table.pack(...any)
-> table
function table.remove(list: table, pos?: integer)
-> any
function table.sort(list: <T>[], comp?: fun(a: <T>, b: <T>):boolean)
function table.unpack(list: <T>[], i?: integer, j?: integer)
-> ...<T>
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
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
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
function table.getn(list: <T>[])
-> integer
Returns the number of elements in the table. This function is equivalent to #list
.
View documents
function table.insert(list: table, pos: integer, value: any)
Inserts element value
at position pos
in list
.
View documents
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
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
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
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
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
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
string
function tonumber(e: any)
-> number?
function tostring(v: any)
-> string
integer
integer
pointer[]
touch_event
function type(v: any)
-> type: "boolean"|"function"|"nil"|"number"|"string"...(+3)
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>
utf8lib
function utf8.char(code: integer, ...integer)
-> string
function utf8.codepoint(s: string, i?: integer, j?: integer, lax?: boolean)
-> code: integer
2. ...integer
function utf8.codes(s: string, lax?: boolean)
-> fun(s: string, p: integer):integer, integer
function utf8.len(s: string, i?: integer, j?: integer, lax?: boolean)
-> integer?
2. errpos: integer?
function utf8.offset(s: string, n: integer, i?: integer)
-> p: integer
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
string
The pattern which matches exactly one UTF-8 byte sequence, assuming that the subject is a valid UTF-8 string.
View documents
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
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
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
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
video_mode
integer
The number of bits for the blue channel
integer
The number of bits for the green channel
integer
The video height
integer
The number of bits for the red channel
number
The refresh rate in Hz
integer
The video width
function warn(message: string, ...any)
function xpcall(f: fun(...any):...unknown, msgh: function, arg1?: any, ...any)
-> success: boolean
2. result: any
3. ...any