Class: ToolComponent
components.ToolComponent
An object to easily handle all the tools used (e.g. updating them, retrieving them, performing batch operations, etc). A tool is a feature that achieves something through user interaction (e.g. clipping planes, dimensions, etc).
Hierarchy
Implements
Properties
enabled
• enabled: boolean
= true
Overrides
Defined in
temp/components/core/ToolsComponent/index.ts:20
name
• name: string
= "ToolComponent"
Overrides
Defined in
temp/components/core/ToolsComponent/index.ts:17
Methods
add
▸ add(...tool
): void
Registers a new tool component.
Parameters
Name | Type | Description |
---|---|---|
...tool | Component <any >[] | The tool to register in the application. |
Returns
void
Defined in
temp/components/core/ToolsComponent/index.ts:31
dispose
▸ dispose(): void
Disposes all the memory used by all the tools.
Returns
void
Implementation of
Disposable.dispose
Defined in
temp/components/core/ToolsComponent/index.ts:91
get
▸ get(name
): undefined
| Component
<any
>
Retrieves a tool component by its name.
Parameters
Name | Type | Description |
---|---|---|
name | string | The name of the component.. |
Returns
undefined
| Component
<any
>
Overrides
Defined in
temp/components/core/ToolsComponent/index.ts:56
hasUI
▸ hasUI(): this is UI
Whether is component implements any kind of UI.
Returns
this is UI
Inherited from
Defined in
temp/components/base-types/component.ts:48
isDisposeable
▸ isDisposeable(): this is Disposable
Whether is component is Disposable.
Returns
this is Disposable
Inherited from
Defined in
temp/components/base-types/component.ts:28
isHideable
▸ isHideable(): this is Hideable
Whether is component is Hideable.
Returns
this is Hideable
Inherited from
Defined in
temp/components/base-types/component.ts:43
isResizeable
▸ isResizeable(): this is Resizeable
Whether is component is Resizeable.
Returns
this is Resizeable
Inherited from
Defined in
temp/components/base-types/component.ts:33
isUpdateable
▸ isUpdateable(): this is Updateable
Whether is component is Updateable.
Returns
this is Updateable
Inherited from
Defined in
temp/components/base-types/component.ts:38
remove
▸ remove(tool
): boolean
Deletes a previously registered tool component.
Parameters
Name | Type | Description |
---|---|---|
tool | Component <any > | The tool to delete. |
Returns
boolean
Defined in
temp/components/core/ToolsComponent/index.ts:42
update
▸ update(delta
): void
Updates all the registered tool components. Only the components where the property enabled is true will be updated.
Parameters
Name | Type | Description |
---|---|---|
delta | number | The delta time of the loop. |
Returns
void
Defined in
temp/components/core/ToolsComponent/index.ts:80
use
▸ use<T
>(token
, id
): Promise
<>
Gets one of your tools of That Open Platform. You can pass the type of component as the generic parameter T to get the types and intellisense for the component.
Type parameters
Name |
---|
T |
Parameters
Name | Type | Description |
---|---|---|
token | string | The authentication token to authorise this request. |
id | string | The ID of the tool you want to get |
Returns
Promise
<>
Defined in
temp/components/core/ToolsComponent/index.ts:67