ShowGeometryInstanceAttribute - Cesium Documentation

# ShowGeometryInstanceAttribute

#### new ShowGeometryInstanceAttribute(show)

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

  Name | Type | Default | Description
  --- | --- | --- | ---
  `show` | Boolean | `true` | optional Determines if the geometry instance will be shown.

  ##### Example:

      var instance = new Cesium.GeometryInstance({
        geometry : new Cesium.BoxGeometry({
          vertexFormat : Cesium.VertexFormat.POSITION_AND_NORMAL,
          dimensions : new Cesium.Cartesian3(1000000.0, 1000000.0, 500000.0),
          minimumCorner : new Cesium.Cartesian3(-250000.0, -250000.0, -250000.0),
          maximumCorner : new Cesium.Cartesian3(250000.0, 250000.0, 250000.0)
        }),
        modelMatrix : Cesium.Matrix4.multiplyByTranslation(Cesium.Transforms.eastNorthUpToFixedFrame(
          Cesium.Cartesian3.fromDegrees(-75.59777, 40.03883)), new Cesium.Cartesian3(0.0, 0.0, 1000000.0), new Cesium.Matrix4()),
        id : 'box',
        attributes : {
          show : new Cesium.ShowGeometryInstanceAttribute(false)
        }
      });

  ##### See:

  - GeometryInstance
  - GeometryInstanceAttribute
  Source: Core/ShowGeometryInstanceAttribute.js, line 43

### Members

#### readonlycomponentDatatype :ComponentDatatype

  The datatype of each component in the attribute, e.g., individual elements in `ColorGeometryInstanceAttribute#value`.
  Default Value: ``ComponentDatatype.UNSIGNED_BYTE``
  Source: Core/ShowGeometryInstanceAttribute.js, line 68

#### readonlycomponentsPerAttribute :Number

  The number of components in the attributes, i.e., `ColorGeometryInstanceAttribute#value`.
  Default Value: `1`
  Source: Core/ShowGeometryInstanceAttribute.js, line 84

#### readonlynormalize :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`
  Source: Core/ShowGeometryInstanceAttribute.js, line 102

#### value :Uint8Array

  The values for the attributes stored in a typed array.
  Default Value: `[1.0]`
  Source: Core/ShowGeometryInstanceAttribute.js, line 53

### Methods

#### staticShowGeometryInstanceAttribute.toValue(show, result) → Uint8Array

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

  Name | Type | Description
  --- | --- | ---
  `show` | Boolean | The show value.
  `result` | Uint8Array | optional The array to store the result in, if undefined a new instance will be created.

  ##### Returns:

  The modified result parameter or a new instance if result was undefined.

  ##### Example:

      var attributes = primitive.getGeometryInstanceAttributes('an id');
      attributes.show = Cesium.ShowGeometryInstanceAttribute.toValue(true, attributes.show);

  Source: Core/ShowGeometryInstanceAttribute.js, line 120