class Render
methods
Render.init
function Render.init(aspect: integer)
@param aspect - the aspect ratio. pass either 4/3 or 16/9
Initialize 3d rendering
Render.loadOBJ
function Render.loadOBJ(
model: string,
texture: Texture
) -> model Model
@param model - path to .OBJ file
@param texture - Texture object from Graphics.loadImage
Loads a wavefront OBJ
@see Graphics.loadImage
Render.drawOBJ
function Render.drawOBJ(
model: Model,
pos_x: integer,
pos_y: integer,
pos_z: integer,
rot_x: integer,
rot_y: integer,
rot_z: integer
)
@param pos_x - Coordinate for the X axis
@param pos_y - Coordinate for the Y axis
@param pos_z - Coordinate for the Z axis
@param rot_x - Rotation for the X axis
@param rot_y - Rotation for the Y axis
@param rot_z - Rotation for the Z axis
Draws the 3d model
Render.drawBbox
function Render.drawBbox(
model: Model,
pos_x: integer,
pos_y: integer,
pos_z: integer,
rot_x: integer,
rot_y: integer,
rot_z: integer,
color: color
)
@param pos_x - Coordinate for the X axis
@param pos_y - Coordinate for the Y axis
@param pos_z - Coordinate for the Z axis
@param rot_x - Rotation for the X axis
@param rot_y - Rotation for the Y axis
@param rot_z - Rotation for the Z axis
@param color - color
Draws the 3d model
@see Color.new
Render.freeOBJ
function Render.freeOBJ(model: Model)
Frees the 3D model, just in case it's not obvious: the texture is not freed