GeometryAttribute
Values and type information for geometry attributes. A Geometry generally contains one or more attributes. All attributes together form the geometry's vertices.
const geometry = new Geometry({
attributes : {
position : new GeometryAttribute({
componentDatatype : ComponentDatatype.FLOAT,
componentsPerAttribute : 3,
values : new Float32Array([
0.0, 0.0, 0.0,
7500000.0, 0.0, 0.0,
0.0, 7500000.0, 0.0
])
})
},
primitiveType : PrimitiveType.LINE_LOOP
});
Content copied to clipboard
See also
Properties
Link copied to clipboard
The datatype of each component in the attribute, e.g., individual elements in GeometryAttribute.values.
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.