@threlte/extras

<Stars>

This component is a port of drei’s <Stars> component, which adds a blinking shader-based starfield to your scene.

Examples

Basic Example

Billboard.svelte
<script lang="ts">
  import { Stars } from '@threlte/extras'
</script>

<Stars />

Component Signature

<Stars> extends <T.Points> and supports all its props, slot props, bindings and events.

Props

name
type
required
default
description

count
number
no
5000
Number of stars

depth
number
no
50
Radius + depth = maximum distance of points from center

factor
number
no
6
Size of stars

fade
boolean
no
true
If stars should fade at the edges (shows blurry circles instead of squares)

lightness
number
no
0.8

opacity
number
no
1.0

radius
number
no
50
Minimum distance of points to center

saturation
number
no
1.0

speed
number
no
0
Speed of blinking animation