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

This commit is contained in:
yinsx
2026-01-05 16:20:04 +08:00
parent b9cbb58a9d
commit fe7d9de6f6
2 changed files with 44 additions and 13 deletions

View File

@ -52,8 +52,8 @@ steps:
# from_secret: server_ssh_key
port: 22
source:
- dist/*
- dist/bblcdn/*
- dist/**
- vite.config.js
target: /www/wwwroot/sdk.zguiy.com/zt/
strip_components: 1
when:

View File

@ -9,14 +9,29 @@
<body>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
* {
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; }
#app {
width: 100vw;
height: 100vh;
position: relative;
}
#renderDom {
width: 100%;
height: 100%;
display: block;
}
</style>
<canvas id="renderDom"></canvas>
@ -28,12 +43,28 @@
container: 'renderDom',
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);
kernel.on('model:load:progress', (data) => {
console.log('模型加载事件', data);
});
kernel.on('model:loaded', (data) => {
console.log('模型加载完成', data);
});
kernel.on('model:click', (data) => {
console.log('模型点击事件', data);
});
</script>
</body>