elementSet.prims

The set naming primitives (faces of a polygon mesh) by index.

Value helperSince 0.3.0

Usage

TypeScript
ElementSet.prims(indices: readonly number[], at?: Scope): ElementSet

Parameters

  • indicesreadonly number[]

    Primitive indices in the geometry the scope names; valid only in that revision.

    Required

  • atScope

    The revision and graph node whose geometry the indices address; omit both for free-standing geometry. Default {}.

Returns

{...at, kind: 'prim', indices }, the array kept as given; an empty array names nothing.

Example

TypeScript
ElementSet.prims([2]).kind // → 'prim'

See also