(_element)
| 60 | |
| 61 | // prepare attributes for the given element to be used as metadata |
| 62 | const getAttributeForElement = (_element) => { |
| 63 | let selectedElement = _element.layer.selectedElement; |
| 64 | let attribute = { |
| 65 | name: selectedElement.name, |
| 66 | rarity: selectedElement.rarity, |
| 67 | }; |
| 68 | return attribute; |
| 69 | }; |
| 70 | |
| 71 | // loads an image from the layer path |
| 72 | // returns the image in a format usable by canvas |