more video / projection refactoring yet

pull/89/head
jmoenig 2019-05-15 13:25:52 +02:00
rodzic 636ee31b0e
commit ef942dd09f
2 zmienionych plików z 4 dodań i 4 usunięć

Wyświetl plik

@ -1960,7 +1960,7 @@ SpriteMorph.prototype.getImageData = function () {
return this.imageData.pixels;
};
SpriteMorph.prototype.videoSnap = function() {
SpriteMorph.prototype.projectionSnap = function() {
var stage = this.parentThatIsA(StageMorph),
center = this.center().subtract(stage.position())
.divideBy(stage.scale),
@ -7352,7 +7352,7 @@ StageMorph.prototype.stopVideo = function() {
this.clearProjectionLayer();
};
StageMorph.prototype.videoSnap = function() {
StageMorph.prototype.projectionSnap = function() {
var snap = newCanvas(this.dimensions, true),
ctx = snap.getContext('2d');
ctx.drawImage(this.projectionLayer(), 0, 0);

Wyświetl plik

@ -4475,9 +4475,9 @@ Process.prototype.reportVideo = function(attribute, name) {
return stage.videoMotion.motionDirection;
case 'snap':
if (thatObj instanceof SpriteMorph) {
return thatObj.videoSnap();
return thatObj.projectionSnap();
}
return stage.videoSnap();
return stage.projectionSnap();
}
return -1;
};