@woosh/meep-engine 2.118.2 → 2.118.4
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/build/meep.cjs +116 -110
- package/build/meep.min.js +1 -1
- package/build/meep.module.js +116 -110
- package/package.json +5 -5
- package/src/core/binary/EndianType.d.ts +3 -0
- package/src/core/binary/EndianType.d.ts.map +1 -1
- package/src/core/binary/EndianType.js +2 -1
- package/src/core/binary/uint8_to_float.d.ts.map +1 -1
- package/src/core/binary/uint8_to_float.js +5 -0
- package/src/core/collection/queue/Deque.d.ts.map +1 -1
- package/src/core/collection/queue/Deque.js +32 -32
- package/src/core/collection/table/RowFirstTable.d.ts.map +1 -1
- package/src/core/collection/table/RowFirstTable.js +2 -0
- package/src/core/color/Color.js +3 -3
- package/src/core/color/kelvin/rgb_to_kelvin.d.ts.map +1 -1
- package/src/core/color/kelvin/rgb_to_kelvin.js +16 -7
- package/src/core/geom/3d/tetrahedra/tetrahedral_mesh_find_tets_attached_to_vertex.d.ts.map +1 -0
- package/src/core/geom/Vector3.d.ts.map +1 -1
- package/src/core/geom/Vector3.js +5 -19
- package/src/core/geom/packing/computeBoundingSphereOfSpheres.js +1 -1
- package/src/core/math/compute_legendre_polynomial.d.ts +1 -1
- package/src/core/math/compute_legendre_polynomial.d.ts.map +1 -1
- package/src/core/math/compute_legendre_polynomial.js +6 -1
- package/src/core/math/max3.d.ts.map +1 -1
- package/src/core/math/max3.js +4 -0
- package/src/core/math/solveQuadratic.d.ts.map +1 -1
- package/src/core/math/solveQuadratic.js +5 -1
- package/src/core/primitives/boolean/compareBooleans.js +2 -0
- package/src/core/primitives/boolean/computeBooleanHash.d.ts +7 -0
- package/src/core/primitives/boolean/computeBooleanHash.d.ts.map +1 -0
- package/src/core/primitives/boolean/computeBooleanHash.js +8 -0
- package/src/core/primitives/numbers/computeHashFloat.d.ts.map +1 -1
- package/src/core/primitives/numbers/computeHashFloat.js +4 -2
- package/src/engine/animation/async/TimeSeries.d.ts +5 -1
- package/src/engine/animation/async/TimeSeries.d.ts.map +1 -1
- package/src/engine/animation/async/TimeSeries.js +14 -2
- package/src/engine/asset/loaders/material/computeTextureHash.d.ts.map +1 -1
- package/src/engine/asset/loaders/material/computeTextureHash.js +5 -0
- package/src/engine/ecs/gui/position/ViewportPosition.d.ts +0 -5
- package/src/engine/ecs/gui/position/ViewportPosition.d.ts.map +1 -1
- package/src/engine/ecs/gui/position/ViewportPosition.js +42 -53
- package/src/engine/ecs/speaker/VoiceSystem.d.ts +2 -3
- package/src/engine/ecs/speaker/VoiceSystem.d.ts.map +1 -1
- package/src/engine/graphics/canvas/computeHtmlCanvasElementHash.d.ts +7 -0
- package/src/engine/graphics/canvas/computeHtmlCanvasElementHash.d.ts.map +1 -0
- package/src/engine/graphics/canvas/computeHtmlCanvasElementHash.js +12 -0
- package/src/engine/graphics/canvas/computeImageCanvasEquality.js +3 -1
- package/src/engine/graphics/sh3/lpv/find_max_depth_radius_for_point.js +2 -2
- package/src/engine/graphics/texture/html_canvas_to_rendering_context2d_cached.d.ts +7 -0
- package/src/engine/graphics/texture/html_canvas_to_rendering_context2d_cached.d.ts.map +1 -0
- package/src/engine/graphics/texture/html_canvas_to_rendering_context2d_cached.js +20 -0
- package/src/engine/graphics/texture/html_canvas_to_sampler2d.d.ts.map +1 -1
- package/src/engine/graphics/texture/html_canvas_to_sampler2d.js +2 -11
- package/src/core/geometry/3d/tetrahedra/tetrahedral_mesh_find_tets_attached_to_vertex.d.ts.map +0 -1
- /package/src/core/{geometry → geom}/3d/tetrahedra/tetrahedral_mesh_find_tets_attached_to_vertex.d.ts +0 -0
- /package/src/core/{geometry → geom}/3d/tetrahedra/tetrahedral_mesh_find_tets_attached_to_vertex.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Vector3.d.ts","sourceRoot":"","sources":["../../../../src/core/geom/Vector3.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"Vector3.d.ts","sourceRoot":"","sources":["../../../../src/core/geom/Vector3.js"],"names":[],"mappings":";AAcA;;;GAGG;AACH;IAstBI;;;;;;;OAOG;IACH,iFAeC;IAyMD;;;;;OAKG;IACH,cAJW,OAAO,UAAQ,KACf,OAAO,UAAQ,GACb,MAAM,CAIlB;IAED;;;;;OAKG;IACH,mBAJW,OAAO,KACP,OAAO,GACL,MAAM,CAIlB;IAED;;;;;OAKG;IACH,wBAJW,MAAM,EAAE,WACR,MAAM,GACJ,OAAO,CAQnB;IAED;;;;OAIG;IACH,yBAHW,MAAM,GACJ,OAAO,CAInB;IA99BD;;;;;;OAMG;IACH,gBALW,MAAM,MACN,MAAM,MACN,MAAM,EAsBhB;IAlBG;;OAEG;IACH,GAFU,MAAM,CAEN;IACV;;OAEG;IACH,GAFU,MAAM,CAEN;IACV;;OAEG;IACH,GAFU,MAAM,CAEN;IAEV;;;OAGG;IACH,oBAFU,OAAO,MAAM,EAAC,MAAM,EAAC,MAAM,EAAC,MAAM,EAAC,MAAM,EAAC,MAAM,CAAC,CAE9B;IAGjC;;;;OAIG;IACH,qBAHW,MAAM,EAAE,GAAC,YAAY,WACrB,MAAM,QAQhB;IAED;;;;OAIG;IACH,oBAHW,MAAM,EAAE,GAAC,YAAY,WACrB,MAAM,QAMhB;IAED,iBAMC;IAED;;;;;;OAMG;IACH,sCAFa,OAAO,CA6BnB;IAED;;;OAGG;IACH,aAFW,MAAM,QAIhB;IAED;;;;OAIG;IACH,QAHW,MAAM,GACJ,OAAO,CAInB;IAED;;;;OAIG;IACH,QAHW,MAAM,GACJ,OAAO,CAInB;IAED;;;;OAIG;IACH,QAHW,MAAM,GACJ,OAAO,CAInB;IAED;;;;;OAKG;IACH,SAJW,MAAM,KACN,MAAM,GACJ,OAAO,CAInB;IAED;;;;;OAKG;IACH,SAJW,MAAM,KACN,MAAM,GACJ,OAAO,CAInB;IAED;;;;;OAKG;IACH,SAJW,MAAM,KACN,MAAM,GACJ,OAAO,CAInB;IAED;;;;OAIG;I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,CAMlB;IAED,cAMC;IAED;;;OAGG;IACH,0BAFW,OAAO,QAYjB;IA2BD;;;;;;;;OAQG;IACH,oBAPW,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,QAkBhB;IAED;;;;;OAKG;IACH,+BAJW,MAAM,OACN,MAAM,SACN,MAAM,QAuBhB;IAED;;;;;OAKG;IACH,6CAFa,OAAO,CASnB;IAED;;;;MAEC;IAED;;;OAGG;IACH,eAFW;QAAC,CAAC,EAAC,MAAM,CAAC;QAAC,CAAC,EAAC,MAAM,CAAC;QAAC,CAAC,EAAC,MAAM,CAAA;KAAC,GAAC,MAAM,QAS/C;IAED,mBAEC;IAED;;;;OAIG;IACH,2CAIC;IAED;;;;OAIG;IACH,6CAMC;IAED;;;;OAIG;IACH,kDAIC;IAED;;;;OAIG;IACH,oDAMC;IAED;;;;OAIG;IACH,kEAEC;IAED;;;;OAIG;IACH,oEAEC;IAED,eAMC;IAeD,mBAEC;IAdD,gBAEC;IAcD,mBAEC;IAdD,gBAEC;IAcD,mBAEC;IAdD,gBAEC;IAoEL,gBApmBiB,MAAM,CAomBG;IAC1B,mBAt8Be,MAAM,EAAE,GAAC,YAAY,WACrB,MAAM,UAq8BM;IAC3B,iBA17Be,MAAM,EAAE,GAAC,YAAY,WACrB,MAAM,UAy7BI;IA2DzB;;;OAGG;IACH,oBAFU,OAAO,CAEU;IAvHvB,sDAMC;CA4CJ;;cAWS,OAAO;aAOP,OAAO;mBAOP,OAAO;YAMP,OAAO;cAMP,OAAO;cAMP,OAAO;eAMP,OAAO;iBAMP,OAAO;cAMP,OAAO;kBAYP,MAAM;;mBA1jCG,4BAA4B"}
|
package/src/core/geom/Vector3.js
CHANGED
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author Alex Goldring
|
|
3
|
-
* @copyright Alex Goldring 2015
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
1
|
import { assert } from "../assert.js";
|
|
7
2
|
import Signal from "../events/signal/Signal.js";
|
|
8
3
|
import { EPSILON } from "../math/EPSILON.js";
|
|
@@ -17,6 +12,10 @@ import { v3_length_sqr } from "./vec3/v3_length_sqr.js";
|
|
|
17
12
|
import { v3_lerp } from "./vec3/v3_lerp.js";
|
|
18
13
|
import { v3_slerp } from "./vec3/v3_slerp.js";
|
|
19
14
|
|
|
15
|
+
/**
|
|
16
|
+
* @author Alex Goldring
|
|
17
|
+
* @copyright Alex Goldring 2015-2024
|
|
18
|
+
*/
|
|
20
19
|
class Vector3 {
|
|
21
20
|
/**
|
|
22
21
|
*
|
|
@@ -923,7 +922,7 @@ class Vector3 {
|
|
|
923
922
|
* @deprecated use dedicated method directly instead
|
|
924
923
|
*/
|
|
925
924
|
fromBinaryBufferFloat32_EqualityEncoded(buffer) {
|
|
926
|
-
throw
|
|
925
|
+
throw new Error('deprecated, use v3_binary_equality_decode')
|
|
927
926
|
}
|
|
928
927
|
|
|
929
928
|
hash() {
|
|
@@ -1086,17 +1085,4 @@ Vector3.prototype.isVector3 = true;
|
|
|
1086
1085
|
*/
|
|
1087
1086
|
Vector3.typeName = "Vector3";
|
|
1088
1087
|
|
|
1089
|
-
/**
|
|
1090
|
-
* @deprecated use {@link v3_dot} directly instead
|
|
1091
|
-
* @param {number} x0
|
|
1092
|
-
* @param {number} y0
|
|
1093
|
-
* @param {number} z0
|
|
1094
|
-
* @param {number} x1
|
|
1095
|
-
* @param {number} y1
|
|
1096
|
-
* @param {number} z1
|
|
1097
|
-
* @returns {number}
|
|
1098
|
-
*/
|
|
1099
|
-
Vector3._dot = v3_dot;
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
1088
|
export default Vector3;
|
|
@@ -4,7 +4,7 @@ import { assert } from "../../assert.js";
|
|
|
4
4
|
*
|
|
5
5
|
* @param {number[]|Float32Array|Float64Array} a
|
|
6
6
|
* @param {number[]|Float32Array|Float64Array} b
|
|
7
|
-
* @param {number} d
|
|
7
|
+
* @param {number} d number of dimensions
|
|
8
8
|
* @returns {number}
|
|
9
9
|
*/
|
|
10
10
|
function compute_point_distance(a, b, d) {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Useful in Spherical Harmonics coefficient computation
|
|
4
4
|
* @param {number} l band
|
|
5
5
|
* @param {number} m
|
|
6
|
-
* @param {number} x
|
|
6
|
+
* @param {number} x must be between 0 and 1
|
|
7
7
|
* @returns {number}
|
|
8
8
|
*/
|
|
9
9
|
export function compute_legendre_polynomial(l: number, m: number, x: number): number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compute_legendre_polynomial.d.ts","sourceRoot":"","sources":["../../../../src/core/math/compute_legendre_polynomial.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"compute_legendre_polynomial.d.ts","sourceRoot":"","sources":["../../../../src/core/math/compute_legendre_polynomial.js"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,+CALW,MAAM,KACN,MAAM,KACN,MAAM,GACJ,MAAM,CA0ClB"}
|
|
@@ -1,12 +1,17 @@
|
|
|
1
|
+
import { assert } from "../assert.js";
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* Computes associated Legendre Polynomial P(l,m,x) at x
|
|
3
5
|
* Useful in Spherical Harmonics coefficient computation
|
|
4
6
|
* @param {number} l band
|
|
5
7
|
* @param {number} m
|
|
6
|
-
* @param {number} x
|
|
8
|
+
* @param {number} x must be between 0 and 1
|
|
7
9
|
* @returns {number}
|
|
8
10
|
*/
|
|
9
11
|
export function compute_legendre_polynomial(l, m, x) {
|
|
12
|
+
assert.lessThanOrEqual(x,1,'only valid for X <= 1');
|
|
13
|
+
|
|
14
|
+
// TODO we might be able to do better, see https://github.com/halueda/wavy-orbitals/blob/fe738b0f8de8783cb7886d2c6ee616c2befb363b/legendre.js#L16
|
|
10
15
|
// based on code from https://github.com/jan-van-bergen/SphericalHarmonicLighting/blob/2b214b3451859ded07ea4e41fb2aa8d2a44ab579/SphericalHarmonicsLighting/SphericalHarmonics.cpp#L61
|
|
11
16
|
|
|
12
17
|
// Apply rule 2; P m m
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"max3.d.ts","sourceRoot":"","sources":["../../../../src/core/math/max3.js"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,wBALW,MAAM,KACN,MAAM,KACN,MAAM,GACJ,MAAM,
|
|
1
|
+
{"version":3,"file":"max3.d.ts","sourceRoot":"","sources":["../../../../src/core/math/max3.js"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,wBALW,MAAM,KACN,MAAM,KACN,MAAM,GACJ,MAAM,CAgBlB"}
|
package/src/core/math/max3.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"solveQuadratic.d.ts","sourceRoot":"","sources":["../../../../src/core/math/solveQuadratic.js"],"names":[],"mappings":"AAGA;;;;;;;;GAQG;AACH,uCAJW,MAAM,EAAE,iBACR,MAAM,KAJN,MAAM,KACN,MAAM,KACN,MAAM,GAGJ,MAAM,
|
|
1
|
+
{"version":3,"file":"solveQuadratic.d.ts","sourceRoot":"","sources":["../../../../src/core/math/solveQuadratic.js"],"names":[],"mappings":"AAGA;;;;;;;;GAQG;AACH,uCAJW,MAAM,EAAE,iBACR,MAAM,KAJN,MAAM,KACN,MAAM,KACN,MAAM,GAGJ,MAAM,CAoDlB"}
|
|
@@ -10,7 +10,11 @@ import { EPSILON } from "./EPSILON.js";
|
|
|
10
10
|
* @param {number} result_offset offset into result array where solutions are written to
|
|
11
11
|
* @returns {number} number of found solutions (roots)
|
|
12
12
|
*/
|
|
13
|
-
export function solveQuadratic(
|
|
13
|
+
export function solveQuadratic(
|
|
14
|
+
result, result_offset,
|
|
15
|
+
a, b, c
|
|
16
|
+
) {
|
|
17
|
+
|
|
14
18
|
assert.isNumber(a, 'a');
|
|
15
19
|
assert.isNumber(b, 'b');
|
|
16
20
|
assert.isNumber(c, 'c');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"computeBooleanHash.d.ts","sourceRoot":"","sources":["../../../../../src/core/primitives/boolean/computeBooleanHash.js"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,sCAHW,OAAO,GACL,MAAM,CAIlB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"computeHashFloat.d.ts","sourceRoot":"","sources":["../../../../../src/core/primitives/numbers/computeHashFloat.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"computeHashFloat.d.ts","sourceRoot":"","sources":["../../../../../src/core/primitives/numbers/computeHashFloat.js"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,oCAHW,MAAM,GACJ,MAAM,CAalB"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { UINT32_MAX } from "../../binary/UINT32_MAX.js";
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
*
|
|
3
5
|
* @param {number} v
|
|
@@ -5,12 +7,12 @@
|
|
|
5
7
|
*/
|
|
6
8
|
export function computeHashFloat(v) {
|
|
7
9
|
//we break the number up into fractional and whole parts
|
|
8
|
-
const whole = v
|
|
10
|
+
const whole = v >> 0;
|
|
9
11
|
|
|
10
12
|
const fraction = v - whole;
|
|
11
13
|
|
|
12
14
|
//fractional part is scaled up into int32 range, this inexact method, as it will produce 0 hash for values below a certain threshold
|
|
13
|
-
const fractionHash = fraction *
|
|
15
|
+
const fractionHash = fraction * UINT32_MAX;
|
|
14
16
|
|
|
15
17
|
//take XOR of both parts
|
|
16
18
|
return fractionHash ^ whole;
|
|
@@ -33,7 +33,11 @@ export class TimeSeries<T> {
|
|
|
33
33
|
* @returns {number}
|
|
34
34
|
*/
|
|
35
35
|
get last_timestamp(): number;
|
|
36
|
-
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @param {number[]} data
|
|
39
|
+
*/
|
|
40
|
+
validateNextSample(data: number[]): void;
|
|
37
41
|
/**
|
|
38
42
|
*
|
|
39
43
|
* @param {number[]} data
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimeSeries.d.ts","sourceRoot":"","sources":["../../../../../src/engine/animation/async/TimeSeries.js"],"names":[],"mappings":"AAiBA;;GAEG;AACH;IA+BI;;;;OAIG;IACH,4CAFW,MAAM,EAuChB;IAxED;;OAEG;IACH,MAFU,iBAAiB,CAEvB;IAEJ;;OAEG;IACH,OAFU,aAAa,CAElB;IAEL,0BAAsB;IAyHtB;;;;OAIG;IACH,8BAHW,MAAM,OAOhB;IAED;;;OAGG;IACH,2BAEC;IAED;;;OAGG;IACH,6BAWC;IAED,
|
|
1
|
+
{"version":3,"file":"TimeSeries.d.ts","sourceRoot":"","sources":["../../../../../src/engine/animation/async/TimeSeries.js"],"names":[],"mappings":"AAiBA;;GAEG;AACH;IA+BI;;;;OAIG;IACH,4CAFW,MAAM,EAuChB;IAxED;;OAEG;IACH,MAFU,iBAAiB,CAEvB;IAEJ;;OAEG;IACH,OAFU,aAAa,CAElB;IAEL,0BAAsB;IAyHtB;;;;OAIG;IACH,8BAHW,MAAM,OAOhB;IAED;;;OAGG;IACH,2BAEC;IAED;;;OAGG;IACH,6BAWC;IAED;;;OAGG;IACH,yBAFW,MAAM,EAAE,QAwBlB;IAED;;;OAGG;IACH,gBAFW,MAAM,EAAE,QAQlB;IAED;;;OAGG;IACH,mCAIC;IAED;;;;OAIG;IACH,yBAHW,MAAM,EAAE,SACR,MAAM,QAIhB;IAED;;;;OAIG;IACH,+BAHW,MAAM,GACJ,MAAM,CAMlB;IAED;;;;;OAKG;IACH,qBAJW,MAAM,EAAE,iBACR,MAAM,QACN,MAAM,QAuBhB;IAED;;;;OAIG;IACH,yBAHW,MAAM,OAShB;;CAEJ;kCAzSiC,qDAAqD;8BADzD,iDAAiD"}
|
|
@@ -186,8 +186,14 @@ export class TimeSeries {
|
|
|
186
186
|
return table.readCellValue(record_count - 1, time_column);
|
|
187
187
|
}
|
|
188
188
|
|
|
189
|
+
/**
|
|
190
|
+
*
|
|
191
|
+
* @param {number[]} data
|
|
192
|
+
*/
|
|
189
193
|
validateNextSample(data) {
|
|
190
194
|
|
|
195
|
+
assert.isArrayLike(data, 'data');
|
|
196
|
+
|
|
191
197
|
const table = this.table;
|
|
192
198
|
const record_count = table.length;
|
|
193
199
|
|
|
@@ -195,8 +201,14 @@ export class TimeSeries {
|
|
|
195
201
|
const time_column = this.time_column_index;
|
|
196
202
|
const last_time = table.readCellValue(record_count - 1, time_column);
|
|
197
203
|
|
|
198
|
-
|
|
199
|
-
|
|
204
|
+
const record = data[time_column];
|
|
205
|
+
|
|
206
|
+
assert.isNumber(record, `data[${time_column}](time)`);
|
|
207
|
+
assert.notNaN(record, `data[${time_column}](time)`);
|
|
208
|
+
assert.isFiniteNumber(record, `data[${time_column}](time)`);
|
|
209
|
+
|
|
210
|
+
if (record <= last_time) {
|
|
211
|
+
throw new Error(`Sample.time[${time_column}] = ${record}, which is <= to previous time stamp(=${last_time}). Each sample's time stamp must be strictly greater than the previous one`);
|
|
200
212
|
}
|
|
201
213
|
}
|
|
202
214
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"computeTextureHash.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/asset/loaders/material/computeTextureHash.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"computeTextureHash.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/asset/loaders/material/computeTextureHash.js"],"names":[],"mappings":"AAyBA;;;;GAIG;AACH;;WAHoD,MAAM;YAAQ,MAAM;IAC5D,MAAM,CA0CjB;AA4CD;;;;GAIG;AACH,sCAHW,UAAQ,MAAM,OAAO,GACnB,MAAM,CAqClB"}
|
|
@@ -2,6 +2,7 @@ import { combine_hash } from "../../../../core/collection/array/combine_hash.js"
|
|
|
2
2
|
import { murmur3_32 } from "../../../../core/math/hash/murmur3_32.js";
|
|
3
3
|
import { computeHashFloat } from "../../../../core/primitives/numbers/computeHashFloat.js";
|
|
4
4
|
import { computeStringHash } from "../../../../core/primitives/strings/computeStringHash.js";
|
|
5
|
+
import { computeHtmlCanvasElementHash } from "../../../graphics/canvas/computeHtmlCanvasElementHash.js";
|
|
5
6
|
import { isImageBitmap } from "../../../graphics/texture/isImageBitmap.js";
|
|
6
7
|
import { computeImageBitmapHash } from "./computeImageBitmapHash.js";
|
|
7
8
|
|
|
@@ -44,6 +45,10 @@ export function computeImageDataHash(image) {
|
|
|
44
45
|
|
|
45
46
|
result = computeStringHash(image.src);
|
|
46
47
|
|
|
48
|
+
}else if(image instanceof HTMLCanvasElement) {
|
|
49
|
+
|
|
50
|
+
result = computeHtmlCanvasElementHash(image);
|
|
51
|
+
|
|
47
52
|
}
|
|
48
53
|
|
|
49
54
|
let width = 0;
|
|
@@ -6,11 +6,6 @@ export namespace ViewportPositionFlags {
|
|
|
6
6
|
export default ViewportPosition;
|
|
7
7
|
declare class ViewportPosition {
|
|
8
8
|
static fromJSON(opt: any): ViewportPosition;
|
|
9
|
-
/**
|
|
10
|
-
*
|
|
11
|
-
* @constructor
|
|
12
|
-
*/
|
|
13
|
-
constructor(options: any);
|
|
14
9
|
/**
|
|
15
10
|
* Clip-scale position, on-screen values are in range of 0 to 1
|
|
16
11
|
* @type {Vector2}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewportPosition.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/ecs/gui/position/ViewportPosition.js"],"names":[],"mappings":"oCAOU,MAAM;;;;;;AAOhB;
|
|
1
|
+
{"version":3,"file":"ViewportPosition.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/ecs/gui/position/ViewportPosition.js"],"names":[],"mappings":"oCAOU,MAAM;;;;;;AAOhB;IAuGI,4CAMC;IA5GD;;;OAGG;IACH,UAFU,OAAO,CAEQ;IAEzB;;;OAGG;IACH,QAFU,OAAO,CAEM;IACvB;;;OAGG;IACH,QAFU,OAAO,CAEU;IAG3B;;;;OAIG;IACH,sBAFU,OAAO,CAEY;IAE7B;;;;OAIG;IACH,iBAFU,MAAM,CAEK;IAGrB;;;OAGG;IACH,mBAFU,OAAO,CAES;IAE1B;;;OAGG;IACH,SAFU,eAAe,CAEW;IAEpC;;;;OAIG;IACH,cAHW,gBAAgB,GACd,OAAO,CAWnB;IAED,eAUC;IAED;;;;;;;aAgBC;IAED;;;;;;;MASC;CASJ;;;;;oBA3HmB,kCAAkC;4BAC1B,2CAA2C"}
|
|
@@ -14,60 +14,49 @@ export const ViewportPositionFlags = {
|
|
|
14
14
|
|
|
15
15
|
class ViewportPosition {
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
18
|
-
* @
|
|
17
|
+
* Clip-scale position, on-screen values are in range of 0 to 1
|
|
18
|
+
* @type {Vector2}
|
|
19
19
|
*/
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* Can be used to enable and disable positioning
|
|
62
|
-
* @type {ObservedBoolean}
|
|
63
|
-
*/
|
|
64
|
-
this.enabled = new ObservedBoolean(true);
|
|
65
|
-
|
|
66
|
-
if (options !== undefined) {
|
|
67
|
-
console.warn("ViewportPosition constructor options is deprecated, please use static fromJSON method instead if you need similar functionality");
|
|
68
|
-
this.fromJSON(options);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
20
|
+
position = new Vector2();
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Fixed offset in pixels
|
|
24
|
+
* @type {Vector2}
|
|
25
|
+
*/
|
|
26
|
+
offset = new Vector2();
|
|
27
|
+
/**
|
|
28
|
+
* ranges from 0..1 in both X and Y, controls anchor point of element positioning
|
|
29
|
+
* @type {Vector2}
|
|
30
|
+
*/
|
|
31
|
+
anchor = new Vector2(0, 0);
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Makes display element avoid overlap with GUI elements
|
|
36
|
+
* @see GUIElement
|
|
37
|
+
* @type {boolean}
|
|
38
|
+
*/
|
|
39
|
+
resolveGuiCollisions = false;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* How far should the HUD stay away from the edge if it's sticky
|
|
43
|
+
* @see stickToScreenEdge
|
|
44
|
+
* @type {number}
|
|
45
|
+
*/
|
|
46
|
+
screenEdgeWidth = 10;
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Controls whenever or not HUD should remain on the screen when it gets to the edge
|
|
51
|
+
* @type {boolean}
|
|
52
|
+
*/
|
|
53
|
+
stickToScreenEdge = false;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Can be used to enable and disable positioning
|
|
57
|
+
* @type {ObservedBoolean}
|
|
58
|
+
*/
|
|
59
|
+
enabled = new ObservedBoolean(true);
|
|
71
60
|
|
|
72
61
|
/**
|
|
73
62
|
*
|
|
@@ -9,7 +9,7 @@ export class VoiceSystem extends AbstractContextSystem<any> {
|
|
|
9
9
|
font_size: number;
|
|
10
10
|
});
|
|
11
11
|
dependencies: (typeof Voice)[];
|
|
12
|
-
components_used:
|
|
12
|
+
components_used: ResourceAccessSpecification<typeof BehaviorComponent>[];
|
|
13
13
|
/**
|
|
14
14
|
*
|
|
15
15
|
* @type {Localization}
|
|
@@ -100,7 +100,6 @@ export class VoiceSystem extends AbstractContextSystem<any> {
|
|
|
100
100
|
}
|
|
101
101
|
import { AbstractContextSystem } from "../system/AbstractContextSystem.js";
|
|
102
102
|
import { Voice } from "./Voice.js";
|
|
103
|
-
import ViewportPosition from "../gui/position/ViewportPosition.js";
|
|
104
|
-
import { ResourceAccessSpecification } from "../../../core/model/ResourceAccessSpecification.js";
|
|
105
103
|
import { BehaviorComponent } from "../../intelligence/behavior/ecs/BehaviorComponent.js";
|
|
104
|
+
import { ResourceAccessSpecification } from "../../../core/model/ResourceAccessSpecification.js";
|
|
106
105
|
//# sourceMappingURL=VoiceSystem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VoiceSystem.d.ts","sourceRoot":"","sources":["../../../../../src/engine/ecs/speaker/VoiceSystem.js"],"names":[],"mappings":"AA2JA;IACI;;;;OAIG;IACH;;;OA2FC;IArFG,+BAA2B;IAE3B,
|
|
1
|
+
{"version":3,"file":"VoiceSystem.d.ts","sourceRoot":"","sources":["../../../../../src/engine/ecs/speaker/VoiceSystem.js"],"names":[],"mappings":"AA2JA;IACI;;;;OAIG;IACH;;;OA2FC;IArFG,+BAA2B;IAE3B,yEAQC;IAGD;;;OAGG;IACH,0BAAuB;IAEvB;;;OAGG;IACH,eAAe;IAEf;;;OAGG;IACH,4BAAiB;IAEjB;;;OAGG;IACH,8BAAgB;IAEhB;;;OAGG;IACH,eAAoB;IAEpB;;;;OAIG;IACH,iCAAyC;IAEzC;;;;OAIG;IACH,kBAAkC;IAIlC;;;;OAIG;IACH,eAAkB;IAElB;;;;OAIG;IACH,oBAAgC;IAEhC;;;OAGG;IACH,oBAAqC;IAErC;;;;OAIG;IACH,gBAAoB;IAGxB;;;OAGG;IACH,kBAFY,MAAM,CAIjB;IAED,0EAuBC;IAED;;;;;OAKG;IACH,uBAJW,MAAM,UACN,MAAM,SACN,KAAK,QAsBf;IAED;;;;;OAKG;IACH,wBAoBC;IAED;;;;;OAKG;IACH,gBAJW,MAAM,WACN,MAAM,SACN,KAAK,QAuHf;CACJ;sCAxbqC,oCAAoC;sBAIpD,YAAY;kCAlBA,sDAAsD;4CAR5C,oDAAoD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"computeHtmlCanvasElementHash.d.ts","sourceRoot":"","sources":["../../../../../src/engine/graphics/canvas/computeHtmlCanvasElementHash.js"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,qDAHW,iBAAiB,GACf,MAAM,CAMlB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import html_canvas_to_sampler2d from "../texture/html_canvas_to_sampler2d.js";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* @param {HTMLCanvasElement} canvas
|
|
6
|
+
* @returns {number}
|
|
7
|
+
*/
|
|
8
|
+
export function computeHtmlCanvasElementHash(canvas) {
|
|
9
|
+
const sampler = html_canvas_to_sampler2d(canvas);
|
|
10
|
+
|
|
11
|
+
return sampler.hash();
|
|
12
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { v3_distance_sqr } from "../../../../core/geom/vec3/v3_distance_sqr.js";
|
|
2
1
|
import {
|
|
3
2
|
tetrahedral_mesh_find_tets_attached_to_vertex
|
|
4
|
-
} from "../../../../core/
|
|
3
|
+
} from "../../../../core/geom/3d/tetrahedra/tetrahedral_mesh_find_tets_attached_to_vertex.js";
|
|
4
|
+
import { v3_distance_sqr } from "../../../../core/geom/vec3/v3_distance_sqr.js";
|
|
5
5
|
import { max2 } from "../../../../core/math/max2.js";
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @param {HTMLCanvasElement} canvas
|
|
4
|
+
* @returns {CanvasRenderingContext2D}
|
|
5
|
+
*/
|
|
6
|
+
export function html_canvas_to_rendering_context2d_cached(canvas: HTMLCanvasElement): CanvasRenderingContext2D;
|
|
7
|
+
//# sourceMappingURL=html_canvas_to_rendering_context2d_cached.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"html_canvas_to_rendering_context2d_cached.d.ts","sourceRoot":"","sources":["../../../../../src/engine/graphics/texture/html_canvas_to_rendering_context2d_cached.js"],"names":[],"mappings":"AAMA;;;;GAIG;AACH,kEAHW,iBAAiB,GACf,wBAAwB,CAUpC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @type {WeakMap<HTMLCanvasElement, CanvasRenderingContext2D>}
|
|
4
|
+
*/
|
|
5
|
+
const context_cache = new WeakMap();
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
*
|
|
9
|
+
* @param {HTMLCanvasElement} canvas
|
|
10
|
+
* @returns {CanvasRenderingContext2D}
|
|
11
|
+
*/
|
|
12
|
+
export function html_canvas_to_rendering_context2d_cached(canvas) {
|
|
13
|
+
let context = context_cache.get(canvas);
|
|
14
|
+
|
|
15
|
+
if (context === undefined) {
|
|
16
|
+
context = canvas.getContext("2d");
|
|
17
|
+
context_cache.set(canvas, context);
|
|
18
|
+
}
|
|
19
|
+
return context;
|
|
20
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"html_canvas_to_sampler2d.d.ts","sourceRoot":"","sources":["../../../../../src/engine/graphics/texture/html_canvas_to_sampler2d.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"html_canvas_to_sampler2d.d.ts","sourceRoot":"","sources":["../../../../../src/engine/graphics/texture/html_canvas_to_sampler2d.js"],"names":[],"mappings":";AAIA;;;;GAIG;AACH,kDAHW,iBAAiB,GACf,SAAS,CAcrB;0BApByB,wBAAwB"}
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
+
import { html_canvas_to_rendering_context2d_cached } from "./html_canvas_to_rendering_context2d_cached.js";
|
|
1
2
|
import { Sampler2D } from './sampler/Sampler2D.js';
|
|
2
3
|
|
|
3
|
-
/**
|
|
4
|
-
*
|
|
5
|
-
* @type {WeakMap<HTMLCanvasElement, CanvasRenderingContext2D>}
|
|
6
|
-
*/
|
|
7
|
-
const context_cache = new WeakMap();
|
|
8
4
|
|
|
9
5
|
/**
|
|
10
6
|
*
|
|
@@ -15,12 +11,7 @@ function html_canvas_to_sampler2d(canvas) {
|
|
|
15
11
|
const width = canvas.width;
|
|
16
12
|
const height = canvas.height;
|
|
17
13
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
if (context === undefined) {
|
|
21
|
-
context = canvas.getContext("2d");
|
|
22
|
-
context_cache.set(canvas, context);
|
|
23
|
-
}
|
|
14
|
+
const context = html_canvas_to_rendering_context2d_cached(canvas);
|
|
24
15
|
|
|
25
16
|
const imageData = context.getImageData(0, 0, width, height);
|
|
26
17
|
|
package/src/core/geometry/3d/tetrahedra/tetrahedral_mesh_find_tets_attached_to_vertex.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tetrahedral_mesh_find_tets_attached_to_vertex.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geometry/3d/tetrahedra/tetrahedral_mesh_find_tets_attached_to_vertex.js"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,sEANW,MAAM,EAAE,iBACR,MAAM,uCAEN,MAAM,GACJ,MAAM,CAyBlB"}
|
/package/src/core/{geometry → geom}/3d/tetrahedra/tetrahedral_mesh_find_tets_attached_to_vertex.d.ts
RENAMED
|
File without changes
|
/package/src/core/{geometry → geom}/3d/tetrahedra/tetrahedral_mesh_find_tets_attached_to_vertex.js
RENAMED
|
File without changes
|