当前位置: 首页 > 文档资料 > A-Frame 中文文档 >

<a-circle>

优质
小牛编辑
126浏览
2023-12-01

The circle primitive creates circles surfaces using the geometry component with the type set to circle.

Example

<a-scene>  <a-assets>    <img src="platform.jpg">  </a-assets>  <!-- Basic circle. -->  <a-circle color="#CCC" radius="20"></a-circle>  <!-- Textured circle parallel to ground. -->  <a-circle src="#platform" radius="50" rotation="-90 0 0"></a-circle></a-scene>

Attributes

AttributeComponent MappingDefault Value
ambient-occlusion-mapmaterial.ambientOcclusionMapNone
ambient-occlusion-map-intensitymaterial.ambientOcclusionMapIntensity1
ambient-occlusion-texture-offsetmaterial.ambientOcclusionTextureOffset0 0
ambient-occlusion-texture-repeatmaterial.ambientOcclusionTextureRepeat1 1
colormaterial.color#FFF
displacement-biasmaterial.displacementBias0.5
displacement-mapmaterial.displacementMapNone
displacement-scalematerial.displacementScale1
displacement-texture-offsetmaterial.displacementTextureOffset0 0
displacement-texture-repeatmaterial.displacementTextureRepeat1 1
env-mapmaterial.envMapNone
fogmaterial.fogtrue
heightmaterial.height256
metalnessmaterial.metalness0
normal-mapmaterial.normalMapNone
normal-scalematerial.normalScale1 1
normal-texture-offsetmaterial.normalTextureOffset0 0
normal-texture-repeatmaterial.normalTextureRepeat1 1
radiusgeometry.radius1
repeatmaterial.repeat1 1
roughnessmaterial.roughness0.5
segmentsgeometry.segments32
spherical-env-mapmaterial.sphericalEnvMapNone
srcmaterial.srcNone
theta-lengthgeometry.thetaLength360
theta-startgeometry.thetaStart0
widthmaterial.width512
wireframematerial.wireframefalse
wireframe-linewidthmaterial.wireframeLinewidth2

Parallelizing to the Ground

To make a circle parallel to the ground, rotate it around the X-axis:

<a-plane rotation="-90 0 0"></a-plane>