@galacean/engine-xr 1.5.15 → 1.5.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser.js +15 -2
- package/dist/browser.js.map +1 -1
- package/dist/browser.min.js +1 -1
- package/dist/browser.min.js.map +1 -1
- package/dist/main.js +15 -2
- package/dist/main.js.map +1 -1
- package/dist/module.js +15 -2
- package/dist/module.js.map +1 -1
- package/package.json +4 -4
package/dist/browser.js
CHANGED
|
@@ -159,7 +159,8 @@
|
|
|
159
159
|
/**
|
|
160
160
|
* @internal
|
|
161
161
|
*/ _proto._onUpdate = function _onUpdate() {
|
|
162
|
-
var
|
|
162
|
+
var cameras = this._xrManager.inputManager._cameras;
|
|
163
|
+
var platformSession = this._xrManager.sessionManager._platformSession;
|
|
163
164
|
for(var i = 0, n = cameras.length; i < n; i++){
|
|
164
165
|
var cameraDevice = cameras[i];
|
|
165
166
|
var camera = cameraDevice._camera;
|
|
@@ -179,11 +180,23 @@
|
|
|
179
180
|
if (!engine.Matrix.equals(camera.projectionMatrix, cameraDevice.projectionMatrix)) {
|
|
180
181
|
camera.projectionMatrix = cameraDevice.projectionMatrix;
|
|
181
182
|
}
|
|
183
|
+
// sync pixel viewport (only when rendering to XR main framebuffer)
|
|
184
|
+
if (!camera.renderTarget) {
|
|
185
|
+
// @ts-ignore
|
|
186
|
+
camera._adjustPixelViewport(platformSession.framebufferWidth, platformSession.framebufferHeight);
|
|
187
|
+
}
|
|
182
188
|
}
|
|
183
189
|
};
|
|
184
190
|
/**
|
|
185
191
|
* @internal
|
|
186
|
-
*/ _proto._onSessionExit = function _onSessionExit() {
|
|
192
|
+
*/ _proto._onSessionExit = function _onSessionExit() {
|
|
193
|
+
var cameras = this._xrManager.inputManager._cameras;
|
|
194
|
+
for(var i = 0, n = cameras.length; i < n; i++){
|
|
195
|
+
var // @ts-ignore
|
|
196
|
+
_cameras_i__camera;
|
|
197
|
+
(_cameras_i__camera = cameras[i]._camera) == null ? void 0 : _cameras_i__camera._updatePixelViewport();
|
|
198
|
+
}
|
|
199
|
+
};
|
|
187
200
|
/**
|
|
188
201
|
* @internal
|
|
189
202
|
*/ _proto._getIgnoreClearFlags = function _getIgnoreClearFlags(cameraType) {
|