refactor: change loadModel parameter from string to string array

- Update loadModel signature: url: string -> urls: string[]
- Update validation logic for array parameter
- Update all demo files to pass array instead of single string
This commit is contained in:
yuding
2026-02-26 16:03:38 +08:00
parent 191c571f40
commit fdc6f884aa
5 changed files with 15 additions and 15 deletions

View File

@@ -129,7 +129,7 @@
// 加载模型文件(从 model 目录)- 使用与 index.html 相同的模型路径
const modelUrl = 'https://lyz-1259524260.cos.ap-guangzhou.myqcloud.com/iflow/models/8634e556-a94e-4ba7-be3e-2ea1507cced5/';
engine.engine.loadModel(modelUrl, {
engine.engine.loadModel([modelUrl], {
position: [0, 0, 0], // 初始位置
rotation: [0, 0, 0], // 初始旋转
scale: [1, 1, 1] // 初始缩放