We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have this code, can you explain why this doesn't show any result?
var c = document.getElementById("c2"); var ctx = c.getContext("2d"); // Create gradient var grd = ctx.createLinearGradient(0, 0, 200, 0); grd.addColorStop(0, "red"); grd.addColorStop(1, "white"); // Fill with gradient ctx.fillStyle = grd; ctx.fillRect(10, 10, 150, 80); /*webassembly*/ let wam; loadWASM() .then(module => { wam = module; }).catch((err) => { console.log('Error in fetching module: ', err); }).then(() => { window.onload = (() => { var pixels = ctx.getImageData(0, 0, 400, 300); //console.log(pixels); var xx = pixels.data.set(wam.goodMorning(pixels.data, 400, 300)); //var xx = wam.goodMorning(pixels.data, 400, 300); //console.log(xx); pixels.data.set(xx); })(); });
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I have this code, can you explain why this doesn't show any result?
The text was updated successfully, but these errors were encountered: