Revert "random constructor no longer needed"

This reverts commit 741c6eb78a0763819478125b9aba9c6d19ef26f8.
fix but in toJS.sh
added pass function
added demo-drawtext.html