MCPcopy
hub / github.com/donmccurdy/glTF-Transform / addPrimitive

Method addPrimitive

packages/core/src/properties/mesh.ts:57–59  ·  view source on GitHub ↗

Adds a Primitive to the mesh's draw call list.

(primitive: Primitive)

Source from the content-addressed store, hash-verified

55
56 /** Adds a {@link Primitive} to the mesh's draw call list. */
57 public addPrimitive(primitive: Primitive): this {
58 return this.addRef('primitives', primitive);
59 }
60
61 /** Removes a {@link Primitive} from the mesh's draw call list. */
62 public removePrimitive(primitive: Primitive): this {

Callers 15

mesh.test.tsFile · 0.80
readMethod · 0.80
2-material.tsFile · 0.80
instance.test.tsFile · 0.80
join.test.tsFile · 0.80
createSceneFunction · 0.80
reorder.test.tsFile · 0.80

Calls

no outgoing calls

Tested by 10

createSceneFunction · 0.64
createFloatAttributeFunction · 0.64
createSceneBasicFunction · 0.64
createSceneIndexedFunction · 0.64
createSceneInstancedFunction · 0.64
createSceneUnusedFunction · 0.64
createSceneFunction · 0.64
createPrimitiveFunction · 0.64
createMaterialsFunction · 0.64