Skip to content

Latest commit

Β 

History

26 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Lumina Cursor 🌌

A high-performance, interactive fluid simulation and 3D glass cursor effect built with React, WebGL, and React Three Fiber. Experience a fluid, cinematic splash that follows your movement and reacts to your interactions through a refractive glass lens.

Lumina Cursor Preview

✨ Features

  • Fluid Dynamics: High-fidelity fluid simulation using custom WebGL shaders for realistic flow and dissipation.
  • Glass Refraction: A premium 3D cursor (FluidGlass) that refracts the background in real-time, creating a "glass lens" effect.
  • Interactive Explosions: Multi-directional color splashes and ripple effects on mouse click.
  • Velocity-Based Physics: The 3D cursor features "squash and stretch" dynamics that react to movement speed.
  • Shape Shifting: Toggle between different cursor geometries (Lens, Cube, Star, Torus) on the fly.
  • Optimized Performance: Capped at 60FPS with balanced resolutions for a silky-smooth experience even on complex scenes.
  • Modern UI: Minimalist editorial design featuring thin typography and a sophisticated dark aesthetic.

πŸ› οΈ Tech Stack

πŸš€ Getting Started

Prerequisites

  • Node.js (v18 or higher recommended)
  • npm, yarn, or pnpm

Installation

  1. Clone the repository:
    git clone https://github.com/sebastianvasquezechavarria1234/lumina-cursor.git
  2. Navigate to the project directory:
    cd lumina-cursor
  3. Install dependencies:
    npm install

Running Locally

To start the development server:

npm run dev

The application will be available at http://localhost:5173.

🎨 Configuration

Fluid Simulation

You can customize the splash effect in src/App.jsx by modifying the SplashCursor props:

<SplashCursor 
  DYE_RESOLUTION={512}
  PRESSURE_ITERATIONS={24}
  CURL={30}
  SPLAT_RADIUS={0.25}
  RAINBOW_MODE={true}
/>

Glass Cursor

The FluidGlass component supports various shapes and refraction intensities. You can adjust its physical properties like friction, tension, and mass to change how it follows the mouse.

πŸ“ Project Structure

lumina-cursor/
β”œβ”€β”€ public/              # Static assets (images, icons)
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/      # React components (SplashCursor, FluidGlass)
β”‚   β”œβ”€β”€ hooks/           # Custom React hooks for physics and mouse tracking
β”‚   β”œβ”€β”€ shaders/         # GLSL shader files for fluid simulation
β”‚   β”œβ”€β”€ App.jsx          # Main application entry point
β”‚   └── main.jsx         # Vite entry point
└── tailwind.config.js   # Style configurations

πŸ—ΊοΈ Roadmap

  • Custom Textures: Allow users to upload custom glass textures for the cursor.
  • Sound Reactive: Synchronize fluid splashes with audio input.
  • Multi-Touch Support: Enable mobile gestures and multi-finger fluid interactions.
  • Presets Gallery: A collection of predefined styles (Neon, Ghost, Liquid Gold).

πŸ“„ License

This project is open source and available under the MIT License.


Created with ❀️ by Sebastian Vasquez Echavarria

About

πŸŒŒπŸ’§ High-performance fluid simulation effect for modern web interfaces, engineered with React and WebGL to deliver an immersive, fluid, and fully interactive visual experience.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages