<div class="model">
<div id="container3d_replace"></div>
<div class="loadingContent" id="loadingContent">
<div class="loading">
<img src="https://codepencdn.unlimited3d.com/showHideAnnotation/assets/images/loader.gif" alt="loader" class="loading-img"><br>
Loading 3D
</div>
</div>
</div>
<div class="buttons">
<button onclick="show()">Show</button>
<button onclick="hide()">Hide</button>
</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/showHideAnnotation/assets/fonts/LoccitaneSerif-Bold.otf");
}
@font-face {
font-family: Loccitane-Regular-Serif;
src: url("https://codepencdn.unlimited3d.com/showHideAnnotation/assets/fonts/LOccitaneSerif-Regular.ttf");
}
@font-face {
font-family: Loccitane-Regular;
src: url("https://codepencdn.unlimited3d.com/showHideAnnotation/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 {
width: 100vw;
height: 100vh;
}
.buttons {
position: absolute;
left: 50%;
transform: translateX(-50%);
bottom: 5vh;
display: flex;
align-items: center;
text-align: center;
text-transform: uppercase;
gap: 10px;
}
.buttons button {
font-family: 'Century Gothic Std';
font-style: normal;
font-weight: 500;
font-size: 13px;
line-height: 20px;
border: 1px solid #000000;
border-radius: 10px;
padding: 10px 15px;
cursor: pointer;
}
@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;
}
.buttons button {
padding: 5px 10px;
}
}
@media (max-width: 575px) {
html, body {
font-size: 10px;
}
}
@media (max-width: 360px) {
}
var options = {
distID: 'latest',
solution3DName: 'shower-oil-devdocs',
projectName: 'documentation-examples',
solution3DID: '55757',
containerID: 'container3d_replace',
};
Unlimited3D.init(options, {}, function(error, status){
if (error || !status) {
console.log(error);
return;
}
loadingContent.style.display = "none";
Unlimited3D.setSelectable([]);
Unlimited3D.getAvailableAnnotations(function(error, result) { console.log(result); });
});
function show(){
Unlimited3D.showAnnotations({
annotationObjects:[{
annotations: ["Annotation-01", "Annotation-02", "Annotation-03", "Annotation-04", "Annotation-05"]
}]
});
}
function hide(){
Unlimited3D.hideAnnotations({
annotations: ["Annotation-01", "Annotation-02", "Annotation-03", "Annotation-04", "Annotation-05"]
});
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.