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
13 changes: 7 additions & 6 deletions Apps/PackageTest/0.63.1/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Apps/PackageTest/0.63.1/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"lint": "eslint . --ext .js,.jsx,.ts,.tsx"
},
"dependencies": {
"@babylonjs/core": "^5.0.0-alpha.37",
"@babylonjs/react-native": "file:../../../Package/Assembled/babylonjs-react-native-0.0.1.tgz",
"@babylonjs/core": "^5.0.0-alpha.44",
"@babylonjs/react-native": "^0.4.0-alpha.33",
"react": "16.13.1",
"react-native": "0.63.1",
"react-native-permissions": "^2.1.5"
Expand Down
20 changes: 14 additions & 6 deletions Apps/PackageTest/0.64.0/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Apps/PackageTest/0.64.0/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"lint": "eslint . --ext .js,.jsx,.ts,.tsx"
},
"dependencies": {
"@babylonjs/core": "^5.0.0-alpha.37",
"@babylonjs/react-native": "file:../../../Package/Assembled/babylonjs-react-native-0.0.1.tgz",
"@babylonjs/core": "^5.0.0-alpha.44",
"@babylonjs/react-native": "^0.4.0-alpha.33",
"@babylonjs/react-native-windows": "file:../../../Package/Assembled-Windows/babylonjs-react-native-windows-0.0.1.tgz",
"react": "^17.0.1",
"react-native": "^0.64.0",
Expand Down
40 changes: 27 additions & 13 deletions Apps/Playground/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Apps/Playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"iosCmake": "node scripts/tools.js iosCMake"
},
"dependencies": {
"@babylonjs/core": "^5.0.0-alpha.37",
"@babylonjs/loaders": "^5.0.0-alpha.37",
"@babylonjs/core": "^5.0.0-alpha.44",
"@babylonjs/loaders": "^5.0.0-alpha.44",
"@babylonjs/react-native": "file:../../Modules/@babylonjs/react-native",
"@babylonjs/react-native-windows": "file:../../Modules/@babylonjs/react-native-windows",
"@react-native-community/slider": "4.0.0-rc.3",
Expand Down
2 changes: 1 addition & 1 deletion Modules/@babylonjs/react-native-windows/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"licenseFilename": "LICENSE",
"readmeFilename": "README.md",
"peerDependencies": {
"@babylonjs/core": "^5.0.0-alpha.37",
"@babylonjs/core": "^5.0.0-alpha.44",
"@babylonjs/react-native":"version",
"react": "^17.0.1",
"react-native": "^0.64.0",
Expand Down
12 changes: 0 additions & 12 deletions Modules/@babylonjs/react-native/EngineHook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,18 +80,6 @@ if (Platform.OS === "android" || Platform.OS === "ios") {
});
return sessionManager;
};

// TODO: https://github.com/BabylonJS/BabylonNative/issues/871
// Workaround to skip clearing render target texture back buffer for XR RTTs.
const originalCreateRenderTargetTexture: (...args: any[]) => RenderTargetTexture = (WebXRSessionManager.prototype as any)._createRenderTargetTexture;
(WebXRSessionManager.prototype as any)._createRenderTargetTexture = function (...args: any[]): RenderTargetTexture {
const renderTargetTexture = originalCreateRenderTargetTexture.apply(this, args);
renderTargetTexture.onClearObservable.add((engine: ThinEngine) => {
// do nothing
});

return renderTargetTexture;
};
} else if (Platform.OS === "windows") {
const originalEnterXRAsync: (...args: any[]) => Promise<WebXRSessionManager> = WebXRExperienceHelper.prototype.enterXRAsync;
WebXRExperienceHelper.prototype.enterXRAsync = async function (...args: any[]): Promise<WebXRSessionManager> {
Expand Down
5 changes: 3 additions & 2 deletions Modules/@babylonjs/react-native/NativeCapture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export type CapturedFrame = {
export type CaptureCallback = (capture: CapturedFrame) => void;

declare class NativeCapture {
public constructor(frameBuffer?: unknown | undefined);
public constructor(frameBuffer: unknown);
public addCallback(onCaptureCallback: CaptureCallback): void;
public dispose(): void;
};
Expand All @@ -21,7 +21,8 @@ export class CaptureSession {

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

Expand Down
8 changes: 4 additions & 4 deletions Modules/@babylonjs/react-native/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Modules/@babylonjs/react-native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@
"semver": "^7.3.2"
},
"peerDependencies": {
"@babylonjs/core": "^5.0.0-alpha.37",
"@babylonjs/core": "^5.0.0-alpha.44",
"react": ">=16.13.1",
"react-native": ">=0.63.1",
"react-native-permissions": "^2.1.4"
},
"devDependencies": {
"@babel/core": "^7.8.4",
"@babel/runtime": "^7.8.4",
"@babylonjs/core": "^5.0.0-alpha.37",
"@babylonjs/core": "^5.0.0-alpha.44",
"@rnw-scripts/eslint-config": "0.1.6",
"@rnw-scripts/ts-config": "0.1.0",
"@types/base-64": "^0.1.3",
Expand Down