Predefined Variables

Predefined variables are a set of variables that are accessible anywhere. They automatically change dynamically as they always store the latest value.

For example, the value of $mouseX will always change depending on wherever the cursor finds itself. So, if the cursor moves, the value of $mouseX changes automatically.

Learn more about using variables.

  • $mouseXx-coordinate of the cursor.
  • $mouseYy-coordinate of the cursor.
  • $touchXx-coordinate of where a touch is registered.
  • $touchYy-coordinate of where a touch is registered.
  • $touchVelocityVelocity of a touch using a finger or mouse that is in movement.
  • $touchVelocityXx-component of the velocity of a touch using a finger or mouse that is in movement.
  • $touchVelocityYy-component of the velocity of a touch using a finger or mouse that is in movement.
  • $touchPointerCountNumber of fingers touching the screen.
  • $keyboardHeightHeight of a native keyboard on a smart device when it is visible. Learn more about the input layer.
  • $deviceOSOperating system of the device the prototype is running on.
  • $piPi (3.141592).
  • $timeTime (seconds) passed since the prototype started. If you want to know the time passed since a certain event, assign the time when the event occurs to a variable and deduct it from $time.
  • $voiceTranscriptIncoming speech whenever listening to voice commands is enabled. Learn more about voice prototyping.
Back To Top