xBimTeam / XbimWebUI

Web components for xBIM Toolkit
http://xbimteam.github.io/XbimWebUI/
Other
203 stars 121 forks source link

Integration with a non NPM compatible project #436

Closed untecnologo closed 1 year ago

untecnologo commented 1 year ago

Hello, Really thank you for your support and time especially when it is a small community.

I have a couple of questions. I have a project that is not compatible with NPM installation. So manually I included in my project the main index.js of the viewer. I would like to know if this file is enough for handling models in the viewer but I am not sure if I need extra packages for the camera centering, layer selection, id target etc.

I would like to have more information about it because I have a couple of months working on this integration and to be honest, I like it.

Thank you for your time and support.

martin1cerny commented 1 year ago

Hi @untecnologo, I'm glad you like it. The index.js file should contain all you need. If you want to stay updated, you can certainly keep watching for NPM packages and have some tooling to download it and extract index.js.

Just out of interest - what kind of environment/framework do you use?

untecnologo commented 1 year ago

@martin1cerny I have a question, where I can find complex implementations of the viewer? I mean how to use the code with examples? Is there anything documented? I am having a problem which is my viewer open not centered so the model is out of the camera. And I can't find where I can get this info.

Thank you!

andyward commented 1 year ago

There's some documentation on the viewer at https://docs.xbim.net/XbimWebUI/index.html

In particular your issue of centering should be addressed by viewer.show()

For examples, there's a fairly fully featured example at https://github.com/xBimTeam/XbimWebUI/tree/master/examples/featured-viewer

@martin1cerny I think we package for CommonJS module for NPM - will this work under plain ES5 JS?