Reference · Tile and table elements
rackPlacesfunction
Where each of count tiles lies, in order: the first at x 0, each a step on, groups set apart, raised tiles lifted.
Import it
import { rackPlaces } from "@johnmorrisdotca/jarajara/element";
Definition
function rackPlaces(count: number, options?: RackLayoutOptions): RackPlace[]
Parameters
| Name | Type | Description |
|---|---|---|
count | number | The number of rack tiles or sounds requested. |
options (optional) | RackLayoutOptions | Native game, SVG, sound or presentation options. |
Returns
RackPlace[]
Where each of count tiles lies, in order: the first at x 0, each a step on, groups set apart, raised tiles lifted.
Examples
import { rackPlaces } from "@johnmorrisdotca/jarajara/element";
console.log(rackPlaces(3,{breaks:[1]}));[ { x: 0, y: 0 }, { x: 1.47, y: 0 }, { x: 2.49, y: 0 } ]What it prints (run when this page was built)