-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question: Rendering Multiple LWFs Html5. #53
Comments
Are you using Canvas or WebGL renderer? Add needsClear:false to loadLWF parameter. LWF doesn't clear the screen at all. So you need clear the screen yourself or set needsClear:true to the bottom LWF. |
I am using Canvas. I tried adding needsClear:false and there was no change in the result animation. Still only the last lwf gets rendered overwriting all the previous lwfs. I posted a stripped version of my code, I hope you don't mind. It might help debunk the issue.
|
I didn't check your code, but LWF should work in such case. Could you check your code using Chrome Developer Tools, add breakpoints at LWF.prototype.render and CanvasBitmapRenderer.prototype.render? |
I've tried stepping through the code with no success. lwf1.render(); Tomorrow I will be able to ask a friend who has more web dev experience to look into anything you can suggest. |
There is another option. Use Movie.attachLWF method and Movie.swapAttachedMovieDepth for z-sorting
|
Any update? |
Unfortunately not. I was not able to figure out a solution. I spent quite a bit trying. I would love for there to be a quick example demonstrating how to implement multiple lwfs with designated z orders. |
Haven't you tried this example?
you can specify the depth in attachLWF
|
Unfortunately that starts becoming a convoluted solution when I have 10 lwf objects on screen. Also it seems that in order for me to display 2 lwfs together I have to combine them, and was not able to load lwfs seperatly when needed. This may be because my lack of understanding of how lwfs work, or maybe I'm just doing things terribly wrong. When starting with LWF I was hoping to have a system that loads lwfs on demand when i need and to be able to control there position separately and their z-order on demand. Might be asking a lot for what html5 can do with lwfs. |
I've been attempting to render multiple LWFs using html5 without success for a while now.
The only result I've been able to achieve is attaching one LWF to another via ".attachLWF()", but using that technique I seem to loose the ability to sort the seperate LWFs on the z depth, so I can have the ability to determine which lwf is placed ontop of the other.
The main problem is when I try to render more then one LWF only the last lwf gets rendered.
Help would be much appreciated. The main parts of my code are: (this is just sorta pseudo code)
The text was updated successfully, but these errors were encountered: