-
-
Notifications
You must be signed in to change notification settings - Fork 213
How do I copy the JavaScript
You can't.
Work on allowing users to package TurboWarp is ongoing.
The code generated by TurboWarp is not designed to be read or edited by humans. Attempting to do so would be actively harmful to one's learning. In order to maintain compatibility with Scratch projects and the Scratch VM, many unusual things are done. For example, in regular JavaScript accessing a list item is as simple as myList[myIndex]
, but TurboWarp does (a0.value[(a1.value | 0) - 1] ?? "")
or listGet(a0, a1.value)
depending on what assumptions it can make. And yes, a0
and a1
are real variable names that TurboWarp will use. Also note that listGet
is not a standard JavaScript function, it's part of the TurboWarp runtime.
For a project that intends to output readable JavaScript, check out Leopard.
You can view the JavaScript code in your browser console. The scripts are logged there when they are compiled.