JSPM

@headless-game-engine/clock

0.2.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5
  • Score
    100M100P100Q24518F
  • License MIT

A minimalistic, framework-agnostic JavaScript game engine.

Package Exports

  • @headless-game-engine/clock
  • @headless-game-engine/clock/dist/index.js
  • @headless-game-engine/clock/dist/index.mjs

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@headless-game-engine/clock) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Headless Game Engine - Clock

A minimalistic, framework-agnostic JavaScript game engine.

This is the clock package for the Headless Game Engine.

This package used to run the game engine in a fixed timestep, together with other time related utilities.

Contains

  • Clock
  • Time
  • EngineClock

Clock is a wrapper for setInterval, with the difference being that it calls the callback at the beginning of the interval without waiting.

Time is a static class that holds the data needed for the EngineClock to run, for example the tick rate.

EngineClock makes use of the clock and runs the game engine in a fixed timestep according to Time.tickRate.