Skip to main content
Documentation

Camera Movement

Control Five SDK camera movement, rotation, mode, and viewpoint state from Vreo.

Overview

Camera Movement ( CameraMovement ) controls the camera to perform pan, rotation, mode switching, and other capabilities that simulate roaming through a 3D space as if viewing it firsthand.

External Example

The external example contains audio. Open it in an appropriate setting.

Open the Vreo example in CodeSandbox

Field Reference

  • effect: The camera movement effect, of the enum type CameraMovementEffect .
    • CameraMovementEffect.Move: Pan movement.
    • CameraMovementEffect.Rotate: Rotation movement.
  • mode: The mode of the current Five SDK instance.
  • panoIndex: A number indicating the target point you want to move to.
  • loop: A boolean, optional field, indicating whether this movement frame should be played in a loop.
  • rotateSpeed: A number, optional field; the rotation speed of the camera when a rotation movement is played in a loop.
  • rotation: An optional field; the rotation direction of the camera under the rotation movement type, of the enum type Rotation .
    • Rotation.Clockwise: Rotate the camera clockwise.
    • Rotation.Anticlockwise: Rotate the camera counterclockwise.
    • Rotation.Loop: Rotate the camera in a loop.

It also composes the data structure of the Pose type from Five SDK (optional part):

  • longitude: The camera's horizontal rotation angle (yaw), in radians.
  • latitude: The camera's vertical rotation angle (pitch), in radians.
  • fov: The camera's vertical field of view, in degrees.
  • offset: The camera position.

Info

For details on the parameter types, see the Vreo API documentation.

{
  "uuid": "98840a8c-95d8-4b33-8ff8-b972ccdb2fa5",
  "type": "CameraMovement",
  "start": 14000,
  "end": 16000,
  "parsed": false,
  "data": {
    "effect": "Move",
    "panoIndex": 4,
    "fov": 110,
    "mode": "Panorama",
    "latitude": 0.01279953686,
    "longitude": 1.481968212275
  }
},
{
  "uuid": "d878d2e6-9033-43b3-2160-80ee65a9eaa4",
  "type": "CameraMovement",
  "start": 7400,
  "end": 13000,
  "parsed": false,
  "data": {
    "effect": "Rotate",
    "panoIndex": 9,
    "fov": 110,
    "mode": "Panorama",
    "latitude": 0.003545632869,
    "longitude": 1.596554310922,
    "rotateSpeed": 0.3,
    "rotation": "Clockwise"
  }
}