How achrefelouafi/vfxplayground2gen2threejs works
VFX Shots 2 is a browser-based real-time spell sandbox: players select or aim a spell, cast it into a rune arena, and inspect the rendered result. Its editor supports live tuning, playback scrubbing with deterministic re-simulation, and JSON presets; README also documents showcase and MOBA modes. The map groups the ten spell implementations together while retaining their shared materials, simulation services, arena, and rendering layers. Some subsystem links are based on README or SOURCE INDEX references because their implementation excerpts were not provided.
Main entry points: App.js App orchestration · shots Spell implementations · main.js Browser entry · Editor.js Spell editor
Components 24
App runtime
- App orchestration
src/core/App.js - Input manager
src/input/InputManager.js - Camera rig
src/core/CameraRig.js - Browser entry
src/main.js - Seeded randomness
src/utils/rng.js
Spell casting
- Ability manager
src/abilities/AbilityManager.js - Spell implementations
src/abilities/shots - Aim controller
src/input/AimController.js
Arena simulation
- Environment
src/world/Environment.js - Arena and scenery
src/world - Training dummies
src/combat/DummyField.js - Caster animation
src/animation/CharacterController.js
Rendering
- Spell geometry and materials
src/materials/shots - Particle systems
src/particles/ParticleEngine.js - Ground decals
src/effects/GroundDecals.js - Post processing
src/postprocessing/PostProcessing.js - Frame uniforms
src/core/FrameUniforms.js - Shader utilities
src/shaders/tsl - WebGPU renderer
src/core/Renderer.js
Controls and tuning
- Live settings
src/config/settings.js - Spell editor
src/ui/Editor.js - Preset manager
src/ui/PresetManager.js - HUD
src/ui/HUD.js
Other components
- Player
Connections 27
- Player → Browser entry: opens app
- Browser entry → App orchestration: starts
src/main.js - Browser entry → HUD: creates
src/main.js - App orchestration → Input manager: creates
src/core/App.js - App orchestration → Camera rig: creates
src/core/App.js - App orchestration → Environment: builds
src/core/App.js - App orchestration → Training dummies: creates
src/core/App.js - App orchestration → Caster animation: loads
src/core/App.js - Player → Input manager: controls
- Player → Spell editor: tunes spells
- Spell editor → Live settings: edits
src/ui/Editor.js - Spell editor → Preset manager: uses
src/ui/Editor.js - Player → Aim controller: aims cast
- App orchestration → Ability manager: casts through
src/core/App.js - Ability manager → Spell implementations: dispatches
src/abilities/AbilityManager.js - Spell implementations → Spell geometry and materials: uses
src/abilities/shots/BladesAbility.js - App orchestration → Seeded randomness: reseeds for seek
src/core/App.js - App orchestration → Arena and scenery: assembles
src/core/App.js - Environment → Arena and scenery: creates sky
src/world/Environment.js - Spell implementations → Ground decals: creates decals
src/abilities/shots/BladesAbility.js - Spell implementations → Particle systems: emits effects
- App orchestration → WebGPU renderer: initializes
src/core/App.js - WebGPU renderer → Post processing: composites
- Post processing → Frame uniforms: reads
src/postprocessing/PostProcessing.js - Spell geometry and materials → Shader utilities: uses shader utilities
src/materials/shots/starfall/StarfallMaterials.js - Spell implementations → Live settings: reads controls
src/abilities/shots/BladesAbility.js - Player → Ability manager: selects spell