@types/mainloop.js
TypeScript icon, indicating that this package has built-in type declarations

1.0.7 • Public • Published

Installation

npm install --save @types/mainloop.js

Summary

This package contains type definitions for mainloop.js (https://github.com/IceCreamYou/MainLoop.js).

Details

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

index.d.ts

/**
 * Interface for the MainLoop.js global.
 *
 * See the API documentation for a detailed explanation of these methods:
 * http://icecreamyou.github.com/MainLoop.js/docs/#!/api/MainLoop
 */
interface MainLoop {
    getFPS(): number;
    getMaxAllowedFPS(): number;
    getSimulationTimestep(): number;
    isRunning(): boolean;
    resetFrameDelta(): number;
    setBegin(begin: (timestamp: number, delta: number) => void): MainLoop;
    setDraw(draw: (interpolationPercentage: number) => void): MainLoop;
    setUpdate(update: (delta: number) => void): MainLoop;
    setEnd(end: (fps: number, panic: boolean) => void): MainLoop;
    setMaxAllowedFPS(fps?: number): MainLoop;
    setSimulationTimestep(timestep: number): MainLoop;
    start(): MainLoop;
    stop(): MainLoop;
}

declare var MainLoop: MainLoop;

export = MainLoop;
export as namespace MainLoop;

Additional Details

  • Last updated: Tue, 07 Nov 2023 09:09:39 GMT
  • Dependencies: none

Credits

These definitions were written by Isaac Sukin.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/mainloop.js

Weekly Downloads

41

Version

1.0.7

License

MIT

Unpacked Size

4.22 kB

Total Files

5

Last publish

Collaborators

  • types