Jump to content

BaseRenderTexture Documentation Errors


Taz
 Share

Recommended Posts

There's some mistakes in the documentation for PIXI.BaseRenderTexture. The first example at the top of the page ends with this line: "baseRenderTexture.render(sprite);"

But PIXI.BaseRenderTexture doesn't have the method "render" so the example doesn't work. It should use the renderer.render method, like the second example.

Also, at the end of the second example there's a comment that says "Renders to center of RenderTexture", but really it renders the sprite to the top left of the RenderTexture, since the sprite's transform is reset before rendering. It's the first example that renders the sprite to the center of the RenderTexture. This mistake shows up again in the documentation for PIXI.RenderTexture.

And another mistake in BaseRenderTexture's documentation is in the first example, the constructor is called like this: "PIXI.BaseRenderTexture(renderer, 800, 600)".

But renderer isn't a parameter of the constructor so this example doubly doesn't work.

All in all a bit confusing, and I wouldn't want anyone else going in circles with this, so hopefully the documentation can get fixed.

EDIT: *Yawn* hopefully this makes sense, I'm pretty tired but wanted to write this up before I go to bed and forget about it ;)

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.

Guest
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.

Loading...
 Share

  • Recently Browsing   0 members

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