From aff90df46a2928e85ee608217f13d6bfa29d39be Mon Sep 17 00:00:00 2001 From: Cody Bennett <23324155+CodyJasonBennett@users.noreply.github.com> Date: Wed, 16 Aug 2023 18:43:20 -0500 Subject: [PATCH] fix(Canvas): pass scene prop --- packages/fiber/src/native/Canvas.tsx | 2 ++ packages/fiber/src/web/Canvas.tsx | 2 ++ 2 files changed, 4 insertions(+) diff --git a/packages/fiber/src/native/Canvas.tsx b/packages/fiber/src/native/Canvas.tsx index ea785c42be..8182cf3fd5 100644 --- a/packages/fiber/src/native/Canvas.tsx +++ b/packages/fiber/src/native/Canvas.tsx @@ -36,6 +36,7 @@ const CanvasImpl = /*#__PURE__*/ React.forwardRef( performance, raycaster, camera, + scene, onPointerMissed, onCreated, ...props @@ -104,6 +105,7 @@ const CanvasImpl = /*#__PURE__*/ React.forwardRef( performance, raycaster, camera, + scene, // expo-gl can only render at native dpr/resolution // https://github.com/expo/expo-three/issues/39 dpr: PixelRatio.get(), diff --git a/packages/fiber/src/web/Canvas.tsx b/packages/fiber/src/web/Canvas.tsx index 3c200d527b..a25584e357 100644 --- a/packages/fiber/src/web/Canvas.tsx +++ b/packages/fiber/src/web/Canvas.tsx @@ -47,6 +47,7 @@ const CanvasImpl = /*#__PURE__*/ React.forwardRef(func performance, raycaster, camera, + scene, onPointerMissed, onCreated, ...props @@ -93,6 +94,7 @@ const CanvasImpl = /*#__PURE__*/ React.forwardRef(func performance, raycaster, camera, + scene, size: containerRect, // Pass mutable reference to onPointerMissed so it's free to update onPointerMissed: (...args) => handlePointerMissed.current?.(...args),