Skip to content

NgtsDetailed

An abstraction around THREE.LOD. A common technique to improve performance is to swap out high-detail models or meshes for low-detail ones at large distances.

Usage

import { NgtsDetailed } from 'angular-three-soba/performances';
<ngts-detailed [distances]="[0, 50, 150]">
<ngt-mesh>
<ngt-icosahedron-geometry *args="[10, 3]" />
<ngt-mesh-basic-material color="hotpink" wireframe />
</ngt-mesh>
<ngt-mesh>
<ngt-icosahedron-geometry *args="[10, 2]" />
<ngt-mesh-basic-material color="lightgreen" wireframe />
</ngt-mesh>
<ngt-mesh>
<ngt-icosahedron-geometry *args="[10, 1]" />
<ngt-mesh-basic-material color="lightblue" wireframe />
</ngt-mesh>
</ngts-detailed>

distances length should be equal to the number of children.

Inputs

name type description required
distances number[] distances for LOD yes

Options

options input accepts any properties from THREE.LOD in addition to the following:

Properties

name type description
hysteresis number hysteresis for LOD, default to 0