<div class="model">
<div id="container3d_replace"></div>
<div class="loadingContent" id="loadingContent">
<div class="loading">
<img src="https://codepencdn.unlimited3d.com/showHideAnnotationPointer/assets/images/loader.gif?V=0.1" alt="loader" class="loading-img"><br>
Loading 3D
</div>
</div>
</div>
<div class="box-one-wrapper" id="box-one">
<img src="https://codepencdn.unlimited3d.com/showHideAnnotationPointer/assets/images/close-button.png?v=1.1"
alt="close-image"
class="close-button"
onclick="closeAnnotationPopUp('.box-one-wrapper')">
<div class="box-one">
<img src="" alt="box-one-image" class="box-one-image">
<div class="box-one-helper">
<div class="box-one-header"></div>
<div class="box-one-text"></div>
<a href="https://uk.loccitane.com/almond-collection,83,1,86270,1069347.htmm"
class="read-more"
target="_blank">
Find Out More
</a>
</div>
</div>
</div>
<div class="box-two-wrapper" id="box-two">
<img src="https://codepencdn.unlimited3d.com/showHideAnnotationPointer/assets/images/close-button.png?v=1.1"
alt="close-image"
class="close-button"
onclick="closeAnnotationPopUp('.box-two-wrapper')">
<div class="box-two">
<iframe id="yt-video" class="video" width="560" height="315" src="" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
<div class="box-two-header"></div>
<div class="box-two-text"></div>
<a href="https://uk.loccitane.com/almond-ingredient,83,1,86386,1069659.htm"
class="read-more"
target="_blank"
onclick="readMore('Read More')">
Read More
</a>
</div>
</div>
<div class="box-three-wrapper" id="box-three">
<img src="https://codepencdn.unlimited3d.com/showHideAnnotationPointer/assets/images/close-button.png"
alt="close-image"
class="close-button"
onclick="closeAnnotationPopUp('.box-three-wrapper')">
<div class="box-three">
<video class="video" autoplay muted loop playsinline controls id="box-video">
<source src="">
</video>
<div class="box-three-header"></div>
<div class="box-three-text"></div>
</div>
</div>
<div class="box-four-wrapper" id="box-four">
<img src="https://codepencdn.unlimited3d.com/showHideAnnotationPointer/assets/images/close-button.png"
alt="close-image"
class="close-button"
onclick="closeAnnotationPopUp('.box-four-wrapper')">
<div class="box-four">
<img src="" alt="box-four-image" class="box-four-image">
<div class="box-four-helper">
<div class="box-four-header"></div>
<div class="box-four-text"></div>
</div>
</div>
</div>
<div class="box-five-wrapper" id="box-five">
<img src="https://codepencdn.unlimited3d.com/showHideAnnotationPointer/assets/images/close-button.png"
alt="close-image"
class="close-button"
onclick="closeAnnotationPopUp('.box-five-wrapper')">
<div class="box-five">
<img src="" alt="box-five-image" class="box-five-image">
<div class="box-five-helper">
<div id="one" class="slide-arrows">
<div class="box-five-text">
<i>
“This shower oil is happiness in a bottle, every shower feels like a pamper session.”
</i>
</div>
<div class="box-five-header">Charlotte, Wrexham</div>
</div>
</div>
</div>
</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/showHideAnnotationPointer/assets/fonts/LoccitaneSerif-Bold.otf");
}
@font-face {
font-family: Loccitane-Regular-Serif;
src: url("https://codepencdn.unlimited3d.com/showHideAnnotationPointer/assets/fonts/LOccitaneSerif-Regular.ttf");
}
@font-face {
font-family: Loccitane-Regular;
src: url("https://codepencdn.unlimited3d.com/showHideAnnotationPointer/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;
}
.close-button {
position: absolute;
right: 1rem;
top: 1rem;
cursor: pointer;
}
.box-one-wrapper,
.box-three-wrapper {
position: absolute;
top: 50%;
left: 8vw;
transform: translate(0%, -50%);
-webkit-transform: translate(0%, -50%);
background-color: #CAA62D;
}
.box-two-wrapper {
position: absolute;
top: 50%;
right: 8vw;
transform: translate(0%, -50%);
-webkit-transform: translate(0%, -50%);
background-color: #8E5159;
}
.box-four-wrapper {
position: absolute;
top: 50%;
left: 8vw;
transform: translate(0%, -50%);
-webkit-transform: translate(0%, -50%);
background-color: #7D9573;
}
.box-five-wrapper {
position: absolute;
top: 50%;
left: 8vw;
transform: translate(0%, -50%);
-webkit-transform: translate(0%, -50%);
background-color: #8E5159;
}
.box-two-wrapper,
.box-four-wrapper,
.box-five-wrapper,
.box-one-wrapper,
.box-three-wrapper {
padding: 1.875rem;
border-radius: 1.625rem;
display: none;
width: 25rem;
}
.box-one {
display: flex;
flex-direction: column;
}
.box-one-image,
.box-four-image {
width: 100%;
margin: 1.875rem 0 2rem 0;
}
.box-one-image{
height: 18rem;
}
.box-five-image {
width: 100%;
margin: 1.875rem 0 6rem 0;
}
.video {
height: 20rem;
width: 100%;
margin: 1.875rem 0 2rem 0;
}
.box-one-header,
.box-two-header,
.box-three-header,
.box-four-header,
.box-five-header {
font-family: 'Loccitane-Regular-Serif';
font-style: normal;
font-weight: 700;
font-size: 1rem;
line-height: 1.5rem;
text-align: center;
letter-spacing: 0.3em;
text-transform: uppercase;
color: #FFFFFF;
margin-bottom: 1.25rem;
}
.box-one-text,
.box-two-text,
.box-four-text,
.box-three-text,
.box-five-text {
font-family: 'Loccitane-Regular';
font-style: normal;
font-weight: 400;
font-size: 1.3rem;
line-height: 1.7rem;
text-align: center;
color: #FFFFFF;
}
.box-four-text,
.box-one-text {
margin-bottom: 2rem;
}
.box-two-text {
margin-bottom: 1.25rem;
}
.box-five-text,
.box-three-text {
margin-bottom: 1.5rem;
}
.read-more {
font-family: 'Loccitane-Regular';
font-style: normal;
font-weight: 700;
font-size: 1.2rem;
line-height: 1.875rem;
text-align: center;
text-decoration-line: underline;
color: #FFFFFF;
display: flex;
justify-content: center;
}
.back {
top: 50%;
left: 10px;
position: absolute;
transform: translateY(-50%);
width: 18px;
height: 37px;
cursor: pointer;
z-index: 1000;
}
.next {
top: 50%;
right: 10px;
position: absolute;
transform: translateY(-50%);
width: 18px;
height: 37px;
cursor: pointer;
z-index: 1000;
}
#two,
#three {
display: none;
}
@media (max-width: 1399px) {
html, body {
font-size: 15px;
}
.video {
height: 20rem;
}
}
@media (max-width: 1199px) {
html, body {
font-size: 14px;
}
.box-one-image{
height: 15rem;
}
}
@media (max-width: 991px) {
html, body {
font-size: 13px;
}
}
@media (max-width: 767px) {
html, body {
font-size: 12px;
}
.video {
padding: 0px 0 10px 0;
}
.close-button {
width: 13px;
top: 1rem;
right: 1.5rem;
}
.box-one-wrapper,
.box-two-wrapper,
.box-three-wrapper,
.box-four-wrapper,
.box-five-wrapper {
border-top-left-radius: 15px;
border-top-right-radius: 15px;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
left: 50%;
top: initial;
bottom: 0%;
height: auto;
transform: translate(-50%, 0%);
width: calc(100% - 3.75rem);
}
.box-one,
.box-four,
.box-five {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
width: 100%;
}
.box-one-image,
.box-four-image,
.box-five-image {
margin-right: 10px;
width: 50%;
}
.box-one-helper,
.box-four-helper,
.box-five-helper {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: 50%;
}
.box-one-header,
.box-two-header,
.box-three-header,
.box-four-header {
font-size: 13px;
line-height: 16px;
margin-bottom: 8px;
}
.box-five-header {
font-size: 14px;
line-height: 15px;
margin-top: 15px;
}
.box-one-text,
.box-two-text,
.box-three-text,
.box-four-text,
.box-five-text {
font-size: 11px;
line-height: 16px;
padding: 0;
}
.read-more {
font-size: 12px;
line-height: 14px;
}
.back {
left: 5px;
}
.next {
right: 5px;
}
.mobile_active {
transition: height 1s;
height: 70vh !important;
}
}
@media (max-width: 575px) {
html, body {
font-size: 10px;
}
}
@media (max-width: 360px) {
}
var config = {
camera: checkDevice() == 'desktop' ? 'Camera Publish' : 'Camera Mobile',
cameraControl: { autoRotate: true },
}
var options = {
distID: 'latest',
solution3DName: 'shower-oil-devdocs',
projectName: 'documentation-examples',
solution3DID: '55757',
containerID: 'container3d_replace',
onPointerClick: function(objectsClick){
if(objectsClick.length > 0) {
if(objectsClick[0].type == "annotation"){
iteractAnnotation(objectsClick[0].name);
}
}
}
};
Unlimited3D.init(options, config, function(error, status){
if (error || !status) {
console.log(error);
return;
}
loadingContent.style.display = "none";
Unlimited3D.setSelectable([]);
});
var boxOneHeader = document.querySelector('.box-one-header');
var boxOneText = document.querySelector('.box-one-text');
var boxOneImage = document.querySelector('.box-one-image');
var boxTwoHeader = document.querySelector('.box-two-header');
var boxTwoText = document.querySelector('.box-two-text');
var boxTwoVideo = document.querySelector('.box-two .video');
var YTVideo = document.querySelector('#yt-video');
var boxThreeHeader = document.querySelector('.box-three-header');
var boxThreeText = document.querySelector('.box-three-text');
var boxThreeVideo = document.querySelector('#box-video');
var boxFourHeader = document.querySelector('.box-four-header');
var boxFourText = document.querySelector('.box-four-text');
var boxFourImage = document.querySelector('.box-four-image');
var boxFiveHeader = document.querySelector('.box-five-header');
var boxFiveText = document.querySelector('.box-five-text');
var boxFiveImage = document.querySelector('.box-five-image');
var lastClick = null;
function iteractAnnotation(name) {
if(lastClick == name){
lastClick = null;
} else {
lastClick = name;
}
document.querySelector('.box-one-wrapper').style.display = 'none';
document.querySelector('.box-two-wrapper').style.display = 'none';
document.querySelector('.box-three-wrapper').style.display = 'none';
document.querySelector('.box-four-wrapper').style.display = 'none';
document.querySelector('.box-five-wrapper').style.display = 'none';
document.querySelector('#container3d_replace').classList.add('mobile_active');
switch (lastClick) {
case 'Annotation-01':
document.querySelector('.box-one-wrapper').style.display = 'block';
boxOneHeader.innerText = 'The collection';
boxOneText.innerText = 'Indulge and pamper with the mouth-watering scents and luxurious textures of our Almond Collection, made with sustainably-sourced almonds from the South of France.';
boxOneImage.src = 'https://codepencdn.unlimited3d.com/showHideAnnotationPointer/assets/images/box-one-image.jpg';
break;
case 'Annotation-02':
document.querySelector('.box-two-wrapper').style.display = 'block';
boxTwoHeader.innerText = 'SUSTAINABLY SOURCED';
boxTwoText.innerText = '100% of almonds are sustainably sourced from Provence';
YTVideo.src = 'https://www.youtube.com/embed/dXFC38pZTx4';
break;
case 'Annotation-03':
document.querySelector('.box-three-wrapper').style.display = 'block';
boxThreeHeader.innerText = 'TEXTURE';
boxThreeText.innerHTML = '<i>“Perfect fragrance, perfect texture, perfect lather, perfect product.”</i> <br/><br/> - Sarah, North Yorkshire';
boxThreeVideo.src = 'https://codepencdn.unlimited3d.com/showHideAnnotationPointer/assets/videos/video-one.mp4';
break;
case 'Annotation-04':
document.querySelector('.box-four-wrapper').style.display = 'block';
boxFourHeader.innerText = 'NATURAL FORMULA';
boxFourText.innerHTML = 'Vegan-friendly & made with <br/> 99.4% readily biodegradable ingredients';
boxFourImage.src = 'https://codepencdn.unlimited3d.com/showHideAnnotationPointer/assets/images/box-four-image.png';
break;
case 'Annotation-05':
document.querySelector('.box-five-wrapper').style.display = 'block';
boxFiveHeader.innerText = 'Charlotte, Wrexham';
boxFiveText.innerHTML = '<i>“This shower oil is happiness in a bottle, every shower feels like a pamper session.”</i>';
boxFiveImage.src = 'https://codepencdn.unlimited3d.com/showHideAnnotationPointer/assets/images/box-five-image.png';
break;
default:
document.querySelector('.model').classList.remove('mobile_active');
document.querySelector('#container3d_replace').classList.remove('mobile_active');
document.querySelector('.box-one-wrapper').style.display = 'none';
document.querySelector('.box-two-wrapper').style.display = 'none';
document.querySelector('.box-three-wrapper').style.display = 'none';
document.querySelector('.box-four-wrapper').style.display = 'none';
document.querySelector('.box-five-wrapper').style.display = 'none';
break;
}
}
function closeAnnotationPopUp(name){
lastClick = null;
document.querySelector(name).style.display = 'none';
document.querySelector('.model').classList.remove('mobile_active');
document.querySelector('#container3d_replace').classList.remove('mobile_active');
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.