TimeData
此内容尚不支持你的语言。
Defined in: ecs/resource.ts:278
The frame’s clock, as Time carries it. delta is what almost
everything integrates by — it is already multiplied by scale, so honouring a
pause costs a system nothing.
Properties
Section titled “Properties”delta:
number
Defined in: ecs/resource.ts:280
Seconds since the previous frame, scaled by scale.
elapsed
Section titled “elapsed”elapsed:
number
Defined in: ecs/resource.ts:282
Seconds since the app started.
fixedAlpha
Section titled “fixedAlpha”fixedAlpha:
number
Defined in: ecs/resource.ts:293
Interpolation factor in [0, 1) into the current fixed step (fixedAccumulator / fixedDelta), set after the fixed-update loop each frame. Render-time systems lerp prev→current state by this to smooth fixed-step simulation (e.g. physics) onto the variable render rate.
fixedDelta
Section titled “fixedDelta”fixedDelta:
number
Defined in: ecs/resource.ts:286
Fixed-update timestep in seconds — the FixedUpdate / physics cadence.
fixedTick
Section titled “fixedTick”fixedTick:
number
Defined in: ecs/resource.ts:299
Monotonic count of completed FixedUpdate steps — the simulation’s own time axis (frameCount counts render frames, which vary per machine). Netcode stamps snapshots and input commands with this.
frameCount
Section titled “frameCount”frameCount:
number
Defined in: ecs/resource.ts:284
Render frames completed — machine-dependent; see fixedTick.
scale:
number
Defined in: ecs/resource.ts:310
Multiplier on delta and on the fixed-step accumulation; negatives clamp
to 0. At 0 the frame still runs — systems tick and a menu draws — while
everything advancing by delta (movement, navigation, behaviour trees,
the physics step) advances by nothing.
Read once at the top of the frame, before any system runs, so a write
takes effect from the next frame: a game that pauses in Update
integrates that frame in full and freezes from the one after.
unscaledDelta
Section titled “unscaledDelta”unscaledDelta:
number
Defined in: ecs/resource.ts:312
Real frame time, unaffected by scale, for whatever must keep moving.