Options
Menu

Class SpecularImage2D

Hierarchy

Implements

  • IAsset
  • IAssetAdapter

Index

Constructors

constructor

Properties

_adapter

_adapter: IAssetAdapter

_pFormat

_pFormat: string

_rect

_rect: Rectangle

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
  • Returns string

format

  • get (): string
  • Returns string

glossSource

  • Returns BitmapImage2D

  • Parameters

    Returns void

height

  • get (): number
  • set (value: number): void
  • The height of the image in pixels.

    Returns number

  • The height of the image in pixels.

    Parameters

    • value: number

    Returns void

powerOfTwo

  • get (): boolean
  • set (value: boolean): void
  • Enable POT texture size validation

    Returns boolean

  • Enable POT texture size validation

    Parameters

    • value: boolean

    Returns void

rect

  • get (): Rectangle
  • The rectangle that defines the size and location of the bitmap image. The top and left of the rectangle are 0; the width and height are equal to the width and height in pixels of the BitmapData object.

    Returns Rectangle

specularSource

  • Returns BitmapImage2D

  • Parameters

    Returns void

width

  • get (): number
  • set (value: number): void
  • The width of the bitmap image in pixels.

    Returns number

  • The width of the bitmap image in pixels.

    Parameters

    • value: number

    Returns void

Methods

Private _setSize

  • _setSize(width: number, height: number): void
  • Parameters

    • width: number
    • height: number

    Returns void

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

clone

  • Returns a new SpecularImage2D object that is a clone of the original instance with an exact copy of the contained bitmap.

    Returns SpecularImage2D

    A new SpecularImage2D object that is identical to the original.

dispatchEvent

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

    method

    dispatchEvent

    Parameters

    • event: EventBase

    Returns void

dispose

  • dispose(): void
  • Frees memory that is used to store the SpecularImage2D object.

    When the dispose() method is called on an image, the width and height of the image are set to 0. All subsequent calls to methods or properties of this SpecularImage2D instance fail, and an exception is thrown.

    SpecularImage2D.dispose() releases the memory occupied by the actual bitmap data, immediately(a bitmap can consume up to 64 MB of memory). After using SpecularImage2D.dispose(), the SpecularImage2D object is no longer usable and an exception may be thrown if you call functions on the SpecularImage2D object. However, SpecularImage2D.dispose() does not garbage collect the SpecularImage2D object(approximately 128 bytes); the memory occupied by the actual SpecularImage2D object is released at the time the SpecularImage2D object is collected by the garbage collector.

    Returns void

getCanvas

  • getCanvas(): HTMLCanvasElement
  • Returns HTMLCanvasElement

getImageData

  • getImageData(): ImageData

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

invalidateMipmaps

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