Comments (4)
I think this going to be a "won't fix". If you want a hover image just release the Ctrl and you'll get the normal image preview. onDefinition doesn't give any context about how its being used so changing behavior isn't possible. Its actually pretty hacky to get what we have working well as the system is built around navigating and presenting text documents.
from gltf-vscode.
Sorry, I don't quite understand.
It's possible to Ctrl-hover over, e.g., Draco pointers and see some values in tool-tips. Ctrl-click opens a full list of values in a new document. Why can't image URIs behave the same way?
from gltf-vscode.
VSCode's onDefinition system provides a document URI and a cursor location and it expects a URI and a cursor location back. For JSON definition this works pretty simply; we use the same URI and find the location of the pointed to object. For data buffers we craft a new data URI which includes information on what accessor is under the cursor. The protocol handler for that data URI transforms the accessor into a new text document and VSCode shows this content where appropriate. For images the same type of data URI is constructed but we can't present text; we need to command VSCode to open a tab and show the image in an HTML page. We had in previous revisions of the extension just returned a URI directly to the image (which is what you see when hovering with out Ctrl). VSCode limits the size of images it will open in this way to 1MB and as you can see with the hover doesn't scale the image so you can see the whole thing in the editor window.
I can open an feature request with VSCode to allow definitions to return an HTML document. With this capability we'd be much more able to handle all the cases as expected.
from gltf-vscode.
Can't reproduce this anymore. I think it was fixed upstream.
from gltf-vscode.
Related Issues (20)
- rotate skybox in three.js, front view is dark
- You may want to upload this extension to the Open VSX registry.
- Add new keys to end of JSON blocks
- Preserve image mimeType when converting from GLB to GLTF HOT 5
- TypeError when converting .gltf to .glb HOT 3
- Tabs interfere with validation report columns
- [cesium] gltf preview: Uncaught RuntimeError HOT 2
- Dependency update strategy HOT 2
- Validation error for missing bufferView in sparse accessors HOT 2
- Update rendering engines? HOT 2
- Please add support for KHR_materials_anisotropy HOT 2
- Feature request: add a glTF pathtracer
- Update extension schema mappings
- Can't inspect data inside draco compressed attributes
- Possible crash in language server HOT 1
- In official gltf sample BOX.gltf, why am i unable to display inspect-data window when using inspect-data tools?
- Unable to enable plug-ins
- glTF Tools breaks other extensions in a weird way
- Render Grid option broken
- Feature request: preview enhancements
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gltf-vscode.