lordnoriyuki

Members
  • Content Count

    2
  • Joined

  • Last visited

About lordnoriyuki

  • Rank
    Newbie

Profile Information

  • Gender
    Not Telling
  1. That doesn't seem to work either: var imageTexture = PIXI.Texture.fromImage("image.png"); var renderTexture = new PIXI.RenderTexture(1024, 1024); var imageSprite = new PIXI.Sprite(imageTexture); renderTexture.render(imageSprite); var subTexture = new PIXI.Texture(renderTexture.baseTexture, new PIXI.Rectangle(0, 0, 1024, 1024)); var subSprite = new PIXI.Sprite(subTexture); stage.addChild(subSprite); renderer.render(stage); Nothing appears. If I change renderTexture.baseTexture to imageTexture, then it works fine. -lordnoriyuki
  2. I want a subset of a RenderTexture, but this doesn't seem to work: var renderTexture = new PIXI.RenderTexture(1024, 1024);// render something into the renderTexturevar newSprite = new PIXI.Sprite(new PIXI.Texture(renderTexture, new Rectangle(0, 0, 240, 240)))// render this newSprite into a stageThe sprite with the sub-rectangle of the texture doesn't get rendered. If I do the following it works fine (whole renderTexture on a sprite): var newSprite = new PIXI.Sprite(renderTexture)If I do the following it doesn't render either (whole renderTexture, but a new texture from the renderTexture): var newSprite = new PIXI.Sprite(new PIXI.Texture(renderTexture))How do I get a sprite which has a sub texture of an existing RenderTexture? Thanks - lordnoriyuki