Discuss Scratch

PotatoManthetrue
Scratcher
19 posts

Leopard: Edit Scratch projects as JavaScript code

https://scratch.mit.edu/projects/979686314/

Why won't this work?

I AM POTATOMAN, THE TRUE POTATOMAN! POTATOMANTHETRUE!!!!!!!!!!!!!

<[potatos] = [good]>
ProCraftPlays04
Scratcher
2 posts

Leopard: Edit Scratch projects as JavaScript code

Hostcreator2 wrote:

All right that is my simple talking engine But wait why is it not working It's because data cannot confirm That it is in the positive or the negatives So when they take those scripts to The Javascript If you make a simple mistake It will transport data into those errors so there

okay but how do I make it so the game works but i can convert it?
dumorando
Scratcher
100+ posts

Leopard: Edit Scratch projects as JavaScript code

Argument sandboxId for data.sandboxId is missing.


smolyhokes
Scratcher
22 posts

Leopard: Edit Scratch projects as JavaScript code

https://scratch.mit.edu/projects/829354774/ why doesnt this work

hi there my name is tungsten (i named this scratch acc ages ago i wish i could change the name)
itamar_eiz
New Scratcher
1 post

Leopard: Edit Scratch projects as JavaScript code

hello.
I tried to convert my project to javascript but it didn't work.
the project is in scratch 3.0 and has no extentions.

what can I do?

project: https://scratch.mit.edu/projects/1000718832/
dash_master
Scratcher
1 post

Leopard: Edit Scratch projects as JavaScript code

Hi, So I have a cool project i am making, and I wanted to make it on a different game engine without going through 18 hours of work, but whenever I try to convert it, the only way that has worked was an html convert, but then when I try to convert the HTML to java or javascript, it gives me an error, like everything else. I don't know whats wrong with it, because I think it's supposed to work with the web version of today. Could someone please tell me what I am doing wrong? Leopardjs gave me an error when i uploaded it and gave it the link and it said “Argument sandboxId for data.sandboxId is missing.”
Here is the project: https://scratch.mit.edu/projects/942467711

Also I really hope it's not because of blank values because this won't work without them

Last edited by dash_master (April 19, 2024 18:44:54)

dynamicsofscratch
Scratcher
1000+ posts

Leopard: Edit Scratch projects as JavaScript code

im just gonna bump this to encourage discussions

aII toasters toast toast, but what happens when there are no longer toasters being produced? will their technology simply become obsolete, with humans moving onto bigger, better things? will toast become a distant memory, written in textbooks of the future as foods us simpler generations ate? who's to say! society is constantly moving, changing, evolving, ideas being built upon, improved upon, theories being proven or disproven. are we but a blip on the timeline? sure, our names may not be remembered, but that's not the point. you can make a change. you can make a difference. you can make the world better, even if you don't know yet. and the first step is to go for it. even if you are afraid of failure. going back to the example of toasters, do you know off the top of your head who invented them? no? have you used one? probably. so, even if you don't remember my name, if I was able to help awnser your question, that is enough. if I was able to help you, even in the slightest way, this could push you to continue with scratch and not give up after the program crashes, and maybe one day learn other programming languages and change the world. everything is a cause and effect reaction, new inventions lead to the technology of the future, and even as the generations of the past are slowly forgotten, their influence lives on to this day, affecting how the world eventually turned out and how it will be for generations to come.

and, without toasters, we wouldn't have toast.


Regards
dynamicsofscratch

Anything above that grey line is a signature!
Also, anything can be put in your signature, (also referred as a siggy) including ads but! You cannot do anything else that violates the community guidelines as, you will be reported and you could be banned/muted.
Computer enthusiast, coder, designer and a offline veteran.
700th post
key-lock
Scratcher
19 posts

Leopard: Edit Scratch projects as JavaScript code

this one doesn't work for some reason:
https://scratch.mit.edu/projects/962830949/

the only extension if pen

█▄▀ █▀▀ █▄█ █░░ █▀█ █▀▀ █▄▀
█░█ ██▄ ░█░ █▄▄ █▄█ █▄▄ █░█

when I receive [question v]
repeat until <(answer) = (correct answer)>
think (answer)
end
add (answer) to [forum v]

hi! i'm key-lock, I hope this forum post helped. I enjoy math, coding, and playing chess
check my projects out here
key-lock
Scratcher
19 posts

Leopard: Edit Scratch projects as JavaScript code

key-lock wrote:

this one doesn't work for some reason:
https://scratch.mit.edu/projects/962830949/

the only extension if pen
*is pen

█▄▀ █▀▀ █▄█ █░░ █▀█ █▀▀ █▄▀
█░█ ██▄ ░█░ █▄▄ █▄█ █▄▄ █░█

when I receive [question v]
repeat until <(answer) = (correct answer)>
think (answer)
end
add (answer) to [forum v]

hi! i'm key-lock, I hope this forum post helped. I enjoy math, coding, and playing chess
check my projects out here
dynamicsofscratch
Scratcher
1000+ posts

Leopard: Edit Scratch projects as JavaScript code

key-lock wrote:

(#1011)

key-lock wrote:

this one doesn't work for some reason:
https://scratch.mit.edu/projects/962830949/

the only extension if pen
*is pen
see the https://leopardjs.com/manual?p=motion

aII toasters toast toast, but what happens when there are no longer toasters being produced? will their technology simply become obsolete, with humans moving onto bigger, better things? will toast become a distant memory, written in textbooks of the future as foods us simpler generations ate? who's to say! society is constantly moving, changing, evolving, ideas being built upon, improved upon, theories being proven or disproven. are we but a blip on the timeline? sure, our names may not be remembered, but that's not the point. you can make a change. you can make a difference. you can make the world better, even if you don't know yet. and the first step is to go for it. even if you are afraid of failure. going back to the example of toasters, do you know off the top of your head who invented them? no? have you used one? probably. so, even if you don't remember my name, if I was able to help awnser your question, that is enough. if I was able to help you, even in the slightest way, this could push you to continue with scratch and not give up after the program crashes, and maybe one day learn other programming languages and change the world. everything is a cause and effect reaction, new inventions lead to the technology of the future, and even as the generations of the past are slowly forgotten, their influence lives on to this day, affecting how the world eventually turned out and how it will be for generations to come.

and, without toasters, we wouldn't have toast.


Regards
dynamicsofscratch

Anything above that grey line is a signature!
Also, anything can be put in your signature, (also referred as a siggy) including ads but! You cannot do anything else that violates the community guidelines as, you will be reported and you could be banned/muted.
Computer enthusiast, coder, designer and a offline veteran.
700th post
PullJosh
Scratcher
1000+ posts

Leopard: Edit Scratch projects as JavaScript code

Good news! There is now a solution for the “Argument sandboxId for data.sandboxId is missing” message.

Have you ever tried converting a project and seen an error like this?


Well now there is a solution. This error appears when your converted project cannot be uploaded to CodeSandbox. Now, instead of converting on the cloud, there is a new feature: You can now convert Scratch projects to Leopard code locally, on your own computer. You don't need to use the leopard website and you don't need to use CodeSandbox.

Here's how it works. Under the hood, we've created a library called “sb-edit” that converts projects between different Scratch file formats. In this case, from a .sb3 Scratch project file into Leopard code. This tool now has a command-line option that lets you run it from your very own computer's terminal.

To run the terminal converter, there are just two steps.

First, use npm to install the sb-edit package globally (so it can be used from anywhere on your machine).
npm i -g sb-edit
(If you don't have node/npm or haven't used it, it is a tool that helps you run JavaScript code, like sb-edit, from the terminal on your computer. To get npm, install node.js from the official website. When you install node, the npm package manager will come with it.)

Then, you can convert a .sb3 file (which you can download from the Scratch editor by clicking File > Save to your computer) to a Leopard project using the following command:
sb-edit --input path/to/project.sb3 --output path/to/output-folder
This command will take your input sb3 file and generate a folder full of Leopard code at the output directory you specify. Obviously, you should edit the input and output paths in the command above to match the actual locations of the input file and desired output folder on your computer.

If you want to generate a .zip file instead of a folder, you can do that as well. Just set –output to be a path with a .zip filename.

Last edited by PullJosh (April 30, 2024 21:17:34)

star_wolves1
Scratcher
16 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.

Thank you so much to the contributors who made Leopard possible!
you can also use turbo warp: https://turbowarp.org/

I want to always sled down the stairs in a laundry basket for no reason
julmik6478
Scratcher
500+ posts

Leopard: Edit Scratch projects as JavaScript code

Non translated list:
when backdrop switches to [backdrop 1 v]
set drag mode [draggable v]::sensing
set drag mode [undraggable v]::sensing
([volume v] of [Sprite1 v])
(username)
(☁ cloud variables)
- extensions other than pen


Support the suggestion HERE by adding this button to your signature

My acounts in some websites:
youtube
planet minecraft
mcreator
julmik6478
Scratcher
500+ posts

Leopard: Edit Scratch projects as JavaScript code

I have translation for makey makey block:
when [space v] key pressed::pen
new Trigger(Trigger.KEY_PRESSED, { key: “space” }, this.myScript)


Support the suggestion HERE by adding this button to your signature

My acounts in some websites:
youtube
planet minecraft
mcreator
julmik6478
Scratcher
500+ posts

Leopard: Edit Scratch projects as JavaScript code

Translations of two hacked blocks:
while <> {}::control 
while ((/* condition */)) {
// do something fun here
yield;
}
loud::sensing boolean 
this.loudness > 10


Support the suggestion HERE by adding this button to your signature

My acounts in some websites:
youtube
planet minecraft
mcreator
julmik6478
Scratcher
500+ posts

Leopard: Edit Scratch projects as JavaScript code

New idea for username:
set username [user]::sensing 
javascript:
This.username = user
Default username: user
Scratch compatiblity idea:
leopard.set username [user] 
All custom blocks with this name are replaced with this javascript.

Last edited by julmik6478 (May 1, 2024 07:32:23)



Support the suggestion HERE by adding this button to your signature

My acounts in some websites:
youtube
planet minecraft
mcreator
CodesNorth
Scratcher
66 posts

Leopard: Edit Scratch projects as JavaScript code

Does Leopard also convert the costumes/art into javascript, or just the code?

Don't code south. It's really not worth it.

PullJosh
Scratcher
1000+ posts

Leopard: Edit Scratch projects as JavaScript code

CodesNorth wrote:

Does Leopard also convert the costumes/art into javascript, or just the code?
The costumes and sounds stay the same. In your converted project, they are just stored as files. And those files can be read and displayed using JavaScript code.
Ghxstify2009
Scratcher
100+ posts

Leopard: Edit Scratch projects as JavaScript code

bump

Hello! I hope I helped answer your question.
ImDumbLol696
Scratcher
7 posts

Leopard: Edit Scratch projects as JavaScript code

(long unnecessary quote removed by moderator - please don't spam)

None of my projects work, idk why

Last edited by Paddle2See (May 8, 2024 10:24:38)


You just got IMDUMBLOL696'd
Send this to your friends to totally IMDUMBLOL696'd them.

Powered by DjangoBB