Cloth simulation algorithms (Position Based Dynamics and Mass-Spring System) implemented in TypeScript