Class: DistanceDisplayCondition

DistanceDisplayCondition

new DistanceDisplayCondition(nearopt, faropt)

Determines visibility based on the distance to the camera.
Parameters:
Name Type Attributes Default Description
near Number <optional>
0.0 The smallest distance in the interval where the object is visible.
far Number <optional>
Number.MAX_VALUE The largest distance in the interval where the object is visible.
Source:
Example
// Make a billboard that is only visible when the distance to the camera is between 10 and 20 meters.
billboard.distanceDisplayCondition = new DistanceDisplayCondition(10.0 20.0);

Members

far :Number

The largest distance in the interval where the object is visible.
Type:
  • Number
Default Value:
  • Number.MAX_VALUE
Source:

near :Number

The smallest distance in the interval where the object is visible.
Type:
  • Number
Default Value:
  • 0.0
Source:

Methods

(static) clone(valueopt, resultopt) → {DistanceDisplayCondition}

Duplicates a distance display condition instance.
Parameters:
Name Type Attributes Description
value DistanceDisplayCondition <optional>
The distance display condition to duplicate.
result DistanceDisplayCondition <optional>
The result onto which to store the result.
Source:
Returns:
The duplicated instance.
Type
DistanceDisplayCondition

(static) equals(left, right) → {Boolean}

Determines if two distance display conditions are equal.
Parameters:
Name Type Description
left DistanceDisplayCondition A distance display condition.
right DistanceDisplayCondition Another distance display condition.
Source:
Returns:
Whether the two distance display conditions are equal.
Type
Boolean

clone(resultopt) → {DistanceDisplayCondition}

Duplicates this instance.
Parameters:
Name Type Attributes Description
result DistanceDisplayCondition <optional>
The result onto which to store the result.
Source:
Returns:
The duplicated instance.
Type
DistanceDisplayCondition

equals(other) → {Boolean}

Determines if this distance display condition is equal to another.
Parameters:
Name Type Description
other DistanceDisplayCondition Another distance display condition.
Source:
Returns:
Whether this distance display condition is equal to the other.
Type
Boolean