Skip to content

Commit

Permalink
Enable native camera plugin (#433)
Browse files Browse the repository at this point in the history
* enable the nativeCamera plugin
  • Loading branch information
CoPrez authored Aug 2, 2022
1 parent 1ed3e5b commit 410290d
Show file tree
Hide file tree
Showing 13 changed files with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
package="com.packagetest">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA"/>

<application
android:name=".MainApplication"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
package="com.packagetest">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA"/>

<application
android:name=".MainApplication"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
package="com.packagetest">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA"/>

<application
android:name=".MainApplication"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ target_link_libraries(BabylonNative
AndroidExtensions
Graphics
JsRuntime
NativeCamera
NativeCapture
NativeEngine
NativeInput
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ target_link_libraries(BabylonNative
jsi
reactnative
JsRuntime
NativeCamera
NativeCapture
NativeEngine
NativeInput
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Pod::Spec.new do |s|
'pvrtc',
'iqa',
'edtaa3',
'tinyexr',
'BabylonNative',
'bgfx',
'bimg',
Expand All @@ -38,6 +39,7 @@ Pod::Spec.new do |s|
'OSDependent',
'MachineIndependent',
'napi',
'NativeCamera',
'NativeCapture',
'NativeEngine',
'NativeInput',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@
$(BabylonNativeBuildDir)BabylonNative\Dependencies\UrlLib\$(Configuration);
$(BabylonNativeBuildDir)BabylonNative\Dependencies\xr\$(Configuration);
$(BabylonNativeBuildDir)BabylonNative\Dependencies\xr\Dependencies\OpenXR-SDK\src\loader\$(Configuration);
$(BabylonNativeBuildDir)BabylonNative\Plugins\NativeCamera\$(Configuration);
$(BabylonNativeBuildDir)BabylonNative\Plugins\NativeCapture\$(Configuration);
$(BabylonNativeBuildDir)BabylonNative\Plugins\NativeEngine\$(Configuration);
$(BabylonNativeBuildDir)BabylonNative\Plugins\NativeInput\$(Configuration);
Expand Down Expand Up @@ -191,6 +192,7 @@
JsRuntime.lib;
MachineIndependentd.lib;
napi.lib;
NativeCamera.lib;
NativeCapture.lib;
NativeEngine.lib;
NativeInput.lib;
Expand Down Expand Up @@ -252,6 +254,7 @@
JsRuntime.lib;
MachineIndependent.lib;
napi.lib;
NativeCamera.lib;
NativeCapture.lib;
NativeEngine.lib;
NativeInput.lib;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ target_link_libraries(BabylonNative
Graphics
jsi
JsRuntime
NativeCamera
NativeCapture
NativeEngine
NativeInput
Expand Down
2 changes: 2 additions & 0 deletions Modules/@babylonjs/react-native/shared/BabylonNative.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include <Babylon/Graphics/Device.h>
#include <Babylon/JsRuntime.h>
#include <Babylon/Plugins/NativeCamera.h>
#include <Babylon/Plugins/NativeCapture.h>
#include <Babylon/Plugins/NativeEngine.h>
#include <Babylon/Plugins/NativeInput.h>
Expand Down Expand Up @@ -53,6 +54,7 @@ namespace BabylonNative
m_nativeInput = &Babylon::Plugins::NativeInput::CreateForJavaScript(m_env);
Babylon::Plugins::NativeOptimizations::Initialize(m_env);
Babylon::Plugins::NativeTracing::Initialize(m_env);
Babylon::Plugins::Camera::Initialize(m_env);

// Initialize Babylon Native polyfills
Babylon::Polyfills::Window::Initialize(m_env);
Expand Down
1 change: 1 addition & 0 deletions Package/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Assembled
Assembled-Windows
Assembled-iOSAndroid
Build
node_modules
.gradle
1 change: 1 addition & 0 deletions Package/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,7 @@ const validateAssemblediOSAndroid = async () => {
'Assembled-iOSAndroid/ios/libs/libJsRuntime.a',
'Assembled-iOSAndroid/ios/libs/libMachineIndependent.a',
'Assembled-iOSAndroid/ios/libs/libnapi.a',
'Assembled-iOSAndroid/ios/libs/libNativeCamera.a',
'Assembled-iOSAndroid/ios/libs/libNativeCapture.a',
'Assembled-iOSAndroid/ios/libs/libNativeEngine.a',
'Assembled-iOSAndroid/ios/libs/libNativeInput.a',
Expand Down
1 change: 1 addition & 0 deletions Package/iOS/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ set(PACKAGED_LIBS
OSDependent
MachineIndependent
napi
NativeCamera
NativeCapture
NativeEngine
NativeInput
Expand Down

0 comments on commit 410290d

Please sign in to comment.