修复场景初始化后纹理未更新的问题

This commit is contained in:
陈梓阳 2025-05-30 14:20:29 +08:00
parent 696e8b294e
commit d50ed25d54

View File

@ -164,13 +164,15 @@ const materialInfo = reactive({
inputText:'',
});
onMounted(() => {
scene.ChangeTextureFromUrlAsync(_textureSrc.value[0]);
onMounted(async () => {
await scene.ChangeTextureFromUrlAsync(_textureSrc.value[0]);
UpdateTexture();
})
watch(() => props.textureSrcList, async (val) => {
_textureSrc.value = val;
await scene.ChangeTextureFromUrlAsync(_textureSrc.value[0]);
UpdateTexture();
});
watch(textureAdjustment, async (val) => {