Discussions

Embed the Threekit Player

The Threekit player can be embedded in a webpage by loading it inside a div element

What is the Threekit Player?

The Threekit Player is your viewer for the 3D or Virtual Photographer configurator built in Threekit. The player not only displays your visuals, but it also provides robust functionality for you to utilize to power your entire experience. Embedding it into your app or webpage is the first step in integrating Threekit.

How to Embed the Player

There are only 4 things needed to embed the player in its simplest form:

  1. A script tag with Threekit's Javascript bundle. Ensure it points to the environment your asset lives in: preview, admin-fts
  2. A div element to load the player in
  3. A public authorization token
  4. An asset ID

You will pass an object with those parameters to the now available window.threekitPlayer() function and that will initialize the Threekit player in the div you specified.

Having trouble seeing the fiddle? Try turning off your adblocker

Conclusion

That's Embedding the Threekit Player 101 for you. For more details on specifics and to see what other optional parameters are available to you, check out the Embedding the Threekit Player documentation.


What’s Next

Learn how to set configurations via API - the first step in creating custom UIs.