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

@y11i-3d/tsl-easings

v1.1.0

Published

Robert Penner's easing functions for Three.js Shader Language (TSL).

Readme

TSL Easings

npm version Build

This is a TSL (Three.js Shading Language) implementation of easing functions, based on Robert Penner's easing equations. https://robertpenner.com/easing_terms_of_use.html

MIT License:
Copyright (C) 2001 Robert Penner (Original easing equations)
Copyright (C) 2026 Yuichiroh Arai (TSL port)

Demo

https://y11i-3d.github.io/tsl-easings/

Installation

npm install @y11i-3d/tsl-easings

Usage

import { float, uniform, vec3, vec4 } from "three/tsl";
import { sineInOut } from "@y11i-3d/tsl-easings";

const t = uniform(float(0));
material.colorNode = vec4(vec3(sineInOut(t)), 1);

Custom parameters

back and elastic provide customizable variants:

import { float, uniform, vec3, vec4 } from "three/tsl";
import { customBackIn, customElasticOut } from "@y11i-3d/tsl-easings";

const t = uniform(float(0));

const overshoot = uniform(float(1.70158));
material.colorNode = vec4(vec3(customBackIn(t, overshoot)), 1);

const amplitude = uniform(float(1));
const period = uniform(float(0.3));
material.colorNode = vec4(vec3(customElasticOut(t, amplitude, period)), 1);

Inline vs named shader functions

By default, easing functions are inlined into the shader code. If you call .fn(), the function is compiled as a named shader function (via setLayout + overloadingFn), which can reduce code duplication when the same easing is used multiple times.

import { sineInOut } from "@y11i-3d/tsl-easings";

// Inline (default)
material.colorNode = vec4(vec3(sineInOut(t)), 1);

// Named shader function
const sineInOutFn = sineInOut.fn();
material.colorNode = vec4(vec3(sineInOutFn(t)), 1);

API

All easing functions

All functions accept float, vec2, vec3, or vec4 as input and return the same type.

| Family | In | Out | InOut | Custom parameters | | ------- | ----------------- | ------------------ | -------------------- | --------------------- | | sine | sineIn | sineOut | sineInOut | | | quad | quadIn | quadOut | quadInOut | | | cubic | cubicIn | cubicOut | cubicInOut | | | quart | quartIn | quartOut | quartInOut | | | quint | quintIn | quintOut | quintInOut | | | expo | expoIn | expoOut | expoInOut | | | circ | circIn | circOut | circInOut | | | back | customBackIn | customBackOut | customBackInOut | overshoot | | elastic | customElasticIn | customElasticOut | customElasticInOut | amplitude, period | | bounce | bounceIn | bounceOut | bounceInOut | |

Convenience wrappers

| Family | In | Out | InOut | Default values | | ------- | ----------- | ------------ | -------------- | ------------------------------- | | back | backIn | backOut | backInOut | overshoot = 1.70158 | | elastic | elasticIn | elasticOut | elasticInOut | amplitude = 1, period = 0.3 |