Creates a new TransformGizmo object.
The camera component.
The render layer.
Optionalname: string = 'gizmo:transform'The name of the gizmo.
Protected_Internal reference to the app containing the gizmo.
Protected_Internal reference to camera component to view the gizmo.
Protected_Internal version of coordinate space. Defaults to 'world'.
Protected_Internal reference to the graphics device of the app.
Protected_Internal list of app event handles for the gizmo.
Protected_Internal reference to layer to render the gizmo..
Protected_Internal flag to track if a render update is required.
Protected_Internal gizmo starting rotation in world space.
Protected_Internal gizmo starting rotation in world space.
Protected_Internal version of the gizmo scale. Defaults to 1.
Protected_Internal currently selected axis.
Protected_Internal state of if currently selected shape is a plane.
Protected_Internal selection starting coordinates in world space.
Protected_Internal object containing the gizmo shapes to render.
Protected_Internal theme.
Whether to hide the shapes when dragging. Defaults to 'selected'.
The intersection shapes for the gizmo.
The graph nodes attached to the gizmo.
Flag to indicate whether to call preventDefault on pointer events.
The root gizmo entity.
Snapping increment. Defaults to 1.
Protected_ProtectedGets the camera component to view the gizmo.
ProtectedcameraProtectedGets the gizmo coordinate space.
Gets the gizmo enabled state.
Sets the gizmo enabled state.
ProtectedfacingProtectedGets the gizmo render layer.
Gets the gizmo size.
Sets the gizmo size. Defaults to 1.
Gets whether snapping is enabled. Defaults to false.
Sets whether snapping is enabled. Defaults to false.
Gets the current theme for the gizmo.
Protected_ProtectedThe axis to create the plane for.
Whether the axis is facing the camera.
Whether the axis is a line.
Protected_Protected_ProtectedProtected_Protected_Protected_Protected_ProtectedThe point to project.
The axis to project to.
Protected_ProtectedThe x coordinate.
The y coordinate.
Whether the axis is facing the camera.
Whether the axis is a line.
The point (space is TransformGizmo#coordSpace).
Protected_ProtectedProtected_ProtectedProtected_ProtectedSet the shape to be enabled or disabled.
The shape axis.
The enabled state of shape.
Fire an event, all additional arguments are passed on to the event listener.
Name of event to fire.
Optionalarg1: anyFirst argument that is passed to the event handler.
Optionalarg2: anySecond argument that is passed to the event handler.
Optionalarg3: anyThird argument that is passed to the event handler.
Optionalarg4: anyFourth argument that is passed to the event handler.
Optionalarg5: anyFifth argument that is passed to the event handler.
Optionalarg6: anySixth argument that is passed to the event handler.
Optionalarg7: anySeventh argument that is passed to the event handler.
Optionalarg8: anyEighth argument that is passed to the event handler.
Self for chaining.
Test if there are any handlers bound to an event name.
The name of the event to test.
True if the object has handlers bound to the specified event name.
Get the enabled state of the shape.
The shape axis. Can be:
Detach an event handler from an event. If callback is not provided then all callbacks are unbound from the event, if scope is not provided then all events with the callback will be unbound.
Optionalname: stringName of the event to unbind.
Optionalcallback: HandleEventCallbackFunction to be unbound.
Optionalscope: anyScope that was used as the this when the event is fired.
Self for chaining.
const handler = () => {};
obj.on('test', handler);
obj.off(); // Removes all events
obj.off('test'); // Removes all events called 'test'
obj.off('test', handler); // Removes all handler functions, called 'test'
obj.off('test', handler, this); // Removes all handler functions, called 'test' with scope this
Attach an event handler to an event.
Name of the event to bind the callback to.
Function that is called when event is fired. Note the callback is limited to 8 arguments.
Optionalscope: any = ...Object to use as 'this' when the event is fired, defaults to current this.
Can be used for removing event in the future.
Attach an event handler to an event. This handler will be removed after being fired once.
Name of the event to bind the callback to.
Function that is called when event is fired. Note the callback is limited to 8 arguments.
Optionalscope: any = ...Object to use as 'this' when the event is fired, defaults to current this.
Sets the theme or partial theme for the gizmo.
The partial theme to set.
Optionaldisabled?: Partial<Color>The disabled color.
OptionalguideBase?: Partial<{ x: Color; y: Color; z: Color }>The guide line colors.
OptionalguideOcclusion?: numberThe guide occlusion value. Defaults to 0.8.
OptionalshapeBase?: Partial<{ f: Color; x: Color; xyz: Color; y: Color; z: Color }>The axis colors.
OptionalshapeHover?: Partial<{ f: Color; x: Color; xyz: Color; y: Color; z: Color }>The hover colors.
StaticcreateCreates a new gizmo layer and adds it to the scene.
The app.
OptionallayerName: string = 'Gizmo'The layer name. Defaults to 'Gizmo'.
OptionallayerIndex: number = app.scene.layers.layerList.lengthThe layer index. Defaults to the end of the layer list.
The new layer.
StaticEVENT_Fired when graph nodes are attached.
StaticEVENT_Fired when graph nodes are detached.
StaticEVENT_Fired when the pointer is down on the gizmo.
StaticEVENT_Fired when the pointer is moving over the gizmo.
StaticEVENT_Fired when the pointer is up off the gizmo.
StaticEVENT_Fired when the gizmo's position is updated.
StaticEVENT_Fired when when the gizmo render has updated.
StaticEVENT_Fired when the gizmo's rotation is updated.
StaticEVENT_Fired when the gizmo's scale is updated.
StaticEVENT_Fired when when the transformation has ended.
StaticEVENT_Fired during the transformation.
StaticEVENT_Fired when when the transformation has started.
The base class for all transform gizmos.