Functions | |
TEXTURE3D | texture3d.load (STRING path, NUMBER load) |
Loads an image as 3D texture (in RAM or VRAM). More... | |
TEXTURE3D | texture3d.new (NUMBER width, NUMBER height, NUMBER load) |
Makes an empty texture. More... | |
NIL | texture3d.setcustom (MODEL3D Model, NUMBER object, NUMBER texture, TEXTURE3D texture3d) |
Replaces the model's texture with another previously made or loaded. More... | |
NIL | texture3d.quality (TEXTURE3D texture, NUMBER quality) |
Sets the texture quality. More... | |
NIL | texture3d.quality (MODEL3D Model, NUMBER object, NUMBER texture, NUMBER quality) |
Sets the texture quality of an specific texture inside a 3D model. More... | |
NIL | texture3d.position (TEXTURE3D texture, NUMBER posx, NUMBER posy) |
Changes the position of a texture drawn in 2D with texture3d.draw(). More... | |
NIL | texture3d.scaling (TEXTURE3D texture, NUMBER scalx, NUMBER scaly) |
Changes the size of a texture drawn in 2D with texture3d.draw(). More... | |
NIL | texture3d.envmap (TEXTURE3D texture, NUMBER mapx, NUMBER mapy, NUMBER maprot) |
Changes the position and rotation of a texture in environmental mode (env_map). More... | |
NIL | texture3d.envmap (MODEL3D Model, NUMBER object, NUMBER texture, NUMBER mapx, NUMBER mapy, NUMBER maprot) |
Changes the position and rotation of a texture inside a 3D model in environmental mode (env_map). More... | |
NIL | texture3d.setmulti (MODEL3D Model, NUMBER object, NUMBER texture, TEXTURE3D texture3d) |
Applies a semi transparent texture over another inside a 3D model. More... | |
NIL | texture3d.mapping (TEXTURE3D texture3d, NUMBER mapping, NUMBER l0, NUMBER l1) |
Sets the texture mapping mode. More... | |
NIL | texture3d.mapping (MODEL3D Model, NUMBER object, NUMBER texture, NUMBER mapping, NUMBER l0, NUMBER l1) |
Sets the mapping mode of a texture inside a 3D model. More... | |
NIL | texture3d.setframes (TEXTURE3D texture3d, NUMBER frames) |
Defines the number of frames of an animated texture (the frames are aligned vertically). More... | |
NIL | texture3d.setframes (MODEL3D Model, NUMBER object, NUMBER texture, NUMBER frames) |
Defines the number of frames of an animated texture inside a 3D model (the frames are aligned vertically). More... | |
NIL | texture3d.frame (TEXTURE3D texture3d, NUMBER frame) |
Sets the frame to show of an animated texture. More... | |
NIL | texture3d.frame (MODEL3D Model, NUMBER object, NUMBER texture, NUMBER frame) |
Sets the frame to show of an animated texture. More... | |
NIL | texture3d.trans (TEXTURE3D texture3d, NUMBER u, NUMBER v) |
Modifies the mapping coordinates of a texture. More... | |
NIL | texture3d.trans (MODEL3D Model, NUMBER object, NUMBER texture, NUMBER u, NUMBER v) |
Modifies the mapping coordinates of a texture inside a 3D model. More... | |
NIL | texture3d.render (TEXTURE3D texture3d) |
Captures the image seen by the camera and saves it in a texture. More... | |
NIL | texture3d.render (MODEL3D Model, NUMBER object, NUMBER texture) |
Captures the image seen by the camera and saves it in a texture inside a 3D model. More... | |
NIL | texture3d.draw (TEXTURE3D texture3d) |
Draws a 3D texture in 2D mode (using amg.mode2d()). More... | |
NIL | texture3d.filter (MODEL3D Model, NUMBER filter) |
Change texture filter. More... | |
NIL | texture3d.filter (MODEL3D Model, NUMBER object, NUMBER filter) |
Change texture filter. More... | |
NIL | texture3d.allocshared (NUMBER w, NUMBER h) |
Reserves VRAM space for shared textures. More... | |
NIL | texture3d.freeshared () |
Frees the allocated space in VRAM for shared textures. More... | |
NIL | texture3d.tovram (TEXTURE3D texture3d) |
Moves a texture to VRAM. More... | |
NIL | texture3d.tovram (MODEL3D Model, NUMBER object, NUMBER texture) |
Moves a texture inside a 3D model to VRAM. More... | |
NIL | texture3d.finish () |
Ends the image capture of texture3d.render(). More... | |
Using 3D textures.
TEXTURE3D texture3d.load | ( | STRING | path, |
NUMBER | load | ||
) |
Loads an image as 3D texture (in RAM or VRAM).
path | Path to the texture file. |
load | Texture location, one of these constants:
|
TEXTURE3D texture3d.new | ( | NUMBER | width, |
NUMBER | height, | ||
NUMBER | load | ||
) |
Makes an empty texture.
width | Texture width. |
height | Texture height. |
load | Texture location, one of these constants:
|
NIL texture3d.setcustom | ( | MODEL3D | Model, |
NUMBER | object, | ||
NUMBER | texture, | ||
TEXTURE3D | texture3d | ||
) |
Replaces the model's texture with another previously made or loaded.
Model | A 3D model. |
object | An object inside the 3D model. |
texture | The object texture. |
texture3d | The new texture for the object. |
NIL texture3d.quality | ( | TEXTURE3D | texture, |
NUMBER | quality | ||
) |
Sets the texture quality.
texture | A 3D texture. |
quality | The texture quality:. Can be one of these constants:
|
NIL texture3d.quality | ( | MODEL3D | Model, |
NUMBER | object, | ||
NUMBER | texture, | ||
NUMBER | quality | ||
) |
Sets the texture quality of an specific texture inside a 3D model.
Model | A 3D model. |
object | The object inside the 3D model. |
texture | The object texture. |
quality | The texture quality. Can be one of these constants:
|
NIL texture3d.position | ( | TEXTURE3D | texture, |
NUMBER | posx, | ||
NUMBER | posy | ||
) |
Changes the position of a texture drawn in 2D with texture3d.draw().
texture | A texture. |
posx | The mapping X position (0 by default). |
posy | The mapping Y position (0 by default). |
NIL texture3d.scaling | ( | TEXTURE3D | texture, |
NUMBER | scalx, | ||
NUMBER | scaly | ||
) |
Changes the size of a texture drawn in 2D with texture3d.draw().
texture | A texture. |
scalx | X size (1 by default). |
scaly | Y size (1 by default). |
NIL texture3d.envmap | ( | TEXTURE3D | texture, |
NUMBER | mapx, | ||
NUMBER | mapy, | ||
NUMBER | maprot | ||
) |
Changes the position and rotation of a texture in environmental mode (env_map).
texture | A texture. |
mapx | X position (0 by default). |
mapy | Y position (0 by default). |
maprot | Rotation (0 by default). |
NIL texture3d.envmap | ( | MODEL3D | Model, |
NUMBER | object, | ||
NUMBER | texture, | ||
NUMBER | mapx, | ||
NUMBER | mapy, | ||
NUMBER | maprot | ||
) |
Changes the position and rotation of a texture inside a 3D model in environmental mode (env_map).
Model | A 3D model. |
object | An object inside the 3D model. |
texture | The object texture. |
mapx | X position (0 by default). |
mapy | Y position (0 by default). |
maprot | Rotation (0 by default). |
NIL texture3d.setmulti | ( | MODEL3D | Model, |
NUMBER | object, | ||
NUMBER | texture, | ||
TEXTURE3D | texture3d | ||
) |
Applies a semi transparent texture over another inside a 3D model.
Model | A 3D model. |
object | An object inside the 3D model. |
texture | The object texture. |
texture3d | The applied texture. |
NIL texture3d.mapping | ( | TEXTURE3D | texture3d, |
NUMBER | mapping, | ||
NUMBER | l0, | ||
NUMBER | l1 | ||
) |
Sets the texture mapping mode.
texture3d | A 3D texture. |
mapping | Mapping mode, one of these constants:
|
l0 | The lights to use as columns for the ambiental mapping matrix. |
l1 | The sencond light to use (the matrix size is 2x3). |
NIL texture3d.mapping | ( | MODEL3D | Model, |
NUMBER | object, | ||
NUMBER | texture, | ||
NUMBER | mapping, | ||
NUMBER | l0, | ||
NUMBER | l1 | ||
) |
Sets the mapping mode of a texture inside a 3D model.
Model | A 3D model. |
object | An object inside the 3D model. |
texture | The object texture. |
mapping | Mapping mode, one of these constants:
|
l0 | The lights to use as columns for the ambiental mapping matrix. |
l1 | The sencond light to use (the matrix size is 2x3). |
NIL texture3d.setframes | ( | TEXTURE3D | texture3d, |
NUMBER | frames | ||
) |
Defines the number of frames of an animated texture (the frames are aligned vertically).
texture3d | A 3D texture. |
frames | Number of frames. |
NIL texture3d.setframes | ( | MODEL3D | Model, |
NUMBER | object, | ||
NUMBER | texture, | ||
NUMBER | frames | ||
) |
Defines the number of frames of an animated texture inside a 3D model (the frames are aligned vertically).
Model | A 3D model. |
object | An object inside the 3D model. |
texture | The object texture. |
frames | Number of frames |
NIL texture3d.frame | ( | TEXTURE3D | texture3d, |
NUMBER | frame | ||
) |
Sets the frame to show of an animated texture.
texture3d | A 3D texture. |
frame | The frame to show. |
NIL texture3d.frame | ( | MODEL3D | Model, |
NUMBER | object, | ||
NUMBER | texture, | ||
NUMBER | frame | ||
) |
Sets the frame to show of an animated texture.
Model | A 3D model. |
object | An object inside the 3D model. |
texture | The object texture. |
frame | The frame to show. |
NIL texture3d.trans | ( | TEXTURE3D | texture3d, |
NUMBER | u, | ||
NUMBER | v | ||
) |
Modifies the mapping coordinates of a texture.
texture3d | A 3D texture. |
u | Mapping U position. |
v | Mapping V position. |
NIL texture3d.trans | ( | MODEL3D | Model, |
NUMBER | object, | ||
NUMBER | texture, | ||
NUMBER | u, | ||
NUMBER | v | ||
) |
Modifies the mapping coordinates of a texture inside a 3D model.
Model | A 3D model. |
object | An object inside the 3D model. |
texture | The object texture. |
u | Mapping U position. |
v | Mapping V position. |
NIL texture3d.render | ( | TEXTURE3D | texture3d | ) |
Captures the image seen by the camera and saves it in a texture.
texture3d | A 3D texture. |
NIL texture3d.render | ( | MODEL3D | Model, |
NUMBER | object, | ||
NUMBER | texture | ||
) |
Captures the image seen by the camera and saves it in a texture inside a 3D model.
Model | A 3D model. |
object | An object inside the 3D model. |
texture | The object texture. |
NIL texture3d.draw | ( | TEXTURE3D | texture3d | ) |
Draws a 3D texture in 2D mode (using amg.mode2d()).
texture3d | A 3D texture. |
NIL texture3d.filter | ( | MODEL3D | Model, |
NUMBER | filter | ||
) |
Change texture filter.
Model | The 3D model. |
filter | Filter for the texture. It can be one of the following constants:
|
NIL texture3d.filter | ( | MODEL3D | Model, |
NUMBER | object, | ||
NUMBER | filter | ||
) |
Change texture filter.
Model | The 3D model. |
object | The object inside the 3D model. |
filter | Filter for the texture. It can be one of the following constants:
|
NIL texture3d.allocshared | ( | NUMBER | w, |
NUMBER | h | ||
) |
Reserves VRAM space for shared textures.
w | Texture width. |
h | Texture height. |
NIL texture3d.freeshared | ( | ) |
Frees the allocated space in VRAM for shared textures.
NIL texture3d.tovram | ( | TEXTURE3D | texture3d | ) |
Moves a texture to VRAM.
texture3d | A 3D texture. |
NIL texture3d.tovram | ( | MODEL3D | Model, |
NUMBER | object, | ||
NUMBER | texture | ||
) |
Moves a texture inside a 3D model to VRAM.
Model | A 3D model. |
object | An object inside the 3D model. |
texture | A 3D texture. |
NIL texture3d.finish | ( | ) |
Ends the image capture of texture3d.render().