Sign in to follow this  

How to manual render game object without using stage?

Recommended Posts

hi everyone, i want to manual render game object without using stage. In basic example, i didnt add bunn sprite into stage, and add render call in update (app.renderer.render(bunny)), but nothing show :(. 

here is my try:

thanks you all

Share this post

Link to post
Share on other sites

Because Pixi Application renders Stage just after update and it hides your bunny. Look in this article: , everything except "interactionManager" part is true. In your case, you'll have problem with interaction anyway.

As for rendering single elements step-by-step, @finscn is an expert on that. One of his threads: Just search by his name in issues and you'll see enough material to understand that trick. However, i also recommend to read "Application" "WebGLRenderer" and "Container" class sources.


Share this post

Link to post
Share on other sites

Thanks for your reply. Here is my next try

1. instead of adding bunny into stage, i use a empty container:

// create a containter to add bunny
var dummyContainer = new PIXI.Container();
// add bunny

2. in update function, i call updateTransform and render manual

// manual update and render

Here is full source code:

It is ok with WebGL, but i still have same problem if application use Canvas render. Do you have any idea about this?


Share this post

Link to post
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.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.