1. 首页
  2. three.js

three.js性能差,在移动设备上的渲染不同

你好three.js社区。n我最近开始深入社区three.js使用简单的GLTFLoader查看器。与Google model viewer类似。n我现在的问题是,与实际的Google model viewer相比,我在低端硬件上的性能非常差,我根本不知道为什么。我已经尝试过不同的方法,比如在手机上禁用AA,也没有希望。n我目前的three.js代码:nnAnd also, the rendering on mobile, in this case Android Chrome 80 and Android Mozilla 74 is just wrongnHow it looks on Desktop:nBildschirmfoto 2020-03-20 um 09.36.461170×683 73.6 KBnHow it looks on Mobile:nScreenshot_20200320-0938521080×812 218 KBnThe color of the glasses texture is completely ignored but the alpha works.nI hope someone can help me here, I\”m new to three.js and completely stuck right now.nThe 3D Model is btw. this one https://sketchfab.com/3d-models/mustang-mu-1683-b50360c38ecc4276bb2e7e77e69b5844 20nI baked the shadow in blender and exported it in .glb.nI\”m not sure but it seems you are mixing an animation loop with on-demand rendering.nFor viewer software, it\”s usually best to render only when the scene has changed (except for the case the model has animations). Hence, I suggest you remove the animation loop.nIf you want to keep it because of the control\”s damping, I recommendyou remove the call of:ncontrols.addEventListener( \”change\”, render );n由于您已经有一个动画循环,因此不需要按需渲染。否则,您会重复渲染调用,这就是性能差的原因。n我认为这是PMREM的错误。根据我的经验,它在智能手机上非常昂贵,尤其是在硬件较弱的手机上n Poor performance and different rendering on mobilen

three.js性能差,在移动设备上的渲染不同 为WP2原创文章,链接:https://www.wp2.cn/three-js/three-js%e6%80%a7%e8%83%bd%e5%b7%ae%ef%bc%8c%e5%9c%a8%e7%a7%bb%e5%8a%a8%e8%ae%be%e5%a4%87%e4%b8%8a%e7%9a%84%e6%b8%b2%e6%9f%93%e4%b8%8d%e5%90%8c/