q5 4.6.3 → 4.6.4

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/deno.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@q5/q5",
3
- "version": "4.6.1",
3
+ "version": "4.6.4",
4
4
  "license": "LGPL-3.0-only",
5
5
  "description": "Beginner friendly graphics powered by WebGPU, optimized for interactive art!",
6
6
  "author": "quinton-ashley",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "q5",
3
- "version": "4.6.3",
3
+ "version": "4.6.4",
4
4
  "description": "Beginner friendly graphics powered by WebGPU, optimized for interactive art!",
5
5
  "author": "quinton-ashley",
6
6
  "license": "LGPL-3.0-only",
package/q5.js CHANGED
@@ -9081,11 +9081,8 @@ Q5.initWebGPU = async () => {
9081
9081
 
9082
9082
  Q5.WebGPU = async function (scope, parent) {
9083
9083
  if (!scope || scope == 'global') Q5._hasGlobal = true;
9084
- let q;
9085
- if (!(await Q5.initWebGPU())) {
9086
- q = new Q5(scope, parent, 'webgpu-fallback');
9087
- }
9088
- q = new Q5(scope, parent, 'webgpu');
9084
+ let supportsWebGPU = await Q5.initWebGPU(),
9085
+ q = new Q5(scope, parent, 'webgpu' + (supportsWebGPU ? '' : '-fallback'));
9089
9086
  await q.ready;
9090
9087
  return q;
9091
9088
  };