Skip to content

Failed to import model (failed to load occt-import-js) #376

Description

@GitHubDragonFly

Hi Viktor.

I went about experimenting and creating a simple online viewer by using the Online 3D Viewer engine.
This viewer can be seen here: https://githubdragonfly.github.io/viewers/templates/Mobile/Quick%20Viewer.html

Its code is available in the repository but narrows down to the following for the import:

 <script src="https://cdn.jsdelivr.net/npm/online-3d-viewer@0.8.22/build/o3dv.min.js"></script>
 <script>
    // Set the external libraries location
    OV.SetExternalLibLocation( 'https://cdn.jsdelivr.net/npm/online-3d-viewer@0.8.22/libs' );

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

It all seems to be functional apart from the error mentioned in the subject line which is populated in the viewer window.

Firefox browser console shows the following error:
GEThttps://cdn.jsdelivr.net/npm/online-3d-viewer@0.8.22/libs/loaders/occt-import-js-worker.js Not same-origin

Just curious if there is anything you could suggest about making this work.

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions