Factory functions for view limiters. See RectilinearViewLimiter.
Methods
(static) hfov(min, max) → {RectilinearViewLimiter}
Returns 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:
(static) pitch(min, max) → {RectilinearViewLimiter}
Returns 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:
(static) resolution(size) → {RectilinearViewLimiter}
Returns a view limiter that prevents zooming in beyond the given resolution.
Parameters:
Name | Type | Description |
---|---|---|
size |
number | The cube face width in pixels or, equivalently, one fourth of the equirectangular width in pixels. |
Returns:
(static) roll(min, max) → {RectilinearViewLimiter}
Returns 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:
(static) traditional(maxResolution, maxVFov, maxHFovopt) → {RectilinearViewLimiter}
Returns a view limiter that limits the horizontal and vertical field of view, 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 constraints for a 360° panorama.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
maxResolution |
number | The cube face width in pixels or, equivalently, one fourth of the equirectangular width in pixels. |
||
maxVFov |
number | The maximum vertical field of view. |
||
maxHFov |
number |
<optional> |
maxVFov | The maximum horizontal field of view. |
Returns:
(static) vfov(min, max) → {RectilinearViewLimiter}
Returns 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:
(static) yaw(min, max) → {RectilinearViewLimiter}
Returns a view limiter that constrains the yaw angle.
Parameters:
Name | Type | Description |
---|---|---|
min |
number | The minimum yaw value. |
max |
number | The maximum yaw value. |