Skip to main content

Documentation Index

Fetch the complete documentation index at: https://v5.rpgjs.dev/llms.txt

Use this file to discover all available pages before exploring further.

Prebuilt Components

RPGJS includes a collection of prebuilt sprite components that you can use directly in your game. These components are ready to use out of the box and can be customized through props to match your game’s aesthetic.
Use prebuilt components when RPGJS already provides the sprite visual effect you need. For custom client-side effects, see Sprite Components. For server-controlled player visuals, see Authoritative Sprite Components.

Available Components

Light Halo

An animated light effect that creates a beautiful pulsing glow around sprites. Perfect for:
  • Atmospheric lighting effects
  • Magical auras and enchantments
  • Ambient glow for characters and objects
  • Dynamic lighting that responds to sprite state
Learn more about Light Halo →

Using Prebuilt Components

All prebuilt components follow the same pattern as custom sprite components. You can use them in your module configuration:
import { RpgClient, defineModule } from '@rpgjs/client';
import LightHalo from '@rpgjs/client';

export default defineModule<RpgClient>({
  sprite: {
    componentsBehind: [LightHalo]
  }
})
Or configure them with custom props:
export default defineModule<RpgClient>({
  sprite: {
    componentsBehind: [{
      component: LightHalo,
      props: {
        baseRadius: 50,
        lightColor: 0xffaaaa
      }
    }]
  }
})

See Also