@woosh/meep-engine 2.118.9 → 2.118.12
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 +209 -266
- package/build/meep.min.js +1 -1
- package/build/meep.module.js +209 -266
- package/editor/ecs/component/editors/Sampler2DEditor.js +2 -4
- package/package.json +1 -1
- package/samples/terrain/editor.js +3 -3
- package/src/core/bvh2/binary/2/BinaryUint32BVH.d.ts +1 -19
- package/src/core/bvh2/binary/2/BinaryUint32BVH.d.ts.map +1 -1
- package/src/core/bvh2/binary/2/BinaryUint32BVH.js +10 -78
- package/src/core/bvh2/bvh3/build_triangle_morton_codes.js +1 -1
- package/src/core/bvh2/bvh3/ebvh_build_for_geometry_morton.d.ts.map +1 -1
- package/src/core/bvh2/bvh3/ebvh_build_for_geometry_morton.js +13 -11
- package/src/core/collection/array/isArrayEqualStrict.d.ts.map +1 -1
- package/src/core/collection/array/isArrayEqualStrict.js +2 -2
- package/src/core/collection/array/iterator/ArrayIteratorSequential.d.ts.map +1 -1
- package/src/core/collection/array/iterator/ArrayIteratorSequential.js +3 -4
- package/src/core/collection/array/typed/array_buffer_copy.js +2 -2
- package/src/core/collection/array/typed/typed_array_copy.d.ts.map +1 -1
- package/src/core/collection/array/typed/typed_array_copy.js +16 -0
- package/src/core/collection/queue/Deque.d.ts.map +1 -1
- package/src/core/collection/queue/Deque.js +1 -1
- package/src/core/geom/3d/aabb/AABB3.d.ts.map +1 -1
- package/src/core/geom/3d/aabb/AABB3.js +0 -8
- package/src/core/geom/3d/aabb/aabb3_compute_surface_area.js +1 -3
- package/src/core/geom/3d/morton/{Morton.d.ts → v3_morton_encode.d.ts} +1 -1
- package/src/core/geom/3d/morton/v3_morton_encode.d.ts.map +1 -0
- package/src/core/geom/3d/morton/v3_morton_encode_bounded.js +2 -2
- package/src/core/geom/3d/morton/v3_morton_encode_transformed.js +2 -2
- package/src/core/geom/Quaternion.d.ts.map +1 -1
- package/src/core/geom/Quaternion.js +7 -10
- package/src/core/geom/Vector3.d.ts.map +1 -1
- package/src/core/geom/Vector3.js +4 -49
- package/src/core/math/sinc.d.ts +8 -0
- package/src/core/math/sinc.d.ts.map +1 -0
- package/src/core/math/sinc.js +13 -0
- package/src/core/process/worker/WorkerProxy.d.ts +12 -3
- package/src/core/process/worker/WorkerProxy.d.ts.map +1 -1
- package/src/core/process/worker/WorkerProxy.js +10 -1
- package/src/engine/ecs/terrain/BufferedGeometryArraysBuilder.d.ts +2 -17
- package/src/engine/ecs/terrain/BufferedGeometryArraysBuilder.d.ts.map +1 -1
- package/src/engine/ecs/terrain/BufferedGeometryArraysBuilder.js +2 -118
- package/src/engine/ecs/terrain/ecs/cling/ClingToTerrain.d.ts +0 -1
- package/src/engine/ecs/terrain/ecs/cling/ClingToTerrain.d.ts.map +1 -1
- package/src/engine/ecs/terrain/ecs/cling/ClingToTerrain.js +1 -6
- package/src/engine/ecs/terrain/ecs/cling/ClingToTerrainSystem.d.ts +5 -5
- package/src/engine/ecs/terrain/ecs/cling/ClingToTerrainSystem.d.ts.map +1 -1
- package/src/engine/ecs/terrain/ecs/cling/ClingToTerrainSystem.js +20 -28
- package/src/engine/ecs/terrain/ecs/layers/TerrainLayer.d.ts.map +1 -1
- package/src/engine/ecs/terrain/ecs/layers/TerrainLayer.js +2 -2
- package/src/engine/ecs/terrain/tiles/TerrainTile.d.ts.map +1 -1
- package/src/engine/ecs/terrain/tiles/TerrainTile.js +3 -1
- package/src/engine/graphics/geometry/MikkT/MikkTSpace.d.ts +1 -1
- package/src/engine/graphics/geometry/MikkT/MikkTSpace.js +12 -12
- package/src/engine/graphics/geometry/MikkT/STSpace.d.ts.map +1 -1
- package/src/engine/graphics/geometry/MikkT/STSpace.js +14 -16
- package/src/engine/graphics/geometry/buffered/build_height_field_geometry.d.ts +17 -0
- package/src/engine/graphics/geometry/buffered/build_height_field_geometry.d.ts.map +1 -0
- package/src/engine/graphics/geometry/buffered/build_height_field_geometry.js +118 -0
- package/src/engine/graphics/geometry/buffered/geometry_compute_vertex_normals_indexed.d.ts +2 -2
- package/src/engine/graphics/geometry/buffered/geometry_compute_vertex_normals_indexed.d.ts.map +1 -1
- package/src/engine/graphics/geometry/buffered/geometry_compute_vertex_normals_indexed.js +1 -1
- package/src/engine/graphics/geometry/optimization/VertexCacheOptimizer.d.ts.map +1 -1
- package/src/engine/graphics/geometry/optimization/VertexCacheOptimizer.js +36 -22
- package/src/engine/graphics/material/optimization/MaterialOptimizationContext.d.ts.map +1 -1
- package/src/engine/graphics/material/optimization/MaterialOptimizationContext.js +2 -2
- package/src/engine/graphics/render/forward_plus/materials/FPlusDebugMaterial.js +3 -3
- package/src/engine/graphics/texture/sampler/Sampler2D.d.ts.map +1 -1
- package/src/engine/graphics/texture/sampler/Sampler2D.js +31 -52
- package/src/engine/graphics/texture/sampler/sampler2d_to_texture.d.ts +10 -0
- package/src/engine/graphics/texture/sampler/sampler2d_to_texture.d.ts.map +1 -0
- package/src/engine/graphics/texture/sampler/{Sampler2D2Texture.js → sampler2d_to_texture.js} +5 -5
- package/src/engine/graphics/texture/sampler/{copy_Sampler2D_channel_data.d.ts → sampler2d_transfer_data.d.ts} +2 -2
- package/src/engine/graphics/texture/sampler/sampler2d_transfer_data.d.ts.map +1 -0
- package/src/engine/graphics/texture/sampler/{copy_Sampler2D_channel_data.js → sampler2d_transfer_data.js} +1 -1
- package/src/engine/graphics/texture/sampler/writeSampler2DDataToDataTexture.js +2 -2
- package/src/engine/graphics/trail/x/simulator/RibbonXFixedPhysicsSimulator.d.ts.map +1 -1
- package/src/engine/graphics/trail/x/simulator/RibbonXFixedPhysicsSimulator.js +0 -3
- package/src/engine/intelligence/behavior/selector/WeightedElement.d.ts +6 -3
- package/src/engine/intelligence/behavior/selector/WeightedElement.d.ts.map +1 -1
- package/src/engine/intelligence/behavior/selector/WeightedElement.js +9 -12
- package/src/engine/intelligence/behavior/selector/WeightedRandomBehavior.d.ts +1 -1
- package/src/engine/intelligence/behavior/selector/WeightedRandomBehavior.d.ts.map +1 -1
- package/src/engine/intelligence/behavior/selector/WeightedRandomBehavior.js +20 -23
- package/src/engine/intelligence/mcts/StateNode.d.ts.map +1 -1
- package/src/engine/intelligence/mcts/StateNode.js +76 -102
- package/src/engine/logging/Logger.d.ts.map +1 -1
- package/src/engine/logging/Logger.js +7 -9
- package/src/engine/logging/LoggerBackend.d.ts.map +1 -1
- package/src/engine/logging/LoggerBackend.js +7 -7
- package/src/core/geom/3d/morton/Morton.d.ts.map +0 -1
- package/src/engine/graphics/geometry/MikkT/m_getNumVerticesOfFace.d.ts +0 -9
- package/src/engine/graphics/geometry/MikkT/m_getNumVerticesOfFace.d.ts.map +0 -1
- package/src/engine/graphics/geometry/MikkT/m_getNumVerticesOfFace.js +0 -11
- package/src/engine/graphics/geometry/MikkT/m_getPosition.d.ts +0 -14
- package/src/engine/graphics/geometry/MikkT/m_getPosition.d.ts.map +0 -1
- package/src/engine/graphics/geometry/MikkT/m_getPosition.js +0 -20
- package/src/engine/graphics/geometry/MikkT/m_setTSpaceBasic.d.ts +0 -21
- package/src/engine/graphics/geometry/MikkT/m_setTSpaceBasic.d.ts.map +0 -1
- package/src/engine/graphics/geometry/MikkT/m_setTSpaceBasic.js +0 -22
- package/src/engine/graphics/texture/sampler/Sampler2D2Texture.d.ts +0 -10
- package/src/engine/graphics/texture/sampler/Sampler2D2Texture.d.ts.map +0 -1
- package/src/engine/graphics/texture/sampler/copy_Sampler2D_channel_data.d.ts.map +0 -1
- /package/src/core/geom/3d/morton/{Morton.js → v3_morton_encode.js} +0 -0
|
@@ -1,17 +1,20 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @template T
|
|
3
|
+
*/
|
|
4
|
+
export class WeightedElement<T> {
|
|
2
5
|
/**
|
|
3
6
|
* @template T
|
|
4
7
|
* @param {T} element
|
|
5
8
|
* @param {number} weight
|
|
6
9
|
* @returns {WeightedElement<T>}
|
|
7
10
|
*/
|
|
8
|
-
static from<T_1>(element: T_1, weight: number):
|
|
11
|
+
static from<T_1>(element: T_1, weight: number): WeightedElement<T_1>;
|
|
9
12
|
/**
|
|
10
13
|
* @template X
|
|
11
14
|
* @param {WeightedElement<X>} object
|
|
12
15
|
* @return {number}
|
|
13
16
|
*/
|
|
14
|
-
static getWeight<X>(object:
|
|
17
|
+
static getWeight<X>(object: WeightedElement<X>): number;
|
|
15
18
|
weight: number;
|
|
16
19
|
/**
|
|
17
20
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WeightedElement.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/intelligence/behavior/selector/WeightedElement.js"],"names":[],"mappings":"AAMA;
|
|
1
|
+
{"version":3,"file":"WeightedElement.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/intelligence/behavior/selector/WeightedElement.js"],"names":[],"mappings":"AAMA;;GAEG;AACH;IAWI;;;;;OAKG;IACH,uCAHW,MAAM,wBAYhB;IAED;;;;OAIG;IACH,iDAFY,MAAM,CAIjB;IAhCD,eAAW;IAEX;;;OAGG;IACH,MAFU,CAAC,CAEC;IA4BZ;;;;OAIG;IACH,cAHW,CAAC,GACA,OAAO,CAKlB;IAED;;;OAGG;IACH,QAFY,MAAM,CAOjB;IAGL;;;OAGG;IACH,4BAFU,OAAO,CAE0B;CAN1C"}
|
|
@@ -4,22 +4,19 @@ import { invokeObjectEquals } from "../../../../core/model/object/invokeObjectEq
|
|
|
4
4
|
import { invokeObjectHash } from "../../../../core/model/object/invokeObjectHash.js";
|
|
5
5
|
import { computeHashFloat } from "../../../../core/primitives/numbers/computeHashFloat.js";
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* @template T
|
|
9
|
+
*/
|
|
7
10
|
export class WeightedElement {
|
|
8
11
|
|
|
9
|
-
/**
|
|
10
|
-
* @template T
|
|
11
|
-
*/
|
|
12
|
-
constructor() {
|
|
13
|
-
|
|
14
|
-
this.weight = 1;
|
|
15
12
|
|
|
16
|
-
|
|
17
|
-
*
|
|
18
|
-
* @type {T}
|
|
19
|
-
*/
|
|
20
|
-
this.data = null;
|
|
13
|
+
weight = 1;
|
|
21
14
|
|
|
22
|
-
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
* @type {T}
|
|
18
|
+
*/
|
|
19
|
+
data = null;
|
|
23
20
|
|
|
24
21
|
/**
|
|
25
22
|
* @template T
|
|
@@ -38,7 +38,7 @@ export class WeightedRandomBehavior extends Behavior<any> {
|
|
|
38
38
|
*
|
|
39
39
|
* @param {WeightedElement<Behavior>} e
|
|
40
40
|
*/
|
|
41
|
-
addElement(e: any): void;
|
|
41
|
+
addElement(e: WeightedElement<Behavior<any>>): void;
|
|
42
42
|
__select(): void;
|
|
43
43
|
initialize(context: any): void;
|
|
44
44
|
tick(timeDelta: any): import("../BehaviorStatus.js").BehaviorStatus;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WeightedRandomBehavior.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/intelligence/behavior/selector/WeightedRandomBehavior.js"],"names":[],"mappings":"AAMA;
|
|
1
|
+
{"version":3,"file":"WeightedRandomBehavior.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/intelligence/behavior/selector/WeightedRandomBehavior.js"],"names":[],"mappings":"AAMA;IA0DI;;;;OAIG;IACH,sBAHW,8BAAyB,EAAE,GACzB,sBAAsB,CAQlC;;IAnED;;;;OAIG;IACH,mBAAgB;IAEhB;;;;OAIG;IACH,iBAA+B;IAE/B;;;;OAIG;IACH,mBAAuB;IAEvB;;;OAGG;IACH,iBAFW,MAAM,QAIhB;IAED;;;OAGG;IACH,sBAFW,8BAAyB,EAAE,QAMrC;IAED;;;OAGG;IACH,cAFW,8BAAyB,QAanC;IAeD,iBAQC;IAED,+BAMC;IAUD,oEAEC;CACJ;yBAvGwB,gBAAgB;gCACT,sBAAsB"}
|
|
@@ -1,34 +1,31 @@
|
|
|
1
|
+
import { assert } from "../../../../core/assert.js";
|
|
2
|
+
import { weightedRandomFromArray } from "../../../../core/collection/array/weightedRandomFromArray.js";
|
|
1
3
|
import { seededRandom } from "../../../../core/math/random/seededRandom.js";
|
|
2
4
|
import { Behavior } from "../Behavior.js";
|
|
3
|
-
import { weightedRandomFromArray } from "../../../../core/collection/array/weightedRandomFromArray.js";
|
|
4
5
|
import { WeightedElement } from "./WeightedElement.js";
|
|
5
|
-
import { assert } from "../../../../core/assert.js";
|
|
6
6
|
|
|
7
7
|
export class WeightedRandomBehavior extends Behavior {
|
|
8
|
-
constructor() {
|
|
9
|
-
super();
|
|
10
8
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
9
|
+
/**
|
|
10
|
+
*
|
|
11
|
+
* @type {WeightedElement<Behavior>[]} elements
|
|
12
|
+
* @private
|
|
13
|
+
*/
|
|
14
|
+
__elements = [];
|
|
17
15
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @type {function(): number}
|
|
19
|
+
* @private
|
|
20
|
+
*/
|
|
21
|
+
__random = seededRandom(91512);
|
|
24
22
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @type {Behavior|undefined}
|
|
26
|
+
* @private
|
|
27
|
+
*/
|
|
28
|
+
__selected = undefined;
|
|
32
29
|
|
|
33
30
|
/**
|
|
34
31
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StateNode.d.ts","sourceRoot":"","sources":["../../../../../src/engine/intelligence/mcts/StateNode.js"],"names":[],"mappings":"wBAKU,MAAM;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"StateNode.d.ts","sourceRoot":"","sources":["../../../../../src/engine/intelligence/mcts/StateNode.js"],"names":[],"mappings":"wBAKU,MAAM;;;;;;;;;AAyDhB;;GAEG;AACH;IAEI;;;OAGG;IACH,OAFU,MAAM,CAEN;IAEV;;;OAGG;IACH,MAFU,MAAM,CAEP;IAET;;;OAGG;IACH,QAFU,MAAM,CAEL;IAGX;;;OAGG;IACH,UAFU,MAAM,CAEH;IAEb;;;OAGG;IACH,gBAFU,MAAM,CAEG;IAEnB;;;OAGG;IACH,QAFU,IAAI,sBAAU,CAEV;IAEd;;;OAGG;IACH,OAFU,IAAI,GAAC,eAAU,CAEZ;IAEb;;;OAGG;IACH,MAFU,SAAS,CAEQ;IAG3B,+BASC;IAED;;OAEG;IACH,gCAuCC;IAED;;;;;OAKG;IACH,sEAFa,MAAM,CAyBlB;IAGD;;;;;OAKG;IACH,sBAJW,MAAM,QACN,MAAM,UACN,MAAM,QAchB;IAGD;;;OAGG;IACH,cAFa,OAAO,CAInB;IAED;;;OAGG;IACH,cAFa,OAAO,CAInB;IAED;;;OAGG;IACH,iBAFa,eAAU,CAmCtB;IAED;;;OAGG;IACH,4DA4BC;CACJ;yBAxTwB,eAAe"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { MoveEdge } from "./MoveEdge.js";
|
|
2
1
|
import { assert } from "../../../core/assert.js";
|
|
2
|
+
import { MoveEdge } from "./MoveEdge.js";
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
*
|
|
@@ -14,20 +14,6 @@ export const StateType = {
|
|
|
14
14
|
NoMoves: 5
|
|
15
15
|
};
|
|
16
16
|
|
|
17
|
-
/**
|
|
18
|
-
*
|
|
19
|
-
* @param {number} x
|
|
20
|
-
* @param {number} y
|
|
21
|
-
* @return {number}
|
|
22
|
-
*/
|
|
23
|
-
function computeCertainty(x, y) {
|
|
24
|
-
if (x === 0) {
|
|
25
|
-
return 1;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
return x / y;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
17
|
/**
|
|
32
18
|
*
|
|
33
19
|
* @param {MoveEdge} move
|
|
@@ -64,108 +50,70 @@ function computeScore(move, totalPlayouts, totalUncertainPlayouts) {
|
|
|
64
50
|
return score;
|
|
65
51
|
}
|
|
66
52
|
|
|
67
|
-
const traverseState = function () {
|
|
68
53
|
|
|
69
|
-
|
|
70
|
-
const stack = [];
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
*
|
|
74
|
-
* @param {StateNode} node
|
|
75
|
-
* @param {function(StateNode)} visitor
|
|
76
|
-
*/
|
|
77
|
-
function traverseState(node, visitor) {
|
|
78
|
-
const stackOffset = stackPointer;
|
|
54
|
+
let stack_pointer = 0;
|
|
79
55
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
n = stack[stackPointer];
|
|
87
|
-
|
|
88
|
-
visitor(n);
|
|
89
|
-
|
|
90
|
-
if (n.isExpanded()) {
|
|
91
|
-
|
|
92
|
-
const moves = n.moves;
|
|
93
|
-
const numMoves = moves.length;
|
|
94
|
-
|
|
95
|
-
for (let i = 0; i < numMoves; i++) {
|
|
96
|
-
const moveEdge = moves[i];
|
|
97
|
-
|
|
98
|
-
if (moveEdge.isTargetMaterialized()) {
|
|
99
|
-
const target = moveEdge.target;
|
|
100
|
-
|
|
101
|
-
stack[stackPointer++] = target;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
//cleanup
|
|
108
|
-
stack.length = stackOffset;
|
|
109
|
-
stackPointer = stackOffset;
|
|
110
|
-
}
|
|
56
|
+
/**
|
|
57
|
+
*
|
|
58
|
+
* @type {StateNode[]}
|
|
59
|
+
*/
|
|
60
|
+
const stack = [];
|
|
111
61
|
|
|
112
|
-
return traverseState;
|
|
113
|
-
}();
|
|
114
62
|
|
|
115
63
|
/**
|
|
116
64
|
* @template State, Action
|
|
117
65
|
*/
|
|
118
66
|
export class StateNode {
|
|
119
|
-
constructor() {
|
|
120
|
-
/**
|
|
121
|
-
* How deep is the node in the tree
|
|
122
|
-
* @type {number}
|
|
123
|
-
*/
|
|
124
|
-
this.depth = 0;
|
|
125
67
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
68
|
+
/**
|
|
69
|
+
* How deep is the node in the tree
|
|
70
|
+
* @type {number}
|
|
71
|
+
*/
|
|
72
|
+
depth = 0;
|
|
131
73
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
74
|
+
/**
|
|
75
|
+
*
|
|
76
|
+
* @type {number}
|
|
77
|
+
*/
|
|
78
|
+
wins = 0;
|
|
137
79
|
|
|
80
|
+
/**
|
|
81
|
+
* Number of leses in the subtree of this state
|
|
82
|
+
* @type {number}
|
|
83
|
+
*/
|
|
84
|
+
losses = 0;
|
|
138
85
|
|
|
139
|
-
/**
|
|
140
|
-
* total number of explored playouts
|
|
141
|
-
* @type {number}
|
|
142
|
-
*/
|
|
143
|
-
this.playouts = 0;
|
|
144
86
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
87
|
+
/**
|
|
88
|
+
* total number of explored playouts
|
|
89
|
+
* @type {number}
|
|
90
|
+
*/
|
|
91
|
+
playouts = 0;
|
|
150
92
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
93
|
+
/**
|
|
94
|
+
*
|
|
95
|
+
* @type {number}
|
|
96
|
+
*/
|
|
97
|
+
heuristicValue = 0;
|
|
156
98
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
99
|
+
/**
|
|
100
|
+
* parent node, previous state
|
|
101
|
+
* @type {null|StateNode}
|
|
102
|
+
*/
|
|
103
|
+
parent = null;
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
*
|
|
107
|
+
* @type {null|MoveEdge[]}
|
|
108
|
+
*/
|
|
109
|
+
moves = null;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
*
|
|
113
|
+
* @type {StateType}
|
|
114
|
+
*/
|
|
115
|
+
type = StateType.Undecided;
|
|
162
116
|
|
|
163
|
-
/**
|
|
164
|
-
*
|
|
165
|
-
* @type {StateType}
|
|
166
|
-
*/
|
|
167
|
-
this.type = StateType.Undecided;
|
|
168
|
-
}
|
|
169
117
|
|
|
170
118
|
bubbleUpHeuristicScore() {
|
|
171
119
|
let r = this.parent;
|
|
@@ -335,6 +283,32 @@ export class StateNode {
|
|
|
335
283
|
* @param {function(StateNode)} visitor
|
|
336
284
|
*/
|
|
337
285
|
traverse(visitor) {
|
|
338
|
-
|
|
286
|
+
const stackOffset = stack_pointer;
|
|
287
|
+
|
|
288
|
+
stack[stack_pointer++] = this;
|
|
289
|
+
|
|
290
|
+
let n;
|
|
291
|
+
|
|
292
|
+
while (stack_pointer-- > stackOffset) {
|
|
293
|
+
|
|
294
|
+
n = stack[stack_pointer];
|
|
295
|
+
|
|
296
|
+
visitor(n);
|
|
297
|
+
|
|
298
|
+
if (n.isExpanded()) {
|
|
299
|
+
|
|
300
|
+
const moves = n.moves;
|
|
301
|
+
const numMoves = moves.length;
|
|
302
|
+
|
|
303
|
+
for (let i = 0; i < numMoves; i++) {
|
|
304
|
+
const moveEdge = moves[i];
|
|
305
|
+
|
|
306
|
+
if (moveEdge.isTargetMaterialized()) {
|
|
307
|
+
stack[stack_pointer++] = moveEdge.target;
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
|
|
339
313
|
}
|
|
340
314
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Logger.d.ts","sourceRoot":"","sources":["../../../../src/engine/logging/Logger.js"],"names":[],"mappings":"AAGA;
|
|
1
|
+
{"version":3,"file":"Logger.d.ts","sourceRoot":"","sources":["../../../../src/engine/logging/Logger.js"],"names":[],"mappings":"AAGA;IACI;;;;OAIG;IACH,iBAAc;IAEd;;;;;OAKG;IACH,oCAFa,OAAO,CAUnB;IAED;;;;OAIG;IACH,uCAFY,OAAO,CAUlB;IAED;;;;OAIG;IACH,WAHW,QAAQ,GAAC,MAAM,WACf,MAAM,QAmBhB;IAED,qBAEC;IAED,qBAEC;IAED,sBAEC;CACJ;yBA5EwB,eAAe"}
|
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
import { LogLevel } from "./LogLevel.js";
|
|
2
1
|
import { assert } from "../../core/assert.js";
|
|
2
|
+
import { LogLevel } from "./LogLevel.js";
|
|
3
3
|
|
|
4
4
|
export class Logger {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
this.backends = [];
|
|
12
|
-
}
|
|
5
|
+
/**
|
|
6
|
+
*
|
|
7
|
+
* @private
|
|
8
|
+
* @type {LoggerBackend[]}
|
|
9
|
+
*/
|
|
10
|
+
backends = [];
|
|
13
11
|
|
|
14
12
|
/**
|
|
15
13
|
* Add a logging backend, this is a structure that handles incoming log messages.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoggerBackend.d.ts","sourceRoot":"","sources":["../../../../src/engine/logging/LoggerBackend.js"],"names":[],"mappings":"AAEA;
|
|
1
|
+
{"version":3,"file":"LoggerBackend.d.ts","sourceRoot":"","sources":["../../../../src/engine/logging/LoggerBackend.js"],"names":[],"mappings":"AAEA;IAGI;;;OAGG;IACH,cAAsB;IAGtB;;;OAGG;IACH,YAFa,QAAQ,GAAC,MAAM,CAI3B;IAED;;;OAGG;IACH,YAFW,QAAQ,QAIlB;IAED;;;;;OAKG;IACH,WAJW,QAAQ,WACR,MAAM,GACJ,IAAI,CAIhB;CACJ;yBArCwB,eAAe"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { LogLevel } from "./LogLevel.js";
|
|
2
2
|
|
|
3
3
|
export class LoggerBackend {
|
|
4
|
-
constructor() {
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* @private
|
|
8
|
+
* @type {LogLevel|number}
|
|
9
|
+
*/
|
|
10
|
+
level = LogLevel.Info;
|
|
11
|
+
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
*
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Morton.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/3d/morton/Morton.js"],"names":[],"mappings":";uCAAuC,6BAA6B"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Returns the number of vertices on face number iFace
|
|
3
|
-
* iFace is a number in the range {0, 1, ..., getNumFaces()-1}
|
|
4
|
-
* @param {SMikkTSpaceContext} pContext
|
|
5
|
-
* @param {number} iFace
|
|
6
|
-
* @returns {number}
|
|
7
|
-
*/
|
|
8
|
-
declare function m_getNumVerticesOfFace(pContext: SMikkTSpaceContext, iFace: number): number;
|
|
9
|
-
//# sourceMappingURL=m_getNumVerticesOfFace.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"m_getNumVerticesOfFace.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/geometry/MikkT/m_getNumVerticesOfFace.js"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,6EAHW,MAAM,GACJ,MAAM,CAKlB"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Returns the number of vertices on face number iFace
|
|
3
|
-
* iFace is a number in the range {0, 1, ..., getNumFaces()-1}
|
|
4
|
-
* @param {SMikkTSpaceContext} pContext
|
|
5
|
-
* @param {number} iFace
|
|
6
|
-
* @returns {number}
|
|
7
|
-
*/
|
|
8
|
-
function m_getNumVerticesOfFace(pContext, iFace) {
|
|
9
|
-
// only support triangles
|
|
10
|
-
return 3;
|
|
11
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
* @param {SMikkTSpaceContext} pContext
|
|
4
|
-
* @param {number[]|{0:number,1:number,2:number}} fvPosOut
|
|
5
|
-
* @param {number} iFace
|
|
6
|
-
* @param {number} iVert
|
|
7
|
-
* @returns {void}
|
|
8
|
-
*/
|
|
9
|
-
export function m_getPosition(pContext: SMikkTSpaceContext, fvPosOut: number[] | {
|
|
10
|
-
0: number;
|
|
11
|
-
1: number;
|
|
12
|
-
2: number;
|
|
13
|
-
}, iFace: number, iVert: number): void;
|
|
14
|
-
//# sourceMappingURL=m_getPosition.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"m_getPosition.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/geometry/MikkT/m_getPosition.js"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,sEALW,MAAM,EAAE,GAAC;IAAC,CAAC,EAAC,MAAM,CAAC;IAAA,CAAC,EAAC,MAAM,CAAC;IAAA,CAAC,EAAC,MAAM,CAAA;CAAC,SACrC,MAAM,SACN,MAAM,GACJ,IAAI,CAahB"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
* @param {SMikkTSpaceContext} pContext
|
|
4
|
-
* @param {number[]|{0:number,1:number,2:number}} fvPosOut
|
|
5
|
-
* @param {number} iFace
|
|
6
|
-
* @param {number} iVert
|
|
7
|
-
* @returns {void}
|
|
8
|
-
*/
|
|
9
|
-
export function m_getPosition(pContext, fvPosOut, iFace, iVert) {
|
|
10
|
-
// figure out which vertex it is
|
|
11
|
-
const vertex_index = pContext.geometry_buffer_index[iFace * 3 + iVert];
|
|
12
|
-
|
|
13
|
-
const position = pContext.geometry_buffer_vertex_position;
|
|
14
|
-
|
|
15
|
-
const position_offset = vertex_index * 3;
|
|
16
|
-
|
|
17
|
-
fvPosOut[0] = position[position_offset];
|
|
18
|
-
fvPosOut[1] = position[position_offset + 1];
|
|
19
|
-
fvPosOut[2] = position[position_offset + 2];
|
|
20
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* either (or both) of the two setTSpace callbacks can be set.
|
|
3
|
-
* The call-back m_setTSpaceBasic() is sufficient for basic normal mapping.
|
|
4
|
-
*
|
|
5
|
-
* This function is used to return the tangent and fSign to the application.
|
|
6
|
-
* fvTangent is a unit length vector.
|
|
7
|
-
* For normal maps it is sufficient to use the following simplified version of the bitangent which is generated at pixel/vertex level.
|
|
8
|
-
* bitangent = fSign * cross(vN, tangent);
|
|
9
|
-
* Note that the results are returned unindexed. It is possible to generate a new index list
|
|
10
|
-
* But averaging/overwriting tangent spaces by using an already existing index list WILL produce INCRORRECT results.
|
|
11
|
-
* DO NOT! use an already existing index list.
|
|
12
|
-
*
|
|
13
|
-
* @param {SMikkTSpaceContext} pContext
|
|
14
|
-
* @param {number[]} fvTangent
|
|
15
|
-
* @param {number} fSign
|
|
16
|
-
* @param {number} iFace
|
|
17
|
-
* @param {number} iVert
|
|
18
|
-
* @returns {void}
|
|
19
|
-
*/
|
|
20
|
-
declare function m_setTSpaceBasic(pContext: SMikkTSpaceContext, fvTangent: number[], fSign: number, iFace: number, iVert: number): void;
|
|
21
|
-
//# sourceMappingURL=m_setTSpaceBasic.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"m_setTSpaceBasic.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/geometry/MikkT/m_setTSpaceBasic.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,2EANW,MAAM,EAAE,SACR,MAAM,SACN,MAAM,SACN,MAAM,GACJ,IAAI,CAIhB"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* either (or both) of the two setTSpace callbacks can be set.
|
|
3
|
-
* The call-back m_setTSpaceBasic() is sufficient for basic normal mapping.
|
|
4
|
-
*
|
|
5
|
-
* This function is used to return the tangent and fSign to the application.
|
|
6
|
-
* fvTangent is a unit length vector.
|
|
7
|
-
* For normal maps it is sufficient to use the following simplified version of the bitangent which is generated at pixel/vertex level.
|
|
8
|
-
* bitangent = fSign * cross(vN, tangent);
|
|
9
|
-
* Note that the results are returned unindexed. It is possible to generate a new index list
|
|
10
|
-
* But averaging/overwriting tangent spaces by using an already existing index list WILL produce INCRORRECT results.
|
|
11
|
-
* DO NOT! use an already existing index list.
|
|
12
|
-
*
|
|
13
|
-
* @param {SMikkTSpaceContext} pContext
|
|
14
|
-
* @param {number[]} fvTangent
|
|
15
|
-
* @param {number} fSign
|
|
16
|
-
* @param {number} iFace
|
|
17
|
-
* @param {number} iVert
|
|
18
|
-
* @returns {void}
|
|
19
|
-
*/
|
|
20
|
-
function m_setTSpaceBasic(pContext, fvTangent, fSign, iFace, iVert) {
|
|
21
|
-
throw new Error('Not supported');
|
|
22
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export default sampler2D2Texture;
|
|
2
|
-
/**
|
|
3
|
-
*
|
|
4
|
-
* @param {Sampler2D} sampler
|
|
5
|
-
* @return {DataTexture}
|
|
6
|
-
*/
|
|
7
|
-
declare function sampler2D2Texture(sampler: Sampler2D): DataTexture;
|
|
8
|
-
import { Sampler2D } from "./Sampler2D.js";
|
|
9
|
-
import { DataTexture } from 'three';
|
|
10
|
-
//# sourceMappingURL=Sampler2D2Texture.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Sampler2D2Texture.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/texture/sampler/Sampler2D2Texture.js"],"names":[],"mappings":";AAMA;;;;GAIG;AACH,4CAHW,SAAS,GACR,WAAW,CAsCtB;0BA5CyB,gBAAgB;4BAHqC,OAAO"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"copy_Sampler2D_channel_data.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/texture/sampler/copy_Sampler2D_channel_data.js"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,6FAiEC"}
|
|
File without changes
|