mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-25 15:32:40 -05:00
Merge pull request #2542 from apple502j/video-motion-fix
Use new updateCPURenderAttributes in video sensing
This commit is contained in:
commit
c6962cb390
2 changed files with 2 additions and 3 deletions
|
@ -291,8 +291,7 @@ class VideoMotion {
|
||||||
|
|
||||||
// The public APIs for Renderer#isTouching manage keeping the matrix and
|
// The public APIs for Renderer#isTouching manage keeping the matrix and
|
||||||
// silhouette up-to-date, which is needed for drawable#isTouching to work (used below)
|
// silhouette up-to-date, which is needed for drawable#isTouching to work (used below)
|
||||||
drawable.updateMatrix();
|
drawable.updateCPURenderAttributes();
|
||||||
if (drawable.skin) drawable.skin.updateSilhouette();
|
|
||||||
|
|
||||||
// Restrict the region the amount and direction are built from to
|
// Restrict the region the amount and direction are built from to
|
||||||
// the area of the current frame overlapped by the given drawable's
|
// the area of the current frame overlapped by the given drawable's
|
||||||
|
|
|
@ -87,7 +87,7 @@ const isNearAngle = (actual, expect, optMargin = 10) => (
|
||||||
// A fake scratch-render drawable that will be used by VideoMotion to restrain
|
// A fake scratch-render drawable that will be used by VideoMotion to restrain
|
||||||
// the area considered for motion detection in VideoMotion.getLocalMotion
|
// the area considered for motion detection in VideoMotion.getLocalMotion
|
||||||
const fakeDrawable = {
|
const fakeDrawable = {
|
||||||
updateMatrix () {}, // no-op, since isTouching always returns true
|
updateCPURenderAttributes () {}, // no-op, since isTouching always returns true
|
||||||
|
|
||||||
getFastBounds () {
|
getFastBounds () {
|
||||||
return {
|
return {
|
||||||
|
|
Loading…
Reference in a new issue