I’m working on a project and it needs a texture to be applied on an object, which is a .ctm file. I tried loading the texture, but the intended result isn’t appearing.
In my project, I loaded a .ctm 3d file from my desktop and I want to apply a texture on it.
To apply the texture, I imported a “net” like image similar to the cloth here: https://threejs.org/examples/#webgl_animation_cloth.
But the texture remains solid in my project, instead of showing a net like structure. Can anyone help me with this?
My code for loading the texture and .ctm file is:
var myTexture = new THREE.TextureLoader().load( "**resources/textures/circuit_pattern.png**" );
loader.load('**resources/sample3d.ctm**', function(geometry) {
tempObject = new THREE.Mesh( geometry, new THREE.MeshPhongMaterial( {
map: myTexture ,
side: THREE.DoubleSide,
alphaTest: 0.5**
} ) );
tempObject.name = 'myObject';
scene.add( tempObject );
objectOpacitySlider(name, 'enable');
objects.push( tempObject );
myObject = tempObject;
myObject.position.set(-0.000000001, 0, 0);
});