Перейти к основному содержанию

Class: CubeControl

Меньше 1 минуты

Class: CubeControl

Navigation cube control.

Example

const cubeControl = new CubeControl("cubeId", renderManager);

Constructors

constructor

new CubeControl(domElementId, renderManager): CubeControl

Parameters

NameTypeDescription
domElementIdstringDOM element id for control renderer attaching.
renderManagerRenderManagerBaseRenderManagerBase instance.

Returns

CubeControl

Methods

animate

animate(): void

Updates cube visual and RenderManager`s camera. Use in rendering pipeline.

Returns

void


dispose

dispose(): void

Destroy cube object and release all events and resources.

Returns

void


setOffsetRotation

setOffsetRotation(rotation): void

Sets the relative cube rotation angle to be taken as zero.

Parameters

NameTypeDescription
rotationnumberRelative angle.

Returns

void


switchPick

switchPick(name): void

Makes rotation animation for proper cube side.

Parameters

NameTypeDescription
namestringSide name.

Returns

void