修改粗糙金属度
This commit is contained in:
4
index.js
4
index.js
@ -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}`);
|
||||
|
||||
Reference in New Issue
Block a user