Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CubemapResource

Hierarchy

  • CubeResource
    • CubemapResource

Index

Constructors

constructor

  • new CubemapResource(source: MipmapResourceArray, levels?: number): CubemapResource

Properties

Protected _height

_height: number

Protected _width

_width: number

baseTexture

baseTexture: BaseTexture<Resource, IAutoDetectOptions>

destroyed

destroyed: boolean

internal

internal: boolean

itemDirtyIds

itemDirtyIds: number[]

items

items: ArrayFixed<BaseTexture<Resource, IAutoDetectOptions>, 6>

Readonly length

length: number

levels

levels: number = 1

linkBaseTexture

linkBaseTexture: boolean

Protected onError

onError: Runner

Protected onResize

onResize: Runner

Protected onUpdate

onUpdate: Runner

Static SIDES

SIDES: number

Number of texture sides to store for CubeResources

name

PIXI.CubeResource.SIDES

static
member

{number}

default

6

Accessors

height

  • get height(): number
  • The height of the resource.

    member

    {number}

    readonly

    Returns number

valid

  • get valid(): boolean
  • Has been validated

    readonly
    member

    {boolean}

    Returns boolean

width

  • get width(): number
  • The width of the resource.

    member

    {number}

    readonly

    Returns number

Methods

addBaseTextureAt

  • addBaseTextureAt(baseTexture: BaseTexture<Resource, IAutoDetectOptions>, index: number, linkBaseTexture?: boolean): CubemapResource
  • Parameters

    • baseTexture: BaseTexture<Resource, IAutoDetectOptions>
    • index: number
    • Optional linkBaseTexture: boolean

    Returns CubemapResource

addResourceAt

  • Set a resource by ID

    Parameters

    • resource: Resource
    • index: number

      Zero-based index of resource to set

    Returns CubemapResource

    Instance for chaining

bind

  • bind(baseTexture: BaseTexture<Resource, IAutoDetectOptions>): void
  • Add binding

    override

    Parameters

    • baseTexture: BaseTexture<Resource, IAutoDetectOptions>

      parent base texture

    Returns void

destroy

  • destroy(): void
  • Call when destroying resource, unbind any BaseTexture object before calling this method, as reference counts are maintained internally.

    Returns void

dispose

  • dispose(): void
  • Destroy this BaseImageResource

    override

    Returns void

Protected initFromArray

  • initFromArray(resources: any[], options?: IAutoDetectOptions): void
  • used from ArrayResource and CubeResource constructors

    Parameters

    • resources: any[]

      Can be resources, image elements, canvas, etc. , length should be same as constructor length

    • Optional options: IAutoDetectOptions

    Returns void

load

  • Load all the resources simultaneously

    override

    Returns Promise<CubemapResource>

    When load is resolved

resize

  • resize(width: number, height: number): void
  • Trigger a resize event

    Parameters

    • width: number

      X dimension

    • height: number

      Y dimension

    Returns void

style

  • style(renderer: Renderer): boolean

unbind

  • unbind(baseTexture: BaseTexture<Resource, IAutoDetectOptions>): void
  • Unset the parent base texture

    member

    {PIXI.BaseTexture}

    override

    Parameters

    • baseTexture: BaseTexture<Resource, IAutoDetectOptions>

    Returns void

update

  • update(): void
  • Has been updated trigger event

    Returns void

upload

  • upload(renderer: Renderer, _baseTexture: BaseTexture<Resource, IAutoDetectOptions>, glTexture: GLTexture): boolean
  • Upload the resource

    Parameters

    • renderer: Renderer
    • _baseTexture: BaseTexture<Resource, IAutoDetectOptions>
    • glTexture: GLTexture

    Returns boolean

    true is success

Static test

  • test(source: unknown): source is ArrayFixed<string | Resource, 6>
  • Used to auto-detect the type of resource.

    static

    Parameters

    • source: unknown

      The source object

    Returns source is ArrayFixed<string | Resource, 6>

    true if source is an array of 6 elements

Generated using TypeDoc