55 < meta charset ="UTF-8 " />
66 < meta name ="viewport " content ="width=device-width, initial-scale=1.0, viewport-fit=cover " />
77 < meta http-equiv ="X-UA-Compatible " content ="IE=edge " />
8-
8+
99 <!-- 主题色 -->
1010 < meta name ="theme-color " content ="#6366f1 " media ="(prefers-color-scheme: light) " />
1111 < meta name ="theme-color " content ="#1e1b4b " media ="(prefers-color-scheme: dark) " />
12-
12+
1313 <!-- 描述和关键词 -->
14- < meta name ="description " content ="MetaHuman Engine - Browser-native 3D digital human engine with voice, vision, and dialogue capabilities. Zero-config, offline-ready, production-grade. " />
15- < meta name ="keywords " content ="digital human, 3D avatar, AI, voice interaction, computer vision, WebGL, Three.js, React, TypeScript " />
14+ < meta
15+ name ="description "
16+ content ="MetaHuman Engine - Browser-native 3D digital human engine with voice, vision, and dialogue capabilities. Zero-config, offline-ready, production-grade. "
17+ />
18+ < meta
19+ name ="keywords "
20+ content ="digital human, 3D avatar, AI, voice interaction, computer vision, WebGL, Three.js, React, TypeScript "
21+ />
1622 < meta name ="author " content ="LessUp " />
1723 < meta name ="robots " content ="index, follow " />
18-
24+
1925 <!-- 开放图谱 / Open Graph -->
2026 < meta property ="og:type " content ="website " />
2127 < meta property ="og:site_name " content ="MetaHuman Engine " />
2228 < meta property ="og:title " content ="MetaHuman Engine - 3D Digital Human Platform " />
23- < meta property ="og:description " content ="Browser-native 3D digital human engine with voice, vision, and dialogue capabilities " />
29+ < meta
30+ property ="og:description "
31+ content ="Browser-native 3D digital human engine with voice, vision, and dialogue capabilities "
32+ />
2433 < meta property ="og:url " content ="https://lessup.github.io/meta-human/ " />
2534 < meta property ="og:image " content ="https://lessup.github.io/meta-human/og-image.png " />
2635 < meta property ="og:image:width " content ="1200 " />
2736 < meta property ="og:image:height " content ="630 " />
2837 < meta property ="og:locale " content ="en_US " />
2938 < meta property ="og:locale:alternate " content ="zh_CN " />
30-
39+
3140 <!-- Twitter 卡片 -->
3241 < meta name ="twitter:card " content ="summary_large_image " />
3342 < meta name ="twitter:site " content ="@LessUpHQ " />
3443 < meta name ="twitter:creator " content ="@LessUpHQ " />
3544 < meta name ="twitter:title " content ="MetaHuman Engine - 3D Digital Human Platform " />
36- < meta name ="twitter:description " content ="Browser-native 3D digital human engine with voice, vision, and dialogue capabilities " />
45+ < meta
46+ name ="twitter:description "
47+ content ="Browser-native 3D digital human engine with voice, vision, and dialogue capabilities "
48+ />
3749 < meta name ="twitter:image " content ="https://lessup.github.io/meta-human/og-image.png " />
38-
50+
3951 <!-- iOS Safari -->
4052 < meta name ="apple-mobile-web-app-capable " content ="yes " />
4153 < meta name ="apple-mobile-web-app-status-bar-style " content ="black-translucent " />
4254 < meta name ="apple-mobile-web-app-title " content ="MetaHuman " />
43-
55+
4456 <!-- Windows -->
4557 < meta name ="msapplication-TileColor " content ="#6366f1 " />
46- < meta name ="msapplication-config " content ="/meta-human /browserconfig.xml " />
47-
58+ < meta name ="msapplication-config " content =". /browserconfig.xml " />
59+
4860 <!-- 移动端优化 -->
4961 < meta name ="mobile-web-app-capable " content ="yes " />
5062 < meta name ="format-detection " content ="telephone=no " />
5163 < meta name ="apple-touch-fullscreen " content ="yes " />
52-
64+
5365 <!-- PWA Manifest -->
54- < link rel ="manifest " href ="/meta-human /manifest.json " />
55-
66+ < link rel ="manifest " href =". /manifest.json " />
67+
5668 <!-- Favicon -->
57- < link rel ="icon " type ="image/svg+xml " href ="/meta-human /favicon.svg " />
58- < link rel ="apple-touch-icon " href ="/meta-human /favicon.svg " />
59- < link rel ="mask-icon " href ="/meta-human /favicon.svg " color ="#6366f1 " />
60-
69+ < link rel ="icon " type ="image/svg+xml " href =". /favicon.svg " />
70+ < link rel ="apple-touch-icon " href =". /favicon.svg " />
71+ < link rel ="mask-icon " href =". /favicon.svg " color ="#6366f1 " />
72+
6173 <!-- DNS 预解析 -->
6274 < link rel ="dns-prefetch " href ="https://fonts.googleapis.com " />
6375 < link rel ="dns-prefetch " href ="https://fonts.gstatic.com " />
6476 < link rel ="dns-prefetch " href ="https://cdn.jsdelivr.net " />
6577 < link rel ="dns-prefetch " href ="https://unpkg.com " />
66-
78+
6779 <!-- 预连接 -->
6880 < link rel ="preconnect " href ="https://fonts.googleapis.com " crossorigin />
6981 < link rel ="preconnect " href ="https://fonts.gstatic.com " crossorigin />
7082 < link rel ="preconnect " href ="https://api.openai.com " crossorigin />
71-
83+
7284 <!-- 字体预加载 -->
73- < link rel ="preload " href ="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap " as ="style " />
74- < link rel ="stylesheet " href ="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap " media ="print " onload ="this.media='all' " />
75- < noscript > < link rel ="stylesheet " href ="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap " /> </ noscript >
76-
85+ < link
86+ rel ="preload "
87+ href ="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap "
88+ as ="style "
89+ />
90+ < link
91+ rel ="stylesheet "
92+ href ="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap "
93+ media ="print "
94+ onload ="this.media = 'all' "
95+ />
96+ < noscript
97+ > < link
98+ rel ="stylesheet "
99+ href ="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap "
100+ /> </ noscript >
101+
77102 <!-- OpenSearch -->
78- < link rel ="search " type ="application/opensearchdescription+xml " title ="MetaHuman " href ="/meta-human/opensearch.xml " />
79-
103+ < link
104+ rel ="search "
105+ type ="application/opensearchdescription+xml "
106+ title ="MetaHuman "
107+ href ="./opensearch.xml "
108+ />
109+
80110 <!-- Canonical -->
81111 < link rel ="canonical " href ="https://lessup.github.io/meta-human/ " />
82-
112+
83113 <!-- 替代语言 -->
84114 < link rel ="alternate " hreflang ="en " href ="https://lessup.github.io/meta-human/ " />
85115 < link rel ="alternate " hreflang ="zh-CN " href ="https://lessup.github.io/meta-human/?lang=zh " />
86116 < link rel ="alternate " hreflang ="x-default " href ="https://lessup.github.io/meta-human/ " />
87-
117+
88118 <!-- 安全性 -->
89- < meta http-equiv ="Content-Security-Policy " content ="default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' blob:; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' https://fonts.gstatic.com data:; img-src 'self' data: blob: https:; media-src 'self' blob: https:; connect-src 'self' https: wss:; frame-ancestors 'none'; base-uri 'self'; form-action 'self'; " />
90-
119+ < meta
120+ http-equiv ="Content-Security-Policy "
121+ content ="default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' blob:; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' https://fonts.gstatic.com data:; img-src 'self' data: blob: https:; media-src 'self' blob: https:; connect-src 'self' https: wss:; frame-ancestors 'none'; base-uri 'self'; form-action 'self'; "
122+ />
123+
91124 <!-- 性能优化脚本 -->
92125 < script >
93126 // 检测 WebGL 支持
94- ( function ( ) {
127+ ( function ( ) {
95128 try {
96129 var canvas = document . createElement ( 'canvas' ) ;
97130 var gl = canvas . getContext ( 'webgl' ) || canvas . getContext ( 'experimental-webgl' ) ;
98131 window . __WEBGL_SUPPORTED__ = ! ! gl ;
99- } catch ( e ) {
132+ } catch ( e ) {
100133 window . __WEBGL_SUPPORTED__ = false ;
101134 }
102135 } ) ( ) ;
103-
136+
104137 // 检测触摸设备
105138 window . __TOUCH_DEVICE__ = 'ontouchstart' in window || navigator . maxTouchPoints > 0 ;
106-
139+
107140 // 检测偏好减少动画
108141 window . __REDUCE_MOTION__ = window . matchMedia ( '(prefers-reduced-motion: reduce)' ) . matches ;
109-
142+
110143 // 检测深色模式
111144 window . __DARK_MODE__ = window . matchMedia ( '(prefers-color-scheme: dark)' ) . matches ;
112145 </ script >
113-
146+
114147 <!-- 关键 CSS 内联 -->
115148 < style >
116149 /* 关键路径 CSS - 首屏渲染必需 */
117- * , * ::before , * ::after {
150+ * ,
151+ * ::before ,
152+ * ::after {
118153 box-sizing : border-box;
119154 margin : 0 ;
120155 padding : 0 ;
121156 }
122-
157+
123158 html {
124- font-family : 'Inter' , -apple-system, BlinkMacSystemFont, 'Segoe UI' , Roboto, sans-serif;
159+ font-family :
160+ 'Inter' ,
161+ -apple-system,
162+ BlinkMacSystemFont,
163+ 'Segoe UI' ,
164+ Roboto,
165+ sans-serif;
125166 font-size : 16px ;
126167 line-height : 1.5 ;
127168 -webkit-font-smoothing : antialiased;
128169 -moz-osx-font-smoothing : grayscale;
129170 text-rendering : optimizeLegibility;
130171 scroll-behavior : smooth;
131172 }
132-
173+
133174 body {
134175 min-height : 100vh ;
135176 min-height : 100dvh ; /* 动态视口高度 */
136177 background : # 0a0a0a ;
137178 color : # fafafa ;
138179 overflow-x : hidden;
139180 }
140-
181+
141182 # root {
142183 min-height : 100vh ;
143184 min-height : 100dvh ;
144185 }
145-
186+
146187 /* 加载占位符 */
147188 .loading-screen {
148189 position : fixed;
153194 justify-content : center;
154195 background : linear-gradient (135deg , # 0a0a0a 0% , # 1a1a2e 100% );
155196 z-index : 9999 ;
156- transition : opacity 0.3s ease, visibility 0.3s ease;
197+ transition :
198+ opacity 0.3s ease,
199+ visibility 0.3s ease;
157200 }
158-
201+
159202 .loading-screen .hidden {
160203 opacity : 0 ;
161204 visibility : hidden;
162205 pointer-events : none;
163206 }
164-
207+
165208 .loading-spinner {
166209 width : 48px ;
167210 height : 48px ;
170213 border-radius : 50% ;
171214 animation : spin 1s linear infinite;
172215 }
173-
216+
174217 @keyframes spin {
175- to { transform : rotate (360deg ); }
218+ to {
219+ transform : rotate (360deg );
220+ }
176221 }
177-
222+
178223 .loading-text {
179224 margin-top : 1rem ;
180225 color : # a1a1aa ;
181226 font-size : 0.875rem ;
182227 }
183-
228+
184229 /* WebGL 不支持提示 */
185230 .no-webgl {
186231 display : none;
187232 text-align : center;
188233 padding : 2rem ;
189234 }
190-
235+
191236 .no-webgl .visible {
192237 display : block;
193238 }
194239 </ style >
195-
240+
196241 < title > MetaHuman Engine - 开源 3D 数字人交互引擎</ title >
197242 </ head >
198243 < body >
@@ -206,31 +251,31 @@ <h2>WebGL Not Supported</h2>
206251 < p > Please use a modern browser like Chrome, Firefox, or Safari.</ p >
207252 </ div >
208253 </ div >
209-
254+
210255 <!-- React 挂载点 -->
211256 < div id ="root "> </ div >
212-
257+
213258 <!-- 隐藏加载屏幕脚本 -->
214259 < script >
215- window . addEventListener ( 'load' , function ( ) {
260+ window . addEventListener ( 'load' , function ( ) {
216261 if ( ! window . __WEBGL_SUPPORTED__ ) {
217262 document . getElementById ( 'no-webgl' ) . classList . add ( 'visible' ) ;
218263 }
219-
264+
220265 // 延迟隐藏加载屏幕,确保 React 已挂载
221- setTimeout ( function ( ) {
266+ setTimeout ( function ( ) {
222267 var loader = document . getElementById ( 'loading-screen' ) ;
223268 if ( loader ) {
224269 loader . classList . add ( 'hidden' ) ;
225- setTimeout ( function ( ) {
270+ setTimeout ( function ( ) {
226271 loader . remove ( ) ;
227272 } , 300 ) ;
228273 }
229274 } , 500 ) ;
230275 } ) ;
231-
276+
232277 // 加载超时处理
233- setTimeout ( function ( ) {
278+ setTimeout ( function ( ) {
234279 var loader = document . getElementById ( 'loading-screen' ) ;
235280 if ( loader && ! loader . classList . contains ( 'hidden' ) ) {
236281 var text = loader . querySelector ( '.loading-text' ) ;
@@ -240,7 +285,7 @@ <h2>WebGL Not Supported</h2>
240285 }
241286 } , 10000 ) ;
242287 </ script >
243-
288+
244289 <!-- 主应用脚本 -->
245290 < script type ="module " src ="/src/main.tsx "> </ script >
246291 </ body >
0 commit comments