You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@types/stats.js

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/stats.js

TypeScript definitions for stats.js

0.17.4
ts5.1
ts5.2
ts5.3
ts5.4
ts5.5
ts5.6
ts5.7
ts5.8
ts5.9
latest
Source
npmnpm
Version published
Weekly downloads
807K
0.16%
Maintainers
1
Weekly downloads
 
Created
Source

Installation

npm install --save @types/stats.js

Summary

This package contains type definitions for stats.js (https://github.com/mrdoob/stats.js).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/stats.js.

index.d.ts

declare class Stats {
    constructor();

    REVISION: number;
    dom: HTMLDivElement;

    addPanel(panel: Stats.Panel): Stats.Panel;

    /**
     * @param value 0:fps, 1: ms, 2: mb, 3+: custom
     */
    showPanel(value: number): void;

    begin(): void;
    end(): number;
    update(): void;

    // Backwards Compatibility

    /**
     * @deprecated Use `dom` instead.
     */
    domElement: HTMLDivElement;

    /**
     * @deprecated Use `showPanel` instead.
     */
    setMode(value: number): void;
}

declare namespace Stats {
    class Panel {
        constructor(name: string, foregroundColor: string, backgroundColor: string);
        dom: HTMLCanvasElement;
        update(value: number, maxValue: number): void;
    }
}

declare module "stats.js" {
    export = Stats;
}

Additional Details

  • Last updated: Mon, 05 May 2025 20:35:19 GMT
  • Dependencies: none

Credits

These definitions were written by Gregory Dalton, Harm Berntsen, and Dan Vanderkam.

FAQs

Package last updated on 05 May 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts