https://github.com/cyberdex/pixil
Wrapper engine for pixi js
https://github.com/cyberdex/pixil
Last synced: over 1 year ago
JSON representation
Wrapper engine for pixi js
- Host: GitHub
- URL: https://github.com/cyberdex/pixil
- Owner: CyberDex
- Created: 2020-04-25T09:46:15.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2021-01-26T15:27:16.000Z (over 5 years ago)
- Last Synced: 2025-02-08T17:03:06.820Z (over 1 year ago)
- Language: TypeScript
- Size: 573 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Pixil
Wrapper engine for [pixi.js](https://github.com/pixijs/pixi.js)
Documentation can be found [here](https://cyberdex.github.io/pixil/)
## Usage
```
npm i pixil
```
```javascript
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)
```