Options
Menu

Class NormalSimpleWaterMethod

NormalSimpleWaterMethod provides a basic normal map method to create water ripples by translating two wave normal maps.

Hierarchy

Implements

  • IAsset
  • IAssetAdapter

Index

Constructors

constructor

  • Creates a new NormalSimpleWaterMethod object.

    Parameters

    • Default value normalMap: TextureBase = null
    • Default value secondaryNormalMap: TextureBase = null

    Returns NormalSimpleWaterMethod

Properties

_adapter

_adapter: IAssetAdapter

_counts

_counts: Array<number>

_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 DEFAULT_NAMESPACE

DEFAULT_NAMESPACE: string

Static ID_COUNT

ID_COUNT: number

Static assetType

assetType: string

Accessors

assetType

  • get (): string

secondaryNormalMap

  • get (): TextureBase
  • set (value: TextureBase): void
  • A second normal map that will be combined with the first to create a wave-like animation pattern.

    Returns TextureBase

  • A second normal map that will be combined with the first to create a wave-like animation pattern.

    Parameters

    • value: TextureBase

    Returns void

texture

  • get (): TextureBase
  • set (value: TextureBase): void
  • A texture to modulate the direction of the surface for each texel (normal map). The default normal method expects tangent-space normal maps, but others could expect object-space maps.

    Returns TextureBase

  • A texture to modulate the direction of the surface for each texel (normal map). The default normal method expects tangent-space normal maps, but others could expect object-space maps.

    Parameters

    • value: TextureBase

    Returns void

water1OffsetX

  • get (): number
  • set (value: number): void
  • The translation of the first wave layer along the X-axis.

    Returns number

  • The translation of the first wave layer along the X-axis.

    Parameters

    • value: number

    Returns void

water1OffsetY

  • get (): number
  • set (value: number): void
  • The translation of the first wave layer along the Y-axis.

    Returns number

  • The translation of the first wave layer along the Y-axis.

    Parameters

    • value: number

    Returns void

water2OffsetX

  • get (): number
  • set (value: number): void
  • The translation of the second wave layer along the X-axis.

    Returns number

  • The translation of the second wave layer along the X-axis.

    Parameters

    • value: number

    Returns void

water2OffsetY

  • get (): number
  • set (value: number): void
  • The translation of the second wave layer along the Y-axis.

    Returns number

  • The translation of the second wave layer along the Y-axis.

    Parameters

    • value: number

    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

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