-
Notifications
You must be signed in to change notification settings - Fork 914
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Canvas is not clearing, generative images are overlapping #111
Comments
I have the same problem if you found the solution help me 🙏 |
for(let i = 1; i <= edition; i++){
ctx.clearRect(0, 0, canvas.width, canvas.height);
for (const layer of layers) await drawLayer(layer, i);
console.log("Creating edition " + i);
};
This works for me. 😁✌️
…On Wed, 1 Dec 2021 at 8:51 AM, Marssurterre ***@***.***> wrote:
I have the same problem if you found the solution help me 🙏
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#111 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AWRSAI6GQZOTESRGDFTPEWLUOUTMFANCNFSM5IZPJUXQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
You place it where exactly (main. Js)?? thank you 🙈 const createFiles = async edition => { let numDupes = 0; |
Hi Guys, I am having this very problem and for some reason, I can not get my head around it and a fix. Please can someone help me? |
i had this issue, the cause was an extra blank line in the layers list. once i cleaned up my code it went away |
I have do a PR to correct this one #145 My solution is more simple. Just reset the canvas to the inital state 😄 |
if (numDupes > edition) break; //prevents infinite loop if no more unique items can be created SyntaxError: Illegal break statement |
@uniteXander I think you need check your main.js refer to the original file. Check the line 147 of main.js It's a correct way to break into for loop. But in your code you close the for loop at line 139 😃 🤔 |
also @alfreddagenais thank you for responding! |
It stopped doing this with your edits! Thanks again! |
I'm having a problem where the output images are on top of each other.
For Example:
First generated image is wearing a black hat.
Second generated image is generated with no hat but the black hat from image one is still showing.
I have tried :
ctx.clearRect(0, 0, canvas.width, canvas.height);
but have had no luck as I'm not sure where it has to go.I have been following the tutorial on youtube Code generative art for NFT in node.js .
Thank you.
The text was updated successfully, but these errors were encountered: