simple javascript canvas drawing library - learning project