diff --git a/src/core/const.js b/src/core/const.js index 220c14e..a2003c3 100644 --- a/src/core/const.js +++ b/src/core/const.js @@ -6,7 +6,7 @@ */ var CONST = { /** - * String of the current PIXI version + * String of the current PIXI version. * * @static * @constant @@ -15,21 +15,27 @@ VERSION: '__VERSION__', /** - * @property {number} PI_2 - Two Pi + * Two Pi. + * + * @property {number} PI_2 * @constant * @static */ PI_2: Math.PI * 2, /** - * @property {number} RAD_TO_DEG - Constant conversion factor for converting radians to degrees + * Conversion factor for converting radians to degrees. + * + * @property {number} RAD_TO_DEG * @constant * @static */ RAD_TO_DEG: 180 / Math.PI, /** - * @property {Number} DEG_TO_RAD - Constant conversion factor for converting degrees to radians + * Conversion factor for converting degrees to radians. + * + * @property {number} DEG_TO_RAD * @constant * @static */ @@ -61,9 +67,10 @@ }, /** - * Various blend modes supported by PIXI. IMPORTANT - The WebGL renderer only supports - * the NORMAL, ADD, MULTIPLY and SCREEN blend modes. Anything else will silently act like - * NORMAL. + * Various blend modes supported by PIXI. + * + * IMPORTANT - The WebGL renderer only supports the NORMAL, ADD, MULTIPLY and SCREEN blend modes. + * Anything else will silently act like NORMAL. * * @static * @constant @@ -155,8 +162,9 @@ * * The DEFAULT wrap mode affects the default wraping mode of future operations. * It can be re-assigned to either CLAMP or REPEAT, depending upon suitability. - * If the texture is non power of two then clamp will be used regardless as webGL can only use REPEAT if the texture is po2 - * This property only affects WebGL + * If the texture is non power of two then clamp will be used regardless as webGL can only use REPEAT if the texture is po2. + * This property only affects WebGL. + * * @static * @constant * @property {object} WRAP_MODES @@ -173,13 +181,14 @@ }, /** - * The wrap modes that are supported by pixi. + * The gc modes that are supported by pixi. * * The DEFAULT Garbage Collection mode for pixi textures is MANUAL * If set to DEFAULT, the renderer will occasianally check textures usage. If they are not used for a specified period of time they will be removed from the GPU. * They will of corse be uploaded again when they are required. This is a silent behind the scenes process that should ensure that the GPU does not get filled up. * Handy for mobile devices! - * This property only affects WebGL + * This property only affects WebGL. + * * @static * @constant * @property {object} GC_MODES @@ -194,8 +203,9 @@ }, /** - * If set to true WebGL will attempt make textures mimpaped by default - * Mipmapping will only succeed if the base texture uploaded has power of two dimensions + * If set to true WebGL will attempt make textures mimpaped by default. + * Mipmapping will only succeed if the base texture uploaded has power of two dimensions. + * * @static * @constant * @property {bool} MIPMAP_TEXTURES @@ -203,17 +213,31 @@ MIPMAP_TEXTURES:true, /** - * The prefix that denotes a URL is for a retina asset + * The prefix that denotes a URL is for a retina asset. * * @static * @constant * @property {string} RETINA_PREFIX + * @example `@2x` */ - //example: '@2x', RETINA_PREFIX: /@(.+)x/, + /** + * Default resolution of the renderer. + * + * @property {number} RESOLUTION + * @constant + * @static + */ RESOLUTION:1, + /** + * Default filter resolution. + * + * @property {number} FILTER_RESOLUTION + * @constant + * @static + */ FILTER_RESOLUTION:1, /** @@ -224,14 +248,15 @@ * @constant * @property {object} DEFAULT_RENDER_OPTIONS * @property {HTMLCanvasElement} DEFAULT_RENDER_OPTIONS.view=null - * @property {boolean} DEFAULT_RENDER_OPTIONS.transparent=false + * @property {number} DEFAULT_RENDER_OPTIONS.resolution=1 * @property {boolean} DEFAULT_RENDER_OPTIONS.antialias=false * @property {boolean} DEFAULT_RENDER_OPTIONS.forceFXAA=false - * @property {boolean} DEFAULT_RENDER_OPTIONS.preserveDrawingBuffer=false - * @property {number} DEFAULT_RENDER_OPTIONS.resolution=1 + * @property {boolean} DEFAULT_RENDER_OPTIONS.autoResize=false + * @property {boolean} DEFAULT_RENDER_OPTIONS.transparent=false * @property {number} DEFAULT_RENDER_OPTIONS.backgroundColor=0x000000 * @property {boolean} DEFAULT_RENDER_OPTIONS.clearBeforeRender=true - * @property {boolean} DEFAULT_RENDER_OPTIONS.autoResize=false + * @property {boolean} DEFAULT_RENDER_OPTIONS.preserveDrawingBuffer=false + * @property {boolean} DEFAULT_RENDER_OPTIONS.roundPixels=false */ DEFAULT_RENDER_OPTIONS: { view: null, @@ -252,11 +277,11 @@ * @static * @constant * @property {object} SHAPES - * @property {object} SHAPES.POLY=0 - * @property {object} SHAPES.RECT=1 - * @property {object} SHAPES.CIRC=2 - * @property {object} SHAPES.ELIP=3 - * @property {object} SHAPES.RREC=4 + * @property {number} SHAPES.POLY=0 + * @property {number} SHAPES.RECT=1 + * @property {number} SHAPES.CIRC=2 + * @property {number} SHAPES.ELIP=3 + * @property {number} SHAPES.RREC=4 */ SHAPES: { POLY: 0, @@ -269,7 +294,7 @@ // TODO: maybe change to SPRITE.BATCH_SIZE: 2000 // TODO: maybe add PARTICLE.BATCH_SIZE: 15000 SPRITE_BATCH_SIZE: 4096, //nice balance between mobile and desktop machines - SPRITE_MAX_TEXTURES: require('./utils/maxRecommendedTextures')(32)//this is the MAXIMUM - various gpus will have there own limits. + SPRITE_MAX_TEXTURES: require('./utils/maxRecommendedTextures')(32) //this is the MAXIMUM - various gpus will have there own limits. }; module.exports = CONST;