eManagerNYC / 3D-Model-Viewer

va3c for wordpress
20 stars 13 forks source link

Live demo #1

Closed theo-armour closed 10 years ago

theo-armour commented 10 years ago

Looks like fun. Is there a live demo anywhere?

ibuilder commented 10 years ago

@theo-armour Thanks, the va3c viewer is awesome for the AEC industry.. definitely a fun one. I have to strip out out the js that appends to divs and it's not playing nice with wp themes, thinking out loud - I'm going to make it more responsive:

http://winkervsbecks.github.io/angularWebglDirective/

And if we go angular we get speed: https://github.com/frozonfreak/html_angular_threejs http://plnkr.co/edit/rBp1NMGTm6ypv58suD6n?p=preview

What do you think? Maybe the html5 viewer is going to be more responsive. I want to avoid editing the va3c-viewer.js file

theo-armour commented 10 years ago

@ibuilder

Three.js uses the canvas tag for most everything. vA3C has the canvas tag inside a div just for UI purposes.

I have used Three.js inside an iframe successfully many times. Examples (on Blogger) here: http://www.jaanga.com/

Can you describe a bit what you need for the WP plugin and I will build a simple demo/sample...

ibuilder commented 10 years ago

That would be awesome. I basically need a canvas with a defined width and height. I would like to avoid using frames, but maybe in an object? The shortcode should look similar to:

https://github.com/wp-plugins/autodesk-freewheel-viewer

http://blackreit.com/articles/autodesk-freewheel-viewer/

theo-armour commented 10 years ago

@ibuilder

You build the WP plugin.

I build what it links to.

OK?

I am thinking that the link to file I will make will be something like http://example.com/viewer.html. The shortcode will provide the data file name. Your plugin will combine the two as in:

http://example.com/viewer.html#...folder/data-file.json

Sound OK?

ibuilder commented 10 years ago

@theo-armour Trying to avoid embedding a index.html file, would rather embed javascript directly in. Just saw your new html5 viewer - looks really great! You have moved the fname() out of the index.html?

Original:

<script>
        var fname = '../json/revit/Project2.rvt.js';
        init(fname);
        animate();
    </script>

new:

<script>
    var msg = '';
// Theo Armour ~ 2014-04-29 ~ MIT License
// http://fortawesome.github.io/Font-Awesome/icons/
    init(); // see db.js
</script>
ibuilder commented 10 years ago

@theo-armour So I just checked out the HTML5 version. What a difference! I understand what you want to do now with an iframe.. I modified the code to have to shortcodes:

[va3c] which loads the viewer in an object/iframe fallback.

and the original [model url="mymodel.js" width="100%" height="100%"] using the tag. I think both are important. The latter is important if I am loading a model for a particular area say room A101.

Though the most exciting thing about your new viewer is the ability to have bundles.. I can create separate floor models and combine them all together in a building model as a bundle!

theo-armour commented 10 years ago

@ibuilder

I use the iframe for my embeds because I usually use blogger or wordpress.com and so have no access to PHP.

But with plugins you do have PHP and thus can load all the JavaScript files and set things up without having to have an HTML file.

And I see that you are doing this here:

https://github.com/theo-armour/3D-Model-Viewer/blob/master/viewer.php

And the plugin and the shortcodes all seem good. Except my that the HTML file may need to be updatd because he scripts are in the assets folder.

Two things:

So what more do you need?

Can you put a demo up somewhere? So we can link to it from vA3C...

**

BTW, were you at the AEC Hackathon?

Theo

On Wed, Jul 2, 2014 at 6:34 AM, ibuilder notifications@github.com wrote:

@theo-armour https://github.com/theo-armour So I just checked out the HTML5 version. What a difference! I understand what you want to do now with an iframe.. I modified the code to have to shortcodes:

[va3c] which loads the viewer in an object/iframe fallback.

and the original [model url="mymodel.js" width="100%" height="100%"] using the tag. I think both are important. The latter is important if I am loading a model for a particular area say room A101.

Though the most exciting thing about your new viewer is the ability to have bundles.. I can create separate floor models and combine them all together in a building model as a bundle!

— Reply to this email directly or view it on GitHub https://github.com/ibuilder/3D-Model-Viewer/issues/1#issuecomment-47775979 .

ibuilder commented 10 years ago

updated the links. I will add a demo once I get it working. The [model] shortcode doesn't seem to be playing nice with wordpress.

I'm a gib fan of @jeremytammik so I read something he wrote about the hackathon in NYC and the va3c. I'll add you to my linkedin.

theo-armour commented 10 years ago

@ibuilder / Matthew

If you have big issues. I still have various WP installs on the net - and I used to have plugin building experience - and so could give the plugin a try

If the issues end up being smaller, you could install somewhere and I could look at what is happenning in the console.


LinkedIn - we are connected - but I am not a very active user. ;-)


Jeremy: a keeper. And so is Mr.doob...

Theo

On Thu, Jul 3, 2014 at 9:29 AM, ibuilder notifications@github.com wrote:

updated the links. I will add a demo once I get it working. The [model] shortcode doesn't seem to be playing nice with wordpress.

I'm a gib fan of @jeremytammik https://github.com/jeremytammik so I read something he wrote about the hackathon in NYC and the va3c. I'll add you to my linkedin.

— Reply to this email directly or view it on GitHub https://github.com/ibuilder/3D-Model-Viewer/issues/1#issuecomment-47952698 .

ibuilder commented 10 years ago

Live Demo: http://model.turneremanager.com