I try to render a CircleGeometry over a cube one (from the camera point of view we show both). The cube is with a flat color, and the circle got a canvas with just an arc and no background color.
I create a test for this : http://jsfiddle.net/f4u7s/6/ where you can switch between WebGL and CanvasRendering to show the problem. (look for
// ------------> Switch HERE
//renderer = new THREE.CanvasRenderer();
renderer = new THREE.WebGLRenderer();
)
It sounds alike the three.js textures working with CanvasRenderer, but show up as black with WebGLRenderer ticket, with even with the solution proposed (mesh.dynamic = true), the problem is still here.
Am I missing something?
You need to set material.transparent
to true
.
plane = new THREE.Mesh(
new THREE.CircleGeometry( 50, 50 ),
new THREE.MeshBasicMaterial( {
map: texture,
transparent: true
} )
);
three.js r.144
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With