All Projects → mobius3 → Tweeny

mobius3 / Tweeny

Licence: mit
A modern C++ tweening library

Projects that are alternatives of or similar to Tweeny

Motionmachine
A powerful, elegant, and modular animation library for Swift.
Stars: ✭ 380 (-21.65%)
Mutual labels:  tween, interpolation
Pmtween
An elegant and flexible tweening library for iOS and tvOS.
Stars: ✭ 346 (-28.66%)
Mutual labels:  tween, interpolation
Kicad Packages3d
Official KiCad 3D model libraries for rendering and MCAD integration
Stars: ✭ 392 (-19.18%)
Mutual labels:  cmake
Coherent Line Drawing
🖼✨Automatically generates line drawing from a photograph
Stars: ✭ 461 (-4.95%)
Mutual labels:  cmake
Tensorflow Cmake
TensorFlow examples in C, C++, Go and Python without bazel but with cmake and FindTensorFlow.cmake
Stars: ✭ 418 (-13.81%)
Mutual labels:  cmake
Cnl
A Compositional Numeric Library for C++
Stars: ✭ 397 (-18.14%)
Mutual labels:  cmake
Cgold
🐋 The Hitchhiker’s Guide to the CMake
Stars: ✭ 428 (-11.75%)
Mutual labels:  cmake
Downloadproject
CMake module for downloading an external project's source at configure time
Stars: ✭ 388 (-20%)
Mutual labels:  cmake
Libwebrtc
📦 Google's WebRTC implementation in a single static library.
Stars: ✭ 472 (-2.68%)
Mutual labels:  cmake
Rules foreign cc
Build rules for interfacing with "foreign" (non-Bazel) build systems (CMake, configure-make, GNU Make, boost, ninja)
Stars: ✭ 418 (-13.81%)
Mutual labels:  cmake
Tprpix
a Cross-Platform, 2D Survival Sandbox Game Project. Based on C++17/cmake/OpenGL/SQLite3.
Stars: ✭ 448 (-7.63%)
Mutual labels:  cmake
Pykrige
Kriging Toolkit for Python
Stars: ✭ 415 (-14.43%)
Mutual labels:  interpolation
Opencv Mingw Build
👀 MinGW 32bit and 64bit version of OpenCV compiled on Windows. Including OpenCV 3.3.1, 3.4.1, 3.4.1-x64, 3.4.5, 3.4.6, 3.4.7, 3.4.8-x64, 3.4.9, 4.0.0-alpha-x64, 4.0.0-rc-x64, 4.0.1-x64, 4.1.0, 4.1.0-x64, 4.1.1-x64, 4.5.0-with-contrib
Stars: ✭ 401 (-17.32%)
Mutual labels:  cmake
Cpp Reflection
C++ Reflection Parser / Runtime Skeleton
Stars: ✭ 440 (-9.28%)
Mutual labels:  cmake
Gempy
GemPy is an open-source, Python-based 3-D structural geological modeling software, which allows the implicit (i.e. automatic) creation of complex geological models from interface and orientation data. It also offers support for stochastic modeling to adress parameter and model uncertainties.
Stars: ✭ 396 (-18.35%)
Mutual labels:  interpolation
Modern Cmake Sample
Example library that shows best practices and proper usage of CMake by using targets
Stars: ✭ 463 (-4.54%)
Mutual labels:  cmake
Mumble
Mumble is an open-source, low-latency, high quality voice chat software.
Stars: ✭ 4,418 (+810.93%)
Mutual labels:  cmake
Innoextract
A tool to unpack installers created by Inno Setup
Stars: ✭ 407 (-16.08%)
Mutual labels:  cmake
Uikit Cross Platform
Cross-platform Swift implementation of UIKit, mostly for Android
Stars: ✭ 421 (-13.2%)
Mutual labels:  cmake
Subhook
Simple hooking library for C/C++ (x86 only, 32/64-bit, no dependencies)
Stars: ✭ 470 (-3.09%)
Mutual labels:  cmake

Tweeny

Packaging status

Tweeny is an inbetweening library designed for the creation of complex animations for games and other beautiful interactive software. It leverages features of modern C++ to empower developers with an intuitive API for declaring tweenings of any type of value, as long as they support arithmetic operations.

The goal of Tweeny is to provide means to create fluid interpolations when animating position, scale, rotation, frames or other values of screen objects, by setting their values as the tween starting point and then, after each tween step, plugging back the result.

It features:

  • A descriptive and (hopefully) intuitive API,
  • 30+ easing functions,
  • Allows custom easing functions,
  • Multi-point tweening,
  • Simultaneous tween of heterogeneous value sets,
  • Timeline-like usage (allows seeking to any point),
  • Header-only
  • Zero external dependencies
  • Steps forwards or backwards :)
  • Accepts lambdas, functors and functions as step and seek callbacks

Obligatory hello world example:

Linearly interpolate character by character from the word hello to world in 50 steps:

auto helloworld = tweeny::from('h','e','l','l','o').to('w','o','r','l','d').during(50);
for (int i = 0; i < 50; i++) {
    for (char c : helloworld.step(1)) { printf("%c", c); }
    printf("\n");
}

Relevant code:

  • 1: create the tween instance starting with characters of the hello word, adds a tween target with the chars of the world word and specify it should reach it in 50 steps.
  • 3: move the tween forward by one step. Use the return value of it (which ill be a std::array<char, 5> in this case) to set up a for loop iterating in each char, printing it.

Installation methods:

Using your package manager

There are some packages for tweeny made by some great people. Repology has a list of them and their versions here. Thanks, great people!

Not installing it

You just need to adjust your include path to point to the include/ folder after you've cloned this repository.

Copying the include folder:

Tweeny itself is a header only library. You can copy the include/ folder into your project folder and then include from it: #include "tweeny/tweeny.h"

Copying the tweeny-<version>.h header

Since version 3.1.1 tweeny releases include a single-header file with all the necessary code glued together. Simply drop it on your project and/or adjust the include path and then #include "tweeny-3.1.1.h".

CMake subproject

This is useful if you are using CMake already. Copy the whole tweeny project and include it in a top-level CMakeLists.txt file and then use target_link_libraries to add it to your target:

add_subdirectory(tweeny)
target_link_libraries(yourtarget tweeny)

This will add the include/ folder to your search path, and you can #include "tweeny.h".

Doxygen documentation

This library is documented using Doxygen. If you intend to generate docs, specify the flag TWEENY_BUILD_DOCUMENTATION when generating CMake build files (e.g: cmake .. -DTWEENY_BUILD_DOCUMENTATION=1). You will need doxygen installed.

Contributing

Tweeny is open-source, meaning that it is open to modifications and contrubutions from the community (you are very much encouraged to do so!). However, we'd appreciate if you follow these guidelines:

  • Don't use PascalCase nor snake_case in names
  • Use camelCase, but try to avoid multi word names as hard as possible
  • Document code using Doxygen
  • Implementation details should go inside tweeny::detail namespace.
  • Template implementations should go into a .tcc file

Examples:

Demo code showcasing some of Tweeny features can be seen in the tweeny-demo repository. This repository also has instructions on how to build them.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].