Skip to content

@vaguevoid/fiasco / ecs/resources / FrameConstants

Class: FrameConstants

Defined in: src/ecs/resources.ts:666

FrameConstants provide information about the current frame.

  • Delta delta: The time since the previous frame (in seconds).
  • Frame Rate frameRate: The amount of frames per second.
  • Ticks ticks: The count of frames since the game has started.
ts
import type { FrameConstants } from '@vaguevoid/fiasco'

function system(frame: FrameConstants) {
  console.log(frame.delta) // 0.016
}

Extends

Accessors

delta

Get Signature

get delta(): number

Defined in: src/ecs/resources.ts:688

Delta time in seconds.

Returns

number


frameRate

Get Signature

get frameRate(): number

Defined in: src/ecs/resources.ts:695

The amount of frames per second.

Returns

number


ticks

Get Signature

get ticks(): number

Defined in: src/ecs/resources.ts:702

Total ticks since the game has started.

Returns

number

Methods

deserialize()

deserialize(bytes): boolean

Defined in: src/ecs/resources.ts:70

Parameters

bytes

Uint8Array

Returns

boolean

Inherited from

Resource.deserialize


serialize()

serialize(): Uint8Array

Defined in: src/ecs/resources.ts:65

Returns

Uint8Array

Inherited from

Resource.serialize