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

pixi-plugin-example

v2.0.0

Published

Example of PixiJS plugin

Downloads

5

Readme

PixiJS plugin example

Build npm version

This is a demo project with collection of simple hacks for PixiJS.

You can make your own pixi plugin based on this repo.

Algorithms represented in this repo hack several parts of Pixi - you can take those ideas and expand them.

If you are that desperate, you can add use it through npm pixi-plugin-example:'=version', because we do not guarantee any back compatibility! This is not a plugin, its a tutorial!

How to make your own plugin for PixiJS

People will like the fact that you want to ease their life with with one line

import 'pixi-awesome-plugin'

Follow the steps:

  1. Clone repo locally
  2. Create your own repository and copy all the code there
  3. Remove folders from src, except those you want to use as base for plugin
  4. Remove everything from examples, leave examples that is close to what you want
  5. Put your code in src , example in examples, test that it works
  6. Replace all pixi-plugin-example in package.json to your plugin name
  7. Change version to 0.1.0 or whatever you want
  8. Change UMD namespace and file names in examples accordingly
  9. Make sure you use only necessary pixi plugins in peerDependencies and devDependencies, they have to be the same!
  10. Add/Remove GlobalMixins from global.d.ts to hack pixi interfaces
  11. Check that project builds
  12. Start web server here (like http-server -c-1) and check that example works
  13. Write a README, and publish your plugin to npm!

Extra tips:

  1. When you make changes and want to re-publish, you can use npm run release:patch to change version of lib.
  2. If you reference @pixi/layers or some other plugins, change rollup.config.js accordingly, otherwise they'll be compiled inside your lib
  3. remove all "lint"-related commands from package.json if you don't like our code style or it obstructs you
  4. Contact Ivan to add your plugin to PixiJS Wiki

List of demos

  1. filters changing FilterSystem for profit

That's enough for now :)

How to build

npm i
npm run build

Vanilla JS, UMD build

All pixiJS v6 plugins has special umd build suited for vanilla. Navigate pixi-plugin-example npm package, take dist/pixi-plugin-example.umd.js file.

<script src='lib/pixi.js'></script>
<script src='lib/pixi-plugin-example.umd.js'></script>

Also, you can access CDN link, something like https://cdn.jsdelivr.net/npm/pixi-plugin-example@latest/dist/pixi-plugin-example.umd.js

all classes can be accessed through PIXI.example package.

How to contribute

Just make PR.