Closed masoudabdan closed 1 year ago
You can use events get 3d object data, and you can change the color. Change 3d model color example. If you want hide/show some meshes or model, may be can use events same. Use it look like
<template>
<vue3dLoader
filePath="/models/ply/Lucy100k.ply"
@mousemove="onMouseMove"
:cameraPosition="{ x: 0, y: 0, z: -2500 }"
/>
</template>
<script setup lang="ts">
import { vue3dLoader } from "vue-3d-loader";
import { ref } from "vue";
const object = ref(null);
function onMouseMove(event: MouseEvent, intersected: any) {
if (intersected) {
object.value = intersected.object;
(object.value as any).object.visible=false // hide model
(object.value as any).material.visible=false; // hide material
}
}
</script>
No response after 7 days, closed
Hi. I need to list or access to meshes in a loaded 3d file. to change color or hide some meshes. how can i do this?