@bg-effects/star-trails
v1.0.3
Published
Star Trails background effect with configurable path/persistence rendering.
Maintainers
Readme
@bg-effects/star-trails
A Vue-based star trails background effect component with both path and persistence rendering modes, plus a built-in debug panel.
Features
- Core capability: Includes the
StarTrailscomponent andStarTrailsEnginerenderer for dense star-trail animations. - Rendering modes: Supports both
pathandpersistencemodes, with optional long-exposure effects. - Interactivity: Supports fixed center or mouse-follow center, plus randomization and real-time debug tuning.
- Color system: Supports single-color mode and multi-palette mode (
classic/rainbow/ocean/fire).
Installation
pnpm add @bg-effects/star-trailsMain API
- Component export:
StarTrails(also the default export). - Debug panel:
ConfigPanel. - Metadata:
meta(contains default config, presets, and randomization logic). - Type exports:
StarTrailsConfigand related union types.
Usage Example
<script setup lang="ts">
import { StarTrails } from '@bg-effects/star-trails'
</script>
<template>
<div style="width: 100vw; height: 100vh; background: #000;">
<StarTrails
:density="1.2"
render-mode="path"
trail-type="radial"
color-mode="multi"
color-palette="rainbow"
:debug="true"
lang="zh-CN"
/>
</div>
</template>Local Development
pnpm install
pnpm devLicense
MIT
