Perhaps you could render to Canvas/WebGL/WebGPU, but you still need to reproduce the entire engine there.