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

gown

v0.1.6

Published

gown.js provides basic UI components for Pixi.js. Inspired by feathers UI

Readme

gown.js

UI system for pixi.js 4, inspired by feathers-ui.

Inline docs Code Climate Build Status

Features

  1. Basic UI components

    • Button: simple Button, with label and background, easy to extend using themes
    • CheckBox a simple checkbox
    • ToggleButton: a button with pressed state
    • Slider a simple slider with modifyable start and end value
  2. Layouting

    • LayoutGroup: a component to create horizontal, vertical or tile-based layouts
  3. Scrollable container

    • ScrollContainer: provides a viewport that can be scrolled using mouse or touch gestures. When its content is a LayoutGroup the scroll behavior will be dependent on its layout: a horizontal layoutgroup will default to horizontal scrolling, vertical layout to vertical scrolling. But you are in control and can manually overwrite the scroll behavior.
    • ScrollBar: providing a scroll thumb that can be moved. Part of ScrollContainer and List, but can be used separately.
  4. A Text input providing text and password input (based on PIXI Input )

  5. Basic shapes that provide width and height that can be changed easily (for use in themes for example)

Examples

see the examples-folder in this repo or play with some example online at: http://greyrook.github.io/gown-examples/

Folder structure

  • examples - simple examples to show the usage (and to have something more graphical besides the jasmine-tests)

  • lib - required libraries (just pixi-dev)

  • src - source code for gown.js

  • test - unit tests, run coverage_karma_istanbul.sh to get a table providing all files and their coverage, run coverage_blanket to start a web server that shows you the coverage for all lines of the generated browserify output file.

  • themes - basic UI example themes

  • AeonTheme.js A theme based on Feather's AeonDesktopTheme making use of 9-tiled images

  • MetalWorksDesktopTheme.js a theme based on Feather's MetalWorksDesktopTheme

  • Themes/ShapeTheme.js a theme using only basic shapes.

Installation

  1. Check out the repository from the GreyRook/gown github repository.
  2. Install node.js (if its not even installed).
  3. Change into the path for the checked out repository and run npm install
  4. run npm run dist to build the library (it will be in docs/dist )
  5. start a webserver e.g. python -m SimpleHTTPServer to show the examples ( find them at /docs/examples/ )

Theming

  • Using the python script themes/xml_to_json.py you can convert your XML file from feathers-ui into JSON so the default PIXI loader can parse it.

  • example:

python xml_to_json.py assets/aeon/aeon_desktop.xml

the script requires PIL (or Pillow) to determine the texture width/height

  • It is possible to have different themes in one project
  • Themes can be switched at run time
  • For reference how to create your own theme check the themes folder. It contains two different approaches on creating themes
  • The test/src/TestTheme.js is a fake theme used only for the unit tests

Under the hood

Center of the theming system is the "skins"-object. It holds unique names of different controls as key (e.g. "button" as identifier for GOWN.Button) and nested objects as value. These nested objects allow you to save different graphics for different skins (e.g. "down" when the user pressed a button down). The graphic for the state can be an images but also any kind of shape (you can set everything that can be added to a PIXI-DisplayObjectContainer as skin). It is important that the variable width/height of your skin can be changed so your skin can be layouted correctly. Every control need its own instance for the skin, so you have to wrap it in a function that creates a new instance of the skin.

In short, the skins-object looks like this: theme.skins = {<control>: {<state>: function () { new <skin>() } }}

Rendering

When changing a component the corresponding setter updates an invalid flag. This will force a redraw on the next frame. (this can be the recalculation of the position and dimensions or a skin change on user interaction).

The loop looks like this:

  1. redraw (gown)
  2. updateTransform (PIXI)
  3. render (PIXI)

The redraw function is hooked into PIXI's render loop in the updateTranform methond but called before the actual calcluation of updateTransform.

Known Bugs

see Issues