Skip to content

Latest commit

 

History

History
60 lines (34 loc) · 1.61 KB

Mesh.md

File metadata and controls

60 lines (34 loc) · 1.61 KB

class Mesh extends Element3D :id=Mesh

Element: <lume-mesh>

An element that renders a particular 3D shape (geometry) along with a particular style (material). This is a generic element with no particular shape. Elements like <lume-box> extend from Mesh in order to define behaviors they ship with by default. For example a <lume-box> element (backed by the Box class) extends from this Mesh class and applies two default behaviors: box-geometry and phong-material.

A <lume-mesh> does not have any behaviors by default, a geometry behavior and material behavior need to be added for it to render something, using the has="" attribute, for example has="box-geometry phong-material".

Example

<script> liveExample.content = meshExample() </script>

Properties

Inherits properties from Element3D.

.castShadow :id=castShadow

boolean attribute

Default: true

When true, the mesh casts shadows onto other objects when under the presence of a light such as a <lume-point-light>.

.receiveShadow :id=receiveShadow

boolean attribute

Default: true

When true, the mesh receives shadows from other objects when under the presence of a light such as a <lume-point-light>.

Inherits methods from Element3D.