Giter VIP home page Giter VIP logo

Comments (2)

low-perry avatar low-perry commented on July 2, 2024

After reading the A-FRAME docs, for animation, the following changes need to be made:

<!-- 1 -->
<a-box color="#0095DD" rotation="20 40 0" position="0 1 0">
      <a-animation 
      attribute="rotation"
      from="20 0 0" to="20 360 0"
      direction="alternate"
      dur="4000"
      repeat="indefinite"
      easing="ease">
    </a-animation>
</a-box>
<!-- replace code above with the following -->
<a-box color="#0095DD" position="0 1 0" rotation="20 40 0" animation="property: rotation;from:20 0 0; to: 20 360 0;dir: alternate; loop: true; dur: 4000; easing: easeInOutQuad;"></a-box>

<!-- 2 -->
  <a-entity 
  geometry="
  primitive: torus;
  radius: 1;
  radiusTubular: 0.1;
  segmentsTubular: 12;" 
  material="color: #EAEFF2;
  roughness: 0.1;
  metalness: 0.5;"
  rotation="10 0 0"
  position="-3 1 0">
    <a-animation attribute="scale" to="1 0.5 1" direction="alternate" dur="2000" repeat="indefinite" easing="linear"></a-animation>
    </a-entity>

    <!-- replace code above with the following -->
    <a-entity
            geometry="
            primitive: torus;
            radius: 1;
            radiusTubular: 0.1;
            segmentsTubular: 12;"
            material="
            color: #EAEFF2;
            roughness: 0.1;
            metalness: 0.5;"
            rotation="10 0 0"
            position="-3 1 0"
            animation="property: scale; to: 1 0.5 1; dir: alternate; dur: 2000; repeat: true; easing: linear;">
        
      </a-entity>

from content.

imperatormatthias avatar imperatormatthias commented on July 2, 2024

This seems to work except for the torus animation property "direction: alternate" should be "dir: alternate" and "repeat: indefinite" should be "loop: true" based on the A-FRAME docs.

from content.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.