Very low FPS with Vue

Yup exactly I was thinking of creating a sibling to this page for Babylon.js and Vue which would make @PirateJC happy as well :slight_smile:

2 Likes

Great example - one missing thing is cleanup on the event listener:

import { ..., onUnmounted } from 'vue';

...
onUnmounted(() => {
  window.removeEventListener("resize", ...);
});

I’m happy to write a TypeScript equivalent as well - I’m used to export default defineComponent({...}) for vue3. Been using more vue3 than React for the last year or so :slight_smile:

2 Likes

Yes this would be the perfect place for this! Thanks!

1 Like

Oh, yes, thanks! I am working on my first BJS project which runs on a kiosk PC which runs 24/7 and I don’t need to cleanup and I forgot to add the cleanup to the template. Feeling lame :smiley:

1 Like

Updated, thanks again! It would be cool if you could prepare the typescript version ::slight_smile: so I don’t have to (I’ve planned to do so…). There is an existing repository which already uses typescript, but it uses Quasar/Vue2, but the BJS specific code is the same, so feel free to grab that part from this repository:

2 Likes

Ok, let’s do it!

2 Likes

Ok guys, so for anyone interested in this thread’s @babylonjs197’s problem: it is solved, his model performed very poorly in BJS but a simple join all meshes in Blender solved the situation. It’s quite a good practice to join the meshes which doesn’t need to be operated separatelly (moving them, picking them, etc…) for performance reasons.

4 Likes

Hi there! Any pointers how and where should I start?
Thank you!

@PirateJC should be able to provide all the guidance and the repo is here : GitHub - BabylonJS/Documentation: Babylon.js's documentation website

1 Like

The structure.json is the main file that houses the organizational structure of the docs. And then of course there’s a unique .md file for each doc page.

If you use the page that @brianzinn provided as a starting template/example, that’s probably the best thing to start with:

You could start by copying the .md file for this page and renaming it as BabylonJS_and_Vue.md or something like that.

Then update and change the content accordingly (Friendly note to make sure you fill out the header information)

Then add your file to the structure.json and then you should be good to go.

Feel free to PM me directly if you have further questions.

Ok, thank you!