Skip to content

wasm #25

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

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

wasm #25

wants to merge 1 commit into from

Conversation

nuria-fl
Copy link
Contributor

svelte + wasm because why not 🤯

let start = null;

const handleStats = timestamp => {
const elapsedTime = timestamp - start;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this have if (start == null) { start = timestamp; return; } ?

const elapsedTime = timestamp - start;
start = timestamp;
decrease_stats(stats, elapsedTime / 1000);
stats = stats; // pffffff
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Svelte's neatness? Maybe rewriting as:

stats = decrease_stats(stats, elapsedTime / 1000);

would make it less weird

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately this won't work because decrease_stats doesn't return the stats, since it's a borrowed reference and AFAIK it's not possible at the moment to do that with wasm-bindgen.
Anyway, this was just to try out wasm, I'm not gonna move forward with this at least for a few months (too much unsupported stuff). Thanks for your comments though!

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.

2 participants