Code stencil for implementation of robot kinematics, control, and decision making in HTML5/JavaScript and threejs