EntityGizmoScene
Extends: Scene
Source: EntityGizmoScene.ts:162
Scene for translating and rotating entities with a gizmo.
Constructor
new EntityGizmoScene(
options?: IEntityGizmoSceneParams,
): EntityGizmoSceneParameters
options(IEntityGizmoSceneParams, optional) — Gizmo scene options.
Instance Methods
_navSuspend()
Suspends the navigation controls that are active right now, so that a drag gesture does not fight with the camera. The suspended set is remembered and restored by EntityGizmoScene._navRestore, which keeps controls that were already deactivated beforehand deactivated.
_isGizmoEntity()
Returns true when the entity is one of the gizmo handles.
isTransforming()
Returns true when a drag gesture is running right now.
getActiveTransform()
Returns the running gesture description or null.
cancelTransform(): boolean
Cancels the current gesture and restores the entity transform when possible.
Returns
boolean— Whether a gesture was cancelled.
_beginChange()
Dispatches transformstart right before the very first entity change of the gesture.
_applyPosition(pos: Vec3)
Applies a new absolute position to the selected entity and emits the gesture events around the change. The position event receives the applied pos and the entity.
Parameters
pos(Vec3) — New absolute cartesian position.
addNode()
Inherited from Scene#addNode
Overrides: Scene#addNode
Adds node to the current hierarchy.
assign(renderer: Renderer)
Inherited from Scene#assign
Overrides: Scene#assign
Assign render node with renderer.
Parameters
renderer(Renderer) — Render node's renderer.
destroy()
Inherited from Scene#destroy
Overrides: Scene#destroy
Destroy node.
_clear()
Inherited from Scene#_clear
Overrides: Scene#_clear
Clear current node.
addEntityCollection(
entityCollection: EntityCollection,
isHidden?: boolean,
): Scene
Inherited from Scene#addEntityCollection
Overrides: Scene#addEntityCollection
Adds an entity collection.
Parameters
entityCollection(EntityCollection) — Entity collection.isHidden(boolean, optional) — If it's true that this collection has specific rendering.
Returns
removeEntityCollection(entityCollection: EntityCollection)
Inherited from Scene#removeEntityCollection
Overrides: Scene#removeEntityCollection
Removes entity collection.
Parameters
entityCollection(EntityCollection) — Entity collection for remove.
isActive(): Boolean
Inherited from Scene#isActive
Overrides: Scene#isActive
Gets render node activity.
Returns
Boolean
setActive(isActive: boolean)
Inherited from Scene#setActive
Overrides: Scene#setActive
Rendering activation.
Parameters
isActive(boolean) — Activation flag.
setDrawMode(mode: Number)
Inherited from Scene#setDrawMode
Overrides: Scene#setDrawMode
Sets draw mode
Parameters
mode(Number) — Draw mode, such as gl.TRIANGLES, gl.TRIANGLE_STRIP, gl.LINES etc.
drawPickingEntityCollections(ec: Array.<EntityCollection>)
Inherited from Scene#drawPickingEntityCollections
Overrides: Scene#drawPickingEntityCollections
Draw entity collections picking frame.
Parameters
ec(Array.<EntityCollection>) — Entity collection array.
Instance Fields
tools
Gizmo tool set: which handles are shown.
autoSelect
When false, a left click neither selects a map entity nor drops the current selection.