phixi
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

phixi.js

Bridge library to use pixi.js like phina.js

Install

npm i phixi pixi.js phina.js

npm v6.9+ required

Features

pixi.js extension

const app = new PIXI.Application();
const sprite = PIXI.Sprite.from("./assets/player.png");

// pixi.js only
sprite.position.set(128, 128);
sprite.anchor.set(0.5, 0.5);
app.stage.addChild(sprite);
// When removing
app.stage.removeChild(sprite);

// With phixi
sprite
  .setPosition((128, 128)
  .setOrigin(0.5, 0.5)
  .addChildTo(app.stage)
;
// When removing
sprite.remove();

Using phina.js features

const sprite = PIXI.Sprite.from('./assets/player.png');

// phina.js Tweener feature
sprite.tweener
  .clear()
  .to({ x: 256 })
  .call(() => console.log('end'));

phina-like app cycle

// TODO

License

MIT

Other features

  • Typescript typing supported

/phixi/

    Package Sidebar

    Install

    npm i phixi

    Weekly Downloads

    4

    Version

    0.1.0

    License

    MIT

    Unpacked Size

    237 kB

    Total Files

    49

    Last publish

    Collaborators

    • pentamania