[英]Three.js from CanvasRenderer to WebGLRenderer
是否可以将使用Three.js CanvasRenderer的Three.js书面脚本“转换”为WebGLRenderer脚本,如果是的话,如何?
The short answer is: yes. 简短的答案是:是的。
And in general you'll get better performance, though you might have a different-looking result. 通常,您会获得更好的性能,尽管结果可能会有所不同。
A very important difference is that you can't use the renderer .domElement as a Canvas-2D because the WebGL renderer is 3D. 一个非常重要的区别是,因为WebGL渲染器是3D的,所以不能将渲染器.domElement用作Canvas-2D。 So if you've been using canvas commands to, say, draw text, you might have some work ahead to adapt them.
因此,如果您一直在使用画布命令来绘制文本,则可能需要做一些工作来适应它们。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.