Add hierarchical 3ds test file.

This commit is contained in:
kovacsv 2021-11-03 18:08:17 +01:00
parent b90425e247
commit a79f2ce5ee
3 changed files with 80 additions and 3 deletions

BIN
test/testfiles/3ds/cube.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

View File

@ -97,7 +97,7 @@ describe ('3ds Importer', function() {
min : [2, 0, 0],
max : [3, 1, 1]
}
}
}
]
});
done ();
@ -160,10 +160,87 @@ describe ('3ds Importer', function() {
min : [0, 2, 0],
max : [1, 3, 1]
}
}
}
]
});
done ();
});
});
});
it ('cube_hierarchy.3ds', function (done) {
testFiles.Import3dsFile ('cube_hierarchy.3ds', function (model) {
assert (OV.CheckModel (model));
assert.deepStrictEqual (testUtils.ModelToObjectSimple (model), {
name: '',
materials: [ { name: 'c_tex' }, { name: 'c_red' }, { name: 'c_blue' } ],
meshes: [
{
name: 'Cube',
vertexCount: 8,
normalCount: 12,
uvCount: 8,
triangleCount: 12,
boundingBox: { min: [ -1, -1, -1 ], max: [ 1, 1, 1 ] }
},
{
name: 'Cube',
vertexCount: 8,
normalCount: 12,
uvCount: 8,
triangleCount: 12,
boundingBox: { min: [ 2, -1, -1 ], max: [ 4, 1, 1 ] }
},
{
name: 'Cube',
vertexCount: 8,
normalCount: 12,
uvCount: 8,
triangleCount: 12,
boundingBox: { min: [ 2, 2, -1 ], max: [ 4, 4, 1 ] }
},
{
name: 'Cube',
vertexCount: 8,
normalCount: 12,
uvCount: 8,
triangleCount: 12,
boundingBox: { min: [ -1, 2, -1 ], max: [ 1, 4, 1 ] }
},
{
name: 'Cube',
vertexCount: 8,
normalCount: 12,
uvCount: 8,
triangleCount: 12,
boundingBox: { min: [ -1, -1, 2 ], max: [ 1, 1, 4 ] }
},
{
name: 'Cube',
vertexCount: 8,
normalCount: 12,
uvCount: 8,
triangleCount: 12,
boundingBox: { min: [ 2, -1, 2 ], max: [ 4, 1, 4 ] }
},
{
name: 'Cube',
vertexCount: 8,
normalCount: 12,
uvCount: 8,
triangleCount: 12,
boundingBox: { min: [ 2, 2, 2 ], max: [ 4, 4, 4 ] }
},
{
name: 'Cube',
vertexCount: 8,
normalCount: 12,
uvCount: 8,
triangleCount: 12,
boundingBox: { min: [ -1, 2, 2 ], max: [ 1, 4, 4 ] }
}
]
});
done ();
});
});
});