Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » Leopard: Edit Scratch projects as JavaScript code
- zmjj
-
2 posts
Leopard: Edit Scratch projects as JavaScript code
I tried to convert this project: https://scratch.mit.edu/projects/817620383/
There was an error: Cannot read properties of undefined (reading ‘name’)
I'm sure there are no unsupported blocks
Can you find the problem?
There was an error: Cannot read properties of undefined (reading ‘name’)
I'm sure there are no unsupported blocks
Can you find the problem?
- wyslijp16
-
4 posts
Leopard: Edit Scratch projects as JavaScript code
Hi @PullJosh !
Thanks for your work on Leopard, it's fabulous ! A little question about it : is the green flag button mandatory or there is an auto-start option ?
Thanks for your work on Leopard, it's fabulous ! A little question about it : is the green flag button mandatory or there is an auto-start option ?
- PullJosh
-
1000+ posts
Leopard: Edit Scratch projects as JavaScript code
Hi @PullJosh !
Thanks for your work on Leopard, it's fabulous ! A little question about it : is the green flag button mandatory or there is an auto-start option ?
In the index.html file, you will see some html code that creates the green flag button and some javascript code that makes it so that when you click the button, the project starts. You can edit that code to remove the button and make the project start automatically, for example by using window.onload.
- NikoDGreat
-
37 posts
Leopard: Edit Scratch projects as JavaScript code
usually a good idea, but it makes sense for us to break them so that projects remain compatible with Scratch. I've tried to find a way to turn ESLint off for converted projects but haven't found one.Perhaps it could be disabled by adding CodeSandbox uses a tool called ESLint to analyze your JavaScript and give you helpful tips to improve your code. Certain rules, like requiring a yield, or using === instead of ==, areto the top of the file, or including an .eslintrc file turning those rules off (idk if the latter works)/* eslint require-yield: "off", eqeqeq: "off" */
/* eslint disable require-yield, eqeqeq */
- ----toxicDyl----
-
1 post
Leopard: Edit Scratch projects as JavaScript code
Can it be made possible to convert the WHOLE project?
- davidtheplatform
-
500+ posts
Leopard: Edit Scratch projects as JavaScript code
Note that browsers usually require interaction with a webpage before it can play sound, so if you do this the project might be muted until the user clicks something.Hi @PullJosh !
Thanks for your work on Leopard, it's fabulous ! A little question about it : is the green flag button mandatory or there is an auto-start option ?
In the index.html file, you will see some html code that creates the green flag button and some javascript code that makes it so that when you click the button, the project starts. You can edit that code to remove the button and make the project start automatically, for example by using window.onload.
Generation 4: the first time you see this copy and paste it on top of your sig in the scratch forums and increase generation by 1. Social experiment.
- AntiPiracyKid
-
100+ posts
Leopard: Edit Scratch projects as JavaScript code
What about Scratch 4.0?
- DifferentDance8
-
1000+ posts
Leopard: Edit Scratch projects as JavaScript code
I have no clue where you even got a hint Scratch 4 is coming out soon. Even if Scratch 4.0 were to come out after the maintenance update (which is more than likely not the case), I'd imagine it'd take a long time for Leopard to update. What about Scratch 4.0?
“'Common Sense Media' is anything but.” - Za-Chary
- zaid1442011
-
500+ posts
Leopard: Edit Scratch projects as JavaScript code
Bruh Scratch is actually made in JavaScript.
I am a guy who codes weird stuff. Don’t check my GitHub only if you want stupid HTML pages (or something to host them). Check my platformer if you want to see something to see.
Profiles: GitHub.
You won't understand stuff in my signature because I talk about stuff in the ATs (Advanced Topics).
Check out this song for @griffpatch https://scratch.mit.edu/projects/887382049/
- WojtekGame
-
1000+ posts
Leopard: Edit Scratch projects as JavaScript code
However Scratch does a lot of things to run a project as seen in the TW docs: Bruh Scratch is actually made in JavaScript.
that's why. Whenever Scratch executes any block, it has to do a lot of things:Scratch scripts can be yielded, so all of this has to happen in a way that can be paused and resumed later.
- It has to look up the block using its ID and which function the block's opcode corresponds to.
- If the block has inputs, those are also blocks, and must go through the same steps as any other block, and so must any deeper inputs.
- It manually maintains a stack of blocks, loops, conditions, procedures, etc.
Scratch scripts can be changed while they're running, so caching everything ahead of time is difficult.
etc. There is a lot going on in Scratch whenever it executes even a single block.
The interpreter overhead is added on top of the overhead of JavaScript itself. As this code involves many dynamic types, it can be hard for the JavaScript JIT to optimize it.
![](https://u.cubeupload.com/Wojtek_Game/forum.png)
forgot to update sig, i own minecraft months ago lol
maybe even a year at this point
- tpot_lover2
-
3 posts
Leopard: Edit Scratch projects as JavaScript code
What is data.sandboxID? My project isn't translating because of it.
- AntiPiracyKid
-
100+ posts
Leopard: Edit Scratch projects as JavaScript code
OMG DID YOUR ACCOUNT JUST GET HACKED?!?
- randopando3443
-
19 posts
Leopard: Edit Scratch projects as JavaScript code
Same. What is data.sandboxID? My project isn't translating because of it.
- Creeper_TNT_1234
-
1 post
Leopard: Edit Scratch projects as JavaScript code
I convert my games into JavaScript but I couldn't play it on my web and the controls were not responding
can you help me fix this problem
![](http://cdn.scratch.mit.edu/scratchr2/static/__5d56a1729a208cd66a981fc9a4c62225__/djangobb_forum/img/smilies/sad.png)
- eei34
-
1 post
Leopard: Edit Scratch projects as JavaScript code
When I try to upload my project I get this error “Argument sandboxId for data.sandboxId is missing.” can someone help me?
Here is my project: https://scratch.mit.edu/projects/738839342/editor/
Here is my project: https://scratch.mit.edu/projects/738839342/editor/
- isaiah0915
-
1 post
Leopard: Edit Scratch projects as JavaScript code
through firebase, I could saved cloud data. But I don't know how to get the data.. help please
- 615ahmet
-
1 post
Leopard: Edit Scratch projects as JavaScript code
How Can Import to Scratch?
- WojtekGame
-
1000+ posts
Leopard: Edit Scratch projects as JavaScript code
can't help other than through firebase, I could saved cloud data. But I don't know how to get the data.. help please
https://firebase.google.com/docs
When I try to upload my project I get this error “Argument sandboxId for data.sandboxId is missing.” can someone help me?
Here is my project: https://scratch.mit.edu/projects/738839342/editor/
What is data.sandboxID? My project isn't translating because of it.
literally, no one can help with thathttps://scratch.mit.edu/projects/843562348/yes almost everyone is saying about codesandbox's nor leopard's, so please don't say about Hi, uh, my projects wont convert it says Argument sandboxId for data.sandboxId is missing. Here is the project ID, plz help.again.Argument sandboxId for data.sandboxId is missing
![](http://cdn.scratch.mit.edu/scratchr2/static/__5d56a1729a208cd66a981fc9a4c62225__/djangobb_forum/img/smilies/neutral.png)
![](https://u.cubeupload.com/Wojtek_Game/forum.png)
forgot to update sig, i own minecraft months ago lol
maybe even a year at this point
- AntiPiracyKid
-
100+ posts
Leopard: Edit Scratch projects as JavaScript code
If this works, TurboWarp will be creative!