Skip to content

Commit eea8915

Browse files
authored
Update to Babylon 5.0.0-alpha.44 (#282)
* Update to Babylon 5.0.0-alpha.44 * Update PackageTest * Update NativeCapture to match Babylon.js changes
1 parent af9bddf commit eea8915

File tree

12 files changed

+65
-53
lines changed

12 files changed

+65
-53
lines changed

Apps/PackageTest/0.63.1/package-lock.json

Lines changed: 7 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Apps/PackageTest/0.63.1/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
"lint": "eslint . --ext .js,.jsx,.ts,.tsx"
1111
},
1212
"dependencies": {
13-
"@babylonjs/core": "^5.0.0-alpha.37",
14-
"@babylonjs/react-native": "file:../../../Package/Assembled/babylonjs-react-native-0.0.1.tgz",
13+
"@babylonjs/core": "^5.0.0-alpha.44",
14+
"@babylonjs/react-native": "^0.4.0-alpha.33",
1515
"react": "16.13.1",
1616
"react-native": "0.63.1",
1717
"react-native-permissions": "^2.1.5"

Apps/PackageTest/0.64.0/package-lock.json

Lines changed: 14 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Apps/PackageTest/0.64.0/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
"lint": "eslint . --ext .js,.jsx,.ts,.tsx"
1313
},
1414
"dependencies": {
15-
"@babylonjs/core": "^5.0.0-alpha.37",
16-
"@babylonjs/react-native": "file:../../../Package/Assembled/babylonjs-react-native-0.0.1.tgz",
15+
"@babylonjs/core": "^5.0.0-alpha.44",
16+
"@babylonjs/react-native": "^0.4.0-alpha.33",
1717
"@babylonjs/react-native-windows": "file:../../../Package/Assembled-Windows/babylonjs-react-native-windows-0.0.1.tgz",
1818
"react": "^17.0.1",
1919
"react-native": "^0.64.0",

Apps/Playground/package-lock.json

Lines changed: 27 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Apps/Playground/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
"iosCmake": "node scripts/tools.js iosCMake"
1515
},
1616
"dependencies": {
17-
"@babylonjs/core": "^5.0.0-alpha.37",
18-
"@babylonjs/loaders": "^5.0.0-alpha.37",
17+
"@babylonjs/core": "^5.0.0-alpha.44",
18+
"@babylonjs/loaders": "^5.0.0-alpha.44",
1919
"@babylonjs/react-native": "file:../../Modules/@babylonjs/react-native",
2020
"@babylonjs/react-native-windows": "file:../../Modules/@babylonjs/react-native-windows",
2121
"@react-native-community/slider": "4.0.0-rc.3",

Modules/@babylonjs/react-native-windows/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"licenseFilename": "LICENSE",
2525
"readmeFilename": "README.md",
2626
"peerDependencies": {
27-
"@babylonjs/core": "^5.0.0-alpha.37",
27+
"@babylonjs/core": "^5.0.0-alpha.44",
2828
"@babylonjs/react-native":"version",
2929
"react": "^17.0.1",
3030
"react-native": "^0.64.0",

Modules/@babylonjs/react-native/EngineHook.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -80,18 +80,6 @@ if (Platform.OS === "android" || Platform.OS === "ios") {
8080
});
8181
return sessionManager;
8282
};
83-
84-
// TODO: https://github.com/BabylonJS/BabylonNative/issues/871
85-
// Workaround to skip clearing render target texture back buffer for XR RTTs.
86-
const originalCreateRenderTargetTexture: (...args: any[]) => RenderTargetTexture = (WebXRSessionManager.prototype as any)._createRenderTargetTexture;
87-
(WebXRSessionManager.prototype as any)._createRenderTargetTexture = function (...args: any[]): RenderTargetTexture {
88-
const renderTargetTexture = originalCreateRenderTargetTexture.apply(this, args);
89-
renderTargetTexture.onClearObservable.add((engine: ThinEngine) => {
90-
// do nothing
91-
});
92-
93-
return renderTargetTexture;
94-
};
9583
} else if (Platform.OS === "windows") {
9684
const originalEnterXRAsync: (...args: any[]) => Promise<WebXRSessionManager> = WebXRExperienceHelper.prototype.enterXRAsync;
9785
WebXRExperienceHelper.prototype.enterXRAsync = async function (...args: any[]): Promise<WebXRSessionManager> {

Modules/@babylonjs/react-native/NativeCapture.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export type CapturedFrame = {
1111
export type CaptureCallback = (capture: CapturedFrame) => void;
1212

1313
declare class NativeCapture {
14-
public constructor(frameBuffer?: unknown | undefined);
14+
public constructor(frameBuffer: unknown);
1515
public addCallback(onCaptureCallback: CaptureCallback): void;
1616
public dispose(): void;
1717
};
@@ -21,7 +21,8 @@ export class CaptureSession {
2121

2222
public constructor(camera: Camera | undefined, onCaptureCallback: CaptureCallback) {
2323
console.warn(`CaptureSession is experimental and likely to change significantly.`);
24-
this.nativeCapture = new NativeCapture(camera?.outputRenderTarget?.getInternalTexture()?._framebuffer);
24+
// HACK: There is no exposed way to access the frame buffer from render target texture
25+
this.nativeCapture = new NativeCapture((camera?.outputRenderTarget?.renderTarget as any)?._framebuffer);
2526
this.nativeCapture.addCallback(onCaptureCallback);
2627
}
2728

Modules/@babylonjs/react-native/package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)