wechat-miniprogram/threejs-miniprogram

example中canvas尺寸设置错误

Opened this issue · 0 comments

renderer.setPixelRatio(wx.getSystemInfoSync().pixelRatio);

经实验,在pixelRatio大于1时,renderer.setPixelRatio会改变canvas尺寸,之后再调用renderer.setSize(canvas.width, canvas.height)会导致canvas尺寸再次变大。具体表现之一为视角旋转变慢。
交换两行,先setSize后setPixelRatio可以解决