ScaleGizmo

ScaleGizmo

Update local scale of target entity

Constructor

new ScaleGizmo()

Members

parentWorldTransformInvertMatrices :Array.<Matrix4>

The invert of the world matrix for each selection's parent. If a parent does not exist, the value will be Matrix4.IDENTITY.invert()

Methods

activate(props)

Set the axis plane and line. Also calculate parentWorldTransformInvertMatrices and cache the results for future use.

Parameters:
Name Type Description
props Object

compileRenderables() → {Array.<Object>}

Build out the gizmo renderable meshes

copyTransform(transform)

Scale gizmo needs to inherit both rotation and scaleRotation to represent the correct direction of scale.

Parameters:
Name Type Description
transform Transform

target entity world transform

getGizmoLocalToWorldPosition(local, world)

get world position of points in gizmo local space

Parameters:
Name Type Description
local Vector3
world Vector3

process(mouseState, oldMouseState)

transform update in each frame when scale gizmo is active.

Parameters:
Name Type Description
mouseState Vector2

x,y coord of mouse

oldMouseState Vector2

old x,y coord of mouse