Nonstop Pajama Models

    fps-indicator

    1.3.0 • Public • Published

    fps-indicator stable

    Micro fps indicator for demo/tests.

    fps-indicator

    Usage

    npm install fps-indicator

    const createFps = require('fps-indicator');
    let fps = createFps();

    API

    var fps = createFps(container|options?)

    Create fps indicator from position string or options object:

    Option Description
    container Selector or element to append, by default document.body.
    period Update period in ms, defaults to 500.
    max Max value of FPS, corresponding to upper bound, default is 90.
    color Color of indicator, by default is inherited.
    position top-left, top-right, bottom-left (default), bottom-right.
    style CSS style string or css object. Eg. fps({style: 'padding: 20px; text-shadow: 0 0 2px black'})

    Similar

    stats.js — oldschool fps meter for apps, no colors customization.
    fpsmeter — good-looking fps meter, but no npm package.

    Install

    npm i fps-indicator

    DownloadsWeekly Downloads

    272

    Version

    1.3.0

    License

    MIT

    Unpacked Size

    6.75 kB

    Total Files

    5

    Last publish

    Collaborators

    • dfcreative