GeometryInstanceAttribute
external class GeometryInstanceAttribute(options: GeometryInstanceAttribute.ConstructorOptions)(source)
Values and type information for per-instance geometry attributes.
const instance = new GeometryInstance({
geometry : BoxGeometry.fromDimensions({
dimensions : new Cartesian3(1000000.0, 1000000.0, 500000.0)
}),
modelMatrix : Matrix4.multiplyByTranslation(Transforms.eastNorthUpToFixedFrame(
Cartesian3.fromDegrees(0.0, 0.0)), new Cartesian3(0.0, 0.0, 1000000.0), new Matrix4()),
id : 'box',
attributes : {
color : new GeometryInstanceAttribute({
componentDatatype : ComponentDatatype.UNSIGNED_BYTE,
componentsPerAttribute : 4,
normalize : true,
value : [255, 255, 0, 255]
})
}
});
Content copied to clipboard
See also
Types
Link copied to clipboard
interface ConstructorOptions
Properties
Link copied to clipboard
The datatype of each component in the attribute, e.g., individual elements in GeometryInstanceAttribute.value.
Link copied to clipboard
A number between 1 and 4 that defines the number of components in an attributes. For example, a position attribute with x, y, and z components would have 3 as shown in the code example.
Link copied to clipboard
The values for the attributes stored in a typed array. In the code example, every three elements in values
defines one attributes since componentsPerAttribute
is 3.