JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 15
  • Score
    100M100P100Q34697F
  • License MIT

Performance monitor

Package Exports

  • uupaa.perf.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (uupaa.perf.js) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Perf.js Build Status

npm

Performance monitor.

Document

Features

  • Monitoring fps and ms.

Browser and NW.js(node-webkit)

<script src="<module-dir>/lib/WebModule.js"></script>
<script src="<module-dir>/node_modules/uupaa.pagevisibilityevent.js/lib/PageVisibilityEvent.js"></script>
<script src="<module-dir>/node_modules/uupaa.clock.js/lib/Clock.js"></script>
<script src="<module-dir>/lib/Perf.js"></script>
<script>
var options = { parentNode: document.body, x: 100, y: 100, opacity: 0.7 };
var perf = new Perf(options);


function gameLoop() {
    perf.a;
    {
        // --- performance monitor block ---
        // userInput();
        // enemyMove();
        // redraw();
    }
    perf.b;

    requestAnimationFrame(gameLoop);
}

requestAnimationFrame(gameLoop);
</script>