UNPKG

@phaser-plus/perspective2d

Version:

Create games with a linearly transformed projection

53 lines (52 loc) 1.19 kB
export default Grid; declare class Grid extends GameObject { STYLE: { GRID: number; LINES: number; }; /** @private */ private TEXTURE_KEY; /** @private */ private TILE_PRECISION; /** * @private * @type {GameObjects.Graphics} */ private canvas; /** * @private * @type {GameObjects.TileSprite} */ private gridTile; setColors(gridColor: any, lineColor: any): void; /** @private */ private setCanvasStyle; /** * * @param {Structs.Matrix2} matrix */ setProjection(matrix: Structs.Matrix2): void; /** * * @param {Cameras.Scene2D.Camera} camera */ move(camera: Cameras.Scene2D.Camera): void; /** * @private * @param {Structs.Matrix2} matrix * @param {M.Vector2} tile */ private drawGridTiles; /** @private */ private drawLinearTiles; /** @private */ private drawBackground; /** * @private * @param {Structs.Matrix2} matrix */ private getProjectionTileSize; } import { GameObject } from "@phaser-plus/core"; import { Structs } from "@phaser-plus/core"; import { Cameras } from "phaser";