Commit graph

480 commits

Author SHA1 Message Date
Christopher Willis-Ford
8dbcc1fc8f style: fix hasOwnProperty lint complaints 2023-12-15 17:40:05 -08:00
Christopher Willis-Ford
802d211f95 fix: update GitHub links with /scratchfoundation/ 2023-09-28 09:16:47 -07:00
DD Liu
7eabcb8a29
Merge pull request #2329 from adroitwhiz/remove-updatedrawableproperties
Remove remaining updateDrawableProperties calls
2020-09-24 15:50:26 -04:00
Eric Rosenbaum
a2b4cf8cfb store broadcastVar on stackFrame to prevent canceling
a broadcast early if the variable changes
2020-08-12 11:21:55 -04:00
KisaragiEffective
c1745cc979
Update scratch3_data.js
fix inappropriate jsdoc type
2020-07-06 14:22:25 +09:00
Eric Rosenbaum
540d9c676c
Merge pull request #2341 from apple502j/patch-9
Clear some stats when disposing runtime
2020-06-22 10:25:41 -04:00
adroitwhiz
3478643f44
Revert "Set graphic effect to zero if it's Infinity" 2020-06-18 12:17:57 -04:00
adroitwhiz
8ca737702f
Merge pull request #2465 from adroitwhiz/say-think-consistency
Consistently format text bubbles (this time, like 2.0 does)
2020-06-16 16:00:05 -04:00
adroitwhiz
9ed587ff5e add SAY_OR_THINK getter 2020-06-09 13:28:58 -04:00
adroitwhiz
fe6b07acca Consistently format text bubbles 2020-06-09 13:28:58 -04:00
apple502j
7b8c2a99c4
Set graphic effect to zero if it's Infinity 2020-05-28 14:11:27 +09:00
jokebookservice1
57445a4d49
Merge branch 'develop' into fix/random-costume 2020-05-07 16:11:08 +01:00
apple502j
3e48cd7df6 Reset counter and timer too 2020-04-06 20:21:31 +09:00
apple502j
6055823f20
Reset answer when runtime gets disposed 2020-03-25 17:51:08 +09:00
DD Liu
2a42285abe Revert "Consistently format text bubbles"
This reverts commit bc61e547b5.
2020-03-19 12:40:55 -04:00
DD Liu
7330129cc6 Revert "add SAY_OR_THINK getter"
This reverts commit ffd2a2a9e8.
2020-03-19 12:40:01 -04:00
DD Liu
db33da2753 Revert "Don't fix small values less than .01 to 2 decimal points. This matches 2.0 behavior"
This reverts commit 2770f925fe.
2020-03-19 12:37:34 -04:00
DD Liu
c8694256b6
Update src/blocks/scratch3_looks.js
Thanks!

Co-Authored-By: adroitwhiz <adroitwhiz@protonmail.com>
2020-03-13 19:43:15 -04:00
DD Liu
2770f925fe Don't fix small values less than .01 to 2 decimal points. This matches 2.0 behavior 2020-03-13 19:39:03 -04:00
DD Liu
772fbe1aab
Merge pull request #2187 from adroitwhiz/say-think-consistency
Consistently format text bubbles
2020-03-10 16:14:51 -04:00
adroitwhiz
ffd2a2a9e8 add SAY_OR_THINK getter 2020-03-06 15:33:31 -05:00
DD Liu
01cb244e3d
Merge pull request #2239 from adroitwhiz/replace-item-by-index
replaceItemOfList() by assigning value to array index instead of Array.splice
2020-02-27 15:39:57 -05:00
adroitwhiz
267395b13b Remove remaining updateDrawableProperties calls 2020-02-26 21:20:50 -05:00
adroitwhiz
bc61e547b5 Consistently format text bubbles 2020-02-05 00:21:38 -05:00
Karishma Chadha
0a5673d5d3
Merge pull request #2280 from kchadha/inline-images-in-extensions
Inline Images in Extensions
2019-10-18 10:20:16 -04:00
David Lechner
3070e30241
Fix mod operator comment
The remainder of mod in Scratch is not always positive.

According to the wiki, Scratch uses floored division like Smalltalk instead of truncated division like JavaScript.

With floored division, the sign of the remainder matches the sign of the divisor - it is not always positive.
2019-09-30 17:08:43 -05:00
Karishma Chadha
470fdb761d Remove 'alt' from field_image descriptor since it seems to only be used for 'collapsed blocks' from blockly. This is not a feature being used in scratch. Update docs. 2019-09-27 11:46:48 -05:00
Karishma Chadha
21430a5366 Add support for image argument type in extensions. Add example in core example extension. 2019-09-20 15:19:14 -07:00
adroitwhiz
4e34f1735a replaceItemOfList by assigning array index 2019-07-20 01:11:35 -04:00
Michael "Z" Goddard
e1254bd8c7
elevate stack block id and frame info into thread
- Add pointer member to thread. This is the current executing block.
- Add stackFrame member to thread. This is the current frame
  information like procedure parameters.

This is a step potentially towards stack-less threads. With further
modifications we could have stack and stackFrames be null if a script
does not call a procedure.
2019-06-03 18:13:01 -04:00
Michael "Z" Goddard
ffcd0e6518
remove empty procedure_definetion block
The engine supports blocks that do not have defined functions.
2019-06-03 15:49:11 -04:00
apple502j
558f43a3d6 Fix Cast.LIST_ALL casting case 2019-06-01 14:43:53 +09:00
Christopher Willis-Ford
87a88e2caf Add a button to the CoreEx extension 2019-04-02 23:13:01 -07:00
Karishma Chadha
30c9b7fd84 Add tests and update core example to handle stage being undefined. 2019-03-22 12:20:07 -04:00
Karishma Chadha
bc2824dfdc Add an example core blocks category using the extension spec. 2019-03-22 12:17:10 -04:00
picklesrus
7807dcecb4
Merge pull request #2042 from ktbee/clamp-graphics-effect
add clampEffect for limiting range of brightness and ghost effects
2019-03-13 15:23:18 -04:00
Katie Broida
92c1711937 add clampEffect for limiting range of brightness and ghost effects 2019-03-12 11:14:11 -04:00
Joke Book
43faf2a64d
Use a utility function for random number picking 2019-03-09 14:30:17 +00:00
Katie Broida
c37745e97e Cast sprite name to string before getSpriteTargetByName 2019-03-07 16:09:46 -05:00
Joke Book
b29f07636d
fix: Equalise the chances when picking a random backdrop 2019-02-20 21:11:27 +00:00
Karishma Chadha
0fa5e9181a
Merge pull request #1839 from mzgoddard/fix-missing-no-param
fix: initialize stack frame params for all procedures
2019-01-16 14:06:38 -05:00
Karishma Chadha
fefb032f17
add comment before using util.initParams
Co-Authored-By: mzgoddard <mzgoddard@gmail.com>
2019-01-15 11:24:47 -05:00
Karishma Chadha
59a865ef47 Create a new addTarget function on the runtime which populates the targets list as well as the executable targets list. 2019-01-14 11:48:11 -05:00
Karishma Chadha
fbee37e915 Populate executable targets when runtime.targets is populated so that scripts don't run before they are supposed to (e.g. before targets are done getting installed). 2019-01-11 14:52:34 -05:00
Florrie
fbb6d63e03 Clamp ghost effect
Cherry-picked from 35c8890425 (#1887)
2018-12-28 10:39:42 -04:00
Karishma Chadha
6c1031c534
Use '' instead of null
Co-Authored-By: apple502j <33279053+apple502j@users.noreply.github.com>
2018-12-14 17:35:07 +09:00
Michael "Z" Goddard
20ff75b776
fix: initialize stack frame params for all procedures
A previous change fixed compatibility with Scratch 2 removing 3's
unintentional scope leaking. This furthers that change so that
procedures with no parameters will also not accidentally use values in
other procedure stacks.
2018-12-13 10:51:44 -05:00
apple502j
73968895d8 Display the next ask 2018-12-11 18:39:09 +09:00
apple502j
aea7000917 Clear ask bubble when stopForTarget 2018-12-09 13:14:42 +09:00
Katie Broida
967cab8f20
Make the wait block's logic and behavior more consistent with Scratch 2 (#1759) 2018-12-04 10:35:42 -05:00