import { animate, utils, createDraggable, spring } from 'animejs'; const [ $logo ] = utils.$('.logo.js'); const [ $button ] = utils.$('button'); let rotations = 0; // Created a bounce animation loop animate('.logo.js', { scale: [ { to: 1.25, ease: 'inOut(3)', duration: 200 }, { to: 1, ease: spring({ bounce: .7 }) } ], loop: true, loopDelay: 250, }); // Make the logo draggable around its center createDraggable('.logo.js', { container: [0, 0, 0, 0], releaseEase: spring({ bounce: .7 }) }); // Animate logo rotation on click const rotateLogo = () => { rotations++; $button.innerText = `rotations: ${rotations}`; animate($logo, { rotate: rotations * 360, ease: 'out(4)', duration: 1500, }); } $button.addEventListener('click', rotateLogo);
Aim93
The Project The Bike News Documentary Photos
Donate Contact
The ProjectThe BikeNewsDocumentaryPhotos
Aim93
Synthesis of human power and machine to achieve the fastest, most efficient vehicle on earth
DonateContact

 

 

FOLLOW US ON OUR SOCIAL MEDIA

Sponsored by 3Dconnexion

About
The project The Bike News Contact
Latest News
Hub Development Testing Communication System Prototyping the Stabiliser
Gallery
Photos Videos
Ways to Help
Support the team Sponsor the Documentary