/pixijs-basic-button

Interactive button library for pixi.js

Primary LanguageTypeScriptMIT LicenseMIT

pixijs-basic-button

Interactive button library for pixi.js

MIT License CI Maintainability Test Coverage

ReadMe Card

Demo

Demo Page

Getting Started

Install

pixijs-basic-button depend on pixi.js

npm install pixi.js --save-dev

and

npm install @masatomakino/pixijs-basic-button.git --save-dev

Import

pixijs-basic-button is composed of ES6 modules and TypeScript d.ts files.

At first, import classes.

import { BasicClickButton } from "@masatomakino/pixijs-basic-button";

Add to stage

import { Assets, Sprite } form "pixi.js"

await Assets.load(bitmapURL);
const button = new BasicClickButton({
  normal: Sprite.form(bitmapURL),
});
stage.addChild(button);

API documents

License

MIT licensed.