Skip to content

Add support for Skottie #3143

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 40 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
de5199f
:wrench:
wcandillon May 14, 2025
4a625ba
:wrench:
wcandillon May 14, 2025
85be7f1
:wrench:
wcandillon May 14, 2025
ad8d0c8
:wrench:
wcandillon May 14, 2025
b34d5af
:wrench:
wcandillon May 14, 2025
a0e6eef
:wrench:
wcandillon May 14, 2025
7835dba
:wrench:
wcandillon May 14, 2025
98ecf2f
:wrench:
wcandillon May 14, 2025
767494e
:wrench:
wcandillon May 15, 2025
0204c88
:wrench:
wcandillon May 15, 2025
d3c8e15
:wrench:
wcandillon May 15, 2025
9689ac6
:wrench:
wcandillon May 15, 2025
756ada4
:wrench::
wcandillon May 15, 2025
26f18a1
:wrench:
wcandillon May 15, 2025
e183994
:wrench:
wcandillon May 15, 2025
c3ebdf8
:wrench:
wcandillon May 15, 2025
d489da9
:wrench:
wcandillon May 15, 2025
2b6e92b
:wrench:
wcandillon May 15, 2025
978430f
:wrench:
wcandillon May 15, 2025
02befd7
:wrench:
wcandillon May 15, 2025
146cbea
:wrench:
wcandillon May 15, 2025
763cba7
:wrench:
wcandillon May 15, 2025
9f194b0
:wrench:
wcandillon May 16, 2025
6b09461
:wrench:
wcandillon May 16, 2025
8bc59f4
:wrench:
wcandillon May 16, 2025
6d0704d
:wrench:
wcandillon May 16, 2025
a053763
:wrench:
wcandillon May 16, 2025
43ae536
:wrench:
wcandillon May 16, 2025
24d72dc
:wrench:
wcandillon May 16, 2025
56708b6
:wrench:
wcandillon May 17, 2025
54e00ce
:wrench:
wcandillon May 17, 2025
ed646b2
:wrench:
wcandillon May 17, 2025
49eecea
:wrench:
wcandillon May 17, 2025
acf3d88
:wrench:
wcandillon May 17, 2025
71023e3
:wrenc:
wcandillon May 17, 2025
035d1c0
:wrench:
wcandillon May 17, 2025
dd56ab4
:wrench:
wcandillon May 17, 2025
706bee7
:wrench:
wcandillon May 17, 2025
c0963c5
Merge branch 'main' into skottie
wcandillon May 19, 2025
c2eda55
Merge branch 'main' into skottie
wcandillon May 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/docs/static/img/skottie/basic_slots.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/docs/static/img/skottie/lego.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/docs/static/img/skottie/text-prop.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
46 changes: 0 additions & 46 deletions apps/example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1327,49 +1327,6 @@ PODS:
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- react-native-slider (4.5.6):
- DoubleConversion
- glog
- hermes-engine
- RCT-Folly (= 2024.11.18.00)
- RCTRequired
- RCTTypeSafety
- React-Core
- React-debug
- React-Fabric
- React-featureflags
- React-graphics
- React-ImageManager
- react-native-slider/common (= 4.5.6)
- React-NativeModulesApple
- React-RCTFabric
- React-rendererdebug
- React-utils
- ReactCodegen
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- react-native-slider/common (4.5.6):
- DoubleConversion
- glog
- hermes-engine
- RCT-Folly (= 2024.11.18.00)
- RCTRequired
- RCTTypeSafety
- React-Core
- React-debug
- React-Fabric
- React-featureflags
- React-graphics
- React-ImageManager
- React-NativeModulesApple
- React-RCTFabric
- React-rendererdebug
- React-utils
- ReactCodegen
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- React-NativeModulesApple (0.78.0):
- glog
- hermes-engine
Expand Down Expand Up @@ -1957,7 +1914,6 @@ DEPENDENCIES:
- React-microtasksnativemodule (from `../../../node_modules/react-native/ReactCommon/react/nativemodule/microtasks`)
- react-native-safe-area-context (from `../../../node_modules/react-native-safe-area-context`)
- "react-native-skia (from `../../../node_modules/@shopify/react-native-skia`)"
- "react-native-slider (from `../../../node_modules/@react-native-community/slider`)"
- React-NativeModulesApple (from `../../../node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios`)
- React-perflogger (from `../../../node_modules/react-native/ReactCommon/reactperflogger`)
- React-performancetimeline (from `../../../node_modules/react-native/ReactCommon/react/performance/timeline`)
Expand Down Expand Up @@ -2079,8 +2035,6 @@ EXTERNAL SOURCES:
:path: "../../../node_modules/react-native-safe-area-context"
react-native-skia:
:path: "../../../node_modules/@shopify/react-native-skia"
react-native-slider:
:path: "../../../node_modules/@react-native-community/slider"
React-NativeModulesApple:
:path: "../../../node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios"
React-perflogger:
Expand Down
1 change: 0 additions & 1 deletion apps/example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
},
"dependencies": {
"@callstack/react-native-visionos": "^0.75.0",
"@react-native-community/slider": "^4.5.6",
"@react-navigation/bottom-tabs": "^7.2.1",
"@react-navigation/elements": "^2.2.6",
"@react-navigation/native": "^7.0.15",
Expand Down
16 changes: 13 additions & 3 deletions packages/skia/android/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,16 @@ else()
message("-- SK_GRAPHITE: OFF (Dawn libraries not found)")
endif()

set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSK_BUILD_FOR_ANDROID -DSK_IMAGE_READ_PIXELS_DISABLE_LEGACY_API -DFOLLY_NO_CONFIG=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -DFOLLY_HAVE_MEMRCHR=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_MOBILE=1 -DON_ANDROID -DONANDROID")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSK_BUILD_FOR_ANDROID -DSK_DISABLE_LEGACY_SHAPER_FACTORY -DSK_IMAGE_READ_PIXELS_DISABLE_LEGACY_API -DFOLLY_NO_CONFIG=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -DFOLLY_HAVE_MEMRCHR=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_MOBILE=1 -DON_ANDROID -DONANDROID")
set (PACKAGE_NAME "rnskia")
set (SKIA_LIB "skia")
set (SKIA_SVG_LIB "svg")
set (SKIA_SKSHAPER_LIB "skshaper")
set (SKIA_SKPARAGRAPH_LIB "skparagraph")
set (SKIA_SKUNICODE_CORE_LIB "skunicode_core")
set (SKIA_SKUNICODE_ICU_LIB "skunicode_icu")
set (SKIA_SKOTTIE_LIB "skottie")
set (SKIA_SKSG_LIB "sksg")


