Skip to main content

Interface: IModel<TModel>

Core-API.IModel

Type parameters

NameType
TModelany

Hierarchy

Implemented by

Methods

addEventListener

addEventListener(type, listener): void

Adds a listener to an event type.

Parameters

NameTypeDescription
typestringThe type of event to listen to.
listener(event: IEvent<string>) => voidThe function that gets called when the event is fired.

Returns

void

Inherited from

IEventDispatcher.addEventListener

Defined in

webgi/src/helpers/EventDispatcher.ts:14


hasEventListener

hasEventListener(type, listener): boolean

Checks if listener is added to an event type.

Parameters

NameTypeDescription
typestringThe type of event to listen to.
listener(event: IEvent<string>) => voidThe function that gets called when the event is fired.

Returns

boolean

Inherited from

IEventDispatcher.hasEventListener

Defined in

webgi/src/helpers/EventDispatcher.ts:21


removeEventListener

removeEventListener(type, listener): void

Removes a listener from an event type.

Parameters

NameTypeDescription
typestringThe type of the listener that gets removed.
listener(event: IEvent<string>) => voidThe listener function that gets removed.

Returns

void

Inherited from

IEventDispatcher.removeEventListener

Defined in

webgi/src/helpers/EventDispatcher.ts:28


dispatchEvent

dispatchEvent(event): void

Fire an event type.

Parameters

NameType
eventIEvent<string>

Returns

void

Inherited from

IEventDispatcher.dispatchEvent

Defined in

webgi/src/helpers/EventDispatcher.ts:34


dispose

Optional dispose(): void

Returns

void

Inherited from

Partial.dispose

Defined in

webgi/src/interfaces.ts:40


setMaterial

Optional setMaterial(material): IMaterial<any>[]

Parameters

NameType
materialundefined | IMaterial<any> | IMaterial<any>[]

Returns

IMaterial<any>[]

Defined in

webgi/src/interfaces.ts:309


setGeometry

Optional setGeometry(geometry, force?): any

returns the old geometry.

Parameters

NameType
geometryany
force?boolean

Returns

any

Defined in

webgi/src/interfaces.ts:315


setDirty

Optional setDirty(options?): void

Parameters

NameType
options?AnyOptions

Returns

void

Defined in

webgi/src/interfaces.ts:316

Properties

name

name: string

Defined in

webgi/src/interfaces.ts:294


uuid

Readonly uuid: string

Defined in

webgi/src/interfaces.ts:295


visible

visible: boolean

Defined in

webgi/src/interfaces.ts:296


assetType

assetType: "model"

Defined in

webgi/src/interfaces.ts:298


modelObject

modelObject: TModel

Internal three.js Object3D instance (like Mesh, Group, etc)

Defined in

webgi/src/interfaces.ts:302


material

Optional Readonly material: IMaterial<any> | IMaterial<any>[]

Use setMaterial to change the material Get one or more materials applied to an object

Defined in

webgi/src/interfaces.ts:307


geometry

Optional Readonly geometry: any

Defined in

webgi/src/interfaces.ts:308


userData

userData: any

Defined in

webgi/src/interfaces.ts:317


uiConfig

Optional uiConfig: UiObjectConfig<any, string>

Inherited from

IUiConfigContainer.uiConfig

Defined in

webgi/src/interfaces.ts:550