Big-Bee-Network / UCSB-IZC00012194

create animated gif of bee specimen using UCSB ICZ, preston, ffmpeg, and friends
https://big-bee-network.github.io/UCSB-IZC00012194
Creative Commons Zero v1.0 Universal
3 stars 0 forks source link

package 3d model along with https://github.com/kovacsv/Online3DViewer to produce a publication with built-in webviewer #5

Open jhpoelen opened 1 year ago

jhpoelen commented 1 year ago

Currently, 3d model files like OBJ are included.

However, external tools are needed to view them, so access is not straight forward.

Suggest to use libraries like https://github.com/kovacsv/Online3DViewer along with a web-based application to package a publication with a built-in viewer.

@seltmann

jhpoelen commented 1 year ago

using firefox,

with about:config security.fileuri.strict_origin_policy False

and o3dv.min.js and

<!DOCTYPE html>
<html>
  <head>
    <script type="text/javascript" src="o3dv.min.js"></script>
    <script type="text/javascript">
      window.addEventListener ('load', () => {
        // set the location of the external libraries

        // get the parent element of the viewer
        let parentDiv = document.getElementById ('viewer');

        // initialize the viewer with the parent element and some parameters
        let viewer = new OV.EmbeddedViewer (parentDiv, {});

        // load a model providing model urls
        viewer.LoadModelFromUrlList ([
          'UCSB-IZC00012194.obj',
          'UCSB-IZC00012194.mtl'
        ]);
});
    </script>

  </head>
  <body>
    <div id="viewer"/>
  </body>
</html>

Screenshot from 2023-01-12 17-08-47

jhpoelen commented 1 year ago

and now deployed via github pages at

https://big-bee-network.github.io/UCSB-IZC00012194/UCSB-IZC00012194.html

jhpoelen commented 1 year ago

Now also deployed via linker.bio -

https://linker.bio/hash://sha256/ac1ace9d481d175a891fc48687fb95261652da2fe48a534b87188efb6c7f9cb0