var maxItems = 1000;
var confun = function() {
showProgress(container, counter, maxItems);
counter++;
showProgress(container, counter, maxItems);
console.log("Going to show", container, counter, maxItems);
};
for (idx=json.motions.idle.length-1; idx >= 0; idx--) {
var job = makeBase64Request(curl(modelId + "_live2d_" + json.motions.idle[idx].file + ".txt"));
job.thendone(function(promiseData) {
var _datatoPush = "data:text/plain;base64," + promiseData;
json.motions.idle.push({ "file": _datatoPush });
for (idx=json.motions.tap_figure.length-1; idx >= 0 ; idx--) {
var job = makeBase64Request(curl(modelId + "_live2d_" + json.motions.tap_figure[idx].file + ".txt"));
job.thendone(function(promiseData) {
var _datatoPush = "data:text/plain;base64," + promiseData;
json.motions.tap_figure.push({ "file": _datatoPush });
for (idx=0; idx < json.textures.length; idx++) {
var job = makeBase64Request(curl(modelId + "_live2d_" + json.textures[idx]));
job.thendone(function(promiseData) {
var _datatoPush = "data:image/png;base64," + promiseData;
json.textures.push(_datatoPush);