API Docs for:
Show:

LS.Components.MeshRenderer Class

Renders one mesh, it allows to configure the rendering primitive, the submesh (range of mesh) and a level of detail mesh

Constructor

LS.Components.MeshRenderer

(
  • object
)

Parameters:

  • object Object

    to configure from

Item Index

Methods

configure

(
  • object
)

Configure from a serialized object

Parameters:

  • object Object

    with the serialized info

serialize

() Object

Serialize the object

Returns:

Object:

object with the serialized info

Properties

lod_mesh

String

The name of the mesh to render in case the mesh is far away, this mesh is also used for collision testing if using raycast to RenderInstances

Default: null;

material

String

The material to apply to this render, if not provided the one in the node will be used

Default: -1;

mesh

String

The name of the mesh to render

Default: null;

primitive

Number

The GL primitive to use when rendering this mesh (gl.POINTS, gl.TRIANGLES, etc), -1 is default, it also supports the option 10 which means Wireframe

Default: -1;

submesh_id

Number

The id of the submesh group to render, if the id is -1 then all the mesh is rendered.

Default: -1;