Skip to main content

Class: RandomizedDirectionalLight

Extra-Helpers.RandomizedDirectionalLight

Hierarchy​

Implements​

  • IDisposable

Properties​

assetType​

• assetType: "light"

Inherited from​

DirectionalLight2.assetType


setDirty​

• Optional setDirty: (options?: AnyOptions) => void

Type declaration​

▸ (options?): void

Parameters​
NameType
options?AnyOptions
Returns​

void

Inherited from​

DirectionalLight2.setDirty


isDirectionalLight2​

• isDirectionalLight2: boolean = true

Inherited from​

DirectionalLight2.isDirectionalLight2


isRandomizedDirectionalLight​

• isRandomizedDirectionalLight: boolean = true


_stablePoses​

• Optional _stablePoses: { distance: number ; faceNormal: Vector3 ; area: number ; face: Face ; maxEdgeLength: number ; xform: Matrix4 ; edgePoint: Vector3 }[]

Inherited from​

DirectionalLight2._stablePoses


_poseIndex​

• Optional _poseIndex: number

Inherited from​

DirectionalLight2._poseIndex


_originalXform​

• Optional _originalXform: Matrix4

Inherited from​

DirectionalLight2._originalXform


_uiConfig​

• Protected Optional _uiConfig: UiObjectConfig<any, string>

Inherited from​

DirectionalLight2._uiConfig

Accessors​

lightObject​

• get lightObject(): DirectionalLight2

Returns​

DirectionalLight2

Inherited from​

DirectionalLight2.lightObject


modelObject​

• get modelObject(): DirectionalLight2

Returns​

DirectionalLight2

Inherited from​

DirectionalLight2.modelObject


shadowParams​

• get shadowParams(): Partial<RDShadowParams>

call setter to change. or call updateShadowParams after changing

Returns​

Partial<RDShadowParams>

• set shadowParams(value): void

call setter to change. or call updateShadowParams after changing

Parameters​

NameType
valuePartial<RDShadowParams>

Returns​

void


randomParams​

• get randomParams(): Partial<RDRandomParams>

Returns​

Partial<RDRandomParams>

• set randomParams(value): void

Parameters​

NameType
valuePartial<RDRandomParams>

Returns​

void


uiConfig​

• get uiConfig(): UiObjectConfig<any, string>

Returns​

UiObjectConfig<any, string>

Overrides​

DirectionalLight2.uiConfig

Methods​

copy​

▸ copy(source, recursive?): RandomizedDirectionalLight

Parameters​

NameType
sourceRandomizedDirectionalLight
recursive?boolean

Returns​

RandomizedDirectionalLight

Inherited from​

DirectionalLight2.copy


toJSON​

▸ toJSON(meta?): any

Parameters​

NameType
meta?any

Returns​

any

Inherited from​

DirectionalLight2.toJSON


updateShadowParams​

▸ updateShadowParams(): void

Returns​

void


randomizePosition​

▸ randomizePosition(seed, focus?, spread?): void

Parameters​

NameTypeDefault value
seednumberundefined
focusnull | numbernull
spreadnull | numbernull

Returns​

void


refreshShadowCamNearFar​

▸ refreshShadowCamNearFar(): void

Returns​

void


dispose​

▸ dispose(): void

Returns​

void

Implementation of​

IDisposable.dispose

Overrides​

DirectionalLight2.dispose


fromJSON​

▸ fromJSON(data, meta?): null | RandomizedDirectionalLight

Parameters​

NameType
dataany
meta?any

Returns​

null | RandomizedDirectionalLight

Overrides​

DirectionalLight2.fromJSON

Constructors​

constructor​

• new RandomizedDirectionalLight(color?, intensity?, shadow?, random?)

Parameters​

NameType
color?string | number | Color
intensity?number
shadow?Partial<RDShadowParams>
random?Partial<RDRandomParams>

Overrides​

DirectionalLight2.constructor