I discovered recently the internet site JSweet, which transpiles Java source code to Typescript and Javascript.
You can transpile your code in a sandbox online. In the examples proposed on the site, there is a small ray tracer.
I tested it and the transpilation works fine. But the JS code generated is in the ES5 syntax. So I decided to rewrite it with the ES6 syntax of Javscript, and to optimize it by using Promises.

You'll find more informations on the github of this mini-project : Ray Tracer