首页 > 解决方案 > AFrame 文本组件不使用“logarithmicDepthBuffer=true”呈现

问题描述

当我logarithmicDepthBuffer: true;在 AFrame 渲染器组件中设置时,该组件的所有实例都text不再渲染。

为了解决这个问题,我从场景中删除了所有其他实体,文本仍然没有呈现。我也尝试使用包装的<a-text>组件,我尝试alphaTest: 0.5设置depthTest: true和设置sortObjects: false只是为了看看我是否可以获得任何结果,但没有发现任何会产生任何结果的结果。

<a-scene renderer="logarithmicDepthBuffer: true;">
    <a-text value="The quick Brown Fox Jumps over the Lazy Dog"></a-text>
</a-scene>

文本根本不出现。控制台中没有渲染工件或错误。

标签: aframe

解决方案


尝试在渲染器周围使用 []

<a-scene [renderer]="logarithmicDepthBuffer: true;">
    <a-text value="The quick Brown Fox Jumps over the Lazy Dog"></a-text>
</a-scene>

推荐阅读