Omniblox / Eagle-Loader

THREE.js Loader for EAGLE .brd files
https://omniblox.io
MIT License
19 stars 4 forks source link

Test use of GitHub-hosted map file and model files #27

Open follower opened 7 years ago

dave5 commented 7 years ago

a cursory search indicates that github pages will work ok for serving up static JSON

follower commented 7 years ago

Approaches to referencing GitHub-based files (tested with .stl files):

GitHub Raw

Requires no configuration. Probably not an "endorsed" use--although that may be a historical issue.

RawGit

https://rawgit.com/

Note: 3rd Party service not run by GitHub.

GitHub Pages

Requires one-off configuration to enable.

Summary

For quick-and-dirty use, one-off GitHub Raw URLs work but questions over legitimacy mean they're not really an option for ongoing use.

Recommend ongoing uses GitHub pages (ideally with some sort of versioning).

follower commented 7 years ago

I've enabled GitHub pages with master as the source, for now (e.g. https://omniblox.github.io/pcb-component-models/components.json). Can be configured for use with:

viewComponents: true,                                                                                                                                                 
componentMapCfg: {mapUrl: "https://omniblox.github.io/pcb-component-models/components.json",                                                                          
                  urlPrefix: "https://omniblox.github.io/pcb-component-models/"}                                                                                      

We will probably regret not having versioning at some point. :)

It occurred to me we probably want to use a custom sub-domain of omniblox.com rather than github.io—this requires "Setting up a custom subdomain".

We would need the CNAME configured on the DNS side and then configured on GitHub (although they recommend the reverse order of operations).

follower commented 7 years ago

Current status:

dave5 commented 7 years ago

i've pointed omniblox.parts at omniblox.github.io as a custom domain.

follower commented 7 years ago

Lol, fancy, @ the TLD*. :)

Thanks for setting that up. I can confirm the following appear to work happily:

Now that we have the domain set up, I wonder if we want to change the default behaviour of the Eagle-Loader library to be to use the hosted version of the components.json and models? Do you have a preference?

Also, at some point we may wish to look at additionally hosting with HTTPS.

(* Did you also register the .party variation? After all, "...there ain't no party like an Omniblox party...")

dave5 commented 7 years ago

to save our future selves cursing our past selves into eternity... can you version the urls please? let's put this work on omniblox.parts/0/

follower commented 7 years ago

Okay. :)

I was thinking we could have a non-versioned URL always be the latest and then a versioned URL if people need to stick to a particular version?

I just looked into GitHub Pages symlink support and this repository suggests that it might be possible to use symlinks: https://github.com/s4y/gh-pages-symlink-test

I'll try out the symlink approach and see if it works--unless you want to use only versioned URLs.

dave5 commented 7 years ago

i'd prefer versioned urls right now