Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!
- mazzadoobry
- Scratcher
100+ posts
Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!
This is correct. Leopard provides some built-in functions, which are a bit like “My Blocks” in Scratch. Essentially, we use regular JavaScript code to create some additional functionality for you, and then your project can use that.They're all real JavaScript, but some require Leopard's library. Some of the translations in leopard to js are not real javascript code right?
So it's all real JavaScript code, but Leopard is doing a lot of the hard work for you.
So wait(1); in leopard is setTimeout(myFunction, 1000); in Javascript?
I like scratch.
I would never say
I don't like scratch.
Lol read from top to bottom, then bottom to top.
window.document.getElementById(“follow-button”).addEventListener(click, clicked)
function clicked() {
console.log(“Thank you!”)
alert(“Lol”)
}
CANVAS IS A CONTAINER FOR GRAPHICS
- Sheep_maker
- Scratcher
1000+ posts
Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!
Not necessarily since JavaScript's setTimeout is different from Scratch's wait _ seconds block. I believe with a wait time of zero, setTimeout waits ~4 ms while Scratch waits one frame, or ~1/30 seconds (~33 ms). Using native setTimeout might also be slightly unreliable when running other scripts at the same time. Also, using callbacks are a bit difficult to use inside loops; in a JavaScript async function, you might instead typically do “await new Promise(resolve => setTimeout(resolve, 1000))” (or write a helper function for this)[…]
So wait(1); in leopard is setTimeout(myFunction, 1000); in Javascript?
- Sheep_maker This is a kumquat-free signature. :P
This is my signature. It appears below all my posts. Discuss it on my profile, not the forums. Here's how to make your own.
.postsignature { overflow: auto; } .scratchblocks { overflow-x: auto; overflow-y: hidden; }
- doublebox
- Scratcher
19 posts
Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!
First off, how do i make it go 60fps and how do i change the stage size
- jeehu
- Scratcher
30 posts
Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!
(long unnecessary quote removed by moderator - please don't spam)
Use turbowarp packager by garbomuffin. It is better
Use turbowarp packager by garbomuffin. It is better
Last edited by Paddle2See (Sept. 1, 2021 15:14:45)
when green flag clicked
if <mouse down?> then
say [I love henry stickmin!]
end
- kccuber
- Scratcher
1000+ posts
Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!
you don't learn how javascript works from turbowarp packager Use turbowarp packager by garbomuffin. It is better
- -089-
- Scratcher
1 post
Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!
can someone tell me what this
{“error”:"This endpoint requires the params `files` or `parameters` in order to work. See https://codesandbox.io/docs/importing#create-wizard for more details.“}
means? after clicking on ”edit as javascript" I got redirected to https://codesandbox.io/api/v1/sandboxes/define where the message above appeared.
I was trying to convert this project https://scratch.mit.edu/projects/454347522/ if that helps anything.
{“error”:"This endpoint requires the params `files` or `parameters` in order to work. See https://codesandbox.io/docs/importing#create-wizard for more details.“}
means? after clicking on ”edit as javascript" I got redirected to https://codesandbox.io/api/v1/sandboxes/define where the message above appeared.
I was trying to convert this project https://scratch.mit.edu/projects/454347522/ if that helps anything.
- PullJosh
- Scratcher
1000+ posts
Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!
As far as I can tell, that error appears when a project contains weird sprite or costume names. For example, your sprite “compressed file” has some strange symbols in its costume names. can someone tell me what this
{“error”:"This endpoint requires the params `files` or `parameters` in order to work. See https://codesandbox.io/docs/importing#create-wizard for more details.“}
means? after clicking on ”edit as javascript" I got redirected to https://codesandbox.io/api/v1/sandboxes/define where the message above appeared.
I was trying to convert this project https://scratch.mit.edu/projects/454347522/ if that helps anything.
Leopard should handle this gracefully, but it currently doesn't. If you want to make the translation work, you'll have to change those names.
- crawly_coder_15
- Scratcher
17 posts
Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!
(long unnecessary quote removed by moderator - please don't spam)
Use turbowarp packager by garbomuffin. It is better
Or you can use scratch packager. Also made by garbomufffin. But turbowrap packeger is better. I still prefer leopard though
Fun fact: garbomuffin made turbowarp
search with ecosia.org to plant trees by you just searching! we need to save our world!
move (search) steps
move (plant tree) steps
- crawly_coder_15
- Scratcher
17 posts
Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!
This is correct. Leopard provides some built-in functions, which are a bit like “My Blocks” in Scratch. Essentially, we use regular JavaScript code to create some additional functionality for you, and then your project can use that.They're all real JavaScript, but some require Leopard's library. Some of the translations in leopard to js are not real javascript code right?
So it's all real JavaScript code, but Leopard is doing a lot of the hard work for you.
What’s leopards library plug-in js?
search with ecosia.org to plant trees by you just searching! we need to save our world!
move (search) steps
move (plant tree) steps
- ego-lay_atman-bay
- Scratcher
500+ posts
Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!
how do I convert a project from my computer in leopard.js?
- kccuber
- Scratcher
1000+ posts
Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!
i guess you can upload it to an unshared project and link that how do I convert a project from my computer in leopard.js?
Last edited by kccuber (Sept. 4, 2021 19:45:21)
- ego-lay_atman-bay
- Scratcher
500+ posts
Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!
about that… my project exceeds the scratch size limit, so I can't.i guess you can upload it to an unshared project and link that how do I convert a project from my computer in leopard.js?
- RoboBoy3
- Scratcher
20 posts
Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!
There was an error converting your project.
Cannot read property ‘author’ 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!
My project does not use pen nor any scratch extensions, but it's saying this error
Cannot read property ‘author’ 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!
My project does not use pen nor any scratch extensions, but it's saying this error
- Avrothestickman
- Scratcher
95 posts
Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!
Would be cool if people could learn js
Making an Ace Combat 7 fangame on scratch.
- RokCoder
- Scratcher
1000+ posts
Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!
That's just plain wrong. Even Scratch wouldn't be described as easy if/when you're trying to do extremely complex or performant things with it. When you've picked up one computer language, picking up more becomes easier but it still depends on how deep into the language you want to go and/or what you want to use the language for. Using JS for simple things is relatively easy. Using it for complex things isn't.Most ATers know JS, it's a simple programming language Would be cool if people could learn js
- yunus4040
- Scratcher
30 posts
Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!
Good I think this is a awesome way for Scratcher's to improve in programing and learn other programing languages like java-script
<script type=“text/javascript”>
function getInspiration(morningDay) {
if (morningDay === “morning” && boredomLevel === “bored”) {
startCoding();
getAwesome();
}
}
function startCoding() {
// Your code to start coding goes here.
}
function getAwesome() {
// Your code to get inspired goes here.
}
</script>
- NorthenSuperCoders
- Scratcher
100+ posts
Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!
I Love that!! Great!!
NorthenSuperCoders
A self-programmer - also writes books, him self.
===================================================
- shonsh
- Scratcher
1 post
Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!
great job
That would be nice,
If it will be possible to access variables, messages, … from outside the project.
(Assuming you know the names)
That would be nice,
If it will be possible to access variables, messages, … from outside the project.
(Assuming you know the names)
- Xx_YeetMasterXx
- Scratcher
45 posts
Leopard: Convert Scratch projects to JavaScript AUTOMATICALLY!
I will try it lol
Xx_YeetMasterXx - 3+ Years Of Scratching - Forum Helper