tt-acm / spectacles.webviewer Goto Github PK
View Code? Open in Web Editor NEWThis project forked from va3c/viewer
A hackable BIM viewer for the web
Home Page: http://core.thorntontomasetti.com/apps/Spectacles/
License: MIT License
This project forked from va3c/viewer
A hackable BIM viewer for the web
Home Page: http://core.thorntontomasetti.com/apps/Spectacles/
License: MIT License
Spectacles needs a splash page, which will be hosted on the CORE studio website. @mnaugle-tt wants to look into some fancy CSS and has some ideas about layout.
There is a bug here when a model is loaded from a link. I can't see the model, but it seems like it's just missing the zoomExtents call. I'll look into it.
@mnaugle-tt was missing links out to the Revit and Grasshopper exporters - both the downloads and the repos. Add them to our readme, and make them big!
When called from the SPECTACLES callback or elsewhere from outside of the Spectacles app.
Add our license to all code files as a header.
viewer.loadNewModel("https://dl.dropboxusercontent.com/u/16228160/D3TestData/3d/test02.json");
returns this error:
TypeError: Cannot read property 'id' of undefined
VA3C_APP.js : 1173
You probably need to check if id is null before using it in this line: https://github.com/tt-acm/vA3C_viewer/blob/gh-pages/js/VA3C_APP.js#L1173
Hello, first of all, thanks for your great work.
I think that using SPECT.renderer.shadowMapType = THREE.PCFSoftShadowMap;
improves shadow rendering.
Also, a bigger shadowmap will improve the results.
I think that both options won't compromise performance. (I've tried up to 4096x4096 in rst_basic_sample_project without much degradation in the FPS. 8192x8192 halved FPS.). You may add this as a shadow quality level option when activating shadows.
dat.gui is a bummer on a tablet or a phone. It has it's advantages, but the time has probably come to move on :[
I'm just starting to mess with bootstrap on some other projects, and it feels pretty awesome...
On a separate branch, attempt to replace dat.gui with bootstrap, including the sliders. Also try to clean up some of the additional divs we need - loading, attributes, file open, etc
@bhowes, I just noticed that the examples you created for the WebViewer do not support selection. Is this intentional? If so, could you point me to where you made changes? Thanks!
All models loaded into the viewer should be able to be viewed in plan, front and side elevations, and from a standard 45 degree birds eye view.
The plan and elevation views should include a dynamic clipping plane allowing the user to cut sections.
The wiki for this repo should document the following:
Anything else?
I am trying to remove a controller like this:
var controller =folder.__controllers[i];
folder.remove(controller);
It disappears from the screen, but the controller is not removed from the VA3C object. When another model that has views is loaded, it creates an extra controller. In the control panel, everything looks fine, but it seems like I need to find a different method to destroy the controller. People have discussed it here, but I can't find a good solution:
http://stackoverflow.com/questions/16321031/how-to-delete-dat-gui-element/21221627#21221627
When sharing a project, it could be useful to assign multiple users at once, rather than one at a time.
ex: "[email protected], [email protected], [email protected]..." rather than entering each user individually
Add the ability to load a .json file hosted somewhere else - like on dropbox or google drive, for example.
I tried this very quickly a while ago and ran into some security issues while testing with google drive. I think I got dropbox to work:
https://github.com/tt-acm/Spectacles.WebViewer/blob/gh-pages/js/SPECTACLES.js#L419-L445
Figure it out and add new UI, backup functions for loading remotely hosted .json files.
Add a new function that loads an .obj/.mtl pair into the running scene. Add the loaded object (I think it's actually a three.Group containing geometries) to a new layer called 'Obj Models' so they can be toggled on/off using the layers UI.
When using the webviewer with a view exported from a Revit Camera in the non-stereo (one image on screen) mode there are two issues:
In some cases, you don't want to zoom extents when loading a new model into the scene. The Design Explorer is a good example - if you are navigating through a design space, the view should not be reset each time a new design state is loaded.
Either expose a bool input on this function, or remove the zoom extents call from the SPECTACLES.jsonLoader, and make everyone call it when they want to. Upon writing, I like the second option better.
Any opinions out there?
Found a small bug where the character "<" in a layer name keeps that layer from being able to be toggled on and off in the UI.
I'm testing the energy model building. Try to zoom in close to model and then orbit.
It will be very helpful for users who are not that familiar with 3d modeling to change mouse cursor to hand (pan) and orbit so they can figure out the mouse events.
@bhowes-tt, I got the Edmonton project and managed to export the structure. However, the skin and the bowl are linked files in Revit. I have discussed two options with @nmundell-tt:
-A) Merge (copy+paste) the three models into one in Revit. This is tedious and will probably create a really heavy json file
-B) Allow the viewer to take more than one json file. This seems to be a really good way to collaborate with others, since json files will most likely come from different models (architecture, structure, etc).
I feel that option B is a better approach that we could really benefit from in future projects. What's your take on this? Thanks!
That re-positions any div we create on top of the spectacles target div. @mostaphaRoudsari was seeing some weird stuff with our footer in one of his dynamic bootstrap apps - the listener logic in place was not sufficient.
To support these issues:
tt-acm/Spectacles.RevitExporter#8
tt-acm/Spectacles.GrasshopperExporter#4
Look for .spect files when opening from disk.
not Basic. Selected objects loose their shading, and therefore become more difficult to see. especially when the selected object has a lot of relief / detail.
Hi,
Am trying to load one json over other, its like embossing one model over other.
The below is my code. The problem am getting is its adding a new json to other area, not on same area.
`
var mySpectacles;
$('#btnLoadJson').on('click', function() {
$.getJSON("json1.json", function(data) {
alert('a');
mySpectacles = new SPECTACLES($("#Spectacles_output"),data,function(app) {});
});
});
$('#btnLoadJson2').on('click', function() {
$.getJSON("json2.json", function(data) {
mySpectacles = new SPECTACLES($("#Spectacles_output"),data,function(app) {
app.setBackgroundColor(0xFFFFFF);
}
);
});
});
`
Please suggest how can i place one json over other.
Rgds,
Amit
I did a first pass in the repo. All code files should rename vA3C > Spectacles.
This should be able to be called from outside - similar to zoomExtents.
I think it is more handy if the init function returns the viewer itself instead of making a public variable as it does right now. Also it should take the id for div as an input so the user can generate a couple of views and name them as needed. Something like this.
function initiate3DViewer(viewerId, jsonFileAddress){
//load JSON file
$.getJSON(jsonFileAddress, function( data ){
//Initialize a VA3C viewer
var viewer = new VA3C_CONSTRUCTOR($("#" + viewerId), data, function(app){
//call the UI / functionality modules
app.setBackgroundColor(0xFFFFFF);
});
return viewer;
});
}
// initiate the viewer
var viewer = initiate3DViewer("viewer", "https://dl.dropboxusercontent.com/u/16228160/D3TestData/3d/test01.json");
var viewer2 = initiate3DViewer("viewer2", "https://dl.dropboxusercontent.com/u/16228160/D3TestData/3d/test02.json");
I'm doing a project using a custom interface (messing around with bootstrap for the first time) and am running into conflicts with jqueryUI.
We only use this to drag around the attributes window - i'm thinking it's fine to get rid of that. any objections?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.