-
-
Notifications
You must be signed in to change notification settings - Fork 36.2k
Open
Labels
Description
Description
Not sure its a bug or if it's limited by the api but in a bundle static if i update materials of the meshs inside only the first material is updated.
it does work if i call bundle.needsUpdate or if bundle.static = false
Reproduction steps
- create a bundle and add multiple mesh with differents material
- update opacity / color of the materials
- only first one is updated
Code
let group = new THREE.BundleGroup()
// mesh
for(let i=0; i<10; i++){
// material
const material = new THREE.MeshBasicMaterial( {
color: new THREE.Color(THREE.MathUtils.randInt(0,0xffffff)),
transparent: true,
opacity:Math.random(),
depthWrite:false
} );
const mesh = new THREE.Mesh( geometry, material );
mesh.position.set(
-5 + i,
0,
0
)
group.add( mesh )
setInterval(()=>{
material.opacity = Math.random()
//group.needsUpdate = true
}, 100 + Math.random()*500)
}
//group.needsUpdate = true
group.static = true
scene.add( group );Live example
https://jsfiddle.net/8z5qb9xs/15/
Screenshots
No response
Version
r174 dev
Device
No response
Browser
No response
OS
No response