Discuss Scratch

CST1229
Scratcher
1000+ posts

Creating *Unsandboxed* extensions for Scratch 3.0

ohman_soonsoon wrote:

(#20)
i wanna make admireblocks+ with this, but do i need to require ‘async’ and ‘try’ when making the block functions?
No.

This is a signature. It's a piece of text that appears below every post I write. Click here to learn more, including how to make your own.

Thanks Jeffalo
RIP assets image hosting. 2013?-2023


know0your0true0color
Scratcher
100+ posts

Creating *Unsandboxed* extensions for Scratch 3.0

ohman_soonsoon wrote:

i wanna make admireblocks+ with this, but do i need to require ‘async’ and ‘try’ when making the block functions?
nope
that was just showierdata's personal choice
async and try are not required
although there can be some benefits
try and catch are normally used together
try, tries some code
catch, runs some other code if try's code gives an error
example
try {
  nonExistentFunction();
} catch (error) {
  console.error(error);
  // expected output: ReferenceError: nonExistentFunction is not defined
 console.log('there was an error in trys code!')
}
and here's an example on how to use async

Hi! I'm know0your0true0color, you can also call me Fresh
CST1229
Scratcher
1000+ posts

Creating *Unsandboxed* extensions for Scratch 3.0

By the way, you should probably update the OP to mention TurboWarp's official unsandboxed extensions docs, which has a different way of loading extensions (using the same Scratch.extensions.register API that sandboxed extensions use) instead of accessing VM functions (in fact specifically forbidding loading the extension that way).

docs.turbowarp.org/development/unsandboxed-extensions wrote:

Some older “unsandboxed extensions” worked by calling the extension registration functions directly on window.vm. Unsandboxed extensions as described in this document MUST NOT use that API. All extensions must be registered through Scratch.extensions.register.

This is a signature. It's a piece of text that appears below every post I write. Click here to learn more, including how to make your own.

Thanks Jeffalo
RIP assets image hosting. 2013?-2023


showierdata9978
Scratcher
100+ posts

Creating *Unsandboxed* extensions for Scratch 3.0

CST1229 wrote:

By the way, you should probably update the OP to mention TurboWarp's official unsandboxed extensions docs, which has a different way of loading extensions (using the same Scratch.extensions.register API that sandboxed extensions use) instead of accessing VM functions (in fact specifically forbidding loading the extension that way).

docs.turbowarp.org/development/unsandboxed-extensions wrote:

Some older “unsandboxed extensions” worked by calling the extension registration functions directly on window.vm. Unsandboxed extensions as described in this document MUST NOT use that API. All extensions must be registered through Scratch.extensions.register.

– deleted –

Last edited by showierdata9978 (Nov. 9, 2022 23:27:33)


High School Sophomore

I DO NOT CHECK SCRATCH UNLESS I AM EXTREMELY BOARD.
You can find me in a lot of places under the same username


showierdata9978
Scratcher
100+ posts

Creating *Unsandboxed* extensions for Scratch 3.0

updated guide some.

High School Sophomore

I DO NOT CHECK SCRATCH UNLESS I AM EXTREMELY BOARD.
You can find me in a lot of places under the same username


showierdata9978
Scratcher
100+ posts

Creating *Unsandboxed* extensions for Scratch 3.0

with how dead this subfourm is, you dont need to sticky any, its already always on the front page lol

High School Sophomore

I DO NOT CHECK SCRATCH UNLESS I AM EXTREMELY BOARD.
You can find me in a lot of places under the same username


showierdata9978
Scratcher
100+ posts

Creating *Unsandboxed* extensions for Scratch 3.0

ima just bump this

High School Sophomore

I DO NOT CHECK SCRATCH UNLESS I AM EXTREMELY BOARD.
You can find me in a lot of places under the same username


know0your0true0color
Scratcher
100+ posts

Creating *Unsandboxed* extensions for Scratch 3.0

showierdata9978 wrote:

ima just bump this
Kool

Hi! I'm know0your0true0color, you can also call me Fresh
know0your0true0color
Scratcher
100+ posts

Creating *Unsandboxed* extensions for Scratch 3.0

bump

Hi! I'm know0your0true0color, you can also call me Fresh
showierdata9978
Scratcher
100+ posts

Creating *Unsandboxed* extensions for Scratch 3.0

bump

High School Sophomore

I DO NOT CHECK SCRATCH UNLESS I AM EXTREMELY BOARD.
You can find me in a lot of places under the same username


know0your0true0color
Scratcher
100+ posts

Creating *Unsandboxed* extensions for Scratch 3.0

showierdata9978 wrote:

Scratch VM Docs

sadly there is not currently documentation of the VM`s API (atleast from what i found)
what do you mean?
there docs for the scratch vm right here

Hi! I'm know0your0true0color, you can also call me Fresh
showierdata9978
Scratcher
100+ posts

Creating *Unsandboxed* extensions for Scratch 3.0

know0your0true0color wrote:

showierdata9978 wrote:

Scratch VM Docs

sadly there is not currently documentation of the VM`s API (atleast from what i found)
what do you mean?
there docs for the scratch vm right here

do you mean this?

those docs are not helpfull as they dont provide any information on the methods, where its better to just read the source code instead of those docs

Last edited by showierdata9978 (Dec. 13, 2022 15:29:16)


High School Sophomore

I DO NOT CHECK SCRATCH UNLESS I AM EXTREMELY BOARD.
You can find me in a lot of places under the same username


showierdata9978
Scratcher
100+ posts

Creating *Unsandboxed* extensions for Scratch 3.0

bump due to editing information on the OP

High School Sophomore

I DO NOT CHECK SCRATCH UNLESS I AM EXTREMELY BOARD.
You can find me in a lot of places under the same username


know0your0true0color
Scratcher
100+ posts

Creating *Unsandboxed* extensions for Scratch 3.0

bump!

Hi! I'm know0your0true0color, you can also call me Fresh
showierdata9978
Scratcher
100+ posts

Creating *Unsandboxed* extensions for Scratch 3.0

bump

High School Sophomore

I DO NOT CHECK SCRATCH UNLESS I AM EXTREMELY BOARD.
You can find me in a lot of places under the same username


showierdata9978
Scratcher
100+ posts

Creating *Unsandboxed* extensions for Scratch 3.0

added alot of examples from extensions.turbowarp.org/

High School Sophomore

I DO NOT CHECK SCRATCH UNLESS I AM EXTREMELY BOARD.
You can find me in a lot of places under the same username


showierdata9978
Scratcher
100+ posts

Creating *Unsandboxed* extensions for Scratch 3.0

fixed some spelling issues

High School Sophomore

I DO NOT CHECK SCRATCH UNLESS I AM EXTREMELY BOARD.
You can find me in a lot of places under the same username


showierdata9978
Scratcher
100+ posts

Creating *Unsandboxed* extensions for Scratch 3.0

This got stickyed to O-O

High School Sophomore

I DO NOT CHECK SCRATCH UNLESS I AM EXTREMELY BOARD.
You can find me in a lot of places under the same username


know0your0true0color
Scratcher
100+ posts

Creating *Unsandboxed* extensions for Scratch 3.0

showierdata9978 wrote:

This got stickyed to O-O
WAIT THIS TOO JRJHRNJUJRNR

Hi! I'm know0your0true0color, you can also call me Fresh
showierdata9978
Scratcher
100+ posts

Creating *Unsandboxed* extensions for Scratch 3.0

renamed to
Creating *unsandboxed* extensions for Scratch 3.0

Last edited by showierdata9978 (Jan. 17, 2023 15:25:38)


High School Sophomore

I DO NOT CHECK SCRATCH UNLESS I AM EXTREMELY BOARD.
You can find me in a lot of places under the same username


Powered by DjangoBB