eriksom / gamestats Goto Github PK
View Code? Open in Web Editor NEWJavascript performance monitor / game stats library inspired by Unity's graphy
Javascript performance monitor / game stats library inspired by Unity's graphy
So, you can't use it with strict TS
stats.enableExtension('pixi', [PIXI, app]);
Doing this will prevent parts of Pixi from being tree-shaked when using a module bundler. It's a shame since not much from Pixi is needed, only this small enum https://github.com/pixijs/pixi.js/blob/e4d574395aeac5ba0a89b52a47528126bcba529f/packages/constants/src/index.ts#L173-L182
Some solutions:
@pixi/constants
as a dependency. When I tried it, the whole dependency was imported (not only FORMATS
). Pixi will need to add pure annotations to avoid that. In the meantime it would needlessly increase the size of this lib (perhaps terser could help though?).@pixi/constants
as an optional peer dependencies. It works well, however it breaks if the user is not using a bundler, as in the example.Typo on line 86 of pixi-extension.js
incorrectly calculates buffer usage in MB.
https://github.com/ErikSom/gamestats/blob/main/src/pixi-extension.js#L86
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.