Made a small ray casting prototype with Kotlin/WASM and calling the Canvas API to do all the drawing (I really couldn't be bothered with WebGL). You can test it out here actually:
https://kenta.codeberg.page/Rayboy-WASM/@pages/ source code
https://codeberg.org/Kenta/Rayboy-WASM
I'm really no expert programmer nor that good in Kotlin so the code might stink (but pointers are really welcomed).
I was actually wondering, is there any difference with using WASM rather than pure Kotlin/JS for this? Would WASM provide some sort of performance increase compared to just using Kotlin/JS, even if small?