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

ember-cli-pixijs

v0.0.2

Published

An Ember CLI Addon that wraps pixi.js

Downloads

6

Readme

Build Status

ember-cli-pixijs

ember-cli-pixijs wraps the pixi.js HTML5 2D rendering engine so that it can easily be used in Ember.js applications:

import PIXI from 'pixi';

It also defines a PixiCanvas component that can be used to display canvases rendered with pixi.js in Ember.js applications. The component handles creating a pixi.js renderer, inserting the canvas into the DOM and replacing it when the dimensions change. Whenever the canvas is (re-)rendered, the component's draw method is called that handles the actual drawing with pixi.js.

A concrete subclass of the PixiCanvas component might look sth. like this:

// app/components/my-pixi-component.js
import PIXI from 'pixi';
import PixiCanvas from 'ember-cli-pixijs/components/pixi-canvas';

export default PixiCanvas.extend({
  draw() {
    const renderer = this.get('pixiRenderer');
    const stage = new PIXI.Container();

    const graphics = new PIXI.Graphics();

    // set a fill and line style
    graphics.beginFill(0xFF3300);
    graphics.lineStyle(10, 0xffd900, 1);

    // draw a shape
    graphics.moveTo(50, 50);
    graphics.lineTo(250, 50);
    graphics.lineTo(100, 100);
    graphics.lineTo(250, 220);
    graphics.lineTo(50, 220);
    graphics.lineTo(50, 50);
    graphics.endFill();

    stage.addChild(graphics);
    
    renderer.render(stage);
  }
});

Installation

Installing the addon is as easy as:

ember install ember-cli-pixijs

License

ember-cli-pixijs is developed by and © simplabs GmbH/Marco Otte-Witte and contributors. It is released under the MIT License.

ember-cli-pixijs is not an official part of Ember.js and is not maintained by the Ember.js Core Team.

pixi.js is developed by and © Mathew Groves.