Hello. I thinking about browser API for custom images.
-
Creating image without delay and latency
-
Creating custom frame-by-frame animation
-
Usage of ImageData objects, from canvas
-
Using as image resources, for example
<img>
tag, or CSS content
Example:
//Main class
class ImageResource {
constructor(){
this.isAnimation = false;
}
setImageData(data<ImageData>){}
getImageData(){}
getAnimationFrame(index){}
setAnimationFrame(index, frame<ImageResourceFrame>){}
toImageURL(){}
get width(){}
get height(){}
}
//For animation
class ImageResourceFrame(){
constructor(){
this.offsetX = 0;
this.offsetY = 0;
}
getImageData(){}
setImageData(data<ImageData>){}
get width(){}
get height(){}
}