JavaScript procedural sprite generator