BufferPrimitive

open external class BufferPrimitive(source)

View bound to the underlying buffer data of a BufferPrimitiveCollection. Abstract.

BufferPrimitive instances are intended to be reused when iterating over large collections, and temporarily bound to a primitive index while performing read/write operations on that primitive, before being rebound to the next primitive, using the flyweight pattern.

See also

Inheritors

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
external object Companion

Properties

Link copied to clipboard
external var featureId: Int

Feature ID associated with the primitive; not required to be unique.

Link copied to clipboard
external var show: Boolean

Whether primitive is shown.

Functions

Link copied to clipboard
Link copied to clipboard
external fun setMaterial(material: BufferPrimitiveMaterial)
Link copied to clipboard
open external fun toJSON(): JsAny

Returns a JSON-serializable object representing the primitive. This encoding is not memory-efficient, and should generally be used for debugging and testing.