Discuss Scratch

NitroCipher
Scratcher
500+ posts

Creating extensions for Scratch 3.0

Sheep_maker wrote:

-snip-

Also, the block uses jQuery to fetch the data, but jQuery isn't included with his extension

Ooops, completely forgot about jQuery when I made the 3.0 extension, I had written it to work through a chrome addon, and loaded jQuery through that. (it was originally an extension that loaded blocks directly into vanilla scratch)

I hope my post helped you in some way! Post count: 500+

Current project: [s3Blocks: scratchblocks rewritten for Scratch 3.0] ::#4b4a60 //https://scratch.mit.edu/discuss/topic/290031/ Basically done!
This is my signature identifier “aWFtbml0cm9jaXBoZXI=”
psicinfoscratch
New to Scratch
8 posts

Creating extensions for Scratch 3.0

NitroCipher wrote:

Sheep_maker wrote:

-snip-

Also, the block uses jQuery to fetch the data, but jQuery isn't included with his extension

Ooops, completely forgot about jQuery when I made the 3.0 extension, I had written it to work through a chrome addon, and loaded jQuery through that. (it was originally an extension that loaded blocks directly into vanilla scratch)

thanks for your kind attention, your posts were really useful to understand I have to face with another route to try to do what I want! (I have to try to modify scratch-vm very little just to save locally some execution data, but I still don't know how to do this)
ahtewhs
Scratcher
33 posts

Creating extensions for Scratch 3.0

Try to code this:When red button pressed
If do not know, then
when green flag clicked
forever
reset timer
end
when [ timer] > (0.01)
next backdrop
ahtewhs
Scratcher
33 posts

Creating extensions for Scratch 3.0

ummmmmmmmmmm……………………………………………………………………………………………………………………………………………………….
lktornado360
Scratcher
36 posts

Creating extensions for Scratch 3.0

ahtewhs wrote:

Try to code this:When red button pressed
If do not know, then
when green flag clicked
forever
reset timer
end
when [ timer] > (0.01)
next backdrop
that is unrelated

“Heluim is inert, it does not react to anything. This makes it perfect to help create a safe atmosphere for welding.” & “Atomic Number: 2; Formula: He; Atomic Weight: 4.002602; State at 20° C: gas; Boiling point: -268.928° C; Melting point: unknown; % in the Universe: 23; % in the Earth's crust: 0.00000055; % in Earths's oceans: 0.00000000072; % in humans: none.”
–The Periodic Table by Sean Callery and Miranda Smith

mvackel
New to Scratch
1 post

Creating extensions for Scratch 3.0

Hello,
after I create my own extension, is there a way to automatically load it's blocks just after launching Scratch? So as to skip clicking the lower left blue button and select the extension)? I'm using Github Pages to host the extension.
jaafreitas
Scratcher
12 posts

Creating extensions for Scratch 3.0

mvackel wrote:

Hello,
after I create my own extension, is there a way to automatically load it's blocks just after launching Scratch? So as to skip clicking the lower left blue button and select the extension)? I'm using Github Pages to host the extension.

Yes, I did it in this way:
https://github.com/jaafreitas/scratch-vm/commit/f54b6e0927a58941f98667e9e3177d3c81999004

Cheers
Nobody_to_No-one
Scratcher
21 posts

Creating extensions for Scratch 3.0

i do not know what the text editor is
AlphabetCake
Scratcher
8 posts

Creating extensions for Scratch 3.0

abc

end
sillyscience8
Scratcher
20 posts

Creating extensions for Scratch 3.0

two questions:
1.what file do you store the code on?
2. what language do you code the block?
Super_OP_user
Scratcher
1 post

Creating extensions for Scratch 3.0

I think there should be a speech to text extension.
recognize speech and wait for <> :: sensing
(recognized speech)
if <(recognized speech) = [type your words here]> then
kursattuncel
New to Scratch
2 posts

Creating extensions for Scratch 3.0

Hello,

How can I load an extension in scratch-gui by launching

my_web_site/scratch-gui/?url=https://…

For example,

https://sheeptester.github.io/scratch-gui/?url=https://nitrocipher.github.io/ext2to3/ext-test.js

website loads the dynamic extension from another web page.

But when I build scratch-gui and run it, and give my url as a parameter,
it does not load the extension from the webpage.

this does not change also when I run the both the extension site and scratch-gui under https or http

do I need to run scratch-gui with some different parameter in order to load extensions from URL by giving it as a parameter?

Best Regards,

Sheep_maker
Scratcher
1000+ posts

Creating extensions for Scratch 3.0

kursattuncel wrote:

Hello,

How can I load an extension in scratch-gui by launching

my_web_site/scratch-gui/?url=https://…

For example,

https://sheeptester.github.io/scratch-gui/?url=https://nitrocipher.github.io/ext2to3/ext-test.js

website loads the dynamic extension from another web page.

But when I build scratch-gui and run it, and give my url as a parameter,
it does not load the extension from the webpage.

this does not change also when I run the both the extension site and scratch-gui under https or http

do I need to run scratch-gui with some different parameter in order to load extensions from URL by giving it as a parameter?

Best Regards,

That is a modified version of Scratch made to load extensions from a URL.

Here are the changes that were made to make that possible:

- 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; }
kursattuncel
New to Scratch
2 posts

Creating extensions for Scratch 3.0

Thank you very much. I've found your repository after I wrote the message.

I was able to compile your gui code and successfully integrated into my site with extension loading feature.


Best Regards,
dkjghfdh
Scratcher
3 posts

Creating extensions for Scratch 3.0

i was wondering what is the: get info from www.google.com block because it doesn't seem to do anything
dkjghfdh
Scratcher
3 posts

Creating extensions for Scratch 3.0

i was wondering what is the: get info from www.google.com block because it doesn't seem to do anything
BaBy_Fin
Scratcher
100+ posts

Creating extensions for Scratch 3.0

can a new exstion be speech to face. i know that MIT has been doing that stuff. at least i think

Remember Jesus loves you and have a great day!
John 3:16 - For God so loved the world, that he gave his one and only son, so that whoever believes in him shall not perish, but have eternal life.
My alt account: @Bucken__Berry

Johnny wrote:

Thanks! Now I might not starve.

ED-PE
Scratcher
12 posts

Creating extensions for Scratch 3.0

class NitroBlock {
getInfo() {
return {
“id”: “NitroBlock”,
“name”: “NitroBlock”,
“blocks”: [{
“opcode”: “substringy”,
“blockType”: “reporter”,
“text”: "letters through of “,
”arguments“: {
”num1“: {
”type“: ”number“,
”defaultValue“: ”2“
},
”num2“: {
”type“: ”number“,
”defaultValue“: ”5“
},
”string“: {
”type“: ”string“,
”defaultValue“: ”hello world“
}
}
},
}],
”menus": { //we will get back to this in a later tutorial
}
};
}
Scratch.extensions.register(new NitroBlock());
ED-PE
Scratcher
12 posts

Creating extensions for Scratch 3.0

recognize speech and wait for <>
(recognized speech)
if <(recognized speech) = [type your words here]> then
end
ego-lay_atman-bay
Scratcher
500+ posts

Creating extensions for Scratch 3.0

JGames101 wrote:

I have managed to port one of my extension to Scratch 3 (the blocks don't completely work yet, but I'm working on that, but they do load)

I followed the instructions to download the latest version of the scratch gui to work on it. I then copied the example extension, and rewrote my notifications extension in that format. Then, I uploaded it to github. I found the file that controls the list of extensions in the extensions button, and added mine. I set the URL to my github file, and it loaded in, and as you can see, the blocks appeared.

Official instructions for developing Scratch 3 extensions will be coming sometime between now and August (Scratch 3 release), according to The FAQ.

Update: I have everything working, except asking for notification permission. For some reason, that doesn't work.
Code can be found at https://github.com/JGames101/scratch-extensions/blob/master/notifications/3.js

To test your extension, add it to the index.js file located here: https://github.com/LLK/scratch-gui/tree/develop/src/lib/libraries/extensions
You can use actual URLs.
Then, if you open the page, you should see an extra Extension under the extensions popup thing. Clicking it will add your extension to the project, and you can test it.

So… testing your extensions currently requires downloading the source for scratch 3's GUI. No parts, like the VM or Renderer, are needed to be changed to test extensions, despite where default scratch extensions are stored (I went through the process of forking the VM for nothing…)

I will be making some simple demo extensions, that you'll be able to see below, and then I'll publish a fork of Scratch-GUI with some sample extensions.
do you know if you can make a project with all of those blocks?

Hi, I'm ego-lay_atman-bay. Please check out these projects.

Powered by DjangoBB