HashLips / generative-art-opensource

Create generative art by using the canvas api and node js, feel free to contribute to this repo with new ideas.
MIT License
1.36k stars 695 forks source link

weight not work properly :( #78

Closed jayvi closed 2 years ago

jayvi commented 2 years ago

always get me id 0 and id 1 everything else passing it (this is just example of one of elements is same for other layers also)

{ name: "XXXX", elements: [ { id: 0, name: "asd1", path: ${dir}/3-shoulder/9.png, weight: 10, }, { id: 1, name: "asd2", path: ${dir}/3-shoulder/1.png, weight: 10, }, { id: 2, name: "asd3", path: ${dir}/3-shoulder/2.png, weight: 10, }, { id: 3, name: "asd4", path: ${dir}/3-shoulder/11.png, weight: 10, }, { id: 4, name: "ads5", path: ${dir}/3-shoulder/4.png, weight: 10, }, { id: 5, name: "asd6", path: ${dir}/3-shoulder/5.png, weight: 10, }, { id: 6, name: "asd7", path: ${dir}/3-shoulder/6.png, weight: 50, }, ], position: { x: 0, y: 0 }, size: { width: width, height: height }, }

muhamaddigdaya commented 2 years ago

He explains on https://www.youtube.com/watch?v=qmpuvGdI0w4 within minute " 12:55 "

jayvi commented 2 years ago

thanks guys appreciate it worked :)