Api.translate returning DOMException

viewer-api
api

(Flynam) #1

Hi there,

I am trying to use the undocumented api.translate function to move a single object in a scene. I get the node ID of the object api.getNodeMap and then I pass this to api.translate with the following parameters:

api.translate(nodeID, [0, 0, 10], 0, 1);

But I get an error in my Chrome console as follows:

Any ideas? I've tried adding a callback as an additional parameter but I get the same error.

Thanks,
Frank


(Shaderbytes) #2

There is something throwing an error in the api on my side as well ,

Uncaught TypeError: i is not a function(…)(anonymous function) @ embed-595cf8f….js:3n @ embed-595cf8f….js:2nrWrapper @ embed?api_version=1.0.0&api_id=5140826370169957&internal=0&ui_infos=0&ui_controls=0&watermark=1&con…:6

and also sometimes :

POST https://app.getsentry.com/api/64645/store/?sentry_version=7&sentry_client=raven-js%2F2.1.1&sentry_key=b33f284d8e42464e90397aa57b31d34a 429 (TOO MANY REQUESTS)nrWrapper @ embed?api_version=1.0.0&api_id=5140826370169957&internal=0&ui_infos=0&ui_controls=0&watermark=1&con…:6(anonymous function) @ embed-595cf8f….js:2_makeXhrRequest @ embed-595cf8f….js:2_makeRequest @ embed-595cf8f….js:2_send @ embed-595cf8f….js:2_processException @ embed-595cf8f….js:2_handleStackInfo @ embed-595cf8f….js:2captureException @ embed-595cf8f….js:2n @ embed-595cf8f….js:2nrWrapper @ embed?api_version=1.0.0&api_id=5140826370169957&internal=0&ui_infos=0&ui_controls=0&watermark=1&con…:6

but it still works regardless of the errors :

http://www.shaderbytes.co.za/sketchfab/development/api/examples/example_6.html

(take note im using my API Utility which abstracts the sketchfab api call to translate)


(Edsahergom) #3

Hello shaderbytes. I am new using the API utility and I am trying to move and object inside my scene. I am using this code sketchfabAPIUtility.translate ("CAR", sketchfabAPIUtility.vectorForward, 5, 10) but it is not working correctly. The object is going to the wrong direction and it is not taking the distance that i put as well. The only thing that is working is the duration. Am I writing the code in the wrong way?

I really appreciate any help you can provide me.

Thanks,

Edwin Hernandez


(Shaderbytes) #4

You didnt provide a link for me to look at what is happening ??


(Edsahergom) #5

Hello,

I am geting the same problem when I load a new var urlid. Could you fix it?

Thanks.