Class: CubeControl
Меньше 1 минуты
Class: CubeControl
Navigation cube control.
Example
const cubeControl = new CubeControl("cubeId", renderManager);
Constructors
constructor
• new CubeControl(domElementId
, renderManager
): CubeControl
Parameters
Name | Type | Description |
---|---|---|
domElementId | string | DOM element id for control renderer attaching. |
renderManager | RenderManagerBase | RenderManagerBase instance. |
Returns
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
Name | Type | Description |
---|---|---|
rotation | number | Relative angle. |
Returns
void
switchPick
▸ switchPick(name
): void
Makes rotation animation for proper cube side.
Parameters
Name | Type | Description |
---|---|---|
name | string | Side name. |
Returns
void