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

0.0.14 • Public • Published

Pixil

Wrapper engine for pixi.js

Documentation can be found here

Usage

npm i pixil
import { App, View, Label, Button } from 'pixil'
 
const app = new App({ antialias: true })
 
document.body.appendChild(app.view)
 
const splash = new View(0, 0)
const game = new View()
 
app.views.add('SPLASH', splash)
app.views.add('GAME', game)
 
const startButton = new Button({ text: 'Press me', width: 250, height: 60, radius: 30 })
splash.addChild(startButton)
startButton.onClick(() => {
    app.views.hide('SPLASH')
    app.views.show('GAME')
})
 
const gameText = new Label('It Works!!!', { fill: '#ffffff' }, 50, 50)
game.addChild(gameText)

Readme

Keywords

Package Sidebar

Install

npm i pixil

Weekly Downloads

11

Version

0.0.14

License

ISC

Unpacked Size

53.4 kB

Total Files

38

Last publish

Collaborators

  • cyberdex