@woosh/meep-engine 2.119.9 → 2.119.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/package.json +1 -1
- package/src/core/color/hex/hex2rgb.js +1 -1
- package/src/core/color/operations/color_darken.d.ts +1 -0
- package/src/core/color/operations/color_darken.d.ts.map +1 -1
- package/src/core/color/operations/color_darken.js +1 -0
- package/src/core/color/operations/color_desaturate.d.ts +1 -0
- package/src/core/color/operations/color_desaturate.d.ts.map +1 -1
- package/src/core/color/operations/color_desaturate.js +1 -0
- package/src/core/color/operations/color_lerp.d.ts +11 -0
- package/src/core/color/operations/color_lerp.d.ts.map +1 -0
- package/src/core/color/operations/color_lerp.js +35 -0
- package/src/core/color/operations/color_lighten.d.ts +1 -0
- package/src/core/color/operations/color_lighten.d.ts.map +1 -1
- package/src/core/color/operations/color_lighten.js +1 -0
- package/src/core/color/operations/color_saturate.d.ts +1 -0
- package/src/core/color/operations/color_saturate.d.ts.map +1 -1
- package/src/core/color/operations/color_saturate.js +1 -0
- package/src/core/color/parse_color.d.ts.map +1 -1
- package/src/core/color/parse_color.js +2 -1
- package/src/core/debug/matchers/AllOf.d.ts.map +1 -1
- package/src/core/debug/matchers/AllOf.js +1 -1
- package/src/core/debug/matchers/IsAnything.d.ts +1 -1
- package/src/core/debug/matchers/IsAnything.d.ts.map +1 -1
- package/src/core/debug/matchers/IsAnything.js +1 -1
- package/src/core/debug/matchers/IsIn.d.ts +4 -1
- package/src/core/debug/matchers/IsIn.d.ts.map +1 -1
- package/src/core/debug/matchers/IsIn.js +3 -0
- package/src/core/debug/matchers/IsNot.d.ts +6 -3
- package/src/core/debug/matchers/IsNot.d.ts.map +1 -1
- package/src/core/debug/matchers/IsNot.js +6 -3
- package/src/core/debug/matchers/matchers.d.ts +3 -3
- package/src/core/debug/matchers/matchers.d.ts.map +1 -1
- package/src/core/debug/matchers/matchers.js +9 -9
- package/src/core/geom/3d/compute_triangle_normal.js +1 -1
- package/src/core/geom/3d/cone/computeConeBoundingBox.d.ts +1 -1
- package/src/core/geom/3d/cone/computeConeBoundingBox.d.ts.map +1 -1
- package/src/core/geom/3d/cone/computeConeBoundingBox.js +9 -2
- package/src/core/geom/3d/frustum/frustum3_computeNearestPointToPoint.js +2 -2
- package/src/core/geom/3d/ray/ray3_array_apply_matrix4.d.ts.map +1 -1
- package/src/core/geom/3d/ray/ray3_array_apply_matrix4.js +5 -35
- package/src/core/geom/3d/ray/{ray_computeNearestPointToPoint.d.ts → ray3_compute_nearest_point_to_point.d.ts} +2 -2
- package/src/core/geom/3d/ray/ray3_compute_nearest_point_to_point.d.ts.map +1 -0
- package/src/core/geom/3d/ray/{ray_computeNearestPointToPoint.js → ray3_compute_nearest_point_to_point.js} +2 -2
- package/src/core/geom/3d/ray/ray3_distance_to_point.d.ts +2 -0
- package/src/core/geom/3d/ray/ray3_distance_to_point.d.ts.map +1 -0
- package/src/core/geom/3d/ray/{ray_distance_to_point.js → ray3_distance_to_point.js} +2 -2
- package/src/core/geom/3d/topology/simplify/compute_face_normal_change_dot_product.js +1 -1
- package/src/core/geom/3d/triangle/v3_compute_triangle_normal.d.ts.map +1 -0
- package/src/core/geom/3d/{v3_compute_triangle_normal.js → triangle/v3_compute_triangle_normal.js} +1 -1
- package/src/core/geom/vec3/v3_negate_array.d.ts.map +1 -0
- package/src/core/math/random/randomFromArray.d.ts +2 -2
- package/src/core/math/random/randomFromArray.js +2 -2
- package/src/engine/EngineBootstrapper.d.ts.map +1 -1
- package/src/engine/EngineBootstrapper.js +6 -8
- package/src/engine/EngineConfiguration.d.ts.map +1 -1
- package/src/engine/EngineConfiguration.js +3 -0
- package/src/engine/ecs/Entity.d.ts.map +1 -1
- package/src/engine/ecs/Entity.js +1 -1
- package/src/engine/ecs/dynamic_actions/DataScope.d.ts +36 -0
- package/src/engine/ecs/dynamic_actions/DataScope.d.ts.map +1 -0
- package/src/engine/ecs/dynamic_actions/DataScope.js +126 -0
- package/src/engine/ecs/dynamic_actions/DynamicActorSystem.d.ts +1 -1
- package/src/engine/ecs/dynamic_actions/DynamicActorSystem.d.ts.map +1 -1
- package/src/engine/ecs/dynamic_actions/DynamicActorSystem.js +2 -2
- package/src/engine/ecs/dynamic_actions/RuleExecution.d.ts.map +1 -1
- package/src/engine/ecs/dynamic_actions/RuleExecution.js +1 -1
- package/src/engine/graphics/geometry/geometry_construct_triangle_normal.js +1 -1
- package/src/engine/graphics/sh3/path_tracer/BufferedGeometryBVH.js +1 -1
- package/src/engine/graphics/texture/sampler/Sampler2D.d.ts.map +1 -1
- package/src/engine/graphics/texture/sampler/Sampler2D.js +13 -25
- package/src/engine/intelligence/behavior/decorator/OverrideContextBehavior.d.ts +13 -0
- package/src/engine/intelligence/behavior/decorator/OverrideContextBehavior.d.ts.map +1 -0
- package/src/engine/intelligence/behavior/decorator/OverrideContextBehavior.js +35 -0
- package/src/engine/knowledge/database/StaticKnowledgeDatabase.d.ts.map +1 -1
- package/src/engine/knowledge/database/StaticKnowledgeDatabase.js +4 -0
- package/src/engine/physics/gjk/expanding_polytope_algorithm.js +2 -2
- package/src/engine/sound/ecs/emitter/SoundEmitterComponentContext.d.ts.map +1 -1
- package/src/engine/sound/ecs/emitter/SoundEmitterComponentContext.js +11 -6
- package/src/engine/sound/ecs/emitter/SoundEmitterSystem.js +4 -4
- package/src/engine/sound/ecs/emitter/SoundTrack.d.ts +9 -3
- package/src/engine/sound/ecs/emitter/SoundTrack.d.ts.map +1 -1
- package/src/engine/sound/ecs/emitter/SoundTrack.js +17 -1
- package/src/generation/filtering/numeric/complex/CellFilterCurvature.d.ts.map +1 -1
- package/src/generation/filtering/numeric/complex/CellFilterCurvature.js +4 -5
- package/src/generation/filtering/numeric/math/poly/CellFilterCubicFunction.d.ts.map +1 -1
- package/src/generation/filtering/numeric/math/poly/CellFilterCubicFunction.js +5 -9
- package/src/view/tooltip/DomTooltipManager.d.ts.map +1 -1
- package/src/view/tooltip/DomTooltipManager.js +2 -0
- package/src/view/tooltip/TooltipManager.d.ts +9 -0
- package/src/view/tooltip/TooltipManager.d.ts.map +1 -1
- package/src/view/tooltip/TooltipManager.js +27 -16
- package/src/core/geom/2d/shape/AbstractShape.d.ts +0 -31
- package/src/core/geom/2d/shape/AbstractShape.d.ts.map +0 -1
- package/src/core/geom/2d/shape/AbstractShape.js +0 -51
- package/src/core/geom/2d/shape/CircleShape.d.ts +0 -47
- package/src/core/geom/2d/shape/CircleShape.d.ts.map +0 -1
- package/src/core/geom/2d/shape/CircleShape.js +0 -109
- package/src/core/geom/2d/shape/PointShape.d.ts +0 -21
- package/src/core/geom/2d/shape/PointShape.d.ts.map +0 -1
- package/src/core/geom/2d/shape/PointShape.js +0 -34
- package/src/core/geom/2d/shape/Shape2DType.d.ts +0 -7
- package/src/core/geom/2d/shape/Shape2DType.d.ts.map +0 -1
- package/src/core/geom/2d/shape/Shape2DType.js +0 -9
- package/src/core/geom/3d/ray/ray_computeNearestPointToPoint.d.ts.map +0 -1
- package/src/core/geom/3d/ray/ray_distance_to_point.d.ts +0 -2
- package/src/core/geom/3d/ray/ray_distance_to_point.d.ts.map +0 -1
- package/src/core/geom/3d/v3_compute_triangle_normal.d.ts.map +0 -1
- package/src/core/geom/3d/v3_negate_array.d.ts.map +0 -1
- package/src/core/math/random/seededRandom_sine.d.ts +0 -2
- package/src/core/math/random/seededRandom_sine.d.ts.map +0 -1
- package/src/core/math/random/seededRandom_sine.js +0 -33
- /package/src/core/geom/3d/{v3_compute_triangle_normal.d.ts → triangle/v3_compute_triangle_normal.d.ts} +0 -0
- /package/src/core/geom/{3d → vec3}/v3_negate_array.d.ts +0 -0
- /package/src/core/geom/{3d → vec3}/v3_negate_array.js +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { assert } from "../../../core/assert.js";
|
|
2
2
|
import { array_copy } from "../../../core/collection/array/array_copy.js";
|
|
3
3
|
import { array_swap } from "../../../core/collection/array/array_swap.js";
|
|
4
|
-
|
|
5
|
-
import { v3_negate_array } from "../../../core/geom/3d/v3_negate_array.js";
|
|
6
4
|
import { v3_dot } from "../../../core/geom/vec3/v3_dot.js";
|
|
7
5
|
import { v3_dot_array_array } from "../../../core/geom/vec3/v3_dot_array_array.js";
|
|
8
6
|
import { v3_length } from "../../../core/geom/vec3/v3_length.js";
|
|
9
7
|
import { v3_length_sqr } from "../../../core/geom/vec3/v3_length_sqr.js";
|
|
10
8
|
|
|
9
|
+
import { v3_negate_array } from "../../../core/geom/vec3/v3_negate_array.js";
|
|
10
|
+
|
|
11
11
|
const EPA_TOLERANCE = 0.0001;
|
|
12
12
|
const EPA_MAX_NUM_FACES = 64;
|
|
13
13
|
const EPA_MAX_NUM_LOOSE_EDGES = 32;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SoundEmitterComponentContext.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/sound/ecs/emitter/SoundEmitterComponentContext.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SoundEmitterComponentContext.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/sound/ecs/emitter/SoundEmitterComponentContext.js"],"names":[],"mappings":"AAGA;IAGQ;;;OAGG;IACH,sBAAmB;IAEnB;;;OAGG;IACH,qBAAqB;IAErB;;;OAGG;IACH,2BAAkB;IAElB;;;OAGG;IACH,YAFU,SAAS,CAEG;IAEtB;;;;OAIG;IACH,sBAA0B;IAG9B;;;OAGG;IACH,eAFW,4BAA4B,OAItC;IAED,eAeC;IAED;;;OAGG;IACH,uCAmCC;IAED;;;OAGG;IACH,qCAYC;IAED;;OAEG;IACH,kCAIC;IAED;;;OAGG;IACH,iCAKC;IAED,gBAcC;IAED,mBAoBC;IAED,aAOC;IAED,eASC;CAGJ"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {loadSoundTrackAsset} from "./loadSoundTrackAsset.js";
|
|
2
|
-
import {SoundTrackFlags} from "./SoundTrackFlags.js";
|
|
3
|
-
import {SoundTrackNodes} from "./SoundTrackNodes.js";
|
|
1
|
+
import { loadSoundTrackAsset } from "./loadSoundTrackAsset.js";
|
|
2
|
+
import { SoundTrackFlags } from "./SoundTrackFlags.js";
|
|
4
3
|
|
|
5
4
|
export class SoundEmitterComponentContext {
|
|
6
5
|
constructor() {
|
|
@@ -75,20 +74,26 @@ export class SoundEmitterComponentContext {
|
|
|
75
74
|
const assetManager = system.assetManager;
|
|
76
75
|
const targetNode = emitter.nodes.volume;
|
|
77
76
|
|
|
78
|
-
|
|
77
|
+
soundTrack.initializeNodes(context);
|
|
78
|
+
|
|
79
|
+
const nodes = soundTrack.nodes;
|
|
79
80
|
|
|
80
81
|
//connect to target
|
|
81
82
|
nodes.volume.connect(targetNode);
|
|
82
83
|
|
|
83
84
|
nodes.volume.gain.setValueAtTime(soundTrack.volume, 0);
|
|
84
85
|
|
|
85
|
-
loadSoundTrackAsset(soundTrack, assetManager,
|
|
86
|
+
loadSoundTrackAsset(soundTrack, assetManager, (asset) => {
|
|
86
87
|
|
|
87
88
|
soundTrack.buffer = asset.create();
|
|
88
89
|
|
|
89
90
|
if (soundTrack.getFlag(SoundTrackFlags.StartWhenReady)) {
|
|
90
91
|
|
|
91
|
-
|
|
92
|
+
if (this.__isConnected) {
|
|
93
|
+
soundTrack.start(context.currentTime);
|
|
94
|
+
} else {
|
|
95
|
+
soundTrack.setFlag(SoundTrackFlags.Playing);
|
|
96
|
+
}
|
|
92
97
|
}
|
|
93
98
|
|
|
94
99
|
|
|
@@ -209,6 +209,10 @@ export class SoundEmitterSystem extends System {
|
|
|
209
209
|
|
|
210
210
|
ctx.targetNode = targetNode;
|
|
211
211
|
|
|
212
|
+
ctx.update();
|
|
213
|
+
|
|
214
|
+
ctx.link();
|
|
215
|
+
|
|
212
216
|
{
|
|
213
217
|
// wire context if it's in hearing range
|
|
214
218
|
const distance = ctx.transform.position.distanceTo(this.#cached_listener_position);
|
|
@@ -228,10 +232,6 @@ export class SoundEmitterSystem extends System {
|
|
|
228
232
|
}
|
|
229
233
|
}
|
|
230
234
|
|
|
231
|
-
ctx.update();
|
|
232
|
-
|
|
233
|
-
ctx.link();
|
|
234
|
-
|
|
235
235
|
this.data[entity] = ctx;
|
|
236
236
|
|
|
237
237
|
this.__linkedCount++;
|
|
@@ -38,10 +38,15 @@ export class SoundTrack {
|
|
|
38
38
|
ended: Signal<this>;
|
|
39
39
|
};
|
|
40
40
|
/**
|
|
41
|
-
*
|
|
42
|
-
* @
|
|
41
|
+
*
|
|
42
|
+
* @return {SoundTrackNodes}
|
|
43
|
+
*/
|
|
44
|
+
get nodes(): SoundTrackNodes;
|
|
45
|
+
/**
|
|
46
|
+
*
|
|
47
|
+
* @param {AudioContext} context
|
|
43
48
|
*/
|
|
44
|
-
|
|
49
|
+
initializeNodes(context: AudioContext): void;
|
|
45
50
|
/**
|
|
46
51
|
*
|
|
47
52
|
* @param {AudioBuffer} v
|
|
@@ -176,4 +181,5 @@ export class SoundTrack {
|
|
|
176
181
|
}
|
|
177
182
|
import { SoundTrackFlags } from "./SoundTrackFlags.js";
|
|
178
183
|
import Signal from "../../../../core/events/signal/Signal.js";
|
|
184
|
+
import { SoundTrackNodes } from "./SoundTrackNodes.js";
|
|
179
185
|
//# sourceMappingURL=SoundTrack.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SoundTrack.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/sound/ecs/emitter/SoundTrack.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SoundTrack.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/sound/ecs/emitter/SoundTrack.js"],"names":[],"mappings":"AAYA;IAkcI,uCAMC;IAhcD;;;OAGG;IACH,KAFU,SAAO,IAAI,CAEV;IAEX;;;OAGG;IACH,MAFU,MAAM,CAEP;IAET;;;OAGG;IACH,SAFU,SAAO,IAAI,CAER;IAEb;;;OAGG;IACH,iBAAa;IAEb;;;;OAIG;IACH,UAFU,MAAM,CAEF;IAGd;;;OAGG;IACH,OAFU,MAAM,GAAC,eAAe,CAEV;IAEtB;QACI;;WAEG;eADO,OAAO,IAAI,CAAC;MAGxB;IAQF;;;OAGG;IACH,6BAEC;IAED;;;OAGG;IACH,yBAFW,YAAY,QAItB;IAED;;;OAGG;IACH,6BAMC;IAED,0BAEC;IAUD,gCAiDC;IAED,gBASC;IAED;;;;OAIG;IACH,eAHW,UAAU,UAmCpB;IAED;;;;OAIG;IACH,cAHW,MAAM,oBAAkB,GACtB,IAAI,CAIhB;IAED;;;;OAIG;IACH,gBAHW,MAAM,oBAAkB,GACtB,IAAI,CAIhB;IAED;;;;OAIG;IACH,gBAHW,MAAM,oBAAkB,SACxB,OAAO,QAQjB;IAED;;;;OAIG;IACH,cAHW,MAAM,oBAAkB,GACtB,OAAO,CAInB;IAED;;;;;;;;;OASG;IACH,0BAJW,MAAM,YACN,MAAM,eACN,MAAM,QAuChB;IAED;;;OAGG;IACH,wBAMC;IAED;;;OAGG;IACH,qBAEC;IAUD;;;OAGG;IACH,uBAEC;IAdD;;;OAGG;IACH,oBAEC;IAkBD;;;OAGG;IACH,0BAEC;IAdD;;;OAGG;IACH,uBAEC;IAkBD;;;OAGG;IACH,iCAEC;IAdD;;;OAGG;IACH,8BAEC;IAUD;;;OAGG;IACH,YAFW,UAAU,QAOpB;IAED;;;;OAIG;IACH,cAHW,UAAU,GACR,OAAO,CAQnB;IAED;;;OAGG;IACH,QAFY,MAAM,CASjB;IAED;;;OAGG;IACH,SAFY,UAAU,CAQrB;IAED;;;;;;;;;MAWC;IAED;;;;;;;;;aA6BC;;CAUJ;gCA/c+B,sBAAsB;mBALnC,0CAA0C;gCAM7B,sBAAsB"}
|
|
@@ -6,6 +6,7 @@ import { number_compare_ascending } from "../../../../core/primitives/numbers/nu
|
|
|
6
6
|
import { compareStrings } from "../../../../core/primitives/strings/compareStrings.js";
|
|
7
7
|
import { computeStringHash } from "../../../../core/primitives/strings/computeStringHash.js";
|
|
8
8
|
import { SoundTrackFlags } from "./SoundTrackFlags.js";
|
|
9
|
+
import { SoundTrackNodes } from "./SoundTrackNodes.js";
|
|
9
10
|
|
|
10
11
|
const DEFAULT_FLAGS = SoundTrackFlags.StartWhenReady;
|
|
11
12
|
|
|
@@ -66,8 +67,23 @@ export class SoundTrack {
|
|
|
66
67
|
* @private
|
|
67
68
|
* @type {SoundTrackNodes}
|
|
68
69
|
*/
|
|
69
|
-
nodes = null;
|
|
70
|
+
#nodes = null;
|
|
70
71
|
|
|
72
|
+
/**
|
|
73
|
+
*
|
|
74
|
+
* @return {SoundTrackNodes}
|
|
75
|
+
*/
|
|
76
|
+
get nodes() {
|
|
77
|
+
return this.#nodes;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
*
|
|
82
|
+
* @param {AudioContext} context
|
|
83
|
+
*/
|
|
84
|
+
initializeNodes(context) {
|
|
85
|
+
this.#nodes = new SoundTrackNodes(context);
|
|
86
|
+
}
|
|
71
87
|
|
|
72
88
|
/**
|
|
73
89
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CellFilterCurvature.d.ts","sourceRoot":"","sources":["../../../../../../src/generation/filtering/numeric/complex/CellFilterCurvature.js"],"names":[],"mappings":"AA4DA;
|
|
1
|
+
{"version":3,"file":"CellFilterCurvature.d.ts","sourceRoot":"","sources":["../../../../../../src/generation/filtering/numeric/complex/CellFilterCurvature.js"],"names":[],"mappings":"AA4DA;IAUI;;;;OAIG;IACH,qBAHW,UAAU,GACT,mBAAmB,CAW9B;IArBG;;;OAGG;IACH,SAFU,UAAU,CAEL;IAmBnB,uCAMC;IAED;;;;;;;OAOG;IACH,mDAFY,MAAM,CAoBjB;CACJ;2BAxH0B,qBAAqB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CellFilter } from "../../CellFilter.js";
|
|
2
1
|
import { assert } from "../../../../core/assert.js";
|
|
2
|
+
import { CellFilter } from "../../CellFilter.js";
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
/*
|
|
@@ -59,15 +59,14 @@ function computeNormal(grid, result, surface, x, y) {
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
export class CellFilterCurvature extends CellFilter {
|
|
62
|
-
|
|
63
|
-
super();
|
|
62
|
+
|
|
64
63
|
|
|
65
64
|
/**
|
|
66
65
|
* Surface for which the curvature is to be computed
|
|
67
66
|
* @type {CellFilter}
|
|
68
67
|
*/
|
|
69
|
-
|
|
70
|
-
|
|
68
|
+
surface = null;
|
|
69
|
+
|
|
71
70
|
|
|
72
71
|
/**
|
|
73
72
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CellFilterCubicFunction.d.ts","sourceRoot":"","sources":["../../../../../../../src/generation/filtering/numeric/math/poly/CellFilterCubicFunction.js"],"names":[],"mappings":"AAGA;
|
|
1
|
+
{"version":3,"file":"CellFilterCubicFunction.d.ts","sourceRoot":"","sources":["../../../../../../../src/generation/filtering/numeric/math/poly/CellFilterCubicFunction.js"],"names":[],"mappings":"AAGA;IAOI;;;;;;;;OAQG;IACH,oCANW,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,GACJ,uBAAuB,CAoBnC;IAhCD,WAAO;IACP,WAAO;IACP,WAAO;IACP,WAAO;IA+BP,0BAKC;CACJ;yCA5CwC,2CAA2C"}
|
|
@@ -1,16 +1,12 @@
|
|
|
1
|
-
import { CellFilterUnaryOperation } from "../../../core/CellFilterUnaryOperation.js";
|
|
2
1
|
import { assert } from "../../../../../core/assert.js";
|
|
2
|
+
import { CellFilterUnaryOperation } from "../../../core/CellFilterUnaryOperation.js";
|
|
3
3
|
|
|
4
4
|
export class CellFilterCubicFunction extends CellFilterUnaryOperation {
|
|
5
|
-
constructor() {
|
|
6
|
-
super();
|
|
7
|
-
|
|
8
|
-
this.p0 = 0;
|
|
9
|
-
this.p1 = 0;
|
|
10
|
-
this.p2 = 0;
|
|
11
|
-
this.p3 = 0;
|
|
12
|
-
}
|
|
13
5
|
|
|
6
|
+
p0 = 0;
|
|
7
|
+
p1 = 0;
|
|
8
|
+
p2 = 0;
|
|
9
|
+
p3 = 0;
|
|
14
10
|
|
|
15
11
|
/**
|
|
16
12
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DomTooltipManager.d.ts","sourceRoot":"","sources":["../../../../src/view/tooltip/DomTooltipManager.js"],"names":[],"mappings":"AAGA;;GAEG;AACH;IACI;;;OAGG;IACH,wCA6BC;IA5BG;;;;OAIG;IACH,4BAA4B;IAE5B;;;;OAIG;IACH,sBAAyB;IAGzB;;;;OAIG;IACH,oBAAsB;IAEtB;;;;OAIG;IACH,2BAA4B;IAGhC;;;OAGG;IACH,gCAEC;IAED;;;OAGG;IACH,eAFW,kBAAkB,QAM5B;IAED;;;OAGG;IACH,eAFW,kBAAkB,QAM5B;IAED,wBAQC;IAED;;;;OAIG;IACH,uBAFa,OAAO,
|
|
1
|
+
{"version":3,"file":"DomTooltipManager.d.ts","sourceRoot":"","sources":["../../../../src/view/tooltip/DomTooltipManager.js"],"names":[],"mappings":"AAGA;;GAEG;AACH;IACI;;;OAGG;IACH,wCA6BC;IA5BG;;;;OAIG;IACH,4BAA4B;IAE5B;;;;OAIG;IACH,sBAAyB;IAGzB;;;;OAIG;IACH,oBAAsB;IAEtB;;;;OAIG;IACH,2BAA4B;IAGhC;;;OAGG;IACH,gCAEC;IAED;;;OAGG;IACH,eAFW,kBAAkB,QAM5B;IAED;;;OAGG;IACH,eAFW,kBAAkB,QAM5B;IAED,wBAQC;IAED;;;;OAIG;IACH,uBAFa,OAAO,CAiBnB;IAED;;;;;OAKG;IACH,kEAQC;IAED;;;OAGG;IACH,oBAMC;IAED,0BAOC;IAED;;;OAGG;IACH,uBAIC;IAED;;;;;;OAMG;IACH,+DAeC;IAED;;;OAGG;IACH,4BAgBC;CACJ;mCAlMkC,yBAAyB"}
|
|
@@ -33,6 +33,15 @@ export class TooltipManager {
|
|
|
33
33
|
*/
|
|
34
34
|
initialize(gml: GMLEngine, pointer: PointerDevice): void;
|
|
35
35
|
signalBindings: any[];
|
|
36
|
+
/**
|
|
37
|
+
* @deprecated
|
|
38
|
+
* @param v
|
|
39
|
+
*/
|
|
40
|
+
set database(arg: void);
|
|
41
|
+
/**
|
|
42
|
+
* @deprecated
|
|
43
|
+
*/
|
|
44
|
+
get database(): void;
|
|
36
45
|
startup(): Promise<any>;
|
|
37
46
|
shutdown(): Promise<any>;
|
|
38
47
|
update(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TooltipManager.d.ts","sourceRoot":"","sources":["../../../../src/view/tooltip/TooltipManager.js"],"names":[],"mappings":"AAYA;IAGQ;;;OAGG;IACH,YAAe;IAEf;;;OAGG;IACH,aAFU,OAAK,IAAI,CAEe;IAKlC;;;OAGG;IACH,SAFU,aAAa,CAEJ;
|
|
1
|
+
{"version":3,"file":"TooltipManager.d.ts","sourceRoot":"","sources":["../../../../src/view/tooltip/TooltipManager.js"],"names":[],"mappings":"AAYA;IAGQ;;;OAGG;IACH,YAAe;IAEf;;;OAGG;IACH,aAFU,OAAK,IAAI,CAEe;IAKlC;;;OAGG;IACH,SAFU,aAAa,CAEJ;IAGnB,iBASE;IAEF,6BAAoD;IAEpD;;;OAGG;IACH,MAFU,eAAe,CAEH;IAG1B;;;OAGG;IACH,UAFa,SAAS,CAIrB;IAED;;;;OAIG;IACH,gBAHW,SAAS,WACT,aAAa,QAavB;IADG,sBAAwB;IAU5B;;;OAGG;IACH,wBAEC;IAbD;;OAEG;IACH,qBAEC;IAUD,wBAcC;IAED,yBAUC;IAED,eAUC;IAED;;;;OAIG;IACH,qBAyCC;IAED;;;OAGG;IACH,0BA0BC;IAED;;;;OAIG;IACH,0BAFa,OAAO,CAInB;IAED;;;OAGG;IACH,6BASC;IAED;;;OAGG;IACH,qBAFW,WAAW,QAYrB;CAGJ;8BA5P6B,6CAA6C;iBAH1D,iCAAiC;+BADnB,mDAAmD;iBAFjE,oCAAoC;0BAQ3B,oBAAoB;wBACtB,kBAAkB"}
|
|
@@ -35,13 +35,12 @@ export class TooltipManager {
|
|
|
35
35
|
this.pointer = null;
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
const self = this;
|
|
39
|
-
|
|
40
38
|
this.updateTask = new Task({
|
|
41
39
|
name: "Update Tooltip Cursor",
|
|
42
|
-
cycleFunction:
|
|
43
|
-
const position =
|
|
44
|
-
|
|
40
|
+
cycleFunction: () => {
|
|
41
|
+
const position = this.pointer.position;
|
|
42
|
+
|
|
43
|
+
this.update(position.x, position.y);
|
|
45
44
|
|
|
46
45
|
return TaskSignal.Yield;
|
|
47
46
|
}
|
|
@@ -82,23 +81,34 @@ export class TooltipManager {
|
|
|
82
81
|
this.signalBindings = [];
|
|
83
82
|
}
|
|
84
83
|
|
|
84
|
+
/**
|
|
85
|
+
* @deprecated
|
|
86
|
+
*/
|
|
87
|
+
get database() {
|
|
88
|
+
throw new Error("Deprecated");
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* @deprecated
|
|
93
|
+
* @param v
|
|
94
|
+
*/
|
|
95
|
+
set database(v) {
|
|
96
|
+
throw new Error("Deprecated");
|
|
97
|
+
}
|
|
98
|
+
|
|
85
99
|
startup() {
|
|
86
|
-
const self = this;
|
|
87
100
|
|
|
88
|
-
return new Promise(
|
|
89
|
-
if (self.database === null) {
|
|
90
|
-
throw new Error('Database not set; probably not initialized');
|
|
91
|
-
}
|
|
101
|
+
return new Promise((resolve, reject) => {
|
|
92
102
|
|
|
93
|
-
if (
|
|
103
|
+
if (this.contextView === null) {
|
|
94
104
|
throw new Error('ContextView not set; probably not initialized');
|
|
95
105
|
}
|
|
96
106
|
|
|
97
|
-
|
|
107
|
+
this.signalBindings.forEach(b => b.link());
|
|
98
108
|
|
|
99
|
-
|
|
109
|
+
this.executor.run(this.updateTask);
|
|
100
110
|
|
|
101
|
-
|
|
111
|
+
this.gml.startup().then(resolve, reject);
|
|
102
112
|
});
|
|
103
113
|
}
|
|
104
114
|
|
|
@@ -142,10 +152,11 @@ export class TooltipManager {
|
|
|
142
152
|
|
|
143
153
|
gml.popState();
|
|
144
154
|
|
|
145
|
-
assert.
|
|
146
|
-
assert.
|
|
155
|
+
assert.defined(factoryProduct, "factory product");
|
|
156
|
+
assert.notNull(factoryProduct, "factory product");
|
|
147
157
|
|
|
148
158
|
let contentView;
|
|
159
|
+
|
|
149
160
|
if (typeof factoryProduct === "object") {
|
|
150
161
|
//expecting factory product to be a view, passing it directly
|
|
151
162
|
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
export class AbstractShape {
|
|
2
|
-
copy(other: any): void;
|
|
3
|
-
/**
|
|
4
|
-
* @returns {AbstractShape}
|
|
5
|
-
*/
|
|
6
|
-
clone(): AbstractShape;
|
|
7
|
-
equals(other: any): boolean;
|
|
8
|
-
hash(): number;
|
|
9
|
-
/**
|
|
10
|
-
*
|
|
11
|
-
* @param {AbstractShape} other
|
|
12
|
-
* @returns {boolean}
|
|
13
|
-
*/
|
|
14
|
-
intersects(other: AbstractShape): boolean;
|
|
15
|
-
/**
|
|
16
|
-
*
|
|
17
|
-
* @param {number} x
|
|
18
|
-
* @param {number} y
|
|
19
|
-
* @returns {boolean}
|
|
20
|
-
*/
|
|
21
|
-
intersectsPoint(x: number, y: number): boolean;
|
|
22
|
-
/**
|
|
23
|
-
*
|
|
24
|
-
* @param {number} x
|
|
25
|
-
* @param {number} y
|
|
26
|
-
* @param {number} radius
|
|
27
|
-
* @returns {boolean}
|
|
28
|
-
*/
|
|
29
|
-
intersectsCircle(x: number, y: number, radius: number): boolean;
|
|
30
|
-
}
|
|
31
|
-
//# sourceMappingURL=AbstractShape.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AbstractShape.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/2d/shape/AbstractShape.js"],"names":[],"mappings":"AAAA;IAEI,uBAEC;IAED;;OAEG;IACH,SAFa,aAAa,CAIzB;IAED,4BAEC;IAED,eAEC;IAED;;;;OAIG;IACH,kBAHW,aAAa,GACX,OAAO,CAInB;IAED;;;;;OAKG;IACH,mBAJW,MAAM,KACN,MAAM,GACJ,OAAO,CAInB;IAED;;;;;;OAMG;IACH,oBALW,MAAM,KACN,MAAM,UACN,MAAM,GACJ,OAAO,CAInB;CACJ"}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
export class AbstractShape {
|
|
2
|
-
|
|
3
|
-
copy(other) {
|
|
4
|
-
throw new Error('Not implemented');
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @returns {AbstractShape}
|
|
9
|
-
*/
|
|
10
|
-
clone() {
|
|
11
|
-
throw new Error('Not implemented');
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
equals(other) {
|
|
15
|
-
return false;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
hash() {
|
|
19
|
-
return 0;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
*
|
|
24
|
-
* @param {AbstractShape} other
|
|
25
|
-
* @returns {boolean}
|
|
26
|
-
*/
|
|
27
|
-
intersects(other) {
|
|
28
|
-
throw new Error('Not implemented');
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
*
|
|
33
|
-
* @param {number} x
|
|
34
|
-
* @param {number} y
|
|
35
|
-
* @returns {boolean}
|
|
36
|
-
*/
|
|
37
|
-
intersectsPoint(x, y) {
|
|
38
|
-
throw new Error('Not implemented');
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
*
|
|
43
|
-
* @param {number} x
|
|
44
|
-
* @param {number} y
|
|
45
|
-
* @param {number} radius
|
|
46
|
-
* @returns {boolean}
|
|
47
|
-
*/
|
|
48
|
-
intersectsCircle(x, y, radius) {
|
|
49
|
-
throw new Error('Not implemented');
|
|
50
|
-
}
|
|
51
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
export class CircleShape extends AbstractShape {
|
|
2
|
-
static from(x?: number, y?: number, r?: number): CircleShape;
|
|
3
|
-
/**
|
|
4
|
-
*
|
|
5
|
-
* @type {number}
|
|
6
|
-
*/
|
|
7
|
-
x: number;
|
|
8
|
-
/**
|
|
9
|
-
*
|
|
10
|
-
* @type {number}
|
|
11
|
-
*/
|
|
12
|
-
y: number;
|
|
13
|
-
/**
|
|
14
|
-
*
|
|
15
|
-
* @type {number}
|
|
16
|
-
*/
|
|
17
|
-
radius: number;
|
|
18
|
-
/**
|
|
19
|
-
*
|
|
20
|
-
* @param {CircleShape} other
|
|
21
|
-
*/
|
|
22
|
-
copy(other: CircleShape): void;
|
|
23
|
-
clone(): CircleShape;
|
|
24
|
-
intersects(other: any): boolean;
|
|
25
|
-
intersectsPoint(x: any, y: any): boolean;
|
|
26
|
-
intersectsCircle(x: any, y: any, radius: any): boolean;
|
|
27
|
-
/**
|
|
28
|
-
*
|
|
29
|
-
* @param {number} x
|
|
30
|
-
* @param {number} y
|
|
31
|
-
* @param {number} r
|
|
32
|
-
*/
|
|
33
|
-
set(x: number, y: number, r: number): void;
|
|
34
|
-
/**
|
|
35
|
-
*
|
|
36
|
-
* @param {AbstractShape|CircleShape} other
|
|
37
|
-
* @returns {boolean}
|
|
38
|
-
*/
|
|
39
|
-
equals(other: AbstractShape | CircleShape): boolean;
|
|
40
|
-
/**
|
|
41
|
-
*
|
|
42
|
-
* @type {boolean}
|
|
43
|
-
*/
|
|
44
|
-
isCircleShape: boolean;
|
|
45
|
-
}
|
|
46
|
-
import { AbstractShape } from "./AbstractShape.js";
|
|
47
|
-
//# sourceMappingURL=CircleShape.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CircleShape.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/2d/shape/CircleShape.js"],"names":[],"mappings":"AAKA;IA0FI,6DAMC;IA9FD;;;OAGG;IACH,GAFU,MAAM,CAEV;IACN;;;OAGG;IACH,GAFU,MAAM,CAEV;IACN;;;OAGG;IACH,QAFU,MAAM,CAEL;IAEX;;;OAGG;IACH,YAFW,WAAW,QAKrB;IAED,qBAMC;IAED,gCAQC;IAED,yCAEC;IAED,uDAEC;IAED;;;;;OAKG;IACH,OAJW,MAAM,KACN,MAAM,KACN,MAAM,QAgBhB;IAED;;;;OAIG;IACH,cAHW,aAAa,GAAC,WAAW,GACvB,OAAO,CAUnB;IAWL;;;OAGG;IACH,eAFU,OAAO,CAEkB;CANlC;8BAnG6B,oBAAoB"}
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
import { assert } from "../../../assert.js";
|
|
2
|
-
import { circle_intersects_circle } from "../circle/circle_intersects_circle.js";
|
|
3
|
-
import { circle_intersects_point } from "../circle/circle_intersects_point.js";
|
|
4
|
-
import { AbstractShape } from "./AbstractShape.js";
|
|
5
|
-
|
|
6
|
-
export class CircleShape extends AbstractShape {
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
*
|
|
10
|
-
* @type {number}
|
|
11
|
-
*/
|
|
12
|
-
x = 0;
|
|
13
|
-
/**
|
|
14
|
-
*
|
|
15
|
-
* @type {number}
|
|
16
|
-
*/
|
|
17
|
-
y = 0;
|
|
18
|
-
/**
|
|
19
|
-
*
|
|
20
|
-
* @type {number}
|
|
21
|
-
*/
|
|
22
|
-
radius = 0;
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
*
|
|
26
|
-
* @param {CircleShape} other
|
|
27
|
-
*/
|
|
28
|
-
copy(other) {
|
|
29
|
-
|
|
30
|
-
this.set(other.x, other.y, other.radius);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
clone() {
|
|
34
|
-
const r = new CircleShape();
|
|
35
|
-
|
|
36
|
-
r.copy(this);
|
|
37
|
-
|
|
38
|
-
return r;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
intersects(other) {
|
|
42
|
-
if (other.isCircleShape) {
|
|
43
|
-
return this.intersectsCircle(other.x, other.y, other.radius);
|
|
44
|
-
} else if (other.isPointShape) {
|
|
45
|
-
return this.intersectsPoint(other.x, other.y);
|
|
46
|
-
} else {
|
|
47
|
-
throw new Error('Unsupported intersection pairing');
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
intersectsPoint(x, y) {
|
|
52
|
-
return circle_intersects_point(this.x, this.y, this.radius, x, y);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
intersectsCircle(x, y, radius) {
|
|
56
|
-
return circle_intersects_circle(x, y, radius, this.x, this.y, this.radius);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
*
|
|
61
|
-
* @param {number} x
|
|
62
|
-
* @param {number} y
|
|
63
|
-
* @param {number} r
|
|
64
|
-
*/
|
|
65
|
-
set(x, y, r) {
|
|
66
|
-
|
|
67
|
-
assert.isNumber(x, 'x');
|
|
68
|
-
assert.isNumber(y, 'y');
|
|
69
|
-
assert.isNumber(r, 'r');
|
|
70
|
-
|
|
71
|
-
assert.notNaN(x, 'x');
|
|
72
|
-
assert.notNaN(y, 'y');
|
|
73
|
-
assert.notNaN(r, 'r');
|
|
74
|
-
|
|
75
|
-
this.x = x;
|
|
76
|
-
this.y = y;
|
|
77
|
-
this.radius = r;
|
|
78
|
-
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
*
|
|
83
|
-
* @param {AbstractShape|CircleShape} other
|
|
84
|
-
* @returns {boolean}
|
|
85
|
-
*/
|
|
86
|
-
equals(other) {
|
|
87
|
-
if (other.isCircleShape !== true) {
|
|
88
|
-
return false;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
return this.x === other.x
|
|
92
|
-
&& this.y === other.y
|
|
93
|
-
&& this.radius === other.radius;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
static from(x = 0, y = 0, r = 0) {
|
|
97
|
-
const result = new CircleShape();
|
|
98
|
-
|
|
99
|
-
result.set(x, y, r);
|
|
100
|
-
|
|
101
|
-
return result;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
/**
|
|
106
|
-
*
|
|
107
|
-
* @type {boolean}
|
|
108
|
-
*/
|
|
109
|
-
CircleShape.prototype.isCircleShape = true;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export class PointShape extends AbstractShape {
|
|
2
|
-
/**
|
|
3
|
-
*
|
|
4
|
-
* @type {number}
|
|
5
|
-
*/
|
|
6
|
-
x: number;
|
|
7
|
-
/**
|
|
8
|
-
*
|
|
9
|
-
* @type {number}
|
|
10
|
-
*/
|
|
11
|
-
y: number;
|
|
12
|
-
intersectsPoint(x: any, y: any): boolean;
|
|
13
|
-
intersectsCircle(x: any, y: any, radius: any): boolean;
|
|
14
|
-
/**
|
|
15
|
-
* @readonly
|
|
16
|
-
* @type {boolean}
|
|
17
|
-
*/
|
|
18
|
-
readonly isPointShape: boolean;
|
|
19
|
-
}
|
|
20
|
-
import { AbstractShape } from "./AbstractShape.js";
|
|
21
|
-
//# sourceMappingURL=PointShape.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PointShape.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/2d/shape/PointShape.js"],"names":[],"mappings":"AAGA;IAIQ;;;OAGG;IACH,GAFU,MAAM,CAEN;IACV;;;OAGG;IACH,GAFU,MAAM,CAEN;IAGd,yCAGC;IAED,uDAEC;IAGL;;;OAGG;IACH,uBAFU,OAAO,CAEgB;CANhC;8BA1B6B,oBAAoB"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { circle_intersects_point } from "../circle/circle_intersects_point.js";
|
|
2
|
-
import { AbstractShape } from "./AbstractShape.js";
|
|
3
|
-
|
|
4
|
-
export class PointShape extends AbstractShape {
|
|
5
|
-
constructor() {
|
|
6
|
-
super();
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
*
|
|
10
|
-
* @type {number}
|
|
11
|
-
*/
|
|
12
|
-
this.x = 0;
|
|
13
|
-
/**
|
|
14
|
-
*
|
|
15
|
-
* @type {number}
|
|
16
|
-
*/
|
|
17
|
-
this.y = 0;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
intersectsPoint(x, y) {
|
|
21
|
-
//points can never intersect as there is no area
|
|
22
|
-
return false;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
intersectsCircle(x, y, radius) {
|
|
26
|
-
return circle_intersects_point(x, y, radius, this.x, this.y);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* @readonly
|
|
32
|
-
* @type {boolean}
|
|
33
|
-
*/
|
|
34
|
-
PointShape.prototype.isPointShape = true;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Shape2DType.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/2d/shape/Shape2DType.js"],"names":[],"mappings":"0BAEU,MAAM"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ray_computeNearestPointToPoint.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/3d/ray/ray_computeNearestPointToPoint.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AACH,0EAXW,MAAM,YACN,MAAM,YACN,MAAM,eACN,MAAM,eACN,MAAM,eACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,GACJ,MAAM,CA4BlB"}
|