5.4.0

Billboard

Make objects always face the camera automatically.

Adds a THREE.Group that always faces the camera.

Usage

<script setup lang="ts">
import { Billboard, Box, OrbitControls } from '@tresjs/cientos'
import { TresCanvas } from '@tresjs/core'
</script>

<template>
  <TresCanvas clear-color="#333333">
    <OrbitControls />
    <TresPerspectiveCamera :position="[0, 0, 10]" />
    <Billboard>
      <Box :scale="[0.5, 0.5, 0.001]">
        <TresMeshNormalMaterial />
      </Box>
    </Billboard>
  </TresCanvas>
</template>

Props

PropDescriptionDefault
autoUpdateWhether the <Billboard /> should face the camera automatically on every frame.true
lockXWhether to lock the x-axis.false
lockYWhether to lock the y-axis.false
lockZWhether to lock the z-axis.false