hackish attempt to get rid of the gray rectangle render error

pull/95/head
Michael 2021-07-31 12:16:56 +02:00
rodzic 8c34d67cf3
commit c9350e5a71
3 zmienionych plików z 19 dodań i 5 usunięć

1
.gitignore vendored
Wyświetl plik

@ -1,3 +1,4 @@
.DS_Store
*.swp
.tern-port
*.sh

Wyświetl plik

@ -1,8 +1,13 @@
* 2021-08-13 (snap6 branch/ 2.7 dev)
* 2021-07-30 (snap6 branch/ 2.7 dev)
- include turtle model definition and simplex font as javascript
instead of loading from url as json (also works offline now!)
* 2021-07-13 (snap6 branch/ 2.7 dev)
- fix app mode?
* 2021-08-12 (snap6 branch/ 2.7 dev)
* 2021-07-12 (snap6 branch/ 2.7 dev)
- revert back to three r97 (too many small bugs no big pros? (issue #93)
- make fullscreen/appmode usable again

Wyświetl plik

@ -714,6 +714,11 @@ SpriteMorph.prototype.doMoveForward = function (steps) {
if (dist != 0) {
this.setPosition(dest);
// this is a quick hack but delaying the rerender seems to get rid of the
// grey square that shows as a rendering error (still don't know where it
// comes from )
// setTimeout(() => stage.reRender(), 10)
var isFirst = this.parentThatIsA(StageMorph).turtleShepherd.isEmpty();
warn = stage.turtleShepherd.moveTo(
oldx, oldy,
@ -2630,8 +2635,13 @@ StageMorph.prototype.renderCycle = function () {
this.changed();
this.parentThatIsA(IDE_Morph).statusDisplay.refresh();
this.renderer.changed = false;
// this is a hack but it seems to be need for a clear render!
setTimeout(()=> this.changed(), 5)
}
};
// this.render();
// this.changed();
}
StageMorph.prototype.reRender = function () {
this.renderer.changed = true;
@ -2814,8 +2824,6 @@ StageMorph.prototype.step = function () {
this.renderCycle();
}
};
this.stepcounter++;
};