Skip to content
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

Added C language demo to the 'reading-and-writing-graphics' example #171

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

arjitGeo
Copy link

@arjitGeo arjitGeo commented Mar 20, 2024

Firstly, I would like to tell you that this wasm-by-example project really helped me in solidifying my knowledge of WebAssembly.

In an effort to contribute back to this project, I’ve added a example for the C language in the ‘reading-and-writing-graphics’ section.

In this example, I’ve tried to keep the index.js file consistent with the one in the AssemblyScript example. While there might be room for simplification and improvement, I believe maintaining consistency across examples would be better.

Also the booleans to check if the current square is dark or light can be brought down this single condition (x % 2 == y % 2). I didn't do that in order to stay consistent.

Please note that this example does not use Emscripten.

I hope this contribution is useful. If it is, I’d be more than happy to continue doing more contributions.

Copy link

netlify bot commented Mar 20, 2024

Deploy Preview for wasmbyexample ready!

Name Link
🔨 Latest commit 64e39b8
🔍 Latest deploy log https://app.netlify.com/sites/wasmbyexample/deploys/65fad9ac573b04000860e83b
😎 Deploy Preview https://deploy-preview-171--wasmbyexample.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant