Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
44c8b1f
remove string-based `via` overloads for easing
mobius3 Aug 17, 2025
b19932b
remove enum-based `via` overloads for easing
mobius3 Aug 17, 2025
8bc7471
simplify `via` method templates and adjust type usage
mobius3 Aug 17, 2025
eea7c91
remove unnecessary `inline` specifiers from tween template methods
mobius3 Aug 17, 2025
abec634
use nested namespace syntax for `tweeny::detail`
mobius3 Aug 17, 2025
7497b7d
remove `enumerated` easing enum from easing class
mobius3 Aug 17, 2025
a86f181
update easing implementations, simplify logic and adopt modern C++ fe…
mobius3 Aug 17, 2025
e12994a
refactor: remove redundant `inline` specifiers, adopt `const` for par…
mobius3 Aug 17, 2025
6847623
use nested namespace syntax for `tweeny::detail` in int2type header
mobius3 Aug 17, 2025
6c1e8d8
simplify `easingresolve` implementation and adopt modern C++ syntax
mobius3 Aug 17, 2025
2108ddd
adopt modern C++ features in tween class templates
mobius3 Aug 17, 2025
569b632
adopt modern C++ features in tweenpoint templates
mobius3 Aug 17, 2025
90ab934
adopt modern C++ features in traits and header
mobius3 Aug 17, 2025
266b910
use modern CMake features and enforce C++17 standards
mobius3 Aug 17, 2025
262f27d
add testing infrastructure with Catch2
mobius3 Aug 17, 2025
4d681f3
refactor: rename `stacked` to `start`, add time-based seek overload
mobius3 Aug 18, 2025
ff002fd
The great refactoring
mobius3 Aug 19, 2025
1d1e9c5
enhance precision, modernize methods, and enforce strict warnings
mobius3 Aug 20, 2025
268d206
use lambda for `return_value` logic in `interpolate`
mobius3 Aug 20, 2025
1943eaf
add `seek` and `jump` methods to `tween`
mobius3 Aug 20, 2025
866d257
add multiple easing functions as individual headers
mobius3 Aug 20, 2025
71bbb11
make `step`, `jump` and `seek` independent of each other
mobius3 Aug 20, 2025
afdecd1
add an event system with step listener support
mobius3 Aug 20, 2025
ff9a955
add `seek` and `jump` event listener support
mobius3 Aug 20, 2025
fcffdc2
unsubscribe support for event listeners
mobius3 Aug 20, 2025
351945a
improve builder with compile-time safety, preventing `build()` withou…
mobius3 Aug 22, 2025
b964ef8
update tween constructor and reorder frame updates
mobius3 Aug 22, 2025
6ae5277
clean up redundant line and correct spacing in headers
mobius3 Dec 25, 2025
70572f1
add `peek` and `progress` methods to `tween`
mobius3 Dec 25, 2025
6623fc9
move easing files to detail namespace
mobius3 Dec 25, 2025
8fbb1b7
remove non-const `render` method from `tween`
mobius3 Dec 25, 2025
be68a7c
migrate easing definitions to tweeny/easing.h
mobius3 Dec 25, 2025
f9381b7
document tweeny.h
mobius3 Dec 25, 2025
f939558
add complete event listener and update callbacks
mobius3 Dec 25, 2025
77c5bf4
migrate tests into categorized directories
mobius3 Dec 25, 2025
c70a86c
update cmake target sources
mobius3 Dec 25, 2025
f0d373c
add keyframeEnter and keyframeLeave events
mobius3 Dec 26, 2025
721a8ee
reorganize project structure and bump version to 4.0.0
mobius3 Dec 26, 2025
3e16e81
update include paths to match new project structure
mobius3 Dec 26, 2025
04659bc
document tweeny::easing namespace and its purpose
mobius3 Dec 26, 2025
c633f4c
document backIn, backOut, and backInOut easing functions
mobius3 Dec 26, 2025
b467b20
document bounceIn, bounceOut, and bounceInOut easing functions
mobius3 Dec 26, 2025
39cd2b2
document circularIn, circularOut, and circularInOut easing functions
mobius3 Dec 26, 2025
262481e
document cubic, elastic, and default easing functions
mobius3 Dec 26, 2025
4ed364f
document elasticInOut, exponentialIn, and exponentialOut easings
mobius3 Dec 26, 2025
c4653b9
document exponentialInOut, linear, and quadratic easings
mobius3 Dec 26, 2025
d23a03d
document quarticIn, quarticOut, and quarticInOut easings
mobius3 Dec 26, 2025
d5f0a2e
document quinticIn, quinticOut, and quinticInOut easings
mobius3 Dec 26, 2025
ca272fb
document sinusoidalIn, sinusoidalOut, sinusoidalInOut, and stepped ea…
mobius3 Dec 26, 2025
6fa330a
establish mainpage, update input paths, and refine doxygen layout
mobius3 Dec 26, 2025
a46889d
update manual and examples to reflect builder pattern
mobius3 Dec 26, 2025
a4581b3
add links to visualize easing functions at easings.net
mobius3 Dec 26, 2025
bd3c2f4
clarify manual wording and improve formatting for consistency
mobius3 Dec 26, 2025
8130d54
update event documentation and clarify usage examples
mobius3 Dec 26, 2025
5a77b8e
add update event type, tests, and handlers
mobius3 Dec 26, 2025
ae05b9a
add v3-to-v4 migration guide and update documentation
mobius3 Dec 26, 2025
5a48eef
update link text for easing visualizations in mainpage doc
mobius3 Dec 26, 2025
547eec2
remove sandbox example code and adjust CMake configuration
mobius3 Dec 26, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.idea
cmake-build-*
build
src/sandbox.cpp
113 changes: 68 additions & 45 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,73 +25,96 @@
# target that uses tweeny, a simple `target_link_libraries(target tweeny)` is sufficient to set up include and link
# instructions.

