Three.js Examples - FGx Aircraft - vA3C Grasshopper |
The vA3C Viewer app that's being worked on is for viewing data files. So saving is not really a thing that viewers need to do. Unfortunately, the ability to move things about and change materials started creeping into the viewer. So now there are different states: Do you want to see that pretty pony in blue? Or in pink?
AlgeSurf PE - Jurgen Meier Equations |
The plan was and still is to automate that process for R3. The idea is to provide a 'save' button that would collect all the links to all the models in the display along with their position, rotation and scale and save these into a script file that you can load that recreates what you had on your display when you saved.
vA3C Revit - Three.js Examples |
This is a simple and light weight method and very doable. It is not the same thing as going through every item of geometry, finding every face, vertex and the associated materials and shuffling these all into a tidy bundle on your hard disk. This latter activity is for the pros. The former is OK for script kiddies such as your vA3C Viewer team.
Well, upon the morning that had been appropriated to the permalink coding task, it was decided that reviewing Mr.doob's Three.js Editor would be a good thing.
The Editor does *not* have a save feature. It does, however, have a command that reads the data in memory and sends that data as text to a new window where you can review the data.
vA3C Grasshopper - Three.js Examples |
And, then, it turns out the HTML5 has the new ability to enable you to save text that's in a window to a file on your hard disk.
Somehow these two thoughts became co-mingled. Code was copied, pasted and cobbled together. A 'Save' button was added to the vA3C Viewer.
FGx Aircraft - Three.js Examples - AlgeSurf PE Jurgen Meier Equations |
The mental lollipops nearly fell on the floor.
It worked.
vA3C Viewer R3 is now enabled to take all the data that is in the display and write it out to a brand new JSON file. And these files, in turn can be used to create further JSON files.
Of course, it's not perfect. Files with shaders and other exotics don't work. Somethings come in and can be edited and others can't. But many fun things do work.
The images on this page show assemblies of files from the FGx Aircraft libray, the Jaanga AlgeSurf parametric equations library, the Three.js Examples library and the vA3C JSON files prepared for the AEC Hackathon. It's an assembly of arbitrary colorful fantasies.
So, yes, the computer has the wonderful ability to process data and to save it and reuse it. Unfortunately this does not stop the peeps with loose wing nuts from producing hyper-whimsical images.
Links
vA3C HTML5 R3
Viewer Live Demo
Read Me
Source Code
This comment has been removed by the author.
ReplyDeleteThe printer can print thin 10 ml cards as well as 40 ml printable access cards. Standard PVC cards are 30 ml thick. Loyalty cards, access cards, employee ID cards and many other options can be printed on this printer. renting impresoras
ReplyDelete