Discuss Scratch

pelofan_251
Scratcher
3 posts

Leopard: Edit Scratch projects as JavaScript code

PullJosh wrote:

Please use this thread to discuss Leopard, share your projects, and ask for help.


That's right! Translating Scratch to JavaScript is now possible! The tool is called Leopard, and it's available here:

Leopard Website – Go here to convert your projects!

Who needs this?
Scratch is amazing. This is the place where I learned to code almost 9 years ago. I love the Scratch community, and the fact that it's so easy to get started with Scratch. However, many of the features that make it easy to start using Scratch also make it underpowered for more experienced programmers.

With a different programming language like JavaScript, you get:
  • More features: You can do cool tricks that simply aren't possible with Scratch.
  • Speed: Your projects run faster and lag isn't as problematic.
  • Publishing options: Run your projects on any website, not just Scratch.
If you want to try a different programming language but find it difficult to get started, Leopard can help.

How is this different than Phosphorus?
Phosphorus is awesome, but it's a little different than Leopard. With Leopard you can view and edit the translated JavaScript code yourself.

What if it doesn't work?
Not every project will translate perfectly.
  • Only projects created using Scratch 3.0 can be translated. If you created your project using Scratch 2.0 or older, you'll need to open it up in the Scratch 3.0 editor, make a small change, and then try again.
  • Some Scratch blocks are not yet supported. Check the translations page to see which blocks have JavaScript equivalents using Leopard. More blocks will be supported over time.
  • Extension blocks won't work (except pen, which works great!)
  • Sometimes there are little inconsistencies. We've done our best to make sure Leopard behaves exactly the same as Scratch, but there will always be little cases we haven't considered. It's possible that your scripts will run slightly out of order, be a little too fast, or some other issue. Fortunately, you can edit the JavaScript code to fix those issues, and I'm happy to help.

Upcoming Improvements
Based on the feedback I'm seeing on the forums and in comments, these are the top-priority issues to solve (most important first):
  1. Sprite layering doesn't work! go to front/back & go forward/backward blocks need to be implemented. Sprite layering now works in Leopard!
  2. Projects run too fast! Leopard projects currently run at 60fps, but it should also be possible to slow them down to 30fps. Frame rate is now a configuration option, and the default is 30fps–the same as Scratch.
  3. Variable watchers don't work Variable watchers now work in Leopard!
  4. If touching edge and if on edge, bounce blocks don't work.
  5. Lots of little bugs that all add up to cause issues

Thank you so much to the contributors who made Leopard possible!

i tried it with my friday night funkin mod and apparently leopard.com can't support it because it's outdated
TheSmartGuy1234
Scratcher
1000+ posts

Leopard: Edit Scratch projects as JavaScript code

loool avast
kccuber
Scratcher
1000+ posts

Leopard: Edit Scratch projects as JavaScript code

TheSmartGuy1234 wrote:

loool avast
try leopardjs.com
MagicCrayon9342
Scratcher
1000+ posts

Leopard: Edit Scratch projects as JavaScript code

TheSmartGuy1234 wrote:

(#508)
loool avast
I recommend ANYTHING other than Avast for that EXACT reason. Heck, use Windows defender instead please!
_SNIPR-
Scratcher
37 posts

Leopard: Edit Scratch projects as JavaScript code

MagicCrayon9342 wrote:

TheSmartGuy1234 wrote:

(#508)
loool avast
I recommend ANYTHING other than Avast for that EXACT reason. Heck, use Windows defender instead please!
Yes I'm with you.
Poyten
Scratcher
1 post

Leopard: Edit Scratch projects as JavaScript code

my rotations i set to left and right don't stay clamped and instead go all around
scratch 3.0
EKJXRF
Scratcher
10 posts

Leopard: Edit Scratch projects as JavaScript code

Мой конвертированый платформер работает не правильно.
20sellerse
Scratcher
1 post

Leopard: Edit Scratch projects as JavaScript code

When I try to convert https://scratch.mit.edu/projects/602930541 it said:

There was an error converting your project.

Cannot read property ‘find’ of undefined

Leopard only supports new projects (created in Scratch 3.0). And the only supported extension is “pen”; all others will fail.

If you aren't sure why your project is failing, ask on the forums!
auracoder
Scratcher
12 posts

Leopard: Edit Scratch projects as JavaScript code

is there a way for it to transfer a scratch download? my project is to big for scratch
TechNerd64
Scratcher
500+ posts

Leopard: Edit Scratch projects as JavaScript code

My BEAM engine won't load it says
There was an error converting your project.

Cannot read property ‘find’ of undefined/quote] And the only extension it uses is the pen HELP!!!
UnoriginalName7
New Scratcher
1 post

Leopard: Edit Scratch projects as JavaScript code

I just uploaded my project onto leopard and it isn't working. I think it has to do something with a block: ‘wait“pick random 1 to 7” seconds’. On leopard it's come up as: yield* this.wait(this.random(1, 7)); This is what the manual section says as well. Any help please?
PullJosh
Scratcher
1000+ posts

Leopard: Edit Scratch projects as JavaScript code

UnoriginalName7 wrote:

I just uploaded my project onto leopard and it isn't working. I think it has to do something with a block: ‘wait“pick random 1 to 7” seconds’. On leopard it's come up as: yield* this.wait(this.random(1, 7)); This is what the manual section says as well. Any help please?
That seems like the correct code. Is it not working?
Moooshroom
Scratcher
1 post

Leopard: Edit Scratch projects as JavaScript code

for an odd reason the site Leopard can't convert a few of my projects i was a bit curious why that is if possible i could use a few reasons if there are any known ones
moonwatcher348
Scratcher
100+ posts

Leopard: Edit Scratch projects as JavaScript code

Getting an error for https://scratch.mit.edu/projects/660455669:
{“error”: "This endpoint requires the params `files` or `parameters` in order to work. See https://codesandbox.io/docs/importing#create-wizard for more details."}
IanTire1
Scratcher
6 posts

Leopard: Edit Scratch projects as JavaScript code

for some reason whenever i try to convert a project to java script it says “Cannot read property ‘name’ of undefined”.
PullJosh
Scratcher
1000+ posts

Leopard: Edit Scratch projects as JavaScript code

IanTire1 wrote:

for some reason whenever i try to convert a project to java script it says “Cannot read property ‘name’ of undefined”.
That's weird! Is that the full error message? Can you send a screenshot of the problem or more details about what's going wrong? Which project isn't working?
ego-lay_atman-bay
Scratcher
500+ posts

Leopard: Edit Scratch projects as JavaScript code

PullJosh wrote:

IanTire1 wrote:

for some reason whenever i try to convert a project to java script it says “Cannot read property ‘name’ of undefined”.
That's weird! Is that the full error message? Can you send a screenshot of the problem or more details about what's going wrong? Which project isn't working?

That's actually a normal js error message. It's just saying the property ‘name’ of an object is undefined. I don't how to fix it though.
jakesgamerpattern
Scratcher
8 posts

Leopard: Edit Scratch projects as JavaScript code


Show text
I kinda wish there was at least some support for scratch lab. also, Instead of typing a URL, you could import a project from your computer!
Doreamon-Minecraft
Scratcher
4 posts

Leopard: Edit Scratch projects as JavaScript code

Font is not working!
Sabo3
Scratcher
24 posts

Leopard: Edit Scratch projects as JavaScript code

Hi, I get this error: {“error”:"This endpoint requires the params `files` or `parameters` in order to work. See https://codesandbox.io/docs/importing#create-wizard for more details."} when trying to put in https://scratch.mit.edu/projects/652666997/.

Powered by DjangoBB