2016-09-28 37 views
0

我试图做这个动画在A型架雾的颜色:动画化帧雾的颜色

<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> 

但它似乎并没有工作。我可以通过这种方式将密度动画化得很好,但颜色只是瞬间变化。

回答

0

可能是一个错误。也许尝试动画组件。 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> 
+0

非常感谢@ngokevin这样做的伎俩 – DFSOKO