From 0afce83a495e486581da74bf1992ab19a836fe3f Mon Sep 17 00:00:00 2001 From: kovacsv Date: Sun, 24 Oct 2021 17:30:48 +0200 Subject: [PATCH] Fix conversion when a node has multiple meshes. --- source/threejs/threeconverter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/threejs/threeconverter.js b/source/threejs/threeconverter.js index 0ad92d3..4a9b328 100644 --- a/source/threejs/threeconverter.js +++ b/source/threejs/threeconverter.js @@ -302,7 +302,7 @@ OV.ConvertModelToThreeObject = function (model, params, output, callbacks) OV.RunTasksBatch (node.MeshIndexCount (), 100, { runTask : (firstNodeMeshIndex, lastNodeMeshIndex, ready) => { for (let nodeMeshIndex = firstNodeMeshIndex; nodeMeshIndex <= lastNodeMeshIndex; nodeMeshIndex++) { - let meshInstanceId = new OV.MeshInstanceId (node.GetId (), node.GetMeshIndex (lastNodeMeshIndex)); + let meshInstanceId = new OV.MeshInstanceId (node.GetId (), node.GetMeshIndex (nodeMeshIndex)); ConvertMesh (threeNode, model, meshInstanceId, modelThreeMaterials); } ready ();