stats-rs
TypeScript icon, indicating that this package has built-in type declarations

0.1.3 • Public • Published

Webassembly Performance Monitor

Stats is a webassembly version of stats.js written in Rust.

This crate provides a simple info box that will help you monitor your code performance, and can be used either Javascript code or in Rust code.

  • FPS Frames rendered in the last second. The higher the number the better.
  • MS Milliseconds needed to render a frame. The lower the number the better.

Examples

In Javascript

Install the stats-rs package by using npm or yarn

yarn add stats-rs

or

npm install stats-rs

And insert the snipped code below to your application

const wasm = import('stats-rs');

wasm.then(({ Stats }) => {
  const stats = Stats.init();
  stats.attach(document.body);

  function render() {
    stats.update();
    requestAnimationFrame(render);
  }

  render();
});

Rust

// TODO

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.3
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.3
    1
  • 0.1.2
    0
  • 0.1.1
    0
  • 0.1.0
    0

Package Sidebar

Install

npm i stats-rs

Weekly Downloads

1

Version

0.1.3

License

MIT

Unpacked Size

72.5 kB

Total Files

6

Last publish

Collaborators

  • anhmv