<style>
/* Black article area */
.t3-content,
.t3-mainbody,
.item-page {
background:#000 !important;
padding:0 !important;
margin:0 auto !important;
max-width:1200px !important;
}
/* Cube container */
#cube-container {
width:100%;
max-width:1200px;
height:550px;
margin:0 auto;
background:#000;
position:relative;
overflow:hidden;
}
/* Canvas fix */
#cube-container canvas {
width:100% !important;
height:100% !important;
position:absolute !important;
top:0;
left:0;
display:block !important;
}
/* Fullscreen buttons */
.fullscreen-toggle,
.exit-fullscreen-toggle {
position:absolute;
top:20px;
right:20px;
z-index:50;
background:rgba(0,0,0,0.55);
color:#fff;
padding:10px 14px;
border-radius:8px;
font-size:22px;
cursor:pointer;
border:1px solid rgba(255,255,255,0.35);
backdrop-filter:blur(6px);
}
.exit-fullscreen-toggle {
right:70px;
display:none;
}
:fullscreen .exit-fullscreen-toggle {
display:block !important;
}
/* Responsive heights */
@media (min-width:600px){ #cube-container{height:700px;} }
@media (min-width:900px){ #cube-container{height:900px;} }
@media (min-width:1400px){ #cube-container{height:1100px;} }
#calmBubble {
position:absolute;
bottom:20px;
left:20px;
background:rgba(0,0,0,0.75);
color:#fff;
padding:12px 16px;
border-radius:10px;
font-size:15px;
display:none;
opacity:0;
transition:opacity 0.3s ease;
z-index:99999;
}
</style>
<!-- ⭐ THE MISSING CONTAINER ⭐ -->
<div id="cube-container"></div>
<div id="calmBubble">Easy there… the cube hears you.</div>
<!-- Fullscreen buttons -->
<button id="fullscreen-btn" class="fullscreen-toggle">⛶</button>
<button id="exit-fullscreen-btn" class="exit-fullscreen-toggle">✕</button>
<!-- ⭐ THREE IMPORTS ⭐ -->
<script type="module">
import * as THREE from "https://unpkg.com/three@0.160.0/build/three.module.js";
import { FontLoader } from "https://unpkg.com/three@0.160.0/examples/jsm/loaders/FontLoader.js";
import { TextGeometry } from "https://unpkg.com/three@0.160.0/examples/jsm/geometries/TextGeometry.js";
window.THREE = THREE;
window.FontLoader = FontLoader;
window.TextGeometry = TextGeometry;
</script>
<!-- ⭐ YOUR CUBE CODE ⭐ -->
<script type="module" src="/templates/ja_sensei/js/mobix.js"></script>
<script>
/* ENTER fullscreen */
document.getElementById("fullscreen-btn").addEventListener("click", () => {
const cube = document.getElementById("cube-container");
if (!document.fullscreenElement) cube.requestFullscreen();
});
/* EXIT fullscreen */
document.getElementById("exit-fullscreen-btn").addEventListener("click", () => {
if (document.fullscreenElement) document.exitFullscreen();
});
</script>
✦