Adapted from
EaselJS
and Codementor