Closed michaeljmcd closed 6 months ago
Thanks! I'm looking forward to trying this out
Experimenting further, I was able to get the bundle down to a single file (embedded WASM) and wrote a wrapper similar to the Python one.
Code is in: https://github.com/michaeljmcd/GNOLL/tree/javascript-bundle
If this looks like a good direction, I can merge these changes into the PR.
The one feature I couldn't readily port was showing a dice breakdown because the browser version doesn't use the temporary file and the breakdown isn't written to stdout.
Just had a go at setting it up - looks great! Very easy to play around with. :) 🚀
The bundled version looks good - the index.html code is very concise if someone wanted to integrate it. If you want to update this PR we can include it
I'll make a ticket for myself to look at allowing dice breakdown to go to stdout in the future + I'll see if I can get some sort of selenium test so any other contributions can be automatically verified.
Excellent. I went ahead and merged javascript-bundle
into javascript-web
.
Fantastic! Thanks for contributing, this should make the library a lot more accessible for people
This change makes it possible to call GNOLL from a web page with the use of some glue code. This is something of a rough pass, so any feedback is appreciated.
Description
printf()
output.How Has This Been Tested
make all jsweb
python3 -m http.server 8003 &> /dev/null &
)index.html
(http://localhost:8003/index.html
in the previous example).Change Type
Checklist