@woosh/meep-engine 2.110.15 → 2.111.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/meep.cjs +442 -370
- package/build/meep.min.js +1 -1
- package/build/meep.module.js +442 -370
- package/editor/tools/v2/BlenderCameraOrientationGizmo.js +4 -2
- package/package.json +1 -1
- package/src/core/events/signal/Signal.d.ts.map +1 -1
- package/src/core/events/signal/Signal.js +289 -255
- package/src/core/events/signal/SignalHandler.d.ts +7 -2
- package/src/core/events/signal/SignalHandler.d.ts.map +1 -1
- package/src/core/events/signal/SignalHandler.js +12 -6
- package/src/core/events/signal/signal_handler_list_find.d.ts +8 -0
- package/src/core/events/signal/signal_handler_list_find.d.ts.map +1 -0
- package/src/core/events/signal/signal_handler_list_find.js +23 -0
- package/src/core/events/signal/signal_handler_list_last.d.ts +7 -0
- package/src/core/events/signal/signal_handler_list_last.d.ts.map +1 -0
- package/src/core/events/signal/signal_handler_list_last.js +14 -0
- package/src/core/events/signal/signal_handler_list_validate.d.ts +8 -0
- package/src/core/events/signal/signal_handler_list_validate.d.ts.map +1 -0
- package/src/core/events/signal/signal_handler_list_validate.js +29 -0
- package/src/engine/ecs/dynamic_actions/rules/DynamicRuleDescription.d.ts +2 -3
- package/src/engine/ecs/dynamic_actions/rules/DynamicRuleDescription.d.ts.map +1 -1
- package/src/engine/ecs/dynamic_actions/rules/DynamicRuleDescription.js +3 -3
- package/src/engine/graphics/ecs/camera/Camera.d.ts.map +1 -1
- package/src/engine/graphics/ecs/camera/Camera.js +2 -2
- package/src/engine/graphics/ecs/camera/CameraSystem.d.ts.map +1 -1
- package/src/engine/graphics/ecs/camera/CameraSystem.js +10 -2
- package/src/engine/graphics/ecs/camera/quaternion_invert_orientation.d.ts +7 -0
- package/src/engine/graphics/ecs/camera/quaternion_invert_orientation.d.ts.map +1 -0
- package/src/engine/graphics/ecs/camera/{InvertQuaternionOrientation.js → quaternion_invert_orientation.js} +6 -5
- package/src/engine/graphics/ecs/camera/InvertQuaternionOrientation.d.ts +0 -7
- package/src/engine/graphics/ecs/camera/InvertQuaternionOrientation.d.ts.map +0 -1
|
@@ -9,13 +9,18 @@ export class SignalHandler {
|
|
|
9
9
|
* @param {*} [context]
|
|
10
10
|
*/
|
|
11
11
|
constructor(handle: Function, context?: any);
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Optional field. Used for forming linked lists of handlers
|
|
14
|
+
* @type {SignalHandler|null}
|
|
15
|
+
*/
|
|
16
|
+
next: SignalHandler | null;
|
|
14
17
|
/**
|
|
15
18
|
* @private
|
|
16
19
|
* @type {number|SignalHandlerFlags}
|
|
17
20
|
*/
|
|
18
21
|
private flags;
|
|
22
|
+
handle: Function;
|
|
23
|
+
context: any;
|
|
19
24
|
/**
|
|
20
25
|
*
|
|
21
26
|
* @param {number|SignalHandlerFlags} flag
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignalHandler.d.ts","sourceRoot":"","sources":["../../../../../src/core/events/signal/SignalHandler.js"],"names":[],"mappings":"iCAIU,MAAM;;;;AAShB;
|
|
1
|
+
{"version":3,"file":"SignalHandler.d.ts","sourceRoot":"","sources":["../../../../../src/core/events/signal/SignalHandler.js"],"names":[],"mappings":"iCAIU,MAAM;;;;AAShB;IAaI;;;;OAIG;IACH,6CAOC;IAxBD;;;OAGG;IACH,MAFU,aAAa,GAAC,IAAI,CAEhB;IAEZ;;;OAGG;IACH,cAAU;IAWN,iBAAoB;IACpB,aAAsB;IAI1B;;;;OAIG;IACH,cAHW,MAAM,GAAC,kBAAkB,GACvB,IAAI,CAIhB;IAED;;;;OAIG;IACH,gBAHW,MAAM,GAAC,kBAAkB,GACvB,IAAI,CAIhB;IAED;;;;OAIG;IACH,gBAHW,MAAM,GAAC,kBAAkB,SACzB,OAAO,QAQjB;IAED;;;;OAIG;IACH,cAHW,MAAM,GAAC,kBAAkB,GACvB,OAAO,CAInB;IAIL;;;OAGG;IACH,0BAFU,OAAO,CAEsB;CANtC"}
|
|
@@ -12,6 +12,18 @@ export const SignalHandlerFlags = {
|
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
export class SignalHandler {
|
|
15
|
+
/**
|
|
16
|
+
* Optional field. Used for forming linked lists of handlers
|
|
17
|
+
* @type {SignalHandler|null}
|
|
18
|
+
*/
|
|
19
|
+
next = null;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @private
|
|
23
|
+
* @type {number|SignalHandlerFlags}
|
|
24
|
+
*/
|
|
25
|
+
flags = 0;
|
|
26
|
+
|
|
15
27
|
/**
|
|
16
28
|
*
|
|
17
29
|
* @param {function} handle
|
|
@@ -21,15 +33,9 @@ export class SignalHandler {
|
|
|
21
33
|
assert.notEqual(handle, undefined, 'handle must be defined');
|
|
22
34
|
assert.isFunction(handle, 'handle');
|
|
23
35
|
|
|
24
|
-
|
|
25
36
|
this.handle = handle;
|
|
26
37
|
this.context = context;
|
|
27
38
|
|
|
28
|
-
/**
|
|
29
|
-
* @private
|
|
30
|
-
* @type {number|SignalHandlerFlags}
|
|
31
|
-
*/
|
|
32
|
-
this.flags = 0;
|
|
33
39
|
}
|
|
34
40
|
|
|
35
41
|
/**
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signal_handler_list_find.d.ts","sourceRoot":"","sources":["../../../../../src/core/events/signal/signal_handler_list_find.js"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,qGAeC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @param {SignalHandler} first
|
|
4
|
+
* @param {function} handle
|
|
5
|
+
* @param {*} [thisArg]
|
|
6
|
+
*/
|
|
7
|
+
export function signal_handler_list_find(first, handle, thisArg) {
|
|
8
|
+
let n = first;
|
|
9
|
+
|
|
10
|
+
for (; ;) {
|
|
11
|
+
|
|
12
|
+
if (n.handle === handle && n.context === thisArg) {
|
|
13
|
+
return n;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
n = n.next;
|
|
17
|
+
|
|
18
|
+
if (n === null) {
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signal_handler_list_last.d.ts","sourceRoot":"","sources":["../../../../../src/core/events/signal/signal_handler_list_last.js"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,8EAQC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signal_handler_list_validate.d.ts","sourceRoot":"","sources":["../../../../../src/core/events/signal/signal_handler_list_validate.js"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wFAFa,OAAO,CAwBnB"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @param {SignalHandler} first
|
|
4
|
+
* @param {function} consumer
|
|
5
|
+
* @returns {boolean}
|
|
6
|
+
*/
|
|
7
|
+
export function signal_handler_list_validate(first, consumer) {
|
|
8
|
+
|
|
9
|
+
const visited = new Set();
|
|
10
|
+
let n = first;
|
|
11
|
+
while (n !== null) {
|
|
12
|
+
|
|
13
|
+
if (n === undefined) {
|
|
14
|
+
consumer("Node is undefined, invalid value type");
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
if (visited.has(n)) {
|
|
19
|
+
consumer('Detected loop');
|
|
20
|
+
return false;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
visited.add(n);
|
|
24
|
+
|
|
25
|
+
n = n.next;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export class DynamicRuleDescription {
|
|
2
2
|
/**
|
|
3
3
|
*
|
|
4
|
-
* @type {
|
|
4
|
+
* @type {string}
|
|
5
5
|
*/
|
|
6
|
-
id:
|
|
6
|
+
id: string;
|
|
7
7
|
/**
|
|
8
8
|
*
|
|
9
9
|
* @type {ReactiveExpression}
|
|
@@ -55,6 +55,5 @@ export class DynamicRuleDescription {
|
|
|
55
55
|
priority?: number;
|
|
56
56
|
}): void;
|
|
57
57
|
}
|
|
58
|
-
import { UUID } from "../../guid/UUID.js";
|
|
59
58
|
import { DynamicRuleCooldownDescription } from "./DynamicRuleCooldownDescription.js";
|
|
60
59
|
//# sourceMappingURL=DynamicRuleDescription.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DynamicRuleDescription.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/ecs/dynamic_actions/rules/DynamicRuleDescription.js"],"names":[],"mappings":"AAQA;IACI;;;OAGG;IACH,IAFU,
|
|
1
|
+
{"version":3,"file":"DynamicRuleDescription.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/ecs/dynamic_actions/rules/DynamicRuleDescription.js"],"names":[],"mappings":"AAQA;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"}
|
|
@@ -9,9 +9,9 @@ import { DynamicRuleCooldownDescription } from "./DynamicRuleCooldownDescription
|
|
|
9
9
|
export class DynamicRuleDescription {
|
|
10
10
|
/**
|
|
11
11
|
*
|
|
12
|
-
* @type {
|
|
12
|
+
* @type {string}
|
|
13
13
|
*/
|
|
14
|
-
id = UUID.
|
|
14
|
+
id = UUID.string();
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
*
|
|
@@ -118,7 +118,7 @@ export class DynamicRuleDescription {
|
|
|
118
118
|
|
|
119
119
|
this.action = deserializeActionFromJSON(action);
|
|
120
120
|
|
|
121
|
-
this.id
|
|
121
|
+
this.id = id;
|
|
122
122
|
|
|
123
123
|
this.priority = priority;
|
|
124
124
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Camera.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/ecs/camera/Camera.js"],"names":[],"mappings":"AAaA;;GAEG;AACH;IA4II;;;;;;;OAOG;IACH,0BANW,MAAM,GAAC,MAAM,iBAAiB,GAAC,MAAM,kBAAkB,KACvD,MAAM,KACN,MAAM,cACN,OAAO,iBACP,OAAO,QA+CjB;IA/LG;;;OAGG;IACH,UAFU,OAAO,CAEI;IAErB;;;OAGG;IACH,oBAFU,MAAM,CAEc;IAE9B,YAAkB;IAElB;;;OAGG;IACH,KAFU,OAAO,CAES;IAE1B;;;OAGG;IACH,gBAFU,aAAa,cAAc,CAAC,CAE4C;IAElF;;;OAGG;IACH,QAFU,eAAe,CAEc;IAEvC;;;;OAIG;IACH,mBAAqB;IAErB;;;;OAIG;IACH,oBAAsB;IAG1B;;;;OAIG;IACH,mEAEC;IAMD,0BAMC;IAVD,uBAEC;IAcD,2BAMC;IAVD,wBAEC;IAUD,uBAaC;IAED,2DAEC;IAED;;;OAGG;IACH,YAFW,MAAM,QAMhB;IAED;;;OAGG;IACH,SAFa,MAAM,CAQlB;IAED;;;MAKC;IAED,0BAQC;IAyDD;;;OAGG;IACH,kDAUC;IAED;;;;;;;;;;OAUG;IACH,0BATW,OAAO,YACP,MAAM,YACN,MAAM,YACN,MAAM,eACN,MAAM,eACN,MAAM,eACN,MAAM,eACN,MAAM,QAyBhB;IAED;;;;;;OAMG;IACH,kCALW,MAAM,KACN,MAAM,KACN,MAAM,UACN,OAAO,QAqBjB;CACJ;;;;;oBA9RmB,kCAAkC;yBAG7B,wCAAwC;+
|
|
1
|
+
{"version":3,"file":"Camera.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/ecs/camera/Camera.js"],"names":[],"mappings":"AAaA;;GAEG;AACH;IA4II;;;;;;;OAOG;IACH,0BANW,MAAM,GAAC,MAAM,iBAAiB,GAAC,MAAM,kBAAkB,KACvD,MAAM,KACN,MAAM,cACN,OAAO,iBACP,OAAO,QA+CjB;IA/LG;;;OAGG;IACH,UAFU,OAAO,CAEI;IAErB;;;OAGG;IACH,oBAFU,MAAM,CAEc;IAE9B,YAAkB;IAElB;;;OAGG;IACH,KAFU,OAAO,CAES;IAE1B;;;OAGG;IACH,gBAFU,aAAa,cAAc,CAAC,CAE4C;IAElF;;;OAGG;IACH,QAFU,eAAe,CAEc;IAEvC;;;;OAIG;IACH,mBAAqB;IAErB;;;;OAIG;IACH,oBAAsB;IAG1B;;;;OAIG;IACH,mEAEC;IAMD,0BAMC;IAVD,uBAEC;IAcD,2BAMC;IAVD,wBAEC;IAUD,uBAaC;IAED,2DAEC;IAED;;;OAGG;IACH,YAFW,MAAM,QAMhB;IAED;;;OAGG;IACH,SAFa,MAAM,CAQlB;IAED;;;MAKC;IAED,0BAQC;IAyDD;;;OAGG;IACH,kDAUC;IAED;;;;;;;;;;OAUG;IACH,0BATW,OAAO,YACP,MAAM,YACN,MAAM,YACN,MAAM,eACN,MAAM,eACN,MAAM,eACN,MAAM,eACN,MAAM,QAyBhB;IAED;;;;;;OAMG;IACH,kCALW,MAAM,KACN,MAAM,KACN,MAAM,UACN,OAAO,QAqBjB;CACJ;;;;;oBA9RmB,kCAAkC;yBAG7B,wCAAwC;+BAElC,qBAAqB;4BAHxB,2CAA2C;oBADnD,kCAAkC"}
|
|
@@ -7,8 +7,8 @@ import Vector3 from "../../../../core/geom/Vector3.js";
|
|
|
7
7
|
import ObservedBoolean from "../../../../core/model/ObservedBoolean.js";
|
|
8
8
|
import ObservedEnum from "../../../../core/model/ObservedEnum.js";
|
|
9
9
|
import { frustum_from_camera } from "./frustum_from_camera.js";
|
|
10
|
-
import { invertQuaternionOrientation } from "./InvertQuaternionOrientation.js";
|
|
11
10
|
import { ProjectionType } from "./ProjectionType.js";
|
|
11
|
+
import { quaternion_invert_orientation } from "./quaternion_invert_orientation.js";
|
|
12
12
|
import { unprojectPoint } from "./unprojectPoint.js";
|
|
13
13
|
|
|
14
14
|
/**
|
|
@@ -69,7 +69,7 @@ export class Camera {
|
|
|
69
69
|
* @param {Quaternion} input
|
|
70
70
|
*/
|
|
71
71
|
getReciprocalRotation(output, input) {
|
|
72
|
-
|
|
72
|
+
quaternion_invert_orientation(output, input);
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
get clip_far() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CameraSystem.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/ecs/camera/CameraSystem.js"],"names":[],"mappings":"
|
|
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;IA+NI;;;;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;IAvRD;;;;OAIG;IACH,sCAmDC;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;uBA7TsB,aAAa;uBARb,qCAAqC;uBAGrC,wBAAwB;0BACrB,qCAAqC;4CAFnB,uDAAuD;wCAL1D,OAAO"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Frustum as ThreeFrustum, } from 'three';
|
|
2
2
|
import { assert } from "../../../../core/assert.js";
|
|
3
3
|
import { SignalBinding } from "../../../../core/events/signal/SignalBinding.js";
|
|
4
|
+
import Quaternion from "../../../../core/geom/Quaternion.js";
|
|
4
5
|
import { ResourceAccessKind } from "../../../../core/model/ResourceAccessKind.js";
|
|
5
6
|
import { ResourceAccessSpecification } from "../../../../core/model/ResourceAccessSpecification.js";
|
|
6
7
|
import { System } from '../../../ecs/System.js';
|
|
@@ -10,10 +11,13 @@ import { auto_set_camera_clipping_planes } from "./auto_set_camera_clipping_plan
|
|
|
10
11
|
import { build_three_camera_object } from "./build_three_camera_object.js";
|
|
11
12
|
import { Camera } from './Camera.js';
|
|
12
13
|
import { frustum_from_camera } from "./frustum_from_camera.js";
|
|
13
|
-
import {
|
|
14
|
+
import { quaternion_invert_orientation } from "./quaternion_invert_orientation.js";
|
|
14
15
|
import { set_camera_aspect_ratio } from "./set_camera_aspect_ratio.js";
|
|
15
16
|
import { update_camera_transform } from "./update_camera_transform.js";
|
|
16
17
|
|
|
18
|
+
|
|
19
|
+
const scratch_quat = new Quaternion();
|
|
20
|
+
|
|
17
21
|
/**
|
|
18
22
|
*
|
|
19
23
|
* @param {THREE.Camera} object
|
|
@@ -26,7 +30,11 @@ export function three_camera_set_transform_rotation(object, rotation) {
|
|
|
26
30
|
See: https://github.com/mrdoob/three.js/blob/412b99a7f26e117ea97f40eb53d010ab81aa3279/src/core/Object3D.js#L282
|
|
27
31
|
*/
|
|
28
32
|
|
|
29
|
-
|
|
33
|
+
quaternion_invert_orientation(scratch_quat, rotation);
|
|
34
|
+
|
|
35
|
+
object.quaternion.set(
|
|
36
|
+
scratch_quat.x, scratch_quat.y, scratch_quat.z, scratch_quat.w
|
|
37
|
+
);
|
|
30
38
|
|
|
31
39
|
object.rotation.setFromQuaternion(object.quaternion);
|
|
32
40
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quaternion_invert_orientation.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/ecs/camera/quaternion_invert_orientation.js"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,2FAgBC"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import Vector3 from "../../../../core/geom/Vector3.js";
|
|
2
|
-
import { Matrix4 } from "three";
|
|
3
2
|
|
|
4
|
-
const m4_scratch = new Matrix4();
|
|
5
3
|
const v3_scratch_0 = new Vector3();
|
|
6
4
|
const v3_scratch_1 = new Vector3();
|
|
7
5
|
|
|
@@ -10,7 +8,7 @@ const v3_scratch_1 = new Vector3();
|
|
|
10
8
|
* @param {Quaternion} output
|
|
11
9
|
* @param {Quaternion} input
|
|
12
10
|
*/
|
|
13
|
-
export function
|
|
11
|
+
export function quaternion_invert_orientation(output, input) {
|
|
14
12
|
const forward = v3_scratch_0;
|
|
15
13
|
const up = v3_scratch_1;
|
|
16
14
|
|
|
@@ -20,7 +18,10 @@ export function invertQuaternionOrientation(output, input) {
|
|
|
20
18
|
forward.applyQuaternion(input);
|
|
21
19
|
up.applyQuaternion(input);
|
|
22
20
|
|
|
23
|
-
|
|
21
|
+
// point in the opposite direction
|
|
22
|
+
forward.negate();
|
|
24
23
|
|
|
25
|
-
output.
|
|
24
|
+
output.lookRotation(
|
|
25
|
+
forward, up
|
|
26
|
+
);
|
|
26
27
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InvertQuaternionOrientation.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/ecs/camera/InvertQuaternionOrientation.js"],"names":[],"mappings":"AAOA;;;;GAIG;AACH,yFAaC"}
|