Skip to content

Commit

Permalink
fix not showing arkit
Browse files Browse the repository at this point in the history
  • Loading branch information
leostudiooo committed Oct 8, 2024
1 parent 2fab2f5 commit 1320543
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions source/b707o/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ <h1>厚嘴唇航空公司 B-707CC 波音 707o 型飞机模型</h1>
</html>
<script type="text/javascript">
// Check if ARKit is supported
var arKitSupported = window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.arkit;
// var touchScreen = 'ontouchstart' in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0;
// var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
if (arKitSupported) {
// var arKitSupported = window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.arkit;
var touchScreen = 'ontouchstart' in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0;
var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
if (touchScreen && isSafari) {
document.getElementById("hint").innerHTML = "<p>请点击下方按钮打开 AR 体验。你也可以查看 1:1 比例的 3D 模型(当然,你会需要一片非常宽阔的场地)。</p>";
document.getElementById("ar_entry").style.display = "true";
document.getElementById("usdz_model").style.display = "true";
Expand Down

0 comments on commit 1320543

Please sign in to comment.