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 🙏

© 2024 – Pkg Stats / Ryan Hefner

ripple-hover-effect

v1.0.0

Published

Javascript library to animate images on hover.

Downloads

223

Readme

Ripple effect

Javascript library to animate images on hover.

If this project help you, don't forget to star it.

Codepen demo by Essam Abed

Example 1

https://user-images.githubusercontent.com/42716267/128242527-6c0b5d7e-70cd-4fb9-83c3-34d5960f233d.mp4

Example 2

https://user-images.githubusercontent.com/42716267/128239935-5ce12c7a-00ba-4ce7-adc6-15443d1cffc2.mp4

Use locally

To load the images you'll need to view the demo via a web server, simply open the projet with vscode then run the index.html file with Live Server.

Basic usage

This little library needs Three.js and Gsap to do the transition, so you need to include it before this library.

How it works:

<!-- Div to draw the effect on -->
<div class="my-div"></div>

<!-- library needed -->
<script src="three.min.js"></script>
<script src="gsap.min.js"></script>

<script src="dist/ripple-effect.js"></script>
<script>
    var ripple = new RippleEffect({
        parent: document.querySelector('.my-div'),
        intensity: 1,
        strength: 2,
        area: 4,
        waveSpeed: 0.001,
        speedIn: 2,
        speedOut: 1.5,
        easing: 'Expo.easeInOut',
        hover: true,
        texture: './img/my-img.jpg',
    });
</script>

Options

Mandatory parameters

| Name | Type | Default | Description | |-------------------------|-----------------|-----------------|-------------| |parent | Dom element | null | The DOM element where the animation will be injected. The images of the animation will take the parent's size. | |texture | Image | null | The Image of the animation. |

Optional parameters

| Name | Type | Default | Description | |-------------------------|-----------|-----------------|-------------| |intensity | Float | 1 | Used to determine the intensity of the ripple effect. 0 is no effect and 1 is full ripple. | |strength | Float | 2 | Strength of the ripple effect. | |area | Float | 6 | Area affected by the ripple effect. | |waveSpeed | Float | 0.01 | Ripple waves travel speed. | |speedIn | Float | 1.4 | Speed of the inbound animation (in seconds). | |speedOut | Float | 1.2 | Speed of the outbound animation (in seconds). | |hover | Boolean | true | if set to false the animation will not be triggered on hover (see start and stop function to interact) | |easing | String | Expo.easeOut | Easing of the transition, see greensock easing|image widthexample:1080 / 1920` |

Methods

| Name | Description | |-------------------------|-------------------------| |start | Start the ripple effect.| |stop | Stop the ripple effect. |

Credits

Thanks to :