Have a question

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

I am sorry it took so long to reply.

The part of your code that you have shared here looks good to me. To help you fix this, I need you to share the entire project.

To share the project, either use the share option from the menu in 3DE or copy and paste it directly into your reply. The share option is less error prone. If you prefer copy & paste, be sure to paste it between 3 backtick lines:

Explain how your code is misbehaving...

```    
 // Paste your code here
```

Include any more information that you like here...

After sharing your code, I’ll get you a reply as quickly as possible.

Sorry again for the extremely slow response.

-Chris