1
This commit is contained in:
7
index.js
7
index.js
@ -1,5 +1,4 @@
|
||||
import { kernel } from './src/main.ts';
|
||||
|
||||
// import { kernel } from 'https://sdk.zguiy.com/zt/assets/index.js';
|
||||
|
||||
// const config = {
|
||||
@ -31,13 +30,15 @@ kernel.init(config);
|
||||
const response = await fetch('http://localhost:3001/api/models/auto-load/list')
|
||||
const data = await response.json()
|
||||
const models = data.data // 这就是模型列表
|
||||
console.log(models);
|
||||
|
||||
models.forEach(model => {
|
||||
console.log(model);
|
||||
kernel.dropZone.setData(model.placement_zone);
|
||||
kernel.model.add({
|
||||
modelId: model.id,
|
||||
modelUrl: model.file_url || `http://localhost:3001${model.file_path}`,
|
||||
modelUrl: model.file_url,
|
||||
modelControlType: model.model_control_type,
|
||||
|
||||
});
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user