Update cloth.js

- implemented map
- minor changes / additions