document.addEventListener("DOMContentLoaded", function() {

    // Set the image source based on the demo number
    const imgSrc = `img/index-image.png`;

    // Get the canvas element and its context
    const canvas = document.getElementById("canvas");
    const ctx = canvas.getContext("2d");

    // Load the image
    const img = new Image();
    img.src = imgSrc;

    // Draw the image on the canvas when it loads
    img.onload = function() {
        ctx.drawImage(img, 0, 0, canvas.width, canvas.height);
    };

});
