<a-image>
Note: This documentation is for the old 0.3.0 version of A-Frame. Check out the documentation for the current 1.6.0 version
The image primitive displays an image on a flat plane. It is an entity that
prescribes the geometry with its geometric
primitive set to plane
.
Example
<a-scene> |
Attributes
Attribute | Component Mapping | Default Value |
---|---|---|
color | material.color | #FFF |
height | geometry.height | 1 |
metalness | material.metalness | 0 |
opacity | material.opacity | 1 |
repeat | material.repeat | None |
roughness | material.roughness | 0.5 |
segments-height | geometry.segmentsHeight | 1 |
segments-width | geometry.segmentsWidth | 1 |
shader | material.shader | flat |
side | material.side | front |
src | material.src | None |
transparent | material.transparent | false |
width | geometry.width | 1 |
Fine-Tuning
Ensuring that the image is not distorted by stretching requires us to appropriately set the width
and height
.
<a-image src="#logo" width="200" height="100"></a-image> |