AdvancedReadonlyattributesA record of the attributes of the geometry.
If set to true, the resource will be garbage collected automatically when it is not used.
ReadonlybuffersThe buffers that the attributes use
The index buffer of the geometry
The number of indices to draw, or 0 to draw the whole index buffer.
Set this when a geometry only covers a prefix of an index buffer it shares with others - a
pool of identical quads, say, where one buffer holds the six indices per quad for the largest
batch and each geometry draws as many quads as it currently holds. A size passed to the
draw call still wins, and a geometry with no index buffer ignores this entirely
(Geometry.vertexCount drives those). Read at draw time only, so changing it never
re-uploads or re-lays-out anything.
the instance count of the geometry to draw
The topology of the geometry.
ReadonlyuidThe unique id of the geometry.
Returns the bounds of the geometry.
The number of vertices in this geometry, derived from the first non-instanced attribute. The value is cached and only recalculated when the geometry's buffers or attributes change.
Adds an attribute to the geometry.
The name of the attribute to add.
The attribute option to add.
Adds an index buffer to the geometry.
The index buffer to add. Can be a Buffer, TypedArray, or an array of numbers.
destroys the geometry.
destroy the buffers associated with this geometry
Returns the requested attribute.
The name of the attribute required
Returns the requested buffer.
The name of the buffer required.
Used to figure out how many vertices there are in this geometry
the number of vertices in the geometry
since 8.20.0, use Geometry.vertexCount instead
Unloads the geometry from the GPU.
This class represents a geometry used for batching in the rendering system. It defines the structure of vertex attributes and index buffers for batched rendering.