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
I have been studying your project, to understand more about using Three.js with Vuex. I know you have build it more than a year ago, and maybe don't remember it much. But anyway, I thought of discussing some aspects of it.
I have been poking it around, trying to make it work on strict mode. Moving everything that visibly changes state to a mutation and everything, but I could not make it work, it never finishes loading the page once I activate strict mode...
When reading about strict mode on Vuex, it is said:
Do not enable strict mode when deploying for production! Strict mode runs a synchronous deep watcher on the state tree for detecting inappropriate mutations, and it can be quite expensive when you make large amount of mutations to the state. Make sure to turn it off in production to avoid the performance cost.
Maybe it never stop loading because of the expense of those deep watchers? Is the code you have now already "ok" with strict mode and state mutability only on commits? Or is it something not doable with Vuex and Three.js maybe?
Do you have any thoughts on that?
thanks!
The text was updated successfully, but these errors were encountered:
I have not tried using this code in strict mode, so I can't speak from experience here. However, I can say that even without strict mode I had a fair amount of trouble getting Three.js to work well with Vuex. It was very easy to overwhelm vuex with a large number of state change commits and bring down the whole page. My guess is that with the watcher in place this balance becomes even more tenuous.
I don't know for sure, but if I had to guess I would say that it is not possible to get Vue and Three.js working together with strict mode enabled.
This may or may not be a moot point in Vue 3, which has been implemented in PR #6. I am going to close this for now but feel free to reopen it if you would like.
Hello!
I have been studying your project, to understand more about using Three.js with Vuex. I know you have build it more than a year ago, and maybe don't remember it much. But anyway, I thought of discussing some aspects of it.
I have been poking it around, trying to make it work on strict mode. Moving everything that visibly changes state to a mutation and everything, but I could not make it work, it never finishes loading the page once I activate strict mode...
When reading about strict mode on Vuex, it is said:
Maybe it never stop loading because of the expense of those deep watchers? Is the code you have now already "ok" with strict mode and state mutability only on commits? Or is it something not doable with Vuex and Three.js maybe?
Do you have any thoughts on that?
thanks!
The text was updated successfully, but these errors were encountered: