
Product
Rust Support Now in Beta
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
An experimental CAD/3D viewer for use in [GitBuilding](https://gitbuilding.io). It is built using Three.js. You can [see it in action here](https://gitbuilding.gitlab.io/gb3d/).
An experimental CAD/3D viewer for use in GitBuilding. It is built using Three.js. You can see it in action here.
The 3D explosion viewer works only for glTF files, we use Blender to generate glTF files.
Currently generating the exploded assembly requires manually making and animation of the explosion in a program such as blender.
To make an exploding assembly:
We understand that the process to make the exploded assemblies is not simple. If you have any ideas of tools or methods to simplify this please open an issue.
You can either install from NPM or include the bundle.
Run
npm install gb3d
Download the bundled javascript from the example website or build the bundle locally (see below).
Once you have the bundle you can add a GB3D to an HTML page by copying the gb3d_bundle.js
file and the model you want to display into the folder of the webpage and adding this to the HEAD
of the HTML page:
<script type="text/javascript" src="./gb3d_bundle.js"></script>
Add this where you want the viewer:
<gb3d-viewer src="MODELNAME.stl" ></gb3d-viewer>
remembering to update the model name.
For STLs, you can also set the model colour using hex codes or web colours, for example:
<gb3d-viewer src="MODELNAME.stl" color="deeppink"></gb3d-viewer>
Your website will need a server to serve the model due to security restrictions, you can't just open the HTML file from disk. For more information see the three.js documentation on running locally.
To build locally you need Node/npm. This has been tested with Node v12.4.0 and npm v6.14.4. If you have problems we recommend trying the current LTS version of Node which can be downloaded from nodejs.org.
To build, clone this repository, navigate to into the gb3d directory and run:
npm install
npm run build
You can then test the result by configuring git-lfs, checking out the test files and running:
npm run serve
Then navigate to http://localhost:8000
GB3D was written by the Bath Open INstrumentation Group.
The main viewer was initially based on the three.js VRML loader example and has taken a lot of inspiration (and some code) from Justin Ribeiro's stl-part-viewer and Don McCurdy's three-gltf-viewer. The navigation tools are modified from the three.js trackball controls.
GB3D is released under the MIT license.
FAQs
An experimental CAD/3D viewer for use in [GitBuilding](https://gitbuilding.io). It is built using Three.js. You can [see it in action here](https://gitbuilding.gitlab.io/gb3d/).
The npm package gb3d receives a total of 25 weekly downloads. As such, gb3d popularity was classified as not popular.
We found that gb3d demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.