Giter VIP home page Giter VIP logo

gltf-vscode's Introduction

glTF Extension for Visual Studio Code

GitHub issues GitHub license button VS Code marketplace button

This extension adds features for previewing and editing 3D models in glTF files.

The glTF standard is maintained by the Khronos Group, the same standards body behind OpenGL and WebGL. They describe glTF as follows:

glTF™ (GL Transmission Format) is a royalty-free specification for the efficient transmission and loading of 3D scenes and models by applications. glTF minimizes both the size of 3D assets, and the runtime processing needed to unpack and use those assets. glTF defines an extensible, common publishing format for 3D content tools and services that streamlines authoring workflows and enables interoperable use of content across the industry.

Extension Features

• Registers *.gltf files as JSON schema

Uses the glTF 1.0 schema, and will warn for invalid or missing fields.

• Tooltips for glTF enum values

Hover the mouse over a numeric enum to see its meaning.

Hover tooltips

• Autocomplete for glTF enum values

Press CTRL + SPACE on a blank field to pop up a list of suggested values. As you scroll through the list, the meaning of the selected value is revealed.

Property autocomplete

This works for arrays as well, for example the list of enabled render states. Here for example, a user is looking to enable a BLEND state.

Render states enable

• Preview whole glTF files

Press ALT + G on your glTF file, or look for the command Preview 3D Model in VSCode's list of commands (CTRL + SHIFT + P) and use that.

• Preview embedded dataURIs

Place the document cursor on a dataURI, or on a block that has been folded closed with a dataURI in its uri field, then press ALT + D or look for the command Inspect Data URI in VSCode's list of commands (CTRL + SHIFT + P) and use that.

  • Previewing embedded shaders works, but the shader previews are read-only (for now)
  • Previewing embedded JPG and PNG images works.
  • Previewing buffer data is not (yet?) supported.

Note that previewed shaders are displayed with a .glsl file extension. It is recommended that you install a 3rd-party syntax highlighter with support for *.glsl, for example Shader Language Support for VSCode by slevesque, to enable syntax highlighting in shader previews.

Note that many dataURIs are quite long and can look bad in the editor. Hover your mouse over the line numbers in the left margin to reveal little "-" icons that can fold closed blocks of JSON. Fold closed the innermost block containing the uri field. You can still select the name of the block that got folded and press ALT + D to preview the contents of that uri without unfolding it.

Extension Settings

This version of the extension does not offer any user-defined settings.

Source code

on GitHub. See CONTRIBUTING.md.

License

Apache 2.0, see LICENSE.md.

Release Notes

See CHANGELOG.md.

gltf-vscode's People

Contributors

emackey avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.