Custom embed !

Back to overview

We spent the week working on the embedded viewer, and you can now customize several options directly on it, simply by editing the embed code you find on the bottom nav bar of the viewer on Sketchfab. The main options are autostart, autospin and controls.

Here is an example:

<iframe frameborder="0" height="400" width="600"  allowFullScreen webkitallowfullscreen="true" mozallowfullscreen="true"  src="http://skfb.ly/4jihfcb?autostart=0&autospin=0.5&controls=1"></iframe>

The result:  

(Click on the play button to launch the 3D viewer)

autostart: set this to 1 or 0. If set to 0 (as in this example), the viewer will display the screenshot of the model with a “play” button, and will only launch when the user clicks on it. If set to 1, the viewer will launch as soon as the page is loaded. This option can be useful if  your page is full of embedded models from sketchfab: you’d better set it to ‘0’ in order to stop the autostart and not overload the user’s browser.autospin: any number. You want to make your model spin on itself, now you can! The number you will set here is the speed of the rotation made by the 3D model. Set a negative value and your model will spin in the other direction.

controls: set this to 1 or 0. If set to 0, the controls in the embed will not be shown.Navigate (reminder): there are two ways to observe and manipulate your models: orbit, known as turntable, or like in a first person shooter (FPS). You can switch from orbit mode  to FPS mode  by clicking on these icons on the bottom left corner. In the FPS mode, you can now use the arrow keys to navigate in addition to ‘awsd’. More infos here: http://sketchfab.com/faq/#navigate

NB: the full screen mode is disabled here because posterous automatically disables it, but it should work on most places. 

About the author

sketchfab-admin


Leave a Reply

Your email address will not be published. Required fields are marked *

  • Evan says:

    Hello,

    Is there any way to get an option for the old embed code? I’m formatting the viewer for a webpage and the new version does not seem to scale. . . at all. What the heck? The old embed code was perfect! Why the change???

Related articles