• Content Count

  • Joined

  • Last visited

  1. Thanks Ivan. It looks like the way to create a RenderTexture is by creating a sprite for each layer (including the initial "base" layer that the others will be added to): const dynamicTexture = PIXI.RenderTexture.create(130, 65), baseSprite = new PIXI.Sprite(resources.base.texture), layerSprite1 = new PIXI.Sprite(resources.layer1.texture), layerSprite2 = new PIXI.Sprite(resources.layer2.texture); app.renderer.render(baseSprite, dynamicTexture, true); app.renderer.render(layerSprite1, dynamicTexture, false); app.renderer.render(layerSprite2, dynamicTexture, false); Any way to bypass sprite creation and just use the texture directly, or is this the most efficient way to do this?
  2. I have several textures created from PNG's (with transparency), and I would like to layer them onto a sprite so that they would effectively create one "combined texture". The problem is the Sprite object only takes a single texture. The reason I do not want to combine my textures into a single PNG file is because I want to dynamically layer different textures (using random generator functions in JS). So I think my two options, if possible, are: Create a new combined texture from the layered textures at runtime Assign multiple textures to a single sprite Is there an effective way to accomplish this?