Archived
Implement URL-based Dev Mode toggle
This commit is contained in:
1 parent
fac1e9bb18
commit
87c03e83bd
1 file changed
+70
-14
+70
-14
@@ -35,26 +35,61 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
header {
|
header {
|
||||||
padding: 20px;
|
display: flex;
|
||||||
text-align: center;
|
justify-content: space-between;
|
||||||
background: rgba(255, 255, 255, 0.8);
|
align-items: center;
|
||||||
backdrop-filter: blur(20px);
|
padding: 10px 40px;
|
||||||
|
background: #ffffff;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
|
box-shadow: 0 1px 10px rgba(0, 0, 0, 0.05);
|
||||||
|
height: 80px;
|
||||||
}
|
}
|
||||||
|
|
||||||
header h1 {
|
.header-logo {
|
||||||
margin: 0;
|
display: flex;
|
||||||
font-size: 24px;
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-logo img {
|
||||||
|
height: 40px;
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-nav {
|
||||||
|
display: flex;
|
||||||
|
gap: 20px;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-nav a {
|
||||||
|
text-decoration: none;
|
||||||
|
color: #1d1d1f;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 500;
|
||||||
|
transition: color 0.2s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-nav a:hover {
|
||||||
|
color: #00bf72; /* Teal matching logo */
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-nav a.active {
|
||||||
|
color: #00bf72;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
header p {
|
.lang-selector {
|
||||||
margin: 5px 0 0;
|
border: 1px solid #e0e0e0;
|
||||||
opacity: 0.6;
|
padding: 5px 10px;
|
||||||
|
border-radius: 5px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
header { padding: 0 20px; height: 60px; }
|
||||||
|
.header-nav { display: none; }
|
||||||
|
}
|
||||||
|
|
||||||
#container {
|
#container {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
position: relative;
|
position: relative;
|
||||||
@@ -515,8 +550,19 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<header>
|
<header>
|
||||||
<h1>Bitua</h1>
|
<div class="header-logo">
|
||||||
<p>Smart Cabinet Series (Updated)</p>
|
<img src="Assets/logo-Bitua.avif" alt="Bitua Logo">
|
||||||
|
</div>
|
||||||
|
<nav class="header-nav">
|
||||||
|
<a href="#" class="active">Home</a>
|
||||||
|
<a href="#">Nosotros</a>
|
||||||
|
<a href="#">Software</a>
|
||||||
|
<a href="#">Productos</a>
|
||||||
|
<a href="#">Partners</a>
|
||||||
|
<a href="#">Blog</a>
|
||||||
|
<a href="#">Más</a>
|
||||||
|
<div class="lang-selector">ES ▾</div>
|
||||||
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
|
|
||||||
@@ -605,6 +651,13 @@
|
|||||||
RectAreaLightUniformsLib.init();
|
RectAreaLightUniformsLib.init();
|
||||||
console.log("🚀 Bitua 3D Explorer - GREEN V2.1 script started");
|
console.log("🚀 Bitua 3D Explorer - GREEN V2.1 script started");
|
||||||
|
|
||||||
|
// --- Dev Mode Check ---
|
||||||
|
const urlParams = new URLSearchParams(window.location.search);
|
||||||
|
const isDev = urlParams.get('dev') === 'true';
|
||||||
|
if (isDev) {
|
||||||
|
console.log("🛠️ Dev mode enabled via URL");
|
||||||
|
}
|
||||||
|
|
||||||
// --- Setup ---
|
// --- Setup ---
|
||||||
const canvas = document.querySelector('#three-canvas');
|
const canvas = document.querySelector('#three-canvas');
|
||||||
const renderer = new THREE.WebGLRenderer({ canvas, antialias: true, alpha: true });
|
const renderer = new THREE.WebGLRenderer({ canvas, antialias: true, alpha: true });
|
||||||
@@ -1650,7 +1703,10 @@
|
|||||||
const debugPartName = document.getElementById('debug-part-name');
|
const debugPartName = document.getElementById('debug-part-name');
|
||||||
const savedViewpoints = [];
|
const savedViewpoints = [];
|
||||||
let lastClickedPart = null;
|
let lastClickedPart = null;
|
||||||
let debugEnabled = false;
|
let debugEnabled = isDev;
|
||||||
|
debugOverlay.style.display = debugEnabled ? 'block' : 'none';
|
||||||
|
const debugToggleHint = document.getElementById('debug-toggle-hint');
|
||||||
|
if (!isDev && debugToggleHint) debugToggleHint.style.display = 'none';
|
||||||
|
|
||||||
window.addEventListener('keydown', (e) => {
|
window.addEventListener('keydown', (e) => {
|
||||||
if (e.key.toLowerCase() === 'd') {
|
if (e.key.toLowerCase() === 'd') {
|
||||||
|
|||||||
Reference in new issue
Block a user