@threlte/extras

<Outlines>

A port of the drei <Outlines> component.

An ornamental component that extracts the geometry from its parent and displays an inverted-hull outline. Supported parents are Mesh, SkinnedMesh and InstancedMesh.

Model: Battle Damaged Sci-fi Helmet by theblueturtle_

Example

<script lang="ts">
  import { BoxBufferGeometry, MeshBasicMaterial } from 'three'
  import { T } from '@threlte/core'
  import { Outlines } from '@threlte/extras'
</script>

<T.Mesh
  geometry={new BoxBufferGeometry(1, 1, 1)}
  material={new MeshBasicMaterial()}
>
  <Outlines color="black" />
</T.Mesh>

Component Signature

Props

name
type
required
default
description

angle
number
no
Math.PI

color
THREE.ColorRepresentation
no
black
Outline color

opacity
boolean
no
1
Outline transparency

polygonOffset
boolean
no
false

polygonOffsetFactor
number
no
0

renderOrder
number
no
0

screenspace
boolean
no
false
Line thickness is independent of zoom

thickness
number
no
0.05
Outline thickness

toneMapped
boolean
no
true