Common Functionality
New classes in this section:
- Json Class. This class is used to parse and create JSON formatted strings.
System Functions
For the following functions, the type of the argument and the return value has been changed Variable, so now this functions support both single and double precision:
UNIGINE | UNIGINE 2 |
---|---|
string call_stack() | Variable get_call_stack() |
string stack_dump() | Variable get_stack_dump() |
variable class_append(variable obj) | Variable class_append(Variable obj) |
variable class_cast(variable target_class, variable obj) | Variable class_cast(Variable target_class, Variable obj) |
Variable class_manage(variable v) | Variable class_manage(Variable v) |
Variable class_release(variable obj) | Variable class_release(Variable obj) |
variable class_remove(variable obj) | Variable class_remove(Variable obj) |
New Functions
OS Functions
Type Conversion Functions
UNIGINE | UNIGINE 2 |
---|---|
Variable dmat4(float x, float y, float z, float angle) | Variable dmat4(variable v0, variable v1, variable v2, variable v3) |
variable mat4(float x, float y, float z, float angle) | Variable mat4(variable v0, variable v1, variable v2, variable v3) |
Variable quat(float roll, float pitch, float yaw) | Variable quat(variable v0, variable v1, variable v2) |
New Functions
Buffer Class
Image Class
UNIGINE | UNIGINE 2 |
---|---|
int expand() | - |
void getPixels(Buffer pixels) | void getPixels (Blob image) |
int resize(int width, int height) | int resize(int new_width, int new_height, int filter) See remarks below. |
IMAGE_FILTER_BOX | Use IMAGE_FILTER_LINEAR instead. |
IMAGE_FORMAT_PVR4 IMAGE_FORMAT_R5G6B5 IMAGE_FORMAT_ATC1 IMAGE_FORMAT_ATC3 IMAGE_FORMAT_ATC5 IMAGE_FORMAT_EAC1 IMAGE_FORMAT_EAC2 IMAGE_FORMAT_ETC1 IMAGE_FORMAT_ETC2 IMAGE_FORMAT_ETC5 |
- |
Remarks:
- The new int resize(int new_width, int new_height, int filter) function now receives the 3rd argument for setting different filters that affect image quality while resizing. Available filters are: IMAGE_FILTER_LINEAR, IMAGE_FILTER_POINT.
New Functions and Variables
- IMAGE_CUBE_ARRAY
- IMAGE_FILTER_LINEAR
- IMAGE_FORMAT_RGB565
- int copy(Image image, int layer)
- int createCubeArray(int width, int height, int num_layers, int format, int num_mipmaps = 1, int clear = 1, int allocate = 1)
- int getBlockSize()
- vec4 getCubeArray(variable v1, variable v2, int face, int layer)
- vec4 getCubeArray(vec3 direction, int layer)
- int getNumChannels()
- int getNumFaces()
- int getOffset(int level)
- int getPixelSize()
- int getStride(int level)
- int is2DType()
- int is3DType()
- int isArrayType()
- int isCubeType()
- void setCubeArray(int x, int y, int face, int layer, float r, float g = 0 = 0.0f, float b = 0 = 0.0f, float a = 0 = 1.0f)
- void setCubeArray(int x, int y, int face, int layer, variable color)
- int sign()
RegExp Class
UNIGINE | UNIGINE 2 |
---|---|
string replace(string str, string after) | StringStack<256> replace(string str, string after) |
Stream Class
The following UNIGINE 2 functions perform the same as UNIGINE functions, but allow specifying endianness (big-endian or little-endian order).
New Functions
Xml Class
UNIGINE | UNIGINE 2 |
---|---|
Xml addChild(string node, string args = 0) | Xml addChild(variable v, string args = 0) |
variable removeChild(Xml child) | variable removeChild(variable v) |
int setIntArg(string name, int value) | int setIntArg(string name, int value, int radix = 10) |
int setIntArrayArg(string name, int value = []) | int setIntArrayArg(string name, int value = [], int radix = 10) |
int setIntArrayData(int data = []) | int setIntArrayData(int data = [], int radix = 10) |
int setIntData(int data) | int setIntData(int data, int radix = 10) |
New Functions
Async Class
Last update: 2017-07-03
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)