simpleyuji Posted January 9, 2021 Share Posted January 9, 2021 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/ Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted January 9, 2021 Share Posted January 9, 2021 > 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. Quote Link to comment Share on other sites More sharing options...
simpleyuji Posted January 9, 2021 Author Share Posted January 9, 2021 So you're saying i should set skipUpdateTransform to true then. I tried it over here https://jsfiddle.net/qdmjwst2/ but then now the texture is not being generated properly. Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted January 9, 2021 Share Posted January 9, 2021 (edited) 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 January 9, 2021 by ivan.popelyshev Quote Link to comment Share on other sites More sharing options...
Shukant Pal Posted January 9, 2021 Share Posted January 9, 2021 Can you reproduce this on PixiJS 5.4.0-RC? Quote Link to comment Share on other sites More sharing options...
simpleyuji Posted January 9, 2021 Author Share Posted January 9, 2021 (edited) 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 January 9, 2021 by simpleyuji Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.