Creates a new ConeGizmo object.
The camera component.
The render layer.
Protected_The app.
Protected_The camera viewing the gizmo.
Protected_The coordinate space.
Protected_The graphics device.
Protected_The dragged handle, as it was at the start of the drag.
Protected_Whether a handle is being dragged.
Protected_The app event handles.
Protected_The render layer.
Protected_The mouse buttons that interact.
Protected_The overlay renderer.
Protected_The gizmo scale.
Protected_Internal theme.
Whether to show handles that edit the shapes. Defaults to true.
The height of the cone. Defaults to 1.
Whether to show an icon at each node. Defaults to true.
The shapes the gizmo picks.
The graph nodes attached to the gizmo.
The world position of the center of the shape.
Whether to call preventDefault on pointer events.
The radius of the base of the cone. Defaults to 0.5.
Whether to show the value of a hovered or dragged handle. Defaults to true.
The root gizmo entity.
The world rotation of the shape.
Whether dragging snaps to the increments. Defaults to false.
The increment angles snap to, in degrees. Defaults to 5.
Protected_Protected
Shape gizmos show without attached nodes.
Gets the camera component to view the gizmo.
ProtectedcameraProtected
Gets the gizmo coordinate space.
ProtectedfacingProtected
Gets the handle size in CSS pixels.
Sets the handle size in CSS pixels. Defaults to 7.
Gets the icon size in CSS pixels.
Sets the icon size in CSS pixels. Defaults to 24.
Gets the gizmo render layer.
Gets the line thickness in CSS pixels.
Sets the line thickness in CSS pixels; dashed lines space their dashes to match. Defaults to 2.
The mouse buttons that interact with the gizmo, by button index: 0 left, 1 middle, 2 right.
Gets the gizmo size.
Sets the gizmo size. Defaults to 1.
Gets the increment lengths and ScaleGizmo factors snap to.
Sets the increment lengths and ScaleGizmo factors snap to. Defaults to 1.
Gets the current theme for the gizmo.
Protected_Protected
Gets whether the handle editing a value is hovered or dragged.
The node the handle edits, or null for a shape gizmo.
The value the handle edits.
The index of the handle among those editing the value.
Whether the handle is active.
Protected_Protected_Protected
Places the face and corner handles of the box last passed to HandleGizmo#_boxCorners, once large enough on screen.
Protected_Protected_Protected
Gets whether a shape is large enough on screen to show its handles.
The center of the shape.
The radius of the shape.
Whether to show the details.
Protected_Protected
Places the cone and its handles.
Protected_Protected
Gets the scale keeping geometry at a world position a constant size on screen.
The world position.
The scale.
Protected_Protected
Places a handle that drags along a line or in a plane, with a dashed guide from the origin while hovered or dragged.
The world position.
The color of the handle when hovered or dragged, and of its guide.
The node the handle edits, or null for a shape gizmo.
The value the handle edits.
The index of the handle among those editing the value.
A point the edit is measured from, on the line or plane.
The unit direction of the line, or the normal of the plane.
OptionalinPlane: boolean = false
Whether the handle moves in a plane.
Optionalguide: boolean = !inPlane
Whether to show the dashed line. Defaults to true for a line.
Whether the handle is hovered or dragged.
Protected_Protected
Places the icon of a node, which fires HandleGizmo.EVENT_ICONSELECT when clicked.
The icon.
The world position.
The node the icon marks.
Protected_Protected
Formats a readout label in its color.
The label.
The label color.
The label markup.
Protected_Protected
Gets the normal of the plane through a line that best faces the camera, for dragging along the line.
False when the line points at the camera.
Protected_Protected
Sets the radius or height from the dragged handle's distance.
The dragged handle.
Where the handle is dragged to.
Protected_Protected_Protected
Shows readout markup below a hovered or dragged handle.
The handle position.
The markup, as HandleGizmo#_readoutValue formats it.
Protected_Protected
Formats a value with two decimals after a colored label.
The label.
The label color.
The value.
Optionalunit: string = ''
The unit after the value.
The markup.
Protected_Protected
Resizes a box to a dragged HandleGizmo#_boxHandles handle, keeping the opposite face or corner in place, or the center for a centered box.
The dragged handle.
Where the handle is dragged to.
The rotation of the box.
The center at the start of the resize.
The half extents at the start of the resize.
How the handles resize the box.
The padding on each side, left out of the snapped extents.
Receives the center.
Receives the half extents.
Protected_Protected
Rounds an angle to a multiple of DragGizmo#snapAngleIncrement while snapping.
The angle in degrees.
The angle, snapped while DragGizmo#snap is on.
Protected_Protected
Rounds a length to a multiple of DragGizmo#snapIncrement while snapping, at least one increment so a size never snaps to zero.
The length.
The length, snapped while DragGizmo#snap is on.
Protected_Protected
Rounds a value to a multiple of an increment while snapping.
The value.
The increment.
The value, snapped while DragGizmo#snap is on.
Protected_Protected_Protected_Protected_Protected
Places three great circles of a sphere.
Protected_Protected_Protected
Stores the values a handle edits at the start of a drag. Implemented by the subclass.
The dragged handle.
Protected_Protected
The shapes are drawn in world space.
The shapes are sized in world units.
Destroys the gizmo and its shapes.
Fire an event, all additional arguments are passed on to the event listener.
Name of event to fire.
Optionalarg1: any
First argument that is passed to the event handler.
Optionalarg2: any
Second argument that is passed to the event handler.
Optionalarg3: any
Third argument that is passed to the event handler.
Optionalarg4: any
Fourth argument that is passed to the event handler.
Optionalarg5: any
Fifth argument that is passed to the event handler.
Optionalarg6: any
Sixth argument that is passed to the event handler.
Optionalarg7: any
Seventh argument that is passed to the event handler.
Optionalarg8: any
Eighth 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.
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.
Use this form to remove all listeners matching a name (and optionally callback/scope). To remove a single known subscription, prefer retaining the EventHandle returned by EventHandler#on / EventHandler#once and calling its EventHandle#off: it removes exactly that subscription and is faster (no scan of the callback list).
Optionalname: string
Name of the event to unbind.
Optionalcallback: HandleEventCallback
Function to be unbound.
Optionalscope: any
Scope 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.
An event handle. For later removal, prefer retaining this handle and calling its EventHandle#off over EventHandler#off with a name/callback: it removes exactly this subscription and is faster (no scan of the callback list).
Attach an event handler to an event. The handler is removed before it is called, so it runs at most once, even if it fires the same event again or throws.
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.
An event handle. For removal before it fires, prefer retaining this handle and calling its EventHandle#off over EventHandler#off with a name/callback: it removes exactly this subscription and is faster (no scan of the callback list).
Places the shapes of the attached nodes.
Sets the theme or partial theme for the gizmo.
The partial theme to set.
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.length
The layer index. Defaults to the end of the layer list.
Optionaldepth: boolean = false
Whether the layer keeps the scene depth and sorts transparent mesh instances manually, as overlay gizmos need so occluded parts draw faint. Otherwise it clears depth and draws on top, as transform gizmos need. Defaults to false.
The new layer.
StaticEVENT_Fired when a handle stops being dragged.
StaticEVENT_Fired when a dragged handle edits its value.
StaticEVENT_Fired when a handle starts being dragged.
StaticEVENT_Fired when the icon of a node is clicked.
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 the gizmo render has updated.
StaticEVENT_Fired when the gizmo's rotation is updated.
StaticEVENT_Fired when the gizmo's scale is updated.
Draws a cone along its y-axis, with handles that drag its base radius and its height. A height edit keeps the center in place.
Relevant Engine API examples: