gpt4 book ai didi

aframe - 向球体添加渐变颜色

转载 作者:行者123 更新时间:2023-12-01 01:52:13 25 4
gpt4 key购买 nike

我想为球体添加渐变颜色,目前我正在设置颜色:

<a-sphere position="1 1 0" color="#ef2d5e">
<a-animation attribute="rotation" to="0 360 0" dur="10000" easing="linear" repeat="indefinite">
</a-animation>
</a-sphere>

Demo

如何向球体添加渐变?有什么办法。

最佳答案

试试 https://github.com/zcanter/aframe-gradient-sky

<script src="https://aframe.io/releases/0.5.0/aframe.min.js"></script>

<script src="https://rawgit.com/zcanter/aframe-gradient-sky/master/dist/gradientsky.min.js"></script>

<a-scene>

<!-- A Sphere -->
<a-entity geometry="primitive: sphere" material="shader: gradient; topColor: 255 100 100; bottomColor: 100 100 200; offset: 0.0001" position="0 0 -5"></a-entity>

</a-scene>

关于aframe - 向球体添加渐变颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43424815/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com