Just started diving into ThreeJS and discovering its capabilities.
Playing around with a simple example of creating a white dot and applying a basic translation.
let dotGeometry = new THREE.Geometry();
let dotMaterial = new THREE.PointsMaterial({
size: 10,
color: 0xffffff,
});
dotGeometry.vertices.push(new THREE.Vector3(1, 0, -1));
let dot = new THREE.Points(dotGeometry, dotMaterial);
scene.add(dot);
function animate() {
requestAnimationFrame(animate);
dot.position.x += 0.01;
renderer.render(scene, camera);
}
animate();
Noticed that the movement is a bit choppy even with just one point displayed on the screen.
Any suggestions on how to achieve smoother transformations or if I'm missing something?
Thanks in advance for your help. Andrea