@woosh/meep-engine 2.126.37 → 2.126.38
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/package.json +1 -1
- package/src/core/geom/3d/mat4/m4_orthographic_off_center_z0.d.ts +13 -0
- package/src/core/geom/3d/mat4/m4_orthographic_off_center_z0.d.ts.map +1 -0
- package/src/core/geom/3d/mat4/m4_orthographic_off_center_z0.js +39 -0
- package/src/core/geom/3d/shape/util/shape_to_visual_entity.d.ts.map +1 -1
- package/src/core/geom/ConicRay.d.ts.map +1 -1
- package/src/core/geom/ConicRay.js +2 -1
- package/src/engine/asset/loaders/GLTFAssetLoader.d.ts.map +1 -1
- package/src/engine/ecs/attachment/TransformAttachmentBinding.d.ts.map +1 -1
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"description": "Pure JavaScript game engine. Fully featured and production ready.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"author": "Alexander Goldring",
|
|
8
|
-
"version": "2.126.
|
|
8
|
+
"version": "2.126.38",
|
|
9
9
|
"main": "build/meep.module.js",
|
|
10
10
|
"module": "build/meep.module.js",
|
|
11
11
|
"exports": {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates a new projection matrix for customized orthographic view
|
|
3
|
+
* Adapted for WebGPU.
|
|
4
|
+
* @param {number[]|Float32Array[]} output 4x4 matrix will be written here
|
|
5
|
+
* @param {number} left Lower x-value at the near plane (x0)
|
|
6
|
+
* @param {number} right Upper x-value at the near plane (x1)
|
|
7
|
+
* @param {number} bottom Lower y-coordinate at the near plane (y0)
|
|
8
|
+
* @param {number} top Upper y-value at the near plane (y1)
|
|
9
|
+
* @param {number} z_near Depth of the near plane (z0)
|
|
10
|
+
* @param {number} z_far Depth of the far plane (z1)
|
|
11
|
+
*/
|
|
12
|
+
export function m4_orthographic_off_center_z0(output: number[] | Float32Array[], left: number, right: number, bottom: number, top: number, z_near: number, z_far: number): void;
|
|
13
|
+
//# sourceMappingURL=m4_orthographic_off_center_z0.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"m4_orthographic_off_center_z0.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/3d/mat4/m4_orthographic_off_center_z0.js"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,sDARW,MAAM,EAAE,GAAC,YAAY,EAAE,QACvB,MAAM,SACN,MAAM,UACN,MAAM,OACN,MAAM,UACN,MAAM,SACN,MAAM,QA6BhB"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates a new projection matrix for customized orthographic view
|
|
3
|
+
* Adapted for WebGPU.
|
|
4
|
+
* @param {number[]|Float32Array[]} output 4x4 matrix will be written here
|
|
5
|
+
* @param {number} left Lower x-value at the near plane (x0)
|
|
6
|
+
* @param {number} right Upper x-value at the near plane (x1)
|
|
7
|
+
* @param {number} bottom Lower y-coordinate at the near plane (y0)
|
|
8
|
+
* @param {number} top Upper y-value at the near plane (y1)
|
|
9
|
+
* @param {number} z_near Depth of the near plane (z0)
|
|
10
|
+
* @param {number} z_far Depth of the far plane (z1)
|
|
11
|
+
*/
|
|
12
|
+
export function m4_orthographic_off_center_z0(
|
|
13
|
+
output,
|
|
14
|
+
left, right,
|
|
15
|
+
bottom, top,
|
|
16
|
+
z_near, z_far
|
|
17
|
+
) {
|
|
18
|
+
// actual implementation is different from DirectX, based on Orilusion code: https://github.com/Orillusion/orillusion/blob/8887427f0a2e426a1cc75ef022c8649bcdd785b0/src/math/Matrix4.ts#L676
|
|
19
|
+
|
|
20
|
+
output[0] = 2 / (right - left);
|
|
21
|
+
output[1] = 0;
|
|
22
|
+
output[2] = 0;
|
|
23
|
+
output[3] = 0;
|
|
24
|
+
|
|
25
|
+
output[4] = 0;
|
|
26
|
+
output[5] = 2 / (top - bottom);
|
|
27
|
+
output[6] = 0;
|
|
28
|
+
output[7] = 0;
|
|
29
|
+
|
|
30
|
+
output[8] = 0;
|
|
31
|
+
output[9] = 0;
|
|
32
|
+
output[10] = 1.0 / (z_far - z_near); // Different from direct X
|
|
33
|
+
output[11] = 0;
|
|
34
|
+
|
|
35
|
+
output[12] = (left + right) / (left - right);
|
|
36
|
+
output[13] = (top + bottom) / (bottom - top);
|
|
37
|
+
output[14] = z_near / (z_near - z_far);
|
|
38
|
+
output[15] = 1;
|
|
39
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shape_to_visual_entity.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/geom/3d/shape/util/shape_to_visual_entity.js"],"names":[],"mappings":"AA4IA;;;;;GAKG;AACH,8CAJW,eAAe,OACf,sBAAsB,GACpB,MAAM,CAclB;AAlID,sCAAuC,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"shape_to_visual_entity.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/geom/3d/shape/util/shape_to_visual_entity.js"],"names":[],"mappings":"AA4IA;;;;;GAKG;AACH,8CAJW,eAAe,OACf,sBAAsB,GACpB,MAAM,CAclB;AAlID,sCAAuC,kBAAkB,CAAC;mBAvBvC,qCAAqC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConicRay.d.ts","sourceRoot":"","sources":["../../../../src/core/geom/ConicRay.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ConicRay.d.ts","sourceRoot":"","sources":["../../../../src/core/geom/ConicRay.js"],"names":[],"mappings":"AASA;;;;;;GAMG;AACH;IAkLI;;;;;;;OAOG;IACH,sBANW,MAAM,KACN,MAAM,KACN,MAAM,cACN,MAAM,GACJ,QAAQ,CAkBpB;IAxMD;;;;OAIG;IACH,oBAFU,OAAO,CAEgB;IAEjC;;;;OAIG;IACH,OAFU,MAAM,CAEN;IAEV;;;;;;;MAKC;IAED,0BAGC;IAED;;;OAGG;IACH,uBAFW,YAAY,QAKtB;IAED;;;OAGG;IACH,yBAFW,YAAY,QAQtB;IAED;;;;OAIG;IACH,cAHW,QAAQ,GACN,OAAO,CAMnB;IAED;;;;;OAKG;IACH,qBAJW,QAAQ,cACR,MAAM,GACJ,OAAO,CAKnB;IAED;;;OAGG;IACH,QAFY,MAAM,CAOjB;IAED;;;OAGG;IACH,YAFW,QAAQ,QAKlB;IAED;;;;OAIG;IACH,4BAHW,OAAO,GACL,OAAO,CAMnB;IAED;;;;;OAKG;IACH,gDAFW,OAAO,QAsEjB;IA6BL;;;OAGG;IACH,qBAFU,OAAO,CAEY;CAN5B;;kBAUS,MAAM;;oBA/NI,cAAc"}
|
|
@@ -2,6 +2,7 @@ import { assert } from "../assert.js";
|
|
|
2
2
|
import { combine_hash } from "../collection/array/combine_hash.js";
|
|
3
3
|
import { EPSILON } from "../math/EPSILON.js";
|
|
4
4
|
import { epsilonEquals } from "../math/epsilonEquals.js";
|
|
5
|
+
import { PI2 } from "../math/PI2.js";
|
|
5
6
|
import { computeHashFloat } from "../primitives/numbers/computeHashFloat.js";
|
|
6
7
|
import Vector3 from "./Vector3.js";
|
|
7
8
|
|
|
@@ -136,7 +137,7 @@ export class ConicRay {
|
|
|
136
137
|
|
|
137
138
|
const z = random() * (1 - angleCosine) + angleCosine;
|
|
138
139
|
|
|
139
|
-
const phi = random() *
|
|
140
|
+
const phi = random() * PI2;
|
|
140
141
|
|
|
141
142
|
const zSqr = z * z;
|
|
142
143
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GLTFAssetLoader.d.ts","sourceRoot":"","sources":["../../../../../src/engine/asset/loaders/GLTFAssetLoader.js"],"names":[],"mappings":"AAuIA;IAEI,cAyDC;IArDG,2BAAsC;IAatC,mBAAoB;IAEpB;;;;;OAKG;IACH,gCAAoC;IAEpC;;;;;OAKG;IACH,+BAAmC;IAEnC;;;;OAIG;IACH,yBAIE;IAGF;;;;OAIG;IACH,wBAIE;IAGN;;;OAGG;IACH,uBAFW,MAAM,QAIhB;IAED;;;OAGG;IACH,yBAFW,OAAO,EAIjB;IAED;;;OAGG;IACH,yBAFa,OAAO,CAInB;IAED,oDAOC;IAED;;;;OAIG;IACH,gCAsCC;IAGD,6EAkKC;CACJ;
|
|
1
|
+
{"version":3,"file":"GLTFAssetLoader.d.ts","sourceRoot":"","sources":["../../../../../src/engine/asset/loaders/GLTFAssetLoader.js"],"names":[],"mappings":"AAuIA;IAEI,cAyDC;IArDG,2BAAsC;IAatC,mBAAoB;IAEpB;;;;;OAKG;IACH,gCAAoC;IAEpC;;;;;OAKG;IACH,+BAAmC;IAEnC;;;;OAIG;IACH,yBAIE;IAGF;;;;OAIG;IACH,wBAIE;IAGN;;;OAGG;IACH,uBAFW,MAAM,QAIhB;IAED;;;OAGG;IACH,yBAFW,OAAO,EAIjB;IAED;;;OAGG;IACH,yBAFa,OAAO,CAInB;IAED,oDAOC;IAED;;;;OAIG;IACH,gCAsCC;IAGD,6EAkKC;CACJ;4BAja2B,kBAAkB;4BAnBlB,2CAA2C;2BAC5C,0CAA0C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TransformAttachmentBinding.d.ts","sourceRoot":"","sources":["../../../../../src/engine/ecs/attachment/TransformAttachmentBinding.js"],"names":[],"mappings":"AAOA;CAgCC;
|
|
1
|
+
{"version":3,"file":"TransformAttachmentBinding.d.ts","sourceRoot":"","sources":["../../../../../src/engine/ecs/attachment/TransformAttachmentBinding.js"],"names":[],"mappings":"AAOA;CAgCC;kCAtCiC,wBAAwB"}
|