add

fun add(primitive: Any, index: Int? = definedExternally): Any(source)

Adds a primitive to the collection.

const billboards = scene.primitives.add(new BillboardCollection());

Return

The primitive added to the collection.

Parameters

primitive

The primitive to add.

index

The index to add the layer at. If omitted, the primitive will be added at the bottom of all existing primitives.

See also