рамочный текст, вызывающий странные взгляды - PullRequest
0 голосов
/ 26 апреля 2018

A-Frame Версия: 0.8.0

Платформа / Устройство: настольные ПК

У меня есть текст a-entity внутри элемента a-box, и текст выглядит размытым. A-box немного прозрачный и, кажется, искажает текст.

Это строки в поле

<a-box id="box1" material="src: img/info.svg; transparent:true;" position="0 2 -1.8" rotation="0 0 0" depth="0" width="1" height="1" scale="0.001 0.001 0">
    <a-entity id="info" width="1" position="0 0 0.6" text="value: This is the Mac desktop computer IXD has purchased to supply their students with adequate equipment so that they are capable of accomplishing projects even if they do not have their own Mac OS based system; color:#000;">
    </a-entity>
    <a-circle id="box1-close" radius="0.06" class="clickable" material="src: img/close.svg; transparent:true;" remove-yellow position="0.4 0.4 0.6" rotation="0 0 0" scale="1 1 0">
    </a-circle>
</a-box>

Я подозреваю, что проблема может быть в сглаживании, но я уже включил его вручную в своей a-сцене. При ближайшем рассмотрении это может иметь какое-то отношение к границе?

Ответы [ 2 ]

0 голосов
/ 27 апреля 2018

Я понимаю, что вы имеете в виду по поводу возможной проблемы сглаживания. Я не знаю точно, почему это происходит, но у меня были похожие проблемы при попытке отобразить белый текст на черном фоне. В этом случае, похоже, что-то связано с размещением текста внутри элемента a-box. Следующий блок кода решит проблему:

<a-box id="box1" material="color:black; transparent:true; opacity: 1" position="0 2 -1.8" rotation="0 0 0" depth="10" width="1" height="1" scale="1 1 0.05">
  <a-circle id="box1-close" radius="0.06" class="clickable" material="src: img/close.svg; transparent:true;" remove-yellow position="0.4 0.4 0.6" rotation="0 0 0" scale="1 1 0">
  </a-circle>
</a-box>
<a-entity id="info" width="1" position="0 2 -1.55" text="value: This is the Mac desktop computer IXD has purchased to supply their students with adequate equipment so that they are capable of accomplishing projects even if they do not have their own Mac OS based system; color:white;">
</a-entity>

Размещение текста вне a-box удаляет размытие текста.

0 голосов
/ 26 апреля 2018

Для коробки, возможно, попробуйте установить масштаб z немного больше 0.

Быстрый тест: https://glitch.com/edit/#!/a-frame-text-box

  <a-box id="box1" material="transparent:true;" position="0 2 -1.8" rotation="0 0 0" depth="0" width="1" height="1" scale="1 1 .1">
    <a-entity id="info" width="1" position="0 0 .5" text="value: This is the Mac desktop computer IXD has purchased to supply their students with adequate equipment so that they are capable of accomplishing projects even if they do not have their own Mac OS based system; color:#000;">
    </a-entity>
    <a-circle id="box1-close" radius="0.06" class="clickable" material="src: img/close.svg; transparent:true;" remove-yellow position="0.4 0.4 0.6" rotation="0 0 0" scale="1 1 0">
    </a-circle>
  </a-box>
...