Why node environment(vue) fps low?

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! :stuck_out_tongue_winking_eye::stuck_out_tongue_winking_eye::stuck_out_tongue_winking_eye:

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 :see_no_evil::crossed_fingers:

https://doc.babylonjs.com/communityExtensions/Babylon.js+ExternalLibraries/BabylonJS_and_Vue

https://doc.babylonjs.com/communityExtensions/Babylon.js+ExternalLibraries/BabylonJS_and_Vue/BabylonJS_and_Vue_1#vue-reactivity-friend-or-foe

As a thumb of rule never make the BabylonJS Engine or Scene object reactive.

@brightMoon And sry for the RTFM pun :stuck_out_tongue_winking_eye: :sunglasses: