Skip to content

example中canvas尺寸设置错误 #53

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
lessball opened this issue Aug 27, 2021 · 0 comments
Open

example中canvas尺寸设置错误 #53

lessball opened this issue Aug 27, 2021 · 0 comments

Comments

@lessball
Copy link

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant