mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-14 09:56:37 -04:00
more uv tests
This commit is contained in:
parent
7726de25c7
commit
feb8484f74
@ -168,7 +168,7 @@ class FullCubeBakeTest {
|
||||
fun x90y180() {
|
||||
val from = Vec3(0.0f)
|
||||
val to = Vec3(1.0f)
|
||||
val model = SingleBlockStateApply(BlockModel(elements = listOf(ModelElement(from, to, faces = createFaces())), textures = mapOf("test" to minecraft("block/test").texture())), x = 1, y = 180)
|
||||
val model = SingleBlockStateApply(BlockModel(elements = listOf(ModelElement(from, to, faces = createFaces())), textures = mapOf("test" to minecraft("block/test").texture())), x = 1, y = 2)
|
||||
|
||||
val baked = model.bake(createTextureManager("block/test"))!!
|
||||
|
||||
@ -181,6 +181,38 @@ class FullCubeBakeTest {
|
||||
baked.assertFace(Directions.EAST, positions(Directions.EAST, from, to), yrbg, 0.6f)
|
||||
}
|
||||
|
||||
fun x90y270() {
|
||||
val from = Vec3(0.0f)
|
||||
val to = Vec3(1.0f)
|
||||
val model = SingleBlockStateApply(BlockModel(elements = listOf(ModelElement(from, to, faces = createFaces())), textures = mapOf("test" to minecraft("block/test").texture())), x = 1, y = 3)
|
||||
|
||||
val baked = model.bake(createTextureManager("block/test"))!!
|
||||
|
||||
|
||||
baked.assertFace(Directions.DOWN, positions(Directions.DOWN, from, to), rbgy, 0.5f)
|
||||
baked.assertFace(Directions.UP, positions(Directions.UP, from, to), bgyr, 1.0f)
|
||||
baked.assertFace(Directions.NORTH, positions(Directions.NORTH, from, to), bgyr, 0.8f)
|
||||
baked.assertFace(Directions.SOUTH, positions(Directions.SOUTH, from, to), rbgy, 0.8f)
|
||||
baked.assertFace(Directions.WEST, positions(Directions.WEST, from, to), bgyr, 0.6f)
|
||||
baked.assertFace(Directions.EAST, positions(Directions.EAST, from, to), gyrb, 0.6f)
|
||||
}
|
||||
|
||||
fun x180y90() {
|
||||
val from = Vec3(0.0f)
|
||||
val to = Vec3(1.0f)
|
||||
val model = SingleBlockStateApply(BlockModel(elements = listOf(ModelElement(from, to, faces = createFaces())), textures = mapOf("test" to minecraft("block/test").texture())), x = 2, y = 1)
|
||||
|
||||
val baked = model.bake(createTextureManager("block/test"))!!
|
||||
|
||||
|
||||
baked.assertFace(Directions.DOWN, positions(Directions.DOWN, from, to), rbgy, 0.5f)
|
||||
baked.assertFace(Directions.UP, positions(Directions.UP, from, to), yrbg, 1.0f)
|
||||
baked.assertFace(Directions.NORTH, positions(Directions.NORTH, from, to), rbgy, 0.8f)
|
||||
baked.assertFace(Directions.SOUTH, positions(Directions.SOUTH, from, to), bgyr, 0.8f)
|
||||
baked.assertFace(Directions.WEST, positions(Directions.WEST, from, to), bgyr, 0.6f)
|
||||
baked.assertFace(Directions.EAST, positions(Directions.EAST, from, to), rbgy, 0.6f)
|
||||
}
|
||||
|
||||
fun x180y180() {
|
||||
val from = Vec3(0.0f)
|
||||
val to = Vec3(1.0f)
|
||||
@ -196,4 +228,68 @@ class FullCubeBakeTest {
|
||||
baked.assertFace(Directions.WEST, positions(Directions.WEST, from, to), bgyr, 0.6f)
|
||||
baked.assertFace(Directions.EAST, positions(Directions.EAST, from, to), rbgy, 0.6f)
|
||||
}
|
||||
|
||||
fun x180y270() {
|
||||
val from = Vec3(0.0f)
|
||||
val to = Vec3(1.0f)
|
||||
val model = SingleBlockStateApply(BlockModel(elements = listOf(ModelElement(from, to, faces = createFaces())), textures = mapOf("test" to minecraft("block/test").texture())), x = 2, y = 3)
|
||||
|
||||
val baked = model.bake(createTextureManager("block/test"))!!
|
||||
|
||||
|
||||
baked.assertFace(Directions.DOWN, positions(Directions.DOWN, from, to), gyrb, 0.5f)
|
||||
baked.assertFace(Directions.UP, positions(Directions.UP, from, to), bgyr, 1.0f)
|
||||
baked.assertFace(Directions.NORTH, positions(Directions.NORTH, from, to), rbgy, 0.8f)
|
||||
baked.assertFace(Directions.SOUTH, positions(Directions.SOUTH, from, to), bgyr, 0.8f)
|
||||
baked.assertFace(Directions.WEST, positions(Directions.WEST, from, to), bgyr, 0.6f)
|
||||
baked.assertFace(Directions.EAST, positions(Directions.EAST, from, to), rbgy, 0.6f)
|
||||
}
|
||||
|
||||
fun x270y90() {
|
||||
val from = Vec3(0.0f)
|
||||
val to = Vec3(1.0f)
|
||||
val model = SingleBlockStateApply(BlockModel(elements = listOf(ModelElement(from, to, faces = createFaces())), textures = mapOf("test" to minecraft("block/test").texture())), x = 3, y = 1)
|
||||
|
||||
val baked = model.bake(createTextureManager("block/test"))!!
|
||||
|
||||
|
||||
baked.assertFace(Directions.DOWN, positions(Directions.DOWN, from, to), rbgy, 0.5f)
|
||||
baked.assertFace(Directions.UP, positions(Directions.UP, from, to), bgyr, 1.0f)
|
||||
baked.assertFace(Directions.NORTH, positions(Directions.NORTH, from, to), bgyr, 0.8f)
|
||||
baked.assertFace(Directions.SOUTH, positions(Directions.SOUTH, from, to), rbgy, 0.8f)
|
||||
baked.assertFace(Directions.WEST, positions(Directions.WEST, from, to), yrbg, 0.6f)
|
||||
baked.assertFace(Directions.EAST, positions(Directions.EAST, from, to), rbgy, 0.6f)
|
||||
}
|
||||
|
||||
fun x270y180() {
|
||||
val from = Vec3(0.0f)
|
||||
val to = Vec3(1.0f)
|
||||
val model = SingleBlockStateApply(BlockModel(elements = listOf(ModelElement(from, to, faces = createFaces())), textures = mapOf("test" to minecraft("block/test").texture())), x = 3, y = 2)
|
||||
|
||||
val baked = model.bake(createTextureManager("block/test"))!!
|
||||
|
||||
|
||||
baked.assertFace(Directions.DOWN, positions(Directions.DOWN, from, to), bgyr, 0.5f)
|
||||
baked.assertFace(Directions.UP, positions(Directions.UP, from, to), rbgy, 1.0f)
|
||||
baked.assertFace(Directions.NORTH, positions(Directions.NORTH, from, to), gyrb, 0.8f)
|
||||
baked.assertFace(Directions.SOUTH, positions(Directions.SOUTH, from, to), bgyr, 0.8f)
|
||||
baked.assertFace(Directions.WEST, positions(Directions.WEST, from, to), rbgy, 0.6f)
|
||||
baked.assertFace(Directions.EAST, positions(Directions.EAST, from, to), bgyr, 0.6f)
|
||||
}
|
||||
|
||||
fun x270y270() {
|
||||
val from = Vec3(0.0f)
|
||||
val to = Vec3(1.0f)
|
||||
val model = SingleBlockStateApply(BlockModel(elements = listOf(ModelElement(from, to, faces = createFaces())), textures = mapOf("test" to minecraft("block/test").texture())), x = 3, y = 3)
|
||||
|
||||
val baked = model.bake(createTextureManager("block/test"))!!
|
||||
|
||||
|
||||
baked.assertFace(Directions.DOWN, positions(Directions.DOWN, from, to), gyrb, 0.5f)
|
||||
baked.assertFace(Directions.UP, positions(Directions.UP, from, to), yrbg, 1.0f)
|
||||
baked.assertFace(Directions.NORTH, positions(Directions.NORTH, from, to), yrbg, 0.8f)
|
||||
baked.assertFace(Directions.SOUTH, positions(Directions.SOUTH, from, to), gyrb, 0.8f)
|
||||
baked.assertFace(Directions.WEST, positions(Directions.WEST, from, to), bgyr, 0.6f)
|
||||
baked.assertFace(Directions.EAST, positions(Directions.EAST, from, to), gyrb, 0.6f)
|
||||
}
|
||||
}
|
||||
|
@ -79,8 +79,6 @@ class WeightedModelTest {
|
||||
baked.assert(Vec3i(33, -61, 15), 3)
|
||||
baked.assert(Vec3i(33, -61, 16), 1)
|
||||
baked.assert(Vec3i(33, -61, 17), 2)
|
||||
|
||||
|
||||
}
|
||||
|
||||
private fun WeightedBlockRender.assert(position: Vec3i, entry: Int) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user