When looking for a Three.js library that supports JSONLoader, OrbitControls, and AnimationAction simultaneously, the choice can be challenging due to the variety of options available. The code snippet below showcases an attempt to incorporate these three functions within a project:
<!DOCTYPE html> <!--"-->
<html lang="en" >
<head>
<meta charset="UTF-8">
<title>Skelet Animation</title>
<style>
body {
margin: 0;
}
canvas {
width: 100vw;
height: 100vh;
display: block;
}
</style>
</head>
<body translate="no" >
<div id="webGL-container"></div>
//https://threejsfundamentals.org/threejs/resources/threejs/r98/three.min.js
<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.js'></script>
<script src="threejs/resources/threejs/r98/three.min.js"></script>
<script src="js/dat.gui.min.js"></script>
<script src="threejs/resources/threejs/r98/js/controls/OrbitControls.js"></script>
<canvas></canvas>
<script id="rendered-js" >
$(function () {
// JavaScript logic here...
});
</script>
</body>
</html>
An external file is linked featuring a character animation created in Blender. Due to the nature of Blender animations, there may be discrepancies when rendered.
The specific error encountered in the console reads as follows: “Uncaught TypeError: THREE.AnimationAction is not a constructor”