Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/stats.js

Package Overview
Dependencies
Maintainers
1
Versions
6
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.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
307K
decreased by-25.83%
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

// Type definitions for Stats.js 0.17.0
// Project: https://github.com/mrdoob/stats.js
// Definitions by: Gregory Dalton <https://github.com/gregolai>,
//                 Harm Berntsen <https://github.com/hberntsen>,
//                 Dan Vanderkam <https://github.com/danvk>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

declare class Stats {
    constructor();
    REVISION: number;
    dom: HTMLDivElement;

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

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

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, 25 Sep 2023 13:39:06 GMT
  • Dependencies: none
  • Global values: Stats

Credits

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

FAQs

Package last updated on 25 Sep 2023

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc