Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1980 commits
Select commit Hold shift + click to select a range
0d44f7f
Make the wait block's logic and behavior more consistent with Scratch…
ktbee Dec 4, 2018
508df09
Merge pull request #1809 from paulkaplan/serialize-infinity
paulkaplan Dec 5, 2018
5296945
Merge pull request #1815 from paulkaplan/clear-pen-on-dispose
paulkaplan Dec 5, 2018
4ca4863
Merge pull request #1823 from kchadha/slider-cloud-vars
kchadha Dec 6, 2018
e1f4768
Merge pull request #1825 from paulkaplan/emit-start-publicly
paulkaplan Dec 6, 2018
84f51ab
Merge pull request #1818 from picklesrus/monitor-vars-project-load
picklesrus Dec 7, 2018
ca661ca
Merge pull request #1834 from kchadha/edge-hat-duplicate-sprite
kchadha Dec 13, 2018
c98ac6d
Merge pull request #1849 from fsih/addCostumeFromLibrary
fsih Dec 18, 2018
68c8dce
Merge pull request #1852 from mzgoddard/sb1-convert
mzgoddard Dec 20, 2018
e0c848f
Merge pull request #1897 from kchadha/fix-cloud-var-limit
paulkaplan Jan 7, 2019
bac76f7
Merge pull request #1905 from bocoup/update-blocks
ericrosenbaum Jan 10, 2019
1d7b245
Merge pull request #1912 from kchadha/executable-targets-fix
kchadha Jan 14, 2019
5903794
Merge pull request #1925 from ericrosenbaum/bugfix/dont-load-vernier-yet
paulkaplan Jan 15, 2019
2d29099
Merge pull request #1763 from evhan55/extensions/disconnect-errors
ericrosenbaum Jan 18, 2019
51cb803
Merge pull request #1941 from kchadha/add-runtime-to-blocks
kchadha Jan 30, 2019
eb0ff7a
Merge pull request #1962 from LLK/project-dirty-state-fixes
kchadha Feb 5, 2019
79d7852
Merge pull request #1979 from paulkaplan/share-blocks-new-ids
paulkaplan Feb 7, 2019
75bd36a
Merge pull request #1933 from ErikMejerHansen/feature/field_type_support
kchadha Feb 12, 2019
98bc931
Merge pull request #1871 from Affonso-Gui/fix_dynamic_menu_string
cwillisf Feb 13, 2019
d6942b9
Merge pull request #1959 from ktbee/declare-const-once
ktbee Feb 25, 2019
94006d5
Merge pull request #1972 from mzgoddard/sound-bank-over-sprite
mzgoddard Mar 4, 2019
52d9e4b
Merge pull request #2038 from ktbee/cast-sprite-names-to-string
ktbee Mar 8, 2019
d90ae52
Merge pull request #1956 from mzgoddard/lazy-eval-big-dependencies
mzgoddard Mar 12, 2019
dc71dc0
Merge pull request #2069 from ericrosenbaum/bugfix/load-vernier-code
rschamp Mar 26, 2019
c00f297
Merge pull request #2060 from kchadha/load-core-extension
kchadha Mar 28, 2019
b181abd
Merge pull request #1943 from ktbee/clock-timer-compat-fix
ktbee Mar 29, 2019
27e916e
Merge pull request #2083 from cwillisf/extension-buttons
cwillisf Apr 3, 2019
3e712a0
Merge pull request #2061 from knandersen/boostextension
knandersen Apr 3, 2019
92219af
Merge pull request #2041 from ktbee/use-empty-bitmap-size
ktbee Apr 16, 2019
f2e9a6a
Merge pull request #1930 from mzgoddard/runtime-script-cache
kchadha Apr 17, 2019
afb01f4
Merge pull request #2122 from LLK/revert-1930-runtime-script-cache
kchadha Apr 17, 2019
0bf9941
Merge pull request #2123 from cwillisf/extensions-xml-escape
cwillisf Apr 18, 2019
036071d
Merge pull request #2126 from mzgoddard/runtime-script-cache-fix
kchadha May 8, 2019
dd79728
Merge pull request #1648 from mzgoddard/stop-all-next-tick
kchadha May 15, 2019
952372e
Merge pull request #2175 from ericrosenbaum/hotfix/do-not-load-speech…
ericrosenbaum May 20, 2019
49af15d
synth extension
May 24, 2019
77af7dd
lightplay extension stub
May 24, 2019
0896559
Merge pull request #2181 from kchadha/revert-unwanted-changes
kchadha May 24, 2019
0bf7e16
Merge pull request #2182 from paulkaplan/scratch-link-socket
paulkaplan Jun 4, 2019
1e71c6e
Merge pull request #2197 from ericrosenbaum/bugfix/update-sound-duration
paulkaplan Jun 6, 2019
86a54be
Merge pull request #2161 from LLK/e16n
kchadha Jun 18, 2019
c84b139
Merge pull request #2143 from cwillisf/non-droppable-extension-menus
cwillisf Jun 19, 2019
a0926a6
Merge pull request #2145 from mzgoddard/raise-params
kchadha Jul 17, 2019
3ec8229
Merge pull request #2240 from LLK/revert-2145-raise-params
kchadha Jul 22, 2019
35fc42c
Merge pull request #2252 from chrisgarrity/custom-mimetype
chrisgarrity Aug 13, 2019
588b04a
Merge pull request #2280 from kchadha/inline-images-in-extensions
kchadha Oct 18, 2019
a8873ab
Merge pull request #2203 from mzgoddard/render-update-drawable
fsih Nov 19, 2019
b05dd6c
Merge pull request #2302 from ErikMejerHansen/develop
kchadha Dec 27, 2019
91edc37
Merge pull request #2314 from adroitwhiz/dont-update-rotation-center
fsih Apr 2, 2020
e1726a4
Merge pull request #2415 from adroitwhiz/no-setsay
adroitwhiz May 19, 2020
b346280
Merge pull request #2442 from adroitwhiz/filter-extension-blocks
adroitwhiz Jun 16, 2020
a5808ed
Merge pull request #2341 from apple502j/patch-9
ericrosenbaum Jun 22, 2020
fc09fc2
Move RenderWebGL class into its own file
Jun 3, 2016
852f7c0
Allow overriding the candidates for picking
Jun 3, 2016
fb8cc5c
Implement color-touching-color
Jun 6, 2016
f3d7dd7
Move shader management to new ShaderManager class
Jun 8, 2016
9e26c79
Simplify coordinate system specification
Jun 9, 2016
6bc05b3
Add silhouette color to Drawable's uniforms
Jun 9, 2016
a0dcef2
Add `setDebugCanvas` method
Jun 9, 2016
4e9092c
Improve color handling in isTouchingColor
Jun 9, 2016
65e2180
Fix GL errors when using SVG Drawable early
Jun 13, 2016
113774b
Allow driving the renderer from a web worker
Jun 14, 2016
aa17a41
Use ES6 class definitions
Jun 15, 2016
ba3eb03
Make API consistent from page and worker
Jun 16, 2016
5a9e808
Synchronize with master branch
thisandagain Aug 8, 2016
fd7cf32
Remove worker support (#36)
tmickel Sep 15, 2016
edf9cb0
Add `setDrawableOrder` for layering (#41)
tmickel Oct 7, 2016
c55c137
Add `RenderWebGL.prototype.isTouchingDrawables` (#43)
tmickel Oct 11, 2016
d345c14
Calculating tight bounding boxes for Drawables (#42)
tmickel Oct 11, 2016
fa03f0d
Expose skin/costume size (#45)
tmickel Oct 11, 2016
07e87d5
Math.max mix-up
tmickel Oct 12, 2016
adcce05
Fix y coordinates of bounding box (#46)
tmickel Oct 12, 2016
3761320
Bounding-box optimizations for touching color, touching drawables (#55)
tmickel Oct 24, 2016
924706f
Merge pull request #64 from cwillisf/structural-updates
cwillisf Dec 13, 2016
72c2541
Merge pull request #65 from cwillisf/more-es6
cwillisf Dec 19, 2016
ca86040
Merge pull request #67 from cwillisf/skin-classes
cwillisf Jan 12, 2017
ccb9191
Merge pull request #72 from cwillisf/pen
cwillisf Jan 20, 2017
7bf0237
Merge pull request #70 from rschamp/bugfix/new-skins-without-rotation…
rschamp Jan 25, 2017
20ebf5a
Merge pull request #80 from rschamp/bugfix/73-retina-size
rschamp Feb 7, 2017
707e6f9
Merge pull request #82 from griffpatch/feature/fencing
cwillisf Feb 15, 2017
75e5dfe
Merge pull request #92 from LLK/revert-82-feature/fencing
rschamp Feb 15, 2017
7e9c419
Merge pull request #90 from cwillisf/fix-cachalot
cwillisf Feb 17, 2017
5ff1908
Merge pull request #97 from rschamp/dnd
rschamp Feb 21, 2017
197654d
Merge pull request #107 from LLK/greenkeeper/twgl.js-3.0.2
cwillisf Feb 23, 2017
858309b
Merge pull request #102 from rschamp/jsdoc
rschamp Feb 23, 2017
347a68b
Merge pull request #93 from griffpatch/feature/FenceAgain
rschamp Feb 23, 2017
88a1f93
Merge pull request #96 from CSnap/fix_getConvexHullPointsForDrawable
thisandagain Mar 2, 2017
32bc9ba
Merge pull request #94 from CSnap/getBounds
thisandagain Mar 2, 2017
981b653
Merge pull request #113 from rschamp/dnd
rschamp Mar 3, 2017
afed33e
Merge pull request #119 from LLK/stamp-hidden
paulkaplan Mar 7, 2017
0adab9d
Merge pull request #122 from cwillisf/remove-url-handling
cwillisf Mar 24, 2017
fd757e7
Merge pull request #132 from a49594a/patch-1
cwillisf Apr 19, 2017
3816302
Merge pull request #154 from paulkaplan/fix-pick-sizing
paulkaplan Aug 10, 2017
e8ba7b3
Merge pull request #160 from fsih/updateSvg
fsih Aug 31, 2017
4d66ac5
Merge pull request #163 from fsih/updateSvg2
fsih Aug 31, 2017
3639367
Merge pull request #159 from paulkaplan/color-picking
paulkaplan Sep 6, 2017
22be611
Merge pull request #157 from LLK/greenkeeper/eslint-config-scratch-4.0.0
cwillisf Sep 6, 2017
df94d16
Merge pull request #162 from joshlory/color-touching-tolerance
cwillisf Sep 6, 2017
da1f7f2
Merge pull request #177 from paulkaplan/say-think
paulkaplan Oct 11, 2017
276e5bc
Merge pull request #196 from mzgoddard/alpha-shape
cwillisf Nov 20, 2017
ca4bd27
Merge pull request #193 from griffpatch/touching-color-white
cwillisf Nov 21, 2017
ea3c8f6
Merge pull request #206 from paulkaplan/fix-convex-hull-bug
paulkaplan Dec 1, 2017
4849ae3
Merge pull request #211 from paulkaplan/do-not-pick-invisibles
paulkaplan Dec 8, 2017
3b08e08
Merge pull request #213 from paulkaplan/touching-invisible
paulkaplan Dec 11, 2017
d0c4652
Merge pull request #204 from cwillisf/use-linear-filtering
cwillisf Dec 11, 2017
241fa93
Merge pull request #226 from cwillisf/check-for-webgl-support
cwillisf Jan 11, 2018
0a83661
Merge pull request #232 from cwillisf/rasterize-scaled-svg
rschamp Jan 17, 2018
2618266
Merge pull request #234 from fsih/pull231
fsih Jan 23, 2018
a4b1628
Merge pull request #227 from cwillisf/use-browser-field
cwillisf Jan 24, 2018
d31e66f
Merge pull request #248 from paulkaplan/fix-bubble-bounds
paulkaplan Mar 23, 2018
4ca7dd1
Merge pull request #254 from paulkaplan/skin-size
paulkaplan Apr 11, 2018
62bcca3
Merge pull request #260 from kchadha/get-rotation-center
kchadha Apr 23, 2018
0824c24
Merge pull request #264 from fsih/updateBitmap
fsih Apr 25, 2018
24630ac
Merge pull request #266 from fsih/renderTakeOff2Factor
fsih Apr 27, 2018
3d8eca6
Rewrite isTouchingDrawables on CPU (#263)
gnarf Apr 27, 2018
8deff94
Merge pull request #268 from paulkaplan/fix-blurry-fullscreen
paulkaplan May 2, 2018
8ad0cf5
Merge pull request #269 from fsih/updateBitmapSkinJsdoc
fsih May 4, 2018
87dfab6
Merge pull request #285 from kchadha/layer-ordering
kchadha May 25, 2018
c26b18a
Merge pull request #320 from kchadha/get-drawable-order
kchadha Jul 24, 2018
1ff7bc7
Optimizing isTouching while creating a drawableTouches for sensing mo…
gnarf Aug 7, 2018
df9bae9
Touching color implementation (#312)
gnarf Aug 8, 2018
591e784
Framebuffer PenSkin (#319)
mzgoddard Aug 8, 2018
610e732
Merge pull request #348 from rschamp/get-canvas
rschamp Sep 18, 2018
c64ac86
Merge pull request #347 from rschamp/snapshots
rschamp Sep 18, 2018
d7bafaa
Merge pull request #349 from wdr-data/fix/infinite-bounds-loop
cwillisf Oct 2, 2018
0b8d48f
Merge pull request #354 from mzgoddard/fix-touching-mouse
thisandagain Nov 2, 2018
1f3cb55
Merge pull request #392 from kchadha/fix-uncaught-type-error
kchadha Jan 7, 2019
7c0c5f6
Merge pull request #391 from LLK/blurrybg
fsih Jan 8, 2019
971f4f8
Merge pull request #393 from LLK/revert-391-blurrybg
paulkaplan Jan 8, 2019
f8a921e
Merge pull request #394 from paulkaplan/defer-silhouette-updates
paulkaplan Jan 9, 2019
12d44be
Merge pull request #398 from paulkaplan/revert-silhouette
paulkaplan Jan 15, 2019
62a479a
Merge pull request #400 from ktbee/fence-width-compat
ktbee Jan 17, 2019
f2d0fab
Merge pull request #404 from LLK/touchingColor2
fsih Jan 22, 2019
e401df9
Merge pull request #376 from evhan55/bug/extract-drawable
evhan55 Jan 25, 2019
5ccef2c
Merge pull request #407 from cwillisf/coordinates-fixups
cwillisf Feb 6, 2019
42e6f5b
Merge pull request #410 from LLK/revert-407-coordinates-fixups
cwillisf Feb 7, 2019
6f739f1
Merge pull request #408 from ktbee/compat-integer-x-y-off-stage
ktbee Feb 8, 2019
25958b3
Merge pull request #409 from ktbee/compat-bitmap-position-off-stage
ktbee Feb 13, 2019
019b6a2
Merge pull request #406 from cwillisf/playground-webpack
cwillisf Feb 14, 2019
a7906d7
Merge pull request #414 from mzgoddard/image-data-texture
mzgoddard Mar 26, 2019
ce849a5
Merge pull request #419 from cwillisf/coordinates-fixups-2
cwillisf Apr 10, 2019
aff0019
Merge pull request #440 from LLK/revert-419-coordinates-fixups-2
paulkaplan Apr 19, 2019
ed09d3d
Merge pull request #418 from peabrainiac/develop
cwillisf Apr 30, 2019
99dbae4
Merge pull request #451 from adroitwhiz/canvas-text-bubble
paulkaplan May 24, 2019
cb22fb3
Merge pull request #467 from mzgoddard/rect-init-matrix
cwillisf Jul 1, 2019
191d3d6
Merge pull request #470 from mzgoddard/skin-alter-push
cwillisf Jul 1, 2019
3cb7449
Merge pull request #493 from LLK/revert-470-skin-alter-push
kchadha Aug 13, 2019
9340785
Merge pull request #494 from LLK/revert-467-rect-init-matrix
kchadha Aug 13, 2019
758ceaf
Merge pull request #502 from fsih/turnOffAntiAlias
fsih Aug 30, 2019
b36ad03
Merge pull request #441 from adroitwhiz/region-exit-fix
cwillisf Aug 30, 2019
1007607
Merge pull request #442 from adroitwhiz/pen-stamp-region-optimization
cwillisf Aug 30, 2019
5a67c50
Merge pull request #495 from LLK/revert-494-revert-467-rect-init-matrix
kchadha Aug 30, 2019
e9fb165
Merge pull request #496 from LLK/revert-493-revert-470-skin-alter-push
cwillisf Sep 5, 2019
68d7f87
Merge pull request #505 from LLK/revert-496-revert-493-revert-470-ski…
kchadha Sep 12, 2019
3a6a5b2
Merge pull request #506 from LLK/revert-505-revert-496-revert-493-rev…
cwillisf Sep 25, 2019
9d84489
Merge pull request #508 from LLK/revert-506-revert-505-revert-496-rev…
kchadha Sep 26, 2019
00ddf3f
Merge pull request #469 from mzgoddard/update-drawable
fsih Oct 1, 2019
ad11b87
Merge pull request #491 from adroitwhiz/dont-fudge-up-the-renderer
cwillisf Oct 1, 2019
c3eb5b7
Merge pull request #512 from kchadha/skin-empty-image-data
kchadha Oct 21, 2019
ff02312
Merge pull request #514 from adroitwhiz/simplify-reskin
fsih Nov 6, 2019
f50ea2b
Merge pull request #480 from adroitwhiz/usenearest-fix-2
fsih Nov 6, 2019
7014ebe
Merge pull request #431 from ktbee/javascript-scaled-textures
cwillisf Nov 26, 2019
bf29c5a
Merge pull request #487 from adroitwhiz/pen-stamp-to-framebuffer
fsih Dec 11, 2019
cb8a7e4
Add test for local linking?
paulkaplan Sep 18, 2020
3dd729a
Add basic sprite text
paulkaplan Sep 23, 2020
9639c25
Add TextCostumeSkin, revert TextBubbleSkin to develop
ericrosenbaum Oct 6, 2020
487edd2
put textCostume functions next to each other
ericrosenbaum Oct 9, 2020
2764abd
extension owns style state
ericrosenbaum Oct 10, 2020
d1bd37c
trying to get text working for clones
ericrosenbaum Oct 10, 2020
3a5e955
Clones get their own skins
ericrosenbaum Oct 11, 2020
417ad7e
Update to most recent scratch-render, dropping previous changes (i'll…
paulkaplan Oct 13, 2020
fdf39fc
Add back TextCostumeSkin functionality after develop update
paulkaplan Oct 13, 2020
dcd4e82
working dependencies for blazeface
ericrosenbaum Oct 22, 2020
fa4081f
all blocks working!
ericrosenbaum Oct 22, 2020
f41353c
run at 30fps
ericrosenbaum Oct 23, 2020
e8b829d
Override clamping behvior for text skins
paulkaplan Oct 26, 2020
7cce888
Add browser entry point for gui
paulkaplan Oct 26, 2020
966c475
increase auto-scroll time delay
ericrosenbaum Oct 27, 2020
af95e91
update extension library tile
ericrosenbaum Oct 27, 2020
6894f2e
add face detected hat, boolean and probability blocks
ericrosenbaum Nov 9, 2020
1481724
Add number of faces and face size reporters
ericrosenbaum Nov 9, 2020
9a09c46
add attach block
ericrosenbaum Nov 9, 2020
9e795dc
make motion and size blocks work after attaching
ericrosenbaum Nov 13, 2020
58f3d7b
Merge branch 'sprite-text-v3' into labs-site-sprite-text
paulkaplan Nov 13, 2020
d036411
always use “face” instead of “head”
ericrosenbaum Nov 18, 2020
9b0f771
remove attach block, add point in face tilt dir and set size to face …
ericrosenbaum Nov 18, 2020
491dc3f
clean up and re-arrange blocks menu
ericrosenbaum Nov 18, 2020
5b3d6bb
Add points between eyes and top of head
ericrosenbaum Nov 19, 2020
0dc1c6f
use a distance function
ericrosenbaum Nov 20, 2020
081b4aa
Add “when this sprite touches nose” block
ericrosenbaum Nov 20, 2020
ecb113f
Simpler “when face touches” using face bounds
ericrosenbaum Nov 20, 2020
e5081e3
change hat to “when this sprite touches a nose”
ericrosenbaum Nov 23, 2020
9a6ee9f
Add temporary extension library tile
ericrosenbaum Nov 23, 2020
4b4bbe3
show “importing” alert while extension data is loading
ericrosenbaum Nov 23, 2020
3406995
Show “loading extension…” in the alert
ericrosenbaum Nov 23, 2020
02c0eda
Add ext name and feedback button to editor menubar
paulkaplan Nov 24, 2020
8ce45d0
Add last updated time to editor
paulkaplan Nov 24, 2020
8f2acc6
WIP add pre-download confirmation modal
paulkaplan Nov 24, 2020
db22267
Add link for feedback button
paulkaplan Nov 24, 2020
6116a54
Revert "Add last updated time to editor"
paulkaplan Dec 1, 2020
17f75ba
reduce framerate to 15fps
ericrosenbaum Dec 1, 2020
39e70d1
remove log
ericrosenbaum Dec 1, 2020
80cdbfb
Remove offset logic that was causing frequent skipped frames
ericrosenbaum Dec 1, 2020
b0c5916
change to “when this sprite touches a mouth” and “a face is detected?”
ericrosenbaum Dec 1, 2020
dccad9a
command blocks do nothing if there’s no face
ericrosenbaum Dec 1, 2020
7f19d57
cache size and tilt to report if there’s no face
ericrosenbaum Dec 1, 2020
f833ea0
re-order blocks and use a menu for “when this sprite touches”
ericrosenbaum Dec 9, 2020
09c4358
Add Initial scratch lab site
paulkaplan Dec 11, 2020
588b8a9
Only load the extension when entering the modal
paulkaplan Dec 11, 2020
742bed0
update block and menu icons
ericrosenbaum Dec 14, 2020
78823af
Merge branch 'face-sensing-v6' into face
paulkaplan Dec 16, 2020
07ec2bc
Update to gui develop as of 12-16-2020
paulkaplan Dec 16, 2020
f0b67e0
Update to vm develop 12-16-2020
paulkaplan Dec 16, 2020
cdd55f8
Update to render develop 12-16-2020
paulkaplan Dec 16, 2020
fd47cd2
Reset to llk/develop for scratch-vm
paulkaplan Dec 18, 2020
50ae486
Reset to llk/develop for scratch-render
paulkaplan Dec 18, 2020
3bdeec3
Bring up-to-date with gui develop and minimal template changes
paulkaplan Dec 18, 2020
87e6a17
Update README
paulkaplan Dec 18, 2020
1e5650c
Remove packages so they are never out of date
paulkaplan Dec 18, 2020
3024124
Update scratch-render to latest upstream, keeping the scratch coord h…
paulkaplan Dec 22, 2020
8698a8e
Update vm to latest, stripping out text specific stuff
paulkaplan Dec 22, 2020
14e894c
Update gui to develop for face
paulkaplan Dec 22, 2020
30f79c3
Add back the scratch-vm changes for when an extension is loaded
paulkaplan Dec 22, 2020
97a487c
Update name of extension in GUI
paulkaplan Dec 22, 2020
ae000ff
smoothing for face detected boolean and hat blocks
ericrosenbaum Dec 17, 2020
5f38d64
update extension library tile
ericrosenbaum Jan 8, 2021
a91f0c0
Update bleb and form url
paulkaplan Jan 13, 2021
1cdd2ec
Include a sane cacheTimeout for video getFrame
paulkaplan Jan 22, 2021
b44321f
editor logo at top left links to scratch lab home page
ericrosenbaum Apr 21, 2021
f035975
Merge commit '09b4b559c18e1347a1793ae50dfd9fa79cd534aa' as 'packages/…
benjiwheeler Apr 24, 2023
4976a0e
Merge commit '4d4c25ea7d062a2fa9e48cb6c7931a7c114d80cd' as 'packages/…
benjiwheeler Apr 24, 2023
543da14
Merge commit 'b3398d039935ee2520772164c09d1cfdf1be0298' as 'packages/…
benjiwheeler Apr 24, 2023
9472226
commit patched changes, starter extension and lerna linking
benjiwheeler Apr 24, 2023
86f4566
uepr-127:changed face sensing model
Bogomil-Stoyanov Jan 24, 2025
98fe22a
Merge with starter branch changes
KManolov3 Apr 1, 2025
9e8fddf
Merge remote-tracking branch 'origin/starter' into tensorflow-face-de…
KManolov3 Apr 1, 2025
8b5e5ec
feat: [UEPR-282] add face-sensing exttension
MiroslavDionisiev Jul 22, 2025
a451685
chore: [UEPR-282] update package-lock
MiroslavDionisiev Jul 22, 2025
b7ad4c1
feat: [UEPR-289] disconnect project from cloud
MiroslavDionisiev Jul 23, 2025
5f1eed0
fix: [UEPR-282] change field name
MiroslavDionisiev Jul 31, 2025
8dfd7f8
Merge remote-tracking branch 'upstream/develop' into HEAD
KManolov3 Aug 4, 2025
38e328c
Merge pull request #273 from scratchfoundation/UEPR-289
KManolov3 Aug 4, 2025
809a48e
fix: [UEPR-302] Rename face sensing block to nose, instead of noseTip
adzhindzhi Aug 8, 2025
cd4b799
feat: install mediapipe via npm and add fallback to CDN
adzhindzhi Aug 11, 2025
38084d0
fix: use mediapipe version from the package.json instead of hardcodin…
adzhindzhi Aug 12, 2025
bfc4a2c
Merge pull request #286 from scratchfoundation/UEPR-302-rename-face-s…
KManolov3 Aug 12, 2025
7fb6d8d
fix: use a different icon for the face sensing extension in high cont…
adzhindzhi Aug 13, 2025
1b7d028
fix: replace the default face sensing block icon with the one without…
adzhindzhi Aug 13, 2025
5ea903a
Merge pull request #292 from adzhindzhi/UEPR-306-face-sensing-high-co…
adzhindzhi Aug 13, 2025
4621a13
Merge pull request #291 from adzhindzhi/UEPR-290-update-face-sensing-…
adzhindzhi Aug 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
342 changes: 324 additions & 18 deletions package-lock.json

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions packages/scratch-gui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@
"watch": "webpack --watch"
},
"dependencies": {
"@mediapipe/face_detection": "0.4.1646425229",
"@microbit/microbit-universal-hex": "0.2.2",
"@tensorflow-models/face-detection": "^1.0.3",
"@tensorflow/tfjs": "^4.22.0",
"@scratch/scratch-render": "11.6.0-gui-standalone",
"@scratch/scratch-svg-renderer": "11.6.0-gui-standalone",
"@scratch/scratch-vm": "11.6.0-gui-standalone",
Expand Down
6 changes: 6 additions & 0 deletions packages/scratch-gui/src/containers/blocks.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,12 @@ class Blocks extends React.Component {
if (this.props.isVisible) {
this.setLocale();
}

window.addEventListener('load-extension', () => {
this.props.vm.extensionManager.loadExtensionURL('faceSensing').then(() => {
this.handleCategorySelected('faceSensing');
});
});
}
shouldComponentUpdate (nextProps, nextState) {
return (
Expand Down
21 changes: 17 additions & 4 deletions packages/scratch-gui/src/containers/stage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -340,16 +340,29 @@ class Stage extends React.Component {
}
onStartDrag (x, y) {
if (this.state.dragId) return;
const drawableId = this.renderer.pick(x, y);

// Targets with no attached drawable cannot be dragged.
let draggableTargets = this.props.vm.runtime.targets.filter(
target => Number.isFinite(target.drawableID)
);

// Because pick queries can be expensive, only perform them for drawables that are currently draggable.
// If we're in the editor, we can drag all targets. Otherwise, filter.
if (!this.props.useEditorDragStyle) {
draggableTargets = draggableTargets.filter(
target => target.draggable
);
}
if (draggableTargets.length === 0) return;

const draggableIDs = draggableTargets.map(target => target.drawableID);
const drawableId = this.renderer.pick(x, y, 1, 1, draggableIDs);
if (drawableId === null) return;
const targetId = this.props.vm.getTargetIdForDrawableId(drawableId);
if (targetId === null) return;

const target = this.props.vm.runtime.getTargetById(targetId);

// Do not start drag unless in editor drag mode or target is draggable
if (!(this.props.useEditorDragStyle || target.draggable)) return;

// Dragging always brings the target to the front
target.goToFront();

Expand Down
14 changes: 14 additions & 0 deletions packages/scratch-gui/src/lib/alerts/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,20 @@ const alerts = [
),
iconSpinner: true,
level: AlertLevels.SUCCESS
},
{
alertId: 'loadingExtensionData',
alertType: AlertTypes.STANDARD,
clearList: [],
content: (
<FormattedMessage
defaultMessage="Loading extension..."
description="Message indicating that extension is in process of loading"
id="gui.alerts.loadingExtensionData"
/>
),
iconSpinner: true,
level: AlertLevels.SUCCESS
}
];

Expand Down
19 changes: 16 additions & 3 deletions packages/scratch-gui/src/lib/cloud-manager-hoc.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,11 @@ const cloudManagerHOC = function (WrappedComponent) {
handleExtensionAdded (categoryInfo) {
// Note that props.vm.extensionManager.isExtensionLoaded('videoSensing') is still false
// at the point of this callback, so it is difficult to reuse the canModifyCloudData logic.
if (categoryInfo.id === 'videoSensing' && this.isConnected()) {
if (
(categoryInfo.id === 'videoSensing' ||
categoryInfo.id === 'faceSensing') &&
this.isConnected()
) {
this.disconnectFromCloud();
}
}
Expand Down Expand Up @@ -157,9 +161,18 @@ const cloudManagerHOC = function (WrappedComponent) {
isShowingWithId: getIsShowingWithId(loadingState),
projectId: state.scratchGui.projectState.projectId,
// if you're editing someone else's project, you can't modify cloud data
canModifyCloudData: (!state.scratchGui.mode.hasEverEnteredEditor || ownProps.canSave) &&
canModifyCloudData:
(!state.scratchGui.mode.hasEverEnteredEditor ||
ownProps.canSave) &&
// possible security concern if the program attempts to encode webcam data over cloud variables
!ownProps.vm.extensionManager.isExtensionLoaded('videoSensing')
!(
ownProps.vm.extensionManager.isExtensionLoaded(
'videoSensing'
) ||
ownProps.vm.extensionManager.isExtensionLoaded(
'faceSensing'
)
)
};
};

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions packages/scratch-gui/src/lib/libraries/extensions/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ import gdxforInsetIconURL from './gdxfor/gdxfor-small.svg';
import gdxforConnectionIconURL from './gdxfor/gdxfor-illustration.svg';
import gdxforConnectionSmallIconURL from './gdxfor/gdxfor-small.svg';

import faceSensingIconURL from './faceSensing/faceSensing.png';
import faceSensingInsetIconURL from './faceSensing/faceSensing-small.svg';

export default [
{
name: (
Expand Down Expand Up @@ -107,6 +110,26 @@ export default [
),
featured: true
},
{
name: (
<FormattedMessage
defaultMessage="Face Sensing"
description="Name for the 'Face Sensing' extension"
id="gui.extension.faceSensing.name"
/>
),
extensionId: 'faceSensing',
iconURL: faceSensingIconURL,
insetIconURL: faceSensingInsetIconURL,
description: (
<FormattedMessage
defaultMessage="Sense faces with the camera."
description="Description for the 'Face Sensing' extension"
id="gui.extension.faceSensing.description"
/>
),
featured: true
},
{
name: (
<FormattedMessage
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions packages/scratch-gui/src/lib/themes/high-contrast/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import penIcon from './extensions/penIcon.svg';
import text2speechIcon from './extensions/text2speechIcon.svg';
import translateIcon from './extensions/translateIcon.svg';
import videoSensingIcon from './extensions/videoSensingIcon.svg';
import faceSensingIcon from './extensions/faceSensingIcon.svg';

const blockColors = {
motion: {
Expand Down Expand Up @@ -101,6 +102,9 @@ const extensions = {
},
videoSensing: {
blockIconURI: videoSensingIcon
},
faceSensing: {
blockIconURI: faceSensingIcon
}
};

Expand Down
12 changes: 11 additions & 1 deletion packages/scratch-gui/src/lib/vm-listener-hoc.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {updateBlockDrag} from '../reducers/block-drag';
import {updateMonitors} from '../reducers/monitors';
import {setProjectChanged, setProjectUnchanged} from '../reducers/project-changed';
import {setRunningState, setTurboState, setStartedState} from '../reducers/vm-status';
import {showExtensionAlert} from '../reducers/alerts';
import {showExtensionAlert, showStandardAlert, closeAlertWithId} from '../reducers/alerts';
import {updateMicIndicator} from '../reducers/mic-indicator';

/*
Expand Down Expand Up @@ -46,6 +46,7 @@ const vmListenerHOC = function (WrappedComponent) {
this.props.vm.on('PROJECT_START', this.props.onGreenFlag);
this.props.vm.on('PERIPHERAL_CONNECTION_LOST_ERROR', this.props.onShowExtensionAlert);
this.props.vm.on('MIC_LISTENING', this.props.onMicListeningUpdate);
this.props.vm.on('EXTENSION_DATA_LOADING', this.props.onExtensionDataLoading);

}
componentDidMount () {
Expand Down Expand Up @@ -125,6 +126,7 @@ const vmListenerHOC = function (WrappedComponent) {
onKeyDown,
onKeyUp,
onMicListeningUpdate,
onExtensionDataLoading,
onMonitorsUpdate,
onTargetsUpdate,
onProjectChanged,
Expand All @@ -144,6 +146,7 @@ const vmListenerHOC = function (WrappedComponent) {
VMListener.propTypes = {
attachKeyboardEvents: PropTypes.bool,
onBlockDragUpdate: PropTypes.func.isRequired,
onExtensionDataLoading: PropTypes.func.isRequired,
onGreenFlag: PropTypes.func,
onKeyDown: PropTypes.func,
onKeyUp: PropTypes.func,
Expand Down Expand Up @@ -205,6 +208,13 @@ const vmListenerHOC = function (WrappedComponent) {
},
onMicListeningUpdate: listening => {
dispatch(updateMicIndicator(listening));
},
onExtensionDataLoading: loading => {
if (loading) {
dispatch(showStandardAlert('loadingExtensionData'));
} else {
dispatch(closeAlertWithId('loadingExtensionData'));
}
}
});
return connect(
Expand Down
19 changes: 19 additions & 0 deletions packages/scratch-gui/test/unit/util/cloud-manager-hoc.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,25 @@ describe('CloudManagerHOC', () => {
expect(CloudProvider).not.toHaveBeenCalled();
});

test('when faceSensing extension is active, the cloud provider is not set on the vm', () => {
const Component = () => <div />;
const WrappedComponent = cloudManagerHOC(Component);
vm.extensionManager.isExtensionLoaded = jest.fn(extension => extension === 'faceSensing');

mount(
<WrappedComponent
hasCloudPermission
cloudHost="nonEmpty"
store={store}
username="user"
vm={vm}
/>
);

expect(vm.setCloudProvider.mock.calls.length).toBe(0);
expect(CloudProvider).not.toHaveBeenCalled();
});

test('if the isShowingWithId prop becomes true, it sets the cloud provider on the vm', () => {
const Component = () => <div />;
const WrappedComponent = cloudManagerHOC(Component);
Expand Down
4 changes: 4 additions & 0 deletions packages/scratch-gui/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ const baseConfig = new ScratchWebpackConfigBuilder(
context: '../../node_modules/scratch-storage/dist/web',
from: 'chunks/fetch-worker.*.{js,js.map}',
noErrorOnMissing: true
},
{
from: '../../node_modules/@mediapipe/face_detection',
to: 'chunks/mediapipe/face_detection'
}
]
}));
Expand Down
30 changes: 30 additions & 0 deletions packages/scratch-render/src/RenderWebGL.js
Original file line number Diff line number Diff line change
Expand Up @@ -1069,6 +1069,36 @@ class RenderWebGL extends EventEmitter {
return false;
}

drawableTouchingScratchRect (drawableID, left, top, right, bottom) {
const drawable = this._allDrawables[drawableID];
if (!drawable) {
return false;
}
const bounds = new Rectangle();
bounds.initFromBounds(left, right, bottom, top);
const worldPos = twgl.v3.create();

drawable.updateCPURenderAttributes();

for (worldPos[1] = bounds.bottom; worldPos[1] <= bounds.top; worldPos[1]++) {
for (worldPos[0] = bounds.left; worldPos[0] <= bounds.right; worldPos[0]++) {
if (drawable.isTouching(worldPos)) {
return true;
}
}
}
return false;
}

drawableTouchingScratchPoint (drawableID, x, y) {
const drawable = this._allDrawables[drawableID];
if (!drawable) {
return false;
}
drawable.updateCPURenderAttributes();
return drawable.isTouching([x, y]);
}

/**
* Detect which sprite, if any, is at the given location.
* This function will pick all drawables that are visible, unless specific
Expand Down
8 changes: 8 additions & 0 deletions packages/scratch-vm/src/engine/runtime.js
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,10 @@
return 'MIC_LISTENING';
}

static get EXTENSION_DATA_LOADING () {
return 'EXTENSION_DATA_LOADING';
}

/**
* Event name for reporting that blocksInfo was updated.
* @const {string}
Expand Down Expand Up @@ -830,7 +834,7 @@
_registerExtensionPrimitives (extensionInfo) {
const categoryInfo = {
id: extensionInfo.id,
name: maybeFormatMessage(extensionInfo.name),

Check warning on line 837 in packages/scratch-vm/src/engine/runtime.js

View workflow job for this annotation

GitHub Actions / Test scratch-vm

Pattern is not a string literal

Check warning on line 837 in packages/scratch-vm/src/engine/runtime.js

View workflow job for this annotation

GitHub Actions / Test scratch-vm

Pattern is not a string literal

Check warning on line 837 in packages/scratch-vm/src/engine/runtime.js

View workflow job for this annotation

GitHub Actions / ci / Test scratch-vm

Pattern is not a string literal

Check warning on line 837 in packages/scratch-vm/src/engine/runtime.js

View workflow job for this annotation

GitHub Actions / Test scratch-vm

Pattern is not a string literal
showStatusButton: extensionInfo.showStatusButton,
blockIconURI: extensionInfo.blockIconURI,
menuIconURI: extensionInfo.menuIconURI
Expand Down Expand Up @@ -873,7 +877,7 @@
_refreshExtensionPrimitives (extensionInfo) {
const categoryInfo = this._blockInfo.find(info => info.id === extensionInfo.id);
if (categoryInfo) {
categoryInfo.name = maybeFormatMessage(extensionInfo.name);

Check warning on line 880 in packages/scratch-vm/src/engine/runtime.js

View workflow job for this annotation

GitHub Actions / Test scratch-vm

Pattern is not a string literal

Check warning on line 880 in packages/scratch-vm/src/engine/runtime.js

View workflow job for this annotation

GitHub Actions / Test scratch-vm

Pattern is not a string literal

Check warning on line 880 in packages/scratch-vm/src/engine/runtime.js

View workflow job for this annotation

GitHub Actions / ci / Test scratch-vm

Pattern is not a string literal

Check warning on line 880 in packages/scratch-vm/src/engine/runtime.js

View workflow job for this annotation

GitHub Actions / Test scratch-vm

Pattern is not a string literal
this._fillExtensionCategory(categoryInfo, extensionInfo);

this.emit(Runtime.BLOCKSINFO_UPDATE, categoryInfo);
Expand Down Expand Up @@ -948,12 +952,12 @@
if (typeof menuItems !== 'function') {
const extensionMessageContext = this.makeMessageContextForTarget();
return menuItems.map(item => {
const formattedItem = maybeFormatMessage(item, extensionMessageContext);

Check warning on line 955 in packages/scratch-vm/src/engine/runtime.js

View workflow job for this annotation

GitHub Actions / Test scratch-vm

Pattern is not a string literal

Check warning on line 955 in packages/scratch-vm/src/engine/runtime.js

View workflow job for this annotation

GitHub Actions / Test scratch-vm

Pattern is not a string literal

Check warning on line 955 in packages/scratch-vm/src/engine/runtime.js

View workflow job for this annotation

GitHub Actions / ci / Test scratch-vm

Pattern is not a string literal

Check warning on line 955 in packages/scratch-vm/src/engine/runtime.js

View workflow job for this annotation

GitHub Actions / Test scratch-vm

Pattern is not a string literal
switch (typeof formattedItem) {
case 'string':
return [formattedItem, formattedItem];
case 'object':
return [maybeFormatMessage(item.text, extensionMessageContext), item.value];

Check warning on line 960 in packages/scratch-vm/src/engine/runtime.js

View workflow job for this annotation

GitHub Actions / Test scratch-vm

Pattern is not a string literal

Check warning on line 960 in packages/scratch-vm/src/engine/runtime.js

View workflow job for this annotation

GitHub Actions / Test scratch-vm

Pattern is not a string literal

Check warning on line 960 in packages/scratch-vm/src/engine/runtime.js

View workflow job for this annotation

GitHub Actions / ci / Test scratch-vm

Pattern is not a string literal

Check warning on line 960 in packages/scratch-vm/src/engine/runtime.js

View workflow job for this annotation

GitHub Actions / Test scratch-vm

Pattern is not a string literal
default:
throw new Error(`Can't interpret menu item: ${JSON.stringify(item)}`);
}
Expand Down Expand Up @@ -1167,7 +1171,7 @@
while (inTextNum < blockText.length || inBranchNum < blockInfo.branchCount) {
if (inTextNum < blockText.length) {
context.outLineNum = outLineNum;
const lineText = maybeFormatMessage(blockText[inTextNum], extensionMessageContext);

Check warning on line 1174 in packages/scratch-vm/src/engine/runtime.js

View workflow job for this annotation

GitHub Actions / Test scratch-vm

Pattern is not a string literal

Check warning on line 1174 in packages/scratch-vm/src/engine/runtime.js

View workflow job for this annotation

GitHub Actions / Test scratch-vm

Pattern is not a string literal

Check warning on line 1174 in packages/scratch-vm/src/engine/runtime.js

View workflow job for this annotation

GitHub Actions / ci / Test scratch-vm

Pattern is not a string literal

Check warning on line 1174 in packages/scratch-vm/src/engine/runtime.js

View workflow job for this annotation

GitHub Actions / Test scratch-vm

Pattern is not a string literal
const convertedText = lineText.replace(/\[(.+?)]/g, convertPlaceholders);
if (blockJSON[`message${outLineNum}`]) {
blockJSON[`message${outLineNum}`] += convertedText;
Expand Down Expand Up @@ -1248,7 +1252,7 @@
}

const extensionMessageContext = this.makeMessageContextForTarget();
const buttonText = maybeFormatMessage(buttonInfo.text, extensionMessageContext);

Check warning on line 1255 in packages/scratch-vm/src/engine/runtime.js

View workflow job for this annotation

GitHub Actions / Test scratch-vm

Pattern is not a string literal

Check warning on line 1255 in packages/scratch-vm/src/engine/runtime.js

View workflow job for this annotation

GitHub Actions / Test scratch-vm

Pattern is not a string literal

Check warning on line 1255 in packages/scratch-vm/src/engine/runtime.js

View workflow job for this annotation

GitHub Actions / ci / Test scratch-vm

Pattern is not a string literal

Check warning on line 1255 in packages/scratch-vm/src/engine/runtime.js

View workflow job for this annotation

GitHub Actions / Test scratch-vm

Pattern is not a string literal
return {
info: buttonInfo,
xml: `<button text="${buttonText}" callbackKey="${buttonInfo.func}"></button>`
Expand Down Expand Up @@ -1319,7 +1323,7 @@

const defaultValue =
typeof argInfo.defaultValue === 'undefined' ? '' :
xmlEscape(maybeFormatMessage(argInfo.defaultValue, this.makeMessageContextForTarget()).toString());

Check warning on line 1326 in packages/scratch-vm/src/engine/runtime.js

View workflow job for this annotation

GitHub Actions / Test scratch-vm

Pattern is not a string literal

Check warning on line 1326 in packages/scratch-vm/src/engine/runtime.js

View workflow job for this annotation

GitHub Actions / Test scratch-vm

Pattern is not a string literal

Check warning on line 1326 in packages/scratch-vm/src/engine/runtime.js

View workflow job for this annotation

GitHub Actions / ci / Test scratch-vm

Pattern is not a string literal

Check warning on line 1326 in packages/scratch-vm/src/engine/runtime.js

View workflow job for this annotation

GitHub Actions / Test scratch-vm

Pattern is not a string literal

if (argTypeInfo.check) {
// Right now the only type of 'check' we have specifies that the
Expand Down Expand Up @@ -1569,6 +1573,10 @@
this.emit(Runtime.MIC_LISTENING, listening);
}

emitExtensionLoading (loading) {
this.emit(Runtime.EXTENSION_DATA_LOADING, loading);
}

/**
* Retrieve the function associated with the given opcode.
* @param {!string} opcode The opcode to look up.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
ev3: () => require('../extensions/scratch3_ev3'),
makeymakey: () => require('../extensions/scratch3_makeymakey'),
boost: () => require('../extensions/scratch3_boost'),
gdxfor: () => require('../extensions/scratch3_gdx_for')
gdxfor: () => require('../extensions/scratch3_gdx_for'),
faceSensing: () => require('../extensions/scratch3_face_sensing')
};

/**
Expand Down Expand Up @@ -350,11 +351,11 @@
const menuFunc = extensionObject[menuItemFunctionName];
const menuItems = menuFunc.call(extensionObject, editingTargetID).map(
item => {
item = maybeFormatMessage(item, extensionMessageContext);

Check warning on line 354 in packages/scratch-vm/src/extension-support/extension-manager.js

View workflow job for this annotation

GitHub Actions / Test scratch-vm

Pattern is not a string literal

Check warning on line 354 in packages/scratch-vm/src/extension-support/extension-manager.js

View workflow job for this annotation

GitHub Actions / Test scratch-vm

Pattern is not a string literal

Check warning on line 354 in packages/scratch-vm/src/extension-support/extension-manager.js

View workflow job for this annotation

GitHub Actions / ci / Test scratch-vm

Pattern is not a string literal

Check warning on line 354 in packages/scratch-vm/src/extension-support/extension-manager.js

View workflow job for this annotation

GitHub Actions / Test scratch-vm

Pattern is not a string literal
switch (typeof item) {
case 'object':
return [
maybeFormatMessage(item.text, extensionMessageContext),

Check warning on line 358 in packages/scratch-vm/src/extension-support/extension-manager.js

View workflow job for this annotation

GitHub Actions / Test scratch-vm

Pattern is not a string literal

Check warning on line 358 in packages/scratch-vm/src/extension-support/extension-manager.js

View workflow job for this annotation

GitHub Actions / Test scratch-vm

Pattern is not a string literal

Check warning on line 358 in packages/scratch-vm/src/extension-support/extension-manager.js

View workflow job for this annotation

GitHub Actions / ci / Test scratch-vm

Pattern is not a string literal

Check warning on line 358 in packages/scratch-vm/src/extension-support/extension-manager.js

View workflow job for this annotation

GitHub Actions / Test scratch-vm

Pattern is not a string literal
item.value
];
case 'string':
Expand Down
Loading
Loading