Skip to main content

Selective geometry interaction

Until now, all geometry that you add to the scene in DynaMaker has been interactable. From here on, the default behavior for new applications will be that you as a developer get to control what geometry groups can trigger selection events.

You might notice that we've begun to replace the term selection with interaction in the context of events triggered by the mouse or touch screen. This is in part because we think it is a better description of what is actually happening and in part to differentiate it from the manager.select() and manager.getActiveSelection() API.

To enable interaction events for a given group, set the interactable argument to true when updating the geometry.

Studio.setUpdateGeometryFunction((data, worldControls) => {
// ...
worldControls.updateGeometry(geometryGroup, {
interactable: true,
})
})

To not break existing apps, this behavior is opt-in and controlled via an argument called useSelectiveGeometryInteraction in the ADVANCED tab. You can also add this argument manually to your existing application if you would like to use it there.

export function productConfigurationFactory(): STUDIO.IProductConfiguration {
return {
// ...
useSelectiveGeometryInteraction: true,
}
}

For even more control over interaction events, you can use the interaction plane. If the mouse/touch does not intersect with any interactable geometry group, the interaction plane is used. By default, the default interaction plane is the ground plane (0, 0, 1, 0).

// set the interaction plane to be the xz-plane offset by 100
const plane = new SKYCAD.Plane(0, 1, 0, 100)
Studio.setInteractionPlane(plane)

// completely remove the interaction plane
Studio.clearInteractionPlane()