Skip to content

Outline

Outline is an effect that applies an outline to objects in your scene. This effect is commonly used to highlight objects.

Usage

vue
<script setup lang="ts">
import { EffectComposer, Outline } from '@tresjs/post-processing'
</script>

<template>
  <EffectComposer>
    <Outline />
  </EffectComposer>
</template>

Props

PropDescriptionDefault
outlinedObjectsThe objects to highlight[]
blurWhether the outline should be blurred.false
xRayWhether occluded parts of selected objects should be visible.true
kernelSizeThe blur kernel size. Use together with blur being true.KernelSize.VERY_SMALL
pulseSpeedThe pulse speed. A value of zero disables the pulse effect.0.0
resolutionXThe horizontal resolution. This prop is not reactive.Resolution.AUTO_SIZE
resolutionYThe vertical resolution. This prop is not reactive.Resolution.AUTO_SIZE
edgeStrengthThe edge strength.1.0
patternScaleThe pattern scale.1.0
multisamplingThe number of samples used for multisample antialiasing. Requires WebGL 2.0
blendFunctionThe blend function. Use BlendFunction.ALPHA for dark outlines. This prop is not reactive.BlendFunction.SCREEN
patternTextureA pattern texture. This prop is not reactive.null
resolutionScaleThe resolution scale. This prop is not reactive.0.5
hiddenEdgeColorThe color of hidden edges.0x22090a
visibleEdgeColorThe color of visible edges.0xffffff

Further Reading

see postprocessing docs