BufferPolyline

open external class BufferPolyline : BufferPrimitive(source)

View bound to the underlying buffer data of a BufferPolylineCollection.

BufferPolyline instances are flyweights: a single BufferPolyline instance can be temporarily bound to any conceptual "polyline" in a BufferPolylineCollection, allowing very large collections to be iterated and updated with a minimal memory footprint.

Represented as two (2) or more positions.

See also

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

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

Link copied to clipboard
var show: JsAny

Whether primitive is shown.

Link copied to clipboard

Count of positions (vertices) in this polyline, number of VEC3 elements.

Functions

Link copied to clipboard
fun getPositions(result: JsAny? = definedExternally)

Returns an array view of this polyline's vertex positions. If 'result' argument is given, vertex positions are written to that array and returned. Otherwise, returns an ArrayView on collection memory — changes to this array will not trigger render updates, which requires .setPositions().

Link copied to clipboard
open override fun toJSON(): JsAny

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