Comments (3)
import Stats from 'stats.js';
import { PIXIHooks, StatsJSAdapter } from 'gstats';
window.Stats = Stats; // gross, but needed by gstats
const pixiHooks = new PIXIHooks({
renderer: renderer,
});
const stats = new Stats();
const statsAdapter = new StatsJSAdapter(pixiHooks, stats);
stats.showPanel(0); // 0: fps, 1: ms, 2: mb, 3+: custom
document.body.appendChild(stats.dom);
This is an example taken from my code. Relying on window
is ugly but since I only use gstats
in my dev builds I do not care too much.
Since getkey's PR has been merged
This one #2 hasn't been merged yet.
getkey/gstatsjs has issues closed, which is why I'm creating the issue here.
My bad, I don't know why I closed them, in any case I reopened them now. 😄
from gstatsjs.
Ok, i dont know what happened, i'd not published a NPM library for v5.
You can run PR from getkey repository :)
And i checking it.
from gstatsjs.
resolved my issues, closing. Thanks
from gstatsjs.
Related Issues (3)
- Pixi v5 support HOT 3
- Details about DrawPasses HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gstatsjs.