I'm using Love2D for a project. My goal is to release it as a standalone executable, but until then I've setup love.js so that I can quickly share my progress. However, some things in the project don't fully work right with love.js (bit require for example), and some behaviors aren't probably the best when using my project in the browser.
I was wondering whether there might be a way, from the love lua code, to detect whether the project is running under love.js. Then I could skip certain imports or slightly tweak things for the browser export, while keeping everything the same for a normal deployment.
I'm using Love2D for a project. My goal is to release it as a standalone executable, but until then I've setup love.js so that I can quickly share my progress. However, some things in the project don't fully work right with love.js (
bit
require for example), and some behaviors aren't probably the best when using my project in the browser.I was wondering whether there might be a way, from the love lua code, to detect whether the project is running under love.js. Then I could skip certain imports or slightly tweak things for the browser export, while keeping everything the same for a normal deployment.