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
The camera “fly” works only in the perspective projection, but the first person camera mode works in both projections.
Below we will consider the process.
Features
FlyProcess type (TypeScript):
export type FlyProcess = {
name: "Fly"
options?: FlyOptions
events?: {
onStart?: ()=>void
onEnd?: ()=>void
}
}
Options
Fly Options type (Typescript):
export type FlyOptions = {
forwardSpeed?: number
sideSpeed?: number
constant?: boolean
}
Name |
Description |
---|---|
|
Speed of moving in the front or back direction |
|
Speed of moving in a side direction |
|
Whether the camera moves in the front direction with the constant speed without user interaction. |
Callbacks
Available events.
onStart() is emitted when the process is run.
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
}
})