An implementation of a skeleton system for canvas element in javascript