@quake2ts/engine 0.0.855 → 0.0.857
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 +37 -32
- package/dist/browser/index.global.js.map +1 -1
- package/dist/cjs/index.cjs +21 -13
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.js +21 -13
- package/dist/esm/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/render/skybox.d.ts +1 -1
- package/dist/types/render/skybox.d.ts.map +1 -1
- package/package.json +5 -5
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ShaderProgram } from './shaderProgram.js';
|
|
2
2
|
import { TextureCubeMap, VertexArray, VertexBuffer } from './resources.js';
|
|
3
3
|
import type { ReadonlyMat4 } from 'gl-matrix';
|
|
4
|
-
export declare const SKYBOX_VERTEX_SHADER = "#version 300 es\nprecision highp float;\n\nlayout(location = 0) in vec3 a_position;\n\nuniform mat4 u_viewProjectionNoTranslation;\nuniform vec2 u_scroll;\n\nout vec3 v_direction;\n\nvoid main() {\n //
|
|
4
|
+
export declare const SKYBOX_VERTEX_SHADER = "#version 300 es\nprecision highp float;\n\nlayout(location = 0) in vec3 a_position;\n\nuniform mat4 u_viewProjectionNoTranslation;\nuniform vec2 u_scroll;\n\nout vec3 v_direction;\n\nvoid main() {\n // The cube vertices (a_position) are in GL space (-1 to 1, standard OpenGL cube).\n // The viewProjection matrix expects Quake-space input (it contains Quake-to-GL transform).\n // So we must transform GL -> Quake before applying the view matrix.\n //\n // GL-to-Quake mapping (inverse of Quake-to-GL):\n // GL -Z -> Quake +X (forward)\n // GL -X -> Quake +Y (left)\n // GL +Y -> Quake +Z (up)\n // So: (gl.x, gl.y, gl.z) -> (-gl.z, -gl.x, gl.y)\n vec3 quakePos = vec3(-a_position.z, -a_position.x, a_position.y);\n vec4 pos = u_viewProjectionNoTranslation * vec4(quakePos, 1.0);\n // Force z = w to render at far plane, avoiding clipping issues\n // for triangles that intersect the camera plane\n gl_Position = pos.xyww;\n\n // For cubemap sampling, use the original GL-space position since\n // WebGL cubemap targets (POSITIVE_X, etc.) are in GL conventions.\n vec3 dir = a_position;\n\n // Apply scroll offset for animated skies\n dir.xy += u_scroll;\n v_direction = dir;\n}";
|
|
5
5
|
export declare const SKYBOX_FRAGMENT_SHADER = "#version 300 es\nprecision highp float;\n\nin vec3 v_direction;\nuniform samplerCube u_skybox;\n\nout vec4 o_color;\n\nvoid main() {\n o_color = texture(u_skybox, v_direction);\n}";
|
|
6
6
|
export interface SkyboxBindOptions {
|
|
7
7
|
readonly viewProjection: Float32List;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skybox.d.ts","sourceRoot":"","sources":["../../../src/render/skybox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,YAAY,EAA8B,MAAM,gBAAgB,CAAC;AACvG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AA+C9C,eAAO,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"skybox.d.ts","sourceRoot":"","sources":["../../../src/render/skybox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,YAAY,EAA8B,MAAM,gBAAgB,CAAC;AACvG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AA+C9C,eAAO,MAAM,oBAAoB,mrCAiC/B,CAAC;AAEH,eAAO,MAAM,sBAAsB,yLAUjC,CAAC;AAEH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,cAAc,EAAE,WAAW,CAAC;IACrC,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC3C,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,qBAAa,cAAc;IACzB,QAAQ,CAAC,EAAE,EAAE,sBAAsB,CAAC;IACpC,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC;IAChC,QAAQ,CAAC,GAAG,EAAE,WAAW,CAAC;IAC1B,QAAQ,CAAC,GAAG,EAAE,YAAY,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC;IAEjC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAA8B;IAC9D,OAAO,CAAC,QAAQ,CAAC,aAAa,CAA8B;IAC5D,OAAO,CAAC,QAAQ,CAAC,cAAc,CAA8B;gBAEjD,EAAE,EAAE,sBAAsB;IA4BtC,IAAI,UAAU,IAAI,MAAM,CAEvB;IAED,IAAI,CAAC,OAAO,EAAE,iBAAiB,GAAG,IAAI;IAgBtC,IAAI,IAAI,IAAI;IAIZ,OAAO,IAAI,IAAI;CAMhB;AAED,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,YAAY,GAAG,YAAY,GAAG,YAAY,CAM3F;AAED,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM,EAAE,YAAY,GAAE,SAAS,CAAC,MAAM,EAAE,MAAM,CAAgB,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAG9H"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quake2ts/engine",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.857",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/cjs/index.cjs",
|
|
6
6
|
"module": "./dist/esm/index.js",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"_comment_gl": "gl is optional only in test-utils and installed on demand and in the webgl github action",
|
|
42
42
|
"peerDependencies": {
|
|
43
43
|
"gl-matrix": "^3.4.4",
|
|
44
|
-
"@quake2ts/shared": "0.0.
|
|
44
|
+
"@quake2ts/shared": "0.0.857"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@wasm-audio-decoders/ogg-vorbis": "^0.1.20"
|
|
@@ -58,9 +58,9 @@
|
|
|
58
58
|
"tsup": "^8.5.1",
|
|
59
59
|
"vitest": "^4.0.16",
|
|
60
60
|
"webgpu": "^0.3.8",
|
|
61
|
-
"@quake2ts/game": "0.0.
|
|
62
|
-
"@quake2ts/
|
|
63
|
-
"@quake2ts/
|
|
61
|
+
"@quake2ts/game": "0.0.857",
|
|
62
|
+
"@quake2ts/shared": "0.0.857",
|
|
63
|
+
"@quake2ts/test-utils": "^0.0.857"
|
|
64
64
|
},
|
|
65
65
|
"scripts": {
|
|
66
66
|
"build": "pnpm run build:types && pnpm run build:bundles",
|