Skip to content

pixi-parallax-layer.component overview


Table of contents


utils

PixiParallaxLayerComponent (class)

pixi.js implementation of IParallaxLayer2dComponent: a TilingSprite living in the scene's world container (so it sorts by zIndex against everything else), resized and re-offset by each renderer, right before it draws, to cover that renderer's view. The engine never moves it through position; use offset instead.

Signature

export declare class PixiParallaxLayerComponent {
  constructor(options: ParallaxLayer2dOpts<Texture>)
}

updateView (method)

Places the layer for one view: center is the camera position, halfExtent half the size of the world-space area the view can show (already accounting for zoom and rotation).

Signature

public updateView(center: Point2, halfExtent: Point2): void

addToWorld (method)

Signature

addToWorld(world: PixiGgWorld): void

removeFromWorld (method)

Signature

removeFromWorld(world: PixiGgWorld, dispose?: boolean): void

clone (method)

Signature

clone(): PixiParallaxLayerComponent

dispose (method)

Signature

dispose(): void

nativeSprite (property)

Signature

readonly nativeSprite: TilingSprite