Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
838 changes: 485 additions & 353 deletions Apps/Playground/ios/Podfile.lock

Large diffs are not rendered by default.

9,879 changes: 2,956 additions & 6,923 deletions Apps/Playground/package-lock-windows.json

Large diffs are not rendered by default.

16,614 changes: 3,006 additions & 13,608 deletions Apps/Playground/package-lock.json

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions Apps/Playground/package-windows.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,34 +14,34 @@
"@babylonjs/loaders": "9.0.0",
"@babylonjs/react-native": "file:../../Modules/@babylonjs/react-native",
"@react-native-community/slider": "^4.2.2",
"@react-native/new-app-screen": "0.80.0",
"@react-native/new-app-screen": "^0.81.4",
"@rnx-kit/metro-config": "2.1.0",
"base-64": "^1.0.0",
"react": "19.1.0",
"react-native": "0.79.4",
"react": "19.1.4",
"react-native": "^0.81.4",
"react-native-permissions": "^5.4.1",
"react-native-windows": "0.79.1"
"react-native-windows": "^0.81.4"
},
"devDependencies": {
"@babel/core": "^7.25.2",
"@babel/preset-env": "^7.25.3",
"@babel/runtime": "^7.25.0",
"@react-native-community/cli": "19.0.0",
"@react-native/babel-preset": "0.80.0",
"@react-native/eslint-config": "0.80.0",
"@react-native/metro-config": "0.80.0",
"@react-native/typescript-config": "0.80.0",
"@react-native-community/cli": "20.0.0",
"@react-native/babel-preset": "^0.81.4",
"@react-native/eslint-config": "^0.81.4",
"@react-native/metro-config": "^0.81.4",
"@react-native/typescript-config": "^0.81.4",
"@types/jest": "^29.5.13",
"@types/react": "^19.1.0",
"@types/react-test-renderer": "^19.1.0",
"eslint": "^8.19.0",
"jest": "^29.6.3",
"prettier": "2.8.8",
"react-test-renderer": "19.1.0",
"react-native-test-app": "^4.3.15",
"react-native-test-app": "^5.0.0",
Comment thread
CedricGuillemet marked this conversation as resolved.
"typescript": "5.0.4"
},
"engines": {
"node": ">=18"
"node": ">=20"
}
}
}
30 changes: 15 additions & 15 deletions Apps/Playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,35 +14,35 @@
"@babylonjs/loaders": "9.0.0",
"@babylonjs/react-native": "file:../../Modules/@babylonjs/react-native",
"@react-native-community/slider": "^4.2.2",
"@react-native/new-app-screen": "0.80.0",
"@react-native/new-app-screen": "^0.81.6",
"@rnx-kit/metro-config": "2.1.0",
"base-64": "^1.0.0",
"react": "19.0.0",
"react-native": "0.79.4",
"react": "19.1.4",
"react-native": "^0.81.6",
"react-native-permissions": "^5.4.1",
"react-native-windows": "0.79.1",
"react-native-windows": "^0.81.4",
Comment thread
CedricGuillemet marked this conversation as resolved.
"react-native-config": "1.5.5"
},
"devDependencies": {
"@babel/core": "^7.25.2",
"@babel/preset-env": "^7.25.3",
"@babel/runtime": "^7.25.0",
"@react-native-community/cli": "19.0.0",
"@react-native/babel-preset": "0.80.0",
"@react-native/eslint-config": "0.80.0",
"@react-native/metro-config": "0.80.0",
"@react-native/typescript-config": "0.80.0",
"@react-native-community/cli": "20.0.0",
"@react-native/babel-preset": "^0.81.6",
"@react-native/eslint-config": "^0.81.6",
"@react-native/metro-config": "^0.81.6",
"@react-native/typescript-config": "^0.81.6",
"@types/jest": "^29.5.13",
"@types/react": "^19.0.0",
"@types/react-test-renderer": "^19.0.0",
"@types/react": "^19.1.0",
"@types/react-test-renderer": "^19.1.0",
"eslint": "^8.19.0",
"jest": "^29.6.3",
"prettier": "2.8.8",
"react-test-renderer": "19.0.0",
"react-native-test-app": "^4.3.15",
"react-test-renderer": "19.1.0",
"react-native-test-app": "^5.0.0",
Comment thread
CedricGuillemet marked this conversation as resolved.
"typescript": "5.0.4"
},
"engines": {
"node": ">=18"
"node": ">=20"
}
}
}
4 changes: 2 additions & 2 deletions Modules/@babylonjs/react-native/EngineView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const EngineView: FunctionComponent<EngineViewProps> = (props: EngineView
//const [fps, setFps] = useState<number>();
const [sceneStats, setSceneStats] = useState<SceneStats>();
const engineViewRef = useRef<Component<NativeEngineViewProps>>(null);
const snapshotPromise = useRef<{ promise: Promise<string>, resolve: (data: string) => void }>();
const snapshotPromise = useRef<{ promise: Promise<string>, resolve: (data: string) => void } | null>(null);
const isTransparent = props.isTransparent ?? false;
const antiAliasing = props.antiAliasing ?? 0;
const androidView = props.androidView ?? "";
Expand Down Expand Up @@ -109,7 +109,7 @@ export const EngineView: FunctionComponent<EngineViewProps> = (props: EngineView
const { data } = event.nativeEvent as Event & { data: string };
if (snapshotPromise.current) {
snapshotPromise.current.resolve(data);
snapshotPromise.current = undefined;
snapshotPromise.current = null;
}
}, []);

Expand Down
7 changes: 7 additions & 0 deletions Modules/@babylonjs/react-native/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ This package has several **peer dependencies**. If these dependencies are unmet,

The `react-native-permissions` dependency is required for XR capabilities of Babylon.js (to request camera permissions automatically). Be sure to follow the `react-native-permissions` [instructions](https://github.com/react-native-community/react-native-permissions#setup) to update your `Podfile` and `Info.plist` (iOS) and/or `AndroidManifest.xml` (Android). These plugins can be disabled and by such, dependency to `react-native-permissions` is not needed anymore (see below).

### React Native minimum version

| BabylonReactNative version | iOS / Android | Windows |
| -------------------------- | -------------------- | ----------------------------- |
| next / main | react-native 0.81.6+ | react-native-windows 0.81.4+ |
| 2.0.0 - 2.0.2 | react-native 0.79.4 | react-native-windows 0.79.1 |

### Android Configuration

The minimum Android SDK version is 21. This must be set as `minSdkVersion` in the consuming project's `build.gradle` file.
Expand Down
2 changes: 1 addition & 1 deletion Modules/@babylonjs/react-native/android/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ disable_warnings(${PACKAGE_NAME}) # deprecated stl

# Set RN_SERIALIZABLE_STATE and C++ flags for React Native 0.81+
if(${REACT_NATIVE_VERSION} GREATER_EQUAL 80)
include("${REACT_NATIVE_DIR}/ReactCommon/cmake-utils/react-native-flags.cmake")
include("${REACTNATIVE_DIR}/ReactCommon/cmake-utils/react-native-flags.cmake")
target_compile_reactnative_options(${PACKAGE_NAME} PRIVATE)
else()
string(APPEND CMAKE_CXX_FLAGS
Expand Down
Loading
Loading