Анимация цвета тумана A-Frame

Я пытаюсь оживить цвет тумана в 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>

Но вроде не работает. Я могу анимировать плотность, отлично работает, но цвет меняется в мгновение ока.


person DFSOKO    schedule 28.09.2016    source источник


Ответы (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>
person ngokevin    schedule 28.09.2016