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. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource


Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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


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.


<!-- ShapeDiver Viewer -->
<script crossorigin src=""></script>
<link rel='stylesheet' type='text/css' href=''>

<div id="root"></div>




                class SDViewer extends React.Component {
  constructor(props) {
    // create a reference to the viewer container created in render
    this.containerSD = React.createRef();
    // ShapeDiver Viewer API object
    this.api = null;
    // Parameter definitions, will get set once model has been loaded and parameters are registered
    this.parameters = null;
  async componentDidMount() {
    // container for the viewer
    // here the reference works and the container is loaded correctly
    let _container = this.containerSD.current;

    // ShapeDiver Viewer constructor settings
    // Refer to for details
    let settings = {
      container:   _container,
      showSceneMode: 1 // do not show the scene automatically
    // construct an instance of the viewer
    this.api = new window.SDVApp.ParametricViewer(settings);
    // register a ShapeDiver CommPlugin
    await this.api.plugins.registerCommPluginAsync({
      // ticket of the model as shown on
      ticket: this.props.ticket,
      // URL of the ShapeDiver backend system used
      modelViewUrl: this.props.modelViewUrl,
      // runtime id to use for this CommPlugin (you might register several)
      runtimeId: 'CommPlugin_1',
      // the following setting tells the viewer to wait with loading of geometry
      deferGeometryLoading: true 
    console.log('ShapeDiver CommPlugin successfully loaded');
    // get parameters of the model
    this.parameters = await this.api.parameters.get().data;
    console.log('Available model parameters', this.parameters);
    // optionally change parameter values before showing the scene
    //await this.api.parameters.updateAsync([

    // refresh (load geometry), because the initial parameter update might not have changed any values
    await this.api.plugins.refreshPluginAsync('CommPlugin_1');
    // finally show the scene
    await this.api.updateSettingAsync('', true);
  render() {
    return (
      <div ref={this.containerSD} style={{width: '100%', height: '600px'}} />

  <SDViewer ticket = "20f9d15ecb236b79c4c342f2714558f571d34ae17fc3678f09a4e6742f28045119010401d66d47bd2f4c0a4a5ae92be36c560606effd0a98ec6ebdcec3975a5fd947d156338ff31e4a3c142a7eb4aa864f62d3db3938be957ab118903125b434296303731c19772d5a7fc89ae42348eba26888a80fdd-75013a6ebb275765f424fa8c2b7976a5" modelViewUrl = "eu-central-1" />,