Commit graph

75 commits

Author SHA1 Message Date
adroitwhiz
60e7e568d5 Add fencing test 2019-07-09 10:38:19 -04:00
Michael "Z" Goddard
f187be6b31
add MockSkinPool for testing 2019-06-18 17:18:49 -04:00
adroitwhiz
e8fb7daaec remove no-longer-applicable unit test 2019-04-30 23:04:26 -04:00
adroitwhiz
6e755ea015 Add "disappearing pen" test 2019-04-20 02:47:25 -04:00
Paul Kaplan
757d7e3c96
Revert "Adjust CPU isTouchingColor to match GPU results (again)" 2019-04-19 16:13:47 -04:00
Christopher Willis-Ford
b304ea8fdf Make touching-color test more robust against GPU imprecision
Previously, the `color-touching-tests.sb2` test "touches a color that
doesn't actually exist right now" would use a sprite with ghost 50,
blended against another sprite, to create the color that "doesn't
actually exist" when the query sprite is skipped. Unfortunately the
blend result was near a bit-boundary and, depending on the specific
hardware used, that test could fail on the GPU. When the renderer uses
the CPU path this test works fine, though, so the existing problem went
unnoticed.

To fix the problem I changed the project to use ghost 30 instead, which
results in a color that is less near a bit boundary and is therefore
less likely to fail on specific hardware.

As an example of what was happening: the `touching color` block was
checking for `RGB(127,101,216)` with a mask of `RGB(0xF8,0xF8,0xF0)`. On
the CPU it would find `RGB(120,99,215)`, which is in range, but on some
GPUs the closest color it could find was `RGB(119,98,215)` which
mismatches on all four of the least significant bits -- one of which is
enabled in the mask.
2019-03-20 22:58:36 -07:00
Christopher Willis-Ford
f9428ee096 Run test projects in each GPU usage mode 2019-03-20 11:21:05 -07:00
Christopher Willis-Ford
9526612d79 Add touching-color test to verify stencil use 2019-03-20 11:21:05 -07:00
Christopher Willis-Ford
fb767b7553 Fix exception on first button click 2019-03-20 11:21:05 -07:00
Katie Broida
1f0f89920a Always use getAABB for bitmap skins when determining fenced position 2019-02-11 11:56:59 -05:00
Katie Broida
c8b9516219 Use Math.ceil and Math.floor to match Scratch 2 logic 2019-02-04 16:03:33 -05:00
Katie Broida
735c7caaae Fix typo for sb3 test files 2019-01-17 12:40:30 -05:00
Michael "Z" Goddard
1b86f2ca3a
adjust pick test positions to avoid default matrices 2018-10-29 11:05:05 -04:00
Michael "Z" Goddard
1703afbbd0
split up pick integration tests to avoid cached info 2018-10-29 11:04:10 -04:00
Mx Corey Frang
c54a928f0a
Touching color implementation ()
* Touching color draft implementation

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

* Small fix for pick tests
2018-08-08 14:20:35 -04:00
Michael "Z" Goddard
bcf8ff60e4 add cat-touches-pen integration test () 2018-08-08 14:04:16 -04:00
Mx Corey Frang
6863613d20
Optimizing isTouching while creating a drawableTouches for sensing mouse pointer ()
* 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
2018-08-07 10:56:28 -04:00
Paul Kaplan
bf12823037 Update scratch-vm and svg-renderer dependency and fix tests 2018-07-24 15:58:26 -04:00
Mx Corey Frang
b753c37899
Add a test case for touching color ()
* Add a test case for touching color

* Add a say bubble based touching color test
2018-07-20 10:03:06 -04:00
Paul Kaplan
44c30d76ad Add snapshot test for bubble svg strings 2018-05-29 15:28:16 -04:00
Corey Frang
ab8fda1655 Even simpler way to check that some thread is active 2018-05-10 16:17:38 -04:00
Corey Frang
5579f121a9 Fix a thread status check in integration tests to allow "done" threads 2018-05-10 16:13:10 -04:00
Mx Corey Frang
e5d1516b1b
Quick example of a collision test integration test ()
* Quick example of a collision test integration test

* Add a test for ghost and hidden sprites

* enable scratch/es6 which then had my lint error for `(param) => {}` arrows

* cleanup npm test command

* an a was an an but should have been an a

* 2space tabs for the html doc

* Add some comments in the integration index html

* Add a few more comments about intentionally leaking variables into the global scope

* add some more comments for the integration helper and add a timeout

* 4 space tabs are actually correct

* adding even more comments and improving readability a little

* fix lint no-shadow rule

* fix indentation on comment
2018-04-27 13:06:34 -04:00
Josh Lory
1ec7c046c9 Add Drawable.prototype.getAABB coverage for scale transforms 2017-08-30 20:46:27 -07:00
Josh Lory
e3e1668127 Add initial test coverage for Drawable.prototype.getAABB 2017-08-09 21:43:18 -07:00