This commit is contained in:
@ -14,9 +14,9 @@
|
||||
console.error('SDK 未加载')
|
||||
} else {
|
||||
kernel.init({
|
||||
container: 'renderDom', // 容器 ID(canvas)
|
||||
container: '#renderDom', // 容器 ID(canvas) 或者 DOM 元素引用
|
||||
modelUrlList: ['./model.glb'], // 模型列表
|
||||
env: { hdrPath: '/hdr/my.env' }, // 环境贴图等参数
|
||||
env: { envPath: '/public/hdr/hdr.env', intensity: 1.2, rotationY: 0.3 }, // 环境贴图等参数
|
||||
})
|
||||
}
|
||||
```
|
||||
@ -29,9 +29,9 @@
|
||||
2. 初始化(与全局方式一致):
|
||||
```js
|
||||
kernel.init({
|
||||
container: 'renderDom',
|
||||
container: '#renderDom', // 容器 ID(canvas) 或者 DOM 元素引用
|
||||
modelUrlList: ['./model.glb'],
|
||||
env: { envPath: '/hdr/my.env' },
|
||||
env: { envPath: '/public/hdr/hdr.env', intensity: 1.2, rotationY: 0.3 }, // 环境贴图等参数
|
||||
})
|
||||
```
|
||||
|
||||
@ -44,3 +44,15 @@ kernel.on('model:click', (data) => console.log('模型点击', data))
|
||||
// 需要时可移除
|
||||
// kernel.off('model:loaded', handler)
|
||||
```
|
||||
|
||||
## 提供测试用的模型和环境贴图
|
||||
```
|
||||
https://sdk.zguiy.com/resurces/model/model.glb
|
||||
|
||||
```
|
||||
|
||||
```
|
||||
https://sdk.zguiy.com/resurces/hdr/hdr.env
|
||||
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user