-
Notifications
You must be signed in to change notification settings - Fork 481
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
Add support for useDataFromBytes #203
Conversation
@chrfalch ready for review |
@chrfalch I was thinking about useData() and the fact that if you pass a typed array to it, you don't need the async nature of the hook. so maybe overloading the function to have a non-async return type when passing data that can be constructed non-async? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks super nice! Really love this.
I've added one suggestion that I'd like.
const SIZE = width; | ||
|
||
const pixels = new Uint8Array(256 * 256 * 4); | ||
pixels.fill(255); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixes #202