Options
Menu

Class DiffuseLightMapMethod

DiffuseLightMapMethod provides a diffuse shading method that uses a light map to modulate the calculated diffuse lighting. It is different from EffectLightMapMethod in that the latter modulates the entire calculated pixel color, rather than only the diffuse lighting value.

Hierarchy

Implements

  • IAsset
  • IAssetAdapter

Index

Constructors

constructor

  • Creates a new DiffuseLightMapMethod method.

    Parameters

    • lightMap: TextureBase

      The texture containing the light map.

    • Default value blendMode: string = "multiply"

      The blend mode with which the light map should be applied to the lighting result.

    • Default value useSecondaryUV: boolean = false

      Indicates whether the secondary UV set should be used to map the light map.

    • Default value baseMethod: DiffuseBasicMethod | DiffuseCompositeMethod = null

      The diffuse method used to calculate the regular diffuse-based lighting.

    Returns DiffuseLightMapMethod

Properties

_adapter

_adapter: IAssetAdapter

Protected _baseMethod

_baseMethod: ShadingMethodBase

_counts

_counts: Array<number>

Protected _onShaderInvalidatedDelegate

_onShaderInvalidatedDelegate: function

Type declaration

    • (event: ShadingMethodEvent): void
    • Parameters

      • event: ShadingMethodEvent

      Returns void

_owners

_owners: Array<IMaterial>

_textures

_textures: Array<TextureBase>

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 ADD

ADD: string

Indicates the light map should be added into the calculated shading result. This can be used to add pre-calculated lighting or global illumination.

Static DEFAULT_NAMESPACE

DEFAULT_NAMESPACE: string

Static ID_COUNT

ID_COUNT: number

Static MULTIPLY

MULTIPLY: string

Indicates the light map should be multiplied with the calculated shading result. This can be used to add pre-calculated shadows or occlusion.

Static assetType

assetType: string

Accessors

assetType

  • get (): string
  • inheritdoc

    Returns string

baseMethod

blendMode

  • get (): string
  • set (value: string): void
  • The blend mode with which the light map should be applied to the lighting result.

    see

    DiffuseLightMapMethod.ADD

    see

    DiffuseLightMapMethod.MULTIPLY

    Returns string

  • The blend mode with which the light map should be applied to the lighting result.

    Parameters

    • value: string

    Returns void

color

  • get (): number
  • set (value: number): void

lightMap

  • get (): TextureBase
  • set (value: TextureBase): void
  • The texture containing the light map data.

    Returns TextureBase

  • The texture containing the light map data.

    Parameters

    • value: TextureBase

    Returns void

multiply

  • get (): boolean
  • set (value: boolean): void

texture

  • get (): TextureBase
  • set (value: TextureBase): void

useSecondaryUV

  • get (): boolean
  • set (value: boolean): void
  • Indicates whether the secondary UV set should be used to map the light map.

    Returns boolean

  • Indicates whether the secondary UV set should be used to map the light map.

    Parameters

    • value: boolean

    Returns void

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

copyFrom

  • Copies the state from a ShadingMethodBase object into the current object.

    Parameters

    Returns void

createBaseMethod

dispatchEvent

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

    method

    dispatchEvent

    Parameters

    • event: EventBase

    Returns void

dispose

  • dispose(): 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

iAddOwner

  • iAddOwner(owner: IMaterial): void

iAddTexture

  • iAddTexture(texture: TextureBase): void

iRemoveOwner

  • iRemoveOwner(owner: IMaterial): void

iRemoveTexture

  • iRemoveTexture(texture: TextureBase): void

invalidate

  • invalidate(): void
  • Returns void

invalidateShaderProgram

  • invalidateShaderProgram(): void
  • Marks the shader program as invalid, so it will be recompiled before the next render.

    internal

    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