Stage Clock

<script src="./point_src/stage-clock"></script>

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 ()

  • ClassDeclaration
    class comments:
    The default delta is _one frame_ at 60fps. This is later updated - but is required early for mounted _fps_ tests.
    • property

      tick

      from class_name
      dict_keys(['kind', 'word', 'computed', 'static', 'value', 'type', 'pos'])
    • property

      delta

      = (1000 / 60)
      from class_name
      dict_keys(['kind', 'word', 'computed', 'static', 'value', 'type', 'pos'])
    • property

      prevStamp

      from class_name
      dict_keys(['kind', 'word', 'computed', 'static', 'value', 'type', 'pos'])
    • constructor

      constructor

      (
      stage
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])

      console.log(c.delta)

    • get

      fps

      (
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])

      return 1000 / this.delta

    • method

      splitSeconds

      (
      seconds = 1 , fps
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
    • method

      frameStepValue

      (
      seconds = 1
      )
      from class_name
      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
      
    dict_keys(['kind', 'word', 'parentName', 'type', 'body', 'comments', 'pos'])
  • ExpressionStatement

    :

    dict_keys(['type', 'expression', 'pos'])
  • ExpressionStatement

    :

    dict_keys(['type', 'expression', 'pos'])