Jump to content

Remix3D mesh mashup


brianzinn
 Share

Recommended Posts

As the last planned declarative vs non-declarative example, I have made a mesh mashup from Remix3D.  It is something like 80% complete and I'm going to leave it like this as it is primarily serving as an example and thought experiment.  The buttons with "*" have animations and are more interesting (ie: bee/fish).  I was imagining a VR portal for Remix3D as opposed to how it is now, which only allows downloading and not directly viewing in VR.  Also, even if they added that (which they could easily) - I wanted also to be able to search for meshes without leaving the VR experience.  I wanted to inspect (teleport) and search remix3D models in VR.

PG: https://www.babylonjs-playground.com/#BL921E
Declarative: https://brianzinn.github.io/create-react-app-babylonjs/meshMashup

The advantages of the declarative markup is that some implementation details can be shield from the developer (ie: linkToTransformNode() only works AFTER Gui3dManager.addControl) and other nuances related to ordering of adding GUI and also the automatically calling dispose(), so auto-cleanup of resources.  Additionally, reusable logic can be in components.  I prefer to build the GUI declaratively as it is much more intuitive.

Having said that, it did not really have as much advantage as I had hoped.  You can compare the declarative source here, if interested (https://github.com/brianzinn/create-react-app-babylonjs/blob/master/src/remixMeshMashup/index.js).

One more advantage was the HMR (Hot Module Reloading), but due to the nature of React, it was rebuilding the entire scene.  Although HMR is convenient, you need to replay state and maintain that state and have the state external to the components.  In other words, for typical game development the HMR aspect may not be so useful, but for a layout with 3D models and GUI at least it will reload in the webpage automatically with the updated changes and provides a nice developer experience.

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...