Options
Menu

Class LightPickerBase

LightPickerBase provides an abstract base clase for light picker classes. These classes are responsible for feeding materials with relevant lights. Usually, StaticLightPicker can be used, but LightPickerBase can be extended to provide more application-specific dynamic selection of lights.

see

StaticLightPicker

Hierarchy

  • AssetBase

Implements

  • IAsset
  • IAssetAdapter

Index

Constructors

constructor

  • Creates a new LightPickerBase object.

    Returns LightPickerBase

Properties

_adapter

_adapter: IAssetAdapter

_pAllPickedLights

_pAllPickedLights: Array<LightBase>

_pCastingDirectionalLights

_pCastingDirectionalLights: Array<DirectionalLight>

_pCastingPointLights

_pCastingPointLights: Array<PointLight>

_pDirectionalLights

_pDirectionalLights: Array<DirectionalLight>

_pLightProbeWeights

_pLightProbeWeights: Array<number>

_pLightProbes

_pLightProbes: Array<LightProbe>

_pNumCastingDirectionalLights

_pNumCastingDirectionalLights: number

_pNumCastingPointLights

_pNumCastingPointLights: number

_pNumDirectionalLights

_pNumDirectionalLights: number

_pNumLightProbes

_pNumLightProbes: number

_pNumPointLights

_pNumPointLights: number

_pPointLights

_pPointLights: Array<PointLight>

adaptee

adaptee: AssetBase

adapter

adapter: IAssetAdapter

adapter is used to provide MovieClip to scripts taken from different platforms setter typically managed by factory. getter defaults to AwayJS class

assetFullPath

assetFullPath: Array<string>

assetNamespace

assetNamespace: string

id

id: number

A unique id for the asset, used to identify assets in an associative array

name

name: string

originalName

originalName: string

The original name used for this asset in the resource (e.g. file) in which it was found. This may not be the same as name, which may have changed due to of a name conflict.

Static DEFAULT_NAMESPACE

DEFAULT_NAMESPACE: string

Static ID_COUNT

ID_COUNT: number

Static assetType

assetType: string

Accessors

allPickedLights

  • A collection of all the collected lights.

    Returns Array<LightBase>

assetType

  • get (): string
  • inheritdoc

    Returns string

castingDirectionalLights

  • The collected directional lights that cast shadows to be used for shading.

    Returns Array<DirectionalLight>

castingPointLights

  • The collected point lights that cast shadows to be used for shading.

    Returns Array<PointLight>

directionalLights

  • The collected directional lights to be used for shading.

    Returns Array<DirectionalLight>

lightProbeWeights

  • get (): Array<number>
  • The weights for each light probe, defining their influence on the object.

    Returns Array<number>

lightProbes

  • The collected light probes to be used for shading.

    Returns Array<LightProbe>

numCastingDirectionalLights

  • get (): number
  • The maximum amount of directional lights that cast shadows.

    Returns number

numCastingPointLights

  • get (): number
  • The amount of point lights that cast shadows.

    Returns number

numDirectionalLights

  • get (): number
  • The maximum amount of directional lights that will be provided.

    Returns number

numLightProbes

  • get (): number
  • The maximum amount of light probes that will be provided.

    Returns number

numPointLights

  • get (): number
  • The maximum amount of point lights that will be provided.

    Returns number

pointLights

  • The collected point lights to be used for shading.

    Returns Array<PointLight>

Methods

addEventListener

  • addEventListener(type: string, listener: function): void
  • Add an event listener

    method

    addEventListener

    Parameters

    • type: string
    • listener: function
        • (event: EventBase): void
        • Parameters

          • event: EventBase

          Returns void

    Returns void

assetPathEquals

  • assetPathEquals(name: string, ns: string): boolean
  • Parameters

    • name: string
    • ns: string

    Returns boolean

clear

  • clear(): void
  • Returns void

collectLights

  • collectLights(entity: IEntity): void
  • Updates set of lights for a given renderable and EntityCollector. Always call super.collectLights() after custom overridden code.

    Parameters

    • entity: IEntity

    Returns void

dispatchEvent

  • dispatchEvent(event: EventBase): void
  • Dispatch an event

    method

    dispatchEvent

    Parameters

    • event: EventBase

    Returns void

dispose

  • dispose(): void
  • Disposes resources used by the light picker.

    Returns void

hasEventListener

  • hasEventListener(type: string, listener?: function): boolean
  • check if an object has an event listener assigned to it

    method

    hasListener

    Parameters

    • type: string
    • Optional listener: function
        • (event: EventBase): void
        • Parameters

          • event: EventBase

          Returns void

    Returns boolean

invalidate

  • invalidate(): void
  • Returns void

isAsset

  • isAsset(assetClass: IAssetClass): boolean
  • Parameters

    • assetClass: IAssetClass

    Returns boolean

removeEventListener

  • removeEventListener(type: string, listener: function): void
  • Remove an event listener

    method

    removeEventListener

    Parameters

    • type: string
    • listener: function
        • (event: EventBase): void
        • Parameters

          • event: EventBase

          Returns void

    Returns void

resetAssetPath

  • resetAssetPath(name: string, ns?: string, overrideOriginal?: boolean): void
  • Parameters

    • name: string
    • Optional ns: string
    • Optional overrideOriginal: boolean

    Returns void

updateFullPath

  • updateFullPath(): void
  • Returns void

Generated using TypeDoc