Hi Guys,
“If you used the THREE.Geometry in any of your custom code, and you want to use THREE r125 or later, then you will need to update to use THREE.BufferGeometry .”
two questions ,
so could i add an import like
import {Geometry} from “…depriciated/Geometry.js” to use with the existing code
and
how would i modify this code below to use with THREE.BUFFERGEOMETRY,
Geo = new THREE.Geometry();
for(let i=0;i<10;i++) {
let point = new THREE.Vector3(
Math.random() * 10 - 20,
Math.random() * 10 - 20,
Math.random() * 10 - 20
);
Geo.vertices.push(point);
}
let img = new THREE.TextureLoader().load( ‘image’ );
let pointMaterial = new THREE.PointsMaterial({
map: img,transparent:true
});
points = new THREE.Points(Geo, pointMaterial);
render(){
Geo.vertices.forEach(p => {
p.y -= .001;
});
Geo.verticesNeedUpdate = true;
}
Thanks