← Back to list

damage-numbers
by verekia
⚛️ React Three Fiber Game Dev Recipes
⭐ 17🍴 0📅 Jan 22, 2026
SKILL.md
name: damage-numbers description: Display floating damage numbers that animate upward and fade out, with support for critical hits.
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
Htmlfrom@react-three/dreifor DOM-in-3D rendering- Track damages in state with unique IDs for keying
- Use
setTimeoutto 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.
Score
Total Score
65/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
✓最近の活動
1ヶ月以内に更新
+10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
✓タグ
1つ以上のタグが設定されている
+5
Reviews
💬
Reviews coming soon

