Open hurtwolf opened 3 years ago
Yo, i thought i'd contribute to the project since i was messing with dynamically loading of the layers..
const layers = []; const setLayers = () => { return ( fs .readdirSync(`${dir}/gen_${gen}/`) // .filter((item) => !/(^|\/)\.[^\/\.]/g.test(item)) .map((folder, i) => { layers.push({ id: i + 1, gen: gen, name: folder, location: `${dir}/gen_${gen}/${folder}/`, elements: getElements(`${dir}/gen_${gen}/${folder}/`), position: { x: 0, y: 0 }, size: { width: width, height: height }, }) }) ); };
Note that I'm not an experience coder, but it works well. (obviously its edited for my project). That also remind me, mixing different layers (generations) would be a cool tutorial! Keep it up.
Hi Thank you for contributing, I will be having a look, and then we can see how we can incorporate it in the latest update.
Yo, i thought i'd contribute to the project since i was messing with dynamically loading of the layers..
Note that I'm not an experience coder, but it works well. (obviously its edited for my project). That also remind me, mixing different layers (generations) would be a cool tutorial! Keep it up.