Hi every one,
I am using three js library with React js.
we have need to transparent the texture on object.i am using CustomBlending,SrcAlphaFactor and transparent in code but not work.
Please check and help me.I have attached source code.
loader.load('obj/inside_roller.obj', function ( object ) {
console.log(object);
globalObject=inside_object=object;
object.traverse( function ( child ) {
if ( child instanceof THREE.Mesh ) {
child.material.map = child.name.search("Aluminum") > 0 ? aluminium_texture : texture
child.material.transparent = true;
child.material.blending = THREE.CustomBlending;
child.material.blendSrc = THREE.SrcAlphaFactor;
child.material.blendDst = THREE.SrcColorFactor;
}
});
object.position.set(- 58,-7,-2);
object.scale.set(0.055,0.05,0.04);
object.rotation.set(0,1.57,0);
scene.add( object );
}, onProgress, onError );
My Scene.js (6.6 KB)