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

tiny-dices

v1.1.0

Published

Tiny Dices adds a sprinkle of fun and a touch of magic to your dice-rolling adventures โ€” fully customizable with CSS and JavaScript to match your style, theme, or imagination! ๐ŸŽฒโœจ

Readme

๐ŸŽฒ Tiny Dices - Fun 3D Dice Rolling with JavaScript

Welcome to Tiny Dices! This JavaScript library is here to bring an extra layer of fun and magic to your dice-rolling experience. โœจ Whether you're rolling for your favorite tabletop RPG or just need some virtual dice to shake things up, TinyDices makes it all possible with style!

Inspiration โœจ

This project was initially a custom dice application from Pony Driland repository. The tiny dice eventually evolved during the development that resulted in this project that is now published by the same creator of the Pony Driland repository.

Features ๐ŸŒŸ

  • Roll any number of dice โ€“ from a single die to a whole set of them! ๐ŸŽฒ
  • Customizable max values โ€“ set different max values for each die. ๐ŸŒˆ
  • Spinning animation โ€“ your dice can spin infinitely or stop after a cool animation. ๐Ÿ”„
  • Dynamic cube generation โ€“ each die is a rotating, animated cube with unique faces. ๐ŸŽญ
  • Zero-inclusive rolls โ€“ make 0 a valid result if you need it! (Optional) ๐Ÿฅณ

How to Use ๐ŸŒŸ

  1. Create a Dice Instance:

    const container = document.getElementById('myDice');
    const dice = new TinyDices(container);
  2. Roll Some Dice:

  • ๐ŸŽฒ Roll 3 six-sided dice:

    dice.roll('7,7,7'); // Rolls 3d7 ๐ŸŽฒ๐ŸŽฒ๐ŸŽฒ
  • ๐ŸŽฏ Roll a mix of dice:

    dice.roll('6,12,20'); // Rolls d6, d12, and d20 ๐Ÿ”ข๐ŸŽฒ
  • ๐Ÿ”„ Roll with infinite spinning animation:

    dice.roll([10, 10], false, true); // Rolls 2d10 with infinite spin ๐Ÿ”„๐ŸŽฒ
  • ๐Ÿงฎ Roll with values starting from 0:

    dice.roll([10, 10], true); // Rolls 2d10 starting from 0 ๐Ÿฅณ๐ŸŽฒ
  • ๐Ÿงช Roll a custom set of dice with zero and infinity:

    dice.roll([4, 8, 6], true, true); // Rolls d4, d8, and d6 from 0 with infinite spin โš™๏ธ๐ŸŽฒ

Customization ๐ŸŽจ

Feel free to customize the appearance of your dice with different skins:

  • Background Skin: Set a cool background with solid colors like 'gray', 'blue', or 'green', or something magical! โœจ

    dice.setBgSkin('gray'); // Sets background skin to gray ๐ŸŒซ๏ธ
  • Text Skin: Make your dice text stand out with solid color skins like 'red', 'yellow', or 'white'! ๐ŸŒŸ

    dice.setTextSkin('red'); // Makes the text red ๐Ÿ”ด
  • Border Skin: Add a border effect to your dice with colors like 'black', 'orange', or 'purple'! โœจ

    dice.setBorderSkin('2px solid black'); // Sets a black border โšซ
  • Get Current Skins: Check what skins you're using right now:

    dice.getBgSkin(); // Returns current background skin ๐ŸŽจ
    dice.getTextSkin(); // Returns current text skin ๐Ÿ–‹๏ธ
    dice.getBorderSkin(); // Returns current border skin โšก

๐Ÿ’ป How It Works

Tiny Dices works by creating a customizable, 3D cube with 6 animated faces. Every time you roll, the faces spin and reveal random numbers. ๐ŸŽฒโœจ

  • The front face shows the result of your roll ๐Ÿฅณ
  • The other faces are randomized, creating a truly unique dice experience!

You can also customize the cube's animation. Want it to spin forever? Or just do a quick 360? ๐ŸŽก


๐ŸŽจ Styles & Animations

Tiny Dices comes with cool animation effects and customizable styles. From spin effects to face transformations, the dice will roll in style. โœจ

  • Spin it Infinite!: Watch the dice spin forever for an endless feeling of anticipation! ๐Ÿ”„
  • Spin it Custom: You can control how the dice rotate with custom animations. Rotate along different axes for the coolest effects! ๐Ÿ”ฎ

๐Ÿšจ Don't Forget

Remember to check out the Tiny Dices Docs for more detailed instructions and advanced features! ๐Ÿ“


๐Ÿ“ฃ Credits

This project was created by Yasmin Seidel (JasminDreasond) with some extra help from ChatGPT. Tiny thanks to everyone contributing to the open-source community! ๐Ÿ’–


License ๐Ÿ“œ

This project is licensed under the GPL-3.0 License โ€“ feel free to use and customize it for your own projects! ๐Ÿ› ๏ธ


๐Ÿš€ Let's roll those tiny dice! ๐ŸŽฒ


๐Ÿ”™ Back to Tiny Essentials

Did you like this module? Itโ€™s part of the Tiny Essentials collection โ€” a set of minimal yet powerful tools to make development easier. ๐Ÿ‘‰ Click here to explore more Tiny Essentials modules