setPrimitives

Applies new settings to a Primitive object, or the Backdrop object.

setPrimitives(
	objectName: string,
	primitiveSettings: PrimitiveNodeSettings
): Promise<void>
Parameters
Description
Type

objectName

Specifies what object do we want to retrieve the information from.

string

primitiveSettings

New settings to be applied to the object.

Usage:

await modelApi.setPrimitives('Box', {
    boxDimensions: {
        x: 100,
        y: 100,
        z: 200
    },
    boxSegments: {
        x: 10,
        y: 10,
        z: 20
    },
    roundnessEnabled: true,
    roundnessRadius: 8,
    roundnessRadiusSegments: 8,
    computeNormals: true
});

Last updated