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

textmode.math.js

v0.1.0

Published

Math helpers, easing, and vector math add-on for textmode.js

Downloads

203

Readme

textmode.math.js

| TypeScript Vite WebGL2 | API docs | ko-fi GitHub-sponsors | |:---|:---|:---|

textmode.math.js is a dedicated creative-coding math, easing, and vector library for textmode.js. It provides chainable 2D/3D vectors, 31 standard easing curves, angle and unit conversions, trigonometry, and value mapping either through an instance plugin (MathPlugin) or via lightweight, tree-shakeable standalone imports.

Shape motion, geometry, and transitions with expressive creative-coding primitives: animate characters along physics trajectories, smooth easing curves, calculate angles and distances, or remap sensor and audio inputs into visual ranges. Designed for clarity, performance, and flexibility, textmode.math.js keeps procedural animation and spatial algorithms clean whether working inside sketch draw loops or in headless modules.

Features

  • Chainable 2D & 3D vectors - TextmodeVector with arithmetic (add, sub, mult, div), magnitudes, limiting, heading in degrees, dot, and cross products
  • 31 easing curves - Standard quadratic, cubic, quartic, quintic, sinusoidal, exponential, circular, back, elastic, and bounce curves with clamped inputs and overshoot preservation
  • Creative-coding mapping - map, norm, lerp, constrain, and clamp for shaping signals and transitions
  • Trigonometry and geometry - Radians-based trigonometry (sin, cos, tan, asin, acos, atan, atan2), degrees/radians conversions, and Euclidean distance calculations
  • Dual consumption models - Install MathPlugin to restore t.* instance methods on Textmodifier, or use tree-shakeable standalone functions without installing any plugin

Try it online first

Open editor.textmode.art, a browser-based live-coding environment for the complete official textmode.js ecosystem. Sketches run as you edit, with no local toolchain required.

The editor includes textmode.js and all four official add-ons: textmode.export.js, textmode.filters.js, textmode.figlet.js, and textmode.synth.js.

  • Write with Monaco-powered completions, hover documentation, and diagnostics.
  • Start with a blank sketch, an included example, or a community gallery sketch.
  • Keep code and preferences saved in the browser, then share sketches through URL-based links.
  • Use microphone or line-input analysis for audio-reactive work, and create on desktop or mobile.

Use it to experiment with vector physics, motion paths, and easing curves interactively while your sketch runs.

Installation

Follow the official installation guide to install textmode.math.js alongside textmode.js with npm or browser-ready UMD bundles.

Next steps

Contributing

Thank you for considering contributing to this project! (✿◠‿◠)

Please read the Contributing Guide to get started.

Contributors

Thanks to the people who contribute code, documentation, design, examples, ideas, infrastructure, and care across the textmode.js ecosystem.

Contribution details and profile links are maintained on the textmode.js contributors page.

License

textmode.math.js is licensed under the MIT License.