简体   繁体   English

如何在three.js中创建闪亮的对象?

[英]How can I create a shiny object in three.js?

i want to make a Cube in with three.js with a shiny (like on a silver/gold medal) surface. 我想用一个闪亮的(如银/金牌)表面制作一个带有three.js的立方体。 Is there any special material which I can use (like meshbasicmaterial..) or how am i able to do that? 是否有任何我可以使用的特殊材料(如meshbasicmaterial ..)或我怎么能这样做?

Thanks :) 谢谢 :)

Try this material: 试试这个材料:

THREE.MeshPhongMaterial( { color: 0xffffff } )

I got it from here . 我是从这里得到的。 I think for this to work as you want it to, there have to be some other objects in your scene to reflect. 我认为为了让它按照您的意愿工作,您的场景中必须有一些其他对象才能反映出来。 Otherwise, it won't really look impressive. 否则,它看起来不会令人印象深刻。

Edit: I changed it to what mrdoob suggested. 编辑:我把它更改为mrdoob建议的内容。 It's his library, so I would definitely go with his opinion. 这是他的图书馆,所以我肯定会赞同他的观点。

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

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