Total RP 3: Extended

Total RP 3: Extended

903k Downloads

Wild idea: use JavaScript for script effect

Ellypse opened this issue ยท 0 comments

commented

Wild idea: run JavaScript effect (transpiled into Lua)
Script editors offers toggles to switch between Lua and JavaScript syntax. Script is saved in JS and transpiled on first run (cached then), so we can provide fixes on transpiler in updates.

  • Lua APIs exposed as JS global functions.
  • Provide JS features, like this = self, binding this inside scope when using () => {} syntax, start arrays at 0, ternary operators, ES6 spread ... operator.

This will require A LOT of regex, so I'm putting in here as a wild idea to do someday, if I ever become good at regex. Maybe look for an existing JS => Lua transpiler.