Skip to content

Conversation

@0x5247
Copy link

@0x5247 0x5247 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.

@netlify
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.

1 participant