Skip to main content

Class: Component<Type>

components.Component

Components are the building blocks of this library. Everything is a component: tools, scenes, objects, cameras, etc. All components must inherit from this class. The Type parameter defines the type of the core of this component. For instance, a component containing a

Type parameters

Name
Type

Hierarchy

Properties

enabled

Abstract enabled: boolean

Whether this component is active or not. The behaviour can vary depending on the type of component. E.g. a disabled dimension tool will stop creating dimensions, while a disabled camera will stop moving. A disabled component will not be updated automatically each frame.

Defined in

temp/components/base-types/component.ts:19


name

Abstract name: string

The main identifier of this component. It can be used to retrieve it and index it.

Defined in

temp/components/base-types/component.ts:11

Methods

get

Abstract get(...args): Type

The core of the component. For instance, if it's a camera component, it could be a THREE.Camera.

Parameters

NameType
...argsany

Returns

Type

Defined in

temp/components/base-types/component.ts:25


hasUI

hasUI(): this is UI

Whether is component implements any kind of UI.

Returns

this is UI

Defined in

temp/components/base-types/component.ts:48


isDisposeable

isDisposeable(): this is Disposable

Whether is component is Disposable.

Returns

this is Disposable

Defined in

temp/components/base-types/component.ts:28


isHideable

isHideable(): this is Hideable

Whether is component is Hideable.

Returns

this is Hideable

Defined in

temp/components/base-types/component.ts:43


isResizeable

isResizeable(): this is Resizeable

Whether is component is Resizeable.

Returns

this is Resizeable

Defined in

temp/components/base-types/component.ts:33


isUpdateable

isUpdateable(): this is Updateable

Whether is component is Updateable.

Returns

this is Updateable

Defined in

temp/components/base-types/component.ts:38