Skip to content

Commit

Permalink
Fix: Throw error when know Renderer is available (#10434)
Browse files Browse the repository at this point in the history
  • Loading branch information
bigtimebuddy committed Apr 30, 2024
1 parent 952a66c commit 4ce7191
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/rendering/renderers/autoDetectRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,18 @@ export async function autoDetectRenderer(options: Partial<AutoDetectOptions>): P
{
finalOptions = { ...options };

break;
throw new Error('CanvasRenderer is not yet implemented');
}
}

delete finalOptions.webgpu;
delete finalOptions.webgl;

if (!RendererClass)
{
throw new Error('No available renderer for the current environment');
}

const renderer = new RendererClass();

await renderer.init(finalOptions);
Expand Down

0 comments on commit 4ce7191

Please sign in to comment.