npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@ivanalbizu/astro-webgl-hover

v0.0.9

Published

WebGL image hover effects for Astro with displacement transitions using Curtains.js and GSAP

Readme

@ivanalbizu/astro-webgl-hover

WebGL image hover effects for Astro with displacement transitions using Curtains.js and GSAP.

Installation

npm install @ivanalbizu/astro-webgl-hover

Usage

---
import { WebglHoverImages, WebglHoverImage } from '@ivanalbizu/astro-webgl-hover';
---

<WebglHoverImages>
  <WebglHoverImage
    texture0="/image-default.jpg"
    texture1="/image-hover.jpg"
    map="/displacements/displacement.jpg"
  />
</WebglHoverImages>

Components

<WebglHoverImages>

Container component that initializes the WebGL context. Wrap all your <WebglHoverImage> components inside this.

Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | durationIn | number | 0.8 | Duration of hover-in animation (seconds) | | durationOut | number | 0.8 | Duration of hover-out animation (seconds) | | easeIn | string | 'power2.out' | GSAP easing for hover-in | | easeOut | string | 'power2.out' | GSAP easing for hover-out | | intensity | number | 1 | Displacement intensity | | displacementAngle | number | 0 | Displacement direction (degrees) | | zoom | number | 0 | Zoom amount on hover (0-1) | | imageRotation | number | 0 | Image rotation on hover (degrees) | | noiseSpeed | number | 0.5 | Noise animation speed | | noiseScale | number | 6.0 | Noise texture scale | | rgbShiftIntensity | number | 0 | RGB shift/chromatic aberration intensity | | debug | boolean | false | Show debug panel (lil-gui) |

<WebglHoverImage>

Individual image component with hover effect.

Props

| Prop | Type | Required | Description | |------|------|----------|-------------| | texture0 | string | Yes | Default image URL | | texture1 | string | Yes | Hover image URL | | map | string | Yes | Displacement map URL |

All props from <WebglHoverImages> can also be passed to individual <WebglHoverImage> components to override the global settings.

Displacement Maps

The map prop accepts a grayscale image that controls the displacement effect. You can find free displacement maps at:

Debug Mode

Enable debug={true} on <WebglHoverImages> to show a control panel where you can adjust all parameters in real-time.

<WebglHoverImages debug={true}>
  <!-- ... -->
</WebglHoverImages>

Advanced Usage

You can also import the library directly for more control:

import { initWebglHover, WebglHover } from '@ivanalbizu/astro-webgl-hover';

// Initialize manually
const instances = initWebglHover();

// Control individual instances
instances[0].setProgress(0.5);
instances[0].destroy();

Performance

The library includes several optimizations:

  • Fallback for low-performance devices
  • Render loop pauses when not animating
  • Debounced resize handler
  • Optimized mesh segments

Browser Support

Requires WebGL support. Falls back to static images on unsupported devices.

License

MIT