1.0.0 • Published 5 years ago

@koreez/pixi-stats v1.0.0

Weekly downloads
7
License
MIT
Repository
github
Last release
5 years ago

npm version styled with prettier

pixi-stats

Pixi Performance Monitor (Textures, Draw Calls) for WebGL applications. Uses stats.js under the hood.

Install

$ npm install @koreez/pixi-stats # for npm users
$ yarn add @koreez/pixi-stats # for yarn users

Using

import { PixiStatsPlugin } from '@koreez/pixi-stats';

PIXI.Application.registerPlugin(PixiStatsPlugin);

class Game extends PIXI.Application {
    public constructor() {
        super({ resizeTo: window, backgroundColor: 0xcdcdcd });
        document.body.appendChild(this.view);
        document.body.appendChild(this.stats.dom);
        this.ticker.add(() => {
            this.stats.update();
        });
    }
}