Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
<script>
    document.addEventListener('DOMContentLoaded', () => {
        // Create a Visualizer instance
        const visualizer = new WizartDeploymentKit.createVisualizerVisualizer({
            token: 'YOUR_WEB_TOKEN', // Replace with your actual Web Token
            targetElement: document.getElementById('visualizer-container'),
            layoutSettings: {
                layout: WizartDeploymentKit.LAYOUTS.FULL_SCREEN
            },
            sceneData: {
                openWithCustomProduct: new WizartDeploymentKit.CustomProduct(
                    // Define custom product properties
                    WizartDeploymentKit.PRODUCT_TYPES.WALL_PANEL, // Product type
                    "Custom product name", // Product name
                    "P277-VD343534",       // Vendor code
                    "m",                   // Unit of measurement
                    3,                     // Width (in meters)
                    2.5,                   // Height (in meters)
                    "https://texture-url.jpg" // Product texture URL
                )
            },
        });

        // Load and display the Visualizer
        visualizer.load().then(() => {
            visualizer.show();
        });
    });
</script>

...