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 🙏

© 2024 – Pkg Stats / Ryan Hefner

dynamic-avatar-drawer

v1.34.2

Published

procedural avatar drawing for JavaScript based games

Downloads

23

Readme

live tester / playground

documentation / updates

Function

Model and View for characters in Javascript-enabled games and stories.

It provides:

  • procedural drawing of characters and clothing
  • inventory management and clothing layering
  • facial expression system
  • mixing body parts (e.g. elf ears on human head)
  • missing body parts (e.g. hand was cut off)
  • smooth animation for transformations as a result of stat changes
  • interface for defining custom stats and mapping those to appearance dimensions

Usage

There are 3 ways to use this library:

  1. Include the packaged da.js file (under dist/da.js) in your project and call methods on the global da module (simplest use case for simplest projects)
  2. Import JavaScript ES6 modules (under dist-esm) in your modules, then bundle using a tool like webpack (suitable for larger JavaScript projects)
  3. Import TypeScript modules (under src) in your TypeScript code, then transpile with tsc and bundle using a tool like webpack (recommended; suitable for larger TypeScript projects; also gives you typing information)

See top for link to usage and content creation guide. For an API reference, see the ref directory of this repository or the link above.

Use the playground to generate live code and see their effects.

For development, you'll need to install some dependencies. First install the latest version of node and npm

Then open a console, navigate to the project root directory, then run

npm install

For development, run

npm run start

To start a webdev server that will launch the demo, listen for file changes, recompile on file changes, and refresh the demo after it's done recompiling.

For building public/da.js for release/production, run

npm run build

Local website build

Set up dependencies

  1. install the latest version of ruby
  2. install rubydevkit and point to the previous installation of ruby
  3. navigate to portfolio root directory with git bash
  4. gem install bundler
  5. bundle install

Run local server

  1. bundle exec jekyll serve

Writing documentation

  1. write content in markdown inside the src directory (see examples in there)
  2. node doc_src/build.js <path to markdown source inside doc_src/>
    • will automatically generate and move the resulting HTML file into the doc directory

Markdown language extensions

Put asides in a block of text starting with >> or >>> for more important notes, like:

>> This is an aside.
This is still part of the aside.

No longer part of the aside