Class: NearFarScalar

NearFarScalar

new NearFarScalar(nearopt, nearValueopt, faropt, farValueopt)

Represents a scalar value's lower and upper bound at a near distance and far distance in eye space.
Parameters:
Name Type Attributes Default Description
near Number <optional>
0.0 The lower bound of the camera range.
nearValue Number <optional>
0.0 The value at the lower bound of the camera range.
far Number <optional>
1.0 The upper bound of the camera range.
farValue Number <optional>
0.0 The value at the upper bound of the camera range.
Source:
See:
  • Packable

Members

(static) packedLength :Number

The number of elements used to pack the object into an array.
Type:
  • Number
Source:

far :Number

The upper bound of the camera range.
Type:
  • Number
Default Value:
  • 1.0
Source:

farValue :Number

The value at the upper bound of the camera range.
Type:
  • Number
Default Value:
  • 0.0
Source:

near :Number

The lower bound of the camera range.
Type:
  • Number
Default Value:
  • 0.0
Source:

nearValue :Number

The value at the lower bound of the camera range.
Type:
  • Number
Default Value:
  • 0.0
Source:

Methods

(static) clone(nearFarScalar, resultopt) → {NearFarScalar}

Duplicates a NearFarScalar instance.
Parameters:
Name Type Attributes Description
nearFarScalar NearFarScalar The NearFarScalar to duplicate.
result NearFarScalar <optional>
The object onto which to store the result.
Source:
Returns:
The modified result parameter or a new NearFarScalar instance if one was not provided. (Returns undefined if nearFarScalar is undefined)
Type
NearFarScalar

(static) equals(leftopt, rightopt) → {Boolean}

Compares the provided NearFarScalar and returns true if they are equal, false otherwise.
Parameters:
Name Type Attributes Description
left NearFarScalar <optional>
The first NearFarScalar.
right NearFarScalar <optional>
The second NearFarScalar.
Source:
Returns:
true if left and right are equal; otherwise false.
Type
Boolean

(static) pack(value, array, startingIndexopt) → {Array.<Number>}

Stores the provided instance into the provided array.
Parameters:
Name Type Attributes Default Description
value NearFarScalar The value to pack.
array Array.<Number> The array to pack into.
startingIndex Number <optional>
0 The index into the array at which to start packing the elements.
Source:
Returns:
The array that was packed into
Type
Array.<Number>

(static) unpack(array, startingIndexopt, resultopt) → {NearFarScalar}

Retrieves an instance from a packed array.
Parameters:
Name Type Attributes Default Description
array Array.<Number> The packed array.
startingIndex Number <optional>
0 The starting index of the element to be unpacked.
result NearFarScalar <optional>
The object into which to store the result.
Source:
Returns:
The modified result parameter or a new NearFarScalar instance if one was not provided.
Type
NearFarScalar

clone(resultopt) → {NearFarScalar}

Duplicates this instance.
Parameters:
Name Type Attributes Description
result NearFarScalar <optional>
The object onto which to store the result.
Source:
Returns:
The modified result parameter or a new NearFarScalar instance if one was not provided.
Type
NearFarScalar

equals(rightopt) → {Boolean}

Compares this instance to the provided NearFarScalar and returns true if they are equal, false otherwise.
Parameters:
Name Type Attributes Description
right NearFarScalar <optional>
The right hand side NearFarScalar.
Source:
Returns:
true if left and right are equal; otherwise false.
Type
Boolean