Online3DViewer icon indicating copy to clipboard operation
Online3DViewer copied to clipboard

Automatic initialization in Mediawiki site

Open inddigital-xtech opened this issue 2 years ago • 2 comments

Hi, I'm trying to implement the viewer as browser-ready bundle In my local mediawiki site, and the only way I have to add Javascript code is through Common.js

I have read and applied the installation and use procedure indicated in: https://kovacsv.github.io/Online3DViewer/index.html

The problem is that these two lines are not being recognized there:

OV.SetExternalLibLocation ('libs');
OV.Init3DViewerElements ();

I guess Common.js doesn't understand what the OV object is

Can you help me please, I really appreciate it.

inddigital-xtech avatar Oct 26 '23 03:10 inddigital-xtech

Viktor will probably have a better answer for you but just in case if this might help here is how my Quick Viewer is using O3DV:

    <script src="https://cdn.jsdelivr.net/npm/[email protected]/build/engine/o3dv.min.js"></script>
    <script>
      // Set the external libraries location
      OV.SetExternalLibLocation( 'https://cdn.jsdelivr.net/npm/[email protected]/libs' );

      // Init all the 3d viewer elements.
      OV.Init3DViewerElements();
    </script>

There might be some limitations to my approach so consider this as a suggestion only.

GitHubDragonFly avatar Oct 26 '23 18:10 GitHubDragonFly

Thank you for your response, but I think the problem will persist because I don't see how to define the OV object, before referring to it in Common.css, I attach a screenshot of the browser console: imagen

inddigital-xtech avatar Nov 03 '23 03:11 inddigital-xtech