Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yiskang/forge-restore-viewstate-demo
This sample is demonstrating how to manage viewpoints in a viewer panel
https://github.com/yiskang/forge-restore-viewstate-demo
Last synced: 21 days ago
JSON representation
This sample is demonstrating how to manage viewpoints in a viewer panel
- Host: GitHub
- URL: https://github.com/yiskang/forge-restore-viewstate-demo
- Owner: yiskang
- License: mit
- Created: 2020-02-21T02:55:17.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-12T02:23:41.000Z (about 2 years ago)
- Last Synced: 2024-10-31T02:52:15.615Z (2 months ago)
- Language: JavaScript
- Size: 529 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Node.js](https://img.shields.io/badge/Node.js-8.9.4-blue.svg)](https://nodejs.org/)
[![npm](https://img.shields.io/badge/npm-5.8.0-blue.svg)](https://www.npmjs.com/)
![Platforms](https://img.shields.io/badge/platform-windows%20%7C%20osx%20%7C%20linux-lightgray.svg)
[![License](http://img.shields.io/:license-mit-blue.svg)](http://opensource.org/licenses/MIT)# Autodesk Forge Viewpoint Management Panel Demo
## Overview
This sample is demonstrating how to manage viewpoints in a viewer panel:
- Save current viewpoint (camera state) into db
- Retrieve saved viewpoints from db via REST API
- Store saved viewpoints with a single mouse-clicking on the docking panel## Thumbnail
![thumbnail](/thumbnail.jpg)## Requirements
* node.js v8.9.4 or later
1. Download and install [Node.js](http://nodejs.org/) (that will install npm as well)
2. Download this repo anywhere you want
3. Execute 'npm install', this command will download and install the required node modules automatically for you.
```bash
npm install
```Before starting the server, you have to set the Forge credentials up.
- Mac OSX/Linux (Terminal)
```bash
export FORGE_CLIENT_ID=<>
export FORGE_CLIENT_SECRET=<>
```- Windows (use **Node.js command line** from Start menu)
```bash
set FORGE_CLIENT_ID=<>
set FORGE_CLIENT_SECRET=<>
```- Windows (use **Powershell** from Start menu)
```bash
$env:FORGE_CLIENT_ID="<>"
$env:FORGE_CLIENT_SECRET="<>"
```Then Run the server
```bash
npm start
```And visit http://127.0.0.1:8089
## License
This sample is licensed under the terms of the [MIT License](http://opensource.org/licenses/MIT).
Please see the [LICENSE](LICENSE) file for full details.## Written by
Eason Kang
Forge Partner Development
https://developer.autodesk.com/
https://forge.autodesk.com/blog