You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, just found this engine and it looks amazing. I have several questions about the framework, and I appreciate any feedback.
In some areas of the code, I noticed it creates a function within a function (like the scene.modelView creates a function fnProcessEntities). Isn't this poor performance? Should this function be outside of the modelView method?
In the same scene.modelView method, I notice at the beginning it uses some of the gl-matrix methods vec4.fromValues, which basically creates a new object every time this called? Couldn't these be some property which could be updated instead?
Hopefully this last one Q isn't a tl;dr... In my game I'm creating a large plane (1024x1204) with 12 vertical and horizontal segments and a texture. The way I have the camera set up looks at this plane from an isometric view. The plane's texture is bit jaggy (kind of expected), but I don't want to simply increase the segment count. The reason I don't want to is because I see in the scene.modelView method that it loops through each vertex and does some matrix 4 calculations. A very heavy process. Do you know if this can be optimized?
Thanks in advance for your time and answers :)
The text was updated successfully, but these errors were encountered:
Phoria.js has been extensively profiled (as I perform code tuning as part of my day job often, in Java/JS with cloud-scale applications).
None of the methods you mention caused a perform hit during real-world usage. Why? Because >90% of all CPU time for phoria.js process is taken up by rendering - and it's very hard to improve that - basically the canvas methods to render the various objects are the bottleneck. Modern JS code is extremely fast and there are many optimizations in the VMs that automatically apply.
Try profiling it yourself in Chrome inspector for instance with a heavy scene. You will see rendering is most of the problem, also sorting of large scenes can come up. If you see something when profiling that is an issue then of course raise it - but I've found from experience that second-guessing performance problems without profiling is almost guaranteed to be wrong!
Unfortunately there is no easy solution for the jaggy texture problem without increasing the segment count. The rendering in phoria.js is very primitive compared to webgl.
Hello, just found this engine and it looks amazing. I have several questions about the framework, and I appreciate any feedback.
Thanks in advance for your time and answers :)
The text was updated successfully, but these errors were encountered: