-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
155 lines (140 loc) · 5.33 KB
/
index.html
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<title>blippar</title>
<link rel="shortcut icon" href="TemplateData/favicon.ico">
<link rel="stylesheet" href="TemplateData/style.css">
<script src = "sdk/blippar-webar-sdk-v1.7.3/webar-sdk/webar-sdk-v1.7.3.min.js?license-key=4067961f-29f1-4e5c-8a2b-ae22c337b075"
webar-mode="surface-tracking"
static-camera = "false"
auto-start="false"
auto-init="false"
enable-photo-ui="false"
render-scene-on-desktop="false"
show-qr-card-on-desktop="false"
enable-tracking-on-desktop= "false"
enable-mirroring-on-desktop= "false"
hide-reset-button="false"
auto-marker-detection ="true"
show-guide-animation-url=""
rendering-engine="unity"
logo-src="images/blippar_logo.png"
logo-height="200px"
logo-width="200px"
loading-progress-type="default"
progress-dot-ring-scale="0.30"
progress-dot-ring-color="#F7A400"
progress-ring-scale="0.36"
progress-ring-color="#F7A400"
progress-ring-line-width="5"
alert-border-color=""
alert-border-width=""
alert-border-radius=""
alert-background-color=""
alert-message-text-color=""
alert-button-color=""
alert-button-text-color=""
alert-button-height=""
alert-button-border-radius=""
alert-box-font-size=""
alert-box-height=""
alert-box-width=""
alert-camera-permission-text=""
alert-camera-permission-button-text=""
alert-motion-permission-text=""
alert-motion-permission-button-text=""
ui-background-color="#FFFFFF"
ui-portrait-text="This experience is optimized for portrait display"
ui-text-color="#000000"
desktop-logo-src="images/blippar_logo.png"
desktop-logo-width="150px"
desktop-logo-height="150px"
issue-img-src="images/test_issue_img.png"
issue-img-width="116px"
issue-img-height="116px"
auto-scan-instruction="Find a marker to scan..."
auto-scan-instruction-detect="Marker detecting..."
auto-scan-instruction-idle="Shake your phone to start detection"
auto-scan-instruction-text-style="color: orange;"
auto-scan-style="Display: block; position: absolute; top: 90%; left: 50%; transform: translate(-50%, -50%); z-index: 10000; width: auto; height: auto; text-alogn: center; "
auto-scan-style-display="block"
scan-btn-display="block"
scan-btn-height="100px"
scan-btn-width="100px"
scan-btn-img-height="50"
scan-btn-img-width="50"
scan-btn-img-src="images/user_scan-btn-image_here.png"
scan-btn-img-transform="translate(-25, -25)"
scan-btn-img-x-coordinate="50%"
scan-btn-img-y-coordinate="50%"
scan-btn-instruction="Tap to scan"
scan-btn-instruction-style="color: white;"
scan-btn-progress-bar-color="blue"
scan-btn-progress-bar-cx-coordinate="50"
scan-btn-progress-bar-cy-coordinate="50"
scan-btn-progress-bar-radius="35"
scan-btn-progress-bar-transform="rotate(-90 50 50)"
scan-btn-progress-circle-cx-coordinate="50%"
scan-btn-progress-circle-cy-coordinate="50%"
scan-btn-progress-circle-radius="35"
scan-btn-progress-circle-style="fill: none; stroke: cyan; stroke-width: 6;"
ios-camera-permission="true"
auto-scan-instruction-idle-on-desktop="Reload to detect a marker"
show-guide-view="true"></script>
</head>
<body class="dark">
<div id="unity-container" class="unity-desktop">
<canvas id="unity-canvas" style="position: absolute;"></canvas>
</div>
<script>
var Yrotvalue = undefined;
var UNITYINSTANCE = undefined;
const cameraObjectName = "webarCamera";
const stageObjectName = "webarStage";
const buildUrl = "Build";
const loaderUrl = buildUrl + "/WebAR-blippar.loader.js";
const config = {
dataUrl: buildUrl + "/WebAR-blippar.data.unityweb",
frameworkUrl: buildUrl + "/WebAR-blippar.framework.js.unityweb",
codeUrl: buildUrl + "/WebAR-blippar.wasm.unityweb",
streamingAssetsUrl: "StreamingAssets",
companyName: "DefaultCompany",
productName: "blippar",
productVersion: "0.1",
};
const container = document.querySelector("#unity-container");
const canvas = document.querySelector("#unity-canvas");
if (/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)) {
container.className = "unity-mobile";
config.devicePixelRatio = 1;
}
else {
// Desktop Unity Container: set the container/canvas for full screen
container.style.width = "100%";
container.style.height = "100%";
// Desktop style: Render the game canvas in a window that can be maximized to fullscreen:
canvas.style.width = window.innerWidth + 'px';
canvas.style.height = window.innerHeight + 'px';
}
const script = document.createElement("script");
script.src = loaderUrl;
script.onload = () => {
createUnityInstance(canvas, config, (progress) => {
}).then((unityInstance) => {
UNITYINSTANCE = unityInstance;
}).catch((message) => {
alert(message);
});
};
//WEBAR SDK INIT function
document.body.appendChild(script);
function GetCommand(str){
Yrotvalue=(str);
}
WEBARSDK.InitUnityWebGL(canvas.id, cameraObjectName, stageObjectName, canvas.clientWidth, canvas.clientHeight);
</script>
</body>
</html>