【问题标题】:How to scale an entire scene in A-Frame?如何在 A-Frame 中缩放整个场景?
【发布时间】:2016-09-27 14:34:15
【问题描述】:

我有一个 A-Frame 场景:

 <a-scene>
      <a-box position="-1 0.5 -3" rotation="0 45 0" color="#4CC3D9"></a-box>
      <a-sphere position="0 1.25 -5" radius="1.25" color="#EF2D5E"></a-sphere>
      <a-cylinder position="1 0.75 -3" radius="0.5" height="1.5" color="#FFC65D"></a-cylinder>
      <a-plane position="0 0 -4" rotation="-90 0 0" width="4" height="4" color="#7BC8A4"></a-plane>
      <a-sky color="#ECECEC"></a-sky>
    </a-scene>

如何一次缩放所有内容?

【问题讨论】:

    标签: aframe


    【解决方案1】:

    您可以将所有实体包装在包装器/父实体中,然后对其进行缩放。父实体的位置、旋转和缩放会影响子实体。

    <a-scene>
      <a-entity scale="2 2 2">
        <a-box position="-1 0.5 -3" rotation="0 45 0" color="#4CC3D9"></a-box>
        <a-sphere position="0 1.25 -5" radius="1.25" color="#EF2D5E"></a-sphere>
        <a-cylinder position="1 0.75 -3" radius="0.5" height="1.5" color="#FFC65D"></a-cylinder>
        <a-plane position="0 0 -4" rotation="-90 0 0" width="4" height="4" color="#7BC8A4"></a-plane>
        <a-sky color="#ECECEC"></a-sky>
      </a-entity>
    </a-scene>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-10
      • 2017-12-29
      • 1970-01-01
      相关资源
      最近更新 更多