Pass:draw

Edit

Draws a Model, Mesh, or Texture.




Arguments

NameTypeDefaultDescription
object* The Model, Mesh, or Texture to draw.
xnumber0 The x coordinate to draw the object at.
ynumber0 The y coordinate to draw the object at.
znumber0 The z coordinate to draw the object at.
scalenumber1 The scale of the object.
anglenumber0 The rotation of the object around its rotation axis, in radians.
axnumber0 The x component of the axis of rotation.
aynumber1 The y component of the axis of rotation.
aznumber0 The z component of the axis of rotation.
instancesnumber1 The number of instances to draw.

Returns

Nothing

Arguments

NameTypeDefaultDescription
object* The Model, Mesh, or Texture to draw.
positionVec3 The position to draw the object at.
scale3Vec3 The scale of the object, as a vector.
orientationQuat The orientation of the object.
instancesnumber1 The number of instances to draw.

Returns

Nothing

Arguments

NameTypeDefaultDescription
object* The Model, Mesh, or Texture to draw.
transformMat4 The transform of the object.
instancesnumber1 The number of instances to draw.

Returns

Nothing

Notes

Model:getMesh can be used to draw individual meshes of a model.

Textures ignore the instances parameter.

When drawing a Texture, the plane will be 1 meter wide at 1.0 scale and the height will be adjusted based on the Texture's aspect ratio.

See also