@woosh/meep-engine 2.96.0 → 2.98.0
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/bundle-worker-terrain.js +1 -1
- package/build/meep.cjs +892 -687
- package/build/meep.min.js +1 -1
- package/build/meep.module.js +892 -687
- package/package.json +1 -1
- package/src/core/binary/BitSet.d.ts +2 -2
- package/src/core/binary/BitSet.d.ts.map +1 -1
- package/src/core/binary/BitSet.js +8 -5
- package/src/core/bvh2/bvh3/query/bvh_query_leaves_ray.js +1 -1
- package/src/core/bvh2/bvh3/query/bvh_query_user_data_generic.js +1 -1
- package/src/core/bvh2/bvh3/query/bvh_query_user_data_ray.d.ts.map +1 -1
- package/src/core/bvh2/bvh3/query/bvh_query_user_data_ray.js +3 -2
- package/src/core/collection/array/arrayQuickSort.js +2 -2
- package/src/core/collection/array/array_compute_max.d.ts +9 -0
- package/src/core/collection/array/array_compute_max.d.ts.map +1 -0
- package/src/core/collection/array/{computeArrayMax.js → array_compute_max.js} +1 -1
- package/src/core/collection/array/array_compute_min.d.ts +9 -0
- package/src/core/collection/array/array_compute_min.d.ts.map +1 -0
- package/src/core/collection/array/{computeArrayMin.js → array_compute_min.js} +1 -1
- package/src/core/collection/array/array_compute_min_max.d.ts.map +1 -1
- package/src/core/collection/array/array_compute_min_max.js +1 -0
- package/src/core/collection/array/array_swap.d.ts.map +1 -1
- package/src/core/collection/array/array_swap.js +11 -8
- package/src/core/collection/array/array_swap_one.d.ts +8 -0
- package/src/core/collection/array/array_swap_one.d.ts.map +1 -0
- package/src/core/collection/array/{arraySwapElements.js → array_swap_one.js} +1 -1
- package/src/core/collection/array/iterator/AbstractArrayIterator.d.ts.map +1 -0
- package/src/core/collection/array/iterator/ArrayIteratorRandom.d.ts.map +1 -0
- package/src/core/collection/array/{ArrayIteratorRandom.js → iterator/ArrayIteratorRandom.js} +2 -2
- package/src/core/collection/array/iterator/ArrayIteratorSequential.d.ts.map +1 -0
- package/src/core/collection/array/randomizeArrayElementOrder.js +2 -2
- package/src/core/collection/map/HashMap.js +10 -10
- package/src/core/collection/map/ObservedMap.d.ts +7 -4
- package/src/core/collection/map/ObservedMap.d.ts.map +1 -1
- package/src/core/collection/map/ObservedMap.js +4 -1
- package/src/core/collection/queue/Deque.d.ts.map +1 -1
- package/src/core/collection/queue/Deque.js +82 -36
- package/src/core/geom/3d/aabb/aabb3_intersects_ray.js +10 -10
- package/src/core/graph/v2/Graph.d.ts.map +1 -1
- package/src/core/graph/v2/Graph.js +9 -0
- package/src/core/math/spline/computeNonuniformCaltmullRomSplineDerivative.d.ts +16 -0
- package/src/core/math/spline/computeNonuniformCaltmullRomSplineDerivative.d.ts.map +1 -0
- package/src/core/math/spline/computeNonuniformCaltmullRomSplineDerivative.js +90 -0
- package/src/core/parser/simple/ParserError.d.ts +11 -6
- package/src/core/parser/simple/ParserError.d.ts.map +1 -1
- package/src/core/parser/simple/ParserError.js +51 -4
- package/src/core/parser/simple/Token.d.ts.map +1 -1
- package/src/core/parser/simple/Token.js +8 -2
- package/src/core/parser/simple/TokenType.d.ts +1 -5
- package/src/core/parser/simple/TokenType.d.ts.map +1 -1
- package/src/core/parser/simple/TokenType.js +1 -1
- package/src/core/parser/simple/readBooleanToken.d.ts.map +1 -1
- package/src/core/parser/simple/readBooleanToken.js +6 -1
- package/src/core/parser/simple/readHexToken.d.ts.map +1 -1
- package/src/core/parser/simple/readHexToken.js +7 -2
- package/src/core/parser/simple/readIdentifierToken.d.ts.map +1 -1
- package/src/core/parser/simple/readIdentifierToken.js +6 -1
- package/src/core/parser/simple/readLiteralToken.d.ts.map +1 -1
- package/src/core/parser/simple/readLiteralToken.js +8 -3
- package/src/core/parser/simple/readNumberToken.d.ts.map +1 -1
- package/src/core/parser/simple/readNumberToken.js +7 -2
- package/src/core/parser/simple/readReferenceToken.d.ts.map +1 -1
- package/src/core/parser/simple/readReferenceToken.js +6 -1
- package/src/core/parser/simple/readStringToken.d.ts.map +1 -1
- package/src/core/parser/simple/readStringToken.js +6 -1
- package/src/core/parser/simple/readUnsignedIntegerToken.d.ts.map +1 -1
- package/src/core/parser/simple/readUnsignedIntegerToken.js +7 -2
- package/src/core/parser/simple/skipWhitespace.d.ts.map +1 -1
- package/src/core/parser/simple/skipWhitespace.js +8 -0
- package/src/core/primitives/strings/string_jaro_distance.d.ts +10 -0
- package/src/core/primitives/strings/string_jaro_distance.d.ts.map +1 -0
- package/src/core/primitives/strings/string_jaro_distance.js +127 -0
- package/src/core/primitives/strings/string_jaro_winkler.d.ts.map +1 -1
- package/src/core/primitives/strings/string_jaro_winkler.js +5 -105
- package/src/core/primitives/strings/string_repeat.d.ts +9 -0
- package/src/core/primitives/strings/string_repeat.d.ts.map +1 -0
- package/src/core/primitives/strings/string_repeat.js +26 -0
- package/src/engine/asset/AssetManager.d.ts.map +1 -1
- package/src/engine/development/performance/RingBufferMetric.d.ts.map +1 -1
- package/src/engine/development/performance/RingBufferMetric.js +5 -5
- package/src/engine/ecs/terrain/ecs/BuildLightTexture.d.ts.map +1 -1
- package/src/engine/ecs/terrain/ecs/BuildLightTexture.js +15 -22
- package/src/engine/graphics/ecs/camera/Camera.d.ts.map +1 -1
- package/src/engine/graphics/ecs/camera/Camera.js +23 -16
- package/src/engine/graphics/ecs/path/testPathDisplaySystem.js +142 -10
- package/src/engine/graphics/ecs/path/tube/build/TubePathBuilder.d.ts.map +1 -1
- package/src/engine/graphics/ecs/path/tube/build/TubePathBuilder.js +9 -9
- package/src/engine/graphics/ecs/path/tube/build/build_geometry_catmullrom.d.ts.map +1 -1
- package/src/engine/graphics/ecs/path/tube/build/build_geometry_catmullrom.js +173 -23
- package/src/engine/graphics/ecs/path/tube/prototypeAnimatedPathMask.js +16 -2
- package/src/engine/graphics/filter/ImageFilter.d.ts +2 -2
- package/src/engine/graphics/filter/ImageFilter.d.ts.map +1 -1
- package/src/engine/graphics/filter/ImageFilter.js +3 -3
- package/src/engine/graphics/render/RendererPool.d.ts +14 -1
- package/src/engine/graphics/render/RendererPool.d.ts.map +1 -1
- package/src/engine/graphics/render/RendererPool.js +43 -1
- package/src/engine/graphics/render/forward_plus/LightManager.js +2 -2
- package/src/engine/graphics/sh3/path_tracer/PathTracer.d.ts +2 -1
- package/src/engine/graphics/sh3/path_tracer/PathTracer.d.ts.map +1 -1
- package/src/engine/graphics/sh3/path_tracer/PathTracer.js +23 -50
- package/src/engine/graphics/sh3/path_tracer/getBiasedNormalSample.d.ts +9 -0
- package/src/engine/graphics/sh3/path_tracer/getBiasedNormalSample.d.ts.map +1 -1
- package/src/engine/graphics/sh3/path_tracer/getBiasedNormalSample.js +53 -3
- package/src/engine/graphics/sh3/path_tracer/prototypePathTracer.js +3 -3
- package/src/engine/graphics/texture/sampler/convertTexture2Sampler2D.d.ts +1 -1
- package/src/engine/graphics/texture/sampler/convertTexture2Sampler2D.d.ts.map +1 -1
- package/src/engine/graphics/texture/sampler/convertTexture2Sampler2D.js +42 -36
- package/src/engine/graphics/texture/sampler/debug/debug_draw_sampler.d.ts +3 -0
- package/src/engine/graphics/texture/sampler/debug/debug_draw_sampler.d.ts.map +1 -0
- package/src/engine/graphics/texture/sampler/debug/debug_draw_sampler.js +34 -0
- package/src/engine/graphics/texture/sampler/debug/debug_draw_sampler_grid.d.ts +10 -0
- package/src/engine/graphics/texture/sampler/debug/debug_draw_sampler_grid.d.ts.map +1 -0
- package/src/engine/graphics/texture/sampler/debug/debug_draw_sampler_grid.js +89 -0
- package/src/engine/graphics/texture/sampler/debug/prototypeSamplerFiltering.d.ts.map +1 -0
- package/src/engine/graphics/texture/sampler/{prototypeSamplerFiltering.js → debug/prototypeSamplerFiltering.js} +105 -113
- package/src/generation/grid/generation/GridTaskDensityMarkerDistribution.d.ts.map +1 -1
- package/src/generation/grid/generation/GridTaskDensityMarkerDistribution.js +8 -8
- package/src/generation/markers/GridActionRuleSet.d.ts.map +1 -1
- package/src/generation/markers/GridActionRuleSet.js +5 -5
- package/src/core/binary/byteArrayToString.d.ts +0 -9
- package/src/core/binary/byteArrayToString.d.ts.map +0 -1
- package/src/core/binary/byteArrayToString.js +0 -28
- package/src/core/collection/array/AbstractArrayIterator.d.ts.map +0 -1
- package/src/core/collection/array/ArrayIteratorRandom.d.ts.map +0 -1
- package/src/core/collection/array/ArrayIteratorSequential.d.ts.map +0 -1
- package/src/core/collection/array/arrayPickMinElement.d.ts +0 -8
- package/src/core/collection/array/arrayPickMinElement.d.ts.map +0 -1
- package/src/core/collection/array/arrayPickMinElement.js +0 -43
- package/src/core/collection/array/arraySwapElements.d.ts +0 -8
- package/src/core/collection/array/arraySwapElements.d.ts.map +0 -1
- package/src/core/collection/array/computeArrayMax.d.ts +0 -9
- package/src/core/collection/array/computeArrayMax.d.ts.map +0 -1
- package/src/core/collection/array/computeArrayMin.d.ts +0 -9
- package/src/core/collection/array/computeArrayMin.d.ts.map +0 -1
- package/src/engine/graphics/texture/sampler/prototypeSamplerFiltering.d.ts.map +0 -1
- /package/src/core/collection/array/{AbstractArrayIterator.d.ts → iterator/AbstractArrayIterator.d.ts} +0 -0
- /package/src/core/collection/array/{AbstractArrayIterator.js → iterator/AbstractArrayIterator.js} +0 -0
- /package/src/core/collection/array/{ArrayIteratorRandom.d.ts → iterator/ArrayIteratorRandom.d.ts} +0 -0
- /package/src/core/collection/array/{ArrayIteratorSequential.d.ts → iterator/ArrayIteratorSequential.d.ts} +0 -0
- /package/src/core/collection/array/{ArrayIteratorSequential.js → iterator/ArrayIteratorSequential.js} +0 -0
- /package/src/engine/graphics/texture/sampler/{prototypeSamplerFiltering.d.ts → debug/prototypeSamplerFiltering.d.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readIdentifierToken.d.ts","sourceRoot":"","sources":["../../../../../src/core/parser/simple/readIdentifierToken.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"readIdentifierToken.d.ts","sourceRoot":"","sources":["../../../../../src/core/parser/simple/readIdentifierToken.js"],"names":[],"mappings":"AAaA;;;;;;GAMG;AACH,0CALW,MAAM,UACN,MAAM,UACN,MAAM,SA8BhB;AAxCD;;;GAGG;AACH,uCAFU,MAAM,CAEqC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { assert } from "../../assert.js";
|
|
2
|
+
import DataType from "./DataType.js";
|
|
1
3
|
import ParserError from "./ParserError.js";
|
|
2
4
|
import Token from "./Token.js";
|
|
3
5
|
import TokenType from "./TokenType.js";
|
|
4
|
-
import DataType from "./DataType.js";
|
|
5
6
|
|
|
6
7
|
const RX_IDENTIFIER_CHAR = /^[a-zA-Z0-9_]/;
|
|
7
8
|
/**
|
|
@@ -18,6 +19,10 @@ export const RX_IDENTIFIER_FIRST_CHAR = /^[a-zA-Z_]/;
|
|
|
18
19
|
* @returns {Token}
|
|
19
20
|
*/
|
|
20
21
|
export function readIdentifierToken(text, cursor, length) {
|
|
22
|
+
assert.isString(text, 'text');
|
|
23
|
+
assert.isNonNegativeInteger(cursor, 'cursor');
|
|
24
|
+
assert.isNonNegativeInteger(length, 'length');
|
|
25
|
+
|
|
21
26
|
let i = cursor;
|
|
22
27
|
|
|
23
28
|
|
|
@@ -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":"AA2DA;;;;;;GAMG;AACH,uCALW,MAAM,UACN,MAAM,UACN,MAAM,SAmChB"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import Token from "./Token.js";
|
|
1
|
+
import { assert } from "../../assert.js";
|
|
3
2
|
import DataType from "./DataType.js";
|
|
4
3
|
import ParserError from "./ParserError.js";
|
|
5
4
|
import { readBooleanToken } from "./readBooleanToken.js";
|
|
6
|
-
import { readStringToken } from "./readStringToken.js";
|
|
7
5
|
import { readNumberToken } from "./readNumberToken.js";
|
|
6
|
+
import { readStringToken } from "./readStringToken.js";
|
|
7
|
+
import { skipWhitespace } from "./skipWhitespace.js";
|
|
8
|
+
import Token from "./Token.js";
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
*
|
|
@@ -64,6 +65,10 @@ function readArrayLiteral(text, cursor, length) {
|
|
|
64
65
|
* @returns {Token}
|
|
65
66
|
*/
|
|
66
67
|
function readLiteralToken(text, cursor, length) {
|
|
68
|
+
assert.isString(text, 'text');
|
|
69
|
+
assert.isNonNegativeInteger(cursor, 'cursor');
|
|
70
|
+
assert.isNonNegativeInteger(length, 'length');
|
|
71
|
+
|
|
67
72
|
const firstChar = text.charAt(cursor);
|
|
68
73
|
|
|
69
74
|
switch (firstChar) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readNumberToken.d.ts","sourceRoot":"","sources":["../../../../../src/core/parser/simple/readNumberToken.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"readNumberToken.d.ts","sourceRoot":"","sources":["../../../../../src/core/parser/simple/readNumberToken.js"],"names":[],"mappings":"AAQA;;;;;;GAMG;AACH,sCALW,MAAM,UACN,MAAM,UACN,MAAM,SAiEhB"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { assert } from "../../assert.js";
|
|
2
|
+
import DataType from "./DataType.js";
|
|
2
3
|
import { readHexToken } from "./readHexToken.js";
|
|
3
4
|
import { readUnsignedIntegerToken } from "./readUnsignedIntegerToken.js";
|
|
5
|
+
import { skipWhitespace } from "./skipWhitespace.js";
|
|
4
6
|
import Token from "./Token.js";
|
|
5
7
|
import TokenType from "./TokenType.js";
|
|
6
|
-
import DataType from "./DataType.js";
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
*
|
|
@@ -13,6 +14,10 @@ import DataType from "./DataType.js";
|
|
|
13
14
|
* @returns {Token}
|
|
14
15
|
*/
|
|
15
16
|
export function readNumberToken(text, cursor, length) {
|
|
17
|
+
assert.isString(text, 'text');
|
|
18
|
+
assert.isNonNegativeInteger(cursor, 'cursor');
|
|
19
|
+
assert.isNonNegativeInteger(length, 'length');
|
|
20
|
+
|
|
16
21
|
let i = cursor;
|
|
17
22
|
|
|
18
23
|
//read optional sign
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readReferenceToken.d.ts","sourceRoot":"","sources":["../../../../../src/core/parser/simple/readReferenceToken.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"readReferenceToken.d.ts","sourceRoot":"","sources":["../../../../../src/core/parser/simple/readReferenceToken.js"],"names":[],"mappings":"AAOA;;;;;;GAMG;AACH,yDAJW,MAAM,UACN,MAAM,SAuChB"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { assert } from "../../assert.js";
|
|
1
2
|
import DataType from "./DataType.js";
|
|
3
|
+
import { readIdentifierToken } from "./readIdentifierToken.js";
|
|
2
4
|
import Token from "./Token.js";
|
|
3
5
|
import TokenType from "./TokenType.js";
|
|
4
|
-
import { readIdentifierToken } from "./readIdentifierToken.js";
|
|
5
6
|
|
|
6
7
|
|
|
7
8
|
/**
|
|
@@ -12,6 +13,10 @@ import { readIdentifierToken } from "./readIdentifierToken.js";
|
|
|
12
13
|
* @returns {Token}
|
|
13
14
|
*/
|
|
14
15
|
export function readReferenceToken(text, cursor, length) {
|
|
16
|
+
assert.isString(text, 'text');
|
|
17
|
+
assert.isNonNegativeInteger(cursor, 'cursor');
|
|
18
|
+
assert.isNonNegativeInteger(length, 'length');
|
|
19
|
+
|
|
15
20
|
let i = cursor;
|
|
16
21
|
|
|
17
22
|
const identifiers = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readStringToken.d.ts","sourceRoot":"","sources":["../../../../../src/core/parser/simple/readStringToken.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"readStringToken.d.ts","sourceRoot":"","sources":["../../../../../src/core/parser/simple/readStringToken.js"],"names":[],"mappings":"AAsBA;;;;;;GAMG;AACH,sCALW,MAAM,UACN,MAAM,UACN,MAAM,SAwEhB"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { assert } from "../../assert.js";
|
|
2
|
+
import DataType from "./DataType.js";
|
|
1
3
|
import ParserError from "./ParserError.js";
|
|
2
4
|
import Token from "./Token.js";
|
|
3
5
|
import TokenType from "./TokenType.js";
|
|
4
|
-
import DataType from "./DataType.js";
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
*
|
|
@@ -27,6 +28,10 @@ function readQuote(text, cursor) {
|
|
|
27
28
|
* @returns {Token}
|
|
28
29
|
*/
|
|
29
30
|
export function readStringToken(text, cursor, length) {
|
|
31
|
+
assert.isString(text, 'text');
|
|
32
|
+
assert.isNonNegativeInteger(cursor, 'cursor');
|
|
33
|
+
assert.isNonNegativeInteger(length, 'length');
|
|
34
|
+
|
|
30
35
|
let i = cursor;
|
|
31
36
|
|
|
32
37
|
const openingQuote = readQuote(text, i);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readUnsignedIntegerToken.d.ts","sourceRoot":"","sources":["../../../../../src/core/parser/simple/readUnsignedIntegerToken.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"readUnsignedIntegerToken.d.ts","sourceRoot":"","sources":["../../../../../src/core/parser/simple/readUnsignedIntegerToken.js"],"names":[],"mappings":"AAKA;;;;;;GAMG;AACH,+CALW,MAAM,UACN,MAAM,UACN,MAAM,SA4DhB"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { assert } from "../../assert.js";
|
|
2
|
+
import DataType from "./DataType.js";
|
|
1
3
|
import ParserError from "./ParserError.js";
|
|
2
4
|
import Token from "./Token.js";
|
|
3
|
-
import DataType from "./DataType.js";
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
*
|
|
@@ -10,6 +11,10 @@ import DataType from "./DataType.js";
|
|
|
10
11
|
* @returns {Token}
|
|
11
12
|
*/
|
|
12
13
|
export function readUnsignedIntegerToken(text, cursor, length) {
|
|
14
|
+
assert.isString(text, 'text');
|
|
15
|
+
assert.isNonNegativeInteger(cursor, 'cursor');
|
|
16
|
+
assert.isNonNegativeInteger(length, 'length');
|
|
17
|
+
|
|
13
18
|
let i = cursor;
|
|
14
19
|
|
|
15
20
|
let value = 0;
|
|
@@ -61,6 +66,6 @@ export function readUnsignedIntegerToken(text, cursor, length) {
|
|
|
61
66
|
}
|
|
62
67
|
|
|
63
68
|
|
|
64
|
-
return new Token(value, cursor, i,
|
|
69
|
+
return new Token(value, cursor, i, "uint", DataType.Number);
|
|
65
70
|
}
|
|
66
71
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skipWhitespace.d.ts","sourceRoot":"","sources":["../../../../../src/core/parser/simple/skipWhitespace.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"skipWhitespace.d.ts","sourceRoot":"","sources":["../../../../../src/core/parser/simple/skipWhitespace.js"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,qCALW,MAAM,UACN,MAAM,UACN,MAAM,GACJ,MAAM,CAqBlB"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { assert } from "../../assert.js";
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
*
|
|
3
5
|
* @param {string} text
|
|
@@ -6,8 +8,13 @@
|
|
|
6
8
|
* @returns {number}
|
|
7
9
|
*/
|
|
8
10
|
export function skipWhitespace(text, cursor, length) {
|
|
11
|
+
assert.isString(text, 'text');
|
|
12
|
+
assert.isNonNegativeInteger(cursor, 'cursor');
|
|
13
|
+
assert.isNonNegativeInteger(length, 'length');
|
|
14
|
+
|
|
9
15
|
let i = cursor;
|
|
10
16
|
let char;
|
|
17
|
+
|
|
11
18
|
while (i < length) {
|
|
12
19
|
char = text.charAt(i);
|
|
13
20
|
|
|
@@ -17,5 +24,6 @@ export function skipWhitespace(text, cursor, length) {
|
|
|
17
24
|
break;
|
|
18
25
|
}
|
|
19
26
|
}
|
|
27
|
+
|
|
20
28
|
return i;
|
|
21
29
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Calculate Jaro distance between two strings, this is a measure of string similarity. Higher value means more similarity.
|
|
3
|
+
* @param {string} first
|
|
4
|
+
* @param {string} second
|
|
5
|
+
* @param {number} first_length
|
|
6
|
+
* @param {number} second_length
|
|
7
|
+
* @return {number}
|
|
8
|
+
*/
|
|
9
|
+
export function string_jaro_distance(first: string, second: string, first_length: number, second_length: number): number;
|
|
10
|
+
//# sourceMappingURL=string_jaro_distance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"string_jaro_distance.d.ts","sourceRoot":"","sources":["../../../../../src/core/primitives/strings/string_jaro_distance.js"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AACH,4CANW,MAAM,UACN,MAAM,gBACN,MAAM,iBACN,MAAM,GACL,MAAM,CAmBjB"}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { BitSet } from "../../binary/BitSet.js";
|
|
2
|
+
import { max2 } from "../../math/max2.js";
|
|
3
|
+
import { min2 } from "../../math/min2.js";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Calculate Jaro distance between two strings, this is a measure of string similarity. Higher value means more similarity.
|
|
7
|
+
* @param {string} first
|
|
8
|
+
* @param {string} second
|
|
9
|
+
* @param {number} first_length
|
|
10
|
+
* @param {number} second_length
|
|
11
|
+
* @return {number}
|
|
12
|
+
*/
|
|
13
|
+
export function string_jaro_distance(
|
|
14
|
+
first, second,
|
|
15
|
+
first_length, second_length
|
|
16
|
+
) {
|
|
17
|
+
|
|
18
|
+
const matches1 = BitSet.fixedSize(first_length);
|
|
19
|
+
const matches2 = BitSet.fixedSize(second_length);
|
|
20
|
+
|
|
21
|
+
const matches = getMatching(first, second, matches1, matches2);
|
|
22
|
+
|
|
23
|
+
if (matches <= 0) {
|
|
24
|
+
return 0;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const transpositions = getTranspositions(first, second, matches1, matches2);
|
|
28
|
+
return (matches / first_length + matches / second_length + (matches - transpositions) / matches) / 3;
|
|
29
|
+
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Find matching characters in both strings according to Jaro algorithm
|
|
34
|
+
* @param {string} a1
|
|
35
|
+
* @param {string} a2
|
|
36
|
+
* @param {BitSet} matches1
|
|
37
|
+
* @param {BitSet} matches2
|
|
38
|
+
* @return {number}
|
|
39
|
+
*/
|
|
40
|
+
function getMatching(a1, a2, matches1, matches2) {
|
|
41
|
+
const a1_length = a1.length;
|
|
42
|
+
const a2_length = a2.length;
|
|
43
|
+
|
|
44
|
+
// Window is modified to work with string of length 1
|
|
45
|
+
const matchWindow = max2(
|
|
46
|
+
0,
|
|
47
|
+
Math.floor(max2(a1_length, a2_length) * 0.5) - 1
|
|
48
|
+
);
|
|
49
|
+
|
|
50
|
+
let matches = 0;
|
|
51
|
+
|
|
52
|
+
// Loop to find matched characters:
|
|
53
|
+
for (let index1 = 0; index1 < a1_length; index1++) {
|
|
54
|
+
|
|
55
|
+
// Use the highest of the window diff and the min of the window and string 2 length:
|
|
56
|
+
const start = max2(0, index1 - matchWindow);
|
|
57
|
+
const end = min2(index1 + matchWindow + 1, a2_length);
|
|
58
|
+
|
|
59
|
+
// Iterate second string index:
|
|
60
|
+
for (let index2 = start; index2 < end; index2++) {
|
|
61
|
+
|
|
62
|
+
// If second string character already matched, skip:
|
|
63
|
+
if (matches2.get(index2)) {
|
|
64
|
+
continue;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// If the characters don't match, skip:
|
|
68
|
+
if (a1.charAt(index1) !== a2.charAt(index2)) {
|
|
69
|
+
continue;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// Assume match if the above 2 checks don't continue:
|
|
73
|
+
matches1.set(index1, true);
|
|
74
|
+
matches2.set(index2, true);
|
|
75
|
+
|
|
76
|
+
// Add matches by 1, break inner loop:
|
|
77
|
+
++matches;
|
|
78
|
+
break;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
return matches;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Calculate the number of transpositions between the two words
|
|
87
|
+
* @param {string} a1 The first string to compare
|
|
88
|
+
* @param {string} a2 The second string to compare
|
|
89
|
+
* @param {BitSet} matches1
|
|
90
|
+
* @param {BitSet} matches2
|
|
91
|
+
* @returns {number}
|
|
92
|
+
*/
|
|
93
|
+
function getTranspositions(
|
|
94
|
+
a1, a2,
|
|
95
|
+
matches1, matches2
|
|
96
|
+
) {
|
|
97
|
+
let transpositions = 0;
|
|
98
|
+
|
|
99
|
+
// Loop to find transpositions:
|
|
100
|
+
const a1_length = a1.length;
|
|
101
|
+
const a2_length = a2.length;
|
|
102
|
+
|
|
103
|
+
for (let i1 = 0, i2 = 0; i1 < a1_length; i1++) {
|
|
104
|
+
// If a non-matching character was found, skip:
|
|
105
|
+
if (matches1.get(i1) === false) {
|
|
106
|
+
continue;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// Move i2 index to the next match:
|
|
110
|
+
while (
|
|
111
|
+
i2 < a2_length
|
|
112
|
+
&& matches2.get(i2) === false
|
|
113
|
+
) {
|
|
114
|
+
i2++;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// If the characters don't match, increase transposition:
|
|
118
|
+
if (a1.charAt(i1) !== a2.charAt(i2)) {
|
|
119
|
+
transpositions++;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// Iterate i2 index normally:
|
|
123
|
+
i2++;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
return Math.floor(transpositions * 0.5);
|
|
127
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"string_jaro_winkler.d.ts","sourceRoot":"","sources":["../../../../../src/core/primitives/strings/string_jaro_winkler.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"string_jaro_winkler.d.ts","sourceRoot":"","sources":["../../../../../src/core/primitives/strings/string_jaro_winkler.js"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,2CAJW,MAAM,UACN,MAAM,GACJ,MAAM,CAwBlB"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { BitSet } from "../../binary/BitSet.js";
|
|
2
|
-
import { max2 } from "../../math/max2.js";
|
|
3
|
-
import { min2 } from "../../math/min2.js";
|
|
4
1
|
import { min3 } from "../../math/min3.js";
|
|
2
|
+
import { string_jaro_distance } from "./string_jaro_distance.js";
|
|
5
3
|
|
|
6
4
|
/**
|
|
7
5
|
* Calculate the Jaro-Winkler distance between two strings
|
|
@@ -18,19 +16,14 @@ export function string_jaro_winkler(first, second) {
|
|
|
18
16
|
return 1;
|
|
19
17
|
}
|
|
20
18
|
|
|
21
|
-
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
const matches = getMatching(first, second, matches1, matches2);
|
|
19
|
+
// Calculate the Jaro distance:
|
|
20
|
+
const similarity = string_jaro_distance(first, second, l1, l2);
|
|
25
21
|
|
|
26
|
-
if (
|
|
22
|
+
if (similarity === 0) {
|
|
23
|
+
// no similarity at all
|
|
27
24
|
return 0;
|
|
28
25
|
}
|
|
29
26
|
|
|
30
|
-
// Calculate the Jaro distance:
|
|
31
|
-
const transpositions = getTranspositions(first, second, matches1, matches2);
|
|
32
|
-
const similarity = (matches / l1 + matches / l2 + (matches - transpositions) / matches) / 3;
|
|
33
|
-
|
|
34
27
|
// Transform to Jaro-Winkler:
|
|
35
28
|
// Prefix scale gives more favorable ratings to strings that share common prefixes:
|
|
36
29
|
const prefix_scale = 0.1;
|
|
@@ -38,99 +31,6 @@ export function string_jaro_winkler(first, second) {
|
|
|
38
31
|
return similarity + prefix * prefix_scale * (1 - similarity);
|
|
39
32
|
}
|
|
40
33
|
|
|
41
|
-
/**
|
|
42
|
-
* Find matching characters in both strings according to Jaro algorithm
|
|
43
|
-
* @param {string} a1
|
|
44
|
-
* @param {string} a2
|
|
45
|
-
* @param {BitSet} matches1
|
|
46
|
-
* @param {BitSet} matches2
|
|
47
|
-
* @return {number}
|
|
48
|
-
*/
|
|
49
|
-
function getMatching(a1, a2, matches1, matches2) {
|
|
50
|
-
const a1_length = a1.length;
|
|
51
|
-
const a2_length = a2.length;
|
|
52
|
-
|
|
53
|
-
// Window is modified to work with string of length 1
|
|
54
|
-
const matchWindow = max2(
|
|
55
|
-
0,
|
|
56
|
-
Math.floor(max2(a1_length, a2_length) * 0.5) - 1
|
|
57
|
-
);
|
|
58
|
-
|
|
59
|
-
let matches = 0;
|
|
60
|
-
|
|
61
|
-
// Loop to find matched characters:
|
|
62
|
-
for (let index1 = 0; index1 < a1_length; index1++) {
|
|
63
|
-
|
|
64
|
-
// Use the highest of the window diff and the min of the window and string 2 length:
|
|
65
|
-
const start = max2(0, index1 - matchWindow);
|
|
66
|
-
const end = min2(index1 + matchWindow + 1, a2_length);
|
|
67
|
-
|
|
68
|
-
// Iterate second string index:
|
|
69
|
-
for (let index2 = start; index2 < end; index2++) {
|
|
70
|
-
|
|
71
|
-
// If second string character already matched, skip:
|
|
72
|
-
if (matches2.get(index2)) {
|
|
73
|
-
continue;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
// If the characters don't match, skip:
|
|
77
|
-
if (a1.charAt(index1) !== a2.charAt(index2)) {
|
|
78
|
-
continue;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
// Assume match if the above 2 checks don't continue:
|
|
82
|
-
matches1.set(index1, true);
|
|
83
|
-
matches2.set(index2, true);
|
|
84
|
-
|
|
85
|
-
// Add matches by 1, break inner loop:
|
|
86
|
-
++matches;
|
|
87
|
-
break;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
return matches;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* Calculate the number of transpositions between the two words
|
|
96
|
-
* @param {string} a1 The first string to compare
|
|
97
|
-
* @param {string} a2 The second string to compare
|
|
98
|
-
* @param {BitSet} matches1
|
|
99
|
-
* @param {BitSet} matches2
|
|
100
|
-
*/
|
|
101
|
-
function getTranspositions(a1, a2, matches1, matches2) {
|
|
102
|
-
let transpositions = 0;
|
|
103
|
-
|
|
104
|
-
// Loop to find transpositions:
|
|
105
|
-
const a1_length = a1.length;
|
|
106
|
-
const a2_length = a2.length;
|
|
107
|
-
|
|
108
|
-
for (let i1 = 0, i2 = 0; i1 < a1_length; i1++) {
|
|
109
|
-
// If a non-matching character was found, skip:
|
|
110
|
-
if (matches1.get(i1) === false) {
|
|
111
|
-
continue;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
// Move i2 index to the next match:
|
|
115
|
-
while (
|
|
116
|
-
i2 < a2_length
|
|
117
|
-
&& matches2.get(i2) === false
|
|
118
|
-
) {
|
|
119
|
-
i2++;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
// If the characters don't match, increase transposition:
|
|
123
|
-
if (a1.charAt(i1) !== a2.charAt(i2)) {
|
|
124
|
-
transpositions++;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
// Iterate i2 index normally:
|
|
128
|
-
i2++;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
return Math.floor(transpositions * 0.5);
|
|
132
|
-
}
|
|
133
|
-
|
|
134
34
|
/**
|
|
135
35
|
* Counts the number of common characters at the beginning
|
|
136
36
|
* of each word up to a maximum of 4
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Repeat a given piece of text a {@link count} times
|
|
3
|
+
* @example "ABC_" repeated 2 times results in "ABC_ABC_"
|
|
4
|
+
* @param {string} what
|
|
5
|
+
* @param {number} count
|
|
6
|
+
* @return {string}
|
|
7
|
+
*/
|
|
8
|
+
export function string_repeat(what: string, count: number): string;
|
|
9
|
+
//# sourceMappingURL=string_repeat.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"string_repeat.d.ts","sourceRoot":"","sources":["../../../../../src/core/primitives/strings/string_repeat.js"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,oCAJW,MAAM,SACN,MAAM,GACL,MAAM,CAkBjB"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { assert } from "../../assert.js";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Repeat a given piece of text a {@link count} times
|
|
5
|
+
* @example "ABC_" repeated 2 times results in "ABC_ABC_"
|
|
6
|
+
* @param {string} what
|
|
7
|
+
* @param {number} count
|
|
8
|
+
* @return {string}
|
|
9
|
+
*/
|
|
10
|
+
export function string_repeat(what, count) {
|
|
11
|
+
assert.isString(what, 'what');
|
|
12
|
+
assert.isNonNegativeInteger(count, 'count');
|
|
13
|
+
|
|
14
|
+
if (count <= 0) {
|
|
15
|
+
// special case
|
|
16
|
+
return "";
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
let out = what;
|
|
20
|
+
|
|
21
|
+
for (let i = 1; i < count; i++) {
|
|
22
|
+
out += what;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return out;
|
|
26
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssetManager.d.ts","sourceRoot":"","sources":["../../../../src/engine/asset/AssetManager.js"],"names":[],"mappings":"AAiDA;;;;GAIG;AACH;IAgII;;;;;OAKG;IACH,oCAJW,GAAG,EAYb;IA7ID;;;;OAIG;IACH,eAEG;IAEH;;;OAGG;IACH,
|
|
1
|
+
{"version":3,"file":"AssetManager.d.ts","sourceRoot":"","sources":["../../../../src/engine/asset/AssetManager.js"],"names":[],"mappings":"AAiDA;;;;GAIG;AACH;IAgII;;;;;OAKG;IACH,oCAJW,GAAG,EAYb;IA7ID;;;;OAIG;IACH,eAEG;IAEH;;;OAGG;IACH,aAFU,YAAY,gBAAgB,EAAE,YAAY,CAAC,CAER;IAe7C;;;;;;OAMG;IACH,kBAFU,MAAM,CAEY;IAyB5B;;;;OAIG;IACH,iBAAc;IAEd;;;OAGG;IACH,mBAFU,iBAAiB,CAEiB;IAwE5C,gBAQC;IAED;;;;OAIG;IACH,qBAHW,MAAM,GACL,QAAQ,IAAI,CAAC,CAexB;IAED;;;;;OAKG;IACH,oCAFa,OAAO,CAOnB;IAED;;OAEG;IACH,cAEC;IAED,8BAEC;IAED;;;;;;OAMG;IACH,4DAJW,iBAAiB,GAEf,cAAc,CAY1B;IAED;;;;;;;;;OASG;IACH,qFAsCC;IAED;;;;;OAKG;IACH,aAJW,MAAM,QACN,MAAM,sBAehB;IAsQD;;;;;OAKG;IACH,sBA2BC;IAGD;;;;OAIG;IACH,uBAHW,MAAM,GACL,OAAO,CAIlB;IAED;;;;OAIG;IACH,sBAHW,MAAM,GACJ,wBAAY,SAAS,CAMjC;IAaD;;;;OAIG;IACH,+BAHW,MAAM,4CAqBhB;IAED;;;;OAIG;IACH,iCAHW,MAAM,+CAyBhB;IAED;;;;;OAKG;IACH,0BAJW,MAAM,iEAwChB;IAED;;;OAGG;IACH,uBAFW,MAAM,iBAkBhB;IAED;;;;;;OAMG;IACH,yCAFa,aAAS,IAAI,CAYzB;IAED;;;;;OAKG;IACH,eAJW,MAAM,QACN,MAAM,GACJ,OAAO,CAMnB;IAED;;;;OAIG;IACH,2BAHW,MAAM,GACL,mBAAiB,CAa5B;IAED;;;;OAIG;IACH,oBAHW,MAAM,GACL,gBAAgB,GAAC,SAAS,CAQrC;IAED;;;;;OAKG;IACH,mBAJW,MAAM,QACN,MAAM,QACN,MAAM,QAUhB;IAGL;;;OAGG;IACH,yBAFU,OAAO,CAEoB;;CANpC;4BAv1B2B,0CAA0C;iCAOrC,uBAAuB;6BAM3B,mBAAmB;kCAFd,6BAA6B;kCAD7B,wBAAwB;4BAE9B,0BAA0B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RingBufferMetric.d.ts","sourceRoot":"","sources":["../../../../../src/engine/development/performance/RingBufferMetric.js"],"names":[],"mappings":"AAOA;IACI,2BAUC;IAPG;;;;;OAKG;IACH,wBAAkC;IAGtC;;;OAGG;IACH,aAFW,MAAM,QAIhB;IAED,mBAEC;IAED,yBAEC;CAsCJ;+
|
|
1
|
+
{"version":3,"file":"RingBufferMetric.d.ts","sourceRoot":"","sources":["../../../../../src/engine/development/performance/RingBufferMetric.js"],"names":[],"mappings":"AAOA;IACI,2BAUC;IAPG;;;;;OAKG;IACH,wBAAkC;IAGtC;;;OAGG;IACH,aAFW,MAAM,QAIhB;IAED,mBAEC;IAED,yBAEC;CAsCJ;+BAnE8B,qBAAqB"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { array_compute_max } from "../../../core/collection/array/array_compute_max.js";
|
|
2
|
+
import { array_compute_min } from "../../../core/collection/array/array_compute_min.js";
|
|
2
3
|
import { RingBuffer } from "../../../core/collection/RingBuffer.js";
|
|
3
4
|
import { computeStatisticalMean } from "../../../core/math/statistics/computeStatisticalMean.js";
|
|
4
5
|
import { computeStatisticalPartialMedian } from "../../../core/math/statistics/computeStatisticalPartialMedian.js";
|
|
5
|
-
import {
|
|
6
|
-
import { computeArrayMin } from "../../../core/collection/array/computeArrayMin.js";
|
|
6
|
+
import { AbstractMetric } from "./AbstractMetric.js";
|
|
7
7
|
|
|
8
8
|
export class RingBufferMetric extends AbstractMetric {
|
|
9
9
|
constructor(size = 100) {
|
|
@@ -59,8 +59,8 @@ export class RingBufferMetric extends AbstractMetric {
|
|
|
59
59
|
|
|
60
60
|
result.mean = computeStatisticalMean(array, 0, data_count);
|
|
61
61
|
result.median = computeStatisticalPartialMedian(array, 0, data_count - 1);
|
|
62
|
-
result.max =
|
|
63
|
-
result.min =
|
|
62
|
+
result.max = array_compute_max(array, 0, data_count);
|
|
63
|
+
result.min = array_compute_min(array, 0, data_count);
|
|
64
64
|
|
|
65
65
|
return true;
|
|
66
66
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BuildLightTexture.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/ecs/terrain/ecs/BuildLightTexture.js"],"names":[],"mappings":"AAmEA;;;;;;;;GAQG;AACH,gGAPW,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"BuildLightTexture.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/ecs/terrain/ecs/BuildLightTexture.js"],"names":[],"mappings":"AAmEA;;;;;;;;GAQG;AACH,gGAPW,MAAM,WAAW,gBA6B3B"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import normalMap2AOMap from "../../grid/NormalMap2AOMap.js";
|
|
2
|
-
import heightMap2NormalMap from "../../grid/HeightMap2NormalMap.js";
|
|
3
|
-
import { WebGLRendererPool } from "../../../graphics/render/RendererPool.js";
|
|
4
1
|
import Vector2 from "../../../../core/geom/Vector2.js";
|
|
2
|
+
import { WebGLRendererPool } from "../../../graphics/render/RendererPool.js";
|
|
5
3
|
import { writeSample2DDataToDataTexture } from "../../../graphics/texture/sampler/writeSampler2DDataToDataTexture.js";
|
|
4
|
+
import heightMap2NormalMap from "../../grid/HeightMap2NormalMap.js";
|
|
5
|
+
import normalMap2AOMap from "../../grid/NormalMap2AOMap.js";
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
*
|
|
@@ -77,30 +77,23 @@ function promiseSamplerAO(
|
|
|
77
77
|
export function buildLightTexture({
|
|
78
78
|
texture,
|
|
79
79
|
heightSampler,
|
|
80
|
-
resolution= new Vector2(texture.image.width, texture.image.height),
|
|
80
|
+
resolution = new Vector2(texture.image.width, texture.image.height),
|
|
81
81
|
rayLength = 11,
|
|
82
82
|
worldSize = resolution
|
|
83
83
|
}) {
|
|
84
84
|
|
|
85
|
-
|
|
85
|
+
return WebGLRendererPool.global.useAsync(async renderer => {
|
|
86
|
+
const normal = promiseSamplerNormal(renderer, heightSampler);
|
|
86
87
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
});
|
|
88
|
+
const ao = await promiseSamplerAO({
|
|
89
|
+
renderer: renderer,
|
|
90
|
+
pSamplerNormal: normal,
|
|
91
|
+
samplerHeight: heightSampler,
|
|
92
|
+
resolution: resolution,
|
|
93
|
+
rayLength: rayLength,
|
|
94
|
+
worldSize
|
|
95
|
+
});
|
|
96
96
|
|
|
97
|
-
|
|
98
|
-
writeSample2DDataToDataTexture(sampler, texture);
|
|
97
|
+
writeSample2DDataToDataTexture(ao, texture);
|
|
99
98
|
});
|
|
100
|
-
|
|
101
|
-
Promise.all([normal, ao]).finally(() => {
|
|
102
|
-
WebGLRendererPool.global.release(renderer);
|
|
103
|
-
});
|
|
104
|
-
|
|
105
|
-
return promise;
|
|
106
99
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Camera.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/ecs/camera/Camera.js"],"names":[],"mappings":"AAkBA;;GAEG;AACH;IA4II;;;;;;;OAOG;IACH,0BANW,MAAM,GAAC,MAAM,iBAAiB,GAAC,MAAM,kBAAkB,KACvD,MAAM,KACN,MAAM,
|
|
1
|
+
{"version":3,"file":"Camera.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/ecs/camera/Camera.js"],"names":[],"mappings":"AAkBA;;GAEG;AACH;IA4II;;;;;;;OAOG;IACH,0BANW,MAAM,GAAC,MAAM,iBAAiB,GAAC,MAAM,kBAAkB,KACvD,MAAM,KACN,MAAM,cACN,OAAO,iBACP,OAAO,QA+CjB;IA/LG;;;OAGG;IACH,UAFU,OAAO,CAEI;IAErB;;;OAGG;IACH,oBAFU,MAAM,CAEc;IAE9B,YAAkB;IAElB;;;OAGG;IACH,KAFU,OAAO,CAES;IAE1B;;;OAGG;IACH,gBAFU,aAAa,cAAc,CAAC,CAE4C;IAElF;;;OAGG;IACH,QAFU,eAAe,CAEc;IAEvC;;;;OAIG;IACH,mBAAqB;IAErB;;;;OAIG;IACH,oBAAsB;IAG1B;;;;OAIG;IACH,mEAEC;IAMD,0BAMC;IAVD,uBAEC;IAcD,2BAMC;IAVD,wBAEC;IAUD,uBAaC;IAED,2DAEC;IAED;;;OAGG;IACH,YAFW,MAAM,QAMhB;IAED;;;OAGG;IACH,SAFa,MAAM,CAQlB;IAED;;;MAKC;IAED,0BAQC;IAyDD;;;OAGG;IACH,kDAUC;IAED;;;;;;;;;;OAUG;IACH,0BATW,OAAO,YACP,MAAM,YACN,MAAM,YACN,MAAM,eACN,MAAM,eACN,MAAM,eACN,MAAM,eACN,MAAM,QAyBhB;IAED;;;;;;OAMG;IACH,kCALW,MAAM,KACN,MAAM,KACN,MAAM,UACN,OAAO,QAqBjB;CACJ;;;;;oBA9RmB,kCAAkC;yBAG7B,wCAAwC;+BAGlC,qBAAqB;4BAJxB,2CAA2C;oBADnD,kCAAkC"}
|