Jump to content

Using Babylon with Vue


freetoplay
 Share

Recommended Posts

I don't think that loaders and events are supported either, but it's the only Vue lib that I know of.  I'm assuming by events that you want to know progress/loaded/error, so just wanted to point you to similar code, if it will help.  It ends up looking like this (in React not Vue?

<Scene>
  ...
  <Model
    rootUrl={`${baseUrl}BoomBox/glTF/`}
    sceneFilename="BoomBox.gltf"
    onModelLoaded={(modelProps, context) => {
      console.log('on model loaded:', modelProps)
    }}
  />
</Scene>

that console.log looks like this, so you have access to meshes, particle systems, animations, skeletons:
image.thumb.png.c000969af608b505946eb86d535eef9e.png

You can copy whatever you need for your own vue component from here:
https://github.com/brianzinn/react-babylonjs/blob/master/src/Model.ts

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...