Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
canvasCoordsFromStageCoords(stageCoords: Vector): Vector {
if (!this.entitySystemDisplayObject) {
return stageCoords;
}
return this.entitySystemDisplayObject.toGlobal(
new Point(stageCoords.x, stageCoords.y)
);
}
private renderChunkMapMode(chunkX: number, chunkY: number) {
const mapMode = this.mapModes[this.viewOptions.mapMode];
const chunkCells = this.getCellsInChunk(chunkX, chunkY);
const { cellWidth, cellHeight, chunkWidth, chunkHeight } = this.options;
const chunkPosition = new Point(
chunkX * chunkWidth * cellWidth,
chunkY * chunkHeight * cellHeight,
);
mapMode.updateChunk(
chunkX, chunkY,
chunkCells,
chunkPosition,
);
}