I created a npm package that depends on BabylonJS, and when I output a CommonJS version for Vue and an UMD version for HTML, I noticed a decrease in FPS (for Vue), and I compared it and found that there was a difference in GPU Time. What could be the reason for this?
Do not use Vue bidirectional binding storage for engine instances. Check if this is the reason
you probably need to use markRaw to avoid VUE creating a reactive state for babylon.
Oh my god, I didn’t even know there was this function, I learned an additional function from Vue3
1 Like
RTFM bro!
2 Likes
That’s it Very low FPS with Vue
@brightMoon No no no! Regarding the markRaw
function: Reactivity API: Advanced | Vue.js
@shencong713 we have a whole section dedicated to Vue in the docs as well
https://doc.babylonjs.com/communityExtensions/Babylon.js+ExternalLibraries/BabylonJS_and_Vue
As a thumb of rule never make the BabylonJS
Engine
orScene
object reactive.
@brightMoon And sry for the RTFM pun