DollyCamera

DollyCamera

Euclidean camera to perform a dolly zoom effect. The setup is the following. the object respectively called focus, center, radius and ratio in the constructor A screen is placed at the position p of the camera, orthogonal to the direction the camera is looking at. In the local frame of the camera we define

  • f = (0, 0, focus, 1)
  • q = (0, R, center, 1) The line (fq) intersect the screen at a point (x,y) so that |y| = r h / 2, where h is the height of the screen. The dolly effect will be obtained letting f tends to infinity.

Constructor

new DollyCamera(parameters)

Source:

Constructor.

Parameters:
Name Type Description
parameters Object

the parameters of the camera. Additional parameters are

  • {number} focus
  • {number} center
  • {number} radius
  • {number} ratio

Classes

DollyCamera

Methods

shader(shaderBuilder)

Source:

build the GLSL code needed to declare the camera

Parameters:
Name Type Description
shaderBuilder ShaderBuilder

the shader builder