Quantcast
Channel: Pixi.js Latest Topics
Viewing all articles
Browse latest Browse all 3978

Pixijs renderer generateTexture issue

$
0
0

Hi, I am trying to take a snapshot of the main container ( stage) of my application ,which I render on every frame ( customRenderer.render(stage)), and paste that snapshot on the topmost child container of the stage. The code looks like, 

const snapshot = this._customRenderer.generateTexture(this._stage)

const sprite = new Sprite(snapshot )

this._stage.getChildByName("snapshotHolder").addChild(sprite)

It takes snapshot alright, but if the stage is scaled down , the sprite even though of actual size of the stage ( lets say 1000x1000), the area covered of it by the snapshot is much less, rest of the area of the sprite is transparent. Not able to understand the logic behind this.

I want to take the snapshot of the stage as it is visible (scaled or otherwise).

Thanks for your help.

-Arin


Viewing all articles
Browse latest Browse all 3978

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>