Stage Clock
The stage clock assigns additional clock
functionality to the Stage, such as an fps() method:
stage = new Stage
stage.clock.fps() // 59
Meta Data
| title | Stage Clock |
| dependencies | () |
| unused_keys | () |
| unknown_keys | () |
| filepath_exists | True |
| path | stage-clock |
| filepath | stage-clock.js |
| clean_files | () |
-
ClassDeclarationclass
StageClock
extends Noneclass comments:The default delta is _one frame_ at 60fps. This is later updated - but is required early for mounted _fps_ tests.-
dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])Derive the correct value to add per frame, to ensure a count the total value at the target count of seconds is equal to 1. let v = frameStepValue(3) // 0.005 // Add this value per frame total += v // At 3 seconds, this total == 1
ExpressionStatement:
dict_keys(['type', 'expression', 'pos'])ExpressionStatement:
dict_keys(['type', 'expression', 'pos'])