@pompadour/react-native-skia 1.5.24 → 1.5.25

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,39 @@
1
+ #include "JsiNeatPlayer.h"
2
+ #include <utility>
3
+
4
+ namespace RNSkia {
5
+
6
+ JsiNeatPlayer::JsiNeatPlayer(std::shared_ptr<NeatPlayer> player)
7
+ : player_(std::move(player)) {}
8
+
9
+ JSI_HOST_FUNCTION(JsiNeatPlayer, load) {
10
+ player_->load();
11
+ return jsi::Value::undefined();
12
+ }
13
+
14
+ JSI_HOST_FUNCTION(JsiNeatPlayer, update) {
15
+ if (count < 1) {
16
+ throw jsi::JSError(runtime, "NeatPlayer.update() requires a deltaTime argument");
17
+ }
18
+ double deltaTime = arguments[0].asNumber();
19
+ player_->update(deltaTime);
20
+ return jsi::Value::undefined();
21
+ }
22
+
23
+ JSI_HOST_FUNCTION(JsiNeatPlayer, render) {
24
+ // Note: This is a simplified version. You may need to handle canvas creation and passing differently.
25
+ // For now, we'll assume the canvas is passed as a pointer wrapped in a number.
26
+ if (count < 1) {
27
+ throw jsi::JSError(runtime, "NeatPlayer.render() requires a canvas argument");
28
+ }
29
+ SkCanvas* canvas = reinterpret_cast<SkCanvas*>(arguments[0].asNumber());
30
+ player_->render(canvas);
31
+ return jsi::Value::undefined();
32
+ }
33
+
34
+ JSI_HOST_FUNCTION(JsiNeatPlayer, togglePlayPause) {
35
+ player_->togglePlayPause();
36
+ return jsi::Value::undefined();
37
+ }
38
+
39
+ } // namespace RNSkia
@@ -0,0 +1,32 @@
1
+ #ifndef PACKAGE_CPP_API_JSINEATPLAYER_H_
2
+ #define PACKAGE_CPP_API_JSINEATPLAYER_H_
3
+
4
+ #include <jsi/jsi.h>
5
+ #include <memory>
6
+ #include "NeatPlayer.h"
7
+
8
+ namespace jsi = facebook::jsi;
9
+
10
+ namespace RNSkia {
11
+
12
+ class JsiNeatPlayer : public jsi::HostObject {
13
+ public:
14
+ explicit JsiNeatPlayer(std::shared_ptr<NeatPlayer> player);
15
+
16
+ jsi::Value load(jsi::Runtime& runtime, const jsi::Value& thisValue, const jsi::Value* arguments, size_t count);
17
+ jsi::Value update(jsi::Runtime& runtime, const jsi::Value& thisValue, const jsi::Value* arguments, size_t count);
18
+ jsi::Value render(jsi::Runtime& runtime, const jsi::Value& thisValue, const jsi::Value* arguments, size_t count);
19
+ jsi::Value togglePlayPause(jsi::Runtime& runtime, const jsi::Value& thisValue, const jsi::Value* arguments, size_t count);
20
+
21
+ JSI_HOST_FUNCTION(load);
22
+ JSI_HOST_FUNCTION(update);
23
+ JSI_HOST_FUNCTION(render);
24
+ JSI_HOST_FUNCTION(togglePlayPause);
25
+
26
+ private:
27
+ std::shared_ptr<NeatPlayer> player_;
28
+ };
29
+
30
+ } // namespace RNSkia
31
+
32
+ #endif // PACKAGE_CPP_API_JSINEATPLAYER_H_
@@ -0,0 +1,68 @@
1
+ #ifndef NEAT_PLAYER_H
2
+ #define NEAT_PLAYER_H
3
+
4
+ #include "AnimationManager.h"
5
+ #include "InputManager.h"
6
+ #include "PerformanceManager.h"
7
+ #include "Renderer.h"
8
+ #include "ResourceManager.h"
9
+ #include "ShaderManager.h"
10
+ #include "State.h"
11
+ #include "UIManager.h"
12
+ #include "utils/Input.h"
13
+
14
+ class NeatPlayer {
15
+ public:
16
+ NeatPlayer();
17
+ ~NeatPlayer();
18
+
19
+ // Update / Render
20
+ void initialize(int argc, char** argv);
21
+ void update(double deltaTime);
22
+ void render(SkCanvas* canvas);
23
+
24
+ // Data Loading
25
+ bool load();
26
+ #ifdef __EMSCRIPTEN__
27
+ void loadUrl(const std::string& url);
28
+ void loadJSON(const std::string& json);
29
+ #endif
30
+
31
+ // System Input
32
+ bool onKey(skui::Key key, skui::InputState inputState, skui::ModifierKey modifiers);
33
+ bool onChar(SkUnichar character);
34
+ bool onMouse(int x, int y, skui::InputState inputState, skui::ModifierKey modifiers);
35
+ bool onMouseWheel(float delta, int x, int y, skui::ModifierKey modifiers);
36
+
37
+ // Player API
38
+ bool isPlaying();
39
+ void togglePlayPause();
40
+ void seek(double time);
41
+ void cyclePlaybackSpeed();
42
+ bool previous();
43
+ bool next();
44
+ void cycleBackgroundShader();
45
+ void cycleForegroundShader();
46
+ void toggleDebugVisibility();
47
+ void toggleHelpVisibility();
48
+
49
+ private:
50
+ State state;
51
+ Renderer renderer;
52
+ FontManager fontManager;
53
+ AnimationManager animationManager;
54
+ ResourceManager resourceManager;
55
+ UIManager uiManager;
56
+ ShaderManager shaderManager;
57
+ InputManager inputManager;
58
+ PerformanceManager& performanceManager;
59
+
60
+ const double seekDelta = 1.0; // 1 seconds seek
61
+ const std::vector<double> playbackSpeeds = {0.1, 0.25, 0.5, 1.0, 1.5, 2.0, 5.0};
62
+ size_t currentSpeedIndex = 1; // Start at normal speed (1.0)
63
+
64
+ // void initializeInputHandlers();
65
+ void initializeKeyBindings();
66
+ };
67
+
68
+ #endif // NEAT_PLAYER_H
@@ -1,11 +1,14 @@
1
-
2
1
  #import "RNSkiaModule.h"
