A
ThreeDFrame is used to store settings and the buffer for drawing. It is basically the entire rendering environment. You can use multiple at a time as well. You can create one using the Pine3D.newFrame method:
local frame = Pine3D:newFrame(x1, y1, x2, y2)
Returns:
void
| Name |
Type |
Description |
| x1 |
number |
x of starting position of the 3d rendering window |
| y1 |
number |
y of starting position of the 3d rendering window |
| x2 |
number |
x of ending position of the 3d rendering window |
| y2 |
number |
y of ending position of the 3d rendering window |
Returns:
void
| Name |
Type |
Description |
| color |
number |
CC color from the colors library |
Returns:
void
| Name |
Type |
Description |
| enabled |
boolean |
if enabled, uses depth interpolation (default) |
Returns:
void
| Name |
Type |
Description |
| cameraX |
number |
x coordinate of the new camera position (optional) |
| cameraY |
number |
y coordinate of the new camera position (optional) |
| cameraZ |
number |
z coordinate of the new camera position (optional) |
| rotX |
number |
new camera rotation around the x axis (optional) |
| rotY |
number |
new camera rotation around the y axis (optional) |
| rotZ |
number |
new camera rotation around the z axis (optional) |
Returns:
void
| Name |
Type |
Description |
| camera |
PineCamera |
string indexed table with values for x, y, z, rotX, rotY, rotZ (all optional) |
Returns:
void
| Name |
Type |
Description |
| FoV |
number |
the new field of view of the camera in degrees |
Returns: object:
PineObject
| Name |
Type |
Description |
| model |
string or Model |
if string, used as path to load the serialized Model |
| x |
number |
x coordinate of the PineObject |
| y |
number |
y coordinate of the PineObject |
| z |
number |
z coordinate of the PineObject |
| rotX |
number |
rotation around the x axis (optional) |
| rotY |
number |
rotation around the y axis (optional) |
| rotZ |
number |
rotation around the z axis (optional) |
Returns: screenX: number, screenY: number, visible: boolean
| Name |
Type |
Description |
| x |
number |
x coordinate in 3d space |
| y |
number |
y coordinate in 3d space |
| z |
number |
z coordinate in 3d space |
Returns:
void
| Name |
Type |
Description |
| objects |
number indexed table of PineObject |
table of objects to draw to the internal Buffer |