MCPcopy Create free account
hub / github.com/HashLips/generative-art-node / getElements

Function getElements

src/main.js:44–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42};
43
44const getElements = path => {
45 return fs
46 .readdirSync(path)
47 .filter((item) => !/(^|\/)\.[^\/\.]/g.test(item))
48 .map((i, index) => {
49 return {
50 id: index + 1,
51 name: cleanName(i),
52 fileName: i,
53 rarity: addRarity(i),
54 };
55 });
56};
57
58const layersSetup = layersOrder => {
59 const layers = layersOrder.map((layerObj, index) => ({

Callers 1

layersSetupFunction · 0.85

Calls 2

cleanNameFunction · 0.85
addRarityFunction · 0.85

Tested by

no test coverage detected