1
This commit is contained in:
8
index.js
8
index.js
@ -197,7 +197,7 @@ export const executeEvent = async (dropzone_data, result) => {
|
||||
}
|
||||
}
|
||||
|
||||
//一般是换棚子/换颜色/显示放置区域
|
||||
//一般是换棚子/换颜色/设置放置区域
|
||||
export const executeEvent2 = async (result) => {
|
||||
const kernel = getKernel();
|
||||
|
||||
@ -214,14 +214,14 @@ export const executeEvent2 = async (result) => {
|
||||
console.log(`检查模型 ${name + '_' + category} 是否存在:`, modelAlreadyExists);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 只有在需要更换模型且模型不存在时才清除
|
||||
if (hasModelChange && !modelAlreadyExists) {
|
||||
console.log('模型不存在,执行清除操作');
|
||||
|
||||
kernel.model.removeAll();
|
||||
kernel.model.removeAll();
|
||||
} else if (modelAlreadyExists) {
|
||||
kernel.dropZone.hide();
|
||||
kernel.dropZone.hide();
|
||||
console.log('模型已存在,跳过清除操作,仅更新材质');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user