mirror of
https://github.com/Rezmason/matrix.git
synced 2026-04-21 15:29:30 -07:00
The lkg object shouldn't be retrieved from the device or spoofed unless holoplay is enabled.
This commit is contained in:
@@ -76,6 +76,7 @@ const defaults = {
|
|||||||
resolution: 1, // An overall scale multiplier
|
resolution: 1, // An overall scale multiplier
|
||||||
useHalfFloat: false,
|
useHalfFloat: false,
|
||||||
renderer: "webgpu", // The preferred web graphics API
|
renderer: "webgpu", // The preferred web graphics API
|
||||||
|
useHoloplay: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
const versions = {
|
const versions = {
|
||||||
@@ -229,6 +230,7 @@ const versions = {
|
|||||||
volumetric: true,
|
volumetric: true,
|
||||||
forwardSpeed: 0,
|
forwardSpeed: 0,
|
||||||
density: 3,
|
density: 3,
|
||||||
|
useHoloplay: true,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
versions.throwback = versions.operator;
|
versions.throwback = versions.operator;
|
||||||
|
|||||||
@@ -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;
|
const detectedDevice = await getDetectedDevice;
|
||||||
if (detectedDevice == null && useRecordedDevice) {
|
if (detectedDevice == null && useRecordedDevice) {
|
||||||
return interpretDevice(recordedDevice);
|
return interpretDevice(recordedDevice);
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ export default async (canvas, config) => {
|
|||||||
optionalExtensions: ["EXT_color_buffer_half_float", "WEBGL_color_buffer_float", "OES_standard_derivatives"],
|
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.
|
// All this takes place in a full screen quad.
|
||||||
const fullScreenQuad = makeFullScreenQuad(regl);
|
const fullScreenQuad = makeFullScreenQuad(regl);
|
||||||
|
|||||||
Reference in New Issue
Block a user