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

yume.js

v0.0.1

Published

yume.js: make 3D animated comics on your mobile phone

Readme

Yume.js: make comics on your mobile device.

Yume.js builds on top of the excellent P5.js library and makes it easy to create shareable and hackable 3D (WebGL) comics from your mobile device.

Getting started

Use the builder to play with comics from your mobile device.

Why?

It is (was) too hard to make comics on my mobile phone: writing JavaScript and CSS animations and HTML is impossible. So, I wrote a JavaScript library that parses a declarative HTML based comic language. Along the way, a data-driven option emerged as well.

How it works

At first glance, I thought making a declarative comic language like this would be the ticket:

    <script src="//cdnjs.cloudflare.com/ajax/libs/p5.js/0.5.3/p5.js"></script>
    <script src="yume.js"></script>

    <div id="script">
      <yume:scene duration="5" camera="30,50,-100">
	<yume:caption>This is not a monitor, it is a 3D image of one.</yume:caption>
	<yume:character src="monitor"/>
      </yume:scene>
    </div>

    <script>
      var yume = new Yume();
      yume.parse( "#script" );
      yume.setup();
    </script>

This works: it creates a comic with a single scene, a floating monitor (from a 3D image file) in the center of the screen, and animates the camera from 0,0,0 to 30,50,-100 over five seconds. Then, it displays a caption that says "This is not a monitor, it is a 3D image of one." A declarative language like this means you can write comics inside Markdown files in a Jekyll blog (hosted for free on GitHub) using the open source GitHub editor for Android.

As a side effect of building this parser, I needed to convert the HTML into an intermediate data format. That format is exposed too, so if you prefer to use JSON to define your comic, you could do this.

var data = {};
data.models = [];
data.duration = 10;
data.models.push( { name: "man", rotate: { y: 327 },
                    position: { x: 40, y: 100, z: 150 } } );
data.camera = { x: 100, y: 30, z: -150 };
data.caption = "When I became a software developer twenty years ago, I told myself I would never become that guy: chained to my desk, immovable, uptight, angry. CYNICAL!";

var scenes = [];
scenes.push( data );
var yume = new Yume();
yume.load( scenes );
yume.setup();

You could of course pull from a remote source, and convert from JSON into the data too.

Todo

  • [ ] Load large models in background (make comics appear to load faster).
  • [ ] Specify when captions display instead of at the end of the scene duration.
  • [ ] Add support for model rotations over duration in scene
  • [ ] Add support for model movement over duration in scene
  • [ ] Add annotations for thought and speech bubbles to models.
  • [ ] Add annotations as plugins: enhance models with animated stars, etc.
  • [ ] Specify any jQuery.easing functions if you have that library loaded.
  • [ ] Add support for primitive shapes: torus, etc.
  • [ ] Is rigging possible with models?

Adding models

If you want to add new models first find a model (search google for 3d model obj <character>), and then, choose one of two options: fork this repository and add the model to your repository OR issue a pull request to this repository with the new model.

In either case, you should update the builder.html file to include the new model (the select tag, just use the name without the .obj extension).

You might also need to trim the model down. I found that models about 200KB or less work well. If your model is bigger than that, you could use a tool like https://github.com/jonnenauha/obj-simplify to reduce the size of the model.