Options
All
  • Public
  • Public/Protected
  • All
Menu

Defines the minimum interface to fulfill in order to be a sprite manager.

Hierarchy

Implemented by

Index

Properties

cellHeight: number

Defines the default height of a cell in the spritesheet

cellWidth: number

Defines the default width of a cell in the spritesheet

isPickable: boolean

Gets or sets a boolean indicating if the mesh can be picked (by scene.pick for instance or through actions). Default is true

layerMask: number

Restricts the camera to viewing objects with the same layerMask. A camera with a layerMask of 1 will render spriteManager.layerMask & camera.layerMask!== 0

name: string

Gets manager's name

renderingGroupId: number
scene: Scene

Gets the hosting scene

sprites: Sprite[]

Defines the list of sprites managed by the manager.

texture: Texture

Gets or sets the spritesheet texture

Methods

  • dispose(): void
  • Releases all held resources

    Returns void

  • Tests the intersection of a sprite with a specific ray.

    Parameters

    • ray: Ray

      The ray we are sending to test the collision

    • camera: Camera

      The camera space we are sending rays in

    • Optional predicate: ((sprite: Sprite) => boolean)

      A predicate allowing excluding sprites from the list of object to test

        • Parameters

          Returns boolean

    • Optional fastCheck: boolean

      defines if the first intersection will be used (and not the closest)

    Returns Nullable<PickingInfo>

    picking info or null.

  • Intersects the sprites with a ray

    Parameters

    • ray: Ray

      defines the ray to intersect with

    • camera: Camera

      defines the current active camera

    • Optional predicate: ((sprite: Sprite) => boolean)

      defines a predicate used to select candidate sprites

        • Parameters

          Returns boolean

    Returns Nullable<PickingInfo[]>

    null if no hit or a PickingInfo array

  • rebuild(): void
  • Rebuilds the manager (after a context lost, for eg)

    Returns void

  • render(): void
  • Renders the list of sprites on screen.

    Returns void

Legend

  • Constructor
  • Property
  • Method
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Property
  • Method
  • Static method

Settings

Theme