@xailabs/three-renderer-stats
Fork of https://github.com/jeromeetienne/threex.rendererstats
Last updated 3 years ago by loopmode .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @xailabs/three-renderer-stats 
SYNC missed versions from official npm registry.

@xailabs/three-renderer-stats

FORKED FROM https://github.com/jeromeetienne/threex.rendererstats

  • Allow reset by calling update() without passing renderer
  • Published on npm
  • Fix programs count (~ PR4)

========================================

It is a three.js extension to display realtime informations about THREE.WebGLRenderer. Here is a basic example. It is widely inpired from @mrdoob stats.js. It is released under MIT license.

How To install it

Via yarn:

yarn add @xailabs/three-renderer-stats

Via npm:

npm install @xailabs/three-renderer-stats --save

How To Use It

import RendererStats from '@xailabs/three-renderer-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);

Current Tags

  • 1.0.4                                ...           latest (3 years ago)

2 Versions

  • 1.0.4                                ...           3 years ago
  • 1.0.3                                ...           3 years ago
Downloads
Today 0
This Week 1
This Month 1
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (1)

Copyright 2014 - 2016 © taobao.org |