Skip to content

Conversation

adzhindzhi
Copy link
Contributor

Integration branch, including changes for:

gnarf and others added 30 commits September 17, 2020 13:26
* avoid gl.readPixels at all costs
Scale the drawable scale by the ratio of pixel size to native size.
Add API for getting the drawable order of a given drawable.
…use pointer (#325)

* Allow 'isTouching' and 'pick' to still work on invisible drawables.

* Always ignore visibility for isTouching on drawable

* Filter invisble drawbles in isTouchingDrawable per rules of collision

* polish up some docs/get logic 👍

* leftover line from deleted comment

* revert to ghosted pick behavior

* Add clientSpaceToScratchBounds method

* fix lint

* add some pick tests
* Touching color draft implementation

* New constant for CPU/GPU render split determined, removing query param

* Small fix for pick tests
* draw pen skin lines and stamps to a framebuffer

* skip reading pixels and draw stamp to framebuffer

* update silhouette with readPixels

* draw pen canvas to buffer when its dirty

Composite lines and stamps on browser preferred side (cpu/gpu) until
the export texture is needed. Then blend the canvas with the current
buffer contents.

Updating this way invalidates useProgram optimization and the renderer
currently does not have a way to know this.

* draw lines on framebuffer through fragment shader

* optimize draw regions and pen skin matrix creation

* control draw regions

* mobile gpus need high precision floats for line drawing

* optimize cpu pen line math

* sampled pen line caps

* sampleless pen skin lines, lint, document pen skin buffer ops

* add PenSkin._canvasDirty to constructor

* remove DRAW_MODE_line

* comment PenSkin reused memory, use memory in drawRectangle

* turn draw region id's into optional method handlers

A region ID object may have an enter and exit method on it that are
used by default when entering and exiting that region.

* remove old DRAW_MODE_line precision setting

* standardize vert lines on 4 spaces

* fixup! turn draw region id's into optional method handlers

* do not draw when updating pen skin silhouette

* do not premultiply stamp colors by alpha

* fixup! do not draw when updating pen skin silhouette

* do not premultiply line color

* add a small rim around the line for aliasing

* variable pen line alias amount

* reverse offset pen line on y axis by relative alias amount

Reverse the offset to keep small line overlap to a minimum.

* fixup! reverse offset pen line on y axis by relative alias amount

* medium precision gpu floats
Add getter for the renderer's canvas
Add ability to get a snapshot of the next frame
Fix bug when bounds would be infinite and cause never ending loop
Fix uncaught error `cannot find property updateSilhouette of null`
Increase maximum texture size and back it off if GL fails to render
Revert "Increase maximum texture size and back it off if GL fails to render"
Implement updateSilhouette to allow updates to happen when needed
Revert "Merge pull request #394 from paulkaplan/defer-silhouette-upda…
Add inset logic that is closer to Scratch 2's inset
Update silhouette after getting texture at a new scale
Fix extraction of drawable to not clip bounds.
Adjust CPU isTouchingColor to match GPU results
Revert "Adjust CPU isTouchingColor to match GPU results"
Use Math.ceil and Math.floor to match Scratch 2 logic
Compatibility fix for bitmap position off stage
Adjust CPU `isTouchingColor` to match GPU results (again)
Revert "Adjust CPU `isTouchingColor` to match GPU results (again)"
Implement canvas-based TextBubbleSkin
…bnail

Fix: Change face sensing tutorial thumbnail
…clickable

[UEPR-385] Fix sprites issues when extension button tooltip is displayed
…callout-not-hiding

[UEPR-287] Update new feature callout behavior in extensions modal
…een-flag

[UEPR-390] Fix: Allow pointer events on green flag button
@adzhindzhi adzhindzhi requested a review from a team as a code owner October 8, 2025 10:56
Copy link

github-actions bot commented Oct 8, 2025


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


1 out of 9 committers have signed the CLA.
✅ (cwillisf)[https://github.com/cwillisf]
@gnarf
@kchadha
@mzgoddard
@rschamp
@thisandagain
@ktbee
@evhan55
@ericrosenbaum
You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

Copy link

github-actions bot commented Oct 8, 2025

Test report for scratch-svg-renderer

  1 files  ±0   60 suites  ±0   0s ⏱️ ±0s
124 tests ±0  124 ✅ ±0  0 💤 ±0  0 ❌ ±0 
276 runs  ±0  275 ✅ ±0  1 💤 ±0  0 ❌ ±0 

Results for commit fcf19b7. ± Comparison against base commit 83c402b.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Oct 8, 2025

Test report for scratch-gui

  2 files  ±0   62 suites  +1   10m 16s ⏱️ + 1m 25s
398 tests +9  390 ✅ +10  8 💤  - 1  0 ❌ ±0 
416 runs  +9  408 ✅ +10  8 💤  - 1  0 ❌ ±0 

Results for commit fcf19b7. ± Comparison against base commit 83c402b.

This pull request removes 18 and adds 27 tests. Note that renamed tests count towards both.
Controls component triggers the right callbacks when clicked ‑ Controls component triggers the right callbacks when clicked
IconButtonComponent matches snapshot ‑ IconButtonComponent matches snapshot
MenuBar Component clicking on About button calls the handler ‑ MenuBar Component clicking on About button calls the handler
SBFileUploaderHOC correctly sets title with .sb filename ‑ SBFileUploaderHOC correctly sets title with .sb filename
SBFileUploaderHOC correctly sets title with .sb2 filename ‑ SBFileUploaderHOC correctly sets title with .sb2 filename
SBFileUploaderHOC correctly sets title with .sb3 filename ‑ SBFileUploaderHOC correctly sets title with .sb3 filename
SBFileUploaderHOC sets blank title with filename with no extension ‑ SBFileUploaderHOC sets blank title with filename with no extension
Slider Prompt Container Enter button submits the form ‑ Slider Prompt Container Enter button submits the form
Slider Prompt Container Entering a number with a decimal submits with isDiscrete=false ‑ Slider Prompt Container Entering a number with a decimal submits with isDiscrete=false
Slider Prompt Container Entering integers submits with isDiscrete=true ‑ Slider Prompt Container Entering integers submits with isDiscrete=true
…
ButtonComponent does not trigger callback when not clicked ‑ ButtonComponent does not trigger callback when not clicked
CloudManagerHOC when faceSensing extension is active, the cloud provider is not set on the vm ‑ CloudManagerHOC when faceSensing extension is active, the cloud provider is not set on the vm
Controls component does not show turbo mode when not in turbo mode ‑ Controls component does not show turbo mode when not in turbo mode
Controls component triggers the right callbacks when clicked when green flag button clicked triggers the right callback ‑ Controls component triggers the right callbacks when clicked when green flag button clicked triggers the right callback
Controls component triggers the right callbacks when clicked when stop all button clicked triggers the right callback ‑ Controls component triggers the right callbacks when clicked when stop all button clicked triggers the right callback
IconButtonComponent does not trigger callback when not clicked ‑ IconButtonComponent does not trigger callback when not clicked
IconButtonComponent renders with all props correctly ‑ IconButtonComponent renders with all props correctly
MenuBar Component triggering About button handler clicking on About button calls the handler ‑ MenuBar Component triggering About button handler clicking on About button calls the handler
MenuBar Component triggering About button handler not clicking on About button does not call the handler ‑ MenuBar Component triggering About button handler not clicking on About button does not call the handler
Slider Prompt Container calls onCancel when cancel button is clicked ‑ Slider Prompt Container calls onCancel when cancel button is clicked
…

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Oct 8, 2025

Test report for scratch-render

  1 files  ±0   55 suites  ±0   2s ⏱️ ±0s
209 tests ±0  209 ✅ ±0  0 💤 ±0  0 ❌ ±0 
279 runs  ±0  279 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit fcf19b7. ± Comparison against base commit 83c402b.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Oct 8, 2025

Test report for scratch-vm

    1 files  ±0    770 suites  ±0   1m 4s ⏱️ -1s
1 686 tests ±0  1 686 ✅ ±0   0 💤 ±0  0 ❌ ±0 
4 891 runs  ±0  4 861 ✅ ±0  30 💤 ±0  0 ❌ ±0 

Results for commit fcf19b7. ± Comparison against base commit 83c402b.

♻️ This comment has been updated with latest results.

@adzhindzhi adzhindzhi added this pull request to the merge queue Oct 9, 2025
Merged via the queue into develop with commit e25b63a Oct 9, 2025
18 of 20 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Oct 9, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.