Skip to content

Commit 4f87c7d

Browse files
committed
Updated docs and frame source checks
1 parent b612d03 commit 4f87c7d

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/textures/TextureManager.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,10 @@ var TextureManager = new Class({
289289
* Gets an existing texture frame and converts it into a base64 encoded image and returns the base64 data.
290290
*
291291
* You can also provide the image type and encoder options.
292+
*
293+
* This will only work with bitmap based texture frames, such as those created from Texture Atlases.
294+
* It will not work with GL Texture objects, such as Shaders, or Render Textures. For those please
295+
* see the WebGL Snapshot function instead.
292296
*
293297
* @method Phaser.Textures.TextureManager#getBase64
294298
* @since 3.12.0
@@ -309,7 +313,7 @@ var TextureManager = new Class({
309313

310314
var textureFrame = this.getFrame(key, frame);
311315

312-
if (textureFrame)
316+
if (textureFrame && !textureFrame.source.isRenderTexture && !textureFrame.source.isGLTexture)
313317
{
314318
var cd = textureFrame.canvasData;
315319

0 commit comments

Comments
 (0)