I'm new fish in threeJS and have two transparent boxes below:
and want to change or hide the color of the overlap part from red box to the color blending with the green box and back non-transparent objects:

here's two materials:
getTransparentMesh(color = 0x990000) {
const geo = new THREE.BoxGeometry(100, 100, 100)
const mat = new THREE.MeshBasicMaterial({
color: color,
transparent: true,
opacity: 0.5
})
const mesh = new THREE.Mesh(geo, mat)
return mesh
}
addTransparentMeshes() {
this.meshA = this.getTransparentMesh(0xee8800)
this.meshB = this.getTransparentMesh(0x88ff00)
this.meshA.position.set(20, 0, -50)
this.meshB.position.set(-30, 0, 50)
const scene = this.engine.scene
scene.add(this.meshA)
scene.add(this.meshB)
}
nothing special options, is there any way can do that? hide or replace the overlap transparent color from red(maybe not red, my bad) box.
