Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: scene state #26

Open
Gugustinette opened this issue Oct 14, 2024 · 0 comments
Open

feat: scene state #26

Gugustinette opened this issue Oct 14, 2024 · 0 comments

Comments

@Gugustinette
Copy link
Contributor

Gugustinette commented Oct 14, 2024

Add some utilities for loading a scene :

  • A scene should have a state
    export enum FSceneState {
      RUNNING = 'Running',
      LOADING = 'Loading',
      PAUSED = 'Paused'
    }
  • It is RUNNING by default
  • Pause/Resume workflow :
    • The scene can be paused and resumed with pause and resume methods
    • Paused scene stop computing every frame on the main loop and stop firing collisions events
  • Loading workflow :
    • LOADING has technically the same effect as PAUSED
    • If a lockLoading method is used on the scene, it turns into the LOADING state
    • Components can be safely added to the scene
    • unlockLoading can be called, which will wait for all the components to be loaded before starting the main loop again
    • The scene goes back to RUNNING
@Gugustinette Gugustinette converted this from a draft issue Oct 14, 2024
@Gugustinette Gugustinette changed the title feat: add loading utilities feat: scene state Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

1 participant