@quake2ts/engine 0.0.765 → 0.0.767

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/dist/esm/index.js CHANGED
@@ -15307,9 +15307,10 @@ async function createWebGPUContext(canvas, options) {
15307
15307
  const device = await adapter.requestDevice(deviceDescriptor);
15308
15308
  let context;
15309
15309
  let format = "rgba8unorm";
15310
+ const depthFormat = "depth24plus";
15310
15311
  let isHeadless = true;
15311
- let width = 0;
15312
- let height = 0;
15312
+ let width = options?.width || 800;
15313
+ let height = options?.height || 600;
15313
15314
  if (canvas) {
15314
15315
  context = canvas.getContext("webgpu");
15315
15316
  if (!context) {
@@ -15325,9 +15326,6 @@ async function createWebGPUContext(canvas, options) {
15325
15326
  alphaMode: "opaque"
15326
15327
  // Standard for game rendering
15327
15328
  });
15328
- } else {
15329
- width = 800;
15330
- height = 600;
15331
15329
  }
15332
15330
  const features = /* @__PURE__ */ new Set();
15333
15331
  for (const feature of adapter.features) {
@@ -15338,6 +15336,7 @@ async function createWebGPUContext(canvas, options) {
15338
15336
  device,
15339
15337
  context,
15340
15338
  format,
15339
+ depthFormat,
15341
15340
  features,
15342
15341
  limits: device.limits,
15343
15342
  isHeadless,