Three.js渲染画布的最大尺寸是多少? [英] What are maximum dimensions of Three.js render canvas?
问题描述
当我将渲染画布大小设置为~4000x4000px时,没关系,但从大约4000(测试5k,6k,8k)开始,似乎场景在某种程度上被切断了。见下图:
When I set render canvas size to ~4000x4000px it's ok, however starting from around 4000 (tested 5k, 6k, 8k) it seems that scene is "cut off" in some way. See image below:
所以最多〜 4k内容在画布中心正确呈现,对于更高的画布大小,它会剪切内容。
So up to ~4k content is properly rendered in the center of canvas and for higher canvas sizes it cuts the content.
- 这是一个Three.js / WebGL限制吗?
- 如果是,那么实际的最大画布尺寸是什么,不会导致任何变形?
- 我能做些什么吗?我需要以高分辨率(8k)获得画布快照。
推荐答案
这不是限制 three.js
但限制了绘图缓冲区的最大大小。它由浏览器供应商定义,不能被应用程序超出。此github问题中的更多信息:
This is not a limitation of three.js
but a limitation of the maximum size of the drawing buffer. It's defined by the browser vendor and can't be exceeded by an application. More information in this github issue:
https://github.com/mrdoob/three.js/issues/5194
这篇关于Three.js渲染画布的最大尺寸是多少?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!