修复场景初始化后纹理未更新的问题
This commit is contained in:
@@ -114,6 +114,7 @@ import CfFlex from "./CfFlex.vue";
|
||||
import { DirectoryId } from "../api/Request";
|
||||
import { IsNullOrWhitespace } from "../helpers/helper.string";
|
||||
import { FromDeflateBase64, ToDeflatedBase64 } from "../helpers/helper.material";
|
||||
import { AsyncDelay } from "../helpers/helper.async";
|
||||
|
||||
export interface MaterialRequest {
|
||||
/** 材质名 */
|
||||
@@ -164,10 +165,6 @@ const materialInfo = reactive({
|
||||
inputText:'',
|
||||
});
|
||||
|
||||
onMounted(async () => {
|
||||
await scene.ChangeTextureFromUrlAsync(_textureSrc.value[0]);
|
||||
})
|
||||
|
||||
watch(() => props.textureSrcList, async (val) => {
|
||||
_textureSrc.value = val;
|
||||
await scene.ChangeTextureFromUrlAsync(_textureSrc.value[0]);
|
||||
|
@@ -53,6 +53,7 @@ async function HandleUpdateConfig() {
|
||||
await scene.ImportMaterialAsync(json);
|
||||
}
|
||||
textureSrc.value = Array.from(config.textureSrc);
|
||||
await scene.ChangeTextureFromUrlAsync(textureSrc.value[0]);
|
||||
}
|
||||
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user