hi folks,
we have a very old JSON model which I need to update as the LegacyJSONLoader was removed in 111 and we need to update to a later version of three.js. I tried to use legacythree2gltf.js
but it seems to just produce a empty model. How can I convert such old models?
Example of a simple old model (basically just a box):
{"textures":[],"vertices": [], "faces": [], "geometries":[{"uuid":"E11CEFD5-FC9D-4324-B3F1-5614B91CA970","data":{"metadata":{"normals":6,"faces":6,"vertices":8,"materials":1,"generator":"io_three","version":3},"normals":[-1,0,0,0,0,-1,1,0,0,0,0,1,0,-1,0,0,1,0],"faces":[35,0,1,3,2,0,0,0,0,0,35,2,3,7,6,0,1,1,1,1,35,6,7,5,4,0,2,2,2,2,35,1,0,4,5,0,3,3,3,3,35,4,0,2,6,0,4,4,4,4,35,7,3,1,5,0,5,5,5,5],"vertices":[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1],"name":"CubeGeometry.2"},"type":"Geometry","materials":[{"wireframe":false,"colorEmissive":[0,0,0],"specularCoef":50,"blending":"MultiplyBlending","DbgIndex":0,"depthTest":true,"shading":"phong","DbgName":"Material.001","colorSpecular":[1,1,1],"opacity":1,"colorDiffuse":[0.2734,0.262734,0.8],"depthWrite":true,"visible":true,"transparent":false,"DbgColor":15658734}]}],"metadata":{"type":"Object","generator":"io_three","version":4.4,"sourceFile":"samsung2.blend"},"images":[],"materials":[{"shininess":50,"emissive":0,"vertexColors":0,"specular":16777215,"name":"Material.001","uuid":"C6531D56-9494-44CA-B01F-4B373648F5F5","blending":"MultiplyBlending","depthWrite":true,"type":"MeshPhongMaterial","depthTest":true,"color":4539084}],"animations":[{"tracks":[],"name":"default","fps":24}],"object":{"uuid":"014AF025-8252-4A19-B128-606F57EFB3B2","type":"Scene","matrix":[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],"children":[{"name":"Cube","uuid":"F6FE869B-CD61-4788-A5C0-787AECA7E307","matrix":[-3.5,0,0,0,0,0,6,0,0,0.203663,0,0,-0.0451503,0.0332229,-0.03196,1],"visible":true,"type":"Mesh","material":"C6531D56-9494-44CA-B01F-4B373648F5F5","castShadow":true,"receiveShadow":true,"geometry":"E11CEFD5-FC9D-4324-B3F1-5614B91CA970"}]}}
Result of legacythree2gltf:
{"asset":{"version":"2.0","generator":"THREE.GLTFExporter"},"scenes":[{"nodes":[0],"name":"AuxScene"}],"scene":0,"nodes":[{}]}
What am I missing? How can I convert such old models?
Thanks
Jan