diff --git a/.env.production b/.env.production
index aeb8fd9..5134857 100644
--- a/.env.production
+++ b/.env.production
@@ -1 +1 @@
-VITE_PUBLIC = https://cdn.files.zguiy.com/studio/
\ No newline at end of file
+VITE_PUBLIC = ./
\ No newline at end of file
diff --git a/examples/global-demo.html b/examples/global-demo.html
index c2e14c9..749d170 100644
--- a/examples/global-demo.html
+++ b/examples/global-demo.html
@@ -1,10 +1,12 @@
+
SDK 全局挂载加载示例
+
@@ -16,24 +18,32 @@
container: 'renderDom',
modelUrlList: ['./public/model/model.glb'],
env: { hdrPath: '/hdr/my.env', intensity: 1.2, rotationY: 0.3 },
- onSuccess: () => console.log('SDK initialized (global)'),
- onError: (err) => console.error('SDK init error', err),
};
- function startSdk() {
- const kernel = window.faceSDK && window.faceSDK.kernel;
- if (!kernel) {
- console.error('SDK kernel not loaded');
- return;
- }
- kernel.init(config);
- }
+ console.log(window.faceSDK , window.faceSDK.kernel);
+
+ const kernel = window.faceSDK && window.faceSDK.kernel;
+ 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);
+ });
+
- if (document.readyState === 'complete') {
- startSdk();
- } else {
- window.addEventListener('load', startSdk);
- }
-
+
+