It is not fully refined, and is more of a proof of concept. If you can make it faster or less buggy, remix this project.
@Xip333 for renderer Turbowarp is highly recommended: https://www.turbowarp.org/1385038570