Skip to content
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 regarding performance #464

Open
notchris opened this issue Mar 6, 2019 · 4 comments
Open

Question regarding performance #464

notchris opened this issue Mar 6, 2019 · 4 comments
Labels

Comments

@notchris
Copy link

notchris commented Mar 6, 2019

Hello, VueGL is awesome! I've been checking out some of the options for the renderer that deal with performance. I was wondering what the recommended use for VueGL would be, in comparison to using THREE by itself. In example, if I were making a game with a level, including a decent amount of objects, I saw it was recommended to merge geometries. I know you can access the inst of objects, but would it make more sense to use the direct library in this kind of situation? I'm sorry if some of my terminology is incorrect, I'm doing my best to learn / figure out the right approach.

@h-ikeda
Copy link
Member

h-ikeda commented Mar 12, 2019

Currently, such optimizations are not supported. I'd like to implement them as component props in the future. Pull requests are Wellcome, of course.

VueGL is focusing to render static but reactive objects with lower cost. So I'm not focusing much about realtime animation. In that case, integrate vue and another library like A-Frame might be more helpful.

@notchris
Copy link
Author

Thanks for the response @h-ikeda

I was able to create a component for Convex Geometry then merge all of those, but I did experience performance issues. I understand now that VueGL is primarily for static / reactive objects.

@notchris
Copy link
Author

@h-ikeda One thing I’ve noticed is, when implementing controls that call .requestRender, the scene will render and change correctly. However, once loading more than a single .obj, or a few meshes with varied geometries, the performance tanks on basic operations. What about Vue-gl currently prevents efficient re-rendering? Is it something about the Vue state, or the draw calls? I’m trying to pinpoint which area causes the greatest performance drop in comparison to using three without Vue.

Thank you for your time!

@h-ikeda
Copy link
Member

h-ikeda commented Jun 15, 2020

@notchris Sorry I can't imagine actually what you are doing and what's going wrong without seeing examples. If you provide samples, I probably can point something.

VueGL is designed to trigger renderings only when Vue detects some changes. And I think just rendering is not a so heavy operation. It must be caused by more affected calls like re-creating much objects, unexpected repeated calls or recursive calls triggered by Vue's lifecycle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants