Sunday, July 20, 2014

vA3C Viewer R3: Processes Data from Multiple GitHub Sources


vA3C Viewer HTML5 R3

The preview in today's post looks a lot like the preview in yesterday's post. But there is a huge difference. Or a tiny difference - depending on your point of view.

The issue is this: The Internet is about nice people sharing data - in a free and unencumbered manner - and about naughty people manipulating data in peculiar ways. And, yes there are other types of peeps as well.

In the early days of the Internet, everybody was nice and it was fun and easy to share. Nowadays it's different. Of note here, are the increasing restrictions on cross origin resource sharing and the increasing demand for a same origin policy. And, yes, apps on servers can bypass many of these restrictions.

The result is that most of the larger resource where you can keep things for free - such as Flickr, Imgur, DropBox, GitHub and many others disable cross origin resource sharing. This means that JavaScript apps running in your browser are stuck with obtaining data from one source at a time. And, yes, there are exceptions.

Thus the situation for a CAD file viewer such as the vA3C viewer has been fairly marginal. The only drawing the app could open were drawings from the same domain it was launched from.

Until today.

The new - still quite broken - R3 of the vAEC Viewer loads the file we built for it at the AEC Hackathon. And it also loads every example file and every 3D model from Mr.doob's Three.js example folders. And it is loading and displaying the 170+ HTML files of math equations from Jaanga Alegesurf.

Not only is the app loading the files but it's also enabling you to mash-up the data from the three sources any way you want. And, yes, it's doing this real-time sharing in a time-honored, secure manner.

What's the trick?

It's easy peasy. Fork the repo on the GitHub server. No need to download a single byte to a local machine. Publish the repo to the GitHub gh-pages branch. Presto now all of its data is available to apps running from your GitHub presence.

What happens when upstream changes? The official method is to create a pull request and merge. But that is bothersome to the upstream party. It's much easier to simply delete your fork and then re-fork.

Oh, but then - as GitHub warns - it can take quite a while for the pages to start appearing. Not to worry. Open for editing any file in the new fork, make any change, save. Presto! Your new gh-pages files appear instantly.

So this is a huge difference in terms of sharing. But what does this mean for GitHub? The GitHub peeps don't really want to go around replicating half-gig repos all over the place. And they don't have to. They use Git after all. A popular repo has many thousands of forks. So for GitHub your new fork - which they set up in a few seconds - is just a few new pointers and diffs. No big deal.

But for you and me this could be a nice big deal. Currently the site links to something like four hundred files. The current goal is to deliver access to, say, a thousand files of at least somewhat meaningful content.

The traditional on-line CAD viewer is closed-sourced, upload to a walled garden, do-what-they-allow-you-to-do place. Perhaps the time has come for an open-source, freely shared, highly programmable computer aided design enhancer.

The current rev is very incomplete and has many broken bits. It does, however, allow you to place Walt Disney's head inside a warped triaxial hexatorus textured with an image of a '53 Cadillac. Welcome to the Matrix.


Links
vA3C HTML5 R3
Viewer Live Demo
Read Me
Source Code

2 comments:

  1. That is why printer rental is offered. Even if you are a business owner and use one consistently, renting one is probably more doable than buying. renting impresoras mallorca

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete