get

operator fun get(index: Int): Any(source)

Returns the primitive in the collection at the specified index.

// Toggle the show property of every primitive in the collection.
const primitives = scene.primitives;
const length = primitives.length;
for (let i = 0; i < length; ++i) {
const p = primitives.get(i);
p.show = !p.show;
}

Return

The primitive at the index.

Parameters

index

The zero-based index of the primitive to return.

See also