Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Gets data about where the user is looking, passes it to the optional callback function (if provided), and returns it.

Parameter:

  • callback (function): (OPTIONAL) A callback function to execute. It will be passed an object with the following attributes automatically:

    • pan (number): The pan (ie, left or right shift) of where the user is facing in the current sphere

    • tilt (number): The tilt (ie, up or down shift) of where the user is facing in the current sphere

Returns: A promise that resolves to the same object that is passed to the callback.

Code Sample

Iframe
src//jsfiddle.net/AerialSphere/y73ut6bs/embedded/js,html,css,result/dark/
width90%
framebordershow
height360px