petrbroz / vscode-forge-tools

Visual Studio Code extension for accessing Autodesk Forge services and content.
https://marketplace.visualstudio.com/items?itemName=petrbroz.vscode-forge-tools
MIT License
75 stars 17 forks source link

FR: add a mechanism to try custom viewer extension #63

Closed wallabyway closed 1 year ago

wallabyway commented 2 years ago

Feature Request:

A way to test a custom viewer extension, within the VS-Code 'preview' feature.

maybe this?

  1. right click->'Preview with debug extension'
  2. loads a hard coded file '\debug-extension.js' from the current project, with forge-viewer preview

This would be a way to quickly test and share viewer extensions, all without leaving the VS-Code environment. For debugging, this would not work, so it's more for quickly trying out some code from an existing blog post.

wallabyway commented 1 year ago

From the readme: https://github.com/petrbroz/vscode-forge-tools/blob/7a9548c6784b866fd53f6c62206ce24545cda3f4/README.md?plain=1#L46

- `autodesk.forge.viewer.extensions` - array of Viewer [extension](https://aps.autodesk.com/en/docs/viewer/v7/reference/Extensions) IDs (for example, `Autodesk.VisualClusters` or `Autodesk.DocumentBrowser`) to be automatically loaded when previewing derivatives

I think that will be enough..

so inside VSCode settings.json

Add the following

{
    "autodesk.forge.viewer.extensions": ["Autodesk.ExtensionsPanel", "Autodesk.Grid"],
    "autodesk.forge.environments": [
yada yada

ie.