simpleyuji

render skipUpdateTransform confusing

Recommended Posts

I'm confused on how to use app.renderer.render(displayObject, renderTexture, clear, transform, skipUpdateTransform) properly. I have a case wherein when i use skipUpdateTransform = false, the texture of the container is generated correctly, but the app.stage is frozen. This means when I try to focus the camera somewhere else on the stage by changing its x,y position (i.e app.stage.position.x = 100), it doesnt respond to it at all. I'm trying to reproduce it on a fiddle, but I havent been able to reproduce it yet. The fiddle i have below is one where rendertexture is generated properly using skipUpdateTransform false, but the the stage is not freezing somehow. I'll try to create a fiddle that recreates my problem

 

https://jsfiddle.net/6ek7fo2p/9/

Share this post


Link to post
Share on other sites

This means when I try to focus the camera somewhere else on the stage by changing its x,y position (i.e app.stage.position.x = 100), it doesnt respond to it at all. 


You removed updtaeTransform, now it doesnt work. What were you expecting?

skipUpdateTransform usually used when you are sure its already done or you supply "transform" to move camera. This is also under-developed way, in v4 and v5 i have no guarantee that it works with filters and masks. We are going to fix it in v6.

Share this post


Link to post
Share on other sites

oh, its FALSE, sorry i misread. Yeah, its false by default. It should work. Usually i recommend people who use v4/v5 and not the latest dev just NOT to use generateTexture in those cases. Manually get localBounds, move element, create renderTexture, call renderer.render, e.t.c. , so you are in control of everything and can go through bugs. Because there were many bugs in those places. We still are not sure we found them all.

 

Thanks for demo, i can check it.. next week maybe, but anyway i'll post link to this thread in pixijs slack

Edited by ivan.popelyshev

Share this post


Link to post
Share on other sites

Nope. I realized this only happens in canvas mode which version 5 doesnt support. In my original code, i changed forceCanvas to false, and it fixed the problem. I do have graphics.generateTexture being called in my code. Maybe that's the culprit like ivan has mentioned. I might try replacing my graphics generateTexture calls with manual renderer.render

 

In this specific example, https://jsfiddle.net/m7Lsynbj/3/ the generateTexture call freezes the stage and can no longer be moved.

Edited by simpleyuji

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.

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

  • Recently Browsing   0 members

    No registered users viewing this page.