Giter Site home page Giter Site logo

Comments (3)

getkey avatar getkey commented on May 14, 2024 1
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.

eXponenta avatar eXponenta commented on May 14, 2024

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.

AdrienLemaire avatar AdrienLemaire commented on May 14, 2024

resolved my issues, closing. Thanks

from gstatsjs.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.