This commit is contained in:
@ -12,22 +12,16 @@
|
||||
|
||||
<!-- 非模块化:使用全局构建产物,加载后可通过 window.faceSDK.kernel 调用 -->
|
||||
<!-- 部署后把 src 改成实际访问路径,如 https://doc.zguiy.com/sdk/zt/assets/index.global.js -->
|
||||
<script src="https://sdk.zguiy.com/zt/assets/index.js"></script>
|
||||
<script src="https://sdk.zguiy.com/zt/assets/index.global.js"></script>
|
||||
<script>
|
||||
const config = {
|
||||
container: 'renderDom',
|
||||
modelUrlList: ['./public/model/model.glb'],
|
||||
env: { hdrPath: '/hdr/my.env', intensity: 1.2, rotationY: 0.3 },
|
||||
modelUrlList: ['https://sdk.zguiy.com/resurces/model/model.glb'],
|
||||
env: { hdrPath: 'https://sdk.zguiy.com/resurces/hdr/hdr.env', intensity: 1.2, rotationY: 0.3 },
|
||||
};
|
||||
|
||||
|
||||
|
||||
const kernel = window.faceSDK && window.faceSDK.kernel;
|
||||
if (!kernel) {
|
||||
console.error('SDK 全局构建未正确加载,请检查脚本地址是否可访问');
|
||||
}
|
||||
|
||||
if (!kernel) return;
|
||||
|
||||
kernel.init(config);
|
||||
|
||||
|
||||
@ -41,8 +41,8 @@
|
||||
import { kernel } from 'https://sdk.zguiy.com/zt/assets/index.js';
|
||||
const config = {
|
||||
container: 'renderDom',
|
||||
modelUrlList: ['./public/model/model.glb'],
|
||||
env: { envPath: './public/hdr/hdr.env', intensity: 1.2, rotationY: 0.3 },
|
||||
modelUrlList: ['https://sdk.zguiy.com/resurces/model/model.glb'],
|
||||
env: { envPath: 'https://sdk.zguiy.com/resurces/hdr/hdr.env', intensity: 1.2, rotationY: 0.3 },
|
||||
};
|
||||
|
||||
kernel.init(config);
|
||||
|
||||
Reference in New Issue
Block a user