-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
179 lines (163 loc) · 6.29 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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>A-Frame</title>
<meta name="description" content="A-Frame">
<script src="https://o7946a4x2.qnssl.com/mmd/static/js/aframe-master.min.js"></script>
<script src="https://o7946a4x2.qnssl.com/mmd/static/js/aframe-environment-component.min.js"></script>
<script src="https://o7946a4x2.qnssl.com/mmd/static/js/aframe-animation-component.min.js"></script>
<script src="https://o7946a4x2.qnssl.com/mmd/static/js/a-mmd.min.js"></script>
<script src="https://o7946a4x2.qnssl.com/mmd/static/js/util.js"></script>
<style>
.hidden {
display: none;
}
.modal {
font-family: -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, ubuntu, roboto, noto, segoe ui, arial, sans-serif;
}
.modal__overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.6);
display: flex;
justify-content: center;
align-items: center;
}
.modal__container {
background-color: #fff;
padding: 30px;
max-width: 500px;
max-height: 100vh;
border-radius: 4px;
overflow-y: auto;
box-sizing: border-box;
}
.modal__header {
display: flex;
justify-content: center;
align-items: center;
}
.modal__footer {
display: flex;
justify-content: center;
align-items: center;
}
.modal__title {
margin-top: 0;
margin-bottom: 0;
font-weight: 600;
font-size: 1.25rem;
line-height: 1.25;
color: #00449e;
box-sizing: border-box;
}
.modal__content {
margin-top: 2rem;
margin-bottom: 2rem;
line-height: 1.5;
color: rgba(0, 0, 0, .8);
}
.modal__btn {
font-size: .875rem;
padding-left: 1rem;
padding-right: 1rem;
padding-top: .5rem;
padding-bottom: .5rem;
background-color: #e6e6e6;
color: rgba(0, 0, 0, .8);
border-radius: .25rem;
border-style: none;
border-width: 0;
cursor: pointer;
-webkit-appearance: button;
text-transform: none;
overflow: visible;
line-height: 1.15;
margin: 0;
will-change: transform;
-moz-osx-font-smoothing: grayscale;
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
-webkit-transform: translateZ(0);
transform: translateZ(0);
transition: -webkit-transform .25s ease-out;
transition: transform .25s ease-out;
transition: transform .25s ease-out, -webkit-transform .25s ease-out;
}
.modal__btn:focus,
.modal__btn:hover {
-webkit-transform: scale(1.05);
transform: scale(1.05);
}
.modal__btn-primary {
background-color: #00449e;
color: #fff;
}
</style>
<script>
function hidemodel() {
document.querySelector('#modal').className += " hidden";
}
</script>
</head>
<body>
<a-scene>
<a-entity environment="preset: forest">
<a-entity position="0 0.75 0">
<a-camera id='camera' look-controls wasd-controls="fly:true">
<a-circle id='loader' position="0 0 -1" color="#CCC" radius="0.01" animation__geometry_start='property:geometry.radius; from:0.01; to:0.04;dur:500;dir: alternate;loop: true;startEvents:load-start;pauseEvents:load-finish,load-fail;'
animation__opacity_start='property:material.opacity; from:0; to:1; dur:100;startEvents:load-start;'
animation__opacity_stop='property:material.opacity; to:0; dur:100;startEvents:load-finish,load-fail;'></a-circle>
</a-camera>
</a-entity>
<a-entity id='mmd-container' position="0 1.5 -4" geometry="primitive: sphere; radius: 1.5" material="color:#FFF;opacity:0">
<a-entity id='mmd' event-proxy="events:load-start,load-finish,load-fail;target:#loader" mmd="audio:https://o7946a4x2.qnssl.com/mmd/static/mmd/ai/mmd.mp3; model:https://o7946a4x2.qnssl.com/mmd/static/mmd/ai/mmd.pmx; motion:https://o7946a4x2.qnssl.com/mmd/static/mmd/ai/mmd.vmd;physics:true;autoplay:true;listener:#camera">
</a-entity>
</a-entity>
</a-entity>
</a-scene>
<div class="modal" id="modal" aria-hidden="true">
<div class="modal__overlay" data-micromodal-close>
<div class="modal__container" role="dialog">
<header class="modal__header">
<h2 class="modal__title">
just demo
</h2>
</header>
<main class="modal__content">
<p>
使用方法
</p>
<p>
PC和Android请使用Chrome浏览器,iOS请使用Safari,
</p>
<p>
PC: WASD移动视角 鼠标拖动移动视角方向
</p>
<p>
手机: 可配合<a href="https://baike.baidu.com/item/cardboard">Google Cardboard</a>效果更佳
</p>
<p>
PS: 模型文件较大,请耐心等一下
</p>
</main>
<footer class="modal__footer">
<button class="modal__btn" onclick="hidemodel()">OK</button>
</footer>
</div>
</div>
</div>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-125962617-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'UA-125962617-1');
</script>
</body>
</html>