如何在Aframe中向实体添加淡入淡出过渡

问题描述 投票:1回答:2

我想淡化A-Frame中的实体,我似乎无法使用文档找到解决方案。任何帮助将不胜感激谢谢!

animation fade aframe transitions
2个回答
2
投票

包括动画组件:qazxsw poi

然后:

https://github.com/ngokevin/kframe/tree/master/components/animation

我通过<a-box animation="property: components.material.material.opacity; from: 1; to: 0"></a-box> 进行跳过A-Frame setAttribute的高性能补间。


1
投票

您可以使用components更改<a-animation>属性,如下所示:

material.opacity

。你可以查看文档<a-entity id="myEntity"> <a-animation attribute="material.opacity" dur="1000" repeat="0></a-animation> </a-entity>

活小提琴here

© www.soinside.com 2019 - 2024. All rights reserved.