GetSomeRest / library-javascript-view.and.data.api

This is a JavaScript library providing a high level wrapper for the Autodesk View & Data Rest API calls
MIT License
14 stars 7 forks source link

viewer-and-data-test.html won't work #1

Open naugtur opened 10 years ago

naugtur commented 10 years ago

viewer-and-data-test.html throws errors when opened.

Replacing old references to viewer with

    <link rel="stylesheet" href="https://developer.api.autodesk.com/viewingservice/v1/viewers/style.css" type="text/css">
    <script src="https://developer.api.autodesk.com/viewingservice/v1/viewers/viewer3D.min.js"></script>

makes it run, but I keep getting Error loading document: 9 when the file is already converted and the script tries to view it.

view-data-wrapper-test.html seems to work, but the IMG tags for files are empty, no visual output there.

Tested using latest chrome, with the files loaded from http://localhost:8080/

leefsmp commented 10 years ago

Thanks for the feedback, I've updated the reference. Indeed viewer3D.js does not work anymore, need to use the min version.

Chrome has some more security restriction when the page is open locally. Try with a different browser, ex Firefox. Both example work fine on my side.

You can try the online version on the blog as well if you don't want to drop Chrome away: http://adndevblog.typepad.com/cloud_and_mobile/2014/09/a-handy-wrapper-for-the-javascript-viewer-api.html

http://adndevblog.typepad.com/cloud_and_mobile/2014/08/autodesk-view-data-api-javascript-wrapper.html

Hope that helps.

Regards, Philippe.

naugtur commented 10 years ago

Great response time! Thanks. Additional restrictions are introduced when you use a file:// protocol, and I'm running a local server. I also disabled same-origin-policy to be sure. Same tests performed on Firefox with the same result.

The problem was that I tested it with a .pdf file (thought why not, if it's supported). I switched to a .dwf file and view-data-wrapper-test.html worked as expected.

viewer-and-data-test.html throws Uncaught TypeError: Cannot read property 'toggleProgressive' of undefined when run in Chromium (no webgl) and fails to render with tens of webgl warnings in Chrome and Firefox (all on linux)

Firefox on win7 virtual machine:

Error: WebGL: Can't get a usable WebGL context
TypeError: this.impl is undefined
leefsmp commented 10 years ago

Is your browser WebGL compatible? Are you able to run any other WebGL demo for example?