Skip to content

1681-engine / index / updateAutotile

Function: updateAutotile() ​

ts
function updateAutotile(
   grid, 
   set, 
   out, 
   x, 
   y
): number[];

Defined in: src/tilemap/autotile.ts:194

After cell (x, y) changed terrain, retiles it and its eight neighbours (the only cells whose masks can change) into out. Returns the indices whose tile actually changed, so a view repaints only those.

Parameters ​

ParameterType
gridTerrainGrid
setAutotileRuleSet
outUint32Array
xnumber
ynumber

Returns ​

number[]

Released under the MIT License.