cmake_minimum_required(VERSION 3.0...3.28)
cmake_minimum_required(VERSION 3.23...3.28)
cmake_policy(SET CMP0063 NEW)
project(Tweeny LANGUAGES CXX VERSION 3.2.0)
project(Tweeny LANGUAGES CXX VERSION 4.0.0)

# Enforce C++17 for targets built in this project
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

# Setup variables and options
option(TWEENY_BUILD_DOCUMENTATION "Attempts to build the documentation. You'll need doxygen and graphviz installed" OFF)
option(TWEENY_BUILD_SINGLE_HEADER "Joins together all header files in a single one. Needs Python 3.6 and quom installed" OFF)
option(TWEENY_BUILD_SANDBOX "Adds a 'sandbox' target that links to tweeny. Useful when exploring tweeny" OFF)
option(TWEENY_BUILD_TESTS "Build Tweeny tests (requires Catch2 v3 to be findable via CMake)" OFF)

# The library target
add_library(tweeny INTERFACE)

# Specify the C++ features a compiler should have to use this library.
if(NOT CMAKE_SYSTEM_NAME STREQUAL "Emscripten")
target_compile_features(tweeny
INTERFACE
cxx_auto_type
cxx_variadic_templates
cxx_lambdas
cxx_nullptr
cxx_right_angle_brackets
cxx_static_assert
cxx_template_template_parameters
)
else()
list(APPEND CMAKE_CXX_FLAGS -std=c++11)
endif()
# Require C++17 for consumers of this interface library.
target_compile_features(tweeny INTERFACE cxx_std_17)

# Provide namespaced alias for consumers.
add_library(tweeny::tweeny ALIAS tweeny)

# Set up include directories
target_include_directories(tweeny INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include/tweeny>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include/tweeny>
)

# Attach headers to the interface target for IDEs and installation
target_sources(tweeny INTERFACE
FILE_SET HEADERS
BASE_DIRS
${CMAKE_CURRENT_SOURCE_DIR}/include/tweeny
FILES
include/tweeny/event.h
include/tweeny/tweeny.h
include/tweeny/tween.h
include/tweeny/tween.tcc
include/tweeny/easing.h
include/tweeny/detail/interpolate.h
include/tweeny/detail/key-frame.h
include/tweeny/detail/tuple-utilities.h
include/tweeny/detail/tween-value.h
include/tweeny/detail/value-container.h
include/tweeny/detail/easing/back.h
include/tweeny/detail/easing/bounce.h
include/tweeny/detail/easing/circular.h
include/tweeny/detail/easing/cubic.h
include/tweeny/detail/easing/def.h
include/tweeny/detail/easing/elastic.h
include/tweeny/detail/easing/exponential.h
include/tweeny/detail/easing/linear.h
include/tweeny/detail/easing/quadratic.h
include/tweeny/detail/easing/quartic.h
include/tweeny/detail/easing/quintic.h
include/tweeny/detail/easing/sinusoidal.h
include/tweeny/detail/easing/stepped.h
)

