Attributes – src (Images)

Attributes – src (Images)

Displaying Images and Videos

It is possible to add an image or a video (via the path or an inline URL) to entities:

  • The image is repeated on all areas of the entity. This can be changed by using the tag <a-image>.  The image primitive then shows an image on a flat plane.
  • As you can see, the color property will act as the base color and multiplies per pixel with the texture. Set it to #fff to maintain the original colors of the texture. If the entity should not be seen, add transparent= "true".
  • The images should have the same dimension as the image, otherwise there is a distortion. The can be changed with the repeat attribute

Repeat Attribute

The repeat attribute allows to control, how many times the image is repeated on each side. If you just want to see an image which is not visible on all sides of the entity, use the tag <a-image>.

Example

Use this example to test.


Comments are closed.