Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


                <div class="container">
  <div class="iframe-container">
    <iframe id="api-frame"></iframe>
  <div class="explainer" id="explainer">
    Set object visibility example. Object visibility is set by its instanceID. It helps to make an index of names and indices of the nodes right after the scene has loaded.
  <div class="controls" id="controls">
    <input type="checkbox" id="poe" checked>
    <label for="poe">Poe</label>    
    <input type="checkbox" id="rey" checked>
    <label for="rey">Rey</label>    
    <input type="checkbox" id="finn" checked>
    <label for="finn">Finn</label>


body {
  padding: 0;
  margin: 0;
  width: 100vw;
  height: 100vh;

  -webkit-font-smoothing: antialiased;
  -moz-font-smoothing: grayscale;
  font-family: Open Sans, sans-serif;

* {
  box-sizing: border-box;

.container {
  display: flex;
  flex-direction: column;
  height: 100%;

.iframe-container {
  position: relative;
  width: 100%;
  flex: 1;
  display: flex;

.iframe-container > iframe {
  border: 0;
  width: 100%;
  flex: 1;

.explainer {
  height: 100px;
  padding: 15px 15px 0 15px;
  background-color: #e2e2e2;
  overflow: auto;

.controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  flex-shrink: 0;
  height: 80px;
  padding: 15px 0 0 15px;
  background-color: #f2f2f2;

  overflow: auto;

.controls > * {
  margin-right: 15px;
  margin-bottom: 15px;



                var version = "1.11.0";
var urlid = "fa9033e3d7174cb08064e5f509a3d25e";

let nodemapByName = {}

const nodeNames = {
  poe: [
  rey: [
  finn: [

const setVisibilityByNodename = function (api, names, doShow) {
  names.forEach(name => {
    if (doShow) {[name].instanceID);     
    } else {

function actionSkfb() {
  // initialize
  var iframe = document.getElementById("api-frame");
  var client = new window.Sketchfab(version, iframe);

  var error = function () {
    console.error("Sketchfab API error");

  var success = function (api) {
    api.start(function () {    
      api.addEventListener("viewerready", function () {
        api.getNodeMap(function(err, nodes) {
          for (const key in nodes) {
            if (nodes[key].type === 'MatrixTransform') {
              nodemapByName[nodes[key].name] = nodes[key]
        const poe = document.getElementById("poe")
        const rey = document.getElementById("rey")
        const finn = document.getElementById("finn")
        poe.addEventListener("change", function () {
          setVisibilityByNodename(api, nodeNames.poe, poe.checked)
        rey.addEventListener("change", function () {
          setVisibilityByNodename(api, nodeNames.rey, rey.checked)
        finn.addEventListener("change", function () {
          setVisibilityByNodename(api, nodeNames.finn, finn.checked)
  client.init(urlid, {
    success: success,
    error: error,
    ui_stop: 0,
    ui_inspector: 0, //disable the inspector and avoid downloading the wireframe
    ui_infos: 0, //need biz account
    ui_controls: 0, //need biz account
    scrollwheel: 1,
    ui_watermark: 0