scratchfoundation / scratchfoundation/scratch-editor

<touching (mouse-pointer v)> block vs small bitmap costumes

Open
#284 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
JavaScript
Stars
281
Forks
276
Avg merge
7d 8h
Merged PRs (30d)
6

Description

Expected Behavior

The block reports true when the mouse is over the sprite (dark gray area on the screenshot)

Actual Behavior

The block reports true when the mouse is over the green area on the screenshot (which has the shape of the sprite but it's stretched)

Screenshot

Screenshot
Steps to Reproduce

Steps to reproduce the behavior:

  1. Go to 'https://scratch.mit.edu/projects/1087360584/'
  2. To draw the green area, enable turbo mode and move the mouse over the project
  3. Move the mouse around the sprite and watch the 'touching mouse-pointer' variable

Alternative steps:

  1. Make a very small (eg. 2x3 texels) bitmap costume
  2. Set the sprite's size to 10000 or similar
  3. Run this block stack:
    forever {set [touching] to <touching mouse-pointer>}
  4. Move the mouse around the costume's edges
System Details

I've tested it in the online editor. The OS and browser that I've used is Windows 10, Chrome 138

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue in the linked Scratch project and with a 2x3 bitmap costume scaled to 10000%, then trace the editor's “touching mouse-pointer” behavior for small bitmap costumes. Done means the block reports true only over the visible sprite area, including around the costume edges, rather than over the stretched green area.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.