Thank you! Yes, performance will definitely be challenging. In retrospect I've made many dumb choices when building the engine but hopefully I can mitigate it. Would be really sad if I had to add artificial restrictions just because the engine can't handle scaling a big factory.
Hey! (Didn't see the reply until now.) It's all JavaScript. The biggest problem is that I can't share arbitrary memory between threads so I have this convoluted solution that would be completely unnecessary in other languages. The simulation wouldn't be possible without multithreading so it's kind of frustrating but still fun to work on!