Discuss Scratch
- Discussion Forums
- » Developing Scratch Extensions
- » Creating extensions for Scratch 3.0
- zachary123212
- Scratcher
1 post
Creating extensions for Scratch 3.0
Well, after an exhausting amount of backtracking, I've managed to get the new version of scratch to add a local extension, but still can't figure out how to get it to work with URLs. What I've done is this (say you want to add an extension named X):
Does anyone know how to pass in a remote URL directly in index.jsx, so I don't need to repeat steps 1-4?
- fork, clone, and link the scratch-vm and scratch-gui repos
- in scratch-vm/src/extensions add a directory called X, containing your extension's index.js file, and any relevant assets
- in scratch-vm/src/extension-support/extension-manager.js, near the top of the file, add the line:
const Scratch3XBlocks = require('../extensions/X'); - a bit further down, at the end of const builtinExtensions, add the line (with the requisite comma preceding it):
X: Scratch3XBlocks - go to scratch-gui/src/lib/libraries/extensions/index.jsx and add an entry with X as extensionId
Does anyone know how to pass in a remote URL directly in index.jsx, so I don't need to repeat steps 1-4?
- A48c
- Scratcher
100+ posts
Creating extensions for Scratch 3.0
You can. How about if you could make your own extensions? (in scratch 3.0)
Hello, I'm a employee of the The Speed-Shop…
- kyleplo
- Scratcher
100+ posts
Creating extensions for Scratch 3.0
yleplo
#bring-it-back
My Latest Projects
View most of my posts: somerandomcharactersthatwillgetpickedupbysearchengines
- LuckyLucky7
- Scratcher
1000+ posts
Creating extensions for Scratch 3.0
https://github.com/kyleplo/scratch-three-extension-docs/wiki/Getting-StartedSeems pretty neat. Maybe I can experiment with this and probably add this to my mod. Try this:
- Sheep_maker
- Scratcher
1000+ posts
Creating extensions for Scratch 3.0
I've modified scratch-gui and added a button in the extensions library that loads extensions from a URL.
Most of the functionality seems to have already been put in place; they just haven't added a button for it yet.
Because of how extensions are registered, external extensions don't have access to the magical “runtime” thing which means you can't do much with the default Scratch unlike the currently provided extensions. Maybe I'll find a way to change that.
I made an extension with a few reporter blocks here.
Edit: updated URL because the builder was being disobedient.
Most of the functionality seems to have already been put in place; they just haven't added a button for it yet.
Because of how extensions are registered, external extensions don't have access to the magical “runtime” thing which means you can't do much with the default Scratch unlike the currently provided extensions. Maybe I'll find a way to change that.
I made an extension with a few reporter blocks here.
Edit: updated URL because the builder was being disobedient.
Last edited by Sheep_maker (July 10, 2018 11:58:28)
- 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; }
- LuckyLucky7
- Scratcher
1000+ posts
Creating extensions for Scratch 3.0
modified scratch-gui and added a button in the extensions library that loads extensions from a URL.Looks like I'll use this extension to test out the blocks for my Lucky7 Mod. I've
Most of the functionality seems to have already been put in place; they just haven't added a button for it yet.
Because of how extensions are registered, external extensions don't have access to the magical “runtime” thing which means you can't do much with the default Scratch unlike the currently provided extensions. Maybe I'll find a way to change that.
I made an extension with a few reporter blocks here.
- dalelane
- Scratcher
6 posts
Creating extensions for Scratch 3.0
modified scratch-gui and added a button in the extensions library that loads extensions from a URL.I've
Thanks so much for sharing this. This (and this issue in particular) looks like it'll be exactly what I need to try and port my Scratchx work over to Scratch 3. Looking forward to giving it a try :-)
- OnMax
- Scratcher
51 posts
Creating extensions for Scratch 3.0
Hello there.
Thanks for creating this topic, it was really helpful!
I'm now working on the “Firebase Database Extension”. It is a Google's realtime Database. I need first ask for Google's permission and then I'll start working. Here are some blocks for extensions:
Thanks again
Thanks for creating this topic, it was really helpful!
I'm now working on the “Firebase Database Extension”. It is a Google's realtime Database. I need first ask for Google's permission and then I'll start working. Here are some blocks for extensions:
add value key [name] value [Alex]::pen
(get value key [name]::pen)
get all keys to list [my list v] ::pen
push value from list [my list v] ::pen
Thanks again
… i guess, i just do something here
- OnMax
- Scratcher
51 posts
Creating extensions for Scratch 3.0
Please, help!
I need help with this extension ! I wrote simple alert display extension and I used Sheep_maker's scratch guitar with load URL. What wrong with it? Please help!!!
I need help with this extension ! I wrote simple alert display extension and I used Sheep_maker's scratch guitar with load URL. What wrong with it? Please help!!!
… i guess, i just do something here
- Sheep_maker
- Scratcher
1000+ posts
Creating extensions for Scratch 3.0
Please, help!It's Scratch.BlockType.STRING, not Scratch.blockType.STRING
I need help with this extension ! I wrote simple alert display extension and I used Sheep_maker's scratch guitar with load URL. What wrong with it? Please help!!!
- 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; }
- OnMax
- Scratcher
51 posts
Creating extensions for Scratch 3.0
Thanks a lot! I often make mistakes in JavaScript with registerPlease, help!It's Scratch.BlockType.STRING, not Scratch.blockType.STRING
I need help with this extension ! I wrote simple alert display extension and I used Sheep_maker's scratch guitar with load URL. What wrong with it? Please help!!!
… i guess, i just do something here
- OnMax
- Scratcher
51 posts
Creating extensions for Scratch 3.0
I now know where's the error. There must be not blockType. There must be ArgumentType. Thanks everyonePlease, help!It's Scratch.BlockType.STRING, not Scratch.blockType.STRING
I need help with this extension ! I wrote simple alert display extension and I used Sheep_maker's scratch guitar with load URL. What wrong with it? Please help!!!
… i guess, i just do something here
- OnMax
- Scratcher
51 posts
Creating extensions for Scratch 3.0
Hi, guys.
I started working with TextToSpeech extension that uses that code:
window.speechSynthesis.speak();
I started working with TextToSpeech extension that uses that code:
window.speechSynthesis.speak();
Last edited by OnMax (Aug. 1, 2018 14:21:41)
… i guess, i just do something here
- OnMax
- Scratcher
51 posts
Creating extensions for Scratch 3.0
NOW I REALLY NEED HELP!
Guys, please tell me, what's wrong with this extension?
Actually, it works fine and all the reporters and basic functions are working. But I wrote…
44 speechsay({TEXT}) {
45 sayedtxt = TEXT;
46 var msg = new SpeechSynthesisUtterance(TEXT);
47 window.speechSynthesis.speak(msg);
48 }
…and the speech command (47) doesn't works!
Please tell me, what's wrong with this, because everything works fine, exept of the speech.
P.S: Also, the speech script works in the simple HTML page, but not in the Scratch 3.0 GUI with url button.
Guys, please tell me, what's wrong with this extension?
Actually, it works fine and all the reporters and basic functions are working. But I wrote…
44 speechsay({TEXT}) {
45 sayedtxt = TEXT;
46 var msg = new SpeechSynthesisUtterance(TEXT);
47 window.speechSynthesis.speak(msg);
48 }
…and the speech command (47) doesn't works!
Please tell me, what's wrong with this, because everything works fine, exept of the speech.
P.S: Also, the speech script works in the simple HTML page, but not in the Scratch 3.0 GUI with url button.
Last edited by OnMax (Aug. 1, 2018 14:22:34)
… i guess, i just do something here
- Sheep_maker
- Scratcher
1000+ posts
Creating extensions for Scratch 3.0
Extensions are run in their own worker; Hi, guys.window does not exist in workers, they use self.
I started working with TextToSpeech extension that uses that code:
window.speechSynthesis.speak();
- 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; }
- OnMax
- Scratcher
51 posts
Creating extensions for Scratch 3.0
Do you mean, I can just use self instead of window?Extensions are run in their own worker; Hi, guys.window does not exist in workers, they use self.
I started working with TextToSpeech extension that uses that code:
window.speechSynthesis.speak();
… i guess, i just do something here
- PullJosh
- Scratcher
1000+ posts
Creating extensions for Scratch 3.0
Haven't tested myself, but it looks like yes.Do you mean, I can just use self instead of window?Extensions are run in their own worker; Hi, guys.window does not exist in workers, they use self.
I started working with TextToSpeech extension that uses that code:
window.speechSynthesis.speak();
- OnMax
- Scratcher
51 posts
Creating extensions for Scratch 3.0
Thanks, PullJosh. I'll try itHaven't tested myself, but it looks like yes.Do you mean, I can just use self instead of window?Extensions are run in their own worker; Hi, guys.window does not exist in workers, they use self.
I started working with TextToSpeech extension that uses that code:
window.speechSynthesis.speak();
… i guess, i just do something here
- OnMax
- Scratcher
51 posts
Creating extensions for Scratch 3.0
self instead of window?Haven't tested myself, but Do you mean, I can just use it looks like yes.
It doesn't works. It just still doesn't works…
link - js file
… i guess, i just do something here
- SimpleScratch
- Scratcher
500+ posts
Creating extensions for Scratch 3.0
@Sheep_maker
Thanks for your Scratch3 mod with your external extension loader
One “small” issue I'm having with it is that I can't seem to re-load projects that use your utilities extension
(Its just sits there giving an endless series of messages about loading the file/sprites/extensions etc)
Is this just happening to me or is it a general issue?
Simon
Thanks for your Scratch3 mod with your external extension loader
One “small” issue I'm having with it is that I can't seem to re-load projects that use your utilities extension
(Its just sits there giving an endless series of messages about loading the file/sprites/extensions etc)
Is this just happening to me or is it a general issue?
Simon
- Discussion Forums
- » Developing Scratch Extensions
- » Creating extensions for Scratch 3.0