GithubHelp home page GithubHelp logo

alexxnica / popmotion Goto Github PK

View Code? Open in Web Editor NEW

This project forked from popmotion/popmotion

0.0 0.0 0.0 24.71 MB

The JavaScript motion engine

Home Page: https://popmotion.io

License: MIT License

JavaScript 97.52% CSS 2.48%

popmotion's Introduction

Popmotion

The JavaScript motion engine.

Create unique animations and interactions with tweens, physics and input tracking.

Popmotion is:

  • Tiny: At ~9kb, it's 75% smaller than GreenSock.
  • Fast: Stands up to popular alternatives in performance tests.
  • Compatible: Full browser support and preloaded with CSS, SVG and SVG path renderers.
  • Composable: Actions and output functions can be composed to create complex motion systems.
  • Advanced: Sophisticated tween and color blending for the smoothest possible motion.
  • Powerful: Discrete render step scheduling allows full control over each frame.

npm version npm downloads Twitter Follow

Slack

Examples

Full API documentation

Installation

npm

In your project root:

npm install --save popmotion

In your javascript module:

import { tween } from 'popmotion';

File include

Download popmotion.global.min.js from our GitHub repo and include it in your HTML document:

<script src="path/to/popmotion.global.min.js"></script>

Popmotion is then available as the global variable popmotion.

Quick start

Creating basic motion like tweens and physics in Popmotion is simple. For example, here's a simple tween that prints its output to the console:

import { tween } from 'popmotion';

tween({
  to: 100,
  onUpdate: (v) => console.log(v)
}).start();

To use that tween to move an actual DOM element, we can create a CSS renderer.

const ballRenderer = css(document.getElementById('ball'));

tween({
  to: 100,
  onUpdate: (v) => ballRenderer.set('x', v)
}).start();

Full API documentation

popmotion's People

Contributors

hay avatar jamieowen avatar mattgperry avatar mattperry8 avatar stoikerty avatar

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.