Interactive IK from After Effects to svg

Developer
Size
2,268 Kb
Views
38,456

How do I make an interactive ik from after effects to svg?

This version is interactive, drag the hand to see it in action. Inverse kinematics created with Duik exported from AE . What is a interactive ik from after effects to svg? How do you make a interactive ik from after effects to svg? This script and codes were developed by Kittons on 08 November 2022, Tuesday.

Interactive IK from After Effects to svg Previews

Interactive IK from After Effects to svg - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Interactive IK from After Effects to svg</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div id='container'></div> <script src='https://labs.nearpod.com/bodymovin/demo/ik/bodymovin.js'></script> <script src="js/index.js"></script>
</body>
</html>

Interactive IK from After Effects to svg - Script Codes CSS Codes

body, html{ margin:0; width:100%; height:100%; background-color:#EEE; overflow: hidden;
}
#container{ width: 600px; height:600px; overflow: hidden; position:absolute; top:0; bottom:0; left:0; right:0; margin:auto;
}
div{ font-size:0px;
}

Interactive IK from After Effects to svg - Script Codes JS Codes

var animData = { container: document.getElementById('container'), renderer: 'svg', loop: true, autoplay: true, path: 'https://labs.nearpod.com/bodymovin/demo/ik/ik.json' }; var anim = bodymovin.loadAnimation(animData);; var hand; var initX,initY,handX,handY; function handMove(ev){ var currentX = ev.clientX; var currentY = ev.clientY; anim.animationData.layers[0].layers[0].ks.p.k[0].s[0] = handX + (currentX - initX); anim.animationData.layers[0].layers[0].ks.p.k[0].e[0] = handX + (currentX - initX); anim.animationData.layers[0].layers[0].ks.p.k[0].s[1] = handY + (currentY - initY); anim.animationData.layers[0].layers[0].ks.p.k[0].e[1] = handY + (currentY - initY); } function handUp(ev){ document.removeEventListener('mousemove',handMove); document.removeEventListener('mouseup',handUp); } function handDown(ev){ document.addEventListener('mousemove',handMove); document.addEventListener('mouseup',handUp); initX = ev.clientX; initY = ev.clientY; handX = anim.animationData.layers[0].layers[0].ks.p.k[0].s[0]; handY = anim.animationData.layers[0].layers[0].ks.p.k[0].s[1]; } function init(){ hand = document.getElementById('hand'); hand.addEventListener('mousedown',handDown); } anim.addEventListener('DOMLoaded',init);
Interactive IK from After Effects to svg - Script Codes
Interactive IK from After Effects to svg - Script Codes
Home Page Home
Developer Kittons
Username airnan
Uploaded November 08, 2022
Rating 3.5
Size 2,268 Kb
Views 38,456
Do you need developer help for Interactive IK from After Effects to svg?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Kittons (airnan) Script Codes
Create amazing marketing copy with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!