简体   繁体   English

Three.js CanvasRenderer,在将图像纹理设置为平面时遇到问题

[英]Three.js CanvasRenderer, having problems setting an image texture to a plane

So basically, I'm attempting to emulate a UI sort of like those used in Halo Reach menus. 因此,基本上,我试图模仿类似于Halo Reach菜单中使用的UI的UI。 I plan on going about this by setting the background of the webpage to some image, creating a plane in front of it, and setting its texture to an image with some semi-transparent rectangle shapes on it to be used as the main background of the UI itself. 我打算通过设置所述网页中的一些图像的背景要对此,在它的前面产生的平面上,并设置其纹理的图像与在其上一些半透明的矩形形状以用作的主要背景UI本身。 I'll worry about the buttons and what not in the future, but as of now I can no longer get it to render anything on the canvas. 我会担心按钮的问题以及将来不会发生的事情,但是到目前为止,我再也无法使它在画布上呈现任何内容。 Previously it was able to render the plane in the correct spot with a white material, but at some point while attempting to apply a texture to it I managed to mix something up and as a result it doesn't render anything. 此前它能够使平面与白色物质正确的位置,但在某些时候试图将纹理应用于它,我成功地混合起来的东西,因此它不会呈现任何内容。

Here is a link to the source if anyone is able to help me: https://dl.dropbox.com/u/40043006/test.zip \\ 如果有人可以帮助我,这里是到源的链接: https : //dl.dropbox.com/u/40043006/test.zip \\

Thanks in advance for any help! 在此先感谢您的帮助!

I suspect you're hitting this . 我怀疑你在打这个 However, I would suggest using plain HTML/images for UI stuff. 但是,我建议使用纯HTML /图像作为UI内容。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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