# Clear some variables
Expand Down Expand Up @@ -140,6 +142,12 @@ set_property(TARGET svg PROPERTY IMPORTED_LOCATION "${SKIA_LIBS_PATH}/libsvg.a")
add_library(skshaper STATIC IMPORTED)
set_property(TARGET skshaper PROPERTY IMPORTED_LOCATION "${SKIA_LIBS_PATH}/libskshaper.a")

add_library(skottie STATIC IMPORTED)
set_property(TARGET skottie PROPERTY IMPORTED_LOCATION "${SKIA_LIBS_PATH}/libskottie.a")

add_library(sksg STATIC IMPORTED)
set_property(TARGET sksg PROPERTY IMPORTED_LOCATION "${SKIA_LIBS_PATH}/libsksg.a")

add_library(skparagraph STATIC IMPORTED)
set_property(TARGET skparagraph PROPERTY IMPORTED_LOCATION "${SKIA_LIBS_PATH}/libskparagraph.a")

Expand Down Expand Up @@ -276,7 +284,8 @@ if(${REACT_NATIVE_VERSION} GREATER_EQUAL 76)
${SKIA_SKPARAGRAPH_LIB}
${SKIA_SKUNICODE_CORE_LIB}
${SKIA_SKUNICODE_ICU_LIB}
${SKIA_LIB}
${SKIA_SKOTTIE_LIB}
${SKIA_SKSG_LIB}
-ljnigraphics
-lGLESv2
-lEGL
Expand All @@ -296,7 +305,8 @@ else()
${SKIA_SKPARAGRAPH_LIB}
${SKIA_SKUNICODE_CORE_LIB}
${SKIA_SKUNICODE_ICU_LIB}
${SKIA_LIB}
${SKIA_SKOTTIE_LIB}
${SKIA_SKSG_LIB}
-ljnigraphics
-lGLESv2
-lEGL
Expand Down
3 changes: 3 additions & 0 deletions packages/skia/cpp/api/JsiSkApi.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
#include "JsiSkTypefaceFontProviderFactory.h"
#include "JsiSkVertices.h"
#include "JsiSkiaContext.h"
#include "JsiSkottieFactory.h"
#include "JsiVideo.h"
#include "recorder/JsiRecorder.h"

Expand Down Expand Up @@ -121,6 +122,8 @@ class JsiSkApi : public JsiSkHostObject {
std::make_shared<JsiSkPictureFactory>(context));
installReadonlyProperty("FontMgr",
std::make_shared<JsiSkFontMgrFactory>(context));
installReadonlyProperty("Skottie",
std::make_shared<JsiSkottieFactory>(context));
installReadonlyProperty(
"TypefaceFontProvider",
std::make_shared<JsiSkTypefaceFontProviderFactory>(context));
Expand Down
Loading
Loading