All Projects → eXponenta → gstatsjs

eXponenta / gstatsjs

Licence: GPL-3.0 license
Graphics statistic (DrawCalls and TextureCount) for WebGL

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to gstatsjs

Creature webgl
2D Skeletal Animation WebGL Runtimes for Creature ( PixiJS, PhaserJS, ThreeJS, BabylonJS, Cocos Creator )
Stars: ✭ 140 (+191.67%)
Mutual labels:  phaser, pixijs
Phaser Kinetic Scrolling Plugin
Kinetic Scrolling plugin for Canvas using Phaser Framework
Stars: ✭ 117 (+143.75%)
Mutual labels:  phaser, pixijs
Easygameframeworkopen
基于Typescript的渐进式通用游戏前端开发框架
Stars: ✭ 65 (+35.42%)
Mutual labels:  phaser, pixijs
Phaser State Transition
State transition plugin for Phaser.js
Stars: ✭ 169 (+252.08%)
Mutual labels:  phaser, pixijs
phaser-plugin-game-scale
Scale or resize the game canvas. Phaser v3.15 only
Stars: ✭ 35 (-27.08%)
Mutual labels:  phaser
phaser-cat
A 2D top-down shooting game, built with phaser + box2d plugin
Stars: ✭ 17 (-64.58%)
Mutual labels:  phaser
game-template
Cross-platform project template using Electron and Angular with the Phaser game engine. Project has Flexbox integrated for easy and responsive organization of components around the Phaser canvas.
Stars: ✭ 16 (-66.67%)
Mutual labels:  phaser
fish
Pixi.js 开发微信小游戏示例
Stars: ✭ 37 (-22.92%)
Mutual labels:  pixijs
pixi-game
A library makes Pixi.js using easily.
Stars: ✭ 22 (-54.17%)
Mutual labels:  pixijs
phaser multiplayer demo
HTML5 Multiplayer with Phaser and Go
Stars: ✭ 35 (-27.08%)
Mutual labels:  phaser
anim8js
The ultimate animation library for javascript - animate everything!
Stars: ✭ 33 (-31.25%)
Mutual labels:  pixijs
node-vue-phaser-boilerplate
Boilerplate to get started developing Node.js-server + Vue/Phaser-client online-games, based on Webpack and with Babel/ES2015 support.
Stars: ✭ 25 (-47.92%)
Mutual labels:  phaser
phaser-starter
Minimal starter project to get a Phaser game environment up and running with ease.
Stars: ✭ 73 (+52.08%)
Mutual labels:  phaser
elemental-one
A simple platformer made along the theme of Ludum Dare 28
Stars: ✭ 36 (-25%)
Mutual labels:  phaser
chunks tutorial
Small demo showing how to load and manage tilemap chunks on the fly with Phaser 3
Stars: ✭ 41 (-14.58%)
Mutual labels:  phaser
phaser-plugin-advanced-timing
Shows FPS, frame intervals, and performance info. Phaser 2/CE
Stars: ✭ 25 (-47.92%)
Mutual labels:  phaser
craft
Phaser Library with utility chainable functions
Stars: ✭ 27 (-43.75%)
Mutual labels:  phaser
pixi-webpack-demo
make pixi.js game with webpack and es6+
Stars: ✭ 33 (-31.25%)
Mutual labels:  pixijs
live2d-viewer-web
Web implementation of Live2D Viewer.
Stars: ✭ 42 (-12.5%)
Mutual labels:  pixijs
TooManyCaptains
🕹 Too Many Captains and Not Enough Wire
Stars: ✭ 34 (-29.17%)
Mutual labels:  phaser

NOT LONGER SUPPORTED

Please, use a https://github.com/ErikSom/gamestats/

This is similar lib with gstats core features

gstatsjs

Graphics statistics (Texture count, DrawPasses) for WebGL applications. Capability with stats.js

The library can be found in dist/gstats.js.

Alternatively, if you prefer using it as an ES6 module, you can use this fork that can be installed through NPM:

$ npm install gstats # for npm users
$ yarn add gstats # for yarn users

Remarks

Due to bug of cacheAsBitmap on Graphics on PIXIv4, TextureCounter incorrectly gets the number of textures.

Currently Draw Calls counter can't work on Phaser 3, because Phaser 3 use DrawArrays for rendering WebGL instead DrawElements. Textures amount for Phaser 2 and 3 is relative value, and may be negative.

Examples

PIXI Stats.js example - show PIXI game Draw Calls and Textures Count statistics by Stas.js.

Phaser 2 CE Stats.js example - show Phaser 2 CE game Draw Calls and Textures Count statistics by Stas.js.

Textures amount for Phaser is relative value, and may be negative.

Phaser 3 Stats.js example - show Phaser 3 Textures Count statistics by Stas.js.

How i can destroy sprite in Phaser 3 with its texture ?

Currently DC can't work, because Phaser 3 use DrawArrays for rendering WebGL. Textures amount for Phaser3 is relative value, and may be negative.

Using

PIXI & Stats.js

var app = new PIXI.Application (options);
var pixiHooks = new GStats.PIXIHooks(app);
var stats = new GStats.StatsJSAdapter(pixiHooks);
document.body.appendChild(stats.stats.dom || stats.stats.domElement);
app.ticker.add(stats.update);

Phaser 2/3 & Stats.js

var game = new Phaser.Game(options);
var phaserHooks = new GStats.PhaserHooks(game);
var stats = new GStats.StatsJSAdapter(phaserHooks);
document.body.appendChild(stats.stats.dom || stats.stats.domElement);

//or other update function
function update() {
    stats.update();
}

PIXI/Phaser & Show stats in app context

coming soon...

Raw WebGL & Stats.js

var gl = // WebGL2RenderingContext;
var baseHooks = new GStats.BaseHooks();
    baseHooks.attach(gl);
var stats = new GStats.StatsJSAdapter(baseHooks);

document.body.appendChild(stats.stats.dom || stats.stats.domElement);

//or other update function
function update() {
    stats.update();
}

TypeScript

Go to gstats.d.ts

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].