Skip to content

Add configuration to replace dependencies through jsdelivr #494

Open
@raffaeldp

Description

@raffaeldp

Hello,
I am currently using the Online3DViewer library to implement a 3D file viewer on a web project.
This file viewer should be working with as many 3D file format as possible. That's why I choose this library because it is the best I found and it is working very smoothly.

However, I'm running trough some issues with two functions in importerutils.js :
CreateOcctWorker and LoadExternalLibrary.

Theses two functions are importing some libraries via the jsdelivr CDN.

However, this is an issue for my app, because we need to have the hand on all the dependencies, and can't put them in an outsourced CDN, as it is blocked by security policies.

I have read in an other issue that this choice has been made because serving the whole occt / rhino3dm / draco_decoder libs was too expensive, and I totally understand that. But it would be really nice to have some sort of configuration for that, maybe the same way as it is done with the SetExternalLibLocation, but for theses dependencies too.

Is there already a way to do that ?

If not, can we discuss of a way to implement such a thing ?
If you don't have time to implement it yourself I can totally do it and propose a new Pull Request for that.

I have tried to monkeypatch the functions directly in my codebase but without great success. Last solution I will have is fork the project and change it directly inside, but I prefer trying to contribute to the main lib directly, if possible.

Thank you for reading 🤠

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions