Transforms SDK
The Transforms SDK package provides a set of interactable gizmos relating to the transformations of an object. These gizmos can be used to manipulate the position, rotation, and scale of objects in a 3D space.
Installation
To install this package, you need to have access to the private @sdk
npm scope.
To integrate the SDK Transforms package into your project, use the following command with your preferred package manager:
npm install @sdk/transforms
Example
import { TransformController } from '@sdk/transforms';
// Import your edit support instance (must implement the TransformEditSupport offered in the package)
import { editSupport } from './myEditSupport';
const colorPalette = {
main: { x: '#D74547', y: '#709A3D', z: '#0095B9' },
guide: { x: 'rgba(215,91,69,0.3)', y: 'rgba(0, 255, 41, 0.3)', z: 'rgba(0,86,185,0.3)' },
};
const controller = new TransformController(editSupport, colorPalette);
This will place the customized gizmos at the bottom center of the manipulated object and return information of their usage through the given editSupport.