Fly Process

The process allows you to move the camera around a scene. If we imagine that the camera was an observer, then he would appear to “fly” through a scene. Also when the process is run, it activates the first person camera process. To make the camera “fly”, you should press the left mouse button and then move your mouse. To manage the camera in first person mode, you should press the right mouse button and then move your mouse.

Warning

Fly process will change the current projection to perspective if it is not.

Below we will consider the process.

Features

FlyProcess type (TypeScript):

export type FlyProcess = {
    name: "Fly"
    options?: FlyOptions
    events?: {
        onStart?: ()=>void
        onEnd?: ()=>void
        onProjectionChanged?: (prj: CameraProjection) => void
    }
}

Options

Fly Options type (Typescript):

export type FlyOptions = {
    forwardSpeed?: number
    sideSpeed?: number
    constant?: boolean
}

Name

Description

forwardSpeed

Speed of moving in the front or back direction

sideSpeed

Speed of moving in a side direction

constant

Whether the camera moves in the front direction with the constant speed without user interaction.

Callbacks

Available events.

  1. onStart() is emitted when the process is run.

  2. onEnd() is emitted when the process is finished.

Running

Example of running the process (TypeScript):

view.runCommand({
    name: "RunProcessCommand", // name of command
    // next arguments
    process: {
        name: "Fly", // process name
    }
})