We don't need to download animations from other websites, we can create our own.
Using Blender, you can create a model and then adjust the positions, scales and rotations of its parts by creating key frames on the timeline editor.
Test your animation works by using the play options on the timeline editor in Blender, and then export your model as GLB(preferred) or GLTF with animation options selected for the export.
After exporting your model, you can drag the GLB/GLTF file from your filesystem, onto this example scene below. It will read the file and create a new checkbox for every animation clip that it finds. You can enable/disable each animation independently.
import*asTHREEfrom'three'import{OrbitControls}from'three/examples/jsm/controls/OrbitControls'import{GLTF,GLTFLoader}from'three/examples/jsm/loaders/GLTFLoader'importStatsfrom'three/examples/jsm/libs/stats.module'constscene=newTHREE.Scene()scene.add(newTHREE.AxesHelper(5))constcamera=newTHREE.PerspectiveCamera(75,window.innerWidth/window.innerHeight,0.1,1000)camera.position.set(4,4,4)constrenderer=newTHREE.WebGLRenderer()renderer.setSize(window.innerWidth,window.innerHeight)document.body.appendChild(renderer.domElement)constcontrols=newOrbitControls(camera,renderer.domElement)controls.enableDamping=trueletmixer:THREE.AnimationMixerletmodelReady=falseconstgltfLoader=newGLTFLoader()constdropzone=document.getElementById('dropzone')asHTMLDivElementdropzone.ondragover=dropzone.ondragenter=function(evt){evt.preventDefault()}dropzone.ondrop=function(evt:DragEvent){evt.stopPropagation()evt.preventDefault()//clear the scenefor(leti=scene.children.length-1;i>=0;i--){scene.remove(scene.children[i])}//clear the checkboxesconstmyNode=document.getElementById('animationsPanel')asHTMLDivElementwhile(myNode.firstChild){myNode.removeChild(myNode.lastChildasany)}constaxesHelper=newTHREE.AxesHelper(5)scene.add(axesHelper)constlight1=newTHREE.DirectionalLight(newTHREE.Color(0xffcccc),2)light1.position.set(-1,1,1)scene.add(light1)constlight2=newTHREE.DirectionalLight(newTHREE.Color(0xccffcc),2)light2.position.set(1,1,1)scene.add(light2)constlight3=newTHREE.DirectionalLight(newTHREE.Color(0xccccff),2)light3.position.set(0,-1,0)scene.add(light3)constfiles=(evt.dataTransferasDataTransfer).filesconstreader=newFileReader()reader.onload=function(){gltfLoader.parse(reader.resultasstring,'/',(gltf:GLTF)=>{console.log(gltf.scene)mixer=newTHREE.AnimationMixer(gltf.scene)console.log(gltf.animations)if(gltf.animations.length>0){constanimationsPanel=document.getElementById('animationsPanel')asHTMLDivElementconstul=document.createElement('UL')asHTMLUListElementconstulElem=animationsPanel.appendChild(ul)gltf.animations.forEach((a:THREE.AnimationClip,i)=>{constli=document.createElement('UL')asHTMLLIElementconstliElem=ulElem.appendChild(li)constcheckBox=document.createElement('INPUT')asHTMLInputElementcheckBox.id='checkbox_'+icheckBox.type='checkbox'checkBox.addEventListener('change',(e:Event)=>{if((e.targetasHTMLInputElement).checked){mixer.clipAction((gltfasany).animations[i]).play()}else{mixer.clipAction((gltfasany).animations[i]).stop()}})liElem.appendChild(checkBox)constlabel=document.createElement('LABEL')asHTMLLabelElementlabel.htmlFor='checkbox_'+ilabel.innerHTML=a.nameliElem.appendChild(label)})if(gltf.animations.length>1){constbtnPlayAll=document.getElementById('btnPlayAll')asHTMLButtonElementbtnPlayAll.addEventListener('click',(e:Event)=>{mixer.stopAllAction()gltf.animations.forEach((a:THREE.AnimationClip)=>{mixer.clipAction(a).play()})})btnPlayAll.style.display='block'}}else{constanimationsPanel=document.getElementById('animationsPanel')asHTMLDivElementanimationsPanel.innerHTML='No animations found in model'}//Center model in viewconstbox=newTHREE.Box3().setFromObject(gltf.scene)constcenter=box.getCenter(newTHREE.Vector3())gltf.scene.position.x+=gltf.scene.position.x-center.xgltf.scene.position.y+=gltf.scene.position.y-center.ygltf.scene.position.z+=gltf.scene.position.z-center.zscene.add(gltf.scene)modelReady=true},(error)=>{console.log(error)})}reader.readAsArrayBuffer(files[0])}window.addEventListener('resize',onWindowResize,false)functiononWindowResize(){camera.aspect=window.innerWidth/window.innerHeightcamera.updateProjectionMatrix()renderer.setSize(window.innerWidth,window.innerHeight)render()}conststats=newStats()document.body.appendChild(stats.dom)constclock=newTHREE.Clock()functionanimate(){requestAnimationFrame(animate)controls.update()if(modelReady)mixer.update(clock.getDelta())render()stats.update()}functionrender(){renderer.render(scene,camera)}animate()