@woosh/meep-engine 2.119.14 → 2.119.16
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/README.md +12 -5
- package/package.json +1 -1
- package/src/core/geom/3d/sphere/sphere_project.d.ts +10 -0
- package/src/core/geom/3d/sphere/sphere_project.d.ts.map +1 -0
- package/src/core/geom/3d/sphere/sphere_project.js +39 -0
- package/src/core/geom/3d/sphere/sphere_projected_sphere_radius_sqr.d.ts +9 -0
- package/src/core/geom/3d/sphere/sphere_projected_sphere_radius_sqr.d.ts.map +1 -0
- package/src/core/geom/3d/sphere/sphere_projected_sphere_radius_sqr.js +45 -0
- package/src/core/geom/Quaternion.d.ts.map +1 -1
- package/src/core/geom/Quaternion.js +8 -17
- package/src/core/graph/layout/box/position_box_next_to_box.d.ts.map +1 -1
- package/src/core/graph/layout/box/position_box_next_to_box.js +0 -23
- package/src/core/parser/simple/readArrayLiteral.d.ts +9 -0
- package/src/core/parser/simple/readArrayLiteral.d.ts.map +1 -0
- package/src/core/parser/simple/readArrayLiteral.js +73 -0
- package/src/core/parser/simple/readLiteralToken.d.ts.map +1 -1
- package/src/core/parser/simple/readLiteralToken.js +1 -53
- package/src/core/parser/simple/skipWhitespace.d.ts +2 -2
- package/src/core/parser/simple/skipWhitespace.d.ts.map +1 -1
- package/src/core/parser/simple/skipWhitespace.js +4 -4
- package/src/engine/ecs/components/Tag.d.ts.map +1 -1
- package/src/engine/ecs/components/Tag.js +0 -1
- package/src/engine/ecs/dynamic_actions/rules/DynamicRuleDescriptionTable.d.ts.map +1 -1
- package/src/engine/ecs/dynamic_actions/rules/DynamicRuleDescriptionTable.js +14 -19
- package/src/engine/ecs/systems/AnimationSystem.d.ts.map +1 -1
- package/src/engine/ecs/systems/AnimationSystem.js +2 -2
- package/src/engine/graphics/ecs/animation/animator/AnimationGraphSystem.d.ts.map +1 -1
- package/src/engine/graphics/ecs/animation/animator/AnimationGraphSystem.js +2 -2
- package/src/engine/graphics/sh3/lpv/LightProbeVolume.d.ts +0 -8
- package/src/engine/graphics/sh3/lpv/LightProbeVolume.d.ts.map +1 -1
- package/src/engine/graphics/sh3/lpv/LightProbeVolume.js +0 -32
- package/src/engine/graphics/sh3/lpv/util/lpv_visualise_probes.d.ts +10 -0
- package/src/engine/graphics/sh3/lpv/util/lpv_visualise_probes.d.ts.map +1 -0
- package/src/engine/graphics/sh3/lpv/util/lpv_visualise_probes.js +33 -0
- package/src/engine/graphics/sh3/prototypeSH3Probe.js +3 -2
- package/src/engine/graphics/texture/atlas/AtlasPatch.d.ts.map +1 -1
- package/src/engine/graphics/texture/atlas/AtlasPatch.js +62 -63
- package/src/engine/graphics/texture/virtual/NOTES.md +11 -2
- package/src/engine/graphics/texture/virtual/VirtualTextureMaterial.d.ts +1 -1
- package/src/engine/graphics/texture/virtual/VirtualTextureMaterial.d.ts.map +1 -1
- package/src/engine/graphics/texture/virtual/VirtualTextureMaterial.js +1 -12
- package/src/engine/graphics/texture/virtual/VirtualTexturePage.d.ts.map +1 -1
- package/src/engine/graphics/texture/virtual/VirtualTexturePage.js +0 -10
- package/src/engine/graphics/texture/virtual/VirtualTextureSystem.d.ts.map +1 -1
- package/src/engine/graphics/texture/virtual/VirtualTextureSystem.js +0 -2
- package/src/engine/graphics/trail/x/RibbonXMaterialSpec.d.ts.map +1 -1
- package/src/engine/graphics/trail/x/RibbonXMaterialSpec.js +6 -7
- package/src/engine/save/GameStateLoader.d.ts.map +1 -1
- package/src/engine/save/GameStateLoader.js +6 -9
- package/src/engine/save/StorageBackedList.d.ts.map +1 -1
- package/src/engine/save/StorageBackedList.js +16 -19
- package/src/generation/grid/generation/GridTaskApplyActionToCells.d.ts.map +1 -1
- package/src/generation/grid/generation/GridTaskApplyActionToCells.js +12 -16
- package/src/generation/grid/generation/GridTaskExecuteRuleTimes.d.ts.map +1 -1
- package/src/generation/grid/generation/GridTaskExecuteRuleTimes.js +6 -6
- package/src/generation/grid/generation/GridTaskSequence.d.ts.map +1 -1
- package/src/generation/grid/generation/GridTaskSequence.js +5 -5
- package/src/generation/grid/generation/discrete/GridTaskActionRuleSet.d.ts +2 -6
- package/src/generation/grid/generation/discrete/GridTaskActionRuleSet.d.ts.map +1 -1
- package/src/generation/grid/generation/discrete/GridTaskActionRuleSet.js +1 -1
- package/src/generation/grid/generation/road/RoadConnection.d.ts.map +1 -1
- package/src/generation/grid/generation/road/RoadConnection.js +17 -15
- package/src/engine/graphics/util/projectSphere.d.ts +0 -24
- package/src/engine/graphics/util/projectSphere.d.ts.map +0 -1
- package/src/engine/graphics/util/projectSphere.js +0 -103
package/README.md
CHANGED
|
@@ -1,17 +1,24 @@
|
|
|
1
1
|
# Meep Engine
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Getting Started
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
We offer a [minimal project](http://gitlab.company-named.com/travnik/dream-engine-template) with no bells or whistles, just enough to run the engine and get you starter. If you're starting from scratch this is likely the best option.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## Documentation
|
|
8
|
+
|
|
9
|
+
[Engine Documentation](http://meep-engine.company-named.com:8080/docs/getting_started/Installation)
|
|
8
10
|
|
|
9
11
|
## Samples
|
|
10
12
|
To help get you started, various samples are provided under `/samples` folder. Feel free to use them as a point of reference.
|
|
11
13
|
|
|
12
|
-
##
|
|
14
|
+
## Quality
|
|
13
15
|
|
|
14
|
-
|
|
16
|
+
Meep is covered by 1,959 unit tests
|
|
17
|
+
|
|
18
|
+

|
|
19
|
+
|
|
20
|
+
The aim is not to have 100% coverage, [but to ensure quality](https://about.codecov.io/blog/the-case-against-100-code-coverage/). As a result, the tests are written to cover complex code first and to exhaustively validate critical algorithms.
|
|
21
|
+
Most of the test code is significantly larger than the code that they are testing.
|
|
15
22
|
|
|
16
23
|
## Features
|
|
17
24
|
|
package/package.json
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Computations of screen-space pixel area covered by a sphere
|
|
3
|
+
* NOTE: Port of GLSL code by Ingo Quilez. Source: http://www.iquilezles.org/www/articles/sphereproj/sphereproj.htm
|
|
4
|
+
* @param {Vector4} sph Sphere in world space
|
|
5
|
+
* @param {Matrix4} cam camera transform matrix (world to camera)(inverse world matrix of camera)
|
|
6
|
+
* @param {number} fl focal length (fov in Radians)
|
|
7
|
+
* @returns {number} area on the screen as a fraction, 1=entire screen, 0=zero area
|
|
8
|
+
*/
|
|
9
|
+
export function sphere_project(sph: Vector4, cam: Matrix4, fl: number): number;
|
|
10
|
+
//# sourceMappingURL=sphere_project.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sphere_project.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/3d/sphere/sphere_project.js"],"names":[],"mappings":"AAMA;;;;;;;GAOG;AACH,+DAHW,MAAM,GACJ,MAAM,CA0BlB"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { assert } from "../../../assert.js";
|
|
2
|
+
import { v3_dot } from "../../vec3/v3_dot.js";
|
|
3
|
+
import { v4_multiply_mat4 } from "../../vec4/v4_multiply_mat4.js";
|
|
4
|
+
|
|
5
|
+
const v4 = [];
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Computations of screen-space pixel area covered by a sphere
|
|
9
|
+
* NOTE: Port of GLSL code by Ingo Quilez. Source: http://www.iquilezles.org/www/articles/sphereproj/sphereproj.htm
|
|
10
|
+
* @param {Vector4} sph Sphere in world space
|
|
11
|
+
* @param {Matrix4} cam camera transform matrix (world to camera)(inverse world matrix of camera)
|
|
12
|
+
* @param {number} fl focal length (fov in Radians)
|
|
13
|
+
* @returns {number} area on the screen as a fraction, 1=entire screen, 0=zero area
|
|
14
|
+
*/
|
|
15
|
+
export function sphere_project(sph, cam, fl) {
|
|
16
|
+
assert.notNull(cam, 'cam');
|
|
17
|
+
|
|
18
|
+
v4[0] = sph.x;
|
|
19
|
+
v4[1] = sph.y;
|
|
20
|
+
v4[2] = sph.z;
|
|
21
|
+
v4[3] = 1;
|
|
22
|
+
|
|
23
|
+
//transform to camera space
|
|
24
|
+
v4_multiply_mat4(v4, v4, cam.elements);
|
|
25
|
+
|
|
26
|
+
const r2 = sph.w * sph.w;
|
|
27
|
+
|
|
28
|
+
const v4_x = v4[0];
|
|
29
|
+
const v4_y = v4[1];
|
|
30
|
+
const v4_z = v4[2];
|
|
31
|
+
|
|
32
|
+
const z2 = v4_z * v4_z;
|
|
33
|
+
|
|
34
|
+
const l2 = v3_dot(v4_x, v4_y, v4_z, v4_x, v4_y, v4_z);
|
|
35
|
+
|
|
36
|
+
const area = -Math.PI * fl * fl * r2 * Math.sqrt(Math.abs((l2 - r2) / (r2 - z2))) / (r2 - z2);
|
|
37
|
+
|
|
38
|
+
return area;
|
|
39
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @param {number} fl
|
|
4
|
+
* @param {number[]} matrix
|
|
5
|
+
* @param {number[]} sph
|
|
6
|
+
* @returns {number}
|
|
7
|
+
*/
|
|
8
|
+
export function sphere_projected_sphere_radius_sqr(fl: number, matrix: number[], sph: number[]): number;
|
|
9
|
+
//# sourceMappingURL=sphere_projected_sphere_radius_sqr.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sphere_projected_sphere_radius_sqr.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/3d/sphere/sphere_projected_sphere_radius_sqr.js"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,uDALW,MAAM,UACN,MAAM,EAAE,OACR,MAAM,EAAE,GACN,MAAM,CAmClB"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { v3_dot } from "../../vec3/v3_dot.js";
|
|
2
|
+
import { v4_multiply_mat4 } from "../../vec4/v4_multiply_mat4.js";
|
|
3
|
+
|
|
4
|
+
const v4 = [];
|
|
5
|
+
/**
|
|
6
|
+
*
|
|
7
|
+
* @param {number} fl
|
|
8
|
+
* @param {number[]} matrix
|
|
9
|
+
* @param {number[]} sph
|
|
10
|
+
* @returns {number}
|
|
11
|
+
*/
|
|
12
|
+
export function sphere_projected_sphere_radius_sqr(fl, matrix, sph) {
|
|
13
|
+
v4[0] = sph[0];
|
|
14
|
+
v4[1] = sph[1];
|
|
15
|
+
v4[2] = sph[2];
|
|
16
|
+
v4[3] = 1;
|
|
17
|
+
|
|
18
|
+
//transform sphere center to camera space
|
|
19
|
+
v4_multiply_mat4(v4, v4, matrix);
|
|
20
|
+
|
|
21
|
+
const r2 = sph[3] * sph[3];
|
|
22
|
+
|
|
23
|
+
const v4_x = v4[0];
|
|
24
|
+
const v4_y = v4[1];
|
|
25
|
+
const v4_z = v4[2];
|
|
26
|
+
const v4_w = v4[3];
|
|
27
|
+
|
|
28
|
+
const d = 0.5 / Math.abs(v4_w);
|
|
29
|
+
|
|
30
|
+
const x = v4_x;
|
|
31
|
+
const y = v4_y;
|
|
32
|
+
const z = v4_z;
|
|
33
|
+
|
|
34
|
+
const z2 = z * x;
|
|
35
|
+
|
|
36
|
+
const l2 = v3_dot(x, y, z, x, y, z);
|
|
37
|
+
|
|
38
|
+
const sigma = Math.abs(r2 - z2);
|
|
39
|
+
const alpha = Math.sqrt(Math.abs(l2 - r2) / sigma);
|
|
40
|
+
|
|
41
|
+
const beta = fl * fl * r2 * alpha / sigma;
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
return beta * d;
|
|
45
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Quaternion.d.ts","sourceRoot":"","sources":["../../../../src/core/geom/Quaternion.js"],"names":[],"mappings":";AAqBA;
|
|
1
|
+
{"version":3,"file":"Quaternion.d.ts","sourceRoot":"","sources":["../../../../src/core/geom/Quaternion.js"],"names":[],"mappings":";AAqBA;IAqzCI;;;;OAIG;IACH,kCAFa,UAAU,CAQtB;IAED;;;;;;OAMG;IACH,0BALW,MAAM,KACN,MAA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,MAAM,EAAE,CAkJG;IAC5B,qBApwBe,MAAM,KACN,MAAM,KACN,MAAM,UAkwBe;IAryChC;;OAEG;IACH,sDAOC;CAsxCJ;;kBASS,UAAU;;mBAt4CD,4BAA4B;oBAW3B,cAAc"}
|
|
@@ -475,7 +475,7 @@ class Quaternion {
|
|
|
475
475
|
* @param {Vector3} [up]
|
|
476
476
|
*/
|
|
477
477
|
lookAt(source, target, up = Vector3.up) {
|
|
478
|
-
const forward =
|
|
478
|
+
const forward = scratch_v3_a;
|
|
479
479
|
|
|
480
480
|
forward.subVectors(target, source);
|
|
481
481
|
|
|
@@ -631,16 +631,6 @@ class Quaternion {
|
|
|
631
631
|
result.set(psi, theta, phi);
|
|
632
632
|
}
|
|
633
633
|
|
|
634
|
-
/**
|
|
635
|
-
* XYZ order
|
|
636
|
-
* @source: https://stackoverflow.com/questions/12088610/conversion-between-euler-quaternion-like-in-unity3d-engine
|
|
637
|
-
* @param {number} x angle in X axis in radians
|
|
638
|
-
* @param {number} y angle in Y axis in radians
|
|
639
|
-
* @param {number} z angle in Z axis in radians
|
|
640
|
-
*/
|
|
641
|
-
fromEulerAngles(x, y, z) {
|
|
642
|
-
return this.fromEulerAnglesXYZ(x, y, z);
|
|
643
|
-
}
|
|
644
634
|
|
|
645
635
|
/**
|
|
646
636
|
* XYZ order
|
|
@@ -1270,18 +1260,17 @@ class Quaternion {
|
|
|
1270
1260
|
|
|
1271
1261
|
/**
|
|
1272
1262
|
*
|
|
1273
|
-
* @param {number[]} array
|
|
1274
|
-
* @param {number} offset
|
|
1263
|
+
* @param {number[]} [array]
|
|
1264
|
+
* @param {number} [offset]
|
|
1265
|
+
* @returns {number[]}
|
|
1275
1266
|
*/
|
|
1276
|
-
writeToArray(array, offset = 0) {
|
|
1267
|
+
writeToArray(array = [], offset = 0) {
|
|
1277
1268
|
array[offset] = this.x;
|
|
1278
1269
|
array[offset + 1] = this.y;
|
|
1279
1270
|
array[offset + 2] = this.z;
|
|
1280
1271
|
array[offset + 3] = this.w;
|
|
1281
|
-
}
|
|
1282
1272
|
|
|
1283
|
-
|
|
1284
|
-
return [this.x, this.y, this.z, this.w];
|
|
1273
|
+
return array;
|
|
1285
1274
|
}
|
|
1286
1275
|
|
|
1287
1276
|
/**
|
|
@@ -1419,6 +1408,8 @@ class Quaternion {
|
|
|
1419
1408
|
|
|
1420
1409
|
Quaternion.prototype.fromArray = Quaternion.prototype.readFromArray;
|
|
1421
1410
|
Quaternion.prototype.toArray = Quaternion.prototype.writeToArray;
|
|
1411
|
+
Quaternion.prototype.asArray = Quaternion.prototype.writeToArray;
|
|
1412
|
+
Quaternion.prototype.fromEulerAngles = Quaternion.prototype.fromEulerAnglesXYZ;
|
|
1422
1413
|
|
|
1423
1414
|
/**
|
|
1424
1415
|
* @readonly
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"position_box_next_to_box.d.ts","sourceRoot":"","sources":["../../../../../../src/core/graph/layout/box/position_box_next_to_box.js"],"names":[],"mappings":"AAyJA;;;;;;GAMG;AACH,8CALW,KAAK,UACL,KAAK,UACL,KAAK,GACH,KAAK,
|
|
1
|
+
{"version":3,"file":"position_box_next_to_box.d.ts","sourceRoot":"","sources":["../../../../../../src/core/graph/layout/box/position_box_next_to_box.js"],"names":[],"mappings":"AAyJA;;;;;;GAMG;AACH,8CALW,KAAK,UACL,KAAK,UACL,KAAK,GACH,KAAK,CAoCjB;kBAlMiB,gCAAgC"}
|
|
@@ -168,31 +168,8 @@ export function position_box_next_to_box(box, target, bounds) {
|
|
|
168
168
|
|
|
169
169
|
b.set(x0, y0, x0 + b.width, y0 + b.height);
|
|
170
170
|
|
|
171
|
-
const targetCenter = new Vector2(t.centerX, t.centerY);
|
|
172
|
-
|
|
173
171
|
t.locked = true;
|
|
174
172
|
|
|
175
|
-
function touch() {
|
|
176
|
-
|
|
177
|
-
const bC = new Vector2(b.centerX, b.centerY);
|
|
178
|
-
|
|
179
|
-
const bE = new Vector2();
|
|
180
|
-
const tE = new Vector2();
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
t.lineIntersectionPoint(bC, targetCenter, tE);
|
|
184
|
-
const delta = new Vector2();
|
|
185
|
-
|
|
186
|
-
if (b.lineIntersectionPoint(bC, targetCenter, bE)) {
|
|
187
|
-
delta.copy(tE).sub(bE);
|
|
188
|
-
} else {
|
|
189
|
-
delta.copy(tE).sub(bC);
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
b.move(delta.x, delta.y);
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
|
|
196
173
|
const initialPosition = computeInitialPlacement(b, t, bounds);
|
|
197
174
|
//set bounds to initial position
|
|
198
175
|
b.set(initialPosition.x, initialPosition.y, initialPosition.x + b.width, initialPosition.y + b.height);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readArrayLiteral.d.ts","sourceRoot":"","sources":["../../../../../src/core/parser/simple/readArrayLiteral.js"],"names":[],"mappings":"AAQA;;;;;;GAMG;AACH,uCALW,MAAM,UACN,MAAM,SACN,MAAM,SA4DhB"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import DataType from "./DataType.js";
|
|
2
|
+
import ParserError from "./ParserError.js";
|
|
3
|
+
import { readLiteralToken } from "./readLiteralToken.js";
|
|
4
|
+
import { skipWhitespace } from "./skipWhitespace.js";
|
|
5
|
+
import Token from "./Token.js";
|
|
6
|
+
|
|
7
|
+
const CHAR_ARRAY_TERMINATOR = ']';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
*
|
|
11
|
+
* @param {string} text
|
|
12
|
+
* @param {number} cursor
|
|
13
|
+
* @param {number} limit
|
|
14
|
+
* @return {Token}
|
|
15
|
+
*/
|
|
16
|
+
export function readArrayLiteral(text, cursor, limit) {
|
|
17
|
+
let i = cursor;
|
|
18
|
+
|
|
19
|
+
const firstChar = text.charAt(i);
|
|
20
|
+
|
|
21
|
+
if (firstChar !== '[') {
|
|
22
|
+
throw new ParserError(cursor, `expected array start: '[', got '${firstChar}' instead`, text);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
i = skipWhitespace(text, i + 1, limit);
|
|
26
|
+
|
|
27
|
+
const values = [];
|
|
28
|
+
|
|
29
|
+
// check for empty array
|
|
30
|
+
const char = text.charAt(i);
|
|
31
|
+
|
|
32
|
+
if (char === CHAR_ARRAY_TERMINATOR) {
|
|
33
|
+
|
|
34
|
+
// empty array
|
|
35
|
+
i++;
|
|
36
|
+
|
|
37
|
+
} else {
|
|
38
|
+
|
|
39
|
+
while (i < limit) {
|
|
40
|
+
|
|
41
|
+
i = skipWhitespace(text, i, limit);
|
|
42
|
+
|
|
43
|
+
const token = readLiteralToken(text, i, limit);
|
|
44
|
+
|
|
45
|
+
i = token.end;
|
|
46
|
+
|
|
47
|
+
values.push(token);
|
|
48
|
+
|
|
49
|
+
//try to find separator
|
|
50
|
+
i = skipWhitespace(text, i, limit);
|
|
51
|
+
|
|
52
|
+
if (i < limit) {
|
|
53
|
+
const char = text.charAt(i);
|
|
54
|
+
if (char === ',') {
|
|
55
|
+
//separator
|
|
56
|
+
i++;
|
|
57
|
+
} else if (char === CHAR_ARRAY_TERMINATOR) {
|
|
58
|
+
//end of sequence
|
|
59
|
+
i++;
|
|
60
|
+
break;
|
|
61
|
+
} else {
|
|
62
|
+
//unexpected input
|
|
63
|
+
throw new ParserError(i, `Unexpected input '${char}', expected either separator ',' or end of sequence '${CHAR_ARRAY_TERMINATOR}'`, text);
|
|
64
|
+
}
|
|
65
|
+
} else {
|
|
66
|
+
throw new ParserError(i, `Unterminated array literal`, text);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
return new Token(values, cursor, i, 'array', DataType.Array);
|
|
73
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readLiteralToken.d.ts","sourceRoot":"","sources":["../../../../../src/core/parser/simple/readLiteralToken.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"readLiteralToken.d.ts","sourceRoot":"","sources":["../../../../../src/core/parser/simple/readLiteralToken.js"],"names":[],"mappings":"AAOA;;;;;;GAMG;AACH,uCALW,MAAM,UACN,MAAM,UACN,MAAM,SAmChB"}
|
|
@@ -1,61 +1,9 @@
|
|
|
1
1
|
import { assert } from "../../assert.js";
|
|
2
|
-
import DataType from "./DataType.js";
|
|
3
2
|
import ParserError from "./ParserError.js";
|
|
3
|
+
import { readArrayLiteral } from "./readArrayLiteral.js";
|
|
4
4
|
import { readBooleanToken } from "./readBooleanToken.js";
|
|
5
5
|
import { readNumberToken } from "./readNumberToken.js";
|
|
6
6
|
import { readStringToken } from "./readStringToken.js";
|
|
7
|
-
import { skipWhitespace } from "./skipWhitespace.js";
|
|
8
|
-
import Token from "./Token.js";
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
*
|
|
12
|
-
* @param {string} text
|
|
13
|
-
* @param {number} cursor
|
|
14
|
-
* @param {number} length
|
|
15
|
-
* @return {Token}
|
|
16
|
-
*/
|
|
17
|
-
function readArrayLiteral(text, cursor, length) {
|
|
18
|
-
let i = cursor;
|
|
19
|
-
|
|
20
|
-
const firstChar = text.charAt(i);
|
|
21
|
-
if (firstChar !== '[') {
|
|
22
|
-
throw new ParserError(cursor, `expected array start: '[', got '${firstChar}' instead`, text);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
i++;
|
|
26
|
-
|
|
27
|
-
const values = [];
|
|
28
|
-
while (i < length) {
|
|
29
|
-
i = skipWhitespace(text, i, length);
|
|
30
|
-
|
|
31
|
-
const token = readLiteralToken(text, i, length);
|
|
32
|
-
|
|
33
|
-
i = token.end;
|
|
34
|
-
|
|
35
|
-
values.push(token);
|
|
36
|
-
|
|
37
|
-
//try find separator
|
|
38
|
-
i = skipWhitespace(text, i, length);
|
|
39
|
-
if (i < length) {
|
|
40
|
-
const char = text.charAt(i);
|
|
41
|
-
if (char === ',') {
|
|
42
|
-
//separator
|
|
43
|
-
i++;
|
|
44
|
-
} else if (char === ']') {
|
|
45
|
-
//end of sequence
|
|
46
|
-
i++;
|
|
47
|
-
break;
|
|
48
|
-
} else {
|
|
49
|
-
//unexpected input
|
|
50
|
-
throw new ParserError(i, `Unexpected input '${char}', expected either separator ',' or end of sequence ']'`, text);
|
|
51
|
-
}
|
|
52
|
-
} else {
|
|
53
|
-
throw new ParserError(i, `Unterminated array literal`, text);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
return new Token(values, cursor, i, 'array', DataType.Array);
|
|
58
|
-
}
|
|
59
7
|
|
|
60
8
|
/**
|
|
61
9
|
*
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
*
|
|
3
3
|
* @param {string} text
|
|
4
4
|
* @param {number} cursor
|
|
5
|
-
* @param {number}
|
|
5
|
+
* @param {number} limit
|
|
6
6
|
* @returns {number}
|
|
7
7
|
*/
|
|
8
|
-
export function skipWhitespace(text: string, cursor: number,
|
|
8
|
+
export function skipWhitespace(text: string, cursor: number, limit: number): number;
|
|
9
9
|
//# sourceMappingURL=skipWhitespace.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skipWhitespace.d.ts","sourceRoot":"","sources":["../../../../../src/core/parser/simple/skipWhitespace.js"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,qCALW,MAAM,UACN,MAAM,
|
|
1
|
+
{"version":3,"file":"skipWhitespace.d.ts","sourceRoot":"","sources":["../../../../../src/core/parser/simple/skipWhitespace.js"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,qCALW,MAAM,UACN,MAAM,SACN,MAAM,GACJ,MAAM,CAqBlB"}
|
|
@@ -4,18 +4,18 @@ import { assert } from "../../assert.js";
|
|
|
4
4
|
*
|
|
5
5
|
* @param {string} text
|
|
6
6
|
* @param {number} cursor
|
|
7
|
-
* @param {number}
|
|
7
|
+
* @param {number} limit
|
|
8
8
|
* @returns {number}
|
|
9
9
|
*/
|
|
10
|
-
export function skipWhitespace(text, cursor,
|
|
10
|
+
export function skipWhitespace(text, cursor, limit) {
|
|
11
11
|
assert.isString(text, 'text');
|
|
12
12
|
assert.isNonNegativeInteger(cursor, 'cursor');
|
|
13
|
-
assert.isNonNegativeInteger(
|
|
13
|
+
assert.isNonNegativeInteger(limit, 'limit');
|
|
14
14
|
|
|
15
15
|
let i = cursor;
|
|
16
16
|
let char;
|
|
17
17
|
|
|
18
|
-
while (i <
|
|
18
|
+
while (i < limit) {
|
|
19
19
|
char = text.charAt(i);
|
|
20
20
|
|
|
21
21
|
if (char === ' ' || char === '\n' || char === '\t') {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tag.d.ts","sourceRoot":"","sources":["../../../../../src/engine/ecs/components/Tag.js"],"names":[],"mappings":"AAIA;;GAEG;AACH;
|
|
1
|
+
{"version":3,"file":"Tag.d.ts","sourceRoot":"","sources":["../../../../../src/engine/ecs/components/Tag.js"],"names":[],"mappings":"AAIA;;GAEG;AACH;IAoNI;;;;;OAKG;IACH,kBAJW,MAAM,EAAE,gCAEN,MAAM,EAAE,CAsBpB;IAED;;;;OAIG;IACH,oBAHW,MAAM,GACJ,GAAG,CAQf;IAGD;;;;OAIG;IACH,4BAFa,GAAG,CAQf;IAxQD;;;OAGG;IACH,eAAY;IAEZ;;;OAGG;IACH,oBAEC;IAED;;;;OAIG;IACH,OAHW,MAAM,UAOhB;IAED,cAEC;IAED;;;;OAIG;IACH,oBAFa,OAAO,CAYnB;IAED;;;OAGG;IACH,eAFW,MAAM,EAAE,QASlB;IAED;;;OAGG;IACH,mBAEC;IAED;;;;OAIG;IACH,yBAFa,OAAO,CAMnB;IAED;;;OAGG;IACH,oBAFW,MAAM,EAAE,WA4BlB;IAED;;;;OAIG;IACH,sBAHW,QAAQ,GACN,OAAO,CAsBnB;IAED;;;OAGG;IACH,aAFa,MAAM,EAAE,CAIpB;IAED;;;;OAIG;IACH,yBAHoB,MAAM,+BAKzB;IAED;;;OAGG;IACH,QAFY,MAAM,CAmBjB;IAED;;;;OAIG;IACH,cAHW,GAAG,GACF,OAAO,CAIlB;IAED,mBAEC;IAED;;;OAGG;IACH,eAFW,MAAM,EAAE,GAAC,MAAM,QAiBzB;CAwDJ;;kBAIS,MAAM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DynamicRuleDescriptionTable.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/ecs/dynamic_actions/rules/DynamicRuleDescriptionTable.js"],"names":[],"mappings":"AAMA
|
|
1
|
+
{"version":3,"file":"DynamicRuleDescriptionTable.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/ecs/dynamic_actions/rules/DynamicRuleDescriptionTable.js"],"names":[],"mappings":"AAMA;;IAEI;;;;OAIG;IACH,yCAAsC;IAEtC;;;;OAIG;IACH,iCAAyC;IAEzC;;;;OAIG;IACH,oDAFY,sBAAsB,EAAE,GAAC,SAAS,CAI7C;IAED;;;OAGG;IACH,kBAFY,uBAAuB,CAclC;IAED,mBA8BC;IAED;;;;OAIG;IACH,yBAFa,sBAAsB,GAAC,SAAS,CAmC5C;IAED;;;;OAIG;IACH,qBAFa,sBAAsB,EAAE,CAgCpC;IAED,2DAIC;IAED,yCAMC;CAEJ;yCA1KwC,yDAAyD;uCAC3D,6BAA6B;wCAF5B,uEAAuE"}
|
|
@@ -1,29 +1,24 @@
|
|
|
1
|
+
import { HashMap } from "../../../../core/collection/map/HashMap.js";
|
|
2
|
+
import { MultiPredicateEvaluator } from "../../../../core/model/reactive/evaluation/MultiPredicateEvaluator.js";
|
|
1
3
|
import { StaticKnowledgeDataTable } from "../../../knowledge/database/StaticKnowledgeDataTable.js";
|
|
2
4
|
import { DynamicRuleDescription } from "./DynamicRuleDescription.js";
|
|
3
|
-
import { MultiPredicateEvaluator } from "../../../../core/model/reactive/evaluation/MultiPredicateEvaluator.js";
|
|
4
|
-
import { HashMap } from "../../../../core/collection/map/HashMap.js";
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
export class DynamicRuleDescriptionTable extends StaticKnowledgeDataTable {
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
* @type {DynamicRuleDescription[]}
|
|
16
|
-
* @private
|
|
17
|
-
*/
|
|
18
|
-
this.__sorted_by_predicate_complexity = [];
|
|
9
|
+
/**
|
|
10
|
+
* Used to speed up finding most complex matching predicate
|
|
11
|
+
* @type {DynamicRuleDescription[]}
|
|
12
|
+
* @private
|
|
13
|
+
*/
|
|
14
|
+
__sorted_by_predicate_complexity = [];
|
|
19
15
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @type {HashMap<ReactiveExpression, DynamicRuleDescription[]>}
|
|
19
|
+
* @private
|
|
20
|
+
*/
|
|
21
|
+
__predicate_rule_mapping = new HashMap();
|
|
27
22
|
|
|
28
23
|
/**
|
|
29
24
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnimationSystem.d.ts","sourceRoot":"","sources":["../../../../../src/engine/ecs/systems/AnimationSystem.js"],"names":[],"mappings":"AAwJA;;;;GAIG;AACH,wCAHW,mBAAmB,aACnB,MAAM,QAehB;;sDArKM,OAAO;AA4Kd;IACI;;;;OAIG;IACH,mCAMC;IAHG,iDAAqC;IAErC,sBAAgC;IAGpC;;;;;OAKG;IACH,gBAJW,SAAS,gCAkBnB;IAED;;;;;OAKG;IACH,kBAJW,SAAS,gCAanB;CAsJJ;uBAtWsB,cAAc;
|
|
1
|
+
{"version":3,"file":"AnimationSystem.d.ts","sourceRoot":"","sources":["../../../../../src/engine/ecs/systems/AnimationSystem.js"],"names":[],"mappings":"AAwJA;;;;GAIG;AACH,wCAHW,mBAAmB,aACnB,MAAM,QAehB;;sDArKM,OAAO;AA4Kd;IACI;;;;OAIG;IACH,mCAMC;IAHG,iDAAqC;IAErC,sBAAgC;IAGpC;;;;;OAKG;IACH,gBAJW,SAAS,gCAkBnB;IAED;;;;;OAKG;IACH,kBAJW,SAAS,gCAanB;CAsJJ;uBAtWsB,cAAc;iBAPpB,iCAAiC;0BAIxB,2BAA2B"}
|
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
Matrix4 as ThreeMatrix4
|
|
6
6
|
} from 'three';
|
|
7
7
|
import { assert } from "../../../core/assert.js";
|
|
8
|
+
import { sphere_project } from "../../../core/geom/3d/sphere/sphere_project.js";
|
|
8
9
|
import Vector4 from "../../../core/geom/Vector4.js";
|
|
9
10
|
import { max3 } from "../../../core/math/max3.js";
|
|
10
11
|
import Future, { FutureStates } from '../../../core/process/Future.js';
|
|
@@ -13,7 +14,6 @@ import { CameraSystem } from '../../graphics/ecs/camera/CameraSystem.js';
|
|
|
13
14
|
import Mesh from '../../graphics/ecs/mesh/Mesh.js';
|
|
14
15
|
import { MeshEvents } from "../../graphics/ecs/mesh/MeshEvents.js";
|
|
15
16
|
import { MeshSystem } from "../../graphics/ecs/mesh/MeshSystem.js";
|
|
16
|
-
import { projectSphere } from "../../graphics/util/projectSphere.js";
|
|
17
17
|
import { threeUpdateTransform } from "../../graphics/util/threeUpdateTransform.js";
|
|
18
18
|
import { Animation } from '../animation/Animation.js';
|
|
19
19
|
import { AnimationClipFlag } from "../animation/AnimationClipFlag.js";
|
|
@@ -286,7 +286,7 @@ class AnimationSystem extends System {
|
|
|
286
286
|
v4boundingSphere.multiplyScalar(scaleMax);
|
|
287
287
|
v4boundingSphere.add3(position);
|
|
288
288
|
|
|
289
|
-
const area =
|
|
289
|
+
const area = sphere_project(v4boundingSphere, cameraMatrix, focalLength);
|
|
290
290
|
const inPixels = area * viewportSize.x * viewportSize.y;
|
|
291
291
|
return inPixels;
|
|
292
292
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnimationGraphSystem.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/ecs/animation/animator/AnimationGraphSystem.js"],"names":[],"mappings":"AAoBA;IACI;;;OAGG;IACH,mCA2CC;IAxCG,sDAA0C;IAE1C,4DAEC;IAED;;;;OAIG;IACH,oBAAoB;IAEpB;;;;OAIG;IACH,uCAAuC;IAEvC;;;;OAIG;IACH,sBAAsB;IAEtB;;;;OAIG;IACH,uBAAkC;IAElC;;;;OAIG;IACH,2BAAuC;IAG3C;;;;OAIG;IACH,2BAmBC;IAED;;;;;OAKG;IACH,YAJW,cAAc,QACd,IAAI,UACJ,MAAM,QAahB;IAED;;;;;OAKG;IACH,cAJW,cAAc,QACd,IAAI,UACJ,MAAM,QAQhB;IAED;;;;OAIG;IACH,wBAHW,cAAc,UACd,MAAM,QAIhB;IAED;;;;OAIG;IACH,uBAHW,IAAI,UACJ,MAAM,WA+BhB;IAED;;;;;OAKG;IACH,+BAJW,MAAM,SACN,cAAc,iBACd,IAAI,WAkCd;IAGD;;;;OAIG;IACH,sBAHW,IAAI,gBACJ,OAAO,UAsCjB;IAGD,6BAqDC;CACJ;
|
|
1
|
+
{"version":3,"file":"AnimationGraphSystem.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/ecs/animation/animator/AnimationGraphSystem.js"],"names":[],"mappings":"AAoBA;IACI;;;OAGG;IACH,mCA2CC;IAxCG,sDAA0C;IAE1C,4DAEC;IAED;;;;OAIG;IACH,oBAAoB;IAEpB;;;;OAIG;IACH,uCAAuC;IAEvC;;;;OAIG;IACH,sBAAsB;IAEtB;;;;OAIG;IACH,uBAAkC;IAElC;;;;OAIG;IACH,2BAAuC;IAG3C;;;;OAIG;IACH,2BAmBC;IAED;;;;;OAKG;IACH,YAJW,cAAc,QACd,IAAI,UACJ,MAAM,QAahB;IAED;;;;;OAKG;IACH,cAJW,cAAc,QACd,IAAI,UACJ,MAAM,QAQhB;IAED;;;;OAIG;IACH,wBAHW,cAAc,UACd,MAAM,QAIhB;IAED;;;;OAIG;IACH,uBAHW,IAAI,UACJ,MAAM,WA+BhB;IAED;;;;;OAKG;IACH,+BAJW,MAAM,SACN,cAAc,iBACd,IAAI,WAkCd;IAGD;;;;OAIG;IACH,sBAHW,IAAI,gBACJ,OAAO,UAsCjB;IAGD,6BAqDC;CACJ;uBAlTsB,2BAA2B;iBAElB,oBAAoB;+BAGrB,2BAA2B;4CANd,0DAA0D;wBAN9E,OAAO"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Matrix4 } from "three";
|
|
2
2
|
import { assert } from "../../../../../core/assert.js";
|
|
3
|
+
import { sphere_project } from "../../../../../core/geom/3d/sphere/sphere_project.js";
|
|
3
4
|
import Vector4 from "../../../../../core/geom/Vector4.js";
|
|
4
5
|
import { max3 } from "../../../../../core/math/max3.js";
|
|
5
6
|
import { ResourceAccessKind } from "../../../../../core/model/ResourceAccessKind.js";
|
|
6
7
|
import { ResourceAccessSpecification } from "../../../../../core/model/ResourceAccessSpecification.js";
|
|
7
8
|
import { System } from "../../../../ecs/System.js";
|
|
8
|
-
import { projectSphere } from "../../../util/projectSphere.js";
|
|
9
9
|
import { CameraSystem } from "../../camera/CameraSystem.js";
|
|
10
10
|
import Mesh, { MeshFlags } from "../../mesh/Mesh.js";
|
|
11
11
|
import { MeshEvents } from "../../mesh/MeshEvents.js";
|
|
@@ -240,7 +240,7 @@ export class AnimationGraphSystem extends System {
|
|
|
240
240
|
v4boundingSphere.multiplyScalar(scaleMax);
|
|
241
241
|
v4boundingSphere.add3(position);
|
|
242
242
|
|
|
243
|
-
const area =
|
|
243
|
+
const area = sphere_project(v4boundingSphere, cameraMatrix, this.__focalLength);
|
|
244
244
|
|
|
245
245
|
/**
|
|
246
246
|
*
|
|
@@ -42,16 +42,8 @@ export class LightProbeVolume {
|
|
|
42
42
|
* Build tetrahedral mesh
|
|
43
43
|
*/
|
|
44
44
|
build_mesh(): void;
|
|
45
|
-
/**
|
|
46
|
-
*
|
|
47
|
-
* @param {number} size
|
|
48
|
-
* @param {boolean} shadow
|
|
49
|
-
* @returns {EntityNode}
|
|
50
|
-
*/
|
|
51
|
-
visualize_probes({ size, shadow }: number): EntityNode;
|
|
52
45
|
incrementVersion(): void;
|
|
53
46
|
#private;
|
|
54
47
|
}
|
|
55
48
|
import { TetrahedralMesh } from "../../../../core/geom/3d/tetrahedra/TetrahedralMesh.js";
|
|
56
|
-
import { EntityNode } from "../../../ecs/parent/EntityNode.js";
|
|
57
49
|
//# sourceMappingURL=LightProbeVolume.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LightProbeVolume.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/sh3/lpv/LightProbeVolume.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LightProbeVolume.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/sh3/lpv/LightProbeVolume.js"],"names":[],"mappings":"AAUA;;;GAGG;AACH;IAiCI,sBAEC;IAED,cAkBC;IAED;;;OAGG;IACH,4BAEC;IAED,uBAEC;IAED,0BAEC;IAMD;;;OAGG;IACH,sCAIC;IAZD,mCAEC;IAYD,sBAEC;IAMD,uBAEC;IAND,oBAEC;IAMD;;;;;OAKG;IACH,aAJW,MAAM,KACN,MAAM,KACN,MAAM,QAgBhB;IAED;;;;OAIG;IACH,sCAFW,UAAQ;QAAC,CAAC,EAAC,MAAM,CAAC;QAAC,CAAC,EAAC,MAAM,CAAC;QAAC,CAAC,EAAC,MAAM,CAAA;KAAC,QAOhD;IAED;;OAEG;IACH,mBAaC;IAGD,yBAEC;;CAEJ;gCAnK+B,wDAAwD"}
|