preparing WIP PR 2

This commit is contained in:
Svipal 2020-01-29 19:21:27 +01:00
parent ccbff39074
commit d6489d1146

View file

@ -733,8 +733,9 @@ var Tile = new Class({
this.pixelY = this.y * this.baseHeight; this.pixelY = this.y * this.baseHeight;
console.log("orthopix "+this.pixelX+","+this.pixelY) console.log("orthopix "+this.pixelX+","+this.pixelY)
} else if (this.orientation === "isometric" ||true) { } else if (this.orientation === "isometric" ||true) {
// for the image to be centered we have to move the image to the right. // for the image to be centered we have to move the image to the right with the camera !
this.pixelX = this.layer.widthInPixels/2 + (this.x - this.y) * this.baseWidth *0.5; // this is crucial for wordtotile, tiletoworld to work.
this.pixelX = (this.x - this.y) * this.baseWidth *0.5;
this.pixelY = (this.x + this.y) * this.baseHeight *0.5; this.pixelY = (this.x + this.y) * this.baseHeight *0.5;
console.log("isopix "+this.pixelX+","+this.pixelY) console.log("isopix "+this.pixelX+","+this.pixelY)
// console.log(this) // console.log(this)