Closed theo-armour closed 5 years ago
@theo-armour great idea
Widow spiders
COMMON NAME: Black Widow Spiders SCIENTIFIC NAME: Latrodectus
@theo-armour - I think this release is out there. Is there anything keeping this Issue open?
I'd like to better understand how gbXML Viewer relates to Aragog. - It seems like a subset of features. If that is the case, is the intention to package and distribute the basic Viewer as a standalone? If so, then we can consider making the API a bit more explicit and tailoring code examples around it.
All further discussion should take place in the new repo:
@ladybug-tools/spiders
Latest stable release: gbXML Viewer Basic
Concept
The 'Aragog' gbXML Viewer is a nice bit of work - or it will be one day - but the code base is getting lengthy and convoluted. It's no longer a place for beginners to start. You can't just open it up and see what's going on in fifteen minutes or so.
Therefore we now have gbXML Viewer Basic
This is a very basic gbXML file viewer
The intention is that the core gbXML parser here and the core parser in the full-featured gbXML Viewer and the parser in the RAD Viewer all contain identical or nearly identical code.
The code should be simple, fast and easy to read. If you can read and understand the Three.js examples and the Mr.doob coding style™ , then you should feel at home here. Be prepared to enjoy the white space!
A good function to look at is
GBX.get3dShape()
. This function takes a set of 3D coplanar points along with points that bound any holes and converts these into a Three.js mesh bounded by those points. This mesh is created using a Three.js Shape - which is excellent stuff but very 2D. The conversion requires that you conjugate your quaternions and do all manner of other unreal linear algebra thinking. All this in just 300 or so lines of code.The gbXML portions are also interesting. The routines end up with three sets of data for every element in the original file: XML, JSON and Three.js meshes.
Issues