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

stageTimer in intro/exit stages #891

Open
JamesPHoughton opened this issue Sep 5, 2024 · 1 comment
Open

stageTimer in intro/exit stages #891

JamesPHoughton opened this issue Sep 5, 2024 · 1 comment

Comments

@JamesPHoughton
Copy link
Collaborator

JamesPHoughton commented Sep 5, 2024

We'd like to have something akin to the stageTimer for intro and exit stages, to show/hide elements, log durations, etc. We want this to be persistent across re-renders and page refreshes, but not persist across experiment sessions.

One way to do that would be that when a GenericIntroExitStep is loaded, save the current stage start time to localstorage (or the player object?) and reset that value when the step changes. (so maybe also set the current intro timer stage name)

@JamesPHoughton
Copy link
Collaborator Author

Setting player.set("localStageStartTime", Date.now()) in the GenericIntroExitStep, and forcing the same to unknown when in game steps. Make this only happen the first render of the stage by manually updating and tracking the progressLabel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant