Viewer API get texture list issue

(Ekphrastic Io) #1

I’ve pretty much got everything working in regards to the Sketchfab Viewer API but i seem to have been stumped by get texture list.

simple model with two textures which i can access via manage textures screen shot for completness

when i check the console with api.getTextureList( function( err, textures ) {
console.log( textures );
} ); i seem to only be able to see the current texture applied to the model. unless im missing something?

End goal is swapping textures (not externally hosted CORS textures) textures within the model. thanks for any pointers

(Paul Sketch) #2

Viewer doesn’t get texture not applied.

If you don’t want to host it yourself, other “hacky” solution it to attach it somehow to the scene but it impacts perf. Either very small quad with very scale value for instance, or quad out of viewer eye (and backface facing the original camera pose with backface culling enabled), or material on a transparent (blending 0) mesh, etc.

Viewer API GetTextureList function always return empty