修改粗糙金属度

This commit is contained in:
2026-06-04 19:01:53 +08:00
parent bef0bf527b
commit 2abb61104a
10 changed files with 359968 additions and 371 deletions

View File

@ -263,6 +263,8 @@ export const executeEvent = async (dropzone_data, result, sku) => {
const materialName = event.material_name;
const { color, color_map_url, normal_map_url, metallic, roughness } = event.target_data;
kernel.material.apply({
target: materialName,
modelId: modelName + '_' + modelId, // 传入 modelId只替换该模型的材质
@ -378,6 +380,8 @@ export const executeEvent2 = async (result, sku) => {
albedoColor: color,
albedoTexture: color_map_url,
normalMap: normal_map_url,
metallic: +metallic,
roughness: +roughness,
});
console.log(`百叶模型颜色已替换为 ${color}`);