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 🙏

© 2025 – Pkg Stats / Ryan Hefner

tilted

v0.4.8

Published

Tilted is a lightweight zero-dependency TS library for displaying maps or other similar content in a modern 2.5D way.

Readme

Tilted cover image

NPM

Tilted

Tilted is a lightweight zero-dependency TS library for displaying maps or other similar content in a modern 2.5D way. Its key feature is the creation of multi-dimensional visuals out of 2D assets by placing them at an angle to each other.

Live demo is available on my website.

It goes well with my other library, Elemap, made for creating game maps rendered using HTML elements and CSS.

Support my work!

Features

  • Make your content tilted by default or depending on how close you look at it.
  • Angle the surface and the things you've put at it towards each other, creating 2.5D visuals.
  • Smooth scaling with the content gliding towards the cursor, animated with pure JS/TS.
  • Dragging functionality with limits so the content doesn't move off screen.
  • Works with anything, all visual modifications are done through CSS transform.
  • Ability to customize how it looks and works through configuration system.

Installation

npm i tilted or grab JS dist file from GitHub repo.

Usage

import Tilted from 'tilted' if using npm

new Tilted(container, surface, config?, contents?)

surface is HTML element with content, and container is HTML element used to determine viewport size that has surface as a child. Fixed width and height are preferred for both.

config? is an optional object that allows to change various constants related to scaling, animations, controls etc., check let config in config.ts file for available values and explanation what each of them affects.

contents? is an optional array of objects describing HTML objects that you want to create 2.5D visuals with, placing them at an angle to the surface when it's tilted.

The content object looks like: {type: 'scene'|'figure', element: HTMLElement, factor?: number}. Figure is a single content unit so the HTML element itself will be angled, while scene is a container of figures, meaning all direct children of it will be angled. Factor is optional and serves as a multiplier of the angle this content will have, default is 1.

Note that you can still add a direct child of a scene as a separate figure. In this case it won't be affected by scene properties, but only by its own instead.

Future plans

  • Implement surface rotation.
  • Add pinch zoom and other gestures for better controls on mobile.
  • Add more keyboard button actions for better controls on desktop.
  • Allow to configure controls.
  • Provide clear usage documentation.
  • Ensure best possible performance.
  • Improve overall code quality.
  • ...more to come

Support my work!