Update image_load.js
This commit is contained in:
parent
7204f3e5bf
commit
9260441d08
|
@ -49,39 +49,7 @@ fetch('image/image.txt')
|
||||||
image_count++;
|
image_count++;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return Promise.all(imagePromises);
|
|
||||||
})
|
|
||||||
.then(() => {
|
|
||||||
let all_filters = []
|
|
||||||
|
|
||||||
dictionaries.forEach(image => {
|
|
||||||
let filter = {
|
|
||||||
items: viewer.world.getItemAt(image.imageCount),
|
|
||||||
processors: [
|
|
||||||
function (context, callback) {
|
|
||||||
Caman(context.canvas, function () {
|
|
||||||
this.colorize(image.red, image.green, image.blue, 80);
|
|
||||||
this.render(callback);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// function (context, callback) {
|
|
||||||
// Caman(context.canvas, function () {
|
|
||||||
// this.contrast(100);
|
|
||||||
// this.render(callback);
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
all_filters.push(filter)
|
|
||||||
});
|
|
||||||
|
|
||||||
// viewer.setFilterOptions({
|
|
||||||
// filters: all_filters
|
|
||||||
// });
|
|
||||||
|
|
||||||
|
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
console.error('Error:', error);
|
console.error('Error:', error);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue