简体   繁体   中英

three.js positioning mesh cubes not working for different screen sizes

I noticed different screen sizes cause incorrect positioning of objects.

Best example of this is using this page:

http://threejs.org/examples/#canvas_interactive_voxelpainter

On larger laptop screen the cubes are positioned correctly, when viewing the same page on a smaller smartphone screen blocks are positioned in consistently incorrect positions.

Click in the bottom right corner of the grid and the blocks get positioned in the center

That's because your screen is in zoom mode. Try using ctrl+0 (cmd+0 in mac) to revert it back. Interactive functionalities in three.js in some points have problems when you are in zoom mode.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM