Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TilingSprite

Hierarchy

Implements

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

Protected _anchor

Protected _bounds

_bounds: Bounds

Protected _boundsID

_boundsID: number

Protected _boundsRect

_boundsRect: Rectangle

Protected _cacheAsBitmap

_cacheAsBitmap: boolean

Protected _cacheData

_cacheData: boolean

Protected Readonly _destroyed

_destroyed: boolean

Protected _enabledFilters

_enabledFilters: Filter[] | null

Protected _filters

_filters: Filter[] | null

Protected _height

_height: number

Protected _lastBoundsID

_lastBoundsID: number

Protected _localBoundsRect

_localBoundsRect: Rectangle

Protected _mask

_mask: Graphics | Sprite

Protected _texture

_texture: Texture

Protected _textureID

_textureID: number

Protected _textureTrimmedID

_textureTrimmedID: number

Protected _tint

_tint: number

Protected _tintRGB

_tintRGB: number

Protected _transformID

_transformID: number

Protected _transformTrimmedID

_transformTrimmedID: number

Protected _width

_width: number

accessible

accessible: boolean

accessibleHint

accessibleHint: string | null

accessibleTitle

accessibleTitle: string | null

alpha

alpha: number

anchor

bitmap

bitmap: Bitmap

The image for the tiling sprite.

property

bitmap

blendMode

blendMode: number

buttonMode

buttonMode: boolean

cacheAsBitmap

cacheAsBitmap: boolean

Protected cachedTint

cachedTint: number

children

children: DisplayObject[]

clampMargin

clampMargin: number

Changes frame clamping in corresponding textureTransform, shortcut Change to -0.5 to add a pixel to the edge, recommended for transparent trimmed textures in atlas

default

0.5

cursor

cursor: string

defaultCursor

defaultCursor: string

filterArea

filterArea: Rectangle

filters

filters: Filter[] | null

height

height: number

hitArea

interactive

interactive: boolean

interactiveChildren

interactiveChildren: boolean

localTransform

localTransform: Matrix

mask

name

name: string | null

Protected onChildrenChange

onChildrenChange: (...args: any[]) => void

Type declaration

    • (...args: any[]): void
    • Parameters

      • Rest ...args: any[]

      Returns void

opacity

opacity: number

The opacity of the tiling sprite (0 to 255).

property

opacity

origin

origin: Point

The origin point of the tiling sprite for scrolling.

property

origin

parent

parent: Container

pivot

pluginName

pluginName: string

position

renderable

renderable: boolean

rotation

rotation: number

scale

skew

spriteId

spriteId: number

tabIndex

tabIndex: number

texture

texture: Texture

Protected textureDirty

textureDirty: boolean

tilePosition

tilePosition: ObservablePoint

The offset position of the image that is being tiled

member

{ObservablePoint}

tileScale

tileScale: ObservablePoint

The scaling of the image that is being tiled

member

{ObservablePoint}

tileTransform

tileTransform: Transform

Tile transform

member

{Transform}

tint

tint: number

transform

transform: TransformBase

uvRespectAnchor

uvRespectAnchor: boolean

Whether or not anchor affects uvs

member

{Bool}

default

false

vertexData

vertexData: Float32Array

Protected vertexTrimmedData

vertexTrimmedData: Float32Array

visibility

visibility: boolean

The visibility of the tiling sprite.

property

visible

visible

visible: boolean

width

width: number

worldAlpha

worldAlpha: number

worldTransform

worldTransform: Matrix

worldVisible

worldVisible: boolean

x

x: number

The x coordinate of the tiling sprite.

property

x

y

y: number

The y coordinate of the tiling sprite.

property

y

Static EventEmitter

EventEmitter: { constructor: any; prefixed: string | boolean }

Type declaration

Static prefixed

prefixed: string | boolean

Methods

Protected _cacheAsBitmapDestroy

  • _cacheAsBitmapDestroy(options: boolean | any): void

Protected _calculateBounds

  • _calculateBounds(): void

Protected _calculateCachedBounds

Protected _destroyCachedDisplayObject

  • _destroyCachedDisplayObject(): void

Protected _getCachedLocalBounds

Protected _initCachedDisplayObject

Protected _initCachedDisplayObjectCanvas

Protected _onTextureUpdate

  • _onTextureUpdate(): void

Protected _recursivePostUpdateTransform

  • _recursivePostUpdateTransform(): void

Protected _renderCachedCanvas

Protected _renderCachedWebGL

Protected _renderCanvas

Protected _renderWebGL

addChild

  • addChild<T>(child: T, ...additionalChildren: DisplayObject[]): T

addChildAt

  • addChildAt<T>(child: T, index: number): T

addListener

calculateBounds

  • calculateBounds(): void

Protected calculateTrimmedVertices

  • calculateTrimmedVertices(): void

calculateVertices

  • calculateVertices(): void

Protected containerUpdateTransform

  • containerUpdateTransform(): void

containsPoint

  • containsPoint(point: Point): boolean

destroy

Protected displayObjectUpdateTransform

  • displayObjectUpdateTransform(): void

emit

  • emit(event: string | symbol, ...args: any[]): boolean
  • Calls each of the listeners registered for a given event.

    Parameters

    • event: string | symbol

      The event name.

    • Rest ...args: any[]

      Arguments that are passed to registered listeners

    Returns boolean

    true if the event had listeners, else false.

eventNames

  • eventNames(): Array<string | symbol>

generateTilingTexture

  • generateTilingTexture(arg: boolean): void

getBounds

getChildAt

getChildByName

getChildIndex

getGlobalPosition

  • getGlobalPosition(point?: Point, skipUpdate?: boolean): Point

getLocalBounds

listeners

  • listeners(event: string | symbol): Function[]
  • listeners(event: string | symbol, exists: boolean): boolean

move

  • move(x?: number, y?: number, width?: number, height?: number): void
  • Sets the x, y, width, and height all at once.

    method

    move

    Parameters

    • Optional x: number

      The x coordinate of the tiling sprite

    • Optional y: number

      The y coordinate of the tiling sprite

    • Optional width: number

      The width of the tiling sprite

    • Optional height: number

      The height of the tiling sprite

    Returns void

off

  • off(event: "added" | "removed" | string, fn?: Function, context?: any): this

on

  • on(event: "added" | "removed", fn: (displayObject: DisplayObject) => void, context?: any): this
  • on(event: string, fn: Function, context?: any): this

Protected onAnchorUpdate

  • onAnchorUpdate(): void

once

  • once(event: "added" | "removed", fn: (displayObject: DisplayObject) => void, context?: any): this
  • once(event: string, fn: Function, context?: any): this

removeAllListeners

removeChild

removeChildAt

removeChildren

  • removeChildren(beginIndex?: number, endIndex?: number): DisplayObject[]

removeListener

renderAdvancedWebGL

renderCanvas

renderWebGL

setChildIndex

setFrame

  • setFrame(x: number, y: number, width: number, height: number): void
  • Specifies the region of the image that the tiling sprite will use.

    method

    setFrame

    Parameters

    • x: number

      The x coordinate of the frame

    • y: number

      The y coordinate of the frame

    • width: number

      The width of the frame

    • height: number

      The height of the frame

    Returns void

setMaxListeners

  • setMaxListeners(): this

setParent

setTransform

  • setTransform(x?: number, y?: number, scaleX?: number, scaleY?: number, rotation?: number, skewX?: number, skewY?: number, pivotX?: number, pivotY?: number): DisplayObject

swapChildren

toGlobal

toLocal

trackedPointers

  • trackedPointers(): {}

update

  • update(): void

Private updateTransform

  • updateTransform(): void

updateTransformTS

  • updateTransformTS(): void

Static from

  • from(source: any, width: number, height: number): TilingSprite
  • Helper function that creates a new sprite based on the source you provide. The source can be - frame id, image url, video url, canvas element, video element, base texture

    static

    Parameters

    • source: any

      Source to create texture from

    • width: number

      the width of the tiling sprite

    • height: number

      the height of the tiling sprite

    Returns TilingSprite

    The newly created sprite

Static fromFrame

  • fromFrame(frameId: string, width: number, height: number): TilingSprite
  • Helper function that creates a tiling sprite that will use a texture from the TextureCache based on the frameId The frame ids are created when a Texture packer file has been loaded

    static

    Parameters

    • frameId: string

      The frame Id of the texture in the cache

    • width: number

      the width of the tiling sprite

    • height: number

      the height of the tiling sprite

    Returns TilingSprite

    A new TilingSprite using a texture from the texture cache matching the frameId

Static fromImage

  • fromImage(imageId: string, width: number, height: number, crossorigin?: boolean, scaleMode?: any): TilingSprite
  • Helper function that creates a sprite that will contain a texture based on an image url If the image is not in the texture cache it will be loaded

    static

    Parameters

    • imageId: string

      The image url of the texture

    • width: number

      the width of the tiling sprite

    • height: number

      the height of the tiling sprite

    • Optional crossorigin: boolean
    • Optional scaleMode: any

    Returns TilingSprite

    A new TilingSprite using a texture from the texture cache matching the image id

Generated using TypeDoc