Support that cache Sprite as Bitmap directly. (#3855)
* Cache Sprite as Bitmap directly.

In the current pixi.js , when we want to cache a sprite as Bitmap, we have to put the sprite add to a container , like this : 
```
var texture = PIXI.Texture.from(img);
var container = new PIXI.Container();
var sprite = new PIXI.Sprite(texture);
sprite.cacheAsBitmap = true;
container.addChild(sprite);
var renderTexture = PIXI.RenderTexture.create(sprite.width, sprite.height);
renderer.render(container, renderTexture);
```

With this PR , use could cache the sprite directly : 
```
var texture = PIXI.Texture.from(img);
var sprite = new PIXI.Sprite(texture);
sprite.cacheAsBitmap = true;
var renderTexture = PIXI.RenderTexture.create(sprite.width, sprite.height);
renderer.render(sprite, renderTexture);
```

* Update cacheAsBitmap.js
1 parent b4189e9 commit 367500aff0cc238ce3314425e0e08dd020a76c1a
@finscn finscn authored on 22 Mar 2017
Matt Karl committed on 22 Mar 2017
Showing 1 changed file
View
src/extras/cacheAsBitmap.js