1. @threlte/core
  2. Mesh

@threlte/core

Mesh

This component represents triangular polygon mesh based objects.

Import

Source

Github View Source Code

Package

NPM View Package

Related Docs


Example

<script>
  import { Mesh } from '@threlte/core'
  import { BoxBufferGeometry, MeshBasicMaterial } from 'three'
</script>

<Mesh
  position={{ y: 1 }}
  geometry={new BoxBufferGeometry(1, 2, 1)}
  material={new MeshBasicMaterial({ wireframe: true })}
/>

Properties

// required
geometry: THREE.BufferGeometry
material: THREE.Material | THREE.Material[]

// optional
position: Position | undefined = undefined
scale: Scale | undefined = undefined
rotation: Rotation | undefined = undefined
lookAt: LookAt | undefined = undefined
viewportAware: boolean = false
castShadow: boolean | undefined = undefined
receiveShadow: boolean | undefined = undefined
frustumCulled: boolean | undefined = undefined
renderOrder: number | undefined = undefined
visible: boolean | undefined = undefined
dispose: boolean | undefined = undefined
userData: Record<string, any> | undefined = undefined
interactive: boolean = false
ignorePointer: boolean = false

Bindings

inViewport: boolean
mesh: THREE.Mesh

Events

viewportenter: undefined
viewportleave: undefined
click: CustomEvent<ThreltePointerEvent>
contextmenu: CustomEvent<ThreltePointerEvent>
pointerup: CustomEvent<ThreltePointerEvent>
pointerdown: CustomEvent<ThreltePointerEvent>
pointerenter: CustomEvent<ThreltePointerEvent>
pointerleave: CustomEvent<ThreltePointerEvent>
pointermove: CustomEvent<ThreltePointerEvent>