@woosh/meep-engine 2.118.8 → 2.118.11
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 +202 -410
- package/build/meep.min.js +1 -1
- package/build/meep.module.js +202 -410
- package/editor/ecs/component/editors/Sampler2DEditor.js +2 -4
- package/package.json +1 -1
- package/samples/generation/SampleGenerator0.js +55 -55
- package/samples/generation/generators/interactive/mir_generator_place_buff_objects.js +21 -23
- package/samples/generation/generators/mir_generator_place_bases.js +20 -20
- package/samples/generation/generators/mir_generator_place_road_decorators.js +11 -11
- 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 +9 -7
- 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/queue/Deque.d.ts.map +1 -1
- package/src/core/collection/queue/Deque.js +1 -1
- package/src/core/geom/2d/quad-tree/qt_collect_data_all.d.ts +9 -0
- package/src/core/geom/2d/quad-tree/qt_collect_data_all.d.ts.map +1 -0
- package/src/core/geom/2d/quad-tree/qt_collect_data_all.js +29 -0
- 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/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/gaussian.d.ts.map +1 -1
- package/src/core/math/gaussian.js +4 -1
- package/src/core/math/physics/pdf/pdf_GGX.d.ts +3 -3
- package/src/core/math/physics/pdf/pdf_GGX.d.ts.map +1 -1
- package/src/core/math/physics/pdf/pdf_GGX.js +7 -6
- 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/model/ObservedBoolean.js +1 -1
- package/src/core/model/node-graph/json/deserializeNodeGraphFromJSON.d.ts +1 -1
- package/src/core/model/node-graph/json/deserializeNodeGraphFromJSON.js +7 -7
- package/src/core/model/object/validatedObjectValueByKey.js +1 -1
- package/src/core/model/reactive/transform/{ReactiveTypeInferrence.d.ts → inferReactiveExpressionTypes.d.ts} +1 -1
- package/src/core/model/reactive/transform/inferReactiveExpressionTypes.d.ts.map +1 -0
- package/src/core/model/reactive/transform/inferReactiveExpressionTypes.js +60 -0
- package/src/core/model/reactive/trigger/ReactiveTrigger.js +1 -1
- package/src/core/process/delay.d.ts.map +1 -1
- package/src/core/process/delay.js +6 -0
- package/src/core/process/task/TaskGroup.d.ts.map +1 -1
- package/src/core/process/task/TaskGroup.js +3 -8
- package/src/core/process/undo/ActionGroup.d.ts.map +1 -1
- package/src/core/process/undo/ActionGroup.js +6 -9
- 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/core/process/worker/extractTransferables.d.ts +3 -2
- package/src/core/process/worker/extractTransferables.d.ts.map +1 -1
- package/src/core/process/worker/extractTransferables.js +32 -12
- package/src/engine/ecs/dynamic_actions/rules/DynamicRuleDescription.d.ts.map +1 -1
- package/src/engine/ecs/dynamic_actions/rules/DynamicRuleDescription.js +3 -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/GraphicsEngine.d.ts.map +1 -1
- package/src/engine/graphics/GraphicsEngine.js +4 -0
- package/src/engine/graphics/ecs/camera/CameraSystem.d.ts.map +1 -1
- package/src/engine/graphics/ecs/camera/CameraSystem.js +4 -0
- 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/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/generation/grid/actions/ContinuousGridCellAction.d.ts.map +1 -1
- package/src/generation/grid/actions/ContinuousGridCellAction.js +6 -8
- package/src/generation/grid/actions/ContinuousGridCellActionSetTerrainHeight.d.ts.map +1 -1
- package/src/generation/grid/actions/ContinuousGridCellActionSetTerrainHeight.js +20 -22
- package/src/generation/grid/generation/GridTaskDensityMarkerDistribution.d.ts.map +1 -1
- package/src/generation/grid/generation/GridTaskDensityMarkerDistribution.js +23 -28
- package/src/generation/grid/generation/GridTaskExecuteRuleTimes.d.ts.map +1 -1
- package/src/generation/grid/generation/GridTaskExecuteRuleTimes.js +7 -10
- package/src/generation/grid/generation/GridTaskSequence.d.ts.map +1 -1
- package/src/generation/grid/generation/GridTaskSequence.js +2 -5
- package/src/generation/grid/generation/discrete/{GridTaskCellActionRuleSet.d.ts → GridTaskActionRuleSet.d.ts} +1 -1
- package/src/generation/grid/generation/discrete/GridTaskActionRuleSet.d.ts.map +1 -0
- package/src/generation/grid/generation/discrete/{GridTaskCellActionRuleSet.js → GridTaskActionRuleSet.js} +13 -16
- package/src/generation/grid/generation/discrete/GridTaskConnectRooms.d.ts.map +1 -1
- package/src/generation/grid/generation/discrete/GridTaskConnectRooms.js +51 -53
- package/src/generation/grid/generation/discrete/layer/GridTaskBuildSourceDistanceMap.d.ts.map +1 -1
- package/src/generation/grid/generation/discrete/layer/GridTaskBuildSourceDistanceMap.js +20 -23
- package/src/generation/grid/generation/grid/select/CellSupplierBestN.d.ts.map +1 -1
- package/src/generation/grid/generation/grid/select/CellSupplierBestN.js +38 -39
- package/src/generation/grid/generation/grid/select/CellSupplierPathUpHill.d.ts.map +1 -1
- package/src/generation/grid/generation/grid/select/CellSupplierPathUpHill.js +8 -11
- package/src/generation/grid/generation/road/PathEndPoint.d.ts.map +1 -1
- package/src/generation/grid/generation/road/PathEndPoint.js +8 -10
- package/src/generation/grid/generation/road/RoadConnection.d.ts.map +1 -1
- package/src/generation/grid/generation/road/RoadConnection.js +4 -5
- package/src/generation/markers/GridCellActionPlaceMarker.d.ts.map +1 -1
- package/src/generation/markers/GridCellActionPlaceMarker.js +7 -5
- package/src/view/common/LabelView.d.ts.map +1 -1
- package/src/view/common/LabelView.js +0 -3
- package/src/core/geom/3d/morton/Morton.d.ts.map +0 -1
- package/src/core/model/LinearValue.d.ts +0 -88
- package/src/core/model/LinearValue.d.ts.map +0 -1
- package/src/core/model/LinearValue.js +0 -140
- package/src/core/model/reactive/transform/ReactiveTypeInferrence.d.ts.map +0 -1
- package/src/core/model/reactive/transform/ReactiveTypeInferrence.js +0 -54
- 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/generation/grid/generation/discrete/GridTaskCellActionRuleSet.d.ts.map +0 -1
- /package/src/core/geom/3d/morton/{Morton.js → v3_morton_encode.js} +0 -0
|
@@ -4,15 +4,12 @@ import { Action } from "./Action.js";
|
|
|
4
4
|
* @template CTX
|
|
5
5
|
*/
|
|
6
6
|
export class ActionGroup extends Action {
|
|
7
|
-
constructor() {
|
|
8
|
-
super();
|
|
9
7
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
8
|
+
/**
|
|
9
|
+
* @private
|
|
10
|
+
* @type {Action[]}
|
|
11
|
+
*/
|
|
12
|
+
members = [];
|
|
16
13
|
|
|
17
14
|
/**
|
|
18
15
|
* @template T
|
|
@@ -58,7 +55,7 @@ export class ActionGroup extends Action {
|
|
|
58
55
|
for (let i = n - 1; i >= 0; i--) {
|
|
59
56
|
const action = members[i];
|
|
60
57
|
|
|
61
|
-
|
|
58
|
+
await action.revert(context);
|
|
62
59
|
}
|
|
63
60
|
}
|
|
64
61
|
}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
export default WorkerProxy;
|
|
2
2
|
declare class WorkerProxy {
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* @param {string} url
|
|
6
|
+
* @param {Object} methods
|
|
7
|
+
*/
|
|
8
|
+
constructor(url: string, methods: any);
|
|
4
9
|
/**
|
|
5
10
|
*
|
|
6
11
|
* @type {{}}
|
|
@@ -20,7 +25,7 @@ declare class WorkerProxy {
|
|
|
20
25
|
* @private
|
|
21
26
|
*/
|
|
22
27
|
private __id_counter;
|
|
23
|
-
url:
|
|
28
|
+
url: string;
|
|
24
29
|
methods: any;
|
|
25
30
|
/**
|
|
26
31
|
* Invoke a given method on the worker, as defined by the `WorkerBuilder`
|
|
@@ -36,7 +41,11 @@ declare class WorkerProxy {
|
|
|
36
41
|
* @private
|
|
37
42
|
*/
|
|
38
43
|
private __makeMethod;
|
|
39
|
-
|
|
44
|
+
/**
|
|
45
|
+
*
|
|
46
|
+
* @private
|
|
47
|
+
*/
|
|
48
|
+
private __generateAPI;
|
|
40
49
|
/**
|
|
41
50
|
*
|
|
42
51
|
* @param {Event} event
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkerProxy.d.ts","sourceRoot":"","sources":["../../../../../src/core/process/worker/WorkerProxy.js"],"names":[],"mappings":";AAqCA;IA0BI,
|
|
1
|
+
{"version":3,"file":"WorkerProxy.d.ts","sourceRoot":"","sources":["../../../../../src/core/process/worker/WorkerProxy.js"],"names":[],"mappings":";AAqCA;IA0BI;;;;OAIG;IACH,iBAHW,MAAM,gBAQhB;IAlCD;;;;OAIG;IACH,kBAAe;IAEf,qBAAoB;IAEpB;;;;OAIG;IACH,iBAAgB;IAEhB;;;;OAIG;IACH,qBAAiB;IASb,YAAc;IACd,aAAsB;IAK1B;;;;;;OAMG;IACH,wBAJW,MAAM,2BAmDhB;IAED;;;;OAIG;IACH,qBAeC;IAED;;;OAGG;IACH,sBAQC;IAED;;;;OAIG;IACH,wBAqCC;IAED,qBAEC;IAED,aAOC;IAED;;;;;OAKG;IACH,kBAJW,MAAM,eACN,MAAM,GACJ,OAAO,CAkCnB;IAED,4BAmBC;IAED,cAiBC;CACJ"}
|
|
@@ -61,11 +61,16 @@ class WorkerProxy {
|
|
|
61
61
|
__id_counter = 0;
|
|
62
62
|
|
|
63
63
|
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
* @param {string} url
|
|
67
|
+
* @param {Object} methods
|
|
68
|
+
*/
|
|
64
69
|
constructor(url, methods) {
|
|
65
70
|
this.url = url;
|
|
66
71
|
this.methods = methods;
|
|
67
72
|
|
|
68
|
-
this.__generateAPI(
|
|
73
|
+
this.__generateAPI();
|
|
69
74
|
}
|
|
70
75
|
|
|
71
76
|
/**
|
|
@@ -146,6 +151,10 @@ class WorkerProxy {
|
|
|
146
151
|
|
|
147
152
|
}
|
|
148
153
|
|
|
154
|
+
/**
|
|
155
|
+
*
|
|
156
|
+
* @private
|
|
157
|
+
*/
|
|
149
158
|
__generateAPI() {
|
|
150
159
|
|
|
151
160
|
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
*
|
|
3
|
-
* @param {*}
|
|
3
|
+
* @param {*} value
|
|
4
4
|
* @param {Array} result
|
|
5
|
+
* @returns {number} number of elements added to result array
|
|
5
6
|
* @preserve
|
|
6
7
|
*/
|
|
7
|
-
export function extractTransferables(
|
|
8
|
+
export function extractTransferables(value: any, result: any[]): number;
|
|
8
9
|
//# sourceMappingURL=extractTransferables.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extractTransferables.d.ts","sourceRoot":"","sources":["../../../../../src/core/process/worker/extractTransferables.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"extractTransferables.d.ts","sourceRoot":"","sources":["../../../../../src/core/process/worker/extractTransferables.js"],"names":[],"mappings":"AAGA;;;;;;GAMG;AACH,iEAHa,MAAM,CAqClB"}
|
|
@@ -1,25 +1,45 @@
|
|
|
1
1
|
import { isImageBitmap } from "../../../engine/graphics/texture/isImageBitmap.js";
|
|
2
|
+
import { array_push_if_unique } from "../../collection/array/array_push_if_unique.js";
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
*
|
|
5
|
-
* @param {*}
|
|
6
|
+
* @param {*} value
|
|
6
7
|
* @param {Array} result
|
|
8
|
+
* @returns {number} number of elements added to result array
|
|
7
9
|
* @preserve
|
|
8
10
|
*/
|
|
9
|
-
export function extractTransferables(
|
|
10
|
-
|
|
11
|
+
export function extractTransferables(value, result) {
|
|
12
|
+
let count = 0;
|
|
13
|
+
|
|
14
|
+
if (typeof value !== "object") {
|
|
15
|
+
|
|
11
16
|
// not an object, skip
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
result
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
|
|
18
|
+
} else if (value instanceof ArrayBuffer) {
|
|
19
|
+
|
|
20
|
+
if (array_push_if_unique(result, value)) {
|
|
21
|
+
count++;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
} else if (value.buffer instanceof ArrayBuffer) {
|
|
25
|
+
|
|
26
|
+
if (array_push_if_unique(result, value.buffer)) {
|
|
27
|
+
count++;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
} else if (isImageBitmap(value)) {
|
|
31
|
+
|
|
32
|
+
if (array_push_if_unique(result, value)) {
|
|
33
|
+
count++;
|
|
34
|
+
}
|
|
35
|
+
|
|
18
36
|
} else {
|
|
19
|
-
for (let i in
|
|
20
|
-
if (
|
|
21
|
-
extractTransferables(
|
|
37
|
+
for (let i in value) {
|
|
38
|
+
if (value.hasOwnProperty(i)) {
|
|
39
|
+
count += extractTransferables(value[i], result);
|
|
22
40
|
}
|
|
23
41
|
}
|
|
24
42
|
}
|
|
43
|
+
|
|
44
|
+
return count;
|
|
25
45
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DynamicRuleDescription.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/ecs/dynamic_actions/rules/DynamicRuleDescription.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DynamicRuleDescription.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/ecs/dynamic_actions/rules/DynamicRuleDescription.js"],"names":[],"mappings":"AAUA;IACI;;;OAGG;IACH,IAFU,MAAM,CAEG;IAEnB;;;OAGG;IACH,8BAAiB;IACjB;;;OAGG;IACH,kCAAc;IACd;;;OAGG;IACH,YAFU,mBAAmB,CAEb;IAChB;;;OAGG;IACH,UAFU,MAAM,CAEH;IACb;;;OAGG;IACH,6BAAyB;IACzB;;;OAGG;IACH,kBAFU,8BAA8B,EAAE,CAEpB;IAEtB;;;;OAIG;IACH,cAHW,sBAAsB,GACpB,OAAO,CAInB;IAED;;;OAGG;IACH,0BAFa,MAAM,CAIlB;IAED,yCAEC;IAED,cA+BC;IAED;;;;;;aA2BC;CACJ;+CA1H8C,qCAAqC"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { assert } from "../../../../core/assert.js";
|
|
2
2
|
import { compileReactiveExpression } from "../../../../core/lang/reactive/compileReactiveExpression.js";
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
inferReactiveExpressionTypes
|
|
5
|
+
} from "../../../../core/model/reactive/transform/inferReactiveExpressionTypes.js";
|
|
4
6
|
import DataType from "../../../../core/parser/simple/DataType.js";
|
|
5
7
|
import { UUID } from "../../guid/UUID.js";
|
|
6
8
|
import { deserializeActionFromJSON } from "../actions/definition/deserializeActionFromJSON.js";
|
|
@@ -1,21 +1,6 @@
|
|
|
1
1
|
export default Builder;
|
|
2
2
|
declare namespace Builder {
|
|
3
|
-
export {
|
|
3
|
+
export { build_height_field_geometry as build };
|
|
4
4
|
}
|
|
5
|
-
|
|
6
|
-
*
|
|
7
|
-
* @param {Sampler2D} samplerHeight
|
|
8
|
-
* @param {Vector2} position
|
|
9
|
-
* @param {Vector2} size
|
|
10
|
-
* @param {Vector2} scale
|
|
11
|
-
* @param {Vector2} totalSize
|
|
12
|
-
* @param {number} resolution
|
|
13
|
-
* @returns {{indices, vertices: Float32Array, normals: Float32Array, uvs: Float32Array}}
|
|
14
|
-
*/
|
|
15
|
-
declare function buildBufferGeometry(samplerHeight: Sampler2D, position: Vector2, size: Vector2, scale: Vector2, totalSize: Vector2, resolution: number): {
|
|
16
|
-
indices: any;
|
|
17
|
-
vertices: Float32Array;
|
|
18
|
-
normals: Float32Array;
|
|
19
|
-
uvs: Float32Array;
|
|
20
|
-
};
|
|
5
|
+
import { build_height_field_geometry } from "../../graphics/geometry/buffered/build_height_field_geometry.js";
|
|
21
6
|
//# sourceMappingURL=BufferedGeometryArraysBuilder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BufferedGeometryArraysBuilder.d.ts","sourceRoot":"","sources":["../../../../../src/engine/ecs/terrain/BufferedGeometryArraysBuilder.js"],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"BufferedGeometryArraysBuilder.d.ts","sourceRoot":"","sources":["../../../../../src/engine/ecs/terrain/BufferedGeometryArraysBuilder.js"],"names":[],"mappings":";;;;4CAA4C,iEAAiE"}
|
|
@@ -1,123 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
geometry_compute_vertex_normals_indexed
|
|
3
|
-
} from '../../graphics/geometry/buffered/geometry_compute_vertex_normals_indexed.js';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
*
|
|
7
|
-
* @param {Sampler2D} samplerHeight
|
|
8
|
-
* @param {Vector2} position
|
|
9
|
-
* @param {Vector2} size
|
|
10
|
-
* @param {Vector2} scale
|
|
11
|
-
* @param {Vector2} totalSize
|
|
12
|
-
* @param {number} resolution
|
|
13
|
-
* @returns {{indices, vertices: Float32Array, normals: Float32Array, uvs: Float32Array}}
|
|
14
|
-
*/
|
|
15
|
-
function buildBufferGeometry(samplerHeight, position, size, scale, totalSize, resolution) {
|
|
16
|
-
|
|
17
|
-
const width = size.x;
|
|
18
|
-
const height = size.y;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
const gridX1 = width * resolution;
|
|
22
|
-
const gridY1 = height * resolution;
|
|
23
|
-
|
|
24
|
-
const gridX2 = gridX1 - 1;
|
|
25
|
-
const gridY2 = gridY1 - 1;
|
|
26
|
-
|
|
27
|
-
let offset = 0, offset2 = 0;
|
|
28
|
-
|
|
29
|
-
const vertexCount = gridX1 * gridY1;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
const vertices = new Float32Array(vertexCount * 3);
|
|
33
|
-
|
|
34
|
-
const normals = new Float32Array(vertexCount * 3);
|
|
35
|
-
|
|
36
|
-
const uvs = new Float32Array(vertexCount * 2);
|
|
37
|
-
|
|
38
|
-
let y, x;
|
|
39
|
-
|
|
40
|
-
const vMultiplier = (size.y / totalSize.y) / gridY2;
|
|
41
|
-
const uMultiplier = (size.x / totalSize.x) / gridX2;
|
|
42
|
-
|
|
43
|
-
const vConst = position.y / totalSize.y;
|
|
44
|
-
const uConst = position.x / totalSize.x;
|
|
45
|
-
|
|
46
|
-
const totalScaledSizeX = totalSize.x * scale.x;
|
|
47
|
-
const totalScaledSizeY = totalSize.y * scale.y;
|
|
48
|
-
|
|
49
|
-
//fill vertices
|
|
50
|
-
let px, py, pz;
|
|
51
|
-
for (y = 0; y < gridY1; y++) {
|
|
52
|
-
|
|
53
|
-
const v = y * vMultiplier + vConst;
|
|
54
|
-
|
|
55
|
-
pz = v * totalScaledSizeY;
|
|
56
|
-
|
|
57
|
-
for (x = 0; x < gridX1; x++) {
|
|
58
|
-
|
|
59
|
-
const u = x * uMultiplier + uConst;
|
|
60
|
-
|
|
61
|
-
//get height sample
|
|
62
|
-
const val = samplerHeight.sampleChannelBicubicUV(u, v, 0);
|
|
63
|
-
|
|
64
|
-
px = u * totalScaledSizeX;
|
|
65
|
-
py = val;
|
|
66
|
-
|
|
67
|
-
vertices[offset] = px;
|
|
68
|
-
vertices[offset + 1] = py;
|
|
69
|
-
vertices[offset + 2] = pz;
|
|
70
|
-
|
|
71
|
-
uvs[offset2] = u;
|
|
72
|
-
uvs[offset2 + 1] = v;
|
|
73
|
-
|
|
74
|
-
offset += 3;
|
|
75
|
-
offset2 += 2;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
offset = 0;
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* @type {Uint16Array|Uint32Array}
|
|
83
|
-
*/
|
|
84
|
-
const indices = new ((vertices.length / 3) > 65535 ? Uint32Array : Uint16Array)(gridX2 * gridY2 * 6);
|
|
85
|
-
|
|
86
|
-
//add faces
|
|
87
|
-
//TODO TraingleStip mode is more efficient in terms of memory usage and probably GPU-time
|
|
88
|
-
for (y = 0; y < gridY2; y++) {
|
|
89
|
-
|
|
90
|
-
for (x = 0; x < gridX2; x++) {
|
|
91
|
-
const a = x + gridX1 * y;
|
|
92
|
-
const b = x + gridX1 * (y + 1);
|
|
93
|
-
const c = (x + 1) + gridX1 * (y + 1);
|
|
94
|
-
const d = (x + 1) + gridX1 * y;
|
|
95
|
-
|
|
96
|
-
indices[offset] = a;
|
|
97
|
-
indices[offset + 1] = b;
|
|
98
|
-
indices[offset + 2] = d;
|
|
99
|
-
|
|
100
|
-
indices[offset + 3] = b;
|
|
101
|
-
indices[offset + 4] = c;
|
|
102
|
-
indices[offset + 5] = d;
|
|
103
|
-
|
|
104
|
-
offset += 6;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
geometry_compute_vertex_normals_indexed(vertices, normals, indices);
|
|
109
|
-
|
|
110
|
-
//CleanupGeometry(geometry);
|
|
111
|
-
return {
|
|
112
|
-
indices: indices,
|
|
113
|
-
vertices: vertices,
|
|
114
|
-
normals: normals,
|
|
115
|
-
uvs: uvs
|
|
116
|
-
};
|
|
117
|
-
}
|
|
1
|
+
import { build_height_field_geometry } from "../../graphics/geometry/buffered/build_height_field_geometry.js";
|
|
118
2
|
|
|
119
3
|
const Builder = {
|
|
120
|
-
build:
|
|
4
|
+
build: build_height_field_geometry
|
|
121
5
|
};
|
|
122
6
|
|
|
123
7
|
export default Builder;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClingToTerrain.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/ecs/terrain/ecs/cling/ClingToTerrain.js"],"names":[],"mappings":";AAGA;
|
|
1
|
+
{"version":3,"file":"ClingToTerrain.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/ecs/terrain/ecs/cling/ClingToTerrain.js"],"names":[],"mappings":";AAGA;IAyDI;;;;OAIG;IACH,4BAFa,cAAc,CAQ1B;IAnED;;OAEG;IACH,aAFU,OAAO,CAEG;IACpB;;;OAGG;IACH,gBAFU,OAAO,CAEqB;IACtC;;;OAGG;IACH,gBAFU,UAAU,CAEwB;IAE5C;;;OAGG;IACH,eAFU,MAAM,CAEE;IAElB;;;;OAIG;IACH,cAHW,cAAc,GACZ,OAAO,CAKnB;IAED;;;OAGG;IACH,QAFa,MAAM,CAIlB;IAED;;;MAKC;IAED;;;aAQC;CAcJ;;;;oBAvEmB,qCAAqC;uBADlC,wCAAwC"}
|
|
@@ -16,18 +16,13 @@ class ClingToTerrain {
|
|
|
16
16
|
* @type {Quaternion}
|
|
17
17
|
*/
|
|
18
18
|
__lastRotation = new Quaternion(0, 0, 0, 1);
|
|
19
|
+
|
|
19
20
|
/**
|
|
20
21
|
* Speed in Rad/s (Radians/second) by which rotation can change
|
|
21
22
|
* @type {number}
|
|
22
23
|
*/
|
|
23
24
|
rotationSpeed = 3;
|
|
24
25
|
|
|
25
|
-
constructor(opt) {
|
|
26
|
-
if (opt !== undefined) {
|
|
27
|
-
throw new Error("constructor options deprecated");
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
26
|
/**
|
|
32
27
|
*
|
|
33
28
|
* @param {ClingToTerrain} other
|
|
@@ -11,10 +11,6 @@ export default ClingToTerrainSystem;
|
|
|
11
11
|
import Quaternion from "../../../../../core/geom/Quaternion.js";
|
|
12
12
|
import Vector3 from '../../../../../core/geom/Vector3.js';
|
|
13
13
|
declare class ClingToTerrainSystem extends System<any, any, any, any, any> {
|
|
14
|
-
/**
|
|
15
|
-
*
|
|
16
|
-
* @constructor
|
|
17
|
-
*/
|
|
18
14
|
constructor();
|
|
19
15
|
dependencies: (typeof Transform | typeof ClingToTerrain)[];
|
|
20
16
|
components_used: (ResourceAccessSpecification<typeof Transform> | ResourceAccessSpecification<typeof Terrain>)[];
|
|
@@ -29,7 +25,11 @@ declare class ClingToTerrainSystem extends System<any, any, any, any, any> {
|
|
|
29
25
|
* @type {number}
|
|
30
26
|
*/
|
|
31
27
|
updateBatchLimit: number;
|
|
32
|
-
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @param {number} entity
|
|
31
|
+
*/
|
|
32
|
+
requestUpdate(entity: number): void;
|
|
33
33
|
/**
|
|
34
34
|
*
|
|
35
35
|
* @param {Transform} transform
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClingToTerrainSystem.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/ecs/terrain/ecs/cling/ClingToTerrainSystem.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ClingToTerrainSystem.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/ecs/terrain/ecs/cling/ClingToTerrainSystem.js"],"names":[],"mappings":"AA2LA;;;;;;;GAOG;AACH,wCANW,UAAU,aACV,OAAO,gBACP,MAAM,yCAgDhB;;uBA3OsB,wCAAwC;oBAE3C,qCAAqC;AAyCzD;IA5CmB,cAAmB;IA+ClC,2DAA2C;IAG3C,iHAGE;IAEF;;;OAGG;IACH,aAFU,MAAM,MAAM,CAAC,CAEG;IAE1B,YAAU;IAEV;;;OAGG;IACH,kBAFU,MAAM,CAEwB;IAExC;;;OAGG;IACH,sBAFW,MAAM,QAOhB;IAED;;;;;OAKG;IACH,YAHW,cAAc,aADd,SAAS,uBAkBnB;IAED;;;;;OAKG;IACH,cAHW,cAAc,aADd,SAAS,uBAkBnB;IAED,6BAiDC;CACJ;uBArKsB,oBAAoB;0BACjB,iCAAiC;2BAIhC,qBAAqB;4CANJ,0DAA0D;oBAIlF,eAAe;sBAbb,+CAA+C"}
|
|
@@ -46,42 +46,34 @@ function deregister(datum) {
|
|
|
46
46
|
const DEFAULT_UPDATE_LIMIT = 1024;
|
|
47
47
|
|
|
48
48
|
class ClingToTerrainSystem extends System {
|
|
49
|
-
/**
|
|
50
|
-
*
|
|
51
|
-
* @constructor
|
|
52
|
-
*/
|
|
53
|
-
constructor() {
|
|
54
|
-
super();
|
|
55
49
|
|
|
56
|
-
this.dependencies = [ClingToTerrain, Transform];
|
|
57
50
|
|
|
51
|
+
dependencies = [ClingToTerrain, Transform];
|
|
58
52
|
|
|
59
|
-
this.components_used = [
|
|
60
|
-
ResourceAccessSpecification.from(Transform, ResourceAccessKind.Read | ResourceAccessKind.Write),
|
|
61
|
-
ResourceAccessSpecification.from(Terrain, ResourceAccessKind.Read)
|
|
62
|
-
];
|
|
63
53
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
this.entityManager = null;
|
|
54
|
+
components_used = [
|
|
55
|
+
ResourceAccessSpecification.from(Transform, ResourceAccessKind.Read | ResourceAccessKind.Write),
|
|
56
|
+
ResourceAccessSpecification.from(Terrain, ResourceAccessKind.Read)
|
|
57
|
+
];
|
|
69
58
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
59
|
+
/**
|
|
60
|
+
*
|
|
61
|
+
* @type {Deque<number>}
|
|
62
|
+
*/
|
|
63
|
+
updateQueue = new Deque();
|
|
75
64
|
|
|
76
|
-
|
|
65
|
+
data = [];
|
|
77
66
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
}
|
|
67
|
+
/**
|
|
68
|
+
* How many entities can be updated in a single tick, this is useful for performance optimization, if you have a large number of entities that need to be updated, updates can be executed over several ticks
|
|
69
|
+
* @type {number}
|
|
70
|
+
*/
|
|
71
|
+
updateBatchLimit = DEFAULT_UPDATE_LIMIT;
|
|
84
72
|
|
|
73
|
+
/**
|
|
74
|
+
*
|
|
75
|
+
* @param {number} entity
|
|
76
|
+
*/
|
|
85
77
|
requestUpdate(entity) {
|
|
86
78
|
if (!this.updateQueue.has(entity)) {
|
|
87
79
|
//queue up update
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TerrainLayer.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/ecs/terrain/ecs/layers/TerrainLayer.js"],"names":[],"mappings":"AA2BA;IA+CI;;;;;OAKG;IACH,iBAJW,MAAM,SACN,MAAM,UACN,MAAM,gBAShB;IAED;;;;OAIG;IACH,oDAFa,YAAY,CAQxB;IAvED;;;OAGG;IACH,0BAAuB;IAEvB;;;OAGG;IACH,SAFU,SAAS,CAEgB;IAEnC;;;OAGG;IACH,MAFU,OAAO,CAEQ;IAEzB;;;OAGG;IACH,WAAW;IAEX;;;OAGG;IACH,WAFU,MAAM,CAES;IAGzB;;;;MAMC;IAED;;;;aAIC;IA8BD;;;;OAIG;IACH,0DAwDC;IAGL;;;OAGG;IACH,yBAFU,OAAO,CAEoB;CANpC;
|
|
1
|
+
{"version":3,"file":"TerrainLayer.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/ecs/terrain/ecs/layers/TerrainLayer.js"],"names":[],"mappings":"AA2BA;IA+CI;;;;;OAKG;IACH,iBAJW,MAAM,SACN,MAAM,UACN,MAAM,gBAShB;IAED;;;;OAIG;IACH,oDAFa,YAAY,CAQxB;IAvED;;;OAGG;IACH,0BAAuB;IAEvB;;;OAGG;IACH,SAFU,SAAS,CAEgB;IAEnC;;;OAGG;IACH,MAFU,OAAO,CAEQ;IAEzB;;;OAGG;IACH,WAAW;IAEX;;;OAGG;IACH,WAFU,MAAM,CAES;IAGzB;;;;MAMC;IAED;;;;aAIC;IA8BD;;;;OAIG;IACH,0DAwDC;IAGL;;;OAGG;IACH,yBAFU,OAAO,CAEoB;CANpC;0BA9JyB,mDAAmD;oBAJzD,qCAAqC;mBADtC,6CAA6C"}
|
|
@@ -4,8 +4,8 @@ import Vector2 from "../../../../../core/geom/Vector2.js";
|
|
|
4
4
|
import { computeStringHash } from "../../../../../core/primitives/strings/computeStringHash.js";
|
|
5
5
|
import { string_compute_byte_size } from "../../../../../core/primitives/strings/string_compute_byte_size.js";
|
|
6
6
|
import { GameAssetType } from "../../../../asset/GameAssetType.js";
|
|
7
|
-
import { copy_Sampler2D_channel_data } from "../../../../graphics/texture/sampler/copy_Sampler2D_channel_data.js";
|
|
8
7
|
import { Sampler2D } from "../../../../graphics/texture/sampler/Sampler2D.js";
|
|
8
|
+
import { sampler2d_transfer_data } from "../../../../graphics/texture/sampler/sampler2d_transfer_data.js";
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
*
|
|
@@ -149,7 +149,7 @@ export class TerrainLayer {
|
|
|
149
149
|
|
|
150
150
|
const source = new Sampler2D(source_data, source_item_size, image.width, image.height);
|
|
151
151
|
|
|
152
|
-
|
|
152
|
+
sampler2d_transfer_data(source, this.diffuse);
|
|
153
153
|
|
|
154
154
|
this.onChanged.send0();
|
|
155
155
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TerrainTile.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/ecs/terrain/tiles/TerrainTile.js"],"names":[],"mappings":";AAgCA;;GAEG;AACH;IACI,sBAA6B;IAC7B,eAA0B;IAC1B,
|
|
1
|
+
{"version":3,"file":"TerrainTile.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/ecs/terrain/tiles/TerrainTile.js"],"names":[],"mappings":";AAgCA;;GAEG;AACH;IACI,sBAA6B;IAC7B,eAA0B;IAC1B,cAAyB;IACzB,kBAAyB;IACzB,4BAAoC;IAEpC;;;OAGG;IACH,mBAAgB;IAChB,uGAAiE;IAGjE;;;OAGG;IACH,UAFU,MAAM,cAAc,CAEd;IAEhB;;;OAGG;IACH,WAFU,OAAO,CAEA;IAEjB;;;OAGG;IACH,cAFU,SAAS,CAEY;IAE/B;;;OAGG;IACH,KAFU,eAAe,CAEd;IAEX;;;OAGG;IACH,SAFU,OAAO,CAED;IAChB;;;OAGG;IACH,mBAFU,OAAO,CAES;IAC1B,uBAAmB;IAEnB;;;OAGG;IACH,SAFU,OAAO,WAAW,CAAC,CAEN;IACvB,4DAA2B;IAE3B;;;;OAIG;IACH,kBAWE;IAEF;;;;;OAKG;IACH,+BAAiG;IAEjG;;;OAGG;IACH,SAFU,MAAM,CAEJ;IAqBZ;;;OAGG;IACH,6BAGC;IAfD;;;OAGG;IACH,0BAEC;IAWD;;;;;;;;;;OAUG;IACH,yBATW,aAAa,WACb,MAAM,WACN,MAAM,WACN,MAAM,cACN,MAAM,cACN,MAAM,cACN,MAAM,GACL,OAAO,CAkDlB;IAED,+CAKC;IAED,8CAOC;IAED;;;;;;;;;;OAUG;IACH,mBATW,WAAW,GAAC,SAAS,UACrB,WAAW,GAAC,SAAS,QACrB,WAAW,GAAC,SAAS,SACrB,WAAW,GAAC,SAAS,WACrB,WAAW,GAAC,SAAS,YACrB,WAAW,GAAC,SAAS,cACrB,WAAW,GAAC,SAAS,eACrB,WAAW,GAAC,SAAS,QAsN/B;IAED,2BAmFC;IAED;;;;OAIG;IACH,mCAHW,MAAM,cACN,MAAM,QAIhB;IAED,gBAYC;IAED;;;;OAIG;IACH,gBAHW;QAAC,QAAQ,CAAC;QAAC,GAAG,CAAC,EAAC;YAAC,UAAU,EAAC,MAAM,CAAC;YAAC,IAAI,EAAC,WAAW,CAAA;SAAC,CAAA;KAAC,QAoDhE;CACJ;oBAzlBmB,kCAAkC;4BAG1B,2CAA2C;sDAZhE,OAAO;0BAEY,yCAAyC;gCADnC,mDAAmD;mBAGhE,0CAA0C;8BAI/B,2CAA2C"}
|
|
@@ -36,7 +36,7 @@ const m4_tmp = [];
|
|
|
36
36
|
class TerrainTile {
|
|
37
37
|
gridPosition = new Vector2();
|
|
38
38
|
scale = new Vector2(1, 1);
|
|
39
|
-
size = new Vector2();
|
|
39
|
+
size = new Vector2(1, 1);
|
|
40
40
|
position = new Vector2();
|
|
41
41
|
resolution = new ObservedInteger(1);
|
|
42
42
|
|
|
@@ -506,6 +506,7 @@ class TerrainTile {
|
|
|
506
506
|
|
|
507
507
|
geometry.boundingSphere = new ThreeSphere(center, radius);
|
|
508
508
|
}
|
|
509
|
+
|
|
509
510
|
//pull bounding box from geometry
|
|
510
511
|
|
|
511
512
|
bb = geometry.boundingBox;
|
|
@@ -513,6 +514,7 @@ class TerrainTile {
|
|
|
513
514
|
geometry.computeBoundingBox();
|
|
514
515
|
bb = geometry.boundingBox;
|
|
515
516
|
}
|
|
517
|
+
|
|
516
518
|
}
|
|
517
519
|
|
|
518
520
|
const x0 = bb.min.x;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GraphicsEngine.d.ts","sourceRoot":"","sources":["../../../../src/engine/graphics/GraphicsEngine.js"],"names":[],"mappings":"AA0DA;
|
|
1
|
+
{"version":3,"file":"GraphicsEngine.d.ts","sourceRoot":"","sources":["../../../../src/engine/graphics/GraphicsEngine.js"],"names":[],"mappings":"AA0DA;IAOI;;;;;OAKG;IACH,+BAJW,MAAM,EAuKhB;IA7KD,gCAEC;IAgBG;;;;OAIG;IACH,2BAA+C;IAK/C;;;;;QAOI;;WAEG;;QAEH;;WAEG;;;;;MAMN;IAED;;OAEG;IACH,YAFU,OAAO,CAEe;IAEhC;;;OAGG;IACH,QAFU,kBAAkB,CAEU;IAWtC;;;OAGG;IACH,aAAkB;IAGlB;;;OAGG;IACH,cAFU,KAAK,CAEgB;IAK/B;;;OAGG;IACH,QAFU,MAAM,CAEI;IAEpB;;;OAGG;IACH,UAFU,aAAa,CAEH;IAGpB,+BAA0C;IAU1C;;OAEG;IACH,eAA+B;IAI/B;;;OAGG;IACH,uBAFU,kBAAkB,CAEgB;IAE5C;;;OAGG;IACH,oBAFU,iBAAiB,CAEsB;IAEjD;;;OAGG;IACH,gBAFU,iBAAiB,CAES;IAEpC;;;OAGG;IACH,sBAAoC;IAGpC;;;;OAIG;IACH,UAFU,OAAO,CAEG;IAEpB;;;OAGG;IACH,UAFU,OAAO,CAEG;IAEpB;;;OAGG;IACH,YAFU,MAAM,CAEG;IACnB,kKAcI;IAGR;;;OAGG;IACH,sBAFa,eAAe,CAI3B;IAED;;;OAGG;IACH,eAFa,aAAa,CAIzB;IAED,mBA0BC;IAED;;;OAGG;IACH,iCAOC;IAED;;;OAGG;IACH,0BAFa,MAAM,CAIlB;IAED,+BAcC;IAED,cAgEC;IAzBsB,8BAA0C;IA2BjE;;;OAGG;IACH,cAFa,MAAM,CAYlB;IAED;;OAEG;IACH,aAQC;IAED;;OAEG;IACH,yBAQC;IAED;;;;;;OAMG;IACH,yBALW,MAAM,KACN,MAAM,6CAMhB;IAED;;;;OAIG;IACH,8BAHW,iBAAe,UACf,iBAAe,QAczB;IAED;;;;;OAKG;IACH,8BAQC;IAED,0BAEC;IAED;;;OAGG;IACH,4BAFW,cAAc,QA8BxB;IAED;;OAEG;IACH,qBAqBC;IAED;;OAEG;IACH,0BAeC;IAED;;OAEG;IACH,eA8CC;;CACJ;mBAjlBkB,oCAAoC;oBACnC,4BAA4B;mCAab,uCAAuC;sBAjBnE,OAAO;uBAYS,wBAAwB;8BAZxC,OAAO;4BAWc,+BAA+B;mCAKxB,uCAAuC;kCAKxC,gCAAgC;kCADhC,oCAAoC;gCAPtC,uCAAuC;+BAKxC,4BAA4B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CameraSystem.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/ecs/camera/CameraSystem.js"],"names":[],"mappings":"AAoBA;;;;GAIG;AACH,4DAHW,YAAY,YACZ,UAAU,QAsBpB;AAED;
|
|
1
|
+
{"version":3,"file":"CameraSystem.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/ecs/camera/CameraSystem.js"],"names":[],"mappings":"AAoBA;;;;GAIG;AACH,4DAHW,YAAY,YACZ,UAAU,QAsBpB;AAED;IAmOI;;;;OAIG;IACH,8EAOC;IAED;;;;OAIG;IACH,0DAFa;QAAC,SAAS,EAAC,CAAC,MAAM,GAAC,SAAS,CAAC,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAC,CAc1D;IAED;;;;OAIG;IACH,uEAFoB,YAAY,EAAE,gBAqBjC;IA3RD;;;;OAIG;IACH,sCAuDC;IAhDG,WAA2B;IAE3B,mDAAuC;IAEvC,8DAEC;IAQD;;OAEG;IACH,yBAAwB;IAExB,kBAAoB;IAKpB;;;;;OAKG;IACH,+BAeC;IAED,sBAAwB;IAI5B;;;;;OAKG;IACH,aAHW,MAAM,aADN,SAAS,uBAyEnB;IAED;;;;;OAKG;IACH,eAHW,MAAM,aADN,SAAS,uBAiBnB;IAED,0EAqDC;IAED,2EAQC;CA4DJ;uBAjUsB,aAAa;uBARb,qCAAqC;uBAGrC,wBAAwB;0BACrB,qCAAqC;4CAFnB,uDAAuD;wCAL1D,OAAO"}
|
|
@@ -54,6 +54,10 @@ export class CameraSystem extends System {
|
|
|
54
54
|
constructor(graphics) {
|
|
55
55
|
super();
|
|
56
56
|
|
|
57
|
+
assert.defined(graphics,'graphics');
|
|
58
|
+
assert.notNull(graphics,'graphics');
|
|
59
|
+
assert.equal(graphics.isGraphicsEngine, true,'graphics.isGraphicsEngine !== true');
|
|
60
|
+
|
|
57
61
|
this.scene = graphics.scene;
|
|
58
62
|
|
|
59
63
|
this.dependencies = [Camera, Transform];
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { vec3 } from "gl-matrix";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { STSpace } from "./STSpace.js";
|
|
2
|
+
import { v3_allocate } from "../../../../core/geom/vec3/v3_allocate.js";
|
|
3
|
+
import { DEG_TO_RAD } from "../../../../core/math/DEG_TO_RAD.js";
|
|
4
|
+
import { Build4RuleGroups } from "./Build4RuleGroups.js";
|
|
6
5
|
import { MARK_DEGENERATE } from "./constants/MARK_DEGENERATE.js";
|
|
7
|
-
import { InitTriInfo } from "./InitTriInfo.js";
|
|
8
|
-
import { GenerateTSpaces } from "./GenerateTSpaces.js";
|
|
9
6
|
import { DegenEpilogue } from "./DegenEpilogue.js";
|
|
10
|
-
import { Build4RuleGroups } from "./Build4RuleGroups.js";
|
|
11
|
-
import { v3_allocate } from "../../../../core/geom/vec3/v3_allocate.js";
|
|
12
|
-
import { m_getNumFaces } from "./m_getNumFaces.js";
|
|
13
|
-
import { GenerateInitialVerticesIndexList } from "./GenerateInitialVerticesIndexList.js";
|
|
14
7
|
import { DegenPrologue } from "./DegenPrologue.js";
|
|
8
|
+
import { GenerateInitialVerticesIndexList } from "./GenerateInitialVerticesIndexList.js";
|
|
15
9
|
import { GenerateSharedVerticesIndexList } from "./GenerateSharedVerticesIndexList.js";
|
|
16
|
-
import {
|
|
10
|
+
import { GenerateTSpaces } from "./GenerateTSpaces.js";
|
|
11
|
+
import { GetPosition } from "./GetPosition.js";
|
|
12
|
+
import { InitTriInfo } from "./InitTriInfo.js";
|
|
13
|
+
import { m_getNumFaces } from "./m_getNumFaces.js";
|
|
14
|
+
import { m_setTSpace } from "./m_setTSpace.js";
|
|
15
|
+
import { malloc } from "./malloc.js";
|
|
16
|
+
import { STSpace } from "./STSpace.js";
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
/*
|
|
@@ -158,7 +158,7 @@ export class SMikkTSpaceContext {
|
|
|
158
158
|
/**
|
|
159
159
|
*
|
|
160
160
|
* @param {SMikkTSpaceContext} pContext
|
|
161
|
-
* @param {number} fAngularThreshold
|
|
161
|
+
* @param {number} [fAngularThreshold]
|
|
162
162
|
* @return {boolean}
|
|
163
163
|
*/
|
|
164
164
|
export function genTangSpace(pContext, fAngularThreshold = 180) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"STSpace.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/geometry/MikkT/STSpace.js"],"names":[],"mappings":";AAGA;
|
|
1
|
+
{"version":3,"file":"STSpace.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/geometry/MikkT/STSpace.js"],"names":[],"mappings":";AAGA;IACI;;;OAGG;IACH,KAFU,IAAI,GAAC,YAAY,CAEP;IACpB;;;OAGG;IACH,KAFU,IAAI,GAAC,YAAY,CAEP;IAEpB,cAAU;IACV,cAAU;IAEV,iBAAa;IACb,iBAAgB;IAEhB;;;OAGG;IACH,YAFW,OAAO,QASjB;CACJ;qBAjCoB,WAAW"}
|