BasicCamera

BasicCamera

Camera in the non-euclidean scene. It should not be confused with the Three.js camera in the virtual euclidean scene. The minimal GLSL struct should contain

  • fov
  • minDist
  • maxDist
  • maxSteps
  • threshold
  • position
  • matrix The GLSL code needs to contain (after the declaration) a function mapping. The role of this function is to map a point on the horizon sphere to the initial direction to follow during the ray-marching.

Constructor

new BasicCamera(parameters)

Source:

Constructor.

Parameters:
Name Type Description
parameters Object

the parameters of the camera. These parameters are

  • {number} fov - the field of view
  • {number} minDist - the minimal distance we ray-march
  • {number} maxDist - the maximal distance we ray-march
  • {number} maxSteps - the maximal number of steps during the ray-marching
  • {number} threshold - the threshold to stop the ray-marching
  • {TeleportationSet} set - the underlying subgroup of the geometry (to create the position)

Classes

BasicCamera

Members

aspect

Source:

Shortcut to reset the aspect of the underlying Three.js camera

fov :number

Source:

Shortcut to access the field of view of the underlying Three.js camera (Recall that in Three.js the field of view is the vertical one.)

Type:
  • number

fov

Source:

Shortcut to reset the field of view of the underlying Three.js camera (Recall that in Three.js the field of view is the vertical one.)

matrix :Matrix4

Source:

Matrix of the underlying Three.js camera in the virtual euclidean scene

Type:

maxDist :number

Source:

Maximal distance we ray-march

Type:
  • number

maxSteps :number

Source:

Maximal number of steps during the ray-marching

Type:
  • number

minDist :number

Source:

Minimal distance we ray-march

Type:
  • number

position :RelPosition

Source:

Position of the camera

Type:

threeCamera :PerspectiveCamera

Source:

The underlying Three.js camera

Type:
  • PerspectiveCamera

threshold :number

Source:

Threshold to stop the ray-marching

Type:
  • number

Methods

shader(shaderBuilder)

Source:

build the GLSL code needed to declare the camera

Parameters:
Name Type Description
shaderBuilder ShaderBuilder

the shader builder

updateProjectionMatrix()

Source:

Shortcut to update the projection matrix of the underlying Three.js camera