/* סגנון מקומי לרכיב כדי לא להפריע לאתר */
#spiritual-d9-container {
font-family: Arial, sans-serif; text-align: center;
background-color: #f9f9f9; padding: 20px;
border: 2px solid #4CAF50; border-radius: 15px;
max-width: 600px; margin: 0 auto;
}
.road-wp {
width: 100%; height: 100px; background-color: #333;
position: relative; border-radius: 10px; overflow: hidden; margin-top: 20px;
box-shadow: inset 0 0 10px #000;
}
.car-wp {
position: absolute; top: 30px; width: 50px; height: 40px;
background-color: #4CAF50; color: white; border-radius: 8px;
display: flex; align-items: center; justify-content: center;
font-weight: bold; font-size: 12px; transition: right 0.1s linear;
box-shadow: 0 0 10px #4CAF50; z-index: 10;
}
.obstacle-wp {
position: absolute; top: 30px; width: 50px; height: 40px;
background-color: #F44336; color: white; border-radius: 8px;
display: flex; align-items: center; justify-content: center;
font-weight: bold; font-size: 12px; right: 70%;
box-shadow: 0 0 10px #F44336;
}
.status-box-wp {
background: white; padding: 10px; border-radius: 8px;
border: 1px solid #ddd; font-weight: bold; color: #333;
}
.line-wp {
position: absolute; top: 48px; width: 100%; height: 4px;
background: repeating-linear-gradient(90deg, white, white 20px, transparent 20px, transparent 40px);
}
.btn-wp {
margin-top: 20px; padding: 10px 20px; font-size: 16px;
background: #2196F3; color: white; border: none;
border-radius: 5px; cursor: pointer;
}
🚜 D9 רוחני – המרכבה האוטונומית
מצב ההשגחה: ממתין לפקודה…
הרכב מזהה מניעות באמצעות “עין רוחנית” ומבצע עקיפה אוטונומית.
הפעל מנוע רוחני
let wpCarPos = 0;
let wpObstaclePos = 70;
let wpInterval;
function startWPDrive() {
if (wpInterval) clearInterval(wpInterval);
wpCarPos = 0;
document.getElementById(‘wpCar’).style.right = ‘0%’;
document.getElementById(‘wpStatusText’).innerText = “יוצא לדרך…”;
wpInterval = setInterval(() => {
// זיהוי מניעה (השגחה)
if (wpCarPos + 15 >= wpObstaclePos && wpCarPos {
document.getElementById(‘wpStatusText’).innerText = “✨ המכשול נפרץ! ממשיכים…”;
document.getElementById(‘wpStatusText’).style.color = “green”;
wpCarPos += 20; // הדילוג
resumeWPDrive();
}, 1500);
} else if (wpCarPos >= 90) {
document.getElementById(‘wpStatusText’).innerText = “🏁 הגיע לתכלית!”;
clearInterval(wpInterval);
} else {
wpCarPos += 1;
document.getElementById(‘wpCar’).style.right = wpCarPos + ‘%’;
}
}, 50);
}
function resumeWPDrive() {
wpInterval = setInterval(() => {
if (wpCarPos >= 90) {
document.getElementById(‘wpStatusText’).innerText = “🏁 הגיע לתכלית!”;
clearInterval(wpInterval);
} else {
wpCarPos += 1;
document.getElementById(‘wpCar’).style.right = wpCarPos + ‘%’;
}
}, 50);
}