Options
All
  • Public
  • Public/Protected
  • All
Menu

Class used to manage a grid restricted sprite deployment on an Output plane.

Hierarchy

  • SpriteMap

Implements

Index

Constructors

  • Creates a new SpriteMap

    Parameters

    • name: string

      defines the SpriteMaps Name

    • atlasJSON: ISpriteJSONAtlas

      is the JSON file that controls the Sprites Frames and Meta

    • spriteSheet: Texture

      is the Texture that the Sprites are on.

    • options: ISpriteMapOptions

      a basic deployment configuration

    • scene: Scene

      The Scene that the map is deployed on

    Returns SpriteMap

Properties

atlasJSON: ISpriteJSONAtlas

The JSON file with the frame and meta data

name: string

The Name of the spriteMap

Arguments passed with the Constructor

spriteSheet: Texture

The systems Sprite Sheet Texture

Public Sprite Storage array, parsed from atlasJSON

Accessors

  • Sets the AnimationMap

    Returns RawTexture

  • Sets the AnimationMap

    Parameters

    Returns void

  • Returns the Position of Output Plane

    Returns Vector3

  • Returns the Position of Output Plane

    Parameters

    Returns void

  • Returns the Rotation of Output Plane

    Returns Vector3

  • Returns the Rotation of Output Plane

    Parameters

    Returns void

  • get spriteCount(): number
  • Returns the Number of Sprites in the System

    Returns number

Methods

  • addAnimationToTile(cellID?: number, _frame?: number, toCell?: number, time?: number, speed?: number): void
  • Modifies the data of the animationMap

    Parameters

    • Optional cellID: number

      is the Index of the Sprite

    • Optional _frame: number

      is the target Animation frame

    • Optional toCell: number

      is the Target Index of the next frame of the animation

    • Optional time: number

      is a value between 0-1 that is the trigger for when the frame should change tiles

    • Optional speed: number

      is a global scalar of the time variable on the map.

    Returns void

  • changeTiles(_layer: undefined | number, pos: Vector2 | Vector2[], tile?: number): void
  • Modifies the data of the tileMaps

    Parameters

    • _layer: undefined | number

      is the ID of the layer you want to edit on the SpriteMap

    • pos: Vector2 | Vector2[]

      is the iVector2 Coordinates of the Tile

    • Optional tile: number

      The SpriteIndex of the new Tile

    Returns void

  • dispose(): void
  • Release associated resources

    Returns void

  • Gets the UV location of the mouse over the SpriteMap.

    Returns Vector2

    Vector2 the UV position of the mouse interaction

  • Returns tileID location

    Returns Vector2

    Vector2 the cell position ID

  • loadTileMaps(url: string): void
  • Imports the .tilemaps file

    Parameters

    • url: string

      of the .tilemaps file

    Returns void

  • saveTileMaps(): void
  • Exports the .tilemaps file

    Returns void

Legend

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

Settings

Theme