Skip to content

Commit

Permalink
fix(rooms): correctly apply the Tiled flag based on fitX and fitY pro…
Browse files Browse the repository at this point in the history
…perties
  • Loading branch information
meszaros-lajos-gyorgy committed May 22, 2024
1 parent bb26e2d commit d8cfa11
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/prefabs/rooms/room.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const createFloor = (size: Vector3, textureDef: TextureDefinition, tileSize: num
size: size2D,
tileSize,
texture: Material.fromTexture(texture, {
flags: fitX || fitY ? ArxPolygonFlags.Tiled : ArxPolygonFlags.None,
flags: fitX && fitY ? ArxPolygonFlags.None : ArxPolygonFlags.Tiled,
}),
})

Expand All @@ -97,7 +97,7 @@ const createNorthWall = (size: Vector3, textureDef: TextureDefinition, tileSize:
size: size2D,
tileSize,
texture: Material.fromTexture(texture, {
flags: fitX || fitY ? ArxPolygonFlags.Tiled : ArxPolygonFlags.None,
flags: fitX && fitY ? ArxPolygonFlags.None : ArxPolygonFlags.Tiled,
}),
})
mesh.translateZ(depth / 2).translateY(-height / 2)
Expand Down Expand Up @@ -125,7 +125,7 @@ const createSouthWall = (size: Vector3, textureDef: TextureDefinition, tileSize:
size: size2D,
tileSize,
texture: Material.fromTexture(texture, {
flags: fitX || fitY ? ArxPolygonFlags.Tiled : ArxPolygonFlags.None,
flags: fitX && fitY ? ArxPolygonFlags.None : ArxPolygonFlags.Tiled,
}),
})
mesh.translateZ(-depth / 2).translateY(-height / 2)
Expand Down Expand Up @@ -153,7 +153,7 @@ const createWestWall = (size: Vector3, textureDef: TextureDefinition, tileSize:
size: size2D,
tileSize,
texture: Material.fromTexture(texture, {
flags: fitX || fitY ? ArxPolygonFlags.Tiled : ArxPolygonFlags.None,
flags: fitX && fitY ? ArxPolygonFlags.None : ArxPolygonFlags.Tiled,
}),
})
mesh.translateX(-width / 2).translateY(-height / 2)
Expand Down Expand Up @@ -181,7 +181,7 @@ const createEastWall = (size: Vector3, textureDef: TextureDefinition, tileSize:
size: size2D,
tileSize,
texture: Material.fromTexture(texture, {
flags: fitX || fitY ? ArxPolygonFlags.Tiled : ArxPolygonFlags.None,
flags: fitX && fitY ? ArxPolygonFlags.None : ArxPolygonFlags.Tiled,
}),
})
mesh.translateX(width / 2).translateY(-height / 2)
Expand Down Expand Up @@ -209,7 +209,7 @@ const createCeiling = (size: Vector3, textureDef: TextureDefinition, tileSize: n
size: size2D,
tileSize,
texture: Material.fromTexture(texture, {
flags: fitX || fitY ? ArxPolygonFlags.Tiled : ArxPolygonFlags.None,
flags: fitX && fitY ? ArxPolygonFlags.None : ArxPolygonFlags.Tiled,
}),
})
mesh.translateY(-height)
Expand Down

0 comments on commit d8cfa11

Please sign in to comment.