setPrimitives
setPrimitives
Signature
setPrimitives(
name: string,
settings: Partial<PrimitiveNodeSettings>
): Promise<void>Parameters
Name
Type
Required
Description
Returns
Usage
// Change only box dimensions (other settings preserved)
await api.setPrimitives("Box", {
boxDimensions: { x: 2, y: 1, z: 1.5 }
});
// Change only sphere radius
await api.setPrimitives("Sphere", {
sphereRadius: 2.5
});
// Enable rounded corners on box
await api.setPrimitives("Box", {
roundnessEnabled: true,
roundnessRadius: 0.2
});
// Set multiple properties
await api.setPrimitives("Box", {
boxDimensions: { x: 1, y: 1, z: 1 },
boxSegments: { x: 2, y: 2, z: 2 },
roundnessEnabled: true,
roundnessRadius: 0.1,
roundnessRadiusSegments: 4,
computeNormals: true
});Notes
Last updated