A Visual Studio Code extension that provides a built-in viewer for GLTF or GLB files. This extension allows you to preview and interact with 3D models directly within VS Code.

From version 3.0.0 with the launch of the web version all core files are now in a separate repository: https://github.com/ohzinteractive/glb-viewer-core. This repository is now only a wrapper for the core files with some VS Code specific code.
.gltf .glb file in VS Code's explorer window.gltf .glb filesSee CHANGELOG.md for details about each release.
Clone the repository:
git clone [email protected]:ohzinteractive/glb-viewer-vscode.git
Install dependencies:
yarn install
Start development mode:
Inside vscode with the folder open, press F5 to start the extension. This will open a new window with the extension running.
Under the hood, it will run the yarn start command. That builds and watches for changes in the src/ folder.
To build the extension:
yarn build
To package the extension into a VSIX file for distribution:
Install the VSCE (Visual Studio Code Extensions) tool globally:
npm install -g @vscode/vsce
Make sure your extension is built:
yarn build
Package the extension:
vsce package
This will create a .vsix file in your project directory. You can then:
code --install-extension ohzi-glb-viewer-vscode-2.13.0.vsixNote: If you plan to publish to the VS Code Marketplace, you'll need to:
vsce login <publisher-name>vsce publishglb-viewer-core/ - Core files (submodule)public/webview/ - Built filesextension.js - Main extension entry pointvite.config.mjs - Vite configuration for building the webviewpackage.json - Package configurationContributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE.md file for details.