Having trouble understanding an issue I encountered with ThreeJS. There's a basic cube on a page and I've got a PNG image of a white question mark, with the rest of the image transparent. When I apply the texture to the cube;
cubeGeometry = new THREE.BoxGeometry( 5, 5, 5 );
cubeMaterial = new THREE.MeshStandardMaterial( { color: this.cubeColor, flatShading: true, map:new THREE.TextureLoader().load( require("./question-mark.png") ) } );
cubeMesh = new THREE.Mesh( cubeGeometry, cubeMaterial );
The transparent pixels in the PNG turn black no matter what I try. What's even more bizarre is that the white pixels in the PNG are showing up as the color of this.cubeColor - which happens to be orange.
I would expect the cube to be orange with the transparent parts of the PNG taking on that color while the white areas remain white.
Can anyone provide some insight?
What I'm seeing:
The texture: