Closed velickolb closed 2 years ago
Hello, @velickolb! That's weird, can I have a copy of that 3D model to test it?
@velickolb Sorry for the long wait I've just tested your model in 4 environments: Windows, Mac, Android, iOS and it all showed the same result. Looks like your model has meshes named "a", "b", "c" and View3D's returned meshes are ordered in "c", "a", "b" Can you share me some more details?
Test Code
const view3d = new View3D("#view3d-canvas"); const loader = new View3D.GLTFLoader();
loader.load("../asset/female.gltf") .then(model => { console.log(model); view3d.display(model); document.querySelector("#result").innerHTML = model.meshes.map(mesh => mesh.name).join(", "); });
These are the test results:
> Windows (Chrome)
![image](https://user-images.githubusercontent.com/26213435/120614608-62653000-c492-11eb-8d32-e28dfb71ae75.png)
> Mac (Chrome)
![image](https://user-images.githubusercontent.com/26213435/120615359-2a122180-c493-11eb-8c69-45c300f7714b.png)
> Android (Chrome, Android 9)
![Screenshot_20210603-174222](https://user-images.githubusercontent.com/26213435/120615387-326a5c80-c493-11eb-84b9-919db827af9d.png)
> iOS (Safari, 14.4.2)
![image](https://user-images.githubusercontent.com/26213435/120615421-3ac29780-c493-11eb-86cf-30bf9795da5e.png)
I'm having strange issue with toggling visibility of meshes on the imported model. I'm toggling mesh visibility with
view3d.model.meshes[1].visible = false;
and when I open app on Android and on iOS phone different mesh is hidden. I solved it by checking on what platform app is running and based on that I toggle different meshes but I'm sure that there has to be way to do it without checking platform.