, an interesting comparison is drawn between an .obj file and a CTM file. While the former contains information on both materials and geometries, the latter solely focuses on geometries.
Delving into the ThreeJs Editor code available on GitHub at
this location, it becomes evident that the loading process involves extracting geometries from the CTM file. Subsequently, a MeshPhongMaterial is manually created to accompany these geometries, resulting in the formation of a mesh that seamlessly integrates into the editor.scene.
As depicted in the sample below, the snippet showcases how the CTMLoader is utilized along with the subsequent creation of a mesh object using the extracted geometry. For further elaboration, a supplementary example can be explored here, specifically focusing on lines 124 onwards:
var loaderCTM = new THREE.CTMLoader( true );
loaderCTM.load( "models/camaro/camaro.ctm", function( geometry ) {
var material = new THREE.MeshPhongMaterial();
var mesh = new THREE.Mesh( geometry, material );
mesh.name = "camero";
editor.addObject( mesh );
editor.select( mesh );
}, false );