A WebGL-based ghost cursor trail effect that can be applied to any DOM element
Each box has its own independent ghost trail with different configurations:
// Basic usage const ghostTrail = new SmokyGhostTrail('#my-element', { size: 0.1, tail: { dotsNumber: 25, spring: 1.4, friction: 0.3, gravity: 0 }, mainColor: "#FAFAFA", // Light gray-white borderColor: "#3399CC", // Blue isFlatColor: false }); // Start the effect ghostTrail.start(); // Update options dynamically ghostTrail.updateOptions({ size: 0.15, mainColor: "#FF8080" // Light red }); // Stop and clean up ghostTrail.stop(); ghostTrail.destroy();