diff --git a/bin/pixi.dev.js b/bin/pixi.dev.js index fba9b25..7ead350 100644 --- a/bin/pixi.dev.js +++ b/bin/pixi.dev.js @@ -274,7 +274,7 @@ /** * Sets the point to a new x and y position. * If y is omitted, both x and y will be set to x. - * + * * @method set * @param [x=0] {Number} position of the point on the x axis * @param [y=0] {Number} position of the point on the y axis @@ -417,7 +417,7 @@ * An array of the points of this polygon * @property points * @type Array(Point)|Array(Number) - * + * */ this.points = points; @@ -678,7 +678,7 @@ * @param y {Number} The Y coordinate of the upper-left corner of the rounded rectangle * @param width {Number} The overall width of this rounded rectangle * @param height {Number} The overall height of this rounded rectangle - * @param radius {Number} Controls the radius of the rounded corners + * @param radius {Number} Controls the radius of the rounded corners */ PIXI.RoundedRectangle = function(x, y, width, height, radius) { @@ -772,8 +772,8 @@ */ /** - * The Matrix class is now an object, which makes it a lot faster, - * here is a representation of it : + * The Matrix class is now an object, which makes it a lot faster, + * here is a representation of it : * | a | b | tx| * | c | d | ty| * | 0 | 0 | 1 | @@ -922,7 +922,7 @@ newPos = newPos || new PIXI.Point(); var id = 1 / (this.a * this.d + this.c * -this.b); - + newPos.x = this.d * id * pos.x + -this.c * id * pos.y + (this.ty * this.c - this.tx * this.d) * id; newPos.y = this.a * id * pos.y + -this.b * id * pos.x + (-this.ty * this.a + this.tx * this.b) * id; @@ -931,7 +931,7 @@ /** * Translates the matrix on the x and y. - * + * * @method translate * @param {Number} x * @param {Number} y @@ -941,13 +941,13 @@ { this.tx += x; this.ty += y; - + return this; }; /** * Applies a scale transformation to the matrix. - * + * * @method scale * @param {Number} x The amount to scale horizontally * @param {Number} y The amount to scale vertically @@ -987,13 +987,13 @@ this.d = c1 * sin+this.d * cos; this.tx = tx1 * cos - this.ty * sin; this.ty = tx1 * sin + this.ty * cos; - + return this; }; /** * Appends the given Matrix to this Matrix. - * + * * @method append * @param {Matrix} matrix * @return {Matrix} This matrix. Good for chaining method calls. @@ -1012,13 +1012,13 @@ this.tx = matrix.tx * a1 + matrix.ty * c1 + this.tx; this.ty = matrix.tx * b1 + matrix.ty * d1 + this.ty; - + return this; }; /** * Resets this Matix to an identity (default) matrix. - * + * * @method identity * @return {Matrix} This matrix. Good for chaining method calls. */ @@ -1254,7 +1254,7 @@ /* * MOUSE Callbacks */ - + /** * A callback that is used when the users mouse rolls over the displayObject * @method mouseover @@ -1515,7 +1515,7 @@ d = this._cr * this.scale.y; tx = this.position.x; ty = this.position.y; - + // check for pivot.. not often used so geared towards that fact! if(this.pivot.x || this.pivot.y) { @@ -1531,7 +1531,7 @@ wt.tx = tx * pt.a + ty * pt.c + pt.tx; wt.ty = tx * pt.b + ty * pt.d + pt.ty; - + } else { @@ -1608,10 +1608,10 @@ var bounds = this.getLocalBounds(); var renderTexture = new PIXI.RenderTexture(bounds.width | 0, bounds.height | 0, renderer, scaleMode, resolution); - + PIXI.DisplayObject._tempMatrix.tx = -bounds.x; PIXI.DisplayObject._tempMatrix.ty = -bounds.y; - + renderTexture.render(this, PIXI.DisplayObject._tempMatrix); return renderTexture; @@ -1651,7 +1651,7 @@ */ PIXI.DisplayObject.prototype.toLocal = function(position, from) { - // + // if (from) { position = from.toGlobal(position); @@ -1714,7 +1714,7 @@ PIXI.DisplayObject._tempMatrix.tx = -bounds.x; PIXI.DisplayObject._tempMatrix.ty = -bounds.y; - + this._cachedSprite.texture.render(this, PIXI.DisplayObject._tempMatrix, true); this._cachedSprite.anchor.x = -( bounds.x / bounds.width ); @@ -1828,7 +1828,7 @@ this.children = []; // fast access to update transform.. - + }; // constructor @@ -1847,7 +1847,7 @@ return this.scale.x * this.getLocalBounds().width; }, set: function(value) { - + var width = this.getLocalBounds().width; if(width !== 0) @@ -1859,7 +1859,7 @@ this.scale.x = 1; } - + this._width = value; } }); @@ -2008,7 +2008,7 @@ throw new Error('getChildAt: Supplied index '+ index +' does not exist in the child list, or the supplied DisplayObject must be a child of the caller'); } return this.children[index]; - + }; /** @@ -2022,7 +2022,7 @@ { var index = this.children.indexOf( child ); if(index === -1)return; - + return this.removeChildAt( index ); }; @@ -2130,13 +2130,13 @@ for(var i=0,j=this.children.length; i https://github.com/mattdesl/ * for creating the original pixi version! * Also a thanks to https://github.com/bchevalier for tweaking the tint and alpha so that they now share 4 bytes on the vertex buffer - * + * * Heavily inspired by LibGDX's WebGLSpriteBatch: * https://github.com/libgdx/libgdx/blob/master/gdx/src/com/badlogic/gdx/graphics/g2d/WebGLSpriteBatch.java */ @@ -8975,7 +8975,7 @@ * @type Uint16Array */ this.indices = new PIXI.Uint16Array(numIndices); - + /** * @property lastIndexCount * @type Number @@ -9115,7 +9115,7 @@ { var texture = sprite.texture; - //TODO set blend modes.. + //TODO set blend modes.. // check texture.. if(this.currentBatchSize >= this.size) { @@ -9133,7 +9133,7 @@ var aY = sprite.anchor.y; var w0, w1, h0, h1; - + if (texture.trim) { // if the sprite is trimmed then we need to add the extra space before transforming the sprite coords.. @@ -9156,7 +9156,7 @@ } var index = this.currentBatchSize * 4 * this.vertSize; - + var resolution = texture.baseTexture.resolution; var worldTransform = sprite.worldTransform; @@ -9207,7 +9207,7 @@ positions[index+15] = a * w1 + c * h0 + tx; positions[index+16] = d * h0 + b * w1 + ty; } - + // uv positions[index+2] = uvs.x0; positions[index+3] = uvs.y0; @@ -9236,7 +9236,7 @@ /** * Renders a TilingSprite using the spriteBatch. -* +* * @method renderTilingSprite * @param sprite {TilingSprite} the tilingSprite to render */ @@ -9329,7 +9329,7 @@ positions[index++] = uvs.y1; // color colors[index++] = color; - + // xy positions[index++] = a * w0 + c * h0 + tx; positions[index++] = d * h0 + b * w0 + ty; @@ -9386,7 +9386,7 @@ gl.vertexAttribPointer(shader.colorAttribute, 4, gl.UNSIGNED_BYTE, true, stride, 4 * 4); } - // upload the verts to the buffer + // upload the verts to the buffer if(this.currentBatchSize > ( this.size * 0.5 ) ) { gl.bufferSubData(gl.ARRAY_BUFFER, 0, this.vertices); @@ -9410,7 +9410,7 @@ var sprite; for (var i = 0, j = this.currentBatchSize; i < j; i++) { - + sprite = this.sprites[i]; nextTexture = sprite.texture.baseTexture; @@ -9437,7 +9437,7 @@ if( shaderSwap ) { currentShader = nextShader; - + shader = currentShader.shaders[gl.id]; if(!shader) @@ -9455,7 +9455,7 @@ this.renderSession.shaderManager.setShader(shader); if(shader.dirty)shader.syncUniforms(); - + // both thease only need to be set if they are changing.. // set the projection var projection = this.renderSession.projection; @@ -9503,7 +9503,7 @@ // now draw those suckas! gl.drawElements(gl.TRIANGLES, size * 6, gl.UNSIGNED_SHORT, startIndex * 6 * 2); - + // increment the draw count this.renderSession.drawCount++; }; @@ -9527,24 +9527,24 @@ /** * Destroys the SpriteBatch. -* +* * @method destroy */ PIXI.WebGLSpriteBatch.prototype.destroy = function() { this.vertices = null; this.indices = null; - + this.gl.deleteBuffer( this.vertexBuffer ); this.gl.deleteBuffer( this.indexBuffer ); - + this.currentBaseTexture = null; - + this.gl = null; }; /** * @author Mat Groves - * + * * Big thanks to the very clever Matt DesLauriers https://github.com/mattdesl/ * for creating the original pixi version! * @@ -9595,7 +9595,7 @@ * @type Uint16Array */ this.indices = new PIXI.Uint16Array(numIndices); - + /** * @property vertexBuffer * @type Object @@ -9641,7 +9641,7 @@ * @type BaseTexture */ this.currentBaseTexture = null; - + /** * @property currentBlendMode * @type Number @@ -9653,7 +9653,7 @@ * @type Object */ this.renderSession = null; - + /** * @property shader * @type Object @@ -9728,19 +9728,19 @@ var sprite = children[0]; // if the uvs have not updated then no point rendering just yet! - + // check texture. if(!sprite.texture._uvs)return; - + this.currentBaseTexture = sprite.texture.baseTexture; - + // check blend mode if(sprite.blendMode !== this.renderSession.blendModeManager.currentBlendMode) { this.flush(); this.renderSession.blendModeManager.setBlendMode(sprite.blendMode); } - + for(var i=0,j= children.length; i ( this.size * 0.5 ) ) { gl.bufferSubData(gl.ARRAY_BUFFER, 0, this.vertices); @@ -9918,10 +9918,10 @@ gl.bufferSubData(gl.ARRAY_BUFFER, 0, view); } - + // now draw those suckas! gl.drawElements(gl.TRIANGLES, this.currentBatchSize * 6, gl.UNSIGNED_SHORT, 0); - + // then reset the batch! this.currentBatchSize = 0; @@ -9968,7 +9968,7 @@ gl.vertexAttribPointer(this.shader.aRotation, 1, gl.FLOAT, false, stride, 6 * 4); gl.vertexAttribPointer(this.shader.aTextureCoord, 2, gl.FLOAT, false, stride, 7 * 4); gl.vertexAttribPointer(this.shader.colorAttribute, 1, gl.FLOAT, false, stride, 9 * 4); - + }; /** @@ -9986,7 +9986,7 @@ * @type Array */ this.filterStack = []; - + /** * @property offsetX * @type Number @@ -10004,8 +10004,8 @@ /** * Initialises the context and the properties. -* -* @method setContext +* +* @method setContext * @param gl {WebGLContext} the current WebGL drawing context */ PIXI.WebGLFilterManager.prototype.setContext = function(gl) @@ -10018,8 +10018,8 @@ /** * @method begin -* @param renderSession {RenderSession} -* @param buffer {ArrayBuffer} +* @param renderSession {RenderSession} +* @param buffer {ArrayBuffer} */ PIXI.WebGLFilterManager.prototype.begin = function(renderSession, buffer) { @@ -10034,7 +10034,7 @@ /** * Applies the filter and adds it to the current filter stack. -* +* * @method pushFilter * @param filterBlock {Object} the filter that will be pushed to the current filter stack */ @@ -10110,7 +10110,7 @@ /** * Removes the last filter from the filter stack and doesn't return it. -* +* * @method popFilter */ PIXI.WebGLFilterManager.prototype.popFilter = function() @@ -10264,7 +10264,7 @@ // bind the buffer gl.bindFramebuffer(gl.FRAMEBUFFER, buffer ); - // set the blend mode! + // set the blend mode! //gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA) // set texture @@ -10287,7 +10287,7 @@ /** * Applies the filter to the specified area. -* +* * @method applyFilterPass * @param filter {AbstractFilter} the filter that needs to be applied * @param filterArea {Texture} TODO - might need an update @@ -10348,7 +10348,7 @@ /** * Initialises the shader buffers. -* +* * @method initShaderBuffers */ PIXI.WebGLFilterManager.prototype.initShaderBuffers = function() @@ -10396,7 +10396,7 @@ /** * Destroys the filter and removes it from the filter stack. -* +* * @method destroy */ PIXI.WebGLFilterManager.prototype.destroy = function() @@ -10404,7 +10404,7 @@ var gl = this.gl; this.filterStack = null; - + this.offsetX = 0; this.offsetY = 0; @@ -10412,7 +10412,7 @@ for (var i = 0; i < this.texturePool.length; i++) { this.texturePool[i].destroy(); } - + this.texturePool = null; //destroy buffers.. @@ -10476,7 +10476,7 @@ this.renderBuffer = gl.createRenderbuffer(); gl.bindRenderbuffer(gl.RENDERBUFFER, this.renderBuffer); gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.DEPTH_STENCIL_ATTACHMENT, gl.RENDERBUFFER, this.renderBuffer); - + this.resize(width, height); }; @@ -10484,13 +10484,13 @@ /** * Clears the filter texture. -* +* * @method clear */ PIXI.FilterTexture.prototype.clear = function() { var gl = this.gl; - + gl.clearColor(0,0,0, 0); gl.clear(gl.COLOR_BUFFER_BIT); }; @@ -10520,7 +10520,7 @@ /** * Destroys the filter texture. -* +* * @method destroy */ PIXI.FilterTexture.prototype.destroy = function() @@ -10638,7 +10638,7 @@ var context = renderSession.context; context.save(); - + var cacheAlpha = maskData.alpha; var transform = maskData.worldTransform; @@ -10685,8 +10685,8 @@ /** * Basically this method just needs a sprite and a color and tints the sprite with the given color. - * - * @method getTintedTexture + * + * @method getTintedTexture * @static * @param sprite {Sprite} the sprite to tint * @param color {Number} the color to use to tint the sprite with @@ -10699,14 +10699,14 @@ color = PIXI.CanvasTinter.roundColor(color); var stringColor = "#" + ("00000" + ( color | 0).toString(16)).substr(-6); - + texture.tintCache = texture.tintCache || {}; if(texture.tintCache[stringColor]) return texture.tintCache[stringColor]; // clone texture.. var canvas = PIXI.CanvasTinter.canvas || document.createElement("canvas"); - + //PIXI.CanvasTinter.tintWithPerPixel(texture, stringColor, canvas); PIXI.CanvasTinter.tintMethod(texture, color, canvas); @@ -10730,7 +10730,7 @@ /** * Tint a texture using the "multiply" operation. - * + * * @method tintWithMultiply * @static * @param texture {Texture} the texture to tint @@ -10747,9 +10747,9 @@ canvas.height = crop.height; context.fillStyle = "#" + ("00000" + ( color | 0).toString(16)).substr(-6); - + context.fillRect(0, 0, crop.width, crop.height); - + context.globalCompositeOperation = "multiply"; context.drawImage(texture.baseTexture.source, @@ -10777,7 +10777,7 @@ /** * Tint a texture using the "overlay" operation. - * + * * @method tintWithOverlay * @static * @param texture {Texture} the texture to tint @@ -10792,7 +10792,7 @@ canvas.width = crop.width; canvas.height = crop.height; - + context.globalCompositeOperation = "copy"; context.fillStyle = "#" + ("00000" + ( color | 0).toString(16)).substr(-6); context.fillRect(0, 0, crop.width, crop.height); @@ -10807,13 +10807,13 @@ 0, crop.width, crop.height); - + //context.globalCompositeOperation = "copy"; }; /** * Tint a texture pixel per pixel. - * + * * @method tintPerPixel * @static * @param texture {Texture} the texture to tint @@ -10828,7 +10828,7 @@ canvas.width = crop.width; canvas.height = crop.height; - + context.globalCompositeOperation = "copy"; context.drawImage(texture.baseTexture.source, crop.x, @@ -10859,7 +10859,7 @@ /** * Rounds the specified color according to the PIXI.CanvasTinter.cacheStepsPerColorChannel. - * + * * @method roundColor * @static * @param color {number} the color to round, should be a hex color @@ -10880,7 +10880,7 @@ /** * Number of steps which will be used as a cap when rounding colors. * - * @property cacheStepsPerColorChannel + * @property cacheStepsPerColorChannel * @type Number * @static */ @@ -10906,7 +10906,7 @@ /** * The tinting method that will be used. - * + * * @method tintMethod * @static */ @@ -11077,7 +11077,7 @@ }; this.mapBlendModes(); - + this.resize(width, height); if("imageSmoothingEnabled" in this.context) @@ -11116,7 +11116,7 @@ this.context.fillStyle = "black"; this.context.clear(); } - + if (this.clearBeforeRender) { if (this.transparent) @@ -11129,7 +11129,7 @@ this.context.fillRect(0, 0, this.width , this.height); } } - + this.renderDisplayObject(stage); // run interaction! @@ -11290,7 +11290,7 @@ this.updateGraphicsTint(graphics); graphics.dirty = false; } - + for (var i = 0; i < graphics.graphicsData.length; i++) { @@ -11486,9 +11486,9 @@ if(data.type === PIXI.Graphics.POLY) { context.beginPath(); - + var points = shape.points; - + context.moveTo(points[0], points[1]); for (var j=1; j < points.length/2; j++) @@ -11546,7 +11546,7 @@ } else if (data.type === PIXI.Graphics.RREC) { - + var pts = shape.points; var rx = pts[0]; var ry = pts[1]; @@ -11590,7 +11590,7 @@ /* var colorR = (fillColor >> 16 & 0xFF) / 255; var colorG = (fillColor >> 8 & 0xFF) / 255; - var colorB = (fillColor & 0xFF) / 255; + var colorB = (fillColor & 0xFF) / 255; colorR *= tintR; colorG *= tintG; @@ -11600,15 +11600,15 @@ colorR = (lineColor >> 16 & 0xFF) / 255; colorG = (lineColor >> 8 & 0xFF) / 255; - colorB = (lineColor & 0xFF) / 255; + colorB = (lineColor & 0xFF) / 255; colorR *= tintR; colorG *= tintG; colorB *= tintB; - lineColor = ((colorR*255 << 16) + (colorG*255 << 8) + colorB*255); + lineColor = ((colorR*255 << 16) + (colorG*255 << 8) + colorB*255); */ - + // super inline cos im an optimization NAZI :) data._fillTint = (((fillColor >> 16 & 0xFF) / 255 * tintR*255 << 16) + ((fillColor >> 8 & 0xFF) / 255 * tintG*255 << 8) + (fillColor & 0xFF) / 255 * tintB*255); data._lineTint = (((lineColor >> 16 & 0xFF) / 255 * tintR*255 << 16) + ((lineColor >> 8 & 0xFF) / 255 * tintG*255 << 8) + (lineColor & 0xFF) / 255 * tintB*255); @@ -11623,7 +11623,7 @@ /** * The Graphics class contains methods used to draw primitive shapes such as lines, circles and rectangles to the display, and color and fill them. - * + * * @class Graphics * @extends DisplayObjectContainer * @constructor @@ -11685,7 +11685,7 @@ * @default PIXI.blendModes.NORMAL; */ this.blendMode = PIXI.blendModes.NORMAL; - + /** * Current path * @@ -11694,7 +11694,7 @@ * @private */ this.currentPath = null; - + /** * Array containing some WebGL-related properties used by the WebGL renderer. * @@ -11724,7 +11724,7 @@ /** * Used to detect if the graphics object has changed. If this is set to true then the graphics object will be recalculated. - * + * * @property dirty * @type Boolean * @private @@ -11733,7 +11733,7 @@ /** * Used to detect if the webgl graphics object has changed. If this is set to true then the graphics object will be recalculated. - * + * * @property webGLDirty * @type Boolean * @private @@ -11742,7 +11742,7 @@ /** * Used to detect if the cached sprite object needs to be updated. - * + * * @property cachedSpriteDirty * @type Boolean * @private @@ -11815,7 +11815,7 @@ this.currentPath.lineWidth = this.lineWidth; this.currentPath.lineColor = this.lineColor; this.currentPath.lineAlpha = this.lineAlpha; - + } return this; @@ -11880,7 +11880,7 @@ n = 20, points = this.currentPath.shape.points; if(points.length === 0)this.moveTo(0, 0); - + var fromX = points[points.length-2]; var fromY = points[points.length-1]; @@ -11936,7 +11936,7 @@ var fromX = points[points.length-2]; var fromY = points[points.length-1]; - + var j = 0; for (var i=1; i<=n; i++) @@ -11949,11 +11949,11 @@ t2 = j * j; t3 = t2 * j; - + points.push( dt3 * fromX + 3 * dt2 * j * cpX + 3 * dt * t2 * cpX2 + t3 * toX, dt3 * fromY + 3 * dt2 * j * cpY + 3 * dt * t2 * cpY2 + t3 * toY); } - + this.dirty = true; return this; @@ -11961,7 +11961,7 @@ /* * The arcTo() method creates an arc/curve between two tangents on the canvas. - * + * * "borrowed" from https://code.google.com/p/fxcanvas/ - thanks google! * * @method arcTo @@ -12066,7 +12066,7 @@ this.moveTo(startX, startY); points = this.currentPath.shape.points; } - + if (startAngle === endAngle)return this; if( !anticlockwise && endAngle <= startAngle ) @@ -12088,7 +12088,7 @@ var cTheta = Math.cos(theta); var sTheta = Math.sin(theta); - + var segMinus = segs - 1; var remainder = ( segMinus % 1 ) / segMinus; @@ -12097,7 +12097,7 @@ { var real = i + remainder * i; - + var angle = ((theta) + startAngle + (theta2 * real)); var c = Math.cos(angle); @@ -12156,7 +12156,7 @@ /** * Draws a rectangle. - * + * * @method drawRect * * @param x {Number} The X coord of the top-left of the rectangle @@ -12174,7 +12174,7 @@ /** * Draws a rounded rectangle. - * + * * @method drawRoundedRect * * @param x {Number} The X coord of the top-left of the rectangle @@ -12270,16 +12270,16 @@ resolution = resolution || 1; var bounds = this.getBounds(); - + var canvasBuffer = new PIXI.CanvasBuffer(bounds.width * resolution, bounds.height * resolution); - + var texture = PIXI.Texture.fromCanvas(canvasBuffer.canvas, scaleMode); texture.baseTexture.resolution = resolution; canvasBuffer.context.scale(resolution, resolution); canvasBuffer.context.translate(-bounds.x,-bounds.y); - + PIXI.CanvasGraphics.renderGraphics(this, canvasBuffer.context); return texture; @@ -12289,7 +12289,7 @@ * Renders the object using the WebGL renderer * * @method _renderWebGL -* @param renderSession {RenderSession} +* @param renderSession {RenderSession} * @private */ PIXI.Graphics.prototype._renderWebGL = function(renderSession) @@ -12304,7 +12304,7 @@ { this._generateCachedSprite(); - + // we will also need to update the texture on the gpu too! this.updateCachedSpriteTexture(); @@ -12324,7 +12324,7 @@ if(this._mask)renderSession.maskManager.pushMask(this._mask, renderSession); if(this._filters)renderSession.filterManager.pushFilter(this._filterBlock); - + // check blend mode if(this.blendMode !== renderSession.spriteBatch.currentBlendMode) { @@ -12332,16 +12332,16 @@ var blendModeWebGL = PIXI.blendModesWebGL[renderSession.spriteBatch.currentBlendMode]; renderSession.spriteBatch.gl.blendFunc(blendModeWebGL[0], blendModeWebGL[1]); } - + // check if the webgl graphic needs to be updated if(this.webGLDirty) { this.dirty = true; this.webGLDirty = false; } - + PIXI.WebGLGraphics.renderGraphics(this, renderSession); - + // only render if it has children! if(this.children.length) { @@ -12358,7 +12358,7 @@ if(this._filters)renderSession.filterManager.popFilter(); if(this._mask)renderSession.maskManager.popMask(this.mask, renderSession); - + renderSession.drawCount++; renderSession.spriteBatch.start(); @@ -12369,20 +12369,20 @@ * Renders the object using the Canvas renderer * * @method _renderCanvas -* @param renderSession {RenderSession} +* @param renderSession {RenderSession} * @private */ PIXI.Graphics.prototype._renderCanvas = function(renderSession) { // if the sprite is not visible or the alpha is 0 then no need to render this element if(this.visible === false || this.alpha === 0 || this.isMask === true)return; - + if(this._cacheAsBitmap) { if(this.dirty || this.cachedSpriteDirty) { this._generateCachedSprite(); - + // we will also need to update the texture this.updateCachedSpriteTexture(); @@ -12399,7 +12399,7 @@ { var context = renderSession.context; var transform = this.worldTransform; - + if(this.blendMode !== renderSession.currentBlendMode) { renderSession.currentBlendMode = this.blendMode; @@ -12535,7 +12535,7 @@ var type = data.type; var lineWidth = data.lineWidth; shape = data.shape; - + if(type === PIXI.Graphics.RECT || type === PIXI.Graphics.RREC) { @@ -12580,7 +12580,7 @@ { // POLY points = shape.points; - + for (var j = 0; j < points.length; j+=2) { @@ -12604,7 +12604,7 @@ } var padding = this.boundsPadding; - + this._localBounds.x = minX - padding; this._localBounds.width = (maxX - minX) + padding * 2; @@ -12626,7 +12626,7 @@ { var canvasBuffer = new PIXI.CanvasBuffer(bounds.width, bounds.height); var texture = PIXI.Texture.fromCanvas(canvasBuffer.canvas); - + this._cachedSprite = new PIXI.Sprite(texture); this._cachedSprite.buffer = canvasBuffer; @@ -12643,8 +12643,8 @@ // this._cachedSprite.buffer.context.save(); this._cachedSprite.buffer.context.translate(-bounds.x,-bounds.y); - - // make sure we set the alpha of the graphics to 1 for the render.. + + // make sure we set the alpha of the graphics to 1 for the render.. this.worldAlpha = 1; // now render the graphic.. @@ -12708,9 +12708,9 @@ this.currentPath = null; var data = new PIXI.GraphicsData(this.lineWidth, this.lineColor, this.lineAlpha, this.fillColor, this.fillAlpha, this.filling, shape); - + this.graphicsData.push(data); - + if(data.type === PIXI.Graphics.POLY) { data.shape.closed = this.filling; @@ -12724,7 +12724,7 @@ /** * A GraphicsData object. - * + * * @class GraphicsData * @constructor */ @@ -16847,13 +16847,13 @@ PIXI.BaseTexture = function(source, scaleMode) { /** - * The Resolution of the texture. + * The Resolution of the texture. * * @property resolution * @type Number */ this.resolution = 1; - + /** * [read-only] The width of the base texture set when the image has loaded * @@ -16874,7 +16874,7 @@ /** * The scale mode to apply when scaling this texture - * + * * @property scaleMode * @type {Number} * @default PIXI.scaleModes.LINEAR @@ -16922,7 +16922,7 @@ * * Set this to true if a mipmap of this texture needs to be generated. This value needs to be set before the texture is used * Also the texture must be a power of two size to work - * + * * @property mipmap * @type {Boolean} */ @@ -17056,7 +17056,7 @@ { gl.deleteTexture(glTexture); } - + } this._glTextures.length = 0; @@ -17151,7 +17151,7 @@ * @constructor * @param baseTexture {BaseTexture} The base texture source to create the texture from * @param [frame] {Rectangle} The rectangle frame of the texture to show - * @param [crop] {Rectangle} The area of original texture + * @param [crop] {Rectangle} The area of original texture * @param [trim] {Rectangle} Trimmed texture rectangle */ PIXI.Texture = function(baseTexture, frame, crop, trim) @@ -17327,7 +17327,7 @@ this.frame.width = this.trim.width; this.frame.height = this.trim.height; } - + if (this.valid) this._updateUvs(); }; @@ -17345,7 +17345,7 @@ var frame = this.crop; var tw = this.baseTexture.width; var th = this.baseTexture.height; - + this._uvs.x0 = frame.x / tw; this._uvs.y0 = frame.y / th; @@ -17666,8 +17666,8 @@ { if(!this.valid)return; //TOOD replace position with matrix.. - - //Lets create a nice matrix to apply to our display object. Frame buffers come in upside down so we need to flip the matrix + + //Lets create a nice matrix to apply to our display object. Frame buffers come in upside down so we need to flip the matrix var wt = displayObject.worldTransform; wt.identity(); wt.translate(0, this.projection.y * 2); @@ -17677,14 +17677,14 @@ // setWorld Alpha to ensure that the object is renderer at full opacity displayObject.worldAlpha = 1; - // Time to update all the children of the displayObject with the new matrix.. + // Time to update all the children of the displayObject with the new matrix.. var children = displayObject.children; for(var i=0,j=children.length; i