VFX Catalog Feature (February 2026)
Commit: 69105229a905d1621820c119877e982ea328ddb6Author: dreaminglucid
Overview
New VFX catalog browser tab in Asset Forge with sidebar navigation, live Three.js effect previews, and comprehensive detail panels for all game visual effects.Features
Effect Categories
6 Categories, 27 Total Effects:-
Magic Spells (8 effects)
- Wind Strike, Water Strike, Earth Strike, Fire Strike
- Wind Bolt, Water Bolt, Earth Bolt, Fire Bolt
-
Arrow Projectiles (6 effects)
- Default, Bronze, Iron, Steel, Mithril, Adamant
-
Glow Particles (3 effects)
- Altar, Fire, Torch
-
Fishing Spots (3 effects)
- Net Fishing, Fly Fishing, Default Fishing
-
Teleport (1 effect)
- Multi-phase teleport sequence
-
Combat HUD (2 effects)
- Damage Splats, XP Drops
Live Previews
Three.js Animated Previews:- Spell Orbs: Orbiting projectiles with trailing particles and pulsing glow
- Arrows: Rotating 3D models with shaft, head, and fletching
- Glow Particles: Instanced billboards with realistic fire/altar behavior
- Water Effects: Splash arcs, bubble rise, shimmer twinkle, ripple rings
- Teleport: Full multi-phase sequence with beams, particles, and shockwaves
- Damage Splats: Hit (red) and Miss (blue) rounded rectangles
- XP Drops: Floating “+XP” text with gold border
Detail Panels
Color Swatches:- Hex color codes
- Visual color chips
- Labeled by component (Core, Mid, Outer, etc.)
- Effect-specific parameters
- Numeric values and units
- Configuration references
- Particle pool types (pillar, wisp, spark, base, riseSpread)
- Count per layer
- Lifetime ranges
- Scale ranges
- Sharpness values
- Behavior notes
- Visual timeline bar
- Phase durations (Gather, Erupt, Sustain, Fade)
- Color-coded phases
- Timestamp markers
- All effect components (rune circle, beams, particles, lights)
- Color indicators
- Behavior descriptions
- Hit vs Miss damage splats
- Color schemes per variant
Implementation
Data Source
File:packages/asset-forge/src/data/vfx-catalog.ts
Design: Standalone effect metadata (no imports from packages/shared)
Rationale: Asset Forge should never import from packages/shared (would pull in full game engine). VFX data is duplicated as plain objects.
Source of Truth:
packages/shared/src/data/spell-visuals.ts- Spell effectspackages/shared/src/entities/managers/particleManager/GlowParticleManager.ts- Glow particlespackages/shared/src/entities/managers/particleManager/WaterParticleManager.ts- Water particlespackages/shared/src/systems/client/ClientTeleportEffectsSystem.ts- Teleport effectpackages/shared/src/systems/client/DamageSplatSystem.ts- Damage splatspackages/shared/src/systems/client/XPDropSystem.ts- XP drops
Component Structure
VFXPage (src/pages/VFXPage.tsx):
- Main page component
- Sidebar navigation
- Detail panel routing
- Empty state
src/pages/VFXPage.tsx):
- Collapsible category groups
- Effect count badges
- Category icons (Lucide)
- Selection state
src/components/VFX/VFXPreview.tsx):
- Three.js Canvas wrapper
- Effect-specific preview components
- Camera positioning
- Lighting setup
src/components/VFX/EffectDetailPanel.tsx):
- ColorSwatch, ColorSwatchRow
- ParameterTable
- LayerBreakdown
- PhaseTimeline
- TeleportComponents
- VariantsPanel
Preview Components
SpellOrb:- Billboarded glow layers (outer + core)
- Orbiting path with vertical oscillation
- Pulse animation (bolts only)
- Trail particles (ring buffer)
- Orbiting sparks (bolt-tier)
- Point light for scene illumination
- Cylinder shaft (wood brown)
- Cone head (metallic)
- 3 fletching fins (rotated planes)
- Rotation animation
- Instanced billboards
- Per-particle color attributes
- Type-specific motion (pillar, wisp, spark, base, riseSpread)
- Lifetime-based fade
- Camera-facing billboards
- Splash arcs (parabolic motion)
- Bubble rise (wobble + vertical)
- Shimmer twinkle (double sine)
- Ripple rings (expanding circles)
- Water surface disc
- Rune circle (canvas texture)
- Base glow disc (pulsing)
- Inner/outer beams (Hermite elastic curve)
- Core flash (pop at eruption)
- Shockwave rings (easeOutExpo expansion)
- Helix particles (spiral upward)
- Burst particles (gravity simulation)
- Point light (dynamic intensity)
- Canvas 2D rendering
- Rounded rectangle backgrounds
- Hit (red) vs Miss (blue)
- Text rendering
- Canvas 2D rendering
- Rounded rectangle with gold border
- “+XP” text examples
- Animation description
Procedural Textures
Glow Texture (radial gradient):Navigation
Routes
Added:/vfx route
Navigation Constants (src/constants/navigation.ts):
src/components/shared/Navigation.tsx):
Icon
Lucide Icon:Sparkles
Category Icons:
- Spells:
Sparkles - Arrows:
Target - Glow:
Flame - Fishing:
Waves - Teleport:
Sparkles - Combat HUD:
Sword
Usage
Browsing Effects
- Open Asset Forge:
bun run dev:forge - Navigate to VFX tab (Sparkles icon)
- Click category to expand
- Click effect to view details
Viewing Details
Effect Details Include:- Live animated preview (or canvas preview for HUD effects)
- Color palette with hex codes
- Parameter table with values
- Layer breakdown (glow effects)
- Phase timeline (teleport)
- Component list (teleport)
- Variants (combat HUD)
Copying Effect Data
Use Case: Implementing new effects in game code Steps:- Browse to desired effect
- Note color hex codes from swatches
- Copy parameter values from table
- Reference layer configuration (glow effects)
- Implement in game using same values
Data Synchronization
Keeping Catalog Updated
When game VFX changes, update catalog data:- Spell Effects: Update
SPELL_EFFECTSarray invfx-catalog.ts - Arrow Effects: Update
ARROW_EFFECTSarray - Glow Effects: Update
GLOW_EFFECTSarray - Fishing Effects: Update
FISHING_EFFECTSarray - Teleport Effect: Update
TELEPORT_EFFECTobject - Combat HUD: Update
COMBAT_HUD_EFFECTSarray
Adding New Effects
Steps:-
Add to game (packages/shared):
-
Add to catalog (packages/asset-forge):
-
Add preview (if needed):
-
Test:
Technical Details
Preview Performance
Optimization Strategies:- Shared geometries (allocated once)
- Shared materials (compiled once)
- Instanced rendering (particles)
- Billboard optimization (camera-facing)
- Texture caching (Map-based)
- Target: 60 FPS
- Typical: 1-2ms per preview
- Max concurrent: 1 preview at a time (only selected effect)
Memory Management
Texture Cache:Animation Loops
useFrame Hook (React Three Fiber):- Spell orbs: Continuous orbit
- Arrows: Continuous rotation
- Glow particles: Lifetime-based recycling
- Water effects: Continuous cycles
- Teleport: 2.5s loop with 0.8s pause
Limitations
No Real-Time Editing
Current: Catalog is read-only (browse and view only) Future: Could add:- Color picker for live editing
- Parameter sliders
- Export to game format
- Save custom presets
No Effect Comparison
Current: View one effect at a time Future: Could add:- Side-by-side comparison
- Diff view for variants
- Performance comparison
No Search/Filter
Current: Browse by category only Future: Could add:- Text search
- Color filter
- Parameter range filter
- Tag-based filtering
Related Files
New Files
packages/asset-forge/src/pages/VFXPage.tsx- Main page componentpackages/asset-forge/src/components/VFX/VFXPreview.tsx- Preview components (1691 lines)packages/asset-forge/src/components/VFX/EffectDetailPanel.tsx- Detail panel componentspackages/asset-forge/src/data/vfx-catalog.ts- Effect metadata (663 lines)
Modified Files
packages/asset-forge/src/App.tsx- Added VFX routepackages/asset-forge/src/components/shared/Navigation.tsx- Added VFX nav linkpackages/asset-forge/src/constants/navigation.ts- Added VFX constantspackages/asset-forge/src/types/navigation.ts- Added VFX type
Usage Examples
Viewing Spell Effects
- Open Asset Forge:
bun run dev:forge - Click VFX tab (Sparkles icon)
- Expand “Magic Spells” category
- Click “Fire Bolt”
- View live preview with orbiting projectile
- See color palette: Outer (#ff4500), Core (#ffff00)
- See parameters: Size (0.7), Glow Intensity (0.9), Pulse Speed (5)
Viewing Teleport Effect
- Navigate to VFX tab
- Expand “Teleport” category
- Click “Teleport”
- View full 2.5s animated sequence
- See phase timeline: Gather (0-20%), Erupt (20-34%), Sustain (34-68%), Fade (68-100%)
- See component list: 10 components with colors and descriptions
Viewing Glow Particles
- Navigate to VFX tab
- Expand “Glow Particles” category
- Click “Altar”
- View live particle simulation
- See palette: Core (#c4b5fd), Mid (#8b5cf6), Outer (#60a5fa)
- See layer breakdown: 4 layers (pillar, wisp, spark, base) with counts and lifetimes
Future Enhancements
Planned Features
-
Export to Game Format:
- Generate TypeScript code from catalog data
- Export JSON configuration
- Copy to clipboard
-
Custom Presets:
- Create custom effect variants
- Save to local storage
- Share via URL
-
Performance Metrics:
- Draw call count
- Particle count
- Memory usage
- FPS impact
-
Effect Comparison:
- Side-by-side preview
- Parameter diff view
- Visual diff
-
Search & Filter:
- Text search by name
- Color-based filter
- Parameter range filter
- Tag system
Technical Improvements
-
WebGPU Rendering:
- Use WebGPU for previews (better performance)
- Compute shader particles
- Advanced post-processing
-
LOD System:
- Reduce particle count at distance
- Simplify geometry for thumbnails
- Adaptive quality
-
Recording:
- Export preview as video
- GIF generation
- Screenshot capture
References
- VFXPage.tsx - Main page
- VFXPreview.tsx - Preview components
- vfx-catalog.ts - Effect metadata
- React Three Fiber - 3D rendering library
- Lucide Icons - Icon library