Update cloth.js

- implemented isMatching function
- minor additions/changes