Skip to content

Backgroundable rendering #237

@akre54

Description

@akre54

Hubble currently relies on Luma's Timeline and AnimationLoop classes which utilize the browser's requestAnimationFrame timer.

This is higher-precision and more realtime than alternatives (notably setTimeout) but requires that the tab be foregrounded in order for the timer to fire. The AnimationLoop class also, as far as I can tell, utilizes "wall time" to update animation state (i.e. Date.now for engineTime) instead of rendering frame-by-frame.

Because browsers only throttle timers running in the main thread and not on Worker threads, it should be possible to use a package like worker-timers to ensure that timers are always rendered.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions