ShowGeometryInstanceAttribute

ShowGeometryInstanceAttribute

new

Value and type information for per-instance geometry attribute that determines if the geometry instance will be shown.

Parameters:
Name Type Argument Default Description
show Boolean <optional>
true Determines if the geometry instance will be shown.
Example
var instance = new GeometryInstance({
  geometry : new BoxGeometry({
    vertexFormat : VertexFormat.POSITION_AND_NORMAL,
    dimensions : new Cartesian3(1000000.0, 1000000.0, 500000.0)
  }),
  modelMatrix : Matrix4.multiplyByTranslation(Transforms.eastNorthUpToFixedFrame(
    ellipsoid.cartographicToCartesian(Cartographic.fromDegrees(-75.59777, 40.03883))), new Cartesian3(0.0, 0.0, 1000000.0)),
  id : 'box',
  attributes : {
    show : new ShowGeometryInstanceAttribute(false)
  }
});
See:
Source:

Members

<readonly> :ComponentDatatype

The datatype of each component in the attribute, e.g., individual elements in ShowGeometryInstanceAttribute#value.
Default Value:

<readonly> :Number

The number of components in the attributes, i.e., ShowGeometryInstanceAttribute#value.
Default Value:
  • 1

<readonly> :Boolean

When true and componentDatatype is an integer format, indicate that the components should be mapped to the range [0, 1] (unsigned) or [-1, 1] (signed) when they are accessed as floating-point for rendering.
Default Value:
  • true

:Uint8Array

The values for the attributes stored in a typed array.
Default Value:
  • [1.0]

Methods

<static>

Converts a boolean show to a typed array that can be used to assign a show attribute.

Parameters:
Name Type Description
show Boolean The show value.
Throws:
DeveloperError : show is required.
Returns:
Uint8Array The typed array in the attribute's format.
Example
var attributes = primitive.getGeometryInstanceAttributes('an id');
attributes.show = ShowGeometryInstanceAttribute.toValue(true);