@woosh/meep-engine 2.129.1 → 2.129.3
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/sphere/sphere_matrix4_transform.d.ts +8 -0
- package/src/core/geom/3d/sphere/sphere_matrix4_transform.d.ts.map +1 -0
- package/src/core/geom/3d/sphere/sphere_matrix4_transform.js +28 -0
- package/src/core/math/GOLDEN_RATIO.d.ts.map +1 -1
- package/src/core/math/GOLDEN_RATIO.js +1 -1
- package/src/core/model/reactive/model/ReactiveBinaryExpression.d.ts +6 -5
- package/src/core/model/reactive/model/ReactiveBinaryExpression.d.ts.map +1 -1
- package/src/core/model/reactive/model/ReactiveBinaryExpression.js +19 -19
- package/src/core/model/reactive/model/arithmetic/ReactiveAdd.d.ts +2 -1
- package/src/core/model/reactive/model/arithmetic/ReactiveAdd.d.ts.map +1 -1
- package/src/core/model/reactive/model/arithmetic/ReactiveDivide.d.ts +2 -1
- package/src/core/model/reactive/model/arithmetic/ReactiveDivide.d.ts.map +1 -1
- package/src/core/model/reactive/model/arithmetic/ReactiveMultiply.d.ts +2 -1
- package/src/core/model/reactive/model/arithmetic/ReactiveMultiply.d.ts.map +1 -1
- package/src/core/model/reactive/model/arithmetic/ReactiveSubtract.d.ts +2 -1
- package/src/core/model/reactive/model/arithmetic/ReactiveSubtract.d.ts.map +1 -1
- package/src/core/model/reactive/model/comparative/ReactiveEquals.d.ts +2 -1
- package/src/core/model/reactive/model/comparative/ReactiveEquals.d.ts.map +1 -1
- package/src/core/model/reactive/model/comparative/ReactiveGreaterThan.d.ts +2 -1
- package/src/core/model/reactive/model/comparative/ReactiveGreaterThan.d.ts.map +1 -1
- package/src/core/model/reactive/model/comparative/ReactiveGreaterThanOrEqual.d.ts +2 -1
- package/src/core/model/reactive/model/comparative/ReactiveGreaterThanOrEqual.d.ts.map +1 -1
- package/src/core/model/reactive/model/comparative/ReactiveLessThan.d.ts +2 -1
- package/src/core/model/reactive/model/comparative/ReactiveLessThan.d.ts.map +1 -1
- package/src/core/model/reactive/model/comparative/ReactiveLessThanOrEqual.d.ts +2 -1
- package/src/core/model/reactive/model/comparative/ReactiveLessThanOrEqual.d.ts.map +1 -1
- package/src/core/model/reactive/model/comparative/ReactiveNotEquals.d.ts +2 -1
- package/src/core/model/reactive/model/comparative/ReactiveNotEquals.d.ts.map +1 -1
- package/src/core/model/reactive/model/logic/ReactiveAnd.d.ts.map +1 -1
- package/src/core/model/reactive/model/logic/ReactiveOr.d.ts +2 -1
- package/src/core/model/reactive/model/logic/ReactiveOr.d.ts.map +1 -1
- package/src/core/model/reactive/model/terminal/ReactiveLiteralNumber.js +1 -1
- package/src/core/primitives/strings/string_jaro_winkler.d.ts +8 -1
- package/src/core/primitives/strings/string_jaro_winkler.d.ts.map +1 -1
- package/src/core/primitives/strings/string_jaro_winkler.js +8 -1
- package/src/engine/animation/clip/curve_from_track_data_linear.d.ts.map +1 -1
- package/src/engine/animation/clip/curve_from_track_data_linear.js +11 -1
- package/src/engine/graphics/geometry/buffered/buffer_attribute_deinterleave.d.ts +8 -0
- package/src/engine/graphics/geometry/buffered/buffer_attribute_deinterleave.d.ts.map +1 -0
- package/src/engine/graphics/geometry/buffered/{deinterleaveBufferAttribute.js → buffer_attribute_deinterleave.js} +2 -1
- package/src/engine/graphics/geometry/buffered/deinterleaveBufferGeometry.js +4 -4
- package/src/engine/graphics/geometry/buffered/query/GeometrySpatialQueryAccelerator.d.ts.map +1 -1
- package/src/engine/graphics/geometry/buffered/query/GeometrySpatialQueryAccelerator.js +7 -3
- package/src/engine/graphics/geometry/computeBoundingSphereFromVertexData.js +1 -1
- package/src/engine/graphics/geometry/buffered/deinterleaveBufferAttribute.d.ts +0 -8
- package/src/engine/graphics/geometry/buffered/deinterleaveBufferAttribute.d.ts.map +0 -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.129.
|
|
8
|
+
"version": "2.129.3",
|
|
9
9
|
"main": "build/meep.module.js",
|
|
10
10
|
"module": "build/meep.module.js",
|
|
11
11
|
"exports": {
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @param {number[]|Float32Array} result
|
|
4
|
+
* @param {number[]|Float32Array} sphere
|
|
5
|
+
* @param {number[]|Float32Array} mat4
|
|
6
|
+
*/
|
|
7
|
+
export function sphere_matrix4_project(result: number[] | Float32Array, sphere: number[] | Float32Array, mat4: number[] | Float32Array): void;
|
|
8
|
+
//# sourceMappingURL=sphere_matrix4_transform.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sphere_matrix4_transform.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/3d/sphere/sphere_matrix4_transform.js"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,+CAJW,MAAM,EAAE,GAAC,YAAY,UACrB,MAAM,EAAE,GAAC,YAAY,QACrB,MAAM,EAAE,GAAC,YAAY,QAqB/B"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { v3_matrix4_multiply } from "../../vec3/v3_matrix4_multiply.js";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* @param {number[]|Float32Array} result
|
|
6
|
+
* @param {number[]|Float32Array} sphere
|
|
7
|
+
* @param {number[]|Float32Array} mat4
|
|
8
|
+
*/
|
|
9
|
+
export function sphere_matrix4_project(
|
|
10
|
+
result,
|
|
11
|
+
sphere,
|
|
12
|
+
mat4
|
|
13
|
+
) {
|
|
14
|
+
|
|
15
|
+
v3_matrix4_multiply(result, 0, sphere, 0, mat4);
|
|
16
|
+
|
|
17
|
+
// see https://github.com/mrdoob/three.js/blob/b24a79100fba0ddc6d3e284f0cb3c99888c6e143/src/math/Matrix4.js#L787
|
|
18
|
+
// see https://github.com/mrdoob/three.js/blob/b24a79100fba0ddc6d3e284f0cb3c99888c6e143/src/math/Sphere.js#L267
|
|
19
|
+
|
|
20
|
+
const scaleXSq = mat4[0] * mat4[0] + mat4[1] * mat4[1] + mat4[2] * mat4[2];
|
|
21
|
+
const scaleYSq = mat4[4] * mat4[4] + mat4[5] * mat4[5] + mat4[6] * mat4[6];
|
|
22
|
+
const scaleZSq = mat4[8] * mat4[8] + mat4[9] * mat4[9] + mat4[10] * mat4[10];
|
|
23
|
+
|
|
24
|
+
const max_scale = Math.sqrt(Math.max(scaleXSq, scaleYSq, scaleZSq));
|
|
25
|
+
|
|
26
|
+
result[3] = sphere[3] * max_scale;
|
|
27
|
+
|
|
28
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GOLDEN_RATIO.d.ts","sourceRoot":"","sources":["../../../../src/core/math/GOLDEN_RATIO.js"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,2BAFU,MAAM,
|
|
1
|
+
{"version":3,"file":"GOLDEN_RATIO.d.ts","sourceRoot":"","sources":["../../../../src/core/math/GOLDEN_RATIO.js"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,2BAFU,MAAM,CAEgE"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @
|
|
2
|
+
* @template T
|
|
3
|
+
* @extends {ReactiveExpression<T>}
|
|
3
4
|
*/
|
|
4
|
-
export class ReactiveBinaryExpression extends ReactiveExpression<
|
|
5
|
-
constructor();
|
|
5
|
+
export class ReactiveBinaryExpression<T> extends ReactiveExpression<T> {
|
|
6
6
|
/**
|
|
7
7
|
*
|
|
8
8
|
* @type {ReactiveExpression|null}
|
|
@@ -15,14 +15,14 @@ export class ReactiveBinaryExpression extends ReactiveExpression<any> {
|
|
|
15
15
|
right: ReactiveExpression<any> | null;
|
|
16
16
|
/**
|
|
17
17
|
*
|
|
18
|
-
* @type {
|
|
18
|
+
* @type {T}
|
|
19
19
|
* @private
|
|
20
20
|
*/
|
|
21
21
|
private __oldValue;
|
|
22
22
|
copy(other: any): void;
|
|
23
23
|
equals(other: any): any;
|
|
24
24
|
hash(): number;
|
|
25
|
-
evaluate(scope: any):
|
|
25
|
+
evaluate(scope: any): number | boolean | T;
|
|
26
26
|
update(): void;
|
|
27
27
|
/**
|
|
28
28
|
*
|
|
@@ -37,6 +37,7 @@ export class ReactiveBinaryExpression extends ReactiveExpression<any> {
|
|
|
37
37
|
*/
|
|
38
38
|
connect(left: any, right: any): void;
|
|
39
39
|
disconnect(): void;
|
|
40
|
+
getValue(): number | boolean | T;
|
|
40
41
|
/**
|
|
41
42
|
* Binary expression is commutative if changing the order of operands does not change the result
|
|
42
43
|
* This property should be overridden in subclasses as necessary
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReactiveBinaryExpression.d.ts","sourceRoot":"","sources":["../../../../../../src/core/model/reactive/model/ReactiveBinaryExpression.js"],"names":[],"mappings":"AAIA
|
|
1
|
+
{"version":3,"file":"ReactiveBinaryExpression.d.ts","sourceRoot":"","sources":["../../../../../../src/core/model/reactive/model/ReactiveBinaryExpression.js"],"names":[],"mappings":"AAIA;;;GAGG;AACH;IAEI;;;OAGG;IACH,MAFU,0BAAmB,IAAI,CAErB;IAEZ;;;OAGG;IACH,OAFU,0BAAmB,IAAI,CAEpB;IAEb;;;;OAIG;IACH,mBAAuB;IAEvB,uBAcC;IAED,wBAcC;IAED,eAMC;IAED,2CAQC;IAED,eAUC;IAED;;;OAGG;IACH,kCAFa,CAAC,GAAC,OAAO,GAAC,MAAM,CAI5B;IAED,2CAKC;IAED;;;;OAIG;IACH,qCAkBC;IAED,mBAaC;IAED,iCAYC;IAGL;;;;;;OAMG;IACH,wBAFU,OAAO,CAE+B;IAEhD;;;OAGG;IACH,6BAFU,OAAO,CAEoC;CAfpD;mCA7JkC,yBAAyB"}
|
|
@@ -3,7 +3,8 @@ import { combine_hash } from "../../../collection/array/combine_hash.js";
|
|
|
3
3
|
import { ReactiveExpression } from "./ReactiveExpression.js";
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
* @
|
|
6
|
+
* @template T
|
|
7
|
+
* @extends {ReactiveExpression<T>}
|
|
7
8
|
*/
|
|
8
9
|
export class ReactiveBinaryExpression extends ReactiveExpression {
|
|
9
10
|
|
|
@@ -12,6 +13,7 @@ export class ReactiveBinaryExpression extends ReactiveExpression {
|
|
|
12
13
|
* @type {ReactiveExpression|null}
|
|
13
14
|
*/
|
|
14
15
|
left = null;
|
|
16
|
+
|
|
15
17
|
/**
|
|
16
18
|
*
|
|
17
19
|
* @type {ReactiveExpression|null}
|
|
@@ -20,7 +22,7 @@ export class ReactiveBinaryExpression extends ReactiveExpression {
|
|
|
20
22
|
|
|
21
23
|
/**
|
|
22
24
|
*
|
|
23
|
-
* @type {
|
|
25
|
+
* @type {T}
|
|
24
26
|
* @private
|
|
25
27
|
*/
|
|
26
28
|
__oldValue = undefined;
|
|
@@ -28,10 +30,16 @@ export class ReactiveBinaryExpression extends ReactiveExpression {
|
|
|
28
30
|
copy(other) {
|
|
29
31
|
assert.equal(other.isReactiveExpression, true, 'other.isReactiveExpression !== true');
|
|
30
32
|
|
|
33
|
+
// make sure to disconnect from old children
|
|
31
34
|
this.disconnect();
|
|
32
35
|
|
|
33
36
|
if (other.left !== null && other.right !== null) {
|
|
34
|
-
|
|
37
|
+
|
|
38
|
+
this.connect(
|
|
39
|
+
other.left.clone(),
|
|
40
|
+
other.right.clone()
|
|
41
|
+
);
|
|
42
|
+
|
|
35
43
|
}
|
|
36
44
|
}
|
|
37
45
|
|
|
@@ -102,14 +110,14 @@ export class ReactiveBinaryExpression extends ReactiveExpression {
|
|
|
102
110
|
* @param right
|
|
103
111
|
*/
|
|
104
112
|
connect(left, right) {
|
|
105
|
-
assert.
|
|
106
|
-
assert.
|
|
113
|
+
assert.defined(left, 'left');
|
|
114
|
+
assert.notNull(left, 'left');
|
|
107
115
|
|
|
108
|
-
assert.
|
|
109
|
-
assert.
|
|
116
|
+
assert.defined(right, 'right');
|
|
117
|
+
assert.notNull(right, 'right');
|
|
110
118
|
|
|
111
|
-
assert.
|
|
112
|
-
assert.
|
|
119
|
+
assert.defined(left.onChanged, 'left');
|
|
120
|
+
assert.defined(right.onChanged, 'right');
|
|
113
121
|
|
|
114
122
|
this.left = left;
|
|
115
123
|
this.right = right;
|
|
@@ -139,18 +147,10 @@ export class ReactiveBinaryExpression extends ReactiveExpression {
|
|
|
139
147
|
getValue() {
|
|
140
148
|
|
|
141
149
|
const left = this.left;
|
|
142
|
-
|
|
143
|
-
if (left === null) {
|
|
144
|
-
//not linked
|
|
145
|
-
throw new Error('left is null');
|
|
146
|
-
}
|
|
150
|
+
assert.notNull(left, 'left'); // not linked?
|
|
147
151
|
|
|
148
152
|
const right = this.right;
|
|
149
|
-
|
|
150
|
-
if (right === null) {
|
|
151
|
-
//not linked
|
|
152
|
-
throw new Error('right is null');
|
|
153
|
-
}
|
|
153
|
+
assert.notNull(right, 'right'); // not linked?
|
|
154
154
|
|
|
155
155
|
const leftValue = left.getValue();
|
|
156
156
|
const rightValue = right.getValue();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export class ReactiveAdd extends ReactiveBinaryExpression {
|
|
1
|
+
export class ReactiveAdd extends ReactiveBinaryExpression<any> {
|
|
2
2
|
/**
|
|
3
3
|
*
|
|
4
4
|
* @param {ReactiveExpression} left
|
|
@@ -6,6 +6,7 @@ export class ReactiveAdd extends ReactiveBinaryExpression {
|
|
|
6
6
|
* @returns {ReactiveAdd}
|
|
7
7
|
*/
|
|
8
8
|
static from(left: ReactiveExpression, right: ReactiveExpression): ReactiveAdd;
|
|
9
|
+
constructor();
|
|
9
10
|
/**
|
|
10
11
|
*
|
|
11
12
|
* @param {number} left
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReactiveAdd.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/model/reactive/model/arithmetic/ReactiveAdd.js"],"names":[],"mappings":"AAGA;IAgCI;;;;;OAKG;IACH,kEAFa,WAAW,CAQvB
|
|
1
|
+
{"version":3,"file":"ReactiveAdd.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/model/reactive/model/arithmetic/ReactiveAdd.js"],"names":[],"mappings":"AAGA;IAgCI;;;;;OAKG;IACH,kEAFa,WAAW,CAQvB;;IA3CD;;;;;OAKG;IACH,gBAJW,MAAM,SACN,MAAM,GACJ,MAAM,CAIlB;IAED;;;OAGG;IACH,SAFY,WAAW,CAQtB;IAMD,iBAEC;IAmBL;;;OAGG;IACH,mBAFU,WAAS,MAAM,CAEK;IAE9B;;;OAGG;IACH,iCAFU,OAAO,CAE2B;IAE5C;;;OAGG;IACH,wBAFU,OAAO,CAEkB;CAlBlC;yCAhDwC,gCAAgC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export class ReactiveDivide extends ReactiveBinaryExpression {
|
|
1
|
+
export class ReactiveDivide extends ReactiveBinaryExpression<any> {
|
|
2
2
|
/**
|
|
3
3
|
*
|
|
4
4
|
* @param {ReactiveExpression} left
|
|
@@ -6,6 +6,7 @@ export class ReactiveDivide extends ReactiveBinaryExpression {
|
|
|
6
6
|
* @returns {ReactiveDivide}
|
|
7
7
|
*/
|
|
8
8
|
static from(left: ReactiveExpression, right: ReactiveExpression): ReactiveDivide;
|
|
9
|
+
constructor();
|
|
9
10
|
/**
|
|
10
11
|
*
|
|
11
12
|
* @param {number} left
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReactiveDivide.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/model/reactive/model/arithmetic/ReactiveDivide.js"],"names":[],"mappings":"AAGA;IA+BI;;;;;OAKG;IACH,kEAFa,cAAc,CAQ1B
|
|
1
|
+
{"version":3,"file":"ReactiveDivide.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/model/reactive/model/arithmetic/ReactiveDivide.js"],"names":[],"mappings":"AAGA;IA+BI;;;;;OAKG;IACH,kEAFa,cAAc,CAQ1B;;IA1CD;;;;;OAKG;IACH,gBAJW,MAAM,SACN,MAAM,GACJ,MAAM,CAIlB;IAED;;;OAGG;IACH,SAFY,cAAc,CAQzB;IAMD,iBAEC;IAiBL;;;OAGG;IACH,mBAFU,WAAS,MAAM,CAEQ;IAEjC;;;OAGG;IACH,iCAFU,OAAO,CAE8B;IAE/C;;;OAGG;IACH,2BAFU,OAAO,CAEwB;CAlBxC;yCA9CwC,gCAAgC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export class ReactiveMultiply extends ReactiveBinaryExpression {
|
|
1
|
+
export class ReactiveMultiply extends ReactiveBinaryExpression<any> {
|
|
2
2
|
/**
|
|
3
3
|
*
|
|
4
4
|
* @param {ReactiveExpression} left
|
|
@@ -6,6 +6,7 @@ export class ReactiveMultiply extends ReactiveBinaryExpression {
|
|
|
6
6
|
* @returns {ReactiveMultiply}
|
|
7
7
|
*/
|
|
8
8
|
static from(left: ReactiveExpression, right: ReactiveExpression): ReactiveMultiply;
|
|
9
|
+
constructor();
|
|
9
10
|
/**
|
|
10
11
|
*
|
|
11
12
|
* @param {number} left
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReactiveMultiply.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/model/reactive/model/arithmetic/ReactiveMultiply.js"],"names":[],"mappings":"AAGA;IAgCI;;;;;OAKG;IACH,kEAFa,gBAAgB,CAQ5B
|
|
1
|
+
{"version":3,"file":"ReactiveMultiply.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/model/reactive/model/arithmetic/ReactiveMultiply.js"],"names":[],"mappings":"AAGA;IAgCI;;;;;OAKG;IACH,kEAFa,gBAAgB,CAQ5B;;IA3CD;;;;;OAKG;IACH,gBAJW,MAAM,SACN,MAAM,GACJ,MAAM,CAIlB;IAED;;;OAGG;IACH,SAFY,gBAAgB,CAQ3B;IAMD,iBAEC;IAmBL;;;OAGG;IACH,mBAFU,WAAS,MAAM,CAEU;IAEnC;;;OAGG;IACH,iCAFU,OAAO,CAEgC;IAEjD;;;OAGG;IACH,6BAFU,OAAO,CAE4B;CAlB5C;yCAhDwC,gCAAgC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export class ReactiveSubtract extends ReactiveBinaryExpression {
|
|
1
|
+
export class ReactiveSubtract extends ReactiveBinaryExpression<any> {
|
|
2
2
|
/**
|
|
3
3
|
*
|
|
4
4
|
* @param {ReactiveExpression} left
|
|
@@ -6,6 +6,7 @@ export class ReactiveSubtract extends ReactiveBinaryExpression {
|
|
|
6
6
|
* @returns {ReactiveSubtract}
|
|
7
7
|
*/
|
|
8
8
|
static from(left: ReactiveExpression, right: ReactiveExpression): ReactiveSubtract;
|
|
9
|
+
constructor();
|
|
9
10
|
/**
|
|
10
11
|
*
|
|
11
12
|
* @param {number} left
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReactiveSubtract.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/model/reactive/model/arithmetic/ReactiveSubtract.js"],"names":[],"mappings":"AAGA;IAgCI;;;;;OAKG;IACH,kEAFa,gBAAgB,CAQ5B
|
|
1
|
+
{"version":3,"file":"ReactiveSubtract.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/model/reactive/model/arithmetic/ReactiveSubtract.js"],"names":[],"mappings":"AAGA;IAgCI;;;;;OAKG;IACH,kEAFa,gBAAgB,CAQ5B;;IA3CD;;;;;OAKG;IACH,gBAJW,MAAM,SACN,MAAM,GACJ,MAAM,CAIlB;IAED;;;OAGG;IACH,SAFY,gBAAgB,CAQ3B;IAMD,iBAEC;IAmBL;;;OAGG;IACH,mBAFU,WAAS,MAAM,CAEU;IAEnC;;;OAGG;IACH,iCAFU,OAAO,CAEgC;IAEjD;;;OAGG;IACH,6BAFU,OAAO,CAE4B;CAlB5C;yCAhDwC,gCAAgC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export class ReactiveEquals extends ReactiveBinaryExpression {
|
|
1
|
+
export class ReactiveEquals extends ReactiveBinaryExpression<any> {
|
|
2
2
|
/**
|
|
3
3
|
*
|
|
4
4
|
* @param {ReactiveExpression} left
|
|
@@ -6,6 +6,7 @@ export class ReactiveEquals extends ReactiveBinaryExpression {
|
|
|
6
6
|
* @returns {ReactiveEquals}
|
|
7
7
|
*/
|
|
8
8
|
static from(left: ReactiveExpression, right: ReactiveExpression): ReactiveEquals;
|
|
9
|
+
constructor();
|
|
9
10
|
/**
|
|
10
11
|
*
|
|
11
12
|
* @param {number|boolean} left
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReactiveEquals.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/model/reactive/model/comparative/ReactiveEquals.js"],"names":[],"mappings":"AAGA;IAgCI;;;;;OAKG;IACH,kEAFa,cAAc,CAQ1B
|
|
1
|
+
{"version":3,"file":"ReactiveEquals.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/model/reactive/model/comparative/ReactiveEquals.js"],"names":[],"mappings":"AAGA;IAgCI;;;;;OAKG;IACH,kEAFa,cAAc,CAQ1B;;IA3CD;;;;;OAKG;IACH,gBAJW,MAAM,GAAC,OAAO,SACd,MAAM,GAAC,OAAO,GACZ,OAAO,CAInB;IAED;;;OAGG;IACH,SAFY,cAAc,CAQzB;IAMD,iBAEC;IAkBL;;;OAGG;IACH,mBAFU,WAAS,MAAM,CAEQ;IAEjC;;;OAGG;IACH,kCAFU,OAAO,CAE+B;IAEhD;;;OAGG;IACH,2BAFU,OAAO,CAEwB;CAlBxC;yCA/CwC,gCAAgC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export class ReactiveGreaterThan extends ReactiveBinaryExpression {
|
|
1
|
+
export class ReactiveGreaterThan extends ReactiveBinaryExpression<any> {
|
|
2
2
|
/**
|
|
3
3
|
*
|
|
4
4
|
* @param {ReactiveExpression} left
|
|
@@ -6,6 +6,7 @@ export class ReactiveGreaterThan extends ReactiveBinaryExpression {
|
|
|
6
6
|
* @returns {ReactiveGreaterThan}
|
|
7
7
|
*/
|
|
8
8
|
static from(left: ReactiveExpression, right: ReactiveExpression): ReactiveGreaterThan;
|
|
9
|
+
constructor();
|
|
9
10
|
/**
|
|
10
11
|
*
|
|
11
12
|
* @param {number} left
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReactiveGreaterThan.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/model/reactive/model/comparative/ReactiveGreaterThan.js"],"names":[],"mappings":"AAGA;IA+BI;;;;;OAKG;IACH,kEAFa,mBAAmB,CAQ/B
|
|
1
|
+
{"version":3,"file":"ReactiveGreaterThan.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/model/reactive/model/comparative/ReactiveGreaterThan.js"],"names":[],"mappings":"AAGA;IA+BI;;;;;OAKG;IACH,kEAFa,mBAAmB,CAQ/B;;IA1CD;;;;;OAKG;IACH,gBAJW,MAAM,SACN,MAAM,GACJ,OAAO,CAInB;IAED;;;OAGG;IACH,SAFY,mBAAmB,CAQ9B;IAMD,iBAEC;IAkBL;;;OAGG;IACH,mBAFU,WAAS,MAAM,CAEa;IAEtC;;;OAGG;IACH,kCAFU,OAAO,CAEoC;IAErD;;;OAGG;IACH,uBAFU,OAAO,CAEkC;CAlBlD;yCA/CwC,gCAAgC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export class ReactiveGreaterThanOrEqual extends ReactiveBinaryExpression {
|
|
1
|
+
export class ReactiveGreaterThanOrEqual extends ReactiveBinaryExpression<any> {
|
|
2
2
|
/**
|
|
3
3
|
*
|
|
4
4
|
* @param {ReactiveExpression} left
|
|
@@ -6,6 +6,7 @@ export class ReactiveGreaterThanOrEqual extends ReactiveBinaryExpression {
|
|
|
6
6
|
* @returns {ReactiveGreaterThanOrEqual}
|
|
7
7
|
*/
|
|
8
8
|
static from(left: ReactiveExpression, right: ReactiveExpression): ReactiveGreaterThanOrEqual;
|
|
9
|
+
constructor();
|
|
9
10
|
/**
|
|
10
11
|
*
|
|
11
12
|
* @param {number} left
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReactiveGreaterThanOrEqual.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/model/reactive/model/comparative/ReactiveGreaterThanOrEqual.js"],"names":[],"mappings":"AAGA;IA+BI;;;;;OAKG;IACH,kEAFa,0BAA0B,CAQtC
|
|
1
|
+
{"version":3,"file":"ReactiveGreaterThanOrEqual.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/model/reactive/model/comparative/ReactiveGreaterThanOrEqual.js"],"names":[],"mappings":"AAGA;IA+BI;;;;;OAKG;IACH,kEAFa,0BAA0B,CAQtC;;IA1CD;;;;;OAKG;IACH,gBAJW,MAAM,SACN,MAAM,GACJ,OAAO,CAInB;IAED;;;OAGG;IACH,SAFY,0BAA0B,CAQrC;IAMD,iBAEC;IAkBL;;;OAGG;IACH,mBAFU,WAAS,MAAM,CAEoB;IAE7C;;;OAGG;IACH,kCAFU,OAAO,CAE2C;IAE5D;;;OAGG;IACH,uCAFU,OAAO,CAEgD;CAlBhE;yCA/CwC,gCAAgC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export class ReactiveLessThan extends ReactiveBinaryExpression {
|
|
1
|
+
export class ReactiveLessThan extends ReactiveBinaryExpression<any> {
|
|
2
2
|
/**
|
|
3
3
|
*
|
|
4
4
|
* @param {ReactiveExpression} left
|
|
@@ -6,6 +6,7 @@ export class ReactiveLessThan extends ReactiveBinaryExpression {
|
|
|
6
6
|
* @returns {ReactiveLessThan}
|
|
7
7
|
*/
|
|
8
8
|
static from(left: ReactiveExpression, right: ReactiveExpression): ReactiveLessThan;
|
|
9
|
+
constructor();
|
|
9
10
|
/**
|
|
10
11
|
*
|
|
11
12
|
* @param {number} left
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReactiveLessThan.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/model/reactive/model/comparative/ReactiveLessThan.js"],"names":[],"mappings":"AAGA;IAgCI;;;;;OAKG;IACH,kEAFa,gBAAgB,CAQ5B
|
|
1
|
+
{"version":3,"file":"ReactiveLessThan.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/model/reactive/model/comparative/ReactiveLessThan.js"],"names":[],"mappings":"AAGA;IAgCI;;;;;OAKG;IACH,kEAFa,gBAAgB,CAQ5B;;IA3CD;;;;;OAKG;IACH,gBAJW,MAAM,SACN,MAAM,GACJ,OAAO,CAInB;IAED;;;OAGG;IACH,SAFY,gBAAgB,CAQ3B;IAMD,iBAEC;IAkBL;;;OAGG;IACH,mBAFU,WAAS,MAAM,CAEU;IAEnC;;;OAGG;IACH,kCAFU,OAAO,CAEiC;IAElD;;;OAGG;IACH,6BAFU,OAAO,CAE4B;CAlB5C;yCA/CwC,gCAAgC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export class ReactiveLessThanOrEqual extends ReactiveBinaryExpression {
|
|
1
|
+
export class ReactiveLessThanOrEqual extends ReactiveBinaryExpression<any> {
|
|
2
2
|
/**
|
|
3
3
|
*
|
|
4
4
|
* @param {ReactiveExpression} left
|
|
@@ -6,6 +6,7 @@ export class ReactiveLessThanOrEqual extends ReactiveBinaryExpression {
|
|
|
6
6
|
* @returns {ReactiveLessThanOrEqual}
|
|
7
7
|
*/
|
|
8
8
|
static from(left: ReactiveExpression, right: ReactiveExpression): ReactiveLessThanOrEqual;
|
|
9
|
+
constructor();
|
|
9
10
|
/**
|
|
10
11
|
*
|
|
11
12
|
* @param {number} left
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReactiveLessThanOrEqual.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/model/reactive/model/comparative/ReactiveLessThanOrEqual.js"],"names":[],"mappings":"AAGA;IA+BI;;;;;OAKG;IACH,kEAFa,uBAAuB,CAQnC
|
|
1
|
+
{"version":3,"file":"ReactiveLessThanOrEqual.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/model/reactive/model/comparative/ReactiveLessThanOrEqual.js"],"names":[],"mappings":"AAGA;IA+BI;;;;;OAKG;IACH,kEAFa,uBAAuB,CAQnC;;IA1CD;;;;;OAKG;IACH,gBAJW,MAAM,SACN,MAAM,GACJ,OAAO,CAInB;IAED;;;OAGG;IACH,SAFY,uBAAuB,CAQlC;IAMD,iBAEC;IAkBL;;;OAGG;IACH,mBAFU,WAAS,MAAM,CAEiB;IAE1C;;;OAGG;IACH,kCAFU,OAAO,CAEwC;IAEzD;;;OAGG;IACH,oCAFU,OAAO,CAE0C;CAlB1D;yCA/CwC,gCAAgC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export class ReactiveNotEquals extends ReactiveBinaryExpression {
|
|
1
|
+
export class ReactiveNotEquals extends ReactiveBinaryExpression<any> {
|
|
2
2
|
/**
|
|
3
3
|
*
|
|
4
4
|
* @param {ReactiveExpression} left
|
|
@@ -6,6 +6,7 @@ export class ReactiveNotEquals extends ReactiveBinaryExpression {
|
|
|
6
6
|
* @returns {ReactiveNotEquals}
|
|
7
7
|
*/
|
|
8
8
|
static from(left: ReactiveExpression, right: ReactiveExpression): ReactiveNotEquals;
|
|
9
|
+
constructor();
|
|
9
10
|
/**
|
|
10
11
|
*
|
|
11
12
|
* @param {number|boolean} left
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReactiveNotEquals.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/model/reactive/model/comparative/ReactiveNotEquals.js"],"names":[],"mappings":"AAGA;IA+BI;;;;;OAKG;IACH,kEAFa,iBAAiB,CAQ7B
|
|
1
|
+
{"version":3,"file":"ReactiveNotEquals.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/model/reactive/model/comparative/ReactiveNotEquals.js"],"names":[],"mappings":"AAGA;IA+BI;;;;;OAKG;IACH,kEAFa,iBAAiB,CAQ7B;;IA1CD;;;;;OAKG;IACH,gBAJW,MAAM,GAAC,OAAO,SACd,MAAM,GAAC,OAAO,GACZ,OAAO,CAInB;IAED;;;OAGG;IACH,SAFY,iBAAiB,CAQ5B;IAMD,iBAEC;IAkBL;;;OAGG;IACH,mBAFU,WAAS,MAAM,CAEW;IAEpC;;;OAGG;IACH,kCAFU,OAAO,CAEkC;IAEnD;;;OAGG;IACH,8BAFU,OAAO,CAE8B;CAlB9C;yCA/CwC,gCAAgC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReactiveAnd.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/model/reactive/model/logic/ReactiveAnd.js"],"names":[],"mappings":"AAGA;IAyCI;;;;;OAKG;IACH,kEAFa,WAAW,CAQvB
|
|
1
|
+
{"version":3,"file":"ReactiveAnd.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/model/reactive/model/logic/ReactiveAnd.js"],"names":[],"mappings":"AAGA;IAyCI;;;;;OAKG;IACH,kEAFa,WAAW,CAQvB;;IApDD;;;;;OAKG;IACH,gBAJW,OAAO,SACP,OAAO,GACL,OAAO,CAInB;IAED;;;OAGG;IACH,SAFY,WAAW,CAQtB;IAgBD,iBAEC;IAkBL;;;OAGG;IACH,mBAFU,WAAS,MAAM,CAEK;IAE9B;;;OAGG;IACH,4BAFU,OAAO,CAEsB;IAEvC;;;OAGG;IACH,wBAFU,OAAO,CAEkB;CAlBlC;yCAzDwC,gCAAgC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export class ReactiveOr extends ReactiveBinaryExpression {
|
|
1
|
+
export class ReactiveOr extends ReactiveBinaryExpression<any> {
|
|
2
2
|
/**
|
|
3
3
|
*
|
|
4
4
|
* @param {ReactiveExpression} left
|
|
@@ -6,6 +6,7 @@ export class ReactiveOr extends ReactiveBinaryExpression {
|
|
|
6
6
|
* @returns {ReactiveOr}
|
|
7
7
|
*/
|
|
8
8
|
static from(left: ReactiveExpression, right: ReactiveExpression): ReactiveOr;
|
|
9
|
+
constructor();
|
|
9
10
|
/**
|
|
10
11
|
*
|
|
11
12
|
* @param {boolean} left
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReactiveOr.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/model/reactive/model/logic/ReactiveOr.js"],"names":[],"mappings":"AAGA;IAyCI;;;;;OAKG;IACH,kEAFa,UAAU,CAQtB
|
|
1
|
+
{"version":3,"file":"ReactiveOr.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/model/reactive/model/logic/ReactiveOr.js"],"names":[],"mappings":"AAGA;IAyCI;;;;;OAKG;IACH,kEAFa,UAAU,CAQtB;;IApDD;;;;;OAKG;IACH,gBAJW,OAAO,SACP,OAAO,GACL,OAAO,CAInB;IAED;;;OAGG;IACH,SAFY,UAAU,CAQrB;IAgBD,iBAEC;IAkBL;;;OAGG;IACH,mBAFU,WAAS,MAAM,CAEI;IAE7B;;;OAGG;IACH,4BAFU,OAAO,CAEqB;IAEtC;;;OAGG;IACH,uBAFU,OAAO,CAEgB;CAlBhC;yCAzDwC,gCAAgC"}
|
|
@@ -16,7 +16,7 @@ export class ReactiveLiteralNumber extends ReactiveExpression {
|
|
|
16
16
|
|
|
17
17
|
assert.isNumber(v, 'v');
|
|
18
18
|
|
|
19
|
-
//save some ram by using a dummy signal, it never fires anyway since value is constant
|
|
19
|
+
// save some ram by using a dummy signal, it never fires anyway since value is constant
|
|
20
20
|
this.onChanged = dummySignal;
|
|
21
21
|
|
|
22
22
|
/**
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Calculate the Jaro-Winkler distance between two strings
|
|
2
|
+
* Calculate the Jaro-Winkler distance between two strings.
|
|
3
|
+
* Useful for sorting and fuzzy matching.
|
|
4
|
+
*
|
|
3
5
|
* @param {string} first The string to compare
|
|
4
6
|
* @param {string} second The string to compare with
|
|
5
7
|
* @returns {number} similarity score, higher value means strings are more similar, between 0 and 1
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* string_jaro_winkler("Hello", "Hello") === 1
|
|
11
|
+
* string_jaro_winkler("apple", "orange") === 0.58
|
|
12
|
+
* string_jaro_winkler("how are you?", "are you good?") === 0.74
|
|
6
13
|
*/
|
|
7
14
|
export function string_jaro_winkler(first: string, second: string): number;
|
|
8
15
|
//# sourceMappingURL=string_jaro_winkler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"string_jaro_winkler.d.ts","sourceRoot":"","sources":["../../../../../src/core/primitives/strings/string_jaro_winkler.js"],"names":[],"mappings":"AAIA
|
|
1
|
+
{"version":3,"file":"string_jaro_winkler.d.ts","sourceRoot":"","sources":["../../../../../src/core/primitives/strings/string_jaro_winkler.js"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AACH,2CATW,MAAM,UACN,MAAM,GACJ,MAAM,CAkClB"}
|
|
@@ -3,10 +3,17 @@ import { min3 } from "../../math/min3.js";
|
|
|
3
3
|
import { string_jaro_distance } from "./string_jaro_distance.js";
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
* Calculate the Jaro-Winkler distance between two strings
|
|
6
|
+
* Calculate the Jaro-Winkler distance between two strings.
|
|
7
|
+
* Useful for sorting and fuzzy matching.
|
|
8
|
+
*
|
|
7
9
|
* @param {string} first The string to compare
|
|
8
10
|
* @param {string} second The string to compare with
|
|
9
11
|
* @returns {number} similarity score, higher value means strings are more similar, between 0 and 1
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* string_jaro_winkler("Hello", "Hello") === 1
|
|
15
|
+
* string_jaro_winkler("apple", "orange") === 0.58
|
|
16
|
+
* string_jaro_winkler("how are you?", "are you good?") === 0.74
|
|
10
17
|
*/
|
|
11
18
|
export function string_jaro_winkler(first, second) {
|
|
12
19
|
assert.isString(first, 'first');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"curve_from_track_data_linear.d.ts","sourceRoot":"","sources":["../../../../../src/engine/animation/clip/curve_from_track_data_linear.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"curve_from_track_data_linear.d.ts","sourceRoot":"","sources":["../../../../../src/engine/animation/clip/curve_from_track_data_linear.js"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AACH,4EALW,MAAM,EAAE,SACR,MAAM,EAAE,mBACR,MAAM,mBACN,MAAM,QAyBhB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { assert } from "../../../core/assert.js";
|
|
1
2
|
import { Keyframe } from "../curve/Keyframe.js";
|
|
2
3
|
|
|
3
4
|
/**
|
|
@@ -8,7 +9,16 @@ import { Keyframe } from "../curve/Keyframe.js";
|
|
|
8
9
|
* @param {number} component_count
|
|
9
10
|
* @param {number} component_index
|
|
10
11
|
*/
|
|
11
|
-
export function curve_from_track_data_linear(
|
|
12
|
+
export function curve_from_track_data_linear(
|
|
13
|
+
curve,
|
|
14
|
+
values,
|
|
15
|
+
times,
|
|
16
|
+
component_count,
|
|
17
|
+
component_index
|
|
18
|
+
) {
|
|
19
|
+
|
|
20
|
+
assert.isNonNegativeInteger(component_count, 'component_count');
|
|
21
|
+
assert.isNonNegativeInteger(component_index, 'component_index');
|
|
12
22
|
|
|
13
23
|
const key_count = times.length;
|
|
14
24
|
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @param {THREE.InterleavedBufferAttribute|THREE.BufferAttribute} source_attribute
|
|
4
|
+
* @returns {THREE.BufferAttribute}
|
|
5
|
+
*/
|
|
6
|
+
export function buffer_attribute_deinterleave(source_attribute: THREE.InterleavedBufferAttribute | THREE.BufferAttribute): THREE.BufferAttribute;
|
|
7
|
+
import { BufferAttribute } from "three";
|
|
8
|
+
//# sourceMappingURL=buffer_attribute_deinterleave.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buffer_attribute_deinterleave.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/geometry/buffered/buffer_attribute_deinterleave.js"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,gEAHW,MAAM,0BAA0B,GAAC,qBAAqB,GACpD,qBAAqB,CAkCjC;gCAxC+B,OAAO"}
|
|
@@ -6,8 +6,9 @@ import { BufferAttribute } from "three";
|
|
|
6
6
|
* @param {THREE.InterleavedBufferAttribute|THREE.BufferAttribute} source_attribute
|
|
7
7
|
* @returns {THREE.BufferAttribute}
|
|
8
8
|
*/
|
|
9
|
-
export function
|
|
9
|
+
export function buffer_attribute_deinterleave(source_attribute) {
|
|
10
10
|
if (source_attribute.isInterleavedBufferAttribute !== true && source_attribute.isBufferAttribute) {
|
|
11
|
+
// already isn't interleaved
|
|
11
12
|
return source_attribute;
|
|
12
13
|
}
|
|
13
14
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BufferGeometry } from "three";
|
|
2
|
-
import {
|
|
2
|
+
import { buffer_attribute_deinterleave } from "./buffer_attribute_deinterleave.js";
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
*
|
|
@@ -10,13 +10,13 @@ export function deinterleaveBufferGeometry(geometry) {
|
|
|
10
10
|
const result = new BufferGeometry();
|
|
11
11
|
|
|
12
12
|
if (geometry.getIndex() !== null) {
|
|
13
|
-
result.setIndex(
|
|
13
|
+
result.setIndex(buffer_attribute_deinterleave(geometry.getIndex()));
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
for (const attribute_key in geometry.attributes) {
|
|
17
17
|
const source_attribute = geometry.attributes[attribute_key];
|
|
18
18
|
|
|
19
|
-
result.setAttribute(attribute_key,
|
|
19
|
+
result.setAttribute(attribute_key, buffer_attribute_deinterleave(source_attribute));
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
// copy other bits
|
|
@@ -33,7 +33,7 @@ export function deinterleaveBufferGeometry(geometry) {
|
|
|
33
33
|
|
|
34
34
|
for (let i = 0; i < source_attributes.length; i++) {
|
|
35
35
|
const source_attribute = source_attributes[i];
|
|
36
|
-
result_attributes[i] =
|
|
36
|
+
result_attributes[i] = buffer_attribute_deinterleave(source_attribute);
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
|
package/src/engine/graphics/geometry/buffered/query/GeometrySpatialQueryAccelerator.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GeometrySpatialQueryAccelerator.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/geometry/buffered/query/GeometrySpatialQueryAccelerator.js"],"names":[],"mappings":"AAiBA;IACI,
|
|
1
|
+
{"version":3,"file":"GeometrySpatialQueryAccelerator.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/geometry/buffered/query/GeometrySpatialQueryAccelerator.js"],"names":[],"mappings":"AAiBA;IACI,iCA4BC;IArBG;;;OAGG;IACH,cAeE;IAIN;;;OAGG;IACH,4BAEC;IAED;;;OAGG;IACH,yBAEC;IAED;;;;;OAKG;IACH,4CAJW,MAAM,cAAc,UACpB,OAAO,GACL,OAAO,CAuCnB;IAED;;;;;;OAMG;IACH,gEAJW,MAAM,cAAc,OACpB,MAAM,EAAE,GAAC,UAAU,MAAM,CAAC,GAAC,YAAY,GACtC,OAAO,CASlB;IAED;;;;;;;;;;;OAWG;IACH,oEATW,MAAM,cAAc,gBACpB,MAAM,gBACN,MAAM,gBACN,MAAM,mBACN,MAAM,mBACN,MAAM,mBACN,MAAM,GACL,OAAO,CA8ClB;IAED;;;;;;;OAOG;IACH,0DALW,MAAM,cAAc,gDAGlB,OAAO,CAcnB;IAED;;;;OAIG;IACH,gCAHW,MAAM,cAAc,GAClB,OAAO,CAMnB;IAED;;;;OAIG;IACH,sBAHW,MAAM,cAAc,GAClB,eAAe,CAiB3B;IAED;;;;OAIG;IACH,oBAyBC;CAEJ;;kBAIS,+BAA+B;;gCAjRT,sDAAsD"}
|
|
@@ -4,8 +4,8 @@ import { Cache } from "../../../../../core/cache/Cache.js";
|
|
|
4
4
|
import { read_three_planes_to_array } from "../../../../../core/geom/3d/frustum/read_three_planes_to_array.js";
|
|
5
5
|
import { bvh32_from_indexed_geometry } from "../../bvh/buffered/bvh32_from_indexed_geometry.js";
|
|
6
6
|
import { bvh32_from_unindexed_geometry } from "../../bvh/buffered/bvh32_from_unindexed_geometry.js";
|
|
7
|
+
import { buffer_attribute_deinterleave } from "../buffer_attribute_deinterleave.js";
|
|
7
8
|
import { buffer_attribute_denormalize } from "../buffer_attribute_denormalize.js";
|
|
8
|
-
import { deinterleaveBufferAttribute } from "../deinterleaveBufferAttribute.js";
|
|
9
9
|
import { bvh32_geometry_overlap_clipping_volume } from "./bvh32_geometry_overlap_clipping_volume.js";
|
|
10
10
|
import { bvh32_geometry_raycast } from "./bvh32_geometry_raycast.js";
|
|
11
11
|
|
|
@@ -20,6 +20,9 @@ export class GeometrySpatialQueryAccelerator {
|
|
|
20
20
|
cache_size = 100 * 1024 * 1024
|
|
21
21
|
) {
|
|
22
22
|
|
|
23
|
+
assert.isNonNegativeInteger(cache_size,'cache_size');
|
|
24
|
+
assert.greaterThanOrEqual(cache_size, 0, 'cache_size must be greater than or equal to 0');
|
|
25
|
+
|
|
23
26
|
/**
|
|
24
27
|
* @private
|
|
25
28
|
* @type {Cache<THREE.BufferGeometry, BinaryUint32BVH>}
|
|
@@ -244,7 +247,7 @@ export class GeometrySpatialQueryAccelerator {
|
|
|
244
247
|
const position_attribute = geometry.getAttribute('position');
|
|
245
248
|
const index_attribute = geometry.getIndex();
|
|
246
249
|
|
|
247
|
-
const de_interleaved_position_attribute =
|
|
250
|
+
const de_interleaved_position_attribute = buffer_attribute_deinterleave(position_attribute);
|
|
248
251
|
const de_normalized_position_attribute = buffer_attribute_denormalize(de_interleaved_position_attribute);
|
|
249
252
|
|
|
250
253
|
const vertices = de_normalized_position_attribute.array;
|
|
@@ -255,10 +258,11 @@ export class GeometrySpatialQueryAccelerator {
|
|
|
255
258
|
|
|
256
259
|
} else {
|
|
257
260
|
|
|
258
|
-
const de_interleaved_index_attribute =
|
|
261
|
+
const de_interleaved_index_attribute = buffer_attribute_deinterleave(index_attribute);
|
|
259
262
|
const indices = de_interleaved_index_attribute.array;
|
|
260
263
|
|
|
261
264
|
bvh32_from_indexed_geometry(bvh, vertices, indices);
|
|
265
|
+
|
|
262
266
|
}
|
|
263
267
|
|
|
264
268
|
return bvh;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
* @param {THREE.InterleavedBufferAttribute|THREE.BufferAttribute} source_attribute
|
|
4
|
-
* @returns {THREE.BufferAttribute}
|
|
5
|
-
*/
|
|
6
|
-
export function deinterleaveBufferAttribute(source_attribute: THREE.InterleavedBufferAttribute | THREE.BufferAttribute): THREE.BufferAttribute;
|
|
7
|
-
import { BufferAttribute } from "three";
|
|
8
|
-
//# sourceMappingURL=deinterleaveBufferAttribute.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"deinterleaveBufferAttribute.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/geometry/buffered/deinterleaveBufferAttribute.js"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,8DAHW,MAAM,0BAA0B,GAAC,qBAAqB,GACpD,qBAAqB,CAiCjC;gCAvC+B,OAAO"}
|