【问题标题】:How can I add an animation to my scene using the Visual Inpsector for Aframe?如何使用 Visual Inspector for A Frame 将动画添加到我的场景中?
【发布时间】:2019-06-26 04:02:21
【问题描述】:

我正在尝试使用 Visual Inspector 添加一个简单的旋转动画。关于使用此工具编辑和创建场景的文档并不多。

我已尝试从动画文档中提供的示例中添加 html,但由于某种原因无法正常工作。他们似乎有能力从可视检查器创建 HTML,您可以将其复制到索引文件中,但这似乎不起作用。

<html>
<head>
<script src="https://aframe.io/releases/0.9.0/aframe.min.js"> . 
</script>
</head>
<body>
    <a-scene inspector="" keyboard-shortcuts="" screenshot="" vr-mode- 
ui="">
    <a-sphere src="https://cdn.glitch.com/7ae854de-3b2a-4348-b1f0- 
98ba9c8a0f57%2Fearth_texture.jpg?1557029468067" position="-2.94558 
0.57905 -1.03297" radius="1.25" geometry="">
    <a-animation attribute="rotation" fill="forward" to="0 180 0" 
repeat="indefinite" dur="10"></a-animation></a-sphere>
    <a-sphere src="https://cdn.glitch.com/7ae854de-3b2a-4348-b1f0- 
98ba9c8a0f57%2Fsun_texture.jpg?1557029624357" position="-1.70872 
1.25 -8.03299" radius="1.25" color="#EF2D5E" material="color: 
#e9ef2c" geometry="" scale="0.1 0.1 0.1"></a-sphere>
    <a-sky src="https://cdn.glitch.com/7ae854de-3b2a-4348-b1f0- 
98ba9c8a0f57%2Fstars.jpg?1555972451400" material="" geometry=""></a- 
sky>
    <div class="a-loader-title" style="display: none;"></div> 
    <div class="a-loader-title" style="display: none;"></div>
    <a-entity oculus-go-controls=""></a-entity>
    <a-entity text__title="align: center; value: FOSSweb VR" scale="8 8 
8" position="-0.8 0.42 -3" link="href: https://www.fossweb.com/"> . 
    </a-entity><div class="a-loader-title" style="display: none;"></div>
    </a-scene>
</body>
</html>

我想让地球模型绕它的轴旋转,然后在单击地球后,创建一个相机向下平移靠近地球的动画。

【问题讨论】:

    标签: html aframe


    【解决方案1】:

    a-animation 一直是deprecated since 0.9.0。请改用animation component

    【讨论】:

      猜你喜欢
      • 2017-12-29
      • 2018-08-01
      • 2019-07-06
      • 1970-01-01
      • 1970-01-01
      • 2023-03-10
      • 1970-01-01
      • 2017-02-21
      • 1970-01-01
      相关资源
      最近更新 更多