Giter VIP home page Giter VIP logo

juno's Introduction

Juno - Basic animation library in c++

Juno is a basic animation library in c++ based on SMIL and Web Animations

Basic Usage

#include <juno.h>

using namespace juno;

int main()
{
    double duration = 4;
    double delay = 0;
    double iterationCount = 3;
    Direction direction = Direction::Alternate;
    FillMode fillMode = FillMode::Remove;
    TimingFunction timingFunction = LinearTiming::create();
    Animation animation(duration, delay, iterationCount, direction, fillMode, timingFunction);

    AnimateNumber cx;
    cx.addKeyFrameAt(0, 60, CubicBezierTiming::create(0.5, 0, 0.5, 1)); // 0%
    cx.addKeyFrameAt(0.25, 110, CubicBezierTiming::create(0.5, 0, 0.5, 1)); // 25%
    cx.addKeyFrameAt(0.5, 60, CubicBezierTiming::create(0.5, 0, 0.5, 1)); // 50%
    cx.addKeyFrameAt(0.75, 10, CubicBezierTiming::create(0.5, 0, 0.5, 1)); // 75%
    cx.addKeyFrameAt(1, 60); // 100%

    AnimateNumber cy;
    cy.addKeyFrameAt(0, 10, CubicBezierTiming::create(0.5, 0, 0.5, 1)); // 0%
    cy.addKeyFrameAt(0.25, 60, CubicBezierTiming::create(0.5, 0, 0.5, 1)); // 25%
    cy.addKeyFrameAt(0.5, 110, CubicBezierTiming::create(0.5, 0, 0.5, 1)); // 50%
    cy.addKeyFrameAt(0.75, 60, CubicBezierTiming::create(0.5, 0, 0.5, 1)); // 75%
    cy.addKeyFrameAt(1, 10); // 100%

    return 0;
}

Output :

Features

  • AnimateInteger
  • AnimateNumber
  • AnimateColor(TODO)
  • AnimateTransform(TODO)
  • AnimatePoint(TODO)
  • AnimateRect(TODO)
  • AnimatePath(TODO)
  • AnimateMotion(TODO)

juno's People

Contributors

sammycage avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  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.