# Set up install
include(GNUInstallDirs)
install(TARGETS tweeny EXPORT TweenyTargets)
install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/tweeny)
install(TARGETS tweeny EXPORT TweenyTargets FILE_SET HEADERS)

# Set up export and config
include(cmake/SetupExports.cmake)

if (TWEENY_BUILD_DOCUMENTATION)
add_subdirectory(doc)
endif()

# This library is a convenience library to force files appear in the IDE properly.
add_library(tweeny-dummy
include/tweeny.h
include/tweeny.tcc
include/tween.h
include/tween.tcc
include/tweenone.tcc
include/tweenpoint.h
include/tweenpoint.tcc
include/tweentraits.h
include/easing.h
include/easingresolve.h
include/int2type.h
include/dispatcher.h)
set_target_properties(tweeny-dummy PROPERTIES LINKER_LANGUAGE CXX EXCLUDE_FROM_ALL TRUE)
add_subdirectory(src/doc)
endif ()

if (TWEENY_BUILD_TESTS)
enable_testing()
add_subdirectory(src/tests)
endif ()

if (TWEENY_BUILD_SINGLE_HEADER)
include(cmake/GenerateSingleHeader.cmake)
endif()
include(cmake/GenerateSingleHeader.cmake)
endif ()

# Check for sandbox file existence and build if found
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/sandbox.cpp")
add_executable(sandbox src/sandbox.cpp)
target_link_libraries(sandbox tweeny)

if (TWEENY_BUILD_SANDBOX)
add_executable(sandbox src/sandbox.cc)
target_link_libraries(sandbox tweeny)
endif()
# Enable very strict warnings and treat warnings as errors for the sandbox target
target_compile_options(sandbox PRIVATE
$<$<CXX_COMPILER_ID:GNU,Clang>:-Wall -Wextra -Wpedantic -Wconversion -Wsign-conversion -Wshadow -Wold-style-cast -Wcast-align -Woverloaded-virtual -Wnull-dereference -Wdouble-promotion -Wformat=2 -Wimplicit-fallthrough -Wswitch-enum -Wzero-as-null-pointer-constant -Wuseless-cast -Werror>
$<$<CXX_COMPILER_ID:AppleClang>:-Wall -Wextra -Wpedantic -Wconversion -Wsign-conversion -Wshadow -Wold-style-cast -Wcast-align -Woverloaded-virtual -Wnull-dereference -Wformat=2 -Wimplicit-fallthrough -Wswitch-enum -Wzero-as-null-pointer-constant -Wuseless-cast -Werror>
$<$<CXX_COMPILER_ID:MSVC>:/W4 /WX /permissive->
)
endif ()
10 changes: 5 additions & 5 deletions cmake/GenerateSingleHeader.cmake
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# This cmake script is used to generate a single header file with all of tweeny
find_package(Python 3.6 QUIET)
find_package(Python3 3.6 COMPONENTS Interpreter QUIET)

if (NOT PYTHON_FOUND)
message(STATUS "Python 3.6 not found. Single-header include file will NOT be created")
if (NOT Python3_Interpreter_FOUND)
message(STATUS "Python 3.6+ interpreter not found. Single-header include file will NOT be created")
return()
endif()

find_program(QUOM_EXECUTABLE NAMES quom)
if (QUOM_EXECUTABLE-NOTFOUND)
message(STATUS "quom program not found. Install it with pip or easy_install")
if (NOT QUOM_EXECUTABLE)
message(STATUS "quom program not found. Install it with: pip3 install quom")
return()
endif()

Expand Down
8 changes: 6 additions & 2 deletions cmake/SetupExports.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,17 @@ include(CMakePackageConfigHelpers)
include(GNUInstallDirs)

# Setup install of exported targets
install(EXPORT TweenyTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/Tweeny)
install(
EXPORT TweenyTargets
NAMESPACE tweeny::
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/tweeny
)

# Macro to write config
write_basic_package_version_file(
"${CMAKE_CURRENT_BINARY_DIR}/TweenyConfigVersion.cmake"
VERSION ${Tweeny_VERSION}
COMPATIBILITY AnyNewerVersion
COMPATIBILITY SameMajorVersion
)

# Setup install of version config
Expand Down
Loading