
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
vim-webgl-viewer
Advanced tools
A high-performance 3D viewer and VIM file loader built on top of Three.JS.
The VIM WebGL Viewer is an open-source high-performance 3D model viewer built on top of the popular Three.JS WebGL framework that specializes in loading extremely large AEC (Architectural/Engineering/Construction) models represented as VIM files.
The VIM WebGL viewer combines the Three.JS library with several common loaders and utilities, to reduce boilerplate code. It can be simply included via script tags or consumed using esm imports.
The VIM file format is a high-performance 3D scene format that supports rich BIM data, and can be easily extended to support other relational or non-relation data sets.
Unlike IFC the VIM format is already tessellated, and ready to render.
npm install
to install all dependenciesnpm run dev
to launch a dev-server and watch for changenpm run build
to compile and bundle everything for publishing. Resulting files end up in ./distVirtually the simplest usage of the VIM viewer is the following example:
<html>
<head>
<title>VIM Viewer</title>
</head>
<body>
<script src="https://unpkg.com/three@0.133.1/build/three.min.js"></script>
<script src="https://unpkg.com/vim-webgl-viewer"></script>
<script>
var viewer = new vim.Viewer({
url: 'https://vim.azureedge.net/samples/residence.vim',
object: {
rotation: { x: 270 },
},
});
</script>
</body>
</html>
## The Sources and Dependencies
The distributable file `vim-webgl-viewer.iife.js` does not contain the underlying source for [Three.JS](https://threejs.org) to avoid duplication. Please include Three.JS on your own. However, it comes bundled with:
* [Dat.GUI](https://github.com/dataarts/dat.gui)
* The `vim-webgl-viewer.js` source file which encapsulates common Three JS boiler plate
## Meshes, Nodes and Elements
The viewer is broadly divided into three layer.
**Meshes:** The scene is rendered using a collection of InstancedMesh, specific object are refered by a (Mesh, instanceIndex) pair.
**Nodes:** The vim scene is a collection of nodes with a transform and a geometry, each node will result in zero or one object added to Three to be rendered. Nodes are refered by Index.
**Elements:** objects from the original the bim software containing rich data. Each element can have from 0 to N nodes associated with it. Elements are refered to by Id or Index.
**Exemple:**
A table from Revit has elementId 12321
it gets exported into 5 nodes, 4 legs and a table top.
the 5 nodes are rendered using 2 meshes, one for the table top, one for all 4 legs.
FAQs
A high-performance 3D viewer and VIM file loader built on top of Three.JS.
The npm package vim-webgl-viewer receives a total of 21 weekly downloads. As such, vim-webgl-viewer popularity was classified as not popular.
We found that vim-webgl-viewer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.