XRSession.updateRenderState() has a bug that properties which are not passed via .updateRenderState() will be overridden with the default values.
For example if you call session.updateRenderState({ inlineVerticalFieldOfView: Math.PI }) where session.renderState is already initialized with certain values, session.renderState.depthNear/depthFar/baseLayer will be overridden with the default values 0.1/1000.0/null in next frame
The root issue is the following line in XRSession.updateRenderState().
.acriveRenderState properties are hidden behind private .activeRenderState[PRIVATE] and getter methods so they can't be copied with Object.assign({}, this[PRIVATE].activeRenderState).
XRSession.updateRenderState()
has a bug that properties which are not passed via.updateRenderState()
will be overridden with the default values.For example if you call
session.updateRenderState({ inlineVerticalFieldOfView: Math.PI })
wheresession.renderState
is already initialized with certain values,session.renderState.depthNear/depthFar/baseLayer
will be overridden with the default values0.1/1000.0/null
in next frameThe root issue is the following line in
XRSession.updateRenderState()
..acriveRenderState
properties are hidden behind private.activeRenderState[PRIVATE]
and getter methods so they can't be copied withObject.assign({}, this[PRIVATE].activeRenderState)
.This PR fixes it.
/CC @lojjic