set(type, percentage, direction) {
        percentage = Math.max(percentage, 0);
        percentage = Math.min(percentage, 1);
        this.elements[type].style[direction] = percentage * 100 + '%';
    }
Update progress

@param {String} type - Point out which bar it is
@param {Number} percentage
@param {String} direction - Point out the direction of this bar, Should be height or width