@woosh/meep-engine 2.120.0 → 2.120.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +1 -1
- package/src/core/binary/FLOAT32_MAX.d.ts +2 -0
- package/src/core/binary/FLOAT32_MAX.d.ts.map +1 -0
- package/src/core/binary/FLOAT32_MAX.js +1 -0
- package/src/core/collection/RingBuffer.d.ts +2 -3
- package/src/core/collection/RingBuffer.d.ts.map +1 -1
- package/src/core/collection/RingBuffer.js +9 -4
- package/src/core/color/Color.d.ts.map +1 -1
- package/src/core/color/Color.js +15 -1
- package/src/core/geom/2d/circle/Circle.d.ts +7 -5
- package/src/core/geom/2d/circle/Circle.d.ts.map +1 -1
- package/src/core/geom/2d/circle/Circle.js +7 -5
- package/src/core/geom/2d/circle/circle_area.d.ts +7 -0
- package/src/core/geom/2d/circle/circle_area.d.ts.map +1 -0
- package/src/core/geom/2d/circle/circle_area.js +8 -0
- package/src/core/geom/Quaternion.d.ts.map +1 -1
- package/src/core/geom/Quaternion.js +57 -23
- package/src/core/geom/Vector4.d.ts.map +1 -1
- package/src/core/geom/Vector4.js +32 -0
- package/src/core/geom/mat2/M2_IDENTITY.d.ts +6 -0
- package/src/core/geom/mat2/M2_IDENTITY.d.ts.map +1 -0
- package/src/core/geom/mat2/M2_IDENTITY.js +8 -0
- package/src/core/geom/mat2/m2_is_diagonal.d.ts +8 -0
- package/src/core/geom/mat2/m2_is_diagonal.d.ts.map +1 -0
- package/src/core/geom/mat2/m2_is_diagonal.js +9 -0
- package/src/core/geom/mat2/m2_is_orthogonal.d.ts +8 -0
- package/src/core/geom/mat2/m2_is_orthogonal.d.ts.map +1 -0
- package/src/core/geom/mat2/m2_is_orthogonal.js +23 -0
- package/src/core/geom/mat2/m2_transpose.d.ts +9 -0
- package/src/core/geom/mat2/m2_transpose.d.ts.map +1 -0
- package/src/core/geom/mat2/m2_transpose.js +17 -0
- package/src/core/graph/graph_compute_adjacency_matrix.d.ts +7 -5
- package/src/core/graph/graph_compute_adjacency_matrix.d.ts.map +1 -1
- package/src/core/graph/graph_compute_adjacency_matrix.js +11 -5
- package/src/core/graph/graph_compute_distance_matrix.d.ts.map +1 -1
- package/src/core/graph/graph_compute_distance_matrix.js +30 -56
- package/src/core/graph/graph_compute_laplacian_matrix.d.ts +6 -6
- package/src/core/graph/graph_compute_laplacian_matrix.js +6 -6
- package/src/core/json/abstractJSONDeserializer.d.ts.map +1 -1
- package/src/core/json/abstractJSONDeserializer.js +7 -1
- package/src/core/math/bell_membership_function.d.ts.map +1 -1
- package/src/core/math/bell_membership_function.js +6 -1
- package/src/core/math/linalg/m2/m2_polar_decomp.d.ts +19 -0
- package/src/core/math/linalg/m2/m2_polar_decomp.d.ts.map +1 -0
- package/src/core/math/linalg/m2/m2_polar_decomp.js +27 -0
- package/src/core/math/linalg/m2/m2_polar_decomp_noS.d.ts +15 -0
- package/src/core/math/linalg/m2/m2_polar_decomp_noS.d.ts.map +1 -0
- package/src/core/math/linalg/m2/m2_polar_decomp_noS.js +32 -0
- package/src/core/math/linalg/m2/m2_svd.d.ts +19 -0
- package/src/core/math/linalg/m2/m2_svd.d.ts.map +1 -0
- package/src/core/math/linalg/m2/m2_svd.js +96 -0
- package/src/core/math/linalg/solve_linear_system_GEPP_2x2.d.ts +1 -1
- package/src/core/math/linalg/solve_linear_system_GEPP_2x2.js +1 -1
- package/src/core/model/node-graph/node/NodeDescription.d.ts.map +1 -1
- package/src/core/model/node-graph/node/NodeDescription.js +14 -0
- package/src/core/model/node-graph/type/DataType.d.ts.map +1 -1
- package/src/core/model/node-graph/type/DataType.js +4 -0
- package/src/core/process/WatchDog.d.ts +41 -12
- package/src/core/process/WatchDog.d.ts.map +1 -1
- package/src/core/process/WatchDog.js +47 -16
- package/src/engine/development/performance/RingBufferMetric.d.ts +1 -1
- package/src/engine/development/performance/RingBufferMetric.d.ts.map +1 -1
- package/src/engine/ecs/Entity.js +2 -2
- package/src/engine/ecs/EntityComponentDataset.d.ts.map +1 -1
- package/src/engine/ecs/EntityComponentDataset.js +31 -13
- package/src/engine/ecs/EntityManager.d.ts.map +1 -1
- package/src/engine/ecs/EntityManager.js +10 -1
- package/src/engine/ecs/EntityObserver.d.ts.map +1 -1
- package/src/engine/ecs/EntityObserver.js +2 -10
- package/src/engine/ecs/EntityReference.d.ts +10 -2
- package/src/engine/ecs/EntityReference.d.ts.map +1 -1
- package/src/engine/ecs/EntityReference.js +24 -6
- package/src/engine/ecs/terrain/ecs/Terrain.d.ts.map +1 -1
- package/src/engine/ecs/terrain/ecs/cling/ClingToTerrainSerializationAdapter.js +3 -3
- package/src/engine/ecs/terrain/ecs/cling/ClingToTerrainSerializationUpgrader_0_1.d.ts +4 -0
- package/src/engine/ecs/terrain/ecs/cling/ClingToTerrainSerializationUpgrader_0_1.d.ts.map +1 -0
- package/src/engine/ecs/terrain/ecs/cling/ClingToTerrainSerializationUpgrader_0_1.js +24 -0
- package/src/engine/ecs/terrain/ecs/splat/SplatMapping.d.ts.map +1 -1
- package/src/engine/ecs/terrain/ecs/splat/SplatMapping.js +3 -9
- package/src/engine/ecs/terrain/overlay/TerrainOverlay.d.ts.map +1 -1
- package/src/engine/ecs/terrain/overlay/TerrainOverlay.js +14 -8
- package/src/engine/ecs/transform/Transform.d.ts +5 -1
- package/src/engine/ecs/transform/Transform.d.ts.map +1 -1
- package/src/engine/ecs/transform/Transform.js +5 -1
- package/src/engine/graphics/texture/sampler/Sampler2D.d.ts +349 -50
- package/src/engine/intelligence/behavior/ecs/DieBehavior.d.ts +3 -0
- package/src/engine/intelligence/behavior/ecs/DieBehavior.d.ts.map +1 -1
- package/src/engine/intelligence/behavior/ecs/DieBehavior.js +4 -0
- package/src/engine/intelligence/behavior/ecs/KillBehavior.d.ts +17 -0
- package/src/engine/intelligence/behavior/ecs/KillBehavior.d.ts.map +1 -0
- package/src/engine/intelligence/behavior/ecs/KillBehavior.js +47 -0
- package/src/engine/intelligence/blackboard/BlackboardStack.d.ts +1 -1
- package/src/engine/intelligence/blackboard/BlackboardStack.js +1 -1
- package/src/engine/navigation/ecs/path_following/PathFollowerSerializationAdapter.d.ts.map +1 -1
- package/src/engine/navigation/ecs/path_following/PathFollowerSerializationAdapter.js +3 -1
- package/src/engine/navigation/ecs/path_following/PathFollowerSerializationUpgrader_2_3.d.ts.map +1 -1
- package/src/engine/navigation/ecs/path_following/PathFollowerSerializationUpgrader_2_3.js +3 -7
- package/src/engine/navigation/ecs/path_following/PathFollowerSerializationUpgrader_3_4.d.ts +5 -0
- package/src/engine/navigation/ecs/path_following/PathFollowerSerializationUpgrader_3_4.d.ts.map +1 -0
- package/src/engine/navigation/ecs/path_following/PathFollowerSerializationUpgrader_3_4.js +19 -0
- package/src/engine/physics/mls-mpm/MLS_MPM.d.ts +1 -1
- package/src/engine/physics/mls-mpm/MLS_MPM.d.ts.map +1 -1
- package/src/engine/physics/mls-mpm/MLS_MPM.js +9 -114
- package/src/engine/physics/mls-mpm/README.md +5 -0
- package/src/generation/grid/generation/GridTaskDensityMarkerDistribution.d.ts +7 -6
- package/src/generation/grid/generation/GridTaskDensityMarkerDistribution.d.ts.map +1 -1
- package/src/generation/grid/generation/GridTaskDensityMarkerDistribution.js +51 -43
- package/editor/actions/concrete/ModifyPatchSampler2DAction.d.ts +0 -48
- package/editor/actions/concrete/ModifyPatchTextureArray2DAction.d.ts.map +0 -1
- package/editor/actions/concrete/PaintTerrainOverlayAction.d.ts.map +0 -1
- package/editor/actions/concrete/PatchTerrainHeightAction.d.ts.map +0 -1
- package/editor/actions/concrete/SelectionAddAction.d.ts.map +0 -1
- package/editor/actions/concrete/SelectionClearAction.d.ts.map +0 -1
- package/editor/actions/concrete/SelectionRemoveAction.d.ts.map +0 -1
- package/editor/actions/concrete/TransformModifyAction.d.ts.map +0 -1
- package/editor/actions/concrete/WriteGridValueAction.d.ts.map +0 -1
- package/src/engine/ecs/read_entity_reference.d.ts +0 -9
- package/src/engine/ecs/read_entity_reference.d.ts.map +0 -1
- package/src/engine/ecs/read_entity_reference.js +0 -15
- package/src/engine/physics/ammo/Body.js +0 -103
- package/src/engine/physics/ammo/PhysicsWorker.d.ts +0 -72
- package/src/engine/physics/ammo/PhysicsWorker.d.ts.map +0 -1
- package/src/engine/physics/ammo/PhysicsWorker.js +0 -437
- package/src/engine/physics/ammo/World.d.ts +0 -68
- package/src/engine/physics/ammo/World.d.ts.map +0 -1
- package/src/engine/physics/ammo/World.js +0 -336
- package/src/engine/physics/ammo/shapes/BoxShape.d.ts +0 -10
- package/src/engine/physics/ammo/shapes/BoxShape.d.ts.map +0 -1
- package/src/engine/physics/ammo/shapes/BoxShape.js +0 -11
- package/src/engine/physics/ammo/shapes/CapsuleShape.d.ts +0 -9
- package/src/engine/physics/ammo/shapes/CapsuleShape.d.ts.map +0 -1
- package/src/engine/physics/ammo/shapes/CapsuleShape.js +0 -10
- package/src/engine/physics/ammo/shapes/MeshShape.d.ts +0 -8
- package/src/engine/physics/ammo/shapes/MeshShape.d.ts.map +0 -1
- package/src/engine/physics/ammo/shapes/MeshShape.js +0 -9
- package/src/engine/physics/ammo/shapes/PlaneShape.d.ts +0 -11
- package/src/engine/physics/ammo/shapes/PlaneShape.d.ts.map +0 -1
- package/src/engine/physics/ammo/shapes/PlaneShape.js +0 -14
- package/src/engine/physics/ammo/shapes/Shape.d.ts +0 -7
- package/src/engine/physics/ammo/shapes/Shape.d.ts.map +0 -1
- package/src/engine/physics/ammo/shapes/Shape.js +0 -9
- package/src/engine/physics/ammo/shapes/SphereShape.d.ts +0 -8
- package/src/engine/physics/ammo/shapes/SphereShape.d.ts.map +0 -1
- package/src/engine/physics/ammo/shapes/SphereShape.js +0 -9
- package/src/engine/physics/cannon/CannonJSPhysicsSystem.d.ts +0 -15
- package/src/engine/physics/cannon/CannonJSPhysicsSystem.d.ts.map +0 -1
- package/src/engine/physics/cannon/CannonJSPhysicsSystem.js +0 -196
|
@@ -107,23 +107,17 @@ export class SplatMapping {
|
|
|
107
107
|
|
|
108
108
|
const dataOffset = index * width * height;
|
|
109
109
|
|
|
110
|
-
const sourceWidth = source.width;
|
|
111
|
-
const sourceHeight = source.height;
|
|
112
|
-
|
|
113
|
-
const source_max_y = sourceHeight - 1;
|
|
114
|
-
const source_max_x = sourceWidth - 1;
|
|
115
|
-
|
|
116
110
|
for (let y = 0; y < height; y++) {
|
|
117
|
-
const v = y / height;
|
|
111
|
+
const v = (y + 0.5) / height;
|
|
118
112
|
|
|
119
113
|
for (let x = 0; x < width; x++) {
|
|
120
114
|
|
|
121
|
-
const u = x / width;
|
|
115
|
+
const u = (x + 0.5) / width;
|
|
122
116
|
|
|
123
117
|
const targetIndex = y * width + x;
|
|
124
118
|
const targetAddress = dataOffset + targetIndex;
|
|
125
119
|
|
|
126
|
-
const value = source.
|
|
120
|
+
const value = source.sampleChannelBilinearUV(u , v , channel);
|
|
127
121
|
|
|
128
122
|
weightData[targetAddress] = value;
|
|
129
123
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TerrainOverlay.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/ecs/terrain/overlay/TerrainOverlay.js"],"names":[],"mappings":"AA+CA;IACI;;;;OAIG;IACH,kBAHW,OAAO,
|
|
1
|
+
{"version":3,"file":"TerrainOverlay.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/ecs/terrain/overlay/TerrainOverlay.js"],"names":[],"mappings":"AA+CA;IACI;;;;OAIG;IACH,kBAHW,OAAO,EAkEjB;IA9DG;;;;OAIG;IACH,sBAHU,OAAO,CAGkB;IACnC;;;;OAIG;IACH,eAHU,OAAO,CAGsB;IAEvC;;;OAGG;IACH,WAFU,cAAc,CAEiC;IAEzD;;;OAGG;IACH,SAFU,SAAS,CAE8B;IAEjC,qBAIf;IAiBD;;;OAGG;IACH,OAFU,OAAO,EAAE,CAEJ;IAsBnB;;;OAGG;IACH,qBAFW,MAAM,EAMhB;IAhBD;;;OAGG;IACH,qBAFa,MAAM,CAIlB;IAYD;;OAEG;IACH,cAFa,iBAAiB,CAI7B;IAED;;OAEG;IACH,aAaC;IAED;;OAEG;IACH,YAuBC;IAED,cAMC;IAED,eAEC;IAED;;;;;OAKG;IACH,aAJW,MAAM,KACN,MAAM,UACN,OAAO,QAQjB;IAED;;;;;OAKG;IACH,wBAJW,MAAM,KACN,MAAM,QACN,OAAO,QAmBjB;IAED;;;;OAIG;IACH,cAHW,MAAM,KACN,MAAM,QAIhB;IAED;;;;;OAKG;IACH,cAJW,MAAM,KACN,MAAM,QACN,OAAO,QAUjB;IAED;;;OAGG;IACH,gBAFW,UAAU,GAAC,MAAM,EAAE,QAuB7B;IAED;;;;;;;OAOG;IACH,kBANW,iBAAiB,MACjB,MAAM,MACN,MAAM,WACN,MAAM,YACN,MAAM,QAMhB;IAED;;;;;;;OAOG;IACH,qBANW,SAAS,MACT,MAAM,MACN,MAAM,UACN,MAAM,WACN,MAAM,QAWhB;CACJ;oBA9TmB,kCAAkC;oBAClC,kCAAkC;2BAE3B,0CAA0C;0BAG3C,gDAAgD;4BAZV,OAAO;AAgBvE;IACI;;;;;;OAMG;IACH,qBALW,SAAS,eACT,MAAM,aACN,MAAM,EAqBhB;IAjBG;;;OAGG;IACH,SAFU,SAAS,CAEG;IAEtB;;;OAGG;IACH,aAFU,MAAM,CAEc;IAE9B;;;OAGG;IACH,WAFU,MAAM,CAEU;CAEjC;oBAnCmB,kCAAkC"}
|
|
@@ -77,7 +77,11 @@ export class TerrainOverlay {
|
|
|
77
77
|
*/
|
|
78
78
|
this.sampler = Sampler2D.uint8(4, size.x, size.y);
|
|
79
79
|
|
|
80
|
-
const texture = this.texture = new DataTexture(
|
|
80
|
+
const texture = this.texture = new DataTexture(
|
|
81
|
+
this.sampler.data,
|
|
82
|
+
size.x,
|
|
83
|
+
size.y,
|
|
84
|
+
);
|
|
81
85
|
|
|
82
86
|
texture.wrapS = ClampToEdgeWrapping;
|
|
83
87
|
texture.wrapT = ClampToEdgeWrapping;
|
|
@@ -117,7 +121,7 @@ export class TerrainOverlay {
|
|
|
117
121
|
* @returns {string}
|
|
118
122
|
*/
|
|
119
123
|
get baseTileImage() {
|
|
120
|
-
return this.
|
|
124
|
+
return this.tileImage.getValue();
|
|
121
125
|
}
|
|
122
126
|
|
|
123
127
|
/**
|
|
@@ -125,11 +129,9 @@ export class TerrainOverlay {
|
|
|
125
129
|
* @param {string} v
|
|
126
130
|
*/
|
|
127
131
|
set baseTileImage(v) {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
this.stack[0].tileImage = v;
|
|
132
|
-
}
|
|
132
|
+
|
|
133
|
+
this.tileImage.set(v);
|
|
134
|
+
|
|
133
135
|
}
|
|
134
136
|
|
|
135
137
|
/**
|
|
@@ -145,7 +147,11 @@ export class TerrainOverlay {
|
|
|
145
147
|
push() {
|
|
146
148
|
const sampler = this.sampler.clone();
|
|
147
149
|
|
|
148
|
-
const context = new Context(
|
|
150
|
+
const context = new Context(
|
|
151
|
+
sampler,
|
|
152
|
+
this.borderWidth.getValue(),
|
|
153
|
+
this.tileImage.getValue()
|
|
154
|
+
);
|
|
149
155
|
|
|
150
156
|
this.stack.push(context);
|
|
151
157
|
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* A Transform represents the position, rotation, and scale of an object in 3D space.
|
|
3
|
+
* Think of it like the object's location, orientation, and size.
|
|
4
|
+
* It has properties for position (like coordinates), rotation (how it's turned), and scale (how big it is).
|
|
5
|
+
*
|
|
6
|
+
* It also uses a "matrix" (a table of numbers) internally to efficiently store and calculate transformations, but you usually interact with the position, rotation, and scale directly.
|
|
3
7
|
* @class
|
|
4
8
|
*/
|
|
5
9
|
export class Transform {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Transform.d.ts","sourceRoot":"","sources":["../../../../../src/engine/ecs/transform/Transform.js"],"names":[],"mappings":"AAsBA
|
|
1
|
+
{"version":3,"file":"Transform.d.ts","sourceRoot":"","sources":["../../../../../src/engine/ecs/transform/Transform.js"],"names":[],"mappings":"AAsBA;;;;;;;GAOG;AACH;IAwQI;;;;OAIG;IACH,4BAFa,SAAS,CAQrB;IAED;;;;OAIG;IACH,uBAHW,MAAM,EAAE,GAAC,YAAY,GACnB,SAAS,CAQrB;IAiED;;;;;OAKG;IACH,wCAJW,UAAU,gBACV,OAAO,wBAajB;IA/WD;;;OAGG;IACH,mBAHU,OAAO,CAGe;IAEhC;;;OAGG;IACH,mBAHU,UAAU,CAGkB;IAEtC;;;OAGG;IACH,gBAHU,OAAO,CAGY;IAE7B;;;;OAIG;IACH,iBAFU,YAAY,CAEC;IAEvB;;;;OAIG;IACH,OAFU,MAAM,CAEM;IAOtB;;;;OAIG;IACH,eAFa,OAAO,CAQnB;IAED;;;OAGG;IACH,UAFY,OAAO,CAQlB;IAED;;;OAGG;IACH,aAFY,OAAO,CAQlB;IAED;;;;OAIG;IACH,uCAFW,GAAC,QAMX;IAED;;;;OAIG;IACH,yCAFW,GAAC,QAMX;IAYD;;;;OAIG;IACH,cAHW,MAAM,GAAC,cAAc,GACnB,IAAI,CAIhB;IAED;;;;OAIG;IACH,gBAHW,MAAM,GAAC,cAAc,GACnB,IAAI,CAIhB;IAED;;;;OAIG;IACH,gBAHW,MAAM,GAAC,cAAc,SACrB,OAAO,QAQjB;IAED;;;;OAIG;IACH,cAHW,MAAM,GAAC,cAAc,GACnB,OAAO,CAInB;IAED;;OAEG;IACH,qBAEC;IAED;;;;OAIG;IACH,eAHW,OAAO,OACP,OAAO,QAmBjB;IAED,0BAwBC;IAED;;;;MAMC;IAED;;;OAGG;IACH,YAFW,SAAS,QAenB;IAED;;;OAGG;IACH,SAFa,SAAS,CAQrB;IAED;;;;OAIG;IACH,cAHW,SAAS,GACP,OAAO,CAMnB;IAED;;;OAGG;IACH,QAFa,MAAM,CAKlB;IA4BD;;;;OAIG;IACH,sBAHW,SAAS,KACT,SAAS,QAMnB;IAED;;;OAGG;IACH,oBAFW,IAAI,GAAC,MAAM,EAAE,GAAC,YAAY,QAgBpC;IAED;;;OAGG;IACH,kBAFW,MAAM,EAAE,GAAC,YAAY,QAI/B;IAED;;;;;OAKG;IACH,qBAEC;IAED;;;OAGG;IACH,cAFa,OAAO,CAMnB;IAED,mBAEC;IA2BL;;;OAGG;IACH,sBAFU,OAAO,CAEc;;CAZ9B;;kBAIS,MAAM;;oBA7YI,+BAA+B;uBAD5B,kCAAkC;+BAE1B,qBAAqB"}
|
|
@@ -21,7 +21,11 @@ const scratch_matrix = new Float32Array(16);
|
|
|
21
21
|
const FLAGS_DEFAULT = TransformFlags.AutomaticChangeDetection;
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
24
|
+
* A Transform represents the position, rotation, and scale of an object in 3D space.
|
|
25
|
+
* Think of it like the object's location, orientation, and size.
|
|
26
|
+
* It has properties for position (like coordinates), rotation (how it's turned), and scale (how big it is).
|
|
27
|
+
*
|
|
28
|
+
* It also uses a "matrix" (a table of numbers) internally to efficiently store and calculate transformations, but you usually interact with the position, rotation, and scale directly.
|
|
25
29
|
* @class
|
|
26
30
|
*/
|
|
27
31
|
export class Transform {
|
|
@@ -1,50 +1,349 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* Data Texture class, providing an abstraction around 2d numerical arrays, mostly for sampling purposes
|
|
3
|
+
* Inspired by OpenGL's glsl sampler2d API
|
|
4
|
+
* @class
|
|
5
|
+
*/
|
|
6
|
+
export class Sampler2D {
|
|
7
|
+
/**
|
|
8
|
+
*
|
|
9
|
+
* @param {int} itemSize
|
|
10
|
+
* @param {int} width
|
|
11
|
+
* @param {int} height
|
|
12
|
+
* @return {Sampler2D}
|
|
13
|
+
*/
|
|
14
|
+
static uint8clamped(itemSize: int, width: int, height: int): Sampler2D;
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
* @param {int} itemSize
|
|
18
|
+
* @param {int} width
|
|
19
|
+
* @param {int} height
|
|
20
|
+
* @return {Sampler2D}
|
|
21
|
+
*/
|
|
22
|
+
static uint8(itemSize: int, width: int, height: int): Sampler2D;
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @param {int} itemSize
|
|
26
|
+
* @param {int} width
|
|
27
|
+
* @param {int} height
|
|
28
|
+
* @return {Sampler2D}
|
|
29
|
+
*/
|
|
30
|
+
static uint16(itemSize: int, width: int, height: int): Sampler2D;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @param {int} itemSize
|
|
34
|
+
* @param {int} width
|
|
35
|
+
* @param {int} height
|
|
36
|
+
* @return {Sampler2D}
|
|
37
|
+
*/
|
|
38
|
+
static uint32(itemSize: int, width: int, height: int): Sampler2D;
|
|
39
|
+
/**
|
|
40
|
+
*
|
|
41
|
+
* @param {int} itemSize
|
|
42
|
+
* @param {int} width
|
|
43
|
+
* @param {int} height
|
|
44
|
+
* @return {Sampler2D}
|
|
45
|
+
*/
|
|
46
|
+
static int8(itemSize: int, width: int, height: int): Sampler2D;
|
|
47
|
+
/**
|
|
48
|
+
*
|
|
49
|
+
* @param {int} itemSize
|
|
50
|
+
* @param {int} width
|
|
51
|
+
* @param {int} height
|
|
52
|
+
* @return {Sampler2D}
|
|
53
|
+
*/
|
|
54
|
+
static int16(itemSize: int, width: int, height: int): Sampler2D;
|
|
55
|
+
/**
|
|
56
|
+
*
|
|
57
|
+
* @param {int} itemSize
|
|
58
|
+
* @param {int} width
|
|
59
|
+
* @param {int} height
|
|
60
|
+
* @return {Sampler2D}
|
|
61
|
+
*/
|
|
62
|
+
static int32(itemSize: int, width: int, height: int): Sampler2D;
|
|
63
|
+
/**
|
|
64
|
+
*
|
|
65
|
+
* @param {int} itemSize
|
|
66
|
+
* @param {int} width
|
|
67
|
+
* @param {int} height
|
|
68
|
+
* @return {Sampler2D}
|
|
69
|
+
*/
|
|
70
|
+
static float32(itemSize: int, width: int, height: int): Sampler2D;
|
|
71
|
+
/**
|
|
72
|
+
*
|
|
73
|
+
* @param {int} itemSize
|
|
74
|
+
* @param {int} width
|
|
75
|
+
* @param {int} height
|
|
76
|
+
* @return {Sampler2D}
|
|
77
|
+
*/
|
|
78
|
+
static float64(itemSize: int, width: int, height: int): Sampler2D;
|
|
79
|
+
/**
|
|
80
|
+
*
|
|
81
|
+
* @param {ArrayLike<number>|number[]|Uint8ClampedArray|Uint8Array|Uint16Array|Uint32Array|Int8Array|Int16Array|Int32Array|Float32Array|Float64Array} data
|
|
82
|
+
* @param {number} [itemSize]
|
|
83
|
+
* @param {number} [width]
|
|
84
|
+
* @param {number} [height]
|
|
85
|
+
* @constructor
|
|
86
|
+
*/
|
|
87
|
+
constructor(data?: ArrayLike<number> | number[] | Uint8ClampedArray | Uint8Array | Uint16Array | Uint32Array | Int8Array | Int16Array | Int32Array | Float32Array | Float64Array, itemSize?: number, width?: number, height?: number);
|
|
88
|
+
/**
|
|
89
|
+
*
|
|
90
|
+
* @type {number}
|
|
91
|
+
*/
|
|
92
|
+
width: number;
|
|
93
|
+
/**
|
|
94
|
+
*
|
|
95
|
+
* @type {number}
|
|
96
|
+
*/
|
|
97
|
+
height: number;
|
|
98
|
+
/**
|
|
99
|
+
* Number of channels
|
|
100
|
+
* @type {number}
|
|
101
|
+
*/
|
|
102
|
+
itemSize: number;
|
|
103
|
+
/**
|
|
104
|
+
*
|
|
105
|
+
* @type {number[]|Uint8ClampedArray|Uint8Array|Uint16Array|Uint32Array|Int8Array|Int16Array|Int32Array|Float32Array|Float64Array}
|
|
106
|
+
*/
|
|
107
|
+
data: number[] | Uint8ClampedArray | Uint8Array | Uint16Array | Uint32Array | Int8Array | Int16Array | Int32Array | Float32Array | Float64Array;
|
|
108
|
+
/**
|
|
109
|
+
* Used to tracking changes
|
|
110
|
+
* @type {number}
|
|
111
|
+
*/
|
|
112
|
+
version: number;
|
|
113
|
+
/**
|
|
114
|
+
*
|
|
115
|
+
* @param {number} u
|
|
116
|
+
* @param {number} v
|
|
117
|
+
* @param {number[]} result
|
|
118
|
+
*/
|
|
119
|
+
sampleCatmullRomUV(u: number, v: number, result: number[]): void;
|
|
120
|
+
/**
|
|
121
|
+
*
|
|
122
|
+
* @param {number} u
|
|
123
|
+
* @param {number} v
|
|
124
|
+
* @param {number} channel
|
|
125
|
+
* @returns {number}
|
|
126
|
+
*/
|
|
127
|
+
sampleChannelCatmullRomUV(u: number, v: number, channel: number): number;
|
|
128
|
+
/**
|
|
129
|
+
*
|
|
130
|
+
* @see https://gist.github.com/TheRealMJP/c83b8c0f46b63f3a88a5986f4fa982b1
|
|
131
|
+
* @param {number} x
|
|
132
|
+
* @param {number} y
|
|
133
|
+
* @param {number} channel
|
|
134
|
+
* @returns {number}
|
|
135
|
+
*/
|
|
136
|
+
sampleChannelCatmullRom(x: number, y: number, channel: number): number;
|
|
137
|
+
/**
|
|
138
|
+
*
|
|
139
|
+
* @param {number} u
|
|
140
|
+
* @param {number} v
|
|
141
|
+
* @param {number[]} result
|
|
142
|
+
*/
|
|
143
|
+
sampleBicubicUV(u: number, v: number, result: number[]): void;
|
|
144
|
+
/**
|
|
145
|
+
*
|
|
146
|
+
* @param {number} x
|
|
147
|
+
* @param {number} y
|
|
148
|
+
* @param {number[]|Float32Array|Float64Array} result
|
|
149
|
+
* @param {number} result_offset
|
|
150
|
+
*/
|
|
151
|
+
sampleBicubic(x: number, y: number, result: number[] | Float32Array | Float64Array, result_offset: number): void;
|
|
152
|
+
/**
|
|
153
|
+
*
|
|
154
|
+
* @param {number} u
|
|
155
|
+
* @param {number} v
|
|
156
|
+
* @param {number} channel
|
|
157
|
+
* @returns {number}
|
|
158
|
+
*/
|
|
159
|
+
sampleChannelBicubicUV(u: number, v: number, channel: number): number;
|
|
160
|
+
/**
|
|
161
|
+
*
|
|
162
|
+
* Bicubic-filtered sampling, note values can be negative due to the nature of the cubic curve
|
|
163
|
+
* @param {number} x
|
|
164
|
+
* @param {number} y
|
|
165
|
+
* @param {number} channel
|
|
166
|
+
* @returns {number}
|
|
167
|
+
*/
|
|
168
|
+
sampleChannelBicubic(x: number, y: number, channel: number): number;
|
|
169
|
+
/**
|
|
170
|
+
*
|
|
171
|
+
* @param {number} u
|
|
172
|
+
* @param {number} v
|
|
173
|
+
* @param {number[]|Float32Array} result
|
|
174
|
+
* @param {number} result_offset
|
|
175
|
+
*/
|
|
176
|
+
sampleBilinearUV(u: number, v: number, result: number[] | Float32Array, result_offset?: number): void;
|
|
177
|
+
/**
|
|
178
|
+
*
|
|
179
|
+
* @param {number} x
|
|
180
|
+
* @param {number} y
|
|
181
|
+
* @param {number[]|Float32Array|Float64Array} result
|
|
182
|
+
* @param {number} result_offset
|
|
183
|
+
*/
|
|
184
|
+
sampleBilinear(x: number, y: number, result: number[] | Float32Array | Float64Array, result_offset?: number): void;
|
|
185
|
+
/**
|
|
186
|
+
*
|
|
187
|
+
* @param {number} u
|
|
188
|
+
* @param {number} v
|
|
189
|
+
* @param {number} channel
|
|
190
|
+
* @return {number}
|
|
191
|
+
*/
|
|
192
|
+
sampleChannelBilinearUV(u: number, v: number, channel: number): number;
|
|
193
|
+
/**
|
|
194
|
+
*
|
|
195
|
+
* @param {number} x
|
|
196
|
+
* @param {number} y
|
|
197
|
+
* @param {number} channel
|
|
198
|
+
* @returns {number}
|
|
199
|
+
*/
|
|
200
|
+
sampleChannelBilinear(x: number, y: number, channel: number): number;
|
|
201
|
+
/**
|
|
202
|
+
*
|
|
203
|
+
* @param {number} u
|
|
204
|
+
* @param {number} v
|
|
205
|
+
* @param {number[]|ArrayLike<number>} result
|
|
206
|
+
*/
|
|
207
|
+
sampleNearestUV(u: number, v: number, result: number[] | ArrayLike<number>): void;
|
|
208
|
+
/**
|
|
209
|
+
*
|
|
210
|
+
* @param {number} x
|
|
211
|
+
* @param {number} y
|
|
212
|
+
* @param {number} channel
|
|
213
|
+
* @returns {number}
|
|
214
|
+
*/
|
|
215
|
+
readChannel(x: number, y: number, channel: number): number;
|
|
216
|
+
/**
|
|
217
|
+
*
|
|
218
|
+
* @param {number} x
|
|
219
|
+
* @param {number} y
|
|
220
|
+
* @param {number[]} result
|
|
221
|
+
*/
|
|
222
|
+
read(x: number, y: number, result: number[]): void;
|
|
223
|
+
/**
|
|
224
|
+
*
|
|
225
|
+
* @param {number} x
|
|
226
|
+
* @param {number} y
|
|
227
|
+
* @param {number[]|ArrayLike<number>} texel
|
|
228
|
+
*/
|
|
229
|
+
write(x: number, y: number, texel: number[] | ArrayLike<number>): void;
|
|
230
|
+
/**
|
|
231
|
+
*
|
|
232
|
+
* @param {number} x
|
|
233
|
+
* @param {number} y
|
|
234
|
+
* @returns {number}
|
|
235
|
+
*/
|
|
236
|
+
point2index(x: number, y: number): number;
|
|
237
|
+
/**
|
|
238
|
+
*
|
|
239
|
+
* @param {number} index
|
|
240
|
+
* @param {Vector2} result
|
|
241
|
+
*/
|
|
242
|
+
index2point(index: number, result: Vector2): void;
|
|
243
|
+
/**
|
|
244
|
+
* Copy a patch from another sampler
|
|
245
|
+
* @param {Sampler2D} source where to copy from
|
|
246
|
+
* @param {Number} sourceX where to start reading from, X coordinate
|
|
247
|
+
* @param {Number} sourceY where to start reading from, X coordinate
|
|
248
|
+
* @param {Number} destinationX where to start writing to, X coordinate
|
|
249
|
+
* @param {Number} destinationY where to start writing to, X coordinate
|
|
250
|
+
* @param {Number} width size of the patch that is to be copied
|
|
251
|
+
* @param {Number} height size of the patch that is to be copied
|
|
252
|
+
*/
|
|
253
|
+
copy(source: Sampler2D, sourceX: number, sourceY: number, destinationX: number, destinationY: number, width: number, height: number): void;
|
|
254
|
+
/**
|
|
255
|
+
* Fill data values with zeros for a given area
|
|
256
|
+
* Specialized version of `fill` method, optimized for speed
|
|
257
|
+
* @param {Number} x
|
|
258
|
+
* @param {Number} y
|
|
259
|
+
* @param {Number} width
|
|
260
|
+
* @param {Number} height
|
|
261
|
+
*/
|
|
262
|
+
zeroFill(x: number, y: number, width: number, height: number): void;
|
|
263
|
+
/**
|
|
264
|
+
*
|
|
265
|
+
* @param {number} channel_index
|
|
266
|
+
* @param {number} value
|
|
267
|
+
*/
|
|
268
|
+
channelFill(channel_index: number, value: number): void;
|
|
269
|
+
/**
|
|
270
|
+
*
|
|
271
|
+
* @param {number} x
|
|
272
|
+
* @param {number} y
|
|
273
|
+
* @param {number} width
|
|
274
|
+
* @param {number} height
|
|
275
|
+
* @param {Array.<number>} value
|
|
276
|
+
*/
|
|
277
|
+
fill(x: number, y: number, width: number, height: number, value: Array<number>): void;
|
|
278
|
+
/**
|
|
279
|
+
* Set channel value of a specific texel
|
|
280
|
+
* @param {number} x
|
|
281
|
+
* @param {number} y
|
|
282
|
+
* @param {number} channel
|
|
283
|
+
* @param {number} value
|
|
284
|
+
*/
|
|
285
|
+
writeChannel(x: number, y: number, channel: number, value: number): void;
|
|
286
|
+
/**
|
|
287
|
+
* Traverses area inside a circle
|
|
288
|
+
* NOTE: Based on palm3d answer on stack overflow: https://stackoverflow.com/questions/1201200/fast-algorithm-for-drawing-filled-circles
|
|
289
|
+
* @param {number} centerX
|
|
290
|
+
* @param {number} centerY
|
|
291
|
+
* @param {number} radius
|
|
292
|
+
* @param {function(x:number,y:number, sampler:Sampler2D)} visitor
|
|
293
|
+
*/
|
|
294
|
+
traverseCircle(centerX: number, centerY: number, radius: number, visitor: any): void;
|
|
295
|
+
/**
|
|
296
|
+
*
|
|
297
|
+
* @param {number} x
|
|
298
|
+
* @param {number} y
|
|
299
|
+
* @param {boolean} [preserveData=true]
|
|
300
|
+
*/
|
|
301
|
+
resize(x: number, y: number, preserveData?: boolean): void;
|
|
302
|
+
/**
|
|
303
|
+
* Estimate memory requirement of the object
|
|
304
|
+
* @return {number}
|
|
305
|
+
*/
|
|
306
|
+
computeByteSize(): number;
|
|
307
|
+
/**
|
|
308
|
+
*
|
|
309
|
+
* @param {Sampler2D} other
|
|
310
|
+
* @return {boolean}
|
|
311
|
+
*/
|
|
312
|
+
equals(other: Sampler2D): boolean;
|
|
313
|
+
/**
|
|
314
|
+
*
|
|
315
|
+
* @return {number}
|
|
316
|
+
*/
|
|
317
|
+
hash(): number;
|
|
318
|
+
/**
|
|
319
|
+
* @returns {Sampler2D}
|
|
320
|
+
*/
|
|
321
|
+
clone(): Sampler2D;
|
|
322
|
+
toJSON(): {
|
|
323
|
+
height: number;
|
|
324
|
+
width: number;
|
|
325
|
+
itemSize: number;
|
|
326
|
+
type: import("../../../../core/binary/type/BinaryDataType.js").BinaryDataType;
|
|
327
|
+
data: string;
|
|
328
|
+
};
|
|
329
|
+
fromJSON({ height, width, itemSize, type, data }: {
|
|
330
|
+
height: any;
|
|
331
|
+
width: any;
|
|
332
|
+
itemSize: any;
|
|
333
|
+
type: any;
|
|
334
|
+
data: any;
|
|
335
|
+
}): void;
|
|
336
|
+
/**
|
|
337
|
+
* @deprecated use {@link write} instead
|
|
338
|
+
*/
|
|
339
|
+
set: (x: number, y: number, texel: number[] | ArrayLike<number>) => void;
|
|
340
|
+
/**
|
|
341
|
+
* @readonly
|
|
342
|
+
* @type {boolean}
|
|
343
|
+
*/
|
|
344
|
+
readonly isSampler2D: boolean;
|
|
345
|
+
}
|
|
346
|
+
export namespace Sampler2D {
|
|
347
|
+
let typeName: string;
|
|
348
|
+
}
|
|
349
|
+
//# sourceMappingURL=Sampler2D.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DieBehavior.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/intelligence/behavior/ecs/DieBehavior.js"],"names":[],"mappings":"AAGA;IAGI,6BAEC;IAED,qCASC;CACJ;+
|
|
1
|
+
{"version":3,"file":"DieBehavior.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/intelligence/behavior/ecs/DieBehavior.js"],"names":[],"mappings":"AAGA;;GAEG;AACH;IAGI,6BAEC;IAED,qCASC;CACJ;+BAtB8B,qBAAqB;+BADrB,sBAAsB"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { BehaviorStatus } from "../BehaviorStatus.js";
|
|
2
2
|
import { EntityBehavior } from "./EntityBehavior.js";
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* Makes the entity destroy itself
|
|
6
|
+
*/
|
|
4
7
|
export class DieBehavior extends EntityBehavior {
|
|
5
8
|
|
|
6
9
|
|
|
@@ -19,3 +22,4 @@ export class DieBehavior extends EntityBehavior {
|
|
|
19
22
|
|
|
20
23
|
}
|
|
21
24
|
}
|
|
25
|
+
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Causes another entity to be destroyed
|
|
3
|
+
* Will produce a {@link BehaviorStatus.Failed} if entity could not be destroyed, either because it doesn't exist or the reference is stale
|
|
4
|
+
*/
|
|
5
|
+
export class KillBehavior extends EntityBehavior {
|
|
6
|
+
/**
|
|
7
|
+
*
|
|
8
|
+
* @param {EntityReference} ref
|
|
9
|
+
* @returns {KillBehavior}
|
|
10
|
+
*/
|
|
11
|
+
static create(ref: EntityReference): KillBehavior;
|
|
12
|
+
tick(timeDelta: any): BehaviorStatus.Succeeded | BehaviorStatus.Failed;
|
|
13
|
+
#private;
|
|
14
|
+
}
|
|
15
|
+
import { EntityBehavior } from "./EntityBehavior.js";
|
|
16
|
+
import { BehaviorStatus } from "../BehaviorStatus.js";
|
|
17
|
+
//# sourceMappingURL=KillBehavior.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KillBehavior.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/intelligence/behavior/ecs/KillBehavior.js"],"names":[],"mappings":"AAIA;;;GAGG;AACH;IAOI;;;;OAIG;IACH,mBAHW,eAAe,GACb,YAAY,CAYxB;IAED,uEAaC;;CACJ;+BA5C8B,qBAAqB;+BADrB,sBAAsB"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { assert } from "../../../../core/assert.js";
|
|
2
|
+
import { BehaviorStatus } from "../BehaviorStatus.js";
|
|
3
|
+
import { EntityBehavior } from "./EntityBehavior.js";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Causes another entity to be destroyed
|
|
7
|
+
* Will produce a {@link BehaviorStatus.Failed} if entity could not be destroyed, either because it doesn't exist or the reference is stale
|
|
8
|
+
*/
|
|
9
|
+
export class KillBehavior extends EntityBehavior {
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* @type {EntityReference}
|
|
13
|
+
*/
|
|
14
|
+
#ref;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @param {EntityReference} ref
|
|
19
|
+
* @returns {KillBehavior}
|
|
20
|
+
*/
|
|
21
|
+
static create(ref) {
|
|
22
|
+
assert.defined(ref, 'ref');
|
|
23
|
+
assert.isObject(ref, 'ref');
|
|
24
|
+
assert.equal(ref.isEntityReference, true, 'ref.isEntityReference !== true');
|
|
25
|
+
|
|
26
|
+
const r = new KillBehavior();
|
|
27
|
+
|
|
28
|
+
r.#ref = ref;
|
|
29
|
+
|
|
30
|
+
return r;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
tick(timeDelta) {
|
|
34
|
+
|
|
35
|
+
const ecd = this.ecd;
|
|
36
|
+
|
|
37
|
+
if (this.#ref.destroy(ecd)) {
|
|
38
|
+
|
|
39
|
+
return BehaviorStatus.Succeeded;
|
|
40
|
+
|
|
41
|
+
} else {
|
|
42
|
+
// couldn't find
|
|
43
|
+
return BehaviorStatus.Failed;
|
|
44
|
+
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Cascading blackboard interface. Allows composition of multiple blackboard to be used to represent a single whole
|
|
3
|
-
*
|
|
3
|
+
* The access is always done from top to bottom. If a value is not found at the top of the stack, a lower slot will be considered until the end. In which case value will be created in the blackboard identified by "write_slot"
|
|
4
4
|
*/
|
|
5
5
|
export class BlackboardStack extends AbstractBlackboard {
|
|
6
6
|
/**
|
|
@@ -2,7 +2,7 @@ import { AbstractBlackboard } from "./AbstractBlackboard.js";
|
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Cascading blackboard interface. Allows composition of multiple blackboard to be used to represent a single whole
|
|
5
|
-
*
|
|
5
|
+
* The access is always done from top to bottom. If a value is not found at the top of the stack, a lower slot will be considered until the end. In which case value will be created in the blackboard identified by "write_slot"
|
|
6
6
|
*/
|
|
7
7
|
export class BlackboardStack extends AbstractBlackboard {
|
|
8
8
|
constructor() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PathFollowerSerializationAdapter.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/navigation/ecs/path_following/PathFollowerSerializationAdapter.js"],"names":[],"mappings":"AAGA;IAEI,2BAAqB;IAGrB;;;;OAIG;IACH,kBAHW,YAAY,SACZ,YAAY,
|
|
1
|
+
{"version":3,"file":"PathFollowerSerializationAdapter.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/navigation/ecs/path_following/PathFollowerSerializationAdapter.js"],"names":[],"mappings":"AAGA;IAEI,2BAAqB;IAGrB;;;;OAIG;IACH,kBAHW,YAAY,SACZ,YAAY,QAUtB;IAED;;;;OAIG;IACH,oBAHW,YAAY,SACZ,YAAY,QAUtB;CACJ;gDArC+C,gEAAgE;yBACvF,mBAAmB"}
|
|
@@ -4,7 +4,7 @@ import PathFollower from "./PathFollower.js";
|
|
|
4
4
|
export class PathFollowerSerializationAdapter extends BinaryClassSerializationAdapter {
|
|
5
5
|
|
|
6
6
|
klass = PathFollower;
|
|
7
|
-
version =
|
|
7
|
+
version = 4;
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
*
|
|
@@ -18,6 +18,7 @@ export class PathFollowerSerializationAdapter extends BinaryClassSerializationAd
|
|
|
18
18
|
buffer.writeFloat32(value.rotationSpeed.getValue());
|
|
19
19
|
|
|
20
20
|
buffer.writeFloat32(value.maxMoveDistance);
|
|
21
|
+
buffer.writeFloat32(value.position); // Serialize position
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
/**
|
|
@@ -32,5 +33,6 @@ export class PathFollowerSerializationAdapter extends BinaryClassSerializationAd
|
|
|
32
33
|
value.rotationSpeed.set(buffer.readFloat32());
|
|
33
34
|
|
|
34
35
|
value.maxMoveDistance = buffer.readFloat32();
|
|
36
|
+
value.position = buffer.readFloat32(); // Deserialize position
|
|
35
37
|
}
|
|
36
38
|
}
|
package/src/engine/navigation/ecs/path_following/PathFollowerSerializationUpgrader_2_3.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PathFollowerSerializationUpgrader_2_3.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/navigation/ecs/path_following/PathFollowerSerializationUpgrader_2_3.js"],"names":[],"mappings":"AAGA;
|
|
1
|
+
{"version":3,"file":"PathFollowerSerializationUpgrader_2_3.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/navigation/ecs/path_following/PathFollowerSerializationUpgrader_2_3.js"],"names":[],"mappings":"AAGA;IAII,wCAWC;CACJ;oCAlBmC,oDAAoD"}
|