Skip to main content

Interface: ILight<TLight>

Core-API.ILight

Type parameters

NameType
TLightany

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

Omit.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

Omit.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

Omit.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

Omit.dispatchEvent

Defined in

webgi/src/helpers/EventDispatcher.ts:34


dispose

Optional dispose(): void

Returns

void

Inherited from

Omit.dispose

Defined in

webgi/src/interfaces.ts:40


setMaterial

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

Parameters

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

Returns

IMaterial<any>[]

Inherited from

Omit.setMaterial

Defined in

webgi/src/interfaces.ts:309


setGeometry

Optional setGeometry(geometry, force?): any

returns the old geometry.

Parameters

NameType
geometryany
force?boolean

Returns

any

Inherited from

Omit.setGeometry

Defined in

webgi/src/interfaces.ts:315


setDirty

Optional setDirty(options?): void

Parameters

NameType
options?AnyOptions

Returns

void

Inherited from

Omit.setDirty

Defined in

webgi/src/interfaces.ts:316


toJSON

toJSON(meta?): any

Parameters

NameType
meta?any

Returns

any

Inherited from

IJSONSerializable.toJSON

Defined in

webgi/src/interfaces.ts:443


fromJSON

fromJSON(data, meta?): null | ILight<TLight> | Promise<null | ILight<TLight>>

Parameters

NameType
dataany
meta?any

Returns

null | ILight<TLight> | Promise<null | ILight<TLight>>

Inherited from

IJSONSerializable.fromJSON

Defined in

webgi/src/interfaces.ts:444

Properties

name

name: string

Inherited from

Omit.name

Defined in

webgi/src/interfaces.ts:294


uuid

Readonly uuid: string

Inherited from

Omit.uuid

Defined in

webgi/src/interfaces.ts:295


visible

visible: boolean

Inherited from

Omit.visible

Defined in

webgi/src/interfaces.ts:296


modelObject

modelObject: TLight

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

Inherited from

Omit.modelObject

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

Inherited from

Omit.material

Defined in

webgi/src/interfaces.ts:307


geometry

Optional Readonly geometry: any

Inherited from

Omit.geometry

Defined in

webgi/src/interfaces.ts:308


userData

userData: any

Inherited from

Omit.userData

Defined in

webgi/src/interfaces.ts:317


assetType

assetType: "light"

Defined in

webgi/src/interfaces.ts:321


lightObject

lightObject: TLight

Defined in

webgi/src/interfaces.ts:322


uiConfig

Optional uiConfig: UiObjectConfig<any, string>

Inherited from

IUiConfigContainer.uiConfig

Defined in

webgi/src/interfaces.ts:551