npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

gbxml-viewer-basic

v0.5.2

Published

View gbXML files in your browser in 3D

Readme

You are now in a GitHub source code view - click this link to view Read Me file as a web page

gbXML Viewer Basic Read Me

Latest stable release: gbXML Viewer Basic R4

Latest development release: gbXML Viewer Basic R5

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

  • Use this code if you want a the basic idea of how to read a gbXML file and turn it into a Three.js scene
  • Use this code if you want to learn how to take sets of coplanar points and convert these to Three.js 2D Shapes with holes - all positioned and rotated arbitrarily in 3D space.

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.

Wish list

Issues

  • 2018-06-02 ~ Theo ~ Need a spider name - preferably one without a trademark, perhaps a nice-sounding latin name: https://en.wikipedia.org/wiki/List_of_spider_common_names
  • 2018-06-02 ~ Theo ~ currently surfaces, edges and opening are each their own group of objects. Could nicer things happen if the edges and opening were children of their parent surface??

Links of Interest

  • https://www.ladybug.tools/spider/#gbxml-viewer/README.md

Change Log

2018-07-16 ~ Theo

  • Code cleanup
  • Update develop package JSON

2018-07-14 ~ Theo

  • Create develop branch
  • Update to gBV R5.0
  • GBX.parseFileXML( text ): now converts a string to XML
  • New function: GBX.getStringFromXml( xml ) returns an XML file converted to a string

2018-07-13 ~ Theo

GVB R4.1

  • Forked fromSpider repo to Spider gbXML Tools repo

2018-06-04 ~ Theo

R4

  • ten lines or so shorter
  • And a few more internal links between Three.js data and gbJSON data

2018-06-02 ~ Theo

R3

  • Much improved geometry dispose
  • Memory information display
  • Two more files to load on menu
  • Add visibility toggles
  • Add zoom all button
  • More cleanup and updating variable names

2018-06-01 ~ Theo

R2

  • Cleaned up and simplified version of R1

R1

  • First commit
  • Code almost a duplicate of gbXML Viewer R14 gbp.js