Jump to content

[PIXI] RenderTexture error


Recommended Posts



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);
Link to comment
Share on other sites


That isn't how you create a render texture :)




**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  :P


Oh, and that also explains why I couldn't get that example code working from the docs.

Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...