@pompadour/react-native-skia 1.5.34 → 1.5.35
Sign up to get free protection for your applications and to get access to all the features.
- package/cpp/skia/modules/neatplayer/include/NeatPlayer.h +26 -24
- package/libs/ios/libskia.xcframework/ios-arm64_arm64e/libskia.a +0 -0
- package/libs/ios/libskia.xcframework/ios-arm64_arm64e_x86_64-simulator/libskia.a +0 -0
- package/libs/ios/libskottie.xcframework/ios-arm64_arm64e/libskottie.a +0 -0
- package/libs/ios/libskottie.xcframework/ios-arm64_arm64e_x86_64-simulator/libskottie.a +0 -0
- package/libs/ios/libskparagraph.xcframework/Info.plist +5 -5
- package/libs/ios/libskparagraph.xcframework/ios-arm64_arm64e/libskparagraph.a +0 -0
- package/libs/ios/libskparagraph.xcframework/ios-arm64_arm64e_x86_64-simulator/libskparagraph.a +0 -0
- package/libs/ios/libsksg.xcframework/ios-arm64_arm64e/libsksg.a +0 -0
- package/libs/ios/libsksg.xcframework/ios-arm64_arm64e_x86_64-simulator/libsksg.a +0 -0
- package/libs/ios/libskshaper.xcframework/ios-arm64_arm64e/libskshaper.a +0 -0
- package/libs/ios/libskshaper.xcframework/ios-arm64_arm64e_x86_64-simulator/libskshaper.a +0 -0
- package/libs/ios/libskunicode.xcframework/Info.plist +5 -5
- package/libs/ios/libskunicode.xcframework/ios-arm64_arm64e/libskunicode.a +0 -0
- package/libs/ios/libskunicode.xcframework/ios-arm64_arm64e_x86_64-simulator/libskunicode.a +0 -0
- package/libs/ios/libsvg.xcframework/Info.plist +5 -5
- package/libs/ios/libsvg.xcframework/ios-arm64_arm64e/libsvg.a +0 -0
- package/libs/ios/libsvg.xcframework/ios-arm64_arm64e_x86_64-simulator/libsvg.a +0 -0
- package/package.json +1 -1
@@ -2,7 +2,6 @@
|
|
2
2
|
#define NEAT_PLAYER_H
|
3
3
|
|
4
4
|
#include "CanvasManager.h"
|
5
|
-
#include "InputManager.h"
|
6
5
|
#include "PerformanceManager.h"
|
7
6
|
#include "Renderer.h"
|
8
7
|
#include "ResourceManager.h"
|
@@ -10,37 +9,44 @@
|
|
10
9
|
#include "State.h"
|
11
10
|
#include "UIManager.h"
|
12
11
|
#include "ViewportManager.h"
|
13
|
-
#include "
|
12
|
+
#include "input/input.h"
|
14
13
|
|
15
|
-
|
14
|
+
using neat::input::GestureEvent;
|
15
|
+
using neat::input::InputSystem;
|
16
|
+
using neat::input::Key;
|
17
|
+
|
18
|
+
class NeatPlayer : public Updatable, public Renderable {
|
16
19
|
public:
|
17
20
|
NeatPlayer();
|
18
|
-
~NeatPlayer();
|
21
|
+
~NeatPlayer() override;
|
19
22
|
|
20
|
-
//
|
23
|
+
// Initialization
|
21
24
|
void initialize(int argc, char** argv);
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
+
|
26
|
+
// Updatable/Renderable interface
|
27
|
+
void update(double deltaTime) override;
|
28
|
+
void render(SkCanvas* canvas) override;
|
29
|
+
|
30
|
+
// Loading
|
25
31
|
bool load();
|
26
32
|
#ifdef __EMSCRIPTEN__
|
27
33
|
void loadUrl(const std::string& url);
|
28
34
|
void loadJSON(const std::string& json);
|
29
35
|
#endif
|
30
|
-
|
31
|
-
|
36
|
+
|
37
|
+
// Input handling
|
38
|
+
bool onKey(Key key, skui::InputState state, skui::ModifierKey modifiers);
|
32
39
|
bool onChar(SkUnichar character);
|
33
|
-
bool onMouse(
|
34
|
-
bool onMouseWheel(float
|
35
|
-
|
36
|
-
|
37
|
-
|
40
|
+
bool onMouse(float x, float y, skui::InputState state, skui::ModifierKey modifiers);
|
41
|
+
bool onMouseWheel(float deltaX, float deltaY, int x, int y, bool isPrecise, skui::ModifierKey modifiers);
|
42
|
+
bool onTouchBegan(int32_t touchId, const SkPoint& position);
|
43
|
+
bool onTouchMoved(int32_t touchId, const SkPoint& position);
|
44
|
+
bool onTouchEnded(int32_t touchId, const SkPoint& position);
|
45
|
+
bool onGesture(const GestureEvent& gesture);
|
38
46
|
|
39
47
|
// Player API
|
40
|
-
bool isPlaying();
|
41
48
|
void togglePlayPause();
|
42
49
|
void seek(double time);
|
43
|
-
void cyclePlaybackSpeed();
|
44
50
|
bool previous();
|
45
51
|
bool next();
|
46
52
|
void cycleBackgroundShader();
|
@@ -57,20 +63,16 @@ private:
|
|
57
63
|
ResourceManager resourceManager;
|
58
64
|
UIManager uiManager;
|
59
65
|
ShaderManager shaderManager;
|
60
|
-
InputManager inputManager;
|
61
66
|
PerformanceManager& performanceManager;
|
62
67
|
|
68
|
+
InputSystem& inputSystem;
|
69
|
+
|
63
70
|
const double seekDelta = 1.0; // 1 seconds seek
|
64
|
-
const std::vector<double> playbackSpeeds = {0.1, 0.25, 0.5, 1.0, 1.5, 2.0, 5.0};
|
65
|
-
size_t currentSpeedIndex = 1; // Start at normal speed (1.0)
|
66
71
|
|
67
|
-
|
72
|
+
void initializeInputSystem();
|
68
73
|
void initializeKeyBindings();
|
69
|
-
void onSelectionChanged(const void* data);
|
70
74
|
|
71
75
|
private:
|
72
|
-
void handlePanGesture(const SkPoint& delta);
|
73
|
-
void handleZoomGesture(const SkPoint& center, float delta);
|
74
76
|
void updateViewportForContent();
|
75
77
|
void renderCanvasCursor(SkCanvas* canvas);
|
76
78
|
void renderScreenCursor(SkCanvas* canvas);
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -8,34 +8,34 @@
|
|
8
8
|
<key>BinaryPath</key>
|
9
9
|
<string>libskparagraph.a</string>
|
10
10
|
<key>LibraryIdentifier</key>
|
11
|
-
<string>ios-
|
11
|
+
<string>ios-arm64_arm64e_x86_64-simulator</string>
|
12
12
|
<key>LibraryPath</key>
|
13
13
|
<string>libskparagraph.a</string>
|
14
14
|
<key>SupportedArchitectures</key>
|
15
15
|
<array>
|
16
16
|
<string>arm64</string>
|
17
17
|
<string>arm64e</string>
|
18
|
+
<string>x86_64</string>
|
18
19
|
</array>
|
19
20
|
<key>SupportedPlatform</key>
|
20
21
|
<string>ios</string>
|
22
|
+
<key>SupportedPlatformVariant</key>
|
23
|
+
<string>simulator</string>
|
21
24
|
</dict>
|
22
25
|
<dict>
|
23
26
|
<key>BinaryPath</key>
|
24
27
|
<string>libskparagraph.a</string>
|
25
28
|
<key>LibraryIdentifier</key>
|
26
|
-
<string>ios-
|
29
|
+
<string>ios-arm64_arm64e</string>
|
27
30
|
<key>LibraryPath</key>
|
28
31
|
<string>libskparagraph.a</string>
|
29
32
|
<key>SupportedArchitectures</key>
|
30
33
|
<array>
|
31
34
|
<string>arm64</string>
|
32
35
|
<string>arm64e</string>
|
33
|
-
<string>x86_64</string>
|
34
36
|
</array>
|
35
37
|
<key>SupportedPlatform</key>
|
36
38
|
<string>ios</string>
|
37
|
-
<key>SupportedPlatformVariant</key>
|
38
|
-
<string>simulator</string>
|
39
39
|
</dict>
|
40
40
|
</array>
|
41
41
|
<key>CFBundlePackageType</key>
|
Binary file
|
package/libs/ios/libskparagraph.xcframework/ios-arm64_arm64e_x86_64-simulator/libskparagraph.a
CHANGED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -8,34 +8,34 @@
|
|
8
8
|
<key>BinaryPath</key>
|
9
9
|
<string>libskunicode.a</string>
|
10
10
|
<key>LibraryIdentifier</key>
|
11
|
-
<string>ios-
|
11
|
+
<string>ios-arm64_arm64e</string>
|
12
12
|
<key>LibraryPath</key>
|
13
13
|
<string>libskunicode.a</string>
|
14
14
|
<key>SupportedArchitectures</key>
|
15
15
|
<array>
|
16
16
|
<string>arm64</string>
|
17
17
|
<string>arm64e</string>
|
18
|
-
<string>x86_64</string>
|
19
18
|
</array>
|
20
19
|
<key>SupportedPlatform</key>
|
21
20
|
<string>ios</string>
|
22
|
-
<key>SupportedPlatformVariant</key>
|
23
|
-
<string>simulator</string>
|
24
21
|
</dict>
|
25
22
|
<dict>
|
26
23
|
<key>BinaryPath</key>
|
27
24
|
<string>libskunicode.a</string>
|
28
25
|
<key>LibraryIdentifier</key>
|
29
|
-
<string>ios-
|
26
|
+
<string>ios-arm64_arm64e_x86_64-simulator</string>
|
30
27
|
<key>LibraryPath</key>
|
31
28
|
<string>libskunicode.a</string>
|
32
29
|
<key>SupportedArchitectures</key>
|
33
30
|
<array>
|
34
31
|
<string>arm64</string>
|
35
32
|
<string>arm64e</string>
|
33
|
+
<string>x86_64</string>
|
36
34
|
</array>
|
37
35
|
<key>SupportedPlatform</key>
|
38
36
|
<string>ios</string>
|
37
|
+
<key>SupportedPlatformVariant</key>
|
38
|
+
<string>simulator</string>
|
39
39
|
</dict>
|
40
40
|
</array>
|
41
41
|
<key>CFBundlePackageType</key>
|
Binary file
|
Binary file
|
@@ -8,34 +8,34 @@
|
|
8
8
|
<key>BinaryPath</key>
|
9
9
|
<string>libsvg.a</string>
|
10
10
|
<key>LibraryIdentifier</key>
|
11
|
-
<string>ios-
|
11
|
+
<string>ios-arm64_arm64e</string>
|
12
12
|
<key>LibraryPath</key>
|
13
13
|
<string>libsvg.a</string>
|
14
14
|
<key>SupportedArchitectures</key>
|
15
15
|
<array>
|
16
16
|
<string>arm64</string>
|
17
17
|
<string>arm64e</string>
|
18
|
-
<string>x86_64</string>
|
19
18
|
</array>
|
20
19
|
<key>SupportedPlatform</key>
|
21
20
|
<string>ios</string>
|
22
|
-
<key>SupportedPlatformVariant</key>
|
23
|
-
<string>simulator</string>
|
24
21
|
</dict>
|
25
22
|
<dict>
|
26
23
|
<key>BinaryPath</key>
|
27
24
|
<string>libsvg.a</string>
|
28
25
|
<key>LibraryIdentifier</key>
|
29
|
-
<string>ios-
|
26
|
+
<string>ios-arm64_arm64e_x86_64-simulator</string>
|
30
27
|
<key>LibraryPath</key>
|
31
28
|
<string>libsvg.a</string>
|
32
29
|
<key>SupportedArchitectures</key>
|
33
30
|
<array>
|
34
31
|
<string>arm64</string>
|
35
32
|
<string>arm64e</string>
|
33
|
+
<string>x86_64</string>
|
36
34
|
</array>
|
37
35
|
<key>SupportedPlatform</key>
|
38
36
|
<string>ios</string>
|
37
|
+
<key>SupportedPlatformVariant</key>
|
38
|
+
<string>simulator</string>
|
39
39
|
</dict>
|
40
40
|
</array>
|
41
41
|
<key>CFBundlePackageType</key>
|
Binary file
|
Binary file
|
package/package.json
CHANGED
@@ -7,7 +7,7 @@
|
|
7
7
|
"setup-skia-web": "./scripts/setup-canvaskit.js"
|
8
8
|
},
|
9
9
|
"title": "React Native Skia",
|
10
|
-
"version": "1.5.
|
10
|
+
"version": "1.5.35",
|
11
11
|
"description": "High-performance React Native Graphics using Skia",
|
12
12
|
"main": "lib/module/index.js",
|
13
13
|
"react-native": "src/index.ts",
|