From d2039f97e60ec8ea8f687225bd326a019206dd87 Mon Sep 17 00:00:00 2001 From: kovacsv Date: Sun, 14 Nov 2021 09:37:43 +0100 Subject: [PATCH] Fix three.js import when a mesh node has children. --- source/import/importerthree.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/import/importerthree.js b/source/import/importerthree.js index 75dbcfc..a9e124f 100644 --- a/source/import/importerthree.js +++ b/source/import/importerthree.js @@ -139,7 +139,9 @@ OV.ImporterThreeBase = class extends OV.ImporterBase AddObject (importer, model, childObject, node); } if (threeObject.isMesh && importer.IsMeshVisible (threeObject)) { - node.SetType (OV.NodeType.MeshNode); + if (threeObject.children.length === 0) { + node.SetType (OV.NodeType.MeshNode); + } let mesh = importer.ConvertThreeMesh (threeObject); let meshIndex = model.AddMesh (mesh); node.AddMeshIndex (meshIndex);