You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 20, 2020. It is now read-only.
When using @AndrewRayCode 's technique described in #43 (comment) re: using two <viewport>s to render a secondary subscene (potentially with different cameras), and leveraging use of the Viewport's onBeforeRender member, react-three-renderer issues the following warning in the console:
warning.js?da67:33 Warning: Foreign prop onBeforeRender found in viewport. Check the render method of 'ClassWithRenderFunction'.
Note that the behavior is as expected otherwise -- the Viewports are rendered in the order listed, each using whatever camera is referenced, and each calling any specified onBeforeRender call as listed before rendering.
I believe this shouldn't be a warning, and have an idea towards the solution. I had noticed that in the react-three-renderer source, in Viewport.js, onBeforeRender is initialized from props. However, in ViewportDescriptor.js, onBeforeRender is not referenced as a property in the code. I think that by adding this property here properly can resolve this issue so use of the property is not mistakenly flagged as a warning.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When using @AndrewRayCode 's technique described in #43 (comment) re: using two
<viewport>
s to render a secondary subscene (potentially with different cameras), and leveraging use of theViewport
'sonBeforeRender
member,react-three-renderer
issues the following warning in the console:warning.js?da67:33 Warning: Foreign prop onBeforeRender found in viewport. Check the render method of 'ClassWithRenderFunction'.
Note that the behavior is as expected otherwise -- the
Viewport
s are rendered in the order listed, each using whatever camera is referenced, and each calling any specifiedonBeforeRender
call as listed before rendering.I believe this shouldn't be a warning, and have an idea towards the solution. I had noticed that in the
react-three-renderer
source, inViewport.js
,onBeforeRender
is initialized fromprops
. However, inViewportDescriptor.js
,onBeforeRender
is not referenced as a property in the code. I think that by adding this property here properly can resolve this issue so use of the property is not mistakenly flagged as a warning.The text was updated successfully, but these errors were encountered: