damage-numbers

Display floating damage numbers that animate upward and fade out, with support for critical hits.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "damage-numbers" with this command: npx skills add verekia/r3f-gamedev/verekia-r3f-gamedev-damage-numbers

Damage Numbers

Display floating damage numbers that animate upward and fade out, with support for critical hits.

Technique

Use Drei's Html component to render DOM elements in 3D space. Manage damage numbers in React state, spawn them with random positions, and use CSS animations for the floating/fading effect.

Key Concepts

  • Html from @react-three/drei for DOM-in-3D rendering
  • Track damages in state with unique IDs for keying
  • Use setTimeout to remove damages after animation completes
  • CSS keyframe animations for movement and opacity
  • Critical hits can have different styling (larger text, "CRIT" label)

Usage

<Html center position={[damage.x, damage.y, 0]}>
  <div style={{ animation: 'damageNumber 1.3s ease-out forwards' }}>{damage.value}</div>
</Html>

This skill is part of verekia's r3f-gamedev.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

smooth-interpolation

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

ui-useframe

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

health-bars

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

r3f-setup

No summary provided by upstream source.

Repository SourceNeeds Review