-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
48 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,7 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>AR Application - Display Today's Date</title> | ||
<script src="https://aframe.io/releases/1.2.0/aframe.min.js"></script> | ||
<script src="https://cdn.jsdelivr.net/gh/jeromeetienne/ar.js@3.3.2/aframe/build/aframe-ar.min.js"></script> | ||
<style> | ||
body { | ||
margin: 0; | ||
overflow: hidden; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<a-scene embedded arjs> | ||
<!-- Marker Definition --> | ||
<a-marker | ||
preset="custom" | ||
type="pattern" | ||
url="./assets/marker/pattern-marker.patt"> | ||
<!-- 3D Text to Display Today's Date --> | ||
<a-entity | ||
id="dateText" | ||
geometry="primitive: plane; height: 1; width: 3" | ||
material="color: #00FF00; side: double" | ||
position="0 0.5 0" | ||
text="align: center; width: 4; color: black; value: Loading..."> | ||
</a-entity> | ||
</a-marker> | ||
|
||
<!-- AR.js Camera --> | ||
<a-entity camera></a-entity> | ||
</a-scene> | ||
|
||
<script> | ||
// Update the text entity with today's date | ||
document.addEventListener('DOMContentLoaded', () => { | ||
const dateEntity = document.querySelector('#dateText'); | ||
const today = new Date(); | ||
const formattedDate = today.toDateString(); // e.g., "Wed Nov 27 2024" | ||
dateEntity.setAttribute('text', 'value', formattedDate); | ||
}); | ||
</script> | ||
</body> | ||
</html> | ||
<body> | ||
<h1>Hello World</h1> | ||
<p>I'm hosted with GitHub Pages.</p> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,45 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<body> | ||
<h1>I am mooncalendar</h1> | ||
</body> | ||
</html> | ||
<head> | ||
<title>AR Application - Display Today's Date</title> | ||
<script src="https://aframe.io/releases/1.2.0/aframe.min.js"></script> | ||
<script src="https://cdn.jsdelivr.net/gh/jeromeetienne/ar.js@3.3.2/aframe/build/aframe-ar.min.js"></script> | ||
<style> | ||
body { | ||
margin: 0; | ||
overflow: hidden; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<a-scene embedded arjs> | ||
<!-- Marker Definition --> | ||
<a-marker | ||
preset="custom" | ||
type="pattern" | ||
url="./assets/marker/pattern-marker.patt"> | ||
<!-- 3D Text to Display Today's Date --> | ||
<a-entity | ||
id="dateText" | ||
geometry="primitive: plane; height: 1; width: 3" | ||
material="color: #00FF00; side: double" | ||
position="0 0.5 0" | ||
text="align: center; width: 4; color: black; value: Loading..."> | ||
</a-entity> | ||
</a-marker> | ||
|
||
<!-- AR.js Camera --> | ||
<a-entity camera></a-entity> | ||
</a-scene> | ||
|
||
<script> | ||
// Update the text entity with today's date | ||
document.addEventListener('DOMContentLoaded', () => { | ||
const dateEntity = document.querySelector('#dateText'); | ||
const today = new Date(); | ||
const formattedDate = today.toDateString(); // e.g., "Wed Nov 27 2024" | ||
dateEntity.setAttribute('text', 'value', formattedDate); | ||
}); | ||
</script> | ||
</body> | ||
</html> |