Skip to content

morphaxl/flippin-triangle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flippin Triangle

An interactive fluid simulation featuring particles confined within a triangular boundary. Built with WebGL and FLIP (Fluid Implicit Particle) fluid dynamics.

Features

  • Real-time fluid simulation using FLIP method
  • Interactive controls for customizing the simulation:
    • PIC/FLIP ratio
    • Density threshold
    • Particle size
    • Deep and surface colors
    • Pixelation effect
    • Triangle stroke width
    • Particle count
    • Damping
    • Motion blur
  • Smooth color gradients based on particle density
  • Motion blur effects for enhanced visual appeal
  • Responsive UI with modern controls

Controls

  • PIC/FLIP: Adjusts the PIC-FLIP ratio (0-100%)
  • THRESH: Controls density threshold for color mapping (70-100)
  • SIZE: Adjusts particle size multiplier (1.0-5.0)
  • DEEP: Color picker for deep water color
  • SURF: Color picker for surface/foam color
  • PIXEL: Pixelation effect intensity (0-100)
  • STROKE: Triangle outline stroke width (0.5-5.0)
  • PARTICLES: Particle count multiplier (50-200%)
  • DAMP: Velocity damping factor (0.85-1.0)
  • BLUR: Motion blur intensity (0-100)

Interaction

  • Mouse/Touch: Move your cursor or finger over the canvas to interact with the fluid
  • Keyboard: Press 'p' to pause/unpause the simulation

Technical Details

  • WebGL-based rendering
  • FLIP fluid simulation algorithm
  • Particle-based fluid representation
  • Real-time physics simulation
  • Custom shaders for rendering

License

MIT License

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published