Closed z5h closed 1 year ago
I Wanted to be able to layer tiles, so I implemented my own tilesArea as shown below. But in this case, custom attributes (such as those added with .monochrome) are not rendered.
.monochrome
tiledArea : { rows : Int, tileset : Tileset, background : Background, rowsPerTile : Int } -> List ( ( Int, Int ), Tile msg ) -> Area msg tiledArea params list = PixelEngine.imageArea { height = toFloat <| params.rows * params.tileset.spriteHeight // params.rowsPerTile , background = params.background } (list |> List.map (\( ( col, row ), tile ) -> ( ( toFloat (col * params.tileset.spriteWidth // params.rowsPerTile) , toFloat (row * params.tileset.spriteHeight // params.rowsPerTile) ) , PixelEngine.Image.fromTile tile params.tileset ) ) )
This will not work. For layering tiles, use multipleTiles
I Wanted to be able to layer tiles, so I implemented my own tilesArea as shown below. But in this case, custom attributes (such as those added with
.monochrome
) are not rendered.