简体   繁体   中英

Loading a model into the 2D/3D viewer - Autodesk Forge

I'm trying to run the Autodesk viewer-navigation.sample link on my machine but I get just a loading screen and nothing happens.

I think it's because I haven't loaded the model, I'm not sure I understand what it means to do:

To prepare the models, run the Initial Setup endpoint.

But when I navigate to http://localhost:3000/forge/initialsetup when the server is running I get: Cannot GET /forge/initialsetup

I did set in the Autoforge app the callback url to be http://localhost:3000/api/forge/callback/oauth

I also did run:

npm install
set FORGE_CLIENT_ID=<<YOUR CLIENT ID FROM DEVELOPER PORTAL>>
set FORGE_CLIENT_SECRET=<<YOUR CLIENT SECRET>>

What else can be done to make it work?

As a temporary workaround, till we'll fix it, you could try either define a FORGE_BUCKET env variable:

set FORGE_BUCKET=someuniquename2d3d

or within source code (forge.js) change the line 45:

var ossBucketKey = process.env.FORGE_BUCKET || 'navigationsample3d2d';

by replacing the 'navigationsample3d2d' string with something like 'someveryuniquename2d3d' .

This should work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM