RotationGizmo

RotationGizmo

Update local rotation of target entity

Constructor

new RotationGizmo()

Methods

_setPlaneAndLine(props)

Calculate the rotation direction based on the handle clicked on

Parameters:
Name Type Description
props Object

activate(props)

Activate this gizmo when the dragging motion starts
Rotation gizmo is operated in the local space and is not detached from its parent

Parameters:
Name Type Description
props Object
Properties
Name Type Description
data Object

active handle information

id string

active handle id

color Array.<number>

active handle color

compileRenderables() → {Array.<Object>}

Build out the gizmo renderable meshes

deactivate()

Deactivate the gizmo when the dragging motion stops
Rotation gizmo is operated in the local space and does not need to attach to its parent again

process(mouseState, oldMouseState)

transform update in each frame when this gizmo is active.

Parameters:
Name Type Description
mouseState Vector2

x,y coord of mouse

oldMouseState Vector2

old x,y coord of mouse