1.0.5 • Published 6 years ago

three-webgl-stats v1.0.5

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

three-webgl-stats

Forked from https://github.com/jeromeetienne/threex.rendererstats

Fixed version of this

How To install it

Via yarn:

yarn add three-webgl-stats

Via npm:

npm install three-webgl-stats --save

How To Use It

import RendererStats from 'three-webgl-stats';
const rendererStats = new RendererStats();

position it on the page with css with something along this line:

rendererStats.domElement.style.position	= 'absolute'
rendererStats.domElement.style.left	= '0px'
rendererStats.domElement.style.bottom	= '0px'
document.body.appendChild( rendererStats.domElement )

finally update it at every frame, passing the webGLRenderer reference:

rendererStats.update(renderer);

update it without passing anything (or passing something falsy) to reset the displayed output:

rendererStats.update(null);