@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/browser/index.global.js +1 -1
- package/dist/browser/index.global.js.map +1 -1
- package/dist/cjs/index.cjs +4 -5
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.js +4 -5
- package/dist/esm/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/render/webgpu/context.d.ts +3 -0
- package/dist/types/render/webgpu/context.d.ts.map +1 -1
- package/dist/types/render/webgpu/pipelines/bspPipeline.d.ts +61 -0
- package/dist/types/render/webgpu/pipelines/bspPipeline.d.ts.map +1 -0
- package/dist/types/render/webgpu/renderer.d.ts +7 -0
- package/dist/types/render/webgpu/renderer.d.ts.map +1 -1
- package/package.json +10 -7
package/dist/cjs/index.cjs
CHANGED
|
@@ -15308,9 +15308,10 @@ async function createWebGPUContext(canvas, options) {
|
|
|
15308
15308
|
const device = await adapter.requestDevice(deviceDescriptor);
|
|
15309
15309
|
let context;
|
|
15310
15310
|
let format = "rgba8unorm";
|
|
15311
|
+
const depthFormat = "depth24plus";
|
|
15311
15312
|
let isHeadless = true;
|
|
15312
|
-
let width =
|
|
15313
|
-
let height =
|
|
15313
|
+
let width = options?.width || 800;
|
|
15314
|
+
let height = options?.height || 600;
|
|
15314
15315
|
if (canvas) {
|
|
15315
15316
|
context = canvas.getContext("webgpu");
|
|
15316
15317
|
if (!context) {
|
|
@@ -15326,9 +15327,6 @@ async function createWebGPUContext(canvas, options) {
|
|
|
15326
15327
|
alphaMode: "opaque"
|
|
15327
15328
|
// Standard for game rendering
|
|
15328
15329
|
});
|
|
15329
|
-
} else {
|
|
15330
|
-
width = 800;
|
|
15331
|
-
height = 600;
|
|
15332
15330
|
}
|
|
15333
15331
|
const features = /* @__PURE__ */ new Set();
|
|
15334
15332
|
for (const feature of adapter.features) {
|
|
@@ -15339,6 +15337,7 @@ async function createWebGPUContext(canvas, options) {
|
|
|
15339
15337
|
device,
|
|
15340
15338
|
context,
|
|
15341
15339
|
format,
|
|
15340
|
+
depthFormat,
|
|
15342
15341
|
features,
|
|
15343
15342
|
limits: device.limits,
|
|
15344
15343
|
isHeadless,
|