Jump to content

Pixi.js Renderer in Proton.js - Prevent clearing screen


GrodanBoll2000
 Share

Recommended Posts

As title says, I'm using the Pixi Renderer of Proton.js. I want to have the effect of not clearing the screen after every draw call, just like when I turn preserve drawing buffer to true (and renderer.autoClear = false;) in the WebGL renderer.

There's nothing like that for the Pixi renderer when I look into the Proton.js source code. I've isolated the Pixi renderer part of the Proton.js source code if someone can help me find what to change/add in order to achieve the effect i want.

Thanks.

https://gist.github.com/scummtomte/ac8dfc3ff5c5810c32891c26cd0f88b4

Link to comment
Share on other sites

http://pixijs.download/dev/docs/PIXI.WebGLRenderer.html its called clearBeforeRender. However i do not have guarantees that it works on iphone and some other devices. even on PC's it can be a problem. If you see it, try using temporary RenderTexture and render to screen from it. This is different topic and it will require from you proper research in pixi-examples repo ;)

Link to comment
Share on other sites

Thanks for your response. I got it to work by changing not the code i linked but instead, changing in the pixi.js file.

There are problems for Safari though, background is flickering like crazy between red and black even though the background should be black only (works in the other browsers). The particles moves fine till they are dead, then the drawn trace that is preserved starts to flicker like crazy a few pixels from its position to its previous position whatever direction it came from. Any ideas of how to solve or is there a better way to do draw feedback?

Thanks.

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