Khởi tạo dự án 3dtours
This commit is contained in:
@@ -0,0 +1,90 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Virtual 3D Tour Map</title>
|
||||
<!-- Leaflet CSS -->
|
||||
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css" integrity="sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY=" crossorigin="" />
|
||||
<!-- Pannellum (3D Viewer) CSS -->
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/pannellum@2.5.6/build/pannellum.css"/>
|
||||
<!-- Custom Style -->
|
||||
<link rel="stylesheet" href="css/style.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- Map container -->
|
||||
<div id="map"></div>
|
||||
|
||||
<!-- Login/User Control Panel -->
|
||||
<div id="user-panel" class="floating-panel">
|
||||
<div id="auth-guest">
|
||||
<h3>Login / Register</h3>
|
||||
<input type="text" id="username-input" placeholder="Username">
|
||||
<input type="password" id="password-input" placeholder="Password">
|
||||
<div class="btn-group">
|
||||
<button onclick="handleLogin()">Login</button>
|
||||
<button onclick="handleRegister()">Register</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="auth-logged-in" style="display: none;">
|
||||
<p>Welcome, <strong id="logged-username"></strong> (<span id="logged-role"></span>)</p>
|
||||
<button onclick="handleLogout()">Logout</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal for Creating Scene -->
|
||||
<div id="create-scene-modal" class="modal">
|
||||
<div class="modal-content">
|
||||
<span class="close-btn" onclick="closeModal()">×</span>
|
||||
<h2>Create New 3D Scene</h2>
|
||||
<form id="create-scene-form" onsubmit="submitScene(event)">
|
||||
<div class="form-group">
|
||||
<label>Selected Coordinates:</label>
|
||||
<div style="display: flex; gap: 10px;">
|
||||
<input type="text" id="modal-lat" name="lat" readonly>
|
||||
<input type="text" id="modal-lng" name="lng" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="modal-title">Scene Title:</label>
|
||||
<input type="text" id="modal-title" name="title" required placeholder="My Awesome Room">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="modal-panorama">Upload 360° Panorama Image:</label>
|
||||
<input type="file" id="modal-panorama" name="panorama" accept="image/*" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="modal-privacy">Privacy:</label>
|
||||
<select id="modal-privacy" name="privacy" onchange="toggleSharedUsers()">
|
||||
<option value="public">Public (Everyone)</option>
|
||||
<option value="private">Private (Only Me)</option>
|
||||
<option value="member">Members (Logged-in Only)</option>
|
||||
<option value="shared">Shared via Link/Token</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group" id="shared-with-group" style="display: none;">
|
||||
<label for="modal-shared-users">Shared with User IDs (JSON Array):</label>
|
||||
<input type="text" id="modal-shared-users" name="sharedWithUsers" placeholder='["60c72b2f9b1d8a41c8888888"]'>
|
||||
</div>
|
||||
<button type="submit" class="submit-btn">Save Scene</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 3D Panorama Viewer Container -->
|
||||
<div id="viewer-container" style="display: none;">
|
||||
<div id="panorama-viewer"></div>
|
||||
<button id="close-viewer-btn" onclick="closeViewer()">Close 3D View</button>
|
||||
</div>
|
||||
|
||||
<!-- Leaflet JS -->
|
||||
<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js" integrity="sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo=" crossorigin=""></script>
|
||||
<!-- Pannellum JS -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/pannellum@2.5.6/build/pannellum.js"></script>
|
||||
|
||||
<!-- Custom Scripts -->
|
||||
<script src="js/viewer360.js"></script>
|
||||
<script src="js/main_map.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user