Is there a way to add polygon in A-frame? Kinda like:
<a-entity geometry="primitive:polygon;positions:x y z, ..., x y z;">
</a-entity>
?
Thanks.
Is there a way to add polygon in A-frame? Kinda like:
<a-entity geometry="primitive:polygon;positions:x y z, ..., x y z;">
</a-entity>
?
Thanks.
There used to be a polygon-component, but it doesn't work with 0.5.0 or 0.6.0. So you have to make your own in three.js, by creating a component which adds a mesh to your entity:
Working fiddle here, it's the 'foo' component.
UPDATE
You can make the shape to a 3D object by extruding it along the z-axis, using:
You can find more information about extrusion params here. The
amount
is the 'thickness' of the object.Working fiddle here.