View Single Post
Old 13th July 2013, 20:07   #17
z33m
Junior Member
 
Join Date: Jun 2013
Posts: 22
Thanks for the changes you've submitted. The url param idea is cool. An interesting hack would be to encode the entire preset as base64 and accept it as a urlparam. This would allow us to share preset code as well in the url.

Quote:
Originally Posted by Yathosho View Post
i played around a bit more with the editor and there are a couple of things i'd like to add. however, i would like you to explain a couple of things first.

1. is demo.min.js what a preset file would look like or is it a combination of the preset (as json) and some extra stuff?
I'll try to explain the basic structuring of the code in the repo.
  1. /js - This contains the main WebVS library. I have designed things around a core visualization library. This is pure JS, just few dependencies. Essentially anyone can plug this library into any application, create a webvs object with proper options and start playing visualizations.
  2. /js/core.js - This file contains all the base stuff including the base webvs object and base classes for all the components.
  3. /js/** - All other files have one effect component or contain utility classes and stuff
  4. /test/** - this contains just some very basic qunit test cases, for the expression parser mainly.
  5. /demo - This contains the demo app that i have hosted at url
  6. /demo/demo.js - This code runs the demo app with the editor and stuff. It uses the webvs library. This code contains a hardcoded preset, which is shown in the editor.

when you build the code 1.) all the webvs library files are assembled into one js file 2.) most of the other stuff are just copied into build directory, so you can run the demo from there.

when you build the code with "grunt dist". It generates all the same stuff in dist directory, but with minification. Its this dist directory that i have put on the demo page.

Quote:
Originally Posted by Yathosho View Post
2. i tried to add the code from the codemirror theme demo to the editor, but i'm not sure how that editor works. the input fields are being displayed a pre tags, not input or textareas. i think it would be a nice option to be able to change the theme of the syntax highlighter.

3. what else is codemirror doing than providing the editor with syntax highlighting?
Code mirror simply creates an editor inside a container div that we have on the page https://github.com/azeem/webvs/blob/...o/demo.js#L257

I do not know what could be the scope of the JSON editor based UI. I am working on the an AVS editor like UI, which should be much more simpler to use. The JSON format was meant to be a structure consumable by the WebVS library.

I would like to push the editor UI out into master and use it as the main app. Please take a look at the code in /editor in the editor branch.
z33m is offline   Reply With Quote