0
我想將Three.js中的球移動到右側,然後移動到開始位置,然後重複回到右側。Three.js - 如何將球從左向右反覆移動
var geometry = new THREE.SphereGeometry(5, 32, 32);
var material = new THREE.MeshPhongMaterial({specular: "#fdfb57",
color: "#d8d613", emissive: "#6b6a0d", side: THREE.DoubleSide});
var ball = new THREE.Mesh(geometry, material);
var render = function() {
requestAnimationFrame(render);
renderer.render(scene, camera);
renderer.setSize(window.innerWidth, window.innerHeight);
// What programming code I have to put on here?
};
render();
但是我該如何實現移動球?