init.lua 1.2 KB

12345678910111213141516171819202122232425262728
  1. return {
  2. summary = 'A drawable triangle mesh.',
  3. description = [[
  4. Meshes store arbitrary geometry data, and can be drawn with `Pass:draw`.
  5. Meshes hold a list of **vertices**. The number of vertices is declared upfront when the Mesh is
  6. created, and it can not be resized afterwards.
  7. The Mesh has a **vertex format**, which is a set of **attributes** comprising each vertex, like
  8. a `position`, `color`, etc.
  9. The **vertex indices** in the Mesh describe the order that the vertices are rendered in. This
  10. is an optimization that allows vertices to be reused if they are used for multiple triangles,
  11. without duplicating all of their data.
  12. The Mesh has a **draw mode**, which controls how the vertices are connected together to create
  13. pixels. It can either be `points`, `lines`, or `triangles`.
  14. The Mesh can have a `Material` applied, which defines colors, textures, and other properties of
  15. its surface.
  16. The **draw range** of the Mesh defines a subset of the vertices to render when the Mesh is
  17. drawn.
  18. The **bounding box** of the Mesh allows LÖVR to skip rendering it when it's out of view.
  19. ]],
  20. constructor = 'lovr.graphics.newMesh'
  21. }