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 String

    to configure from

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;

mesh

String

The name of the mesh to render

Default: null;

point_size

Number

When rendering points the point size, if positive is in world space, if negative is in screen space

Default: -1;

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;

textured_points

Boolean

When rendering points tells if you want to use for every point the texture coordinates of the vertex or the point texture coordinates

Default: false;