如何在A-Frame中重复或平铺纹理?

时间:2016-11-15 00:17:11

标签: aframe

我有材料

 <a-entity material="src:#imgGround; repeat: 400"></a-entity>

我想重复或平铺地面,但它不起作用。如何在A-Frame中重复或平铺纹理?

我也想对位移和法线贴图这样做:

<a-entity id="ground_model" geometry="primitive:circle;radius:1" position="0 0 0" rotation="-90 0 0" scale="30 30 30" color="green" material="src:#imgGround;flatShading:false;transparent:false;repeat:44;normalMap:#imgGroundN;displacementMap:#imgGroundZ">

1 个答案:

答案 0 :(得分:2)

https://aframe.io/docs/master/components/material.html#built_in_materials_repeat

重复需要两个值(对于U和V映射,或X和Y),而不是一个。

<a-entity material="src:#imgGround; repeat: 20 20"></a-entity>

https://aframe.io/docs/master/components/material.html#built_in_materials_normaltexturerepeat

类似于位移和法线贴图,有特定的重复属性:

<a-entity material="displacementMap:#imgGroundZ; displacementTextureRepeat: 4 4">
相关问题