Values and type information for per-instance geometry attributes.
alias GeometryInstanceAttribute
- The options object takes the following properties
- {ComponentDatatype} [options.componentDatatype] The datatype of each component in the attribute, e.g., individual elements in values.
- {Number} [options.componentsPerAttribute] A number between 1 and 4 that defines the number of components in an attributes.
- {Boolean} [options.normalize=false] 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.
- {Number[]} [options.value] The value for the attribute.
exception {DeveloperError} options.componentsPerAttribute must be between 1 and 4.
Values and type information for per-instance geometry attributes.
alias GeometryInstanceAttribute
- The options object takes the following properties - {ComponentDatatype} [options.componentDatatype] The datatype of each component in the attribute, e.g., individual elements in values. - {Number} [options.componentsPerAttribute] A number between 1 and 4 that defines the number of components in an attributes. - {Boolean} [options.normalize=false] When
true
andcomponentDatatype
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. - {Number[]} [options.value] The value for the attribute.exception {DeveloperError} options.componentsPerAttribute must be between 1 and 4.
var instance = new Cesium.GeometryInstance({ geometry : Cesium.BoxGeometry.fromDimensions({ dimensions : new Cesium.Cartesian3(1000000.0, 1000000.0, 500000.0) }), modelMatrix : Cesium.Matrix4.multiplyByTranslation(Cesium.Transforms.eastNorthUpToFixedFrame( Cesium.Cartesian3.fromDegrees(0.0, 0.0)), new Cesium.Cartesian3(0.0, 0.0, 1000000.0), new Cesium.Matrix4()), id : 'box', attributes : { color : new Cesium.GeometryInstanceAttribute({ componentDatatype : Cesium.ComponentDatatype.UNSIGNED_BYTE, componentsPerAttribute : 4, normalize : true, value : [255, 255, 0, 255] }) } });
ShowGeometryInstanceAttribute
ColorGeometryInstanceAttribute