Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TextureOptions

The TextureOptions class specifies options for loading textures with the Texture.fromData and Texture.fromTextureBase methods.

Hierarchy

  • TextureOptions

Index

Constructors

constructor

  • new TextureOptions(scale?: number, mipMapping?: boolean, format?: string, premultipliedAlpha?: boolean, forcePotTexture?: boolean): TextureOptions

Properties

forcePotTexture

forcePotTexture: boolean

Indicates if the underlying Stage3D texture should be created as the power-of-two based Texture class instead of the more memory efficient RectangleTexture. That might be useful when you need to render the texture with wrap mode repeat. @default false

format

format: string

The Context3DTextureFormat of the underlying texture data. Only used for textures that are created from Bitmaps; the format of ATF files is set when they are created. @default BGRA

mipMapping

mipMapping: boolean

Indicates if the texture contains mip maps. @default false

onReady

onReady: function

If this value is set, the texture will be loaded asynchronously (if possible). The texture can only be used when the callback has been executed.

This is the expected definition: function(texture:Texture):void;

@default null

Type declaration

    • (Texture: any): void
    • Parameters

      • Texture: any

      Returns void

optimizeForRenderToTexture

optimizeForRenderToTexture: boolean

Indicates if the texture will be used as render target.

premultipliedAlpha

premultipliedAlpha: boolean

Indicates if the alpha values are premultiplied into the RGB values. This is typically true for textures created from BitmapData and false for textures created from ATF data. This property will only be read by the Texture.fromTextureBase factory method. @default true

scale

scale: number

The scale factor, which influences width and height properties. If you pass '-1', the current global content scale factor will be used. @default 1.0

Methods

clone

copyFrom

Protected get_forcePotTexture

  • get_forcePotTexture(): boolean

Protected get_format

  • get_format(): string

Protected get_mipMapping

  • get_mipMapping(): boolean

Protected get_onReady

  • get_onReady(): function

Protected get_optimizeForRenderToTexture

  • get_optimizeForRenderToTexture(): boolean

Protected get_premultipliedAlpha

  • get_premultipliedAlpha(): boolean

Protected get_scale

  • get_scale(): number

Protected set_forcePotTexture

  • set_forcePotTexture(value: boolean): boolean

Protected set_format

  • set_format(value: string): string

Protected set_mipMapping

  • set_mipMapping(value: boolean): boolean

Protected set_onReady

  • set_onReady(value: function): function

Protected set_optimizeForRenderToTexture

  • set_optimizeForRenderToTexture(value: boolean): boolean

Protected set_premultipliedAlpha

  • set_premultipliedAlpha(value: boolean): boolean

Protected set_scale

  • set_scale(value: number): number

Generated using TypeDoc