Namespace: limit

RectilinearView.limit

View limiting functions.

Methods

(static) hfov(min, max) → {function}

Return a view limiter that constrains the horizontal field of view.

Parameters:
Name Type Description
min number

the minimum horizontal field of view

max number

the maximum horizontal field of view

Returns:

view limiter

Type
function

(static) pitch(min, max) → {function}

Return a view limiter that constrains the pitch angle.

Parameters:
Name Type Description
min number

the minimum pitch value

max number

the maximum pitch value

Returns:

view limiter

Type
function

(static) resolution(size) → {function}

Return a view limiter that prevents zooming in beyond the given resolution.

Parameters:
Name Type Description
size number

the cube face width in pixels

Returns:

view limiter

Type
function

(static) roll(min, max) → {function}

Return a view limiter that constrains the roll angle.

Parameters:
Name Type Description
min number

the minimum roll value

max number

the maximum roll value

Returns:

view limiter

Type
function

(static) traditional(maxResolution, maxVFov, maxHFovopt) → {function}

Return a view limiter that limits horizontal and vertical fov, prevents zooming in past the image resolution, and limits the pitch range to prevent the camera wrapping around at the poles. These are the most common view restrictions for 360 panorama.

Parameters:
Name Type Attributes Default Description
maxResolution number

the cube face width in pixels

maxVFov number

maximum vertical field of view

maxHFov number <optional>
maxVFov

maximum horizontal field of view

Returns:

view limiter

Type
function

(static) vfov(min, max) → {function}

Return a view limiter that constrains the vertical field of view.

Parameters:
Name Type Description
min number

the minimum vertical field of view

max number

the maximum vertical field of view

Returns:

view limiter

Type
function

(static) yaw(min, max) → {function}

Return a view limiter that constrains the yaw angle.

Parameters:
Name Type Description
min number

the minimum yaw value

max number

the maximum yaw value

Returns:

view limiter

Type
function