d13 Posted July 23, 2015 Share Posted July 23, 2015 Hello! Does anyone know why this code might be producing the error "Uncaught TypeError: this.renderer.renderDisplayObject is not a function" spriteOne = TilingSprite.fromImage("images/tile.png", 192, 192); spriteOne.position.set(0, 0); stage.addChild(spriteOne); renderTexture = new RenderTexture(192, 192); spriteTwo = new Sprite(renderTexture); spriteTwo.position.set(96, 96); stage.addChild(spriteTwo); renderTexture.render(spriteOne); Quote Link to comment Share on other sites More sharing options...
xerver Posted July 23, 2015 Share Posted July 23, 2015 That isn't how you create a render texture http://pixijs.github.io/docs/PIXI.RenderTexture.html **Edit** Whoa, the example on that page is wrong. Don't look at that. Just look at the docs above it.renderTexture = new RenderTexture(renderer, 192, 192); Quote Link to comment Share on other sites More sharing options...
d13 Posted July 23, 2015 Author Share Posted July 23, 2015 That isn't how you create a render texture http://pixijs.github.io/docs/PIXI.RenderTexture.html **Edit** Whoa, the example on that page is wrong. Don't look at that. Just look at the docs above it.Thanks Xerver!!I stupidly didn't realize the API had changed from v2. ..oops Oh, and that also explains why I couldn't get that example code working from the docs. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.