I am thinking of developing a game in pure JavaScript and html5, without using any third party plugins. The problem I am facing is that I cannot find a way to separate different "modules" of the game into separate threads, like the render job, game logic, asset loading and so on.
Web Workers seem to be able to separate code into different threads, but the problem with them is the limited information I can pass between them. For example, for the render job, I need to pass the whole "world", with all the entities, meshes, textures and so on for every update of the game, because worker threads cannot share memory. It can be optimized, like sending the static objects only on initialization (meshes, textures) and then send only the state of an object on update (it's world transform) but it still isn't desirable.
Is there a way to send large data between them or have them share some objects? Or is there a different method entirely of achieving true multithreading? I know there are easier ways of achieving this using plugins/ gears but I need to use only methods available in open web;