-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
102 lines (88 loc) · 3.73 KB
/
Copy pathindex.html
File metadata and controls
102 lines (88 loc) · 3.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="mobile-web-app-capable" content="yes" />
<title>O3Measure - Hand Tracking AR Measuring Tool</title>
<!-- Load A-Frame script -->
<script src="https://aframe.io/releases/1.7.0/aframe.min.js"></script>
<!-- Include main CSS -->
<link rel="stylesheet" href="/src/styles/main.css">
<!-- Preload emoji font for WebXR -->
<style>
@font-face {
font-family: 'emoji';
src: local('Apple Color Emoji'),
local('Android Emoji'),
local('Segoe UI Emoji'),
local('Noto Color Emoji');
font-display: swap;
}
/* Force emoji preloading */
.emoji-preload {
position: absolute;
top: -9999px;
left: -9999px;
font-family: 'emoji';
opacity: 0;
}
</style>
</head>
<body>
<!-- Symbol/character preloader - hidden from view -->
<div class="emoji-preload">
← ↑ → ↓ ↔ ↕ ↖ ↗ ↘ ↙ ⬅ ⬆ ➡ ⬇ ⬉ ⬊ ⬋ ⬌ ⬍ ⭐ ❗ ✓ ✗ 👁 🚫
</div>
<!-- AR UI overlay -->
<div id="overlay-ui" class="ui-overlay">
<!-- Status indicator -->
<div class="status" id="status">Loading O3Measure...</div>
<!-- AR button for mobile devices -->
<button id="ar-button" class="ar-button">Start AR</button>
</div>
<!-- A-Frame Scene -->
<a-scene
webxr="mode: immersive-ar;
optionalFeatures: hit-test, dom-overlay, anchors;
requiredFeatures: local-floor, hand-tracking;
overlayElement: #overlay-ui;
referenceSpaceType: local-floor;
matchDeviceSize: true"
renderer="antialias: true; colorManagement: true; precision: high; foveationLevel: 1"
loading-screen="enabled: true; dotsColor: #15ACCF; backgroundColor: #000000"
xr-mode-ui="enabled: true; enterAREnabled: true; XRMode: ar;" scene-manager basic-scene
ar-hit-test="target: #reticle; enabled: true">
<!-- A-Frame Assets -->
<a-assets></a-assets>
<!-- Camera rig with hands -->
<a-entity id="cameraRig" position="0 0 0">
<!-- Camera -->
<a-camera position="0 1.6 0"
look-controls="pointerLockEnabled: false"
wasd-controls="enabled: false">
</a-camera>
</a-entity>
<!-- Basic lighting -->
<a-entity light="type: ambient; intensity: 0.8"></a-entity>
<a-entity light="type: directional; intensity: 0.6" position="1 1 1"></a-entity>
<!-- Hand tracking with grab controls -->
<a-entity id="leftHand" hand-tracking-controls="hand: left;" hand-tracking-grab-controls="hand: left;" obb-collider></a-entity>
<a-entity id="rightHand" hand-tracking-controls="hand: right;" hand-tracking-grab-controls="hand: right;" obb-collider></a-entity>
<!-- No need for explicit pinch detection, as A-Frame's hand-tracking-controls handles it -->
<!-- Interactive test objects -->
<a-entity id="interactive-objects" position="0 1.2 -0.5">
<!-- Test cube -->
<a-box id="test-cube"
position="-0.2 0 0"
width="0.1" height="0.1" depth="0.1"
color="#FF7700"
shadow="cast: true"
animation="property: rotation; to: 0 360 0; loop: true; dur: 10000; easing: linear" grabbable obb-collider>
</a-box>
</a-scene>
<!-- Script entry point -->
<script type="module" src="/src/main.js"></script>
</body>
</html>