Be careful|

sy0313

园龄:4年9个月粉丝:10关注:1

r3f给物体不同的面设置不同的材质

<mesh>
        <boxGeometry args={[40, 10, 10]} />
        {/* 右边 */}
        <meshStandardMaterial attach="material-0" color="red"  />
        {/* 左边 */}
        <meshStandardMaterial attach="material-1" color="gold" />
        {/* 上边 */}
        <meshStandardMaterial attach="material-2" color="pink"  />
        {/* 下边 */}
        <meshStandardMaterial attach="material-3" color="green"  />
        {/* 前边 */}
        <meshStandardMaterial attach="material-4" color="blue" />
        {/* 后边 */}
        <meshStandardMaterial attach="material-5" color="purple" />
   </mesh>

本文作者:sy0313

本文链接:https://www.cnblogs.com/sunyan97/p/16869359.html

版权声明:本作品采用知识共享署名-非商业性使用-禁止演绎 2.5 中国大陆许可协议进行许可。

posted @   sy0313  阅读(64)  评论(0编辑  收藏  举报
点击右上角即可分享
微信分享提示
评论
收藏
关注
推荐
深色
回顶
收起