All Projects → Autodesk-Forge → viewer-navigation.sample

Autodesk-Forge / viewer-navigation.sample

Licence: MIT license
3D model navigation pane: Navigates a 3D model using a synchronized 2D map pane

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects
HTML
75241 projects

Labels

Projects that are alternatives of or similar to viewer-navigation.sample

GbxDump
A Microsoft Windows application that displays the contents of the file header of *.Gbx files used by the Nadeo game engine GameBox.
Stars: ✭ 19 (-60.42%)
Mutual labels:  viewer
stl-gcode-viewer
STL/OBJ/GCode Viewer in Qt
Stars: ✭ 49 (+2.08%)
Mutual labels:  viewer
go-spice
SPICE proxy library, written in go
Stars: ✭ 23 (-52.08%)
Mutual labels:  viewer
cubiomes-viewer
An efficient graphical Minecraft seed finder and map viewer.
Stars: ✭ 346 (+620.83%)
Mutual labels:  viewer
inker
Measure & copy CSS from your designs of Sketch, Gravit Designer, Adobe XD, Vectr, etc. Pro version: https://github.com/inker8/
Stars: ✭ 56 (+16.67%)
Mutual labels:  viewer
gemini-viewer
WebGL BIM Viewer based on xeoKit-sdk, written with TypeScript.
Stars: ✭ 24 (-50%)
Mutual labels:  viewer
paper-terminal
Print Markdown to a paper in your terminal
Stars: ✭ 33 (-31.25%)
Mutual labels:  viewer
ManOpen
A macOS GUI application for viewing Unix manual pages.
Stars: ✭ 18 (-62.5%)
Mutual labels:  viewer
StlVault
3D object viewer and organizer
Stars: ✭ 104 (+116.67%)
Mutual labels:  viewer
ccViewer
CryptCloudViewer source codes
Stars: ✭ 66 (+37.5%)
Mutual labels:  viewer
Vudit
A file viewer for Android
Stars: ✭ 40 (-16.67%)
Mutual labels:  viewer
Viewer
Viewer is a configurable application template that enables you to display an ArcGIS web map using a variety of tools.
Stars: ✭ 56 (+16.67%)
Mutual labels:  viewer
icosa-viewer
3D Viewer component for Tilt Brush / Open Brush, Google Blocks files and their derivatives
Stars: ✭ 24 (-50%)
Mutual labels:  viewer
cyan
Cyan Color Converter
Stars: ✭ 68 (+41.67%)
Mutual labels:  viewer
json-log-viewer
Powerful terminal based viewer for JSON logs using ncurses.
Stars: ✭ 171 (+256.25%)
Mutual labels:  viewer
lk
Simple Web Image Viewer
Stars: ✭ 22 (-54.17%)
Mutual labels:  viewer
saccade
A sophisticated scientific image viewer for Linux with OpenGL support and synchronized viewports
Stars: ✭ 38 (-20.83%)
Mutual labels:  viewer
PospoliteView
Pospolite View aims to be a simple HTML viewer engine fully made in Free Pascal.
Stars: ✭ 29 (-39.58%)
Mutual labels:  viewer
3D-Detection-Tracking-Viewer
3D detection and tracking viewer (visualization) for kitti & waymo dataset
Stars: ✭ 150 (+212.5%)
Mutual labels:  viewer
forge.commandline-nodejs
Authorisation and translation via console application: Command line tool demonstrating the authorisation and translation process using a Node.js console application
Stars: ✭ 15 (-68.75%)
Mutual labels:  viewer

viewer-navigation.sample

Node.js npm Platforms License

oAuth2 ForgeSDK Model-Derivative Viewer

js-happiness-style

Description

This sample demonstrates how to navigate on a model with 3D and 2D in sync.

Live Demo

Thumbnail

thumbnail

Setup

  • For using this sample, you need an Autodesk developer credentials. Visit the Forge Developer Portal, sign up for an account, then create an app. For this new app, use http://localhost:3000/api/forge/callback/oauth as Callback URL, although is not used on 2-legged flow. Finally take note of the Client ID and Client Secret.

  • This sample is hard-coded with the viewboxes for the specific Revit models:rac_basic_sample_project.rvt and rac_advanced_sample_project.rvt. you can find them in [Samples] folder of Revit installation path OR Revit on-line help.

  • Please use other ways to upload the model file to translate the source model to the format for Forge Viewer in advance. Get the model base64 urn. Make sure the logic object name is consistent to what are defined in viewboxes json, e.g. revithouse and racadvanced

  • provide your client id, client secret, bucket name in config.js

Run locally

Install NodeJS.

Clone this project or download it. It's recommended to install GitHub desktop. To clone it via command line, use the following (Terminal on MacOSX/Linux, Git Shell on Windows):

git clone https://github.com/developer-autodesk/viewer-navigation.sample

To run it, install the required packages, set the enviroment variables with your client ID & secret and finally start it. Via command line, navigate to the folder where this repository was cloned and use the following:

Mac OSX/Linux (Terminal)

npm install
export FORGE_CLIENT_ID=<<YOUR CLIENT ID FROM DEVELOPER PORTAL>>
export FORGE_CLIENT_SECRET=<<YOUR CLIENT SECRET>>
export FORGE_BUCKET=<<YOUR OWN UNIQUE BUCKET NAME - OPTIONAL>>  
npm run dev

Windows (use Node.js command line from Start menu)

npm install
set FORGE_CLIENT_ID=<<YOUR CLIENT ID FROM DEVELOPER PORTAL>>
set FORGE_CLIENT_SECRET=<<YOUR CLIENT SECRET>>
set FORGE_BUCKET=<<YOUR OWN UNIQUE BUCKET NAME - OPTIONAL>>
npm run dev

Open the browser: http://localhost:3000.

To prepare the models, run the Initial Setup endpoint. This still under development, so there is not feedback... just access the endpoint to start the setup process, wait a few minutes to translate the models.

Important: do not use npm start locally, this is intended for PRODUCTION only with HTTPS (SSL) secure cookies.

Deploy on Heroku

To deploy this application to Heroku, the Callback URL must use your .herokuapp.com address. After clicking on the button below, at the Heroku Create New App page, set your Client ID & Secret and the correct callback URL.

Deploy

Watch this video on how deploy this sample to Heroku.

Packages used

All Autodesk Forge NPM packages are included by default, see complete list of what's available at NPM website. Some other non-Autodesk packaged are used, including express.

Tips & tricks

For local development/testing, consider use nodemon package, which auto restart your node application after any modification on your code. To install it, use:

sudo npm install -g nodemon

Then, instead of npm run dev, use the following:

npm run nodemon

Which executes nodemon server.js --ignore www/, where the --ignore parameter indicates that the app should not restart if files under www folder are modified.

Troubleshooting

After installing Github desktop for Windows, on the Git Shell, if you see a error setting certificate verify locations error, use the following:

git config --global http.sslverify "false"

License

This sample is licensed under the terms of the MIT License. Please see the LICENSE file for full details.

Written by

Originally by Shen Hong (Autodesk China)

Updated by Augusto Goncalves (Forge Partner Development) & Bryan Huang (Forge Partner Development)

http://forge.autodesk.com

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].