UNPKG

@woosh/meep-engine

Version:

Pure JavaScript game engine. Fully featured and production ready.

54 lines 1.4 kB
export class GridCellPlacementRule { /** * * @param {CellMatcher} matcher * @param {GridCellAction[]} [actions] * @param {GridCellAction} action * @param {number|CellFilter} [probability] * @param {Vector2} [offset] * @param {boolean} [allowRotation] * @returns {GridCellPlacementRule} */ static from({ matcher, actions, action, probability, offset, allowRotation }: CellMatcher): GridCellPlacementRule; /** * * @type {CellMatcher} */ pattern: CellMatcher; /** * * @type {CellFilter} */ probability: CellFilter; /** * * @type {Vector2} */ positionOffset: Vector2; /** * * @type {GridCellAction} */ action: GridCellAction; /** * * @type {boolean} */ allowRotation: boolean; /** * * @param {GridData} grid * @param {number} seed */ initialize(grid: GridData, seed: number): void; /** * Write placement tags into the grid at a given position, the tag pattern will be rotated as specified * @param {GridData} grid * @param {number} x * @param {number} y * @param {number} rotation in Radians */ execute(grid: GridData, x: number, y: number, rotation: number): void; } import Vector2 from "../../core/geom/Vector2.js"; //# sourceMappingURL=GridCellPlacementRule.d.ts.map