1 /** 2 * @class image 3 * @description 4 * Class for abstracting visual data blocks. 5 * 6 * An Image is a list of frames, where each frame is 7 * 2-dimensional matrix of 4-component RGBA colors. Every layer (or frame) 8 * of an image has the same dimensions. A typical uses of multiple layers of an image 9 * are tilesets and animations. In most cases, the pixel data for the image 10 * is stored on the GPU. Images are essentially containers for their frames. 11 * 12 */ 13 function image() { 14 15 /** 16 * Gets the frame requested. 17 * 18 * @param {Number} i The i'th frame requested 19 * @returns {frame} The frame requested 20 */ 21 this.getFrame = function(){}; 22 23 24 25 26 /** 27 * Number of frames that belong to the image. 28 * @type {Number} 29 */ 30 this.frameCount = 0; 31 32 33 34 35 36 return this; 37 } 38