This commit is contained in:
2026-05-19 12:45:22 +08:00
parent 093a671fd7
commit fef2c4e3bd
4 changed files with 48 additions and 34 deletions

View File

@ -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('模型已存在,跳过清除操作,仅更新材质');
}