diff --git a/test/testfiles/obj/lines_in_meshes_2.obj b/test/testfiles/obj/lines_in_meshes_2.obj new file mode 100644 index 0000000..0f3cb25 --- /dev/null +++ b/test/testfiles/obj/lines_in_meshes_2.obj @@ -0,0 +1,16 @@ +v 0.0 0.0 0.0 +v 1.0 0.0 0.0 +v 1.0 1.0 0.0 +v 0.0 1.0 0.0 + +g Mesh01 +l 1 2 +l 3 4 + +v 0.0 0.0 1.0 +v 1.0 0.0 1.0 +v 1.0 1.0 1.0 +v 0.0 1.0 1.0 + +g Mesh02 +l 5 6 6 7 7 8 8 5 diff --git a/test/tests/importerobj_test.js b/test/tests/importerobj_test.js index 5dea9ed..bd372b5 100644 --- a/test/tests/importerobj_test.js +++ b/test/tests/importerobj_test.js @@ -719,6 +719,45 @@ describe ('Obj Importer', function () { }); }); + it ('lines_in_meshes_2.obj', function (done) { + ImportObjFile ('lines_in_meshes_2.obj', function (model) { + assert.ok (OV.CheckModel (model)); + assert.deepStrictEqual (ModelToObject (model), { + name : '', + materials : [ + { name : '' } + ], + meshes : [ + { + name : 'Mesh01', + lines : [ + { + vertices : [0, 0, 0, 1, 0, 0], + mat : 0 + }, + { + vertices : [1, 1, 0, 0, 1, 0], + mat : 0 + } + ], + triangles : [] + }, + { + name : 'Mesh02', + lines : [ + { + vertices : [0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1], + mat : 0 + } + ], + triangles : [] + } + ] + }); + done (); + }); + }); + it ('lines_colors.obj', function (done) { ImportObjFile ('lines_colors.obj', function (model) { assert.ok (OV.CheckModel (model));