3
2
  #import <React/RCTBridge+Private.h>
4
3
  #import <ReactCommon/RCTTurboModule.h>
4
+ #import <jsi/jsi.h>
5
+ #include "JsiNeatPlayer.h"
6
+ #include "NeatPlayer.h"
5
7
 
6
8
  @implementation RNSkiaModule {
7
9
  SkiaManager *skiaManager;
8
10
  std::shared_ptr<facebook::react::CallInvoker> jsInvoker;
11
+ std::shared_ptr<RNSkia::JsiNeatPlayer> jsiNeatPlayer;
9
12
  }
10
13
 
11
14
  RCT_EXPORT_MODULE()
@@ -27,6 +30,7 @@ RCT_EXPORT_MODULE()
27
30
  [skiaManager invalidate];
28
31
  }
29
32
  skiaManager = nil;
33
+ jsiNeatPlayer = nullptr;
30
34
  }
31
35
 
32
36
  RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(install) {
@@ -39,9 +43,28 @@ RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(install) {
39
43
  jsInvoker = bridge.jsCallInvoker;
40
44
  }
41
45
  skiaManager = [[SkiaManager alloc] initWithBridge:bridge jsInvoker:jsInvoker];
46
+
47
+ // Install JsiNeatPlayer
48
+ [self installJsiNeatPlayer:bridge];
49
+
42
50
  return @true;
43
51
  }
44
52
 
53
+ - (void)installJsiNeatPlayer:(RCTBridge *)bridge {
54
+ RCTCxxBridge *cxxBridge = (RCTCxxBridge *)bridge;
55
+ if (!cxxBridge.runtime) {
56
+ return;
57
+ }
58
+
59
+ facebook::jsi::Runtime &jsiRuntime = *(facebook::jsi::Runtime *)cxxBridge.runt ime;
60
+
61
+ auto neatPlayer = std::make_shared<NeatPlayer>();
62
+ jsiNeatPlayer = std::make_shared<RNSkia::JsiNeatPlayer>(neatPlayer);
63
+
64
+ auto neatPlayerObj = facebook::jsi::Object::createFromHostObject(jsiRuntime, jsiNeatPlayer);
65
+ jsiRuntime.global().setProperty(jsiRuntime, "NeatPlayer", std::move(neatPlayerObj));
66
+ }
67
+
45
68
  #ifdef RCT_NEW_ARCH_ENABLED
46
69
  - (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:
47
70
  (const facebook::react::ObjCTurboModule::InitParams &)params {
@@ -50,4 +73,4 @@ RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(install) {
50
73
  }
51
74
  #endif
52
75
 
53
- @end
76
+ @end
@@ -9,3 +9,4 @@ export * from "./external";
9
9
  export * from "./animation";
10
10
  export * from "./dom/types";
11
11
  export * from "./dom/nodes";
12
+ export * from "./neat";
@@ -122,4 +122,16 @@ Object.keys(_nodes).forEach(function (key) {
122
122
  }
123
123
  });
124
124
  });
