in this project, I made a block that takes a chunk, and outputs a stitched costume for it. the chunk is an 18x24 table, where each item in the table is either nothing, a zero, or a dictionary list where one of the keys is "texture". the value of that key is a 20x20 pixel costume. the block should report all of the costumes stitched together according to their order in the table, with the non-lists replaced by a transparent 20x20 costume. unfortunately, the block is too slow, and it slows down everything else. can it be made faster? also, how could this be implemented in a JS function?
an example of a chunk:
one of the blocks in the chunk:
(these are what the sublists in the above table are, although they may have different data)
a visualization of the costumes in the chunk:
(this is not a piece of data that the program can actually access, it is just for visualization purposes)
the result costume when given the above example chunk as input:
(the example chunk is stored in the variable "debug var" in the project)