【问题标题】:Animating A-Frame fog color动画 A-Frame 雾色
【发布时间】:2016-09-28 17:40:18
【问题描述】:

我正在尝试通过这样做来为 A-Frame 中的雾色设置动画:

<a-scene  antialias="true" fog="type: exponential; color: #444; density: 0.1">
    <a-animation  attribute="fog.color" from="#444" to="#000" dur="2000"></a-animation>
</a-scene>

但它似乎不起作用。我可以通过这种方式对密度进行动画处理,但颜色只是瞬间改变。

【问题讨论】:

    标签: aframe


    【解决方案1】:

    可能是一个错误。也许尝试动画组件。 https://github.com/ngokevin/kframe/tree/master/components/animation/

    <head>
      <title>My A-Frame Scene</title>
      <script src="https://aframe.io/releases/0.3.0/aframe.min.js"></script>
      <script src="https://unpkg.com/aframe-animation-component/dist/aframe-animation-component.min.js"></script>
    </head>
    
    <body>
      <a-scene fog="color: #444" animation__fog="property: fog.color; to: #000; dur: 2000">
      </a-scene>
    </body>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-11-13
      • 2017-12-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多