In Action
Here's an example of a board using varaity of optoin available -
const item1 = {
cols: 5,
rows: 7,
margin: 8,
skip: [
{start: {c: 0, r: 3}, end: {c: 4, r: 3}}
],
color: 0xeaee87,
callback: (item) => {
item.alpha = 0.6;
}
}
let boards = this.add.board(this, item1, {
items: "items",
cols: item1.cols,
rows: item1.rows,
skip: item1.skip,
scale: 0.5,
min: 3,
max: 7
}, {
items: "items",
skip: item1.skip,
chance: 50,
min: 2,
max: 2,
scale: 0.4,
parent: 0,
offset: {
x: 30,
y: -30
}
}, {
type: 'global',
applyScale: true
});
/* if you want to see the board properties */
console.log(boards)
/* for example */
let items1 = boards.items[0]; // for the first board from the list