diff --git a/src/core/textures/RenderTexture.js b/src/core/textures/RenderTexture.js index 9cf5a8e..a668f11 100644 --- a/src/core/textures/RenderTexture.js +++ b/src/core/textures/RenderTexture.js @@ -243,13 +243,14 @@ return; } + //TODO this should be true by default updateTransform = !!updateTransform; this.textureBuffer.transform = matrix; // setWorld Alpha to ensure that the object is renderer at full opacity - displayObject.worldAlpha = 1; + displayObject.worldAlpha = displayObject.alpha; if (updateTransform) { diff --git a/src/core/textures/RenderTexture.js b/src/core/textures/RenderTexture.js index 9cf5a8e..a668f11 100644 --- a/src/core/textures/RenderTexture.js +++ b/src/core/textures/RenderTexture.js @@ -243,13 +243,14 @@ return; } + //TODO this should be true by default updateTransform = !!updateTransform; this.textureBuffer.transform = matrix; // setWorld Alpha to ensure that the object is renderer at full opacity - displayObject.worldAlpha = 1; + displayObject.worldAlpha = displayObject.alpha; if (updateTransform) { diff --git a/src/extras/cacheAsBitmap.js b/src/extras/cacheAsBitmap.js index 1185599..eb039c0 100644 --- a/src/extras/cacheAsBitmap.js +++ b/src/extras/cacheAsBitmap.js @@ -85,10 +85,11 @@ // first we flush anything left in the renderer (otherwise it would get rendered to the cached texture) renderer.currentRenderer.flush(); - + //this.filters= []; // next we find the dimensions of the untransformed object // this function also calls updatetransform on all its children as part of the measuring. This means we don't need to update the transform again in this function - var bounds = this.getLocalBounds(); + // TODO pass an object to clone too? saves having to create a new one each time! + var bounds = this.getLocalBounds().clone(); // for now we cache the current renderTarget that the webGL renderer is currently using. // this could be more elegent..