Hi guys I have a particle system I made, it’s just particles in the shape of a texture and they are randomly generated inside of an imaginary square.
And everything works perfectly fine! these particles are doing EXACTLY what I want them to do. but I keep getting the error message:
THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The “position” attribute is likely to have NaN values.
what have I done wrong in the code? Thanks
THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The “position” attribute is likely to have NaN values.
const textureeeee = new THREE.TextureLoader().load( 'Untitled00000000 Small.png' );
const ParticlesGeometryyy = new THREE.BufferGeometry();
const ParticlesCnttt = 50000;
const verticesss = [];
verticesss.push();
const posArrayyy = new Float32Array(ParticlesCnttt);
for(let i = 0; i < ParticlesCntt; i++){
posArrayyy[i] = (Math.random()-0.5)*60
}
ParticlesGeometryyy.setAttribute('position', new THREE.BufferAttribute(posArrayyy, 3, 3));
const materialForParticlesss = new THREE.PointsMaterial({
size: 0.15,
map: textureeeee,
transparent: true,
depthWrite: false,
})
const ParticlesMeshhh = new THREE.Points(ParticlesGeometryyy, materialForParticlesss)
//scene.add(ParticlesMeshhh)
ParticlesMeshhh.translateX(500)
ParticlesMeshhh.translateY(1.25)
ParticlesMeshhh.translateZ(12.5)