125
+ var _neat = require("./neat");
126
+ Object.keys(_neat).forEach(function (key) {
127
+ if (key === "default" || key === "__esModule") return;
128
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
129
+ if (key in exports && exports[key] === _neat[key]) return;
130
+ Object.defineProperty(exports, key, {
131
+ enumerable: true,
132
+ get: function () {
133
+ return _neat[key];
134
+ }
135
+ });
136
+ });
125
137
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["require","_JsiSkImage","_renderer","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_Canvas","_Offscreen","_views","_skia","_external","_animation","_types","_nodes"],"sources":["index.ts"],"sourcesContent":["import \"./skia/NativeSetup\";\nexport { JsiSkImage } from \"./skia/web/JsiSkImage\";\nexport * from \"./renderer\";\nexport * from \"./renderer/Canvas\";\nexport * from \"./renderer/Offscreen\";\nexport * from \"./views\";\nexport * from \"./skia\";\nexport * from \"./external\";\nexport * from \"./animation\";\nexport * from \"./dom/types\";\nexport * from \"./dom/nodes\";\n"],"mappings":";;;;;;;;;;;;;;AAAAA,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AAAAG,MAAA,CAAAC,IAAA,CAAAF,SAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,SAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAZ,SAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AACA,IAAAS,OAAA,GAAAf,OAAA;AAAAG,MAAA,CAAAC,IAAA,CAAAW,OAAA,EAAAV,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAS,OAAA,CAAAT,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAA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A,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAe,MAAA,CAAAf,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAO,MAAA,CAAAf,GAAA;IAAA;EAAA;AAAA;AACA,IAAAgB,MAAA,GAAAtB,OAAA;AAAAG,MAAA,CAAAC,IAAA,CAAAkB,MAAA,EAAAjB,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAgB,MAAA,CAAAhB,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAQ,MAAA,CAAAhB,GAAA;IAAA;EAAA;AAAA"}
1
+ {"version":3,"names":["require","_JsiSkImage","_renderer","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_Canvas","_Offscreen","_views","_skia","_external","_animation","_types","_nodes","_neat"],"sources":["index.ts"],"sourcesContent":["import \"./skia/NativeSetup\";\nexport { JsiSkImage } from \"./skia/web/JsiSkImage\";\nexport * from \"./renderer\";\nexport * from \"./renderer/Canvas\";\nexport * from \"./renderer/Offscreen\";\nexport * from \"./views\";\nexport * from \"./skia\";\nexport * from \"./external\";\nexport * from \"./animation\";\nexport * from \"./dom/types\";\nexport * from \"./dom/nodes\";\nexport * from \"./neat\";\n"],"mappings":";;;;;;;;;;;;;;AAAAA,OAAA;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jB,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAgB,MAAA,CAAAhB,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAQ,MAAA,CAAAhB,GAAA;IAAA;EAAA;AAAA;AACA,IAAAiB,KAAA,GAAAvB,OAAA;AAAAG,MAAA,CAAAC,IAAA,CAAAmB,KAAA,EAAAlB,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAiB,KAAA,CAAAjB,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAS,KAAA,CAAAjB,GAAA;IAAA;EAAA;AAAA"}
@@ -0,0 +1,7 @@
1
+ import { SkCanvas } from "../skia";
2
+ export interface NeatPlayer {
3
+ update: (deltaTime: number) => void;
4
+ render: (canvas: SkCanvas) => void;
5
+ load: () => boolean;
6
+ togglePlayPause: () => void;
7
+ }
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["import { SkCanvas } from \"../skia\"\n\nexport interface NeatPlayer {\n update: (deltaTime: number) => void\n render: (canvas: SkCanvas) => void\n\n load: () => boolean\n // loadUrl: (url: string) => void\n // loadJSON: (json: string) => void\n\n // isPlaying: () => boolean\n togglePlayPause: () => void\n // seek: (time: number) => void\n // cyclePlaybackSpeed: () => void\n // previous: () => void\n // next: () => void\n // cycleBackgroundShader: () => void\n // cycleForegroundShader: () => void\n}\n\n"],"mappings":""}
@@ -9,3 +9,4 @@ export * from "./external";
9
9
  export * from "./animation";
10
10
  export * from "./dom/types";
11
11
  export * from "./dom/nodes";
12
+ export * from "./neat";
@@ -9,4 +9,5 @@ export * from "./external";
9
9
  export * from "./animation";
10
10
  export * from "./dom/types";
11
11
  export * from "./dom/nodes";
12
+ export * from "./neat";
12
13
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["JsiSkImage"],"sources":["index.ts"],"sourcesContent":["import \"./skia/NativeSetup\";\nexport { JsiSkImage } from \"./skia/web/JsiSkImage\";\nexport * from \"./renderer\";\nexport * from \"./renderer/Canvas\";\nexport * from \"./renderer/Offscreen\";\nexport * from \"./views\";\nexport * from \"./skia\";\nexport * from \"./external\";\nexport * from \"./animation\";\nexport * from \"./dom/types\";\nexport * from \"./dom/nodes\";\n"],"mappings":"AAAA,OAAO,oBAAoB;AAC3B,SAASA,UAAU,QAAQ,uBAAuB;AAClD,cAAc,YAAY;AAC1B,cAAc,mBAAmB;AACjC,cAAc,sBAAsB;AACpC,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,YAAY;AAC1B,cAAc,aAAa;AAC3B,cAAc,aAAa;AAC3B,cAAc,aAAa"}
1
+ {"version":3,"names":["JsiSkImage"],"sources":["index.ts"],"sourcesContent":["import \"./skia/NativeSetup\";\nexport { JsiSkImage } from \"./skia/web/JsiSkImage\";\nexport * from \"./renderer\";\nexport * from \"./renderer/Canvas\";\nexport * from \"./renderer/Offscreen\";\nexport * from \"./views\";\nexport * from \"./skia\";\nexport * from \"./external\";\nexport * from \"./animation\";\nexport * from \"./dom/types\";\nexport * from \"./dom/nodes\";\nexport * from \"./neat\";\n"],"mappings":"AAAA,OAAO,oBAAoB;AAC3B,SAASA,UAAU,QAAQ,uBAAuB;AAClD,cAAc,YAAY;AAC1B,cAAc,mBAAmB;AACjC,cAAc,sBAAsB;AACpC,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,YAAY;AAC1B,cAAc,aAAa;AAC3B,cAAc,aAAa;AAC3B,cAAc,aAAa;AAC3B,cAAc,QAAQ"}
@@ -0,0 +1,7 @@
1
+ import { SkCanvas } from "../skia";
2
+ export interface NeatPlayer {
3
+ update: (deltaTime: number) => void;
4
+ render: (canvas: SkCanvas) => void;
5
+ load: () => boolean;
6
+ togglePlayPause: () => void;
7
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["import { SkCanvas } from \"../skia\"\n\nexport interface NeatPlayer {\n update: (deltaTime: number) => void\n render: (canvas: SkCanvas) => void\n\n load: () => boolean\n // loadUrl: (url: string) => void\n // loadJSON: (json: string) => void\n\n // isPlaying: () => boolean\n togglePlayPause: () => void\n // seek: (time: number) => void\n // cyclePlaybackSpeed: () => void\n // previous: () => void\n // next: () => void\n // cycleBackgroundShader: () => void\n // cycleForegroundShader: () => void\n}\n\n"],"mappings":""}
@@ -9,3 +9,4 @@ export * from "./external";
9
9
  export * from "./animation";
10
10
  export * from "./dom/types";
11
11
  export * from "./dom/nodes";
12
+ export * from "./neat";
@@ -0,0 +1,7 @@
1
+ import { SkCanvas } from "../skia";
2
+ export interface NeatPlayer {
3
+ update: (deltaTime: number) => void;
4
+ render: (canvas: SkCanvas) => void;
5
+ load: () => boolean;
6
+ togglePlayPause: () => void;
7
+ }
@@ -8,34 +8,34 @@
8
8
  <key>BinaryPath</key>
9
9
  <string>libskia.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>libskia.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>libskia.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>libskia.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>libsksg.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>libsksg.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>libsksg.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>libsksg.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>
@@ -8,34 +8,34 @@
8
8
  <key>BinaryPath</key>
9
9
  <string>libskunicode.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>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-arm64_arm64e</string>
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>
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.24",
10
+ "version": "1.5.25",
11
11
  "description": "High-performance React Native Graphics using Skia",
12
12
  "main": "lib/module/index.js",
13
13
  "react-native": "src/index.ts",
package/src/index.ts CHANGED
@@ -9,3 +9,4 @@ export * from "./external";
9
9
  export * from "./animation";
10
10
  export * from "./dom/types";
11
11
  export * from "./dom/nodes";
12
+ export * from "./neat";
@@ -0,0 +1,20 @@
1
+ import { SkCanvas } from "../skia"
2
+
3
+ export interface NeatPlayer {
4
+ update: (deltaTime: number) => void
5
+ render: (canvas: SkCanvas) => void
6
+
7
+ load: () => boolean
8
+ // loadUrl: (url: string) => void
9
+ // loadJSON: (json: string) => void
10
+
11
+ // isPlaying: () => boolean
12
+ togglePlayPause: () => void
13
+ // seek: (time: number) => void
14
+ // cyclePlaybackSpeed: () => void
15
+ // previous: () => void
16
+ // next: () => void
17
+ // cycleBackgroundShader: () => void
18
+ // cycleForegroundShader: () => void
19
+ }
20
+