Simple
This commit is contained in:
@ -62,14 +62,8 @@ export function createTileArray(width: number, height: number, tile: string = 'b
|
||||
return Array.from({ length: height }, () => Array.from({ length: width }, () => tile))
|
||||
}
|
||||
|
||||
export const calculateIsometricDepth = (positionX: number, positionY: number, width: number = 0, height: number = 0) => {
|
||||
const backCornerX = positionX + width
|
||||
const backCornerY = positionY + height
|
||||
|
||||
const sortingX = (positionX + backCornerX) / 2
|
||||
const sortingY = (positionY + backCornerY) / 2
|
||||
|
||||
return sortingX + sortingY
|
||||
export const calculateIsometricDepth = (positionX: number, positionY, pivotPoints: { x: number; y: number; }[] = []) => {
|
||||
return Math.max(positionX + positionY);
|
||||
}
|
||||
|
||||
async function loadTileTextures(tiles: TileT[], scene: Phaser.Scene) {
|
||||
|
Reference in New Issue
Block a user