<div class="model">
        <div id="container3d_replace"></div>
        <div class="loadingContent" id="loadingContent">            
            <div class="loading">
                <img src="https://codepencdn.unlimited3d.com/onCameraInteraction/assets/images/loader.gif" alt="loader" class="loading-img"><br>
                Loading 3D
            </div>
        </div>
    </div>

    <div class="drag-and-scroll">
        <img src="https://codepencdn.unlimited3d.com/onCameraInteraction/assets/images/drag_and_scroll.svg" alt="dragAndScroll" class="drag-and-scroll-image">
        <p class="drag-and-scroll-p">
            drag and scroll to zoom and rotate
        </p>
    </div>
    
    <script src="https://cdn.threedium.co.uk/deviceCheck/v1.0/script.js"></script>
    <script src="https://distcdn.unlimited3d.com/pres/v/2.5.0/unlimited3d.min.js"></script>
body, html {
    margin:0;
    overflow: hidden;
    font-size: 16px;
}

img {
    height: auto;
    width: auto;
    object-fit: contain;
    object-position: top center;
}

@font-face {
    font-family: Loccitane-Bold;
    src: url("https://codepencdn.unlimited3d.com/onCameraInteraction/assets/fonts/LoccitaneSerif-Bold.otf");
}

@font-face {
    font-family: Loccitane-Regular-Serif;
    src: url("https://codepencdn.unlimited3d.com/onCameraInteraction/assets/fonts/LOccitaneSerif-Regular.ttf");
}

@font-face {
    font-family: Loccitane-Regular;
    src: url("https://codepencdn.unlimited3d.com/onCameraInteraction/assets/fonts/LOccitaneSans-Regular.ttf");
}

.objCover {
    object-fit: cover;
}

.loadingContent {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    -webkit-transform: translate(-50%, -50%);
    text-align: center;
    font-size: 1.1rem;
    font-weight: 400;
    font-stretch: normal;
    font-style: normal;
    line-height: normal;
    letter-spacing: normal;
    color: #000;
    display: flex;
    flex-direction: column;
}

.loadingContent img {
    width: 140px;
    height: 100%;
}

.model,
#container3d_replace {
    transition: height 1s;  
    width: 100vw;
    height: 100vh;
}

/*drag and scroll*/
.drag-and-scroll {
    display: flex;
    position: absolute;
    flex-direction: column;
    align-items: center;
    text-align: center;
    bottom: 20px;
    left: 0;
    width: 100%;
}

.drag-and-scroll-image {
    width: 4rem;
    height: auto;
    animation-name: drag-and-scroll;
    animation-duration: 2s;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
    -webkit-animation-iteration-count: infinite;
    -webkit-animation-name: drag-and-scroll;
    -webkit-animation-duration:2s;
    -webkit-animation-timing-function: linear;
}

.drag-and-scroll-p {
    text-transform: uppercase;
    font-size: 0.6rem;
    margin-top: 0;
    color: #4F4E4F;
}

@keyframes drag-and-scroll {
    0%   {-webkit-transform: translate(0, 0);}
    25%  {-webkit-transform: translate(-2rem, 0);}
    50%  {-webkit-transform: translate(0, 0);}
    75%  {-webkit-transform: translate(2rem, 0);}
    100% {-webkit-transform: translate(0, 0);}
}

@-webkit-keyframes drag-and-scroll {
    0%   {-webkit-transform: translate(0, 0);}
    25%  {-webkit-transform: translate(-2rem, 0);}
    50%  {-webkit-transform: translate(0, 0);}
    75%  {-webkit-transform: translate(2rem, 0);}
    100% {-webkit-transform: translate(0, 0);}
}

@media (max-width: 1399px) {
	html, body {
		font-size: 15px;
    }
}

@media (max-width: 1199px) {
	html, body {
		font-size: 14px;
    } 
}

@media (max-width: 991px) {
	html, body {
		font-size: 13px;
    }    
}

@media (max-width: 767px) {
	html, body {
		font-size: 12px;
    }
}

@media (max-width: 575px) {
    html, body {
		font-size: 10px;
    }
}

@media (max-width: 360px) {
    
}
var flagInterract = true;

var options = {    
    distID: 'latest',
    solution3DName: 'shower-oil-devdocs',
    projectName: 'documentation-examples',
    solution3DID:  '55757',
    containerID: 'container3d_replace',

    onCameraInteraction: function(){
        if(flagInterract){
            document.getElementsByClassName('drag-and-scroll')[0].style.display = 'none';
            
            Unlimited3D.enableAutoRotate({ 
                enable: false,
            });  

            flagInterract = false;
        }       
    }
};

Unlimited3D.init(options, {}, function(error, status){
    if (error || !status) {
        console.log(error);

        return;
    }

    loadingContent.style.display = "none";

    Unlimited3D.setSelectable([]);    
});

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.