Skip to main content

Form Modal and improved touch controls

The recently added Studio.createFormModal() makes it easier to ask for user input, for instance, when submitting a quotation request. You can read more about it here.

Also this update improves camera rotation, zoom, and pan on touch devices. By default, one finger triggers interaction (selectionEvent), and zoom is done with two fingers. You can change this behavior by using the Studio.updateCameraSettings() function and passing in the desired values for the oneFinger and twoFingers options.

For example, if you want rotation to be triggered by one finger instead of interaction and zoom-and-pan by two fingers, you can use:

Studio.updateCameraSettings({
touch: {
oneFinger: 'rotate',
twoFingers: 'zoomAndPan',
},
})

As for zoom-to-mouse, the default value of the camera setting zoomToMouse has been changed from true to false. We believe this is a more sensible default for most applications. If you want, you can enable zoom-to-mouse like this in your app:

Studio.updateCameraSettings({
zoomToMouse: true,
})

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(async (data, worldControls) => {
// ...
await 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()

CSS snippet for mobile layout and Quote File Service

Check out this newly added CSS snippet that can help you create a responsive layout for your DynaMaker application!

With the new Quote File Service, you can now use your DynaMaker application as a REST API in addition to all its previous capabilities! A common task could be to generate a PDF and attach it to a quotation or send it in an email, fully automated on the server. You can read more about it on its documentation page.