@pompadour/react-native-skia 1.5.33 → 1.5.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,6 +9,7 @@
9
9
  #include "ShaderManager.h"
10
10
  #include "State.h"
11
11
  #include "UIManager.h"
12
+ #include "ViewportManager.h"
12
13
  #include "utils/Input.h"
13
14
 
14
15
  class NeatPlayer {
@@ -20,19 +21,20 @@ public:
20
21
  void initialize(int argc, char** argv);
21
22
  void update(double deltaTime);
22
23
  void render(SkCanvas* canvas);
23
-
24
24
  // Data Loading
25
25
  bool load();
26
26
  #ifdef __EMSCRIPTEN__
27
27
  void loadUrl(const std::string& url);
28
28
  void loadJSON(const std::string& json);
29
29
  #endif
30
-
31
30
  // System Input
32
31
  bool onKey(skui::Key key, skui::InputState inputState, skui::ModifierKey modifiers);
33
32
  bool onChar(SkUnichar character);
34
33
  bool onMouse(int x, int y, skui::InputState inputState, skui::ModifierKey modifiers);
35
34
  bool onMouseWheel(float delta, int x, int y, skui::ModifierKey modifiers);
35
+ void onTouchBegan(int32_t touchId, const SkPoint& position);
36
+ void onTouchMoved(int32_t touchId, const SkPoint& position);
37
+ void onTouchEnded(int32_t touchId);
36
38
 
37
39
  // Player API
38
40
  bool isPlaying();
@@ -47,6 +49,7 @@ public:
47
49
  void toggleHelpVisibility();
48
50
 
49
51
  private:
52
+ ViewportManager viewportManager;
50
53
  State state;
51
54
  Renderer renderer;
52
55
  FontManager fontManager;
@@ -63,6 +66,14 @@ private:
63
66
 
64
67
  // void initializeInputHandlers();
65
68
  void initializeKeyBindings();
69
+ void onSelectionChanged(const void* data);
70
+
71
+ private:
72
+ void handlePanGesture(const SkPoint& delta);
73
+ void handleZoomGesture(const SkPoint& center, float delta);
74
+ void updateViewportForContent();
75
+ void renderCanvasCursor(SkCanvas* canvas);
76
+ void renderScreenCursor(SkCanvas* canvas);
66
77
  };
67
78
 
68
79
  #endif // NEAT_PLAYER_H
@@ -8,34 +8,34 @@
8
8
  <key>BinaryPath</key>
9
9
  <string>libskottie.a</string>
10
10
  <key>LibraryIdentifier</key>
11
- <string>ios-arm64_arm64e_x86_64-simulator</string>
11
+ <string>ios-arm64_arm64e</string>
12
12
  <key>LibraryPath</key>
13
13
  <string>libskottie.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>libskottie.a</string>
28
25
  <key>LibraryIdentifier</key>
29
- <string>ios-arm64_arm64e</string>
26
+ <string>ios-arm64_arm64e_x86_64-simulator</string>
30
27
  <key>LibraryPath</key>
31
28
  <string>libskottie.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>
@@ -8,34 +8,34 @@
8
8
  <key>BinaryPath</key>
9
9
  <string>libsvg.a</string>
10
10
  <key>LibraryIdentifier</key>
11
- <string>ios-arm64_arm64e</string>
11
+ <string>ios-arm64_arm64e_x86_64-simulator</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>
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>libsvg.a</string>
25
28
  <key>LibraryIdentifier</key>
26
- <string>ios-arm64_arm64e_x86_64-simulator</string>
29
+ <string>ios-arm64_arm64e</string>
27
30
  <key>LibraryPath</key>
28
31
  <string>libsvg.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>
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.33",
10
+ "version": "1.5.34",
11
11
  "description": "High-performance React Native Graphics using Skia",
12
12
  "main": "lib/module/index.js",
13
13
  "react-native": "src/index.ts",