The lkg object shouldn't be retrieved from the device or spoofed unless holoplay is enabled.

This commit is contained in:
Rezmason
2021-12-19 22:41:10 -08:00
parent 1a7043a986
commit bdd8782619
3 changed files with 7 additions and 2 deletions

View File

@@ -80,7 +80,10 @@ const interpretDevice = (device) => {
};
};
export default async (useRecordedDevice = false) => {
export default async (useHoloplay = false, useRecordedDevice = false) => {
if (!useHoloplay) {
return interpretDevice(null);
}
const detectedDevice = await getDetectedDevice;
if (detectedDevice == null && useRecordedDevice) {
return interpretDevice(recordedDevice);

View File

@@ -59,7 +59,7 @@ export default async (canvas, config) => {
optionalExtensions: ["EXT_color_buffer_half_float", "WEBGL_color_buffer_float", "OES_standard_derivatives"],
});
const lkg = await getLKG(true);
const lkg = await getLKG(config.useHoloplay, true);
// All this takes place in a full screen quad.
const fullScreenQuad = makeFullScreenQuad(regl);