fixed collision detection for non-integer devicePixelRatios
dev
Jens Mönig 2016-07-17 08:00:54 +02:00
rodzic 8d0a7f19b5
commit 0974c750ad
3 zmienionych plików z 16 dodań i 6 usunięć

4
gui.js
Wyświetl plik

@ -72,7 +72,7 @@ isRetinaSupported*/
// Global stuff ////////////////////////////////////////////////////////
modules.gui = '2016-July-15';
modules.gui = '2016-July-17';
// Declarations
@ -2982,7 +2982,7 @@ IDE_Morph.prototype.aboutSnap = function () {
module, btn1, btn2, btn3, btn4, licenseBtn, translatorsBtn,
world = this.world();
aboutTxt = 'Snap! 4.0.8.1\nBuild Your Own Blocks\n\n'
aboutTxt = 'Snap! 4.0.8.2\nBuild Your Own Blocks\n\n'
+ 'Copyright \u24B8 2016 Jens M\u00F6nig and '
+ 'Brian Harvey\n'
+ 'jens@moenig.org, bh@cs.berkeley.edu\n\n'

Wyświetl plik

@ -2965,3 +2965,9 @@ http://snap.berkeley.edu/run#cloud:Username=jens&ProjectName=rotation
== v4.0.8.1 ====
160717
------
* Morphic: fixed collision detection for non-integer devicePixelRatios
== v4.0.8.2 ====

Wyświetl plik

@ -1103,7 +1103,7 @@
/*global window, HTMLCanvasElement, FileReader, Audio, FileList*/
var morphicVersion = '2016-July-14';
var morphicVersion = '2016-July-17';
var modules = {}; // keep track of additional loaded modules
var useBlurredShadows = getBlurredShadowSupport(); // check for Chrome-bug
@ -4114,9 +4114,13 @@ Morph.prototype.evaluateString = function (code) {
Morph.prototype.isTouching = function (otherMorph) {
var oImg = this.overlappingImage(otherMorph),
data = oImg.getContext('2d')
.getImageData(1, 1, oImg.width, oImg.height)
.data;
data;
if (!oImg.width || !oImg.height) {
return false;
}
data = oImg.getContext('2d')
.getImageData(1, 1, oImg.width, oImg.height)
.data;
return detect(
data,
function (each) {