kovacsv / Online3DViewer

A solution to visualize and explore 3D models in your browser.
https://3dviewer.net
MIT License
2.57k stars 548 forks source link

Use CDN for third-party libraries #463

Closed kovacsv closed 7 months ago

kovacsv commented 7 months ago

To reduce server cost and increase portability.

kovacsv commented 7 months ago

Except web-ifc for now: #464.

ETNyx commented 6 months ago

Hello @kovacsv , is it possible to force viewer use locally libs like in 0.12.0 instead of CDN?

Reasoning:

kovacsv commented 6 months ago

@ETNyx for the official version I prefer to use them from CDN to reduce server costs. It's possible to create your own version though by replacing library loading with the previous version, but currently we don't plan to officially support this method in the future.

ETNyx commented 6 months ago

Ok, you mean make own fork? I already solved it for myself.

Maybe look to install guide, i think it's quite confusing for newcomers like myself:

https://kovacsv.github.io/Online3DViewer/Page_Usage.html

window.addEventListener ('load', () => {
    // tell the engine where to find the libs folder
    OV.SetExternalLibLocation ('libs'); //<--------------------------
    // init all viewers on the page
    OV.Init3DViewerElements ();
});

Anyway thanks, your work is awesome :+1:

kovacsv commented 6 months ago

This is still needed because of web-ifc, but hopefully it can be removed in the future. 🙂