Skip to content

Latest commit

 

History

History
 
 

app_web

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

glTF Sample Viewer Web App

This is the official Khronos glTF 2.0 Sample Viewer using WebGL: glTF 2.0 Sample Viewer

Viewer

Link to the live glTF 2.0 Sample Viewer.

Usage

Controls

click + drag : Rotate model

scroll : Zoom camera

GUI : Use to change models and settings

Change glTF model

  • Choose one of the glTF models in the selection list
  • Drag and drop glTF files into viewer

Change the environment map

  • Drag and drop a .hdr panorama file

Setup

For local usage and debugging, please follow these instructions:

  1. Make sure Git LFS is installed.

  2. Checkout the master branch

  3. Pull the submodules for the required glTF sample models and environments git submodule update --init --recursive

  4. Build the web app

    • cd app_web
    • run npm install
    • start a demo in the browser with npm run dev, and open http://localhost:8000.

When making changes, the project is automatically rebuilt and the app_web/dist/ directory is populated with the web app. This directory contains all files necessary for deployment to a webserver.

Debugging

  • Requirements
  • Install the Debugger for Chrome or Debugger for Firefox extension for Visual Studio Code
  • Open the project directory in Visual Studio Code and select Debug->Add Configuration->Chrome or Debug->Add Configuration->Firefox so the .vscode/launch.json file is created.
  • Append /app_web/dist to ${workspaceFolder} in the launch.json file
  • Debug->Start Debugging should now launch a Chrome or Firefox window with the sample viewer and VS Code breakpoints should be hit.