Api.gotoAnnotation apparently no longer works as before


(Madalin Berechet) #1

Hi,

before: api.gotoAnnotation = pop up annotation + focus the camera on annotation

now: api.gotoAnnotation = pop up annotation WITHOUT camera moving

When using Sketchfab Viewer annotation selector all works fine, but not when using Sketchfab API.

See the classic example (tutorial) of Mieke Roth: http://miekeroth.com/blog/2016/02/03/real-3d-model-application/


(Madalin Berechet) #2

This could be fixed with:

api.gotoAnnotation(index,function(err,index){
                        api.getAnnotationList( function( err, annotations ) {
                            api.lookat(
                                annotations[index].eye, // eye position
                                annotations[index].target,   // target to lookat
                                1           // duration of the animation in seconds
                            );
                        } );
                    });

But why api.gotoAnnotation() it has stopped working as before?
Also when the initialization option annotations_visible is set to 0 (hide annotation, just camera jump), api.gotoAnnotation(index) return an error:

embed-625bcc6….js:1 {"0":{"isTrusted":true}}(anonymous function) @ embed-625bcc6….js:1n @ commons-48988a8….js:19nrWrapper @ embed?api_version=1.0.0&api_id=08765641391534151&annotations_visible=0&autostart=1&preload=1&transp…:6
embed?api_version=1.0.0&api_id=08765641391534151&annotations_visible=0&autostart=1&preload=1&transp…:6 Uncaught DataCloneError: Failed to execute 'postMessage' on 'Window': An object could not be cloned.

(Stephomi) #3

Thanks for the report, we'll try to get it fixed soon.


(Miekeroth) #4

thanks @MadalinBerechet!


(Madalin Berechet) #5

It seems to work. Thank you all.