why does this text show up in the middle of the box? I thought that baseline: top
would align it to the top of the containing entity.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<script src="https://aframe.io/releases/1.0.4/aframe.min.js"></script>
</head>
<body>
<a-scene background="color: #FAFAFA">
<a-entity
position="0 2 -3"
geometry="primitive: plane; width: 3; height: 3;"
material="shader: flat; color: red;"
>
<a-entity
position="0 0 0.01"
text="color: black; baseline: top; value: test;"
></a-entity>
</a-entity>
</a-scene>
</body>
</html>
The baseline basically tells the text component whether the Y position refers to the bottom, center, or top of the text itself (i.e. the word "test"), not the parent entity. You would still have to change the text position to move it to the top (in your case set the Y position to 1.5, half the height of the plane). By setting baseline: top
you ensure that multi-line text flows downward onto the plane rather than spilling upwards.
You can see the different properties illustrated in this example from the text component documentation and its corresponding code.