@quake2ts/engine 0.0.743 → 0.0.745
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 +13 -13
- package/dist/browser/index.global.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/render/webgpu/pipelines/md3.d.ts +41 -0
- package/dist/types/render/webgpu/pipelines/md3.d.ts.map +1 -0
- package/dist/types/render/webgpu/pipelines/particleSystem.d.ts +25 -0
- package/dist/types/render/webgpu/pipelines/particleSystem.d.ts.map +1 -0
- package/package.json +5 -5
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Md3Model, Md3Surface } from '../../../assets/md3.js';
|
|
2
|
+
import { Md3LightingOptions, Md3FrameBlend, Md3SurfaceGeometry } from '../../md3Pipeline.js';
|
|
3
|
+
import { Texture2D } from '../resources.js';
|
|
4
|
+
export { Md3FrameBlend, Md3LightingOptions, Md3DynamicLight, Md3TagTransform } from '../../md3Pipeline.js';
|
|
5
|
+
export declare class Md3SurfaceMeshGPU {
|
|
6
|
+
readonly device: GPUDevice;
|
|
7
|
+
readonly geometry: Md3SurfaceGeometry;
|
|
8
|
+
readonly vertexBuffer: GPUBuffer;
|
|
9
|
+
readonly indexBuffer: GPUBuffer;
|
|
10
|
+
readonly indexCount: number;
|
|
11
|
+
constructor(device: GPUDevice, surface: Md3Surface, blend: Md3FrameBlend, lighting?: Md3LightingOptions);
|
|
12
|
+
update(surface: Md3Surface, blend: Md3FrameBlend, lighting?: Md3LightingOptions): void;
|
|
13
|
+
destroy(): void;
|
|
14
|
+
}
|
|
15
|
+
export declare class Md3ModelMeshGPU {
|
|
16
|
+
readonly surfaces: Map<string, Md3SurfaceMeshGPU>;
|
|
17
|
+
readonly device: GPUDevice;
|
|
18
|
+
readonly model: Md3Model;
|
|
19
|
+
blend: Md3FrameBlend;
|
|
20
|
+
lighting?: Md3LightingOptions;
|
|
21
|
+
constructor(device: GPUDevice, model: Md3Model, blend: Md3FrameBlend, lighting?: Md3LightingOptions);
|
|
22
|
+
update(blend: Md3FrameBlend, lighting?: Md3LightingOptions): void;
|
|
23
|
+
destroy(): void;
|
|
24
|
+
}
|
|
25
|
+
export interface Md3MaterialGPU {
|
|
26
|
+
readonly diffuseTexture: Texture2D;
|
|
27
|
+
readonly tint?: readonly [number, number, number, number];
|
|
28
|
+
}
|
|
29
|
+
export declare class Md3PipelineGPU {
|
|
30
|
+
private device;
|
|
31
|
+
private format;
|
|
32
|
+
private pipeline;
|
|
33
|
+
private bindGroupLayout;
|
|
34
|
+
private uniformBuffer;
|
|
35
|
+
private sampler;
|
|
36
|
+
constructor(device: GPUDevice, format: GPUTextureFormat);
|
|
37
|
+
draw(passEncoder: GPURenderPassEncoder, mesh: Md3SurfaceMeshGPU, material: Md3MaterialGPU, viewProjection: Float32Array, modelMatrix: Float32Array, tint?: Float32Array): void;
|
|
38
|
+
getAttachmentMatrix(parentModel: Md3Model, parentBlend: Md3FrameBlend, tagName: string, parentModelMatrix: Float32Array): Float32Array | null;
|
|
39
|
+
destroy(): void;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=md3.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"md3.d.ts","sourceRoot":"","sources":["../../../../../src/render/webgpu/pipelines/md3.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,kBAAkB,EAAmF,MAAM,sBAAsB,CAAC;AAC9K,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAK5C,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE3G,qBAAa,iBAAiB;IAC5B,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EA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MAAM,EAAE,gBAAgB;IA0FvE,IAAI,CAAC,WAAW,EAAE,oBAAoB,EACjC,IAAI,EAAE,iBAAiB,EACvB,QAAQ,EAAE,cAAc,EACxB,cAAc,EAAE,YAAY,EAC5B,WAAW,EAAE,YAAY,EACzB,IAAI,GAAE,YAA6C,GACrD,IAAI;IAmCP,mBAAmB,CACf,WAAW,EAAE,QAAQ,EACrB,WAAW,EAAE,aAAa,EAC1B,OAAO,EAAE,MAAM,EACf,iBAAiB,EAAE,YAAY,GAChC,YAAY,GAAG,IAAI;IAMtB,OAAO,IAAI,IAAI;CAGhB"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ParticleSystem } from '../../particleSystem.js';
|
|
2
|
+
import { Vec3 } from '@quake2ts/shared';
|
|
3
|
+
export declare class ParticleRenderer {
|
|
4
|
+
private readonly device;
|
|
5
|
+
private readonly pipelineAlpha;
|
|
6
|
+
private readonly pipelineAdditive;
|
|
7
|
+
private readonly uniformBuffer;
|
|
8
|
+
private readonly bindGroup;
|
|
9
|
+
private positionBuffer;
|
|
10
|
+
private colorBuffer;
|
|
11
|
+
private sizeBuffer;
|
|
12
|
+
private capacity;
|
|
13
|
+
constructor(device: GPUDevice, format: GPUTextureFormat, depthStencilFormat?: GPUTextureFormat);
|
|
14
|
+
private resizeBuffers;
|
|
15
|
+
prepare(system: ParticleSystem, viewRight: Vec3, viewUp: Vec3): 0 | {
|
|
16
|
+
alphaIndices: number[];
|
|
17
|
+
additiveIndices: number[];
|
|
18
|
+
positions: Float32Array<ArrayBuffer>;
|
|
19
|
+
colors: Float32Array<ArrayBuffer>;
|
|
20
|
+
sizes: Float32Array<ArrayBuffer>;
|
|
21
|
+
sys: any;
|
|
22
|
+
};
|
|
23
|
+
render(passEncoder: GPURenderPassEncoder, viewProjection: Float32Array, viewRight: Vec3, viewUp: Vec3, system: ParticleSystem): void;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=particleSystem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"particleSystem.d.ts","sourceRoot":"","sources":["../../../../../src/render/webgpu/pipelines/particleSystem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAgB,MAAM,yBAAyB,CAAC;AACvE,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAGxC,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAY;IACnC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAoB;IAClD,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAoB;IACrD,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAY;IAC1C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAe;IAGzC,OAAO,CAAC,cAAc,CAAa;IACnC,OAAO,CAAC,WAAW,CAAa;IAChC,OAAO,CAAC,UAAU,CAAa;IAE/B,OAAO,CAAC,QAAQ,CAAK;gBAET,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,gBAAgB,EAAE,kBAAkB,CAAC,EAAE,gBAAgB;IA0I9F,OAAO,CAAC,aAAa;IAuBrB,OAAO,CAAC,MAAM,EAAE,cAAc,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI;;;;;;;;IAgC7D,MAAM,CAAC,WAAW,EAAE,oBAAoB,EAAE,cAAc,EAAE,YAAY,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,cAAc;CA2D9H"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quake2ts/engine",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.745",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/cjs/index.cjs",
|
|
6
6
|
"module": "./dist/esm/index.js",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"gl-matrix": "^3.4.4",
|
|
33
|
-
"@quake2ts/shared": "0.0.
|
|
33
|
+
"@quake2ts/shared": "0.0.745"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@wasm-audio-decoders/ogg-vorbis": "^0.1.20"
|
|
@@ -46,9 +46,9 @@
|
|
|
46
46
|
"tsup": "^8.1.0",
|
|
47
47
|
"vitest": "^1.5.3",
|
|
48
48
|
"webgpu": "^0.3.8",
|
|
49
|
-
"@quake2ts/shared": "0.0.
|
|
50
|
-
"@quake2ts/
|
|
51
|
-
"@quake2ts/
|
|
49
|
+
"@quake2ts/shared": "0.0.745",
|
|
50
|
+
"@quake2ts/game": "0.0.745",
|
|
51
|
+
"@quake2ts/test-utils": "^0.0.745"
|
|
52
52
|
},
|
|
53
53
|
"scripts": {
|
|
54
54
|
"build": "pnpm run build:types && pnpm run build:bundles",
|