Jump to content

Arin D

  • Content Count

  • Joined

  • Last visited

  1. it still dosent work 😞 Tried the following, but still the generated sprite has a very small area covered by the stage content snapshot. const rt = PIXI.RenderTexture.create({ width: 1000, height: 1000 }) const ss = this._customRenderer.render(this._stage, rt ) const sprite = new Sprite(ss) this._stage.getChildByName("snapshotHolder").addChild(sprite) Not sure what to do now .
  2. 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 i
  3. Thanks for the reply 🙂 if I use new PIXI.Renderer, i get error " This browser does not support WebGL. Try using the canvas renderer", where is the fallback to canvas ? i thought pixi 5 legacy maintains the fallback to canvas ? and mainContainer.toLocal(globalPos, undefined, sprite.position) did not do what i intended to do, there is also lack of sufficient documentation to get help on this, all i want is to change x and y of sprite with respect to global (world), anyway, will keep trying
  4. Hi, i have a a sprite , hierarchy as follows mainContainer.childContainer1.sprite const app = new PIXI.Application({..... const renderer = app.renderer renderer.render(mainContainer) I can find the world x and y of sprite, but how do i set those values? I mean I want to change those values with respect to canvas. Using pixi 5 legacy thanks
  • Create New...