修复
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
yinsx
2026-01-05 16:09:36 +08:00
parent ebbd21916e
commit b9cbb58a9d
14 changed files with 460 additions and 321 deletions

View File

@ -1,26 +1,40 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>SDK 模块化加载示例</title>
</head>
<body>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
font-family: Arial, sans-serif;
overflow: hidden;
background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}
#app { width: 100vw; height: 100vh; position: relative; }
#renderDom { width: 100%; height: 100%; display: block; }
</style>
<canvas id="renderDom"></canvas>
<!-- 模块化Dev 使用 /src/main.ts构建后改为 /assets/index.js -->
<script type="module">
import { kernel } from 'https://sdk.zguiy.com/zt/assets/index.js';
const config = {
container: 'renderDom',
modelUrlList: ['/public/model/model.glb'],
env: { hdrPath: '/hdr/hdr.env', intensity: 1.2, rotationY: 0.3 },
modelUrlList: ['./public/model/model.glb'],
env: { envPath: './public/hdr/hdr.env', intensity: 1.2, rotationY: 0.3 },
onSuccess: () => console.log('SDK initialized (module)'),
onError: (err) => console.error('SDK init error', err),
};
kernel.init(config);
</script>
</body>
</html>
</html>