When I started with three.js, I did something like this. But with Geometry, now I would do it with BufferGeometry. But you can take some of it over.
I did it for a german forum back then, therefore german identifiers and comments. But the few words can be translated easily.
You can find it in the Collection of examples from discourse.threejs.org .
Directly here https://hofk.de/main/threejs/geometrie/03_weihnacht_wuerfel.html
another links
Problems with creating custom polyhedron geometry
https://www.mathsisfun.com/geometry/polyhedron-models.html?m=Rhombicuboctahedron
something else found again
Does three.js supports FK (forward kinematics) and IK (Inverse kinematics)?