APS(Autodesk Platform Services) Viewer is a WebGL-based, client-side JavaScript library for 3D and 2D model rendering. The Viewer lets you view and share design models on the web from a wide array of products.
I created a sample based on Next.js which is a framework using React.js as the Front End and Node.js as the server.
This sample is using oAuth2 V2 API to get 2-legged token, and APS Viewer V7.
To run the sample, you need to get Object URN of a model which is uploaded in OSS Bucket and translated it in advance. Please refer to the Autodesk Forge Tools for easiest way to get the urn. On the Autodesk Forge Tools, after uploading a model to OSS Bucket and translate it, then right click on the model and 'Copy Object URN to Clipboard'.
- An APS account: Getting Started with APS
- A text editor of your choice. (For example Visual Studio Code)
- A basic knowledge of :
- HTML and CSS
- JavaScript ES6
- Command-line programs
- Node.js Command Line (for Windows users)
- Terminal (for Mac/Linux/Unix users)
Follow these instructions to get the app running locally:
- run
git clone
this repository - Create .env.local file in a root folder and set ClientId and ClientSecret.
- CLIENT_ID=XXXXXXXXXX
- CLIENT_SECRET=XXXXXXXXXX
- Set Object URN to documentId in a
components/viewer.js
- run
npm install
- run
npm run dev
This will get a server running locally, open http://localhost:3000
on your browser to see the app running.
This sample is licensed under the terms of the MIT License. Please see the LICENSE file for full details.
Ryuji Ogasawara.
Developer Advocate
Developer Advocacy & Support