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

@ff6347/p5-easing

v0.1.1-0

Published

Easing functions for p5js

Downloads

19

Readme

P5js Easing functions

This is a library that provides easing functions for use with p5.js. The library is based on Robert Penner's easing equations.

Installation

To install the library, download the p5.easing.js files and include it in your project.

Usage

To use the library, include the p5.easing.js file in your html and call the easing functions like this:

index.html

<!doctype html>
<html>
	<head>
		<title>P5 Easing Functions</title>
		<script src="p5.js"></script>
		<script src="p5.easing.js"></script>
		<script src="sketch.js"></script>
	</head>
	<body></body>
</html>

This is sketch.js

const start = 0; // The value at the start of the easing function
const end = 100; // The value we want to reach
const duration = 100; // The duration of the easing function in frames in our case

function setup() {
	createCanvas(end, end);
}
function draw() {
	background(255, 10);
	// The time is what drives the easing function
	// It is the current frame count provided by p5.js
	// constrained to the duration of the easing function using module
	const time = frameCount % duration;
	const x = easeInOutExpo(, start, end, duration);
	const y = frameCount % duration;
	circle(x, y, 10);
}

License and Attribution

This project uses easing functions based on Robert Penner's easing equations. Copyright © 2001 Robert Penner These functions are released under the BSD License. See http://robertpenner.com/easing_terms_of_use.html for full license details.