after this line can you add:
texture.wrapS = texture.wrapT = THREE.RepeatWrapping?
It’s possible that the texture filtering is pulling data from outside the texture, and without a wrap mode set, that data may be black pixels. Changing the wrap modes to either RepeatWrapping or ClampToEdgeWrapping may fix it?
I tried “texture.wrapS = texture.wrapT = THREE.RepeatWrapping” and “texture.wrapS = texture.wrapT = THREE.ClampToEdgeWrapping” but that not working the result still have the border
Simply yes. For better solution we can use in photoshop Filter “Flaming pear->Solidify A”
to fill transparent pixels not white but with color of our image.
Then add mask of image to make transparent again.
But photoshop have bug - totally transparent pixels became white. Here we need make mask more bright (not good) or use another program to save image with our mask.
As I say the design image depend on the user input, so If can change black transparent to white just by JS or three.js then please share me your code on the Glitch, thanks.
I used this code and your original image. Not glitch site:
var material = new THREE.MeshBasicMaterial({
map: texture,
transparent: true,
//premultipliedAlpha:true
});
material.onBeforeCompile=function(){
this.premultipliedAlpha=true;
}