Hoping to Use Babylon.js instead of Three.js because of joints. Couple of questions

So where would you do these multiple iterations? In scene.registerAfterRender ?

Also, for an example such as this the math seems pretty straight forward when rotating box2 as it’s just using asin which is easy to figure out.

But for my example above with the three linkages and rotation in multiple planes, how do I figure those out? I was hoping I could find a solution which lets me attach joints together and have it just solve for the angles and positions without having to write the math for that one particular problem.