Skip to content

Commit

Permalink
fixed fallback options (#6628)
Browse files Browse the repository at this point in the history
  • Loading branch information
kpal81xd authored May 24, 2024
1 parent 5ccd320 commit b37bfba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/src/app/components/DeviceSelector.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,13 @@ class DeviceSelector extends TypedComponent {
*/
setDisabledOptions(preferredDevice = DEVICETYPE_WEBGPU, activeDevice) {
if (preferredDevice === DEVICETYPE_WEBGL2 && activeDevice !== DEVICETYPE_WEBGL2) {
const fallbackOrder = [DEVICETYPE_WEBGL2];
const fallbackOrder = [DEVICETYPE_WEBGPU];
const disabledOptions = {
[DEVICETYPE_WEBGL2]: 'WebGL 2 (not supported)'
};
this.mergeState({ fallbackOrder, disabledOptions, activeDevice });
} else if (preferredDevice === DEVICETYPE_WEBGPU && activeDevice !== DEVICETYPE_WEBGPU) {
const fallbackOrder = [DEVICETYPE_WEBGPU, DEVICETYPE_WEBGL2];
const fallbackOrder = [DEVICETYPE_WEBGL2];
const disabledOptions = {
[DEVICETYPE_WEBGPU]: 'WebGPU (not supported)'
};
Expand Down

0 comments on commit b37bfba

Please sign in to comment.