5.4.0

Stars

Renders beautiful stars in the sky using Points and BufferGeometry.

<Stars /> is a component that renders a stars in the sky of your scene. It is an abstraction that use Points, PointsMaterial and BufferGeometry to create a beautiful stars effect

Usage

You can use <Stars /> component without passing any props,

<script setup lang="ts">
import { TresCanvas } from '@tresjs/core'
import { Stars } from '@tresjs/cientos'
</script>

<template>
  <TresCanvas>
    <TresPerspectiveCamera :position="[0, 3, 5]" />
    <Stars />
    <TresAmbientLight />
  </TresCanvas>
</template>

Props

PropDescriptionDefault
sizeThe size of the stars0.1
sizeAttenuationkeep the same size regardless distance.true
transparentshow transparency on the stars texturetrue
alphaTestenables the WebGL to know when not to render the pixeltext.0.01
alphaMaptexture of the starsnull
countnumber of stars5000
depthdepth of star's shape50
radiusRadius of star's shape100