Community plugin

ybniaobu / dsh-3d-viewer

Preview 3D models and textures from the session workspace in DSH's right sidebar. Supported formats include FBX, OBJ, glTF, GLB, DAE, and STL models, plus PNG, JPEG, TGA, EXR, and HDR textures.

  • JavaScript
  • MIT
  • 1 stars
  • Nov 14, 2026

About this plugin

Written by the registry from verified metadata, not from the README.

dsh-3d-viewer is a DSH plugin published from the ybniaobu/dsh-3d-viewer repository.

  • Listing statusManifest verified
  • Manifest checkedNov 14, 2026
  • Packagedsh-3d-viewer
  • Package version0.3.0
  • DSH engine>=0.2.2-rc.3
  • Source commitb9addac
  • Repository createdNov 5, 2026

Capabilities and topics

dshdsh-plugindeepseek-harness3d
From the repository README

README

Everything below this line is the repository's own document, cached here. This site did not write or review it.

English | 中文

GitHub npm

Preview 3D models and textures from the session workspace in DSH's right sidebar. Supported formats include FBX, OBJ, glTF, GLB, DAE, and STL models, plus PNG, JPEG, TGA, EXR, and HDR textures. Orbit, zoom, switch camera views, materials and environments, and play embedded animations.

3D Viewer preview

Installation

The plugin is distributed as the npm package dsh-3d-viewer. The Three.js runtime and format decoders load only when a preview is opened.

Install from npm (recommended)

  1. Open DSH Desktop and choose Plugins in the sidebar.
  2. Click Add plugin → Install a third-party plugin.
  3. Enter dsh-3d-viewer (or dsh-3d-viewer@0.3.0 to pin a version).
  4. Set Registry to the official npm registry (npmmirror also works in mainland China).
  5. Click Install, then confirm 3D Viewer is On under Installed plugins.

Install from a local directory (optional)

  1. Unpack the plugin directory anywhere.
  2. Open DSH Desktop and choose Plugins in the sidebar.
  3. Click Add plugin → Install a third-party plugin.
  4. Enter the directory's absolute path (for example F:\plugins\dsh-3d-viewer) and click Install.
  5. Confirm 3D Viewer is On under Installed plugins.

Plugins run inside the DSH process; install only trusted sources.

Requirements

  • DSH Desktop 0.2.2-rc.3 or newer.
  • WebGL 2.
  • The model or texture must be in the session workspace.

Usage

Open the right sidebar, choose Files (Mod+P), and click a supported file.

Model previews: drag to orbit, scroll to zoom, and right-drag to pan. The toolbar resets the view, starts auto-rotation, and toggles the grid and wireframe. Click or drag the orientation axes to change the camera view. Material and environment pickers are in the top-right controls. When the model has animation clips, the animation bar appears above the bottom hint: use play/pause, pick a clip by name, drag the progress slider to seek, and choose a playback speed from 0.5× to 2×. Switching clips resets to that clip's first frame while preserving the current play/pause state.

Texture previews: scroll to zoom, drag to pan when zoomed, and use Fit or double-click to reset. Flip Y handles bottom-up sources. The badge shows dimensions, bit depth, and zoom.

Large files and the first environment switch may take a few seconds. If no preview appears, refresh the page and then restart DSH.

Supported formats

Model previews

FormatSupport
FBXMeshes, hierarchy, materials, embedded textures, animations, node data
OBJPolygons, groups, normals, UVs, vertex colors, lines/points, MTL, common textures
glTF / GLBAnimations, skinning, embedded resources, external .bin files and textures
DAECOLLADA meshes, materials, external textures, and animations
STLASCII and binary, neutral PBR material, binary vertex colors

Notes:

  • Embedded lights, cameras, and audio are ignored.
  • External textures are read from the workspace.
  • Missing FBX textures only warn.
  • OBJ missing MTL uses default materials; missing textures use white placeholders.
  • glTF/GLB external .bin files and textures must exist in the workspace; missing resources can prevent loading.
  • glTF Draco, Meshopt, and KTX2 extensions are not supported.
  • DDS, KTX2, PVR, and other formats without a bundled decoder are not supported.
  • MTL map_Ks / map_Ns are not fully mapped to PBR.
  • STL has no materials or animations.

Texture previews

FormatDecoded dataPreview
PNG8-bit RGBADirect pixels, alpha preserved
JPG / JPEG8-bit RGBADirect pixels, alpha preserved
TGA8-bit RGBADirect pixels, alpha preserved
EXR16-bit half or 32-bit float, 1–4 channelsTone-mapped to SDR
HDRRadiance RGBE, 16-bit half by defaultTone-mapped to SDR
  • EXR and HDR use exposure 1 and Reinhard tone mapping before sRGB output.
  • HDR previews use a WebGL2 tone-mapping pass when available, with a half-float CPU fallback.
  • Previews are cached by resource address, version, and format (160 MiB; 64 MiB on low-memory devices).

Code structure

AreaMain files
Host and packageindex.js, cordis.patch.yml, package.json
Coresrc/core/: byte helpers, formats, model statistics
Client registrationsrc/client.js, src/core/formats.js, src/core/texture-formats.js
Lazy runtimesrc/runtime.js, src/ui/viewer-runtime.js, src/loaders/address.js
Lazy UI chunksclient.ui.styles.js, client.ui.texture.js, client.locales.*.js
UIsrc/ui/: chrome, controls, preferences; ui/model/ and ui/texture/ for the two viewers
Scenesrc/scene/: renderer, camera, materials, environment, grid, post-processing
Loaderssrc/loaders/: dispatch, workspace reads, texture workers, formats/ loaders
Vendored codesrc/vendor/: modified FBX loader
Build and testsbuild.mjs, tests/run.mjs, tests/**/*.mjs

src/client.js only registers previews; src/runtime.js owns Three.js, scene setup, and lazy format dispatch. The UI shell does not import Three.js directly; scene code and the texture WebGL preview load with the lazy runtime. Styles, non-baseline locale dictionaries, and the texture viewer are also package-local UI chunks; English and Chinese dictionaries stay in the entry bundle as the DSH fallbacks.

Development

npm ci
npm test
npm run build

CI uses Node.js 24. npm test runs each tests/**/*.mjs file in its own process.

npm run build writes the UI entry, lazy runtime, format/texture chunks, UI style/locale/texture chunks, and the EXR/HDR worker to dist/. Commit the rebuilt dist/ files when source changes.

License

MIT; see LICENSE. Third-party notices are in THIRD_PARTY_NOTICES.md, including Three.js (MIT) and Poly Haven HDRIs (CC0). React is provided by DSH.

Badge

Listed here? Link back with this badge — paste the snippet into your repository README.

Listed on DSH Plugin badge
[![Listed on DSH Plugin](https://dsh-plugin.com/badges/listed.svg)](https://dsh-plugin.com/plugins/ybniaobu/dsh-3d-viewer)