Jet Link Simulations

Jet Link Simulations

  • Docs
  • API Reference
  • Help

GameEngine

Manages the game loop / ticker, and system tickers.

JLS.engines.GameEngine

class GameEngine

    // Implementation example
    import { GameEngine } from 'path/to/engines'


    GameEngine.register(sayHello) // will execute at 60x/sec

    function sayHello() {
        console.log('Say Hello')
    }

Members

callbacks

A list of all registered functions.

Methods

ticker() static

Retrieves the shared ticker.

FPS() static

Gets the frames per second (FPS) of the ticker.

deltaTime() static

Gets the delta time, which is the elasped time since the last frame to this frame. Returns a scalar time.

deltaMS() static

Gets the delta time in milliseconds, which is the elasped time since the last frame. Returns milliseconds.

register(func) static

Registers a function to run at the current ticker speed / rate.

parameters

NameTypeDefaultDescription
funcfunction---the function to execute on each flight loop.

start() static

Starts the shared ticker.

stop() static

Stops the shared ticker.

  • class GameEngine
  • Members
    • callbacks
  • Methods
    • ticker() static
    • FPS() static
    • deltaTime() static
    • deltaMS() static
    • register(func) static
    • start() static
    • stop() static
Jet Link Simulations
Docs
Getting StartedGuidesAPI Reference
Community
User ShowcaseStack OverflowProject ChatTwitter
More
BlogGitHubStar
Copyright © 2020 Name or Your Company Name