Hello,
I buyed me the book “Kids programmieren 3D-Spiele mit JavaScript” and use it, but in the chapter “Hände und Füße bewegen” comes a code:
var clock = new THREE.Clock();
var isCartwheeling = false;
var isFlipping = false;
function animate() {
requestAnimationFrame(animate);
walk();
acrobatics();
renderer.render(scene, camera);
}
animate();
function walk() {
var speed = 10;
var size = 100;
var time = clock.getElapsedTime();
var position = Math.sin(speed * time) * size;
rightHand.position.z = position;
}
but when I write clock.getElapsedTime there is comming an error because thats not deffinet. I looked in the book for a deffin but the autor hasn’t deffinet in the book. Can someone help me with the deffin because I don’t comes further without that.
Unbegabt