Discuss Scratch

brownbear111206
Scratcher
8 posts

Leopard: Edit Scratch projects as JavaScript code

8165718568 wrote:

I have tried to convert this project Leopard https://scratch.mit.edu/projects/572655576 multiple times but each time the project doesn't run. Maybe you could check it out and tell me why it won't run? I would really appreciate it!

I tried it and it and worked on my side your project could be converted but it only showed the background and played music. nothing else
brownbear111206
Scratcher
8 posts

Leopard: Edit Scratch projects as JavaScript code

Doreamon-Minecraft wrote:

Font is not working!
i dont think it has other font options yet. and the scratch font was not selected from google or any others maybe. so it thinks it can't find the exact font file like scratch had.
SkyWill22
Scratcher
5 posts

Leopard: Edit Scratch projects as JavaScript code

so it did not work and It made some go code away and broke the whole project
brownbear111206
Scratcher
8 posts

Leopard: Edit Scratch projects as JavaScript code

RaptorX_Tech wrote:

Something is wrong. I tried to convert https://scratch.mit.edu/projects/664649530/. My XLoft program. And it literally has no extensions and was created a few weeks ago IN scratch 3.0. So why does Leopard say, “Cannot read property ‘name’ of undefined”
Does it have pen Extensions?
brownbear111206
Scratcher
8 posts

Leopard: Edit Scratch projects as JavaScript code

Sabo3 wrote:

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/.
I think the project might be too large to be converted. and it could not do well of Cloud varibles1
scratch___user12345
Scratcher
1000+ posts

Leopard: Edit Scratch projects as JavaScript code

_SNIPR- wrote:

ego-lay_atman-bay wrote:

_SNIPR- wrote:

(#539)

Cheesybobw1234 wrote:

I know javascrpt iz hard
JavaScript is ez
well, that's debatable. I've spent hours googling how to do something in javascript.
Yeh. Tru tru. Depends on person and the way they learn.

What your googling?
I like javascript.
Look in my signature for a js game I made
gdxfor
Scratcher
100+ posts

Leopard: Edit Scratch projects as JavaScript code

when green flag clicked
say ((0.1) + (0.2))

will result in the program saying “0.30000000000000004” in leopard, but Scratch seems to round numbers it thinks it's incorrect due to floating point numbers so it only says “0.30”.
everettex
Scratcher
2 posts

Leopard: Edit Scratch projects as JavaScript code

Is there a way to import leopard .zip files into vscode and run it?
wesley_griff
Scratcher
6 posts

Leopard: Edit Scratch projects as JavaScript code

the leopard no longer works!
wesley_griff
Scratcher
6 posts

Leopard: Edit Scratch projects as JavaScript code

wesley_griff
Scratcher
6 posts

Leopard: Edit Scratch projects as JavaScript code

ametz807 wrote:

when green flag clicked
say ((0.1) + (0.2))

will result in the program saying “0.30000000000000004” in leopard, but Scratch seems to round numbers it thinks it's incorrect due to floating point numbers so it only says “0.30”.

the leopard doesn't want to work anymore see this link. https://codesandbox.io/api/v1/sandboxes/define
ego-lay_atman-bay
Scratcher
500+ posts

Leopard: Edit Scratch projects as JavaScript code

wesley_griff wrote:

(#558)

ametz807 wrote:

when green flag clicked
say ((0.1) + (0.2))

will result in the program saying “0.30000000000000004” in leopard, but Scratch seems to round numbers it thinks it's incorrect due to floating point numbers so it only says “0.30”.

the leopard doesn't want to work anymore see this link. https://codesandbox.io/api/v1/sandboxes/define
that's not even leapord.js, it's codesandbox. If you go there, you also see that it says
This endpoint requires the params `files` or `parameters` in order to work.
oh, and you're just going to an api, which is actually to be used by a program, not for a user to go to the page.

edit: just tested it out, and leapord is working fine, it's just codesandbox that isn't

Last edited by ego-lay_atman-bay (July 5, 2022 18:29:27)

octoboycrazy
Scratcher
6 posts

Leopard: Edit Scratch projects as JavaScript code

I tried to use it but don't works
wesley_griff
Scratcher
6 posts

Leopard: Edit Scratch projects as JavaScript code

octoboycrazy wrote:

I tried to use it but don't works
see there i'm not lying it's really not working anymore
@ego-lay_atman-bay
wesley_griff
Scratcher
6 posts

Leopard: Edit Scratch projects as JavaScript code

it really doesn't work, a few months ago it worked but I think they turned off the server
jvn11
Scratcher
70 posts

Leopard: Edit Scratch projects as JavaScript code

hey. I was thinking if I can help with leopard? I know JavaScript, Python, html, css, and scratch (obv).
PullJosh
Scratcher
1000+ posts

Leopard: Edit Scratch projects as JavaScript code

jvn11 wrote:

hey. I was thinking if I can help with leopard? I know JavaScript, Python, html, css, and scratch (obv).
Right now I really want help discovering cool ideas for how to use Leopard. Converting Scratch projects to JavaScript is obviously cool, but the most exciting part is if you can start to add JavaScript code to your project that enables new features that aren't possible in Scratch.

For example, using Leopard you could enhance your project by:
  • Making a sprite that opens a website in a new tab when clicked
  • Using JavaScript alert(), prompt(), and confirm() boxes
  • Changing other things on the webpage, like the page's background color, or adding new HTML elements

These are my ideas, but I feel like there is a lot more to do that I just haven't thought of yet. It would be fun to build a library of cool project ideas, and I need help doing so. Maybe you could contribute some ideas and example projects?
PullJosh
Scratcher
1000+ posts

Leopard: Edit Scratch projects as JavaScript code

Here's an example of what I'm talking about, jvn11: https://codesandbox.io/s/stoic-golick-i6st4h?file=/Sprite1/Sprite1.js

When you click the Scratch cat, it opens the Scratch website in a new tab. Not possible in a regular Scratch project!

Everyone reading this, please create more example projects like this one! I want to see all your ideas.
jvn11
Scratcher
70 posts

Leopard: Edit Scratch projects as JavaScript code

PullJosh wrote:

Here's an example of what I'm talking about, jvn11: https://codesandbox.io/s/stoic-golick-i6st4h?file=/Sprite1/Sprite1.js

When you click the Scratch cat, it opens the Scratch website in a new tab. Not possible in a regular Scratch project!

Everyone reading this, please create more example projects like this one! I want to see all your ideas.

so something like a scratch extension? the problem is that I don’t know how to actually make one
but what I can do is to probably make this into an npm module (if you haven’t already published one yet)
PullJosh
Scratcher
1000+ posts

Leopard: Edit Scratch projects as JavaScript code

jvn11 wrote:

so something like a scratch extension? the problem is that I don’t know how to actually make one
but what I can do is to probably make this into an npm module (if you haven’t already published one yet)

No need to write an extension. After converting your project to Leopard code, you can edit the JavaScript to do whatever you want! Even things that are impossible in Scratch.

For example, to create the project I linked above, I started by creating a Scratch project that did nothing when you clicked on the Scratch cat. Then I converted my project to Leopard. The converted project still did nothing when clicking the cat. But now, because I was working in JavaScript land, I could add that additional functionality myself, without relying on the automatic converter.

Try editing my JavaScript code in the example project. Can you change it to open a different website?

Powered by DjangoBB