Krzysztof Grzybek
Krzysztof Grzybek

Reputation: 9436

Confusing facing of a-text inside a-sky primitive

I don't understand behaviour of a-text primitive in aframe 0.8.0.

I have two simple cases:

  1. a-text directly inside scene - works as expected (fiddle)

    <a-scene> <a-text value="some text" color="#000000" position="0 2 -1"></a-text> </a-scene>

  2. a-text inside a-sky - text looks like it's rotated 180 degrees around y-axis, and backface is visible (fiddle)

    <a-scene> <a-sky radius="10"> <a-text value="some text" color="#000000" position="0 2 -1"></a-text> </a-sky> </a-scene>

Is it expected behaviour? Why it works like this?

Upvotes: 0

Views: 37

Answers (1)

Piotr Adam Milewski
Piotr Adam Milewski

Reputation: 14655

It works like this, because a-sky is just a a-sphere with its scale equal to scale: '-1 1 1' which flips it around. Along with other child entities :)

It's done on purpose to map the sphere's texture on the interior surface


Check out the docs, it's quite described there.

Upvotes: 1

Related Questions