@galacean/engine-physics-lite 0.9.0-beta.81 → 0.9.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/dist/browser.js +60 -48
- package/dist/main.js +60 -48
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +1300 -806
- package/dist/module.js +60 -48
- package/dist/module.js.map +1 -1
- package/package.json +4 -4
package/dist/browser.js
CHANGED
|
@@ -26,56 +26,48 @@
|
|
|
26
26
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
function
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
return o;
|
|
33
|
-
};
|
|
29
|
+
function _set_prototype_of(o, p) {
|
|
30
|
+
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
31
|
+
o.__proto__ = p;
|
|
34
32
|
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
return o;
|
|
34
|
+
};
|
|
37
35
|
|
|
38
|
-
|
|
39
|
-
return setPrototypeOf(o, p);
|
|
36
|
+
return _set_prototype_of(o, p);
|
|
40
37
|
}
|
|
41
38
|
|
|
42
39
|
function _inherits(subClass, superClass) {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
48
|
-
constructor: {
|
|
49
|
-
value: subClass,
|
|
50
|
-
writable: true,
|
|
51
|
-
configurable: true
|
|
40
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
41
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
52
42
|
}
|
|
53
|
-
|
|
54
|
-
|
|
43
|
+
|
|
44
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } });
|
|
45
|
+
|
|
46
|
+
if (superClass) _set_prototype_of(subClass, superClass);
|
|
55
47
|
}
|
|
56
48
|
|
|
57
49
|
function _defineProperties(target, props) {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
50
|
+
for (var i = 0; i < props.length; i++) {
|
|
51
|
+
var descriptor = props[i];
|
|
52
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
53
|
+
descriptor.configurable = true;
|
|
54
|
+
|
|
55
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
56
|
+
|
|
57
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
58
|
+
}
|
|
65
59
|
}
|
|
60
|
+
function _create_class(Constructor, protoProps, staticProps) {
|
|
61
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
62
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
66
63
|
|
|
67
|
-
|
|
68
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
69
|
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
70
|
-
return Constructor;
|
|
64
|
+
return Constructor;
|
|
71
65
|
}
|
|
72
66
|
|
|
73
67
|
function _instanceof(left, right) {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
return left instanceof right;
|
|
78
|
-
}
|
|
68
|
+
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
69
|
+
return !!right[Symbol.hasInstance](left);
|
|
70
|
+
} else return left instanceof right;
|
|
79
71
|
}
|
|
80
72
|
|
|
81
73
|
/**
|
|
@@ -206,8 +198,12 @@
|
|
|
206
198
|
};
|
|
207
199
|
return LiteColliderShape;
|
|
208
200
|
}();
|
|
209
|
-
|
|
210
|
-
|
|
201
|
+
(function() {
|
|
202
|
+
LiteColliderShape._ray = new engine.Ray();
|
|
203
|
+
})();
|
|
204
|
+
(function() {
|
|
205
|
+
LiteColliderShape._tempPoint = new engine.Vector3();
|
|
206
|
+
})();
|
|
211
207
|
|
|
212
208
|
/**
|
|
213
209
|
* Used to implement transformation related functions.
|
|
@@ -350,7 +346,7 @@
|
|
|
350
346
|
this._dirtyFlag |= type;
|
|
351
347
|
this._updateFlagManager.distribute();
|
|
352
348
|
};
|
|
353
|
-
|
|
349
|
+
_create_class(LiteTransform, [
|
|
354
350
|
{
|
|
355
351
|
key: "owner",
|
|
356
352
|
set: function set(value) {
|
|
@@ -499,8 +495,12 @@
|
|
|
499
495
|
]);
|
|
500
496
|
return LiteTransform;
|
|
501
497
|
}();
|
|
502
|
-
|
|
503
|
-
|
|
498
|
+
(function() {
|
|
499
|
+
LiteTransform._tempQuat0 = new engine.Quaternion();
|
|
500
|
+
})();
|
|
501
|
+
(function() {
|
|
502
|
+
LiteTransform._tempMat42 = new engine.Matrix();
|
|
503
|
+
})();
|
|
504
504
|
var /**
|
|
505
505
|
* Dirty flag of transform.
|
|
506
506
|
*/ TransformFlag;
|
|
@@ -805,7 +805,9 @@
|
|
|
805
805
|
};
|
|
806
806
|
return LiteBoxColliderShape;
|
|
807
807
|
}(LiteColliderShape);
|
|
808
|
-
|
|
808
|
+
(function() {
|
|
809
|
+
LiteBoxColliderShape._tempBox = new engine.BoundingBox();
|
|
810
|
+
})();
|
|
809
811
|
|
|
810
812
|
/**
|
|
811
813
|
* Sphere collider shape in Lite.
|
|
@@ -845,7 +847,7 @@
|
|
|
845
847
|
return false;
|
|
846
848
|
}
|
|
847
849
|
};
|
|
848
|
-
|
|
850
|
+
_create_class(LiteSphereColliderShape, [
|
|
849
851
|
{
|
|
850
852
|
key: "worldRadius",
|
|
851
853
|
get: function get() {
|
|
@@ -855,7 +857,9 @@
|
|
|
855
857
|
]);
|
|
856
858
|
return LiteSphereColliderShape;
|
|
857
859
|
}(LiteColliderShape);
|
|
858
|
-
|
|
860
|
+
(function() {
|
|
861
|
+
LiteSphereColliderShape._tempSphere = new engine.BoundingSphere();
|
|
862
|
+
})();
|
|
859
863
|
|
|
860
864
|
/**
|
|
861
865
|
* A manager is a collection of colliders and constraints which can interact.
|
|
@@ -1107,10 +1111,18 @@
|
|
|
1107
1111
|
};
|
|
1108
1112
|
return LitePhysicsManager;
|
|
1109
1113
|
}();
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
+
(function() {
|
|
1115
|
+
LitePhysicsManager._tempSphere = new engine.BoundingSphere();
|
|
1116
|
+
})();
|
|
1117
|
+
(function() {
|
|
1118
|
+
LitePhysicsManager._tempBox = new engine.BoundingBox();
|
|
1119
|
+
})();
|
|
1120
|
+
(function() {
|
|
1121
|
+
LitePhysicsManager._currentHit = new LiteHitResult();
|
|
1122
|
+
})();
|
|
1123
|
+
(function() {
|
|
1124
|
+
LitePhysicsManager._hitResult = new LiteHitResult();
|
|
1125
|
+
})();
|
|
1114
1126
|
var /**
|
|
1115
1127
|
* Physics state
|
|
1116
1128
|
*/ TriggerEventState;
|
package/dist/main.js
CHANGED
|
@@ -26,56 +26,48 @@ function __decorate(decorators, target, key, desc) {
|
|
|
26
26
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
function
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
return o;
|
|
33
|
-
};
|
|
29
|
+
function _set_prototype_of(o, p) {
|
|
30
|
+
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
31
|
+
o.__proto__ = p;
|
|
34
32
|
|
|
35
|
-
|
|
36
|
-
}
|
|
33
|
+
return o;
|
|
34
|
+
};
|
|
37
35
|
|
|
38
|
-
|
|
39
|
-
return setPrototypeOf(o, p);
|
|
36
|
+
return _set_prototype_of(o, p);
|
|
40
37
|
}
|
|
41
38
|
|
|
42
39
|
function _inherits(subClass, superClass) {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
48
|
-
constructor: {
|
|
49
|
-
value: subClass,
|
|
50
|
-
writable: true,
|
|
51
|
-
configurable: true
|
|
40
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
41
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
52
42
|
}
|
|
53
|
-
|
|
54
|
-
|
|
43
|
+
|
|
44
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } });
|
|
45
|
+
|
|
46
|
+
if (superClass) _set_prototype_of(subClass, superClass);
|
|
55
47
|
}
|
|
56
48
|
|
|
57
49
|
function _defineProperties(target, props) {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
50
|
+
for (var i = 0; i < props.length; i++) {
|
|
51
|
+
var descriptor = props[i];
|
|
52
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
53
|
+
descriptor.configurable = true;
|
|
54
|
+
|
|
55
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
56
|
+
|
|
57
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
58
|
+
}
|
|
65
59
|
}
|
|
60
|
+
function _create_class(Constructor, protoProps, staticProps) {
|
|
61
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
62
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
66
63
|
|
|
67
|
-
|
|
68
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
69
|
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
70
|
-
return Constructor;
|
|
64
|
+
return Constructor;
|
|
71
65
|
}
|
|
72
66
|
|
|
73
67
|
function _instanceof(left, right) {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
return left instanceof right;
|
|
78
|
-
}
|
|
68
|
+
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
69
|
+
return !!right[Symbol.hasInstance](left);
|
|
70
|
+
} else return left instanceof right;
|
|
79
71
|
}
|
|
80
72
|
|
|
81
73
|
/**
|
|
@@ -206,8 +198,12 @@ function _instanceof(left, right) {
|
|
|
206
198
|
};
|
|
207
199
|
return LiteColliderShape;
|
|
208
200
|
}();
|
|
209
|
-
|
|
210
|
-
LiteColliderShape.
|
|
201
|
+
(function() {
|
|
202
|
+
LiteColliderShape._ray = new engine.Ray();
|
|
203
|
+
})();
|
|
204
|
+
(function() {
|
|
205
|
+
LiteColliderShape._tempPoint = new engine.Vector3();
|
|
206
|
+
})();
|
|
211
207
|
|
|
212
208
|
/**
|
|
213
209
|
* Used to implement transformation related functions.
|
|
@@ -350,7 +346,7 @@ LiteColliderShape._tempPoint = new engine.Vector3();
|
|
|
350
346
|
this._dirtyFlag |= type;
|
|
351
347
|
this._updateFlagManager.distribute();
|
|
352
348
|
};
|
|
353
|
-
|
|
349
|
+
_create_class(LiteTransform, [
|
|
354
350
|
{
|
|
355
351
|
key: "owner",
|
|
356
352
|
set: function set(value) {
|
|
@@ -499,8 +495,12 @@ LiteColliderShape._tempPoint = new engine.Vector3();
|
|
|
499
495
|
]);
|
|
500
496
|
return LiteTransform;
|
|
501
497
|
}();
|
|
502
|
-
|
|
503
|
-
LiteTransform.
|
|
498
|
+
(function() {
|
|
499
|
+
LiteTransform._tempQuat0 = new engine.Quaternion();
|
|
500
|
+
})();
|
|
501
|
+
(function() {
|
|
502
|
+
LiteTransform._tempMat42 = new engine.Matrix();
|
|
503
|
+
})();
|
|
504
504
|
var /**
|
|
505
505
|
* Dirty flag of transform.
|
|
506
506
|
*/ TransformFlag;
|
|
@@ -805,7 +805,9 @@ var /**
|
|
|
805
805
|
};
|
|
806
806
|
return LiteBoxColliderShape;
|
|
807
807
|
}(LiteColliderShape);
|
|
808
|
-
|
|
808
|
+
(function() {
|
|
809
|
+
LiteBoxColliderShape._tempBox = new engine.BoundingBox();
|
|
810
|
+
})();
|
|
809
811
|
|
|
810
812
|
/**
|
|
811
813
|
* Sphere collider shape in Lite.
|
|
@@ -845,7 +847,7 @@ LiteBoxColliderShape._tempBox = new engine.BoundingBox();
|
|
|
845
847
|
return false;
|
|
846
848
|
}
|
|
847
849
|
};
|
|
848
|
-
|
|
850
|
+
_create_class(LiteSphereColliderShape, [
|
|
849
851
|
{
|
|
850
852
|
key: "worldRadius",
|
|
851
853
|
get: function get() {
|
|
@@ -855,7 +857,9 @@ LiteBoxColliderShape._tempBox = new engine.BoundingBox();
|
|
|
855
857
|
]);
|
|
856
858
|
return LiteSphereColliderShape;
|
|
857
859
|
}(LiteColliderShape);
|
|
858
|
-
|
|
860
|
+
(function() {
|
|
861
|
+
LiteSphereColliderShape._tempSphere = new engine.BoundingSphere();
|
|
862
|
+
})();
|
|
859
863
|
|
|
860
864
|
/**
|
|
861
865
|
* A manager is a collection of colliders and constraints which can interact.
|
|
@@ -1107,10 +1111,18 @@ LiteSphereColliderShape._tempSphere = new engine.BoundingSphere();
|
|
|
1107
1111
|
};
|
|
1108
1112
|
return LitePhysicsManager;
|
|
1109
1113
|
}();
|
|
1110
|
-
|
|
1111
|
-
LitePhysicsManager.
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
+
(function() {
|
|
1115
|
+
LitePhysicsManager._tempSphere = new engine.BoundingSphere();
|
|
1116
|
+
})();
|
|
1117
|
+
(function() {
|
|
1118
|
+
LitePhysicsManager._tempBox = new engine.BoundingBox();
|
|
1119
|
+
})();
|
|
1120
|
+
(function() {
|
|
1121
|
+
LitePhysicsManager._currentHit = new LiteHitResult();
|
|
1122
|
+
})();
|
|
1123
|
+
(function() {
|
|
1124
|
+
LitePhysicsManager._hitResult = new LiteHitResult();
|
|
1125
|
+
})();
|
|
1114
1126
|
var /**
|
|
1115
1127
|
* Physics state
|
|
1116
1128
|
*/ TriggerEventState;
|