va3c / GHvA3C

Grasshopper plugin to export three.json files that can be loaded by the vA3C viewer
http://va3c.github.io/viewer/grasshopper2.html
20 stars 27 forks source link

WYSIWYG viewer #12

Open bhowes-tt opened 9 years ago

bhowes-tt commented 9 years ago

I've been using (and developing) these for an actual project at TT, and have thought of a couple of new features and changes that would significantly help the workflow and UX.

We need a real-time vA3C viewer that previews the THREE.js model that the user is currently exporting. It takes too long to upload a file and see what it looks like - you should be able to see what the file looks like WHILE you are authoring it.

How to: build a little node server that runs locally and bounces our json from grasshopper to a client side vA3C viewer (a browser pointing to localhost:somePort). When a new .json file is generated, it is immediately streamed to the browser.

I did a little test today, and was able to start a node.js server with a c# program, and then connect to it from a local browser. I think it's totally doable...

theo-armour commented 9 years ago

@bhowes-tt

If the work is 100% local on your computer/all files can be loaded and run off your hard drive, then I can upload a demo that checks at user-defined intervals - say every two seconds - and updates the Three.js window if it senses that a JSON file has been modified.

If some or all the operation is on a server then there are caching issues still to overcome.

bhowes-tt commented 9 years ago

@theo-armour - that would be incredible! I've been building a couple of minimal viewers I want to show you...

theo-armour commented 9 years ago

@bhowes-tt

https://github.com/va3c/viewer/tree/gh-pages/cookbook/update-tracker

I've only tried it on Chrome on Windows.

Client-side version works fine.

Server-side has issues dealing with files n GitHub gh-pages. There may well be fewer issues with a more garden-variety server.

bhowes-tt commented 9 years ago

Cooool :sunglasses:

I'll give it a try sometime soon. Thanks @theo-armour !!!

theo-armour commented 9 years ago

@bhowes-tt

Feature is now at rev 3 and part of vA3VC Hacker

See 'Enable file modified monitor'. It's working when I edit JSON files using a text editor and when repeatedly exporting to the same file from Blender.

So far it has all been surprisingly easy going. So do warm up your wishlist thoughts...