Discuss Scratch

Itz_Wolfram
Scratcher
66 posts

Leopard: Edit Scratch projects as JavaScript code

zlitni789 wrote:

Your text to link here…
why are you spamming, please stop
medians
Scratcher
1000+ posts

Leopard: Edit Scratch projects as JavaScript code

AGDEVELOPER wrote:

Why is this not working https://scratch.mit.edu/projects/760917535/
Recent api changes broke leopard
Update 11/27/2022 or 27/11/2022: they’re fixed

Last edited by medians (Nov. 27, 2022 17:04:42)

YC_dresden
Scratcher
4 posts

Leopard: Edit Scratch projects as JavaScript code

it only works for scratch 3.0
PullJosh
Scratcher
1000+ posts

Leopard: Edit Scratch projects as JavaScript code

Good news everybody!

The Leopard website should now be back in working order. I've updated the site to use the new API calls, so you should be able to convert projects again. With the new changes to Scratch, it's no longer possible to convert unshared projects, but shared ones should be all good.

Huge thank you to @CST1229 for showing me how to fix the website.
School-gamesbruvski
Scratcher
2 posts

Leopard: Edit Scratch projects as JavaScript code

works well but one of my projects (which is quite big now) doesnt rly work. when i load it a lot of the code doesnt work when its made into java. i tried on some smaller projects and it worked tho so overall nice website
PullJosh
Scratcher
1000+ posts

Leopard: Edit Scratch projects as JavaScript code

I’ve been looking into making it possible to upload .sb3 files to the website and converting them that way. Seems like it will be doable. Hopefully this will be a satisfying alternative to converting unshared projects (which is no longer possible).
atKingNC
Scratcher
1 post

Leopard: Edit Scratch projects as JavaScript code

PullJosh wrote:

I’ve been looking into making it possible to upload .sb3 files to the website and converting them that way. Seems like it will be doable. Hopefully this will be a satisfying alternative to converting unshared projects (which is no longer possible).
If possible, could this recognise TurboWarp settings? (e.g. custom stage size, infninite clones, remove fencing)? While it's placed as a comment in the stage layer, it's workable JSON and looks something like this: {“runtimeOptions”:{“maxClones”:Infinity,“miscLimits”:false,“fencing”:false},“width”:720,“height”:480} // _twconfig_
PullJosh
Scratcher
1000+ posts

Leopard: Edit Scratch projects as JavaScript code

The Leopard website now supports uploading .sb3 files!



I haven't tested this feature much so I can't promise that it will work perfectly. Please let me know if you hit any snags.

But in theory, if we all cross our fingers very hard, it should work. You can click the “upload” button or drag and drop a file onto the page and with any luck it will convert correctly. Hopefully this is a satisfying alternative to converting unshared projects!

(Projects you convert from .sb3 will NOT appear on the “recently converted projects” list, so your work will be private.)

Last edited by PullJosh (Nov. 25, 2022 02:27:57)

PullJosh
Scratcher
1000+ posts

Leopard: Edit Scratch projects as JavaScript code

atKingNC wrote:

PullJosh wrote:

I’ve been looking into making it possible to upload .sb3 files to the website and converting them that way. Seems like it will be doable. Hopefully this will be a satisfying alternative to converting unshared projects (which is no longer possible).
If possible, could this recognise TurboWarp settings? (e.g. custom stage size, infninite clones, remove fencing)? While it's placed as a comment in the stage layer, it's workable JSON and looks something like this: {“runtimeOptions”:{“maxClones”:Infinity,“miscLimits”:false,“fencing”:false},“width”:720,“height”:480} // _twconfig_
Great idea! The current implementation doesn't do this, but I've tracked the issue here.
Thatsnice754
Scratcher
1 post

Leopard: Edit Scratch projects as JavaScript code

Cannot read properties of undefined (reading ‘0’)
WesL7
Scratcher
7 posts

Leopard: Edit Scratch projects as JavaScript code

Hello @WesL7 here
moa8th
Scratcher
13 posts

Leopard: Edit Scratch projects as JavaScript code

Can you fix pen projects to convert all pen projects to Javascript? we need a leopard with pen projects.
CH31412
Scratcher
1 post

Leopard: Edit Scratch projects as JavaScript code

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

It seems that my project isn't working with or converting to JS, if anyone could give me an explanation of why it would be wonderful here's the link below.

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

Last edited by Paddle2See (Nov. 29, 2022 17:44:00)

ISTILLMAKESTUFF
Scratcher
500+ posts

Leopard: Edit Scratch projects as JavaScript code

This is like the better version of TurboWarp!
CST1229
Scratcher
1000+ posts

Leopard: Edit Scratch projects as JavaScript code

ISTILLMAKESTUFF wrote:

(#718)
This is like the better version of TurboWarp!
I'm pretty sure the 2 projects have different goals - Turbowarp's main focus is to run projects fast and accurately, but Leopard's focus is to produce human-readable code, with accuracy and speed being lower priority.
ISTILLMAKESTUFF
Scratcher
500+ posts

Leopard: Edit Scratch projects as JavaScript code

CST1229 wrote:

ISTILLMAKESTUFF wrote:

(#718)
This is like the better version of TurboWarp!
I'm pretty sure the 2 projects have different goals - Turbowarp's main focus is to run projects fast and accurately, but Leopard's focus is to produce human-readable code, with accuracy and speed being lower priority.
True, but both convert projects to js to make them run faster.
bananas12266
Scratcher
3 posts

Leopard: Edit Scratch projects as JavaScript code

my project https://scratch.mit.edu/projects/769297635/ does not seem to work in leopard, please fix it asap I have a project due in 2 days.
god286
Scratcher
1000+ posts

Leopard: Edit Scratch projects as JavaScript code

bananas12266 wrote:

(#721)
my project https://scratch.mit.edu/projects/769297635/ does not seem to work in leopard, please fix it asap I have a project due in 2 days.
Leopard doesn't work that well for some projects, you can try using packager.turbowarp.org but you can't edit the code produced by that.

Last edited by god286 (Dec. 3, 2022 05:33:23)

bloctans_4
Scratcher
1000+ posts

Leopard: Edit Scratch projects as JavaScript code

PullJosh wrote:

Redstone1080 wrote:

Is there a public API you can use to convert projects?
Not a very good one, but if you hit
https://leopardjs.com/api/PROJECT_ID/codesandbox
it will create a codesandbox and give you back the link as JSON. (Replace PROJECT_ID with the id number found in the project's URL.)
pulljosh, im wondering
when i was making my scratch vm, it seemed like json.parse was messing things up, why?
memind
Scratcher
2 posts

Leopard: Edit Scratch projects as JavaScript code

Hello everyone I tried converting my game: https://scratch.mit.edu/projects/623341259/ but it just says this: Cannot read properties of undefined (reading ‘languages’) and then it said ask the forum for help. Can someone please help me. Note: My project is Scratch 3.0 and doesn't have any extintion:)

when green flag clicked
say [LETS HELP THE WORLD]

Powered by DjangoBB