I have a written program in Three JS that I want to enhance by adding an animated function triggered by a button click event. Additionally, I need help with setting buttons in an inner window and calling all animations on button click events. Any assistance would be appreciated. Thank you.
You can find the same code in this link for Three JS
Code snippet:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Skinning and morphing</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<link type="text/css" rel="stylesheet" href="main.css">
<style>
body {
color: #222545;
}
a {
color: #2fa1d6;
}
p {
max-width: 600px;
margin-left: auto;
margin-right: auto;
padding: 0 2em;
}
</style>
</head>
<body>
<div class="btn-group">
<button id="walking" class="button" onclick="">Standing</button>
<button id="Idle" class="button" onclick="">Idle</button>
<button id="Standing" class="button" onclick="" >Walking</button>
<button id="Death" class="button" onclick="" >Death</button>
</div>
<script type="module">
...
// JavaScript code for animations and button functionality
</script>
</body>
</html>
If you know how to implement this, please provide assistance. Thank you!