i make a demo,how to remake the tile?
It would be like this:
tileIns.cols = colSlider.value;
tileIns.rows = rowSlider.value;
tileIns.remake(tileIns.items)
but if you shorten the number of items, then you can't make them again.
If you really have nothing special in the tile items, then just dispose() the previous tile and make a new Tile() with the right cols and rows. The remake() is really if you want to use the same tile items and perhaps change something about it like the spacing or the rows and cols - but it will not make new items for you.
1 Like