@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/miniprogram.js
CHANGED
|
@@ -24,56 +24,48 @@ function __decorate$2(decorators, target, key, desc) {
|
|
|
24
24
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
function
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
return o;
|
|
31
|
-
};
|
|
27
|
+
function _set_prototype_of$3(o, p) {
|
|
28
|
+
_set_prototype_of$3 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
29
|
+
o.__proto__ = p;
|
|
32
30
|
|
|
33
|
-
|
|
34
|
-
}
|
|
31
|
+
return o;
|
|
32
|
+
};
|
|
35
33
|
|
|
36
|
-
|
|
37
|
-
return setPrototypeOf$3(o, p);
|
|
34
|
+
return _set_prototype_of$3(o, p);
|
|
38
35
|
}
|
|
39
36
|
|
|
40
37
|
function _inherits$3(subClass, superClass) {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
46
|
-
constructor: {
|
|
47
|
-
value: subClass,
|
|
48
|
-
writable: true,
|
|
49
|
-
configurable: true
|
|
38
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
39
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
50
40
|
}
|
|
51
|
-
|
|
52
|
-
|
|
41
|
+
|
|
42
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } });
|
|
43
|
+
|
|
44
|
+
if (superClass) _set_prototype_of$3(subClass, superClass);
|
|
53
45
|
}
|
|
54
46
|
|
|
55
47
|
function _defineProperties$3(target, props) {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
48
|
+
for (var i = 0; i < props.length; i++) {
|
|
49
|
+
var descriptor = props[i];
|
|
50
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
51
|
+
descriptor.configurable = true;
|
|
52
|
+
|
|
53
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
54
|
+
|
|
55
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
56
|
+
}
|
|
63
57
|
}
|
|
58
|
+
function _create_class$3(Constructor, protoProps, staticProps) {
|
|
59
|
+
if (protoProps) _defineProperties$3(Constructor.prototype, protoProps);
|
|
60
|
+
if (staticProps) _defineProperties$3(Constructor, staticProps);
|
|
64
61
|
|
|
65
|
-
|
|
66
|
-
if (protoProps) _defineProperties$3(Constructor.prototype, protoProps);
|
|
67
|
-
if (staticProps) _defineProperties$3(Constructor, staticProps);
|
|
68
|
-
return Constructor;
|
|
62
|
+
return Constructor;
|
|
69
63
|
}
|
|
70
64
|
|
|
71
65
|
function _instanceof(left, right) {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
return left instanceof right;
|
|
76
|
-
}
|
|
66
|
+
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
67
|
+
return !!right[Symbol.hasInstance](left);
|
|
68
|
+
} else return left instanceof right;
|
|
77
69
|
}
|
|
78
70
|
|
|
79
71
|
function getAugmentedNamespace(n) {
|
|
@@ -111,10 +103,8 @@ var miniprogram$7 = require("@galacean/engine-math/dist/miniprogram");
|
|
|
111
103
|
Platform[Platform[/** Mac platform. */ "Mac"] = 3] = "Mac";
|
|
112
104
|
Platform[Platform[/** Unknown platform. */ "Unknown"] = 4] = "Unknown";
|
|
113
105
|
})(exports.Platform || (exports.Platform = {}));
|
|
114
|
-
function
|
|
115
|
-
if (self === void 0)
|
|
116
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
117
|
-
}
|
|
106
|
+
function _assert_this_initialized(self) {
|
|
107
|
+
if (self === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
118
108
|
return self;
|
|
119
109
|
}
|
|
120
110
|
function _defineProperties$2(target, props) {
|
|
@@ -126,20 +116,17 @@ function _defineProperties$2(target, props) {
|
|
|
126
116
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
127
117
|
}
|
|
128
118
|
}
|
|
129
|
-
function
|
|
119
|
+
function _create_class$2(Constructor, protoProps, staticProps) {
|
|
130
120
|
if (protoProps) _defineProperties$2(Constructor.prototype, protoProps);
|
|
131
121
|
if (staticProps) _defineProperties$2(Constructor, staticProps);
|
|
132
122
|
return Constructor;
|
|
133
123
|
}
|
|
134
|
-
function
|
|
135
|
-
|
|
124
|
+
function _set_prototype_of$2(o, p) {
|
|
125
|
+
_set_prototype_of$2 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
136
126
|
o.__proto__ = p;
|
|
137
127
|
return o;
|
|
138
128
|
};
|
|
139
|
-
return
|
|
140
|
-
}
|
|
141
|
-
function _setPrototypeOf$2(o, p) {
|
|
142
|
-
return setPrototypeOf$2(o, p);
|
|
129
|
+
return _set_prototype_of$2(o, p);
|
|
143
130
|
}
|
|
144
131
|
function _inherits$2(subClass, superClass) {
|
|
145
132
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
@@ -152,7 +139,7 @@ function _inherits$2(subClass, superClass) {
|
|
|
152
139
|
configurable: true
|
|
153
140
|
}
|
|
154
141
|
});
|
|
155
|
-
if (superClass)
|
|
142
|
+
if (superClass) _set_prototype_of$2(subClass, superClass);
|
|
156
143
|
}
|
|
157
144
|
/**
|
|
158
145
|
* Common utility methods for math operations.
|
|
@@ -199,9 +186,15 @@ function _inherits$2(subClass, superClass) {
|
|
|
199
186
|
};
|
|
200
187
|
return MathUtil;
|
|
201
188
|
}();
|
|
202
|
-
|
|
203
|
-
/** The
|
|
204
|
-
|
|
189
|
+
(function() {
|
|
190
|
+
/** The value for which all absolute numbers smaller than are considered equal to zero. */ MathUtil.zeroTolerance = 1e-6;
|
|
191
|
+
})();
|
|
192
|
+
(function() {
|
|
193
|
+
/** The conversion factor that radian to degree. */ MathUtil.radToDegreeFactor = 180 / Math.PI;
|
|
194
|
+
})();
|
|
195
|
+
(function() {
|
|
196
|
+
/** The conversion factor that degree to radian. */ MathUtil.degreeToRadFactor = Math.PI / 180;
|
|
197
|
+
})();
|
|
205
198
|
/**
|
|
206
199
|
* Describes a color in the from of RGBA (in order: R, G, B, A).
|
|
207
200
|
*/ var Color = /*#__PURE__*/ function() {
|
|
@@ -410,7 +403,7 @@ function _inherits$2(subClass, superClass) {
|
|
|
410
403
|
out._onValueChanged && out._onValueChanged();
|
|
411
404
|
return out;
|
|
412
405
|
};
|
|
413
|
-
|
|
406
|
+
_create_class$2(Color, [
|
|
414
407
|
{
|
|
415
408
|
key: "r",
|
|
416
409
|
get: /**
|
|
@@ -484,9 +477,7 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
|
484
477
|
function _instanceof1$2(left, right) {
|
|
485
478
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
486
479
|
return !!right[Symbol.hasInstance](left);
|
|
487
|
-
} else
|
|
488
|
-
return _instanceof(left, right);
|
|
489
|
-
}
|
|
480
|
+
} else return _instanceof(left, right);
|
|
490
481
|
}
|
|
491
482
|
/**
|
|
492
483
|
* Clone mode.
|
|
@@ -665,15 +656,21 @@ function _instanceof1$2(left, right) {
|
|
|
665
656
|
};
|
|
666
657
|
return CloneManager;
|
|
667
658
|
}();
|
|
668
|
-
|
|
669
|
-
/** @internal */ CloneManager.
|
|
670
|
-
|
|
659
|
+
(function() {
|
|
660
|
+
/** @internal */ CloneManager._subCloneModeMap = new Map();
|
|
661
|
+
})();
|
|
662
|
+
(function() {
|
|
663
|
+
/** @internal */ CloneManager._cloneModeMap = new Map();
|
|
664
|
+
})();
|
|
665
|
+
(function() {
|
|
666
|
+
CloneManager._objectType = Object.getPrototypeOf(Object);
|
|
667
|
+
})();
|
|
671
668
|
/**
|
|
672
669
|
* EngineObject.
|
|
673
670
|
*/ var EngineObject = /*#__PURE__*/ function() {
|
|
674
671
|
function EngineObject(engine) {
|
|
675
|
-
this._destroyed = false;
|
|
676
672
|
/** Engine unique id. */ this.instanceId = ++EngineObject._instanceIdCounter;
|
|
673
|
+
this._destroyed = false;
|
|
677
674
|
this._engine = engine;
|
|
678
675
|
}
|
|
679
676
|
var _proto = EngineObject.prototype;
|
|
@@ -685,7 +682,7 @@ CloneManager._objectType = Object.getPrototypeOf(Object);
|
|
|
685
682
|
(_this__engine_resourceManager = this._engine.resourceManager) == null ? void 0 : _this__engine_resourceManager._deleteAsset(this);
|
|
686
683
|
this._destroyed = true;
|
|
687
684
|
};
|
|
688
|
-
|
|
685
|
+
_create_class$2(EngineObject, [
|
|
689
686
|
{
|
|
690
687
|
key: "engine",
|
|
691
688
|
get: /**
|
|
@@ -705,7 +702,9 @@ CloneManager._objectType = Object.getPrototypeOf(Object);
|
|
|
705
702
|
]);
|
|
706
703
|
return EngineObject;
|
|
707
704
|
}();
|
|
708
|
-
|
|
705
|
+
(function() {
|
|
706
|
+
EngineObject._instanceIdCounter = 0;
|
|
707
|
+
})();
|
|
709
708
|
__decorate$1([
|
|
710
709
|
ignoreClone
|
|
711
710
|
], EngineObject.prototype, "instanceId", void 0);
|
|
@@ -720,7 +719,7 @@ __decorate$1([
|
|
|
720
719
|
_this = EngineObject.call(this, engine) || this;
|
|
721
720
|
/** Whether to ignore the garbage collection check, if it is true, it will not be affected by ResourceManager.gc(). */ _this.isGCIgnored = false;
|
|
722
721
|
_this._refCount = 0;
|
|
723
|
-
engine.resourceManager._addRefObject(_this.instanceId,
|
|
722
|
+
engine.resourceManager._addRefObject(_this.instanceId, _assert_this_initialized(_this));
|
|
724
723
|
return _this;
|
|
725
724
|
};
|
|
726
725
|
_inherits$2(RefObject, EngineObject);
|
|
@@ -763,7 +762,7 @@ __decorate$1([
|
|
|
763
762
|
*/ _proto._addToResourceManager = function _addToResourceManager(path) {
|
|
764
763
|
this._engine.resourceManager._addAsset(path, this);
|
|
765
764
|
};
|
|
766
|
-
|
|
765
|
+
_create_class$2(RefObject, [
|
|
767
766
|
{
|
|
768
767
|
key: "refCount",
|
|
769
768
|
get: /**
|
|
@@ -882,7 +881,7 @@ __decorate$1([
|
|
|
882
881
|
_proto.stopPropagation = function stopPropagation() {
|
|
883
882
|
this._propagationStopped = true;
|
|
884
883
|
};
|
|
885
|
-
|
|
884
|
+
_create_class$2(Event, [
|
|
886
885
|
{
|
|
887
886
|
key: "propagationStopped",
|
|
888
887
|
get: function get() {
|
|
@@ -1155,7 +1154,7 @@ var Time = /*#__PURE__*/ function() {
|
|
|
1155
1154
|
this._lastTickTime = now;
|
|
1156
1155
|
this._frameCount++;
|
|
1157
1156
|
};
|
|
1158
|
-
|
|
1157
|
+
_create_class$2(Time, [
|
|
1159
1158
|
{
|
|
1160
1159
|
key: "frameCount",
|
|
1161
1160
|
get: /*
|
|
@@ -1390,7 +1389,7 @@ exports.GLCapabilityType = void 0;
|
|
|
1390
1389
|
_proto._getMipmapCount = function _getMipmapCount() {
|
|
1391
1390
|
return this._mipmap ? Math.floor(Math.log2(Math.max(this._width, this._height))) + 1 : 1;
|
|
1392
1391
|
};
|
|
1393
|
-
|
|
1392
|
+
_create_class$2(Texture, [
|
|
1394
1393
|
{
|
|
1395
1394
|
key: "format",
|
|
1396
1395
|
get: /**
|
|
@@ -1538,7 +1537,7 @@ exports.GLCapabilityType = void 0;
|
|
|
1538
1537
|
}
|
|
1539
1538
|
_this._depthTexture = depth;
|
|
1540
1539
|
}
|
|
1541
|
-
_this._platformRenderTarget = engine._hardwareRenderer.createPlatformRenderTarget(
|
|
1540
|
+
_this._platformRenderTarget = engine._hardwareRenderer.createPlatformRenderTarget(_assert_this_initialized(_this));
|
|
1542
1541
|
return _this;
|
|
1543
1542
|
};
|
|
1544
1543
|
_inherits$2(RenderTarget, EngineObject);
|
|
@@ -1581,7 +1580,7 @@ exports.GLCapabilityType = void 0;
|
|
|
1581
1580
|
*/ _proto._blitRenderTarget = function _blitRenderTarget() {
|
|
1582
1581
|
this._platformRenderTarget.blitRenderTarget();
|
|
1583
1582
|
};
|
|
1584
|
-
|
|
1583
|
+
_create_class$2(RenderTarget, [
|
|
1585
1584
|
{
|
|
1586
1585
|
key: "autoGenerateMipmaps",
|
|
1587
1586
|
get: /**
|
|
@@ -1651,7 +1650,7 @@ exports.GLCapabilityType = void 0;
|
|
|
1651
1650
|
_this._format = format;
|
|
1652
1651
|
_this._mipmapCount = _this._getMipmapCount();
|
|
1653
1652
|
_this._isDepthTexture = format == exports.TextureFormat.Depth || format == exports.TextureFormat.DepthStencil || format == exports.TextureFormat.Depth16 || format == exports.TextureFormat.Depth24 || format == exports.TextureFormat.Depth32 || format == exports.TextureFormat.Depth24Stencil8 || format == exports.TextureFormat.Depth32Stencil8;
|
|
1654
|
-
_this._platformTexture = engine._hardwareRenderer.createPlatformTexture2D(
|
|
1653
|
+
_this._platformTexture = engine._hardwareRenderer.createPlatformTexture2D(_assert_this_initialized(_this));
|
|
1655
1654
|
_this.filterMode = exports.TextureFilterMode.Bilinear;
|
|
1656
1655
|
_this.wrapModeU = _this.wrapModeV = exports.TextureWrapMode.Repeat;
|
|
1657
1656
|
return _this;
|
|
@@ -1717,7 +1716,7 @@ exports.GLCapabilityType = void 0;
|
|
|
1717
1716
|
_this._length = length1;
|
|
1718
1717
|
_this._format = format;
|
|
1719
1718
|
_this._mipmapCount = _this._getMipmapCount();
|
|
1720
|
-
_this._platformTexture = engine._hardwareRenderer.createPlatformTexture2DArray(
|
|
1719
|
+
_this._platformTexture = engine._hardwareRenderer.createPlatformTexture2DArray(_assert_this_initialized(_this));
|
|
1721
1720
|
_this.filterMode = exports.TextureFilterMode.Bilinear;
|
|
1722
1721
|
_this.wrapModeU = _this.wrapModeV = exports.TextureWrapMode.Repeat;
|
|
1723
1722
|
return _this;
|
|
@@ -1770,7 +1769,7 @@ exports.GLCapabilityType = void 0;
|
|
|
1770
1769
|
this._platformTexture.getPixelBuffer(elementIndex, xOrMipLevelOrOut, yOrMipLevel, width, height, mipLevelOrOut, out);
|
|
1771
1770
|
}
|
|
1772
1771
|
};
|
|
1773
|
-
|
|
1772
|
+
_create_class$2(Texture2DArray, [
|
|
1774
1773
|
{
|
|
1775
1774
|
key: "length",
|
|
1776
1775
|
get: /**
|
|
@@ -1795,7 +1794,7 @@ exports.GLCapabilityType = void 0;
|
|
|
1795
1794
|
_this._height = size;
|
|
1796
1795
|
_this._format = format;
|
|
1797
1796
|
_this._mipmapCount = _this._getMipmapCount();
|
|
1798
|
-
_this._platformTexture = engine._hardwareRenderer.createPlatformTextureCube(
|
|
1797
|
+
_this._platformTexture = engine._hardwareRenderer.createPlatformTextureCube(_assert_this_initialized(_this));
|
|
1799
1798
|
_this.filterMode = exports.TextureFilterMode.Bilinear;
|
|
1800
1799
|
_this.wrapModeU = _this.wrapModeV = exports.TextureWrapMode.Clamp;
|
|
1801
1800
|
return _this;
|
|
@@ -1922,7 +1921,7 @@ exports.GLCapabilityType = void 0;
|
|
|
1922
1921
|
_proto.getCharInfo = function getCharInfo(char) {
|
|
1923
1922
|
return this._charInfoMap[char.charCodeAt(0)];
|
|
1924
1923
|
};
|
|
1925
|
-
|
|
1924
|
+
_create_class$2(FontAtlas, [
|
|
1926
1925
|
{
|
|
1927
1926
|
key: "texture",
|
|
1928
1927
|
get: function get() {
|
|
@@ -2068,7 +2067,7 @@ exports.GLCapabilityType = void 0;
|
|
|
2068
2067
|
}
|
|
2069
2068
|
return null;
|
|
2070
2069
|
};
|
|
2071
|
-
|
|
2070
|
+
_create_class$2(Font, [
|
|
2072
2071
|
{
|
|
2073
2072
|
key: "name",
|
|
2074
2073
|
get: /**
|
|
@@ -2080,8 +2079,9 @@ exports.GLCapabilityType = void 0;
|
|
|
2080
2079
|
]);
|
|
2081
2080
|
return Font;
|
|
2082
2081
|
}(RefObject);
|
|
2083
|
-
|
|
2084
|
-
|
|
2082
|
+
(function() {
|
|
2083
|
+
Font._fontMap = {};
|
|
2084
|
+
})();
|
|
2085
2085
|
var AssetPromise = /*#__PURE__*/ function() {
|
|
2086
2086
|
var AssetPromise = function AssetPromise(executor) {
|
|
2087
2087
|
var _this = this;
|
|
@@ -2200,9 +2200,9 @@ var AssetPromise = /*#__PURE__*/ function() {
|
|
|
2200
2200
|
}
|
|
2201
2201
|
});
|
|
2202
2202
|
};
|
|
2203
|
-
|
|
2203
|
+
_create_class$2(AssetPromise, [
|
|
2204
2204
|
{
|
|
2205
|
-
key:
|
|
2205
|
+
key: Symbol.toStringTag,
|
|
2206
2206
|
get: /** compatible with Promise */ function get() {
|
|
2207
2207
|
return "AssetPromise";
|
|
2208
2208
|
}
|
|
@@ -2513,8 +2513,12 @@ var /** @internal */ PromiseState;
|
|
|
2513
2513
|
};
|
|
2514
2514
|
return ResourceManager;
|
|
2515
2515
|
}();
|
|
2516
|
-
|
|
2517
|
-
ResourceManager.
|
|
2516
|
+
(function() {
|
|
2517
|
+
/** Loader collection. */ ResourceManager._loaders = {};
|
|
2518
|
+
})();
|
|
2519
|
+
(function() {
|
|
2520
|
+
ResourceManager._extTypeMapping = {};
|
|
2521
|
+
})();
|
|
2518
2522
|
/**
|
|
2519
2523
|
* Declare ResourceLoader's decorator.
|
|
2520
2524
|
* @param assetType - Type of asset
|
|
@@ -2867,10 +2871,14 @@ var ComponentCloner = /*#__PURE__*/ function() {
|
|
|
2867
2871
|
};
|
|
2868
2872
|
return ComponentsDependencies;
|
|
2869
2873
|
}();
|
|
2870
|
-
|
|
2874
|
+
(function() {
|
|
2875
|
+
/**
|
|
2871
2876
|
* @internal
|
|
2872
2877
|
*/ ComponentsDependencies._dependenciesMap = new Map();
|
|
2873
|
-
|
|
2878
|
+
})();
|
|
2879
|
+
(function() {
|
|
2880
|
+
ComponentsDependencies._invDependenciesMap = new Map();
|
|
2881
|
+
})();
|
|
2874
2882
|
/**
|
|
2875
2883
|
* Dependent components, automatically added if they do not exist.
|
|
2876
2884
|
* @param components - Dependent components
|
|
@@ -3032,7 +3040,7 @@ ComponentsDependencies._invDependenciesMap = new Map();
|
|
|
3032
3040
|
}
|
|
3033
3041
|
}
|
|
3034
3042
|
};
|
|
3035
|
-
|
|
3043
|
+
_create_class$2(Component, [
|
|
3036
3044
|
{
|
|
3037
3045
|
key: "enabled",
|
|
3038
3046
|
get: /**
|
|
@@ -3163,7 +3171,6 @@ __decorate$1([
|
|
|
3163
3171
|
var Transform = function Transform(entity) {
|
|
3164
3172
|
var _this;
|
|
3165
3173
|
_this = Component.call(this, entity) || this;
|
|
3166
|
-
_this._dirtyFlag = 0xbc;
|
|
3167
3174
|
_this._position = new miniprogram$7.Vector3();
|
|
3168
3175
|
_this._rotation = new miniprogram$7.Vector3();
|
|
3169
3176
|
_this._rotationQuaternion = new miniprogram$7.Quaternion();
|
|
@@ -3176,14 +3183,15 @@ __decorate$1([
|
|
|
3176
3183
|
_this._worldMatrix = new miniprogram$7.Matrix();
|
|
3177
3184
|
_this._isParentDirty = true;
|
|
3178
3185
|
_this._parentTransformCache = null;
|
|
3186
|
+
_this._dirtyFlag = 0xbc;
|
|
3179
3187
|
/** @internal */ _this._updateFlagManager = new UpdateFlagManager();
|
|
3180
|
-
_this._onPositionChanged = _this._onPositionChanged.bind(
|
|
3181
|
-
_this._onWorldPositionChanged = _this._onWorldPositionChanged.bind(
|
|
3182
|
-
_this._onRotationChanged = _this._onRotationChanged.bind(
|
|
3183
|
-
_this._onWorldRotationChanged = _this._onWorldRotationChanged.bind(
|
|
3184
|
-
_this._onRotationQuaternionChanged = _this._onRotationQuaternionChanged.bind(
|
|
3185
|
-
_this._onWorldRotationQuaternionChanged = _this._onWorldRotationQuaternionChanged.bind(
|
|
3186
|
-
_this._onScaleChanged = _this._onScaleChanged.bind(
|
|
3188
|
+
_this._onPositionChanged = _this._onPositionChanged.bind(_assert_this_initialized(_this));
|
|
3189
|
+
_this._onWorldPositionChanged = _this._onWorldPositionChanged.bind(_assert_this_initialized(_this));
|
|
3190
|
+
_this._onRotationChanged = _this._onRotationChanged.bind(_assert_this_initialized(_this));
|
|
3191
|
+
_this._onWorldRotationChanged = _this._onWorldRotationChanged.bind(_assert_this_initialized(_this));
|
|
3192
|
+
_this._onRotationQuaternionChanged = _this._onRotationQuaternionChanged.bind(_assert_this_initialized(_this));
|
|
3193
|
+
_this._onWorldRotationQuaternionChanged = _this._onWorldRotationQuaternionChanged.bind(_assert_this_initialized(_this));
|
|
3194
|
+
_this._onScaleChanged = _this._onScaleChanged.bind(_assert_this_initialized(_this));
|
|
3187
3195
|
//@ts-ignore
|
|
3188
3196
|
_this._position._onValueChanged = _this._onPositionChanged;
|
|
3189
3197
|
//@ts-ignore
|
|
@@ -3576,7 +3584,7 @@ __decorate$1([
|
|
|
3576
3584
|
this._setDirtyFlagTrue(0x40);
|
|
3577
3585
|
this._updateWorldScaleFlag();
|
|
3578
3586
|
};
|
|
3579
|
-
|
|
3587
|
+
_create_class$2(Transform, [
|
|
3580
3588
|
{
|
|
3581
3589
|
key: "position",
|
|
3582
3590
|
get: /**
|
|
@@ -3822,15 +3830,33 @@ __decorate$1([
|
|
|
3822
3830
|
]);
|
|
3823
3831
|
return Transform;
|
|
3824
3832
|
}(Component);
|
|
3825
|
-
|
|
3826
|
-
Transform.
|
|
3827
|
-
|
|
3828
|
-
|
|
3829
|
-
Transform.
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
Transform.
|
|
3833
|
-
|
|
3833
|
+
(function() {
|
|
3834
|
+
Transform._tempQuat0 = new miniprogram$7.Quaternion();
|
|
3835
|
+
})();
|
|
3836
|
+
(function() {
|
|
3837
|
+
Transform._tempVec30 = new miniprogram$7.Vector3();
|
|
3838
|
+
})();
|
|
3839
|
+
(function() {
|
|
3840
|
+
Transform._tempVec31 = new miniprogram$7.Vector3();
|
|
3841
|
+
})();
|
|
3842
|
+
(function() {
|
|
3843
|
+
Transform._tempVec32 = new miniprogram$7.Vector3();
|
|
3844
|
+
})();
|
|
3845
|
+
(function() {
|
|
3846
|
+
Transform._tempMat30 = new miniprogram$7.Matrix3x3();
|
|
3847
|
+
})();
|
|
3848
|
+
(function() {
|
|
3849
|
+
Transform._tempMat31 = new miniprogram$7.Matrix3x3();
|
|
3850
|
+
})();
|
|
3851
|
+
(function() {
|
|
3852
|
+
Transform._tempMat32 = new miniprogram$7.Matrix3x3();
|
|
3853
|
+
})();
|
|
3854
|
+
(function() {
|
|
3855
|
+
Transform._tempMat41 = new miniprogram$7.Matrix();
|
|
3856
|
+
})();
|
|
3857
|
+
(function() {
|
|
3858
|
+
Transform._tempMat42 = new miniprogram$7.Matrix();
|
|
3859
|
+
})();
|
|
3834
3860
|
__decorate$1([
|
|
3835
3861
|
deepClone
|
|
3836
3862
|
], Transform.prototype, "_position", void 0);
|
|
@@ -4329,7 +4355,7 @@ var TransformModifyFlags;
|
|
|
4329
4355
|
this._traverseSetOwnerScene(children[i], scene);
|
|
4330
4356
|
}
|
|
4331
4357
|
};
|
|
4332
|
-
|
|
4358
|
+
_create_class$2(Entity, [
|
|
4333
4359
|
{
|
|
4334
4360
|
key: "isActive",
|
|
4335
4361
|
get: /**
|
|
@@ -4543,7 +4569,7 @@ var TransformModifyFlags;
|
|
|
4543
4569
|
}
|
|
4544
4570
|
}
|
|
4545
4571
|
};
|
|
4546
|
-
|
|
4572
|
+
_create_class$2(SystemInfo, null, [
|
|
4547
4573
|
{
|
|
4548
4574
|
key: "devicePixelRatio",
|
|
4549
4575
|
get: /**
|
|
@@ -4555,8 +4581,12 @@ var TransformModifyFlags;
|
|
|
4555
4581
|
]);
|
|
4556
4582
|
return SystemInfo;
|
|
4557
4583
|
}();
|
|
4558
|
-
|
|
4559
|
-
/** The
|
|
4584
|
+
(function() {
|
|
4585
|
+
/** The platform is running on. */ SystemInfo.platform = exports.Platform.Unknown;
|
|
4586
|
+
})();
|
|
4587
|
+
(function() {
|
|
4588
|
+
/** The operating system is running on. */ SystemInfo.operatingSystem = "";
|
|
4589
|
+
})();
|
|
4560
4590
|
SystemInfo._initialize();
|
|
4561
4591
|
/**
|
|
4562
4592
|
* The keys of the keyboard.
|
|
@@ -5168,7 +5198,7 @@ SystemInfo._initialize();
|
|
|
5168
5198
|
_proto._setGravity = function _setGravity() {
|
|
5169
5199
|
this._nativePhysicsManager.setGravity(this._gravity);
|
|
5170
5200
|
};
|
|
5171
|
-
|
|
5201
|
+
_create_class$2(PhysicsManager, [
|
|
5172
5202
|
{
|
|
5173
5203
|
key: "gravity",
|
|
5174
5204
|
get: /**
|
|
@@ -5224,7 +5254,7 @@ SystemInfo._initialize();
|
|
|
5224
5254
|
*/ _proto._destroy = function _destroy() {
|
|
5225
5255
|
this._nativeMaterial.destroy();
|
|
5226
5256
|
};
|
|
5227
|
-
|
|
5257
|
+
_create_class$2(PhysicsMaterial, [
|
|
5228
5258
|
{
|
|
5229
5259
|
key: "bounciness",
|
|
5230
5260
|
get: /**
|
|
@@ -5302,8 +5332,8 @@ exports.Collider = /*#__PURE__*/ function(Component) {
|
|
|
5302
5332
|
var Collider = function Collider(entity) {
|
|
5303
5333
|
var _this;
|
|
5304
5334
|
_this = Component.call(this, entity) || this;
|
|
5305
|
-
_this._shapes = [];
|
|
5306
5335
|
/** @internal */ _this._index = -1;
|
|
5336
|
+
_this._shapes = [];
|
|
5307
5337
|
_this._updateFlag = _this.entity.transform.registerWorldChangeFlag();
|
|
5308
5338
|
return _this;
|
|
5309
5339
|
};
|
|
@@ -5383,7 +5413,7 @@ exports.Collider = /*#__PURE__*/ function(Component) {
|
|
|
5383
5413
|
this.clearShapes();
|
|
5384
5414
|
this._nativeCollider.destroy();
|
|
5385
5415
|
};
|
|
5386
|
-
|
|
5416
|
+
_create_class$2(Collider, [
|
|
5387
5417
|
{
|
|
5388
5418
|
key: "shapes",
|
|
5389
5419
|
get: /**
|
|
@@ -5420,7 +5450,7 @@ exports.Collider = __decorate$1([
|
|
|
5420
5450
|
_this._upDirection = new miniprogram$7.Vector3(0, 1, 0);
|
|
5421
5451
|
_this._slopeLimit = 0.707;
|
|
5422
5452
|
_this._nativeCollider = PhysicsManager._nativePhysics.createCharacterController();
|
|
5423
|
-
_this._setUpDirection = _this._setUpDirection.bind(
|
|
5453
|
+
_this._setUpDirection = _this._setUpDirection.bind(_assert_this_initialized(_this));
|
|
5424
5454
|
//@ts-ignore
|
|
5425
5455
|
_this._upDirection._onValueChanged = _this._setUpDirection;
|
|
5426
5456
|
return _this;
|
|
@@ -5494,7 +5524,7 @@ exports.Collider = __decorate$1([
|
|
|
5494
5524
|
_proto._setUpDirection = function _setUpDirection() {
|
|
5495
5525
|
this._nativeCollider.setUpDirection(this._upDirection);
|
|
5496
5526
|
};
|
|
5497
|
-
|
|
5527
|
+
_create_class$2(CharacterController, [
|
|
5498
5528
|
{
|
|
5499
5529
|
key: "stepOffset",
|
|
5500
5530
|
get: /**
|
|
@@ -5588,7 +5618,7 @@ exports.Collider = __decorate$1([
|
|
|
5588
5618
|
_proto._setRotation = function _setRotation() {
|
|
5589
5619
|
this._nativeShape.setRotation(this._rotation);
|
|
5590
5620
|
};
|
|
5591
|
-
|
|
5621
|
+
_create_class$2(ColliderShape, [
|
|
5592
5622
|
{
|
|
5593
5623
|
key: "collider",
|
|
5594
5624
|
get: /**
|
|
@@ -5676,7 +5706,9 @@ exports.Collider = __decorate$1([
|
|
|
5676
5706
|
]);
|
|
5677
5707
|
return ColliderShape;
|
|
5678
5708
|
}();
|
|
5679
|
-
|
|
5709
|
+
(function() {
|
|
5710
|
+
ColliderShape._idGenerator = 0;
|
|
5711
|
+
})();
|
|
5680
5712
|
/**
|
|
5681
5713
|
* Physical collider shape for box.
|
|
5682
5714
|
*/ var BoxColliderShape = /*#__PURE__*/ function(ColliderShape) {
|
|
@@ -5685,7 +5717,7 @@ ColliderShape._idGenerator = 0;
|
|
|
5685
5717
|
_this = ColliderShape.call(this) || this;
|
|
5686
5718
|
_this._size = new miniprogram$7.Vector3(1, 1, 1);
|
|
5687
5719
|
_this._nativeShape = PhysicsManager._nativePhysics.createBoxColliderShape(_this._id, _this._size, _this._material._nativeMaterial);
|
|
5688
|
-
_this._setSize = _this._setSize.bind(
|
|
5720
|
+
_this._setSize = _this._setSize.bind(_assert_this_initialized(_this));
|
|
5689
5721
|
//@ts-ignore
|
|
5690
5722
|
_this._size._onValueChanged = _this._setSize;
|
|
5691
5723
|
return _this;
|
|
@@ -5695,7 +5727,7 @@ ColliderShape._idGenerator = 0;
|
|
|
5695
5727
|
_proto._setSize = function _setSize() {
|
|
5696
5728
|
this._nativeShape.setSize(this._size);
|
|
5697
5729
|
};
|
|
5698
|
-
|
|
5730
|
+
_create_class$2(BoxColliderShape, [
|
|
5699
5731
|
{
|
|
5700
5732
|
key: "size",
|
|
5701
5733
|
get: /**
|
|
@@ -5723,7 +5755,7 @@ ColliderShape._idGenerator = 0;
|
|
|
5723
5755
|
return _this;
|
|
5724
5756
|
};
|
|
5725
5757
|
_inherits$2(SphereColliderShape, ColliderShape);
|
|
5726
|
-
|
|
5758
|
+
_create_class$2(SphereColliderShape, [
|
|
5727
5759
|
{
|
|
5728
5760
|
key: "radius",
|
|
5729
5761
|
get: /**
|
|
@@ -5774,7 +5806,7 @@ ColliderShape._idGenerator = 0;
|
|
|
5774
5806
|
return _this;
|
|
5775
5807
|
};
|
|
5776
5808
|
_inherits$2(CapsuleColliderShape, ColliderShape);
|
|
5777
|
-
|
|
5809
|
+
_create_class$2(CapsuleColliderShape, [
|
|
5778
5810
|
{
|
|
5779
5811
|
key: "radius",
|
|
5780
5812
|
get: /**
|
|
@@ -5832,7 +5864,7 @@ exports.Joint = /*#__PURE__*/ function(Component) {
|
|
|
5832
5864
|
return _this;
|
|
5833
5865
|
};
|
|
5834
5866
|
_inherits$2(Joint, Component);
|
|
5835
|
-
|
|
5867
|
+
_create_class$2(Joint, [
|
|
5836
5868
|
{
|
|
5837
5869
|
key: "connectedCollider",
|
|
5838
5870
|
get: /**
|
|
@@ -6009,7 +6041,7 @@ exports.Joint = __decorate$1([
|
|
|
6009
6041
|
collider.collider = this.entity.getComponent(exports.Collider);
|
|
6010
6042
|
this._nativeJoint = PhysicsManager._nativePhysics.createHingeJoint(collider.collider._nativeCollider);
|
|
6011
6043
|
};
|
|
6012
|
-
|
|
6044
|
+
_create_class$2(HingeJoint, [
|
|
6013
6045
|
{
|
|
6014
6046
|
key: "axis",
|
|
6015
6047
|
get: /**
|
|
@@ -6160,7 +6192,7 @@ exports.Joint = __decorate$1([
|
|
|
6160
6192
|
collider.collider = this.entity.getComponent(exports.Collider);
|
|
6161
6193
|
this._nativeJoint = PhysicsManager._nativePhysics.createSpringJoint(collider.collider._nativeCollider);
|
|
6162
6194
|
};
|
|
6163
|
-
|
|
6195
|
+
_create_class$2(SpringJoint, [
|
|
6164
6196
|
{
|
|
6165
6197
|
key: "swingOffset",
|
|
6166
6198
|
get: /**
|
|
@@ -6310,10 +6342,10 @@ exports.Joint = __decorate$1([
|
|
|
6310
6342
|
_this._sleepThreshold = 5e-3;
|
|
6311
6343
|
var transform = _this.entity.transform;
|
|
6312
6344
|
_this._nativeCollider = PhysicsManager._nativePhysics.createDynamicCollider(transform.worldPosition, transform.worldRotationQuaternion);
|
|
6313
|
-
_this._setLinearVelocity = _this._setLinearVelocity.bind(
|
|
6314
|
-
_this._setAngularVelocity = _this._setAngularVelocity.bind(
|
|
6315
|
-
_this._setCenterOfMass = _this._setCenterOfMass.bind(
|
|
6316
|
-
_this._setInertiaTensor = _this._setInertiaTensor.bind(
|
|
6345
|
+
_this._setLinearVelocity = _this._setLinearVelocity.bind(_assert_this_initialized(_this));
|
|
6346
|
+
_this._setAngularVelocity = _this._setAngularVelocity.bind(_assert_this_initialized(_this));
|
|
6347
|
+
_this._setCenterOfMass = _this._setCenterOfMass.bind(_assert_this_initialized(_this));
|
|
6348
|
+
_this._setInertiaTensor = _this._setInertiaTensor.bind(_assert_this_initialized(_this));
|
|
6317
6349
|
//@ts-ignore
|
|
6318
6350
|
_this._linearVelocity._onValueChanged = _this._setLinearVelocity;
|
|
6319
6351
|
//@ts-ignore
|
|
@@ -6372,7 +6404,7 @@ exports.Joint = __decorate$1([
|
|
|
6372
6404
|
_proto._setInertiaTensor = function _setInertiaTensor() {
|
|
6373
6405
|
this._nativeCollider.setInertiaTensor(this._inertiaTensor);
|
|
6374
6406
|
};
|
|
6375
|
-
|
|
6407
|
+
_create_class$2(DynamicCollider, [
|
|
6376
6408
|
{
|
|
6377
6409
|
key: "linearDamping",
|
|
6378
6410
|
get: /**
|
|
@@ -6914,9 +6946,15 @@ exports.DynamicColliderConstraints = void 0;
|
|
|
6914
6946
|
};
|
|
6915
6947
|
return PointerManager;
|
|
6916
6948
|
}();
|
|
6917
|
-
|
|
6918
|
-
PointerManager.
|
|
6919
|
-
|
|
6949
|
+
(function() {
|
|
6950
|
+
PointerManager._tempRay = new miniprogram$7.Ray();
|
|
6951
|
+
})();
|
|
6952
|
+
(function() {
|
|
6953
|
+
PointerManager._tempPoint = new miniprogram$7.Vector2();
|
|
6954
|
+
})();
|
|
6955
|
+
(function() {
|
|
6956
|
+
PointerManager._tempHitResult = new HitResult();
|
|
6957
|
+
})();
|
|
6920
6958
|
/**
|
|
6921
6959
|
* Wheel Manager.
|
|
6922
6960
|
* @internal
|
|
@@ -7120,7 +7158,7 @@ PointerManager._tempHitResult = new HitResult();
|
|
|
7120
7158
|
this._pointerManager._onFocus();
|
|
7121
7159
|
this._keyboardManager._onFocus();
|
|
7122
7160
|
};
|
|
7123
|
-
|
|
7161
|
+
_create_class$2(InputManager, [
|
|
7124
7162
|
{
|
|
7125
7163
|
key: "pointers",
|
|
7126
7164
|
get: /**
|
|
@@ -7295,8 +7333,12 @@ PointerManager._tempHitResult = new HitResult();
|
|
|
7295
7333
|
}
|
|
7296
7334
|
this._nameId = nameID;
|
|
7297
7335
|
};
|
|
7298
|
-
|
|
7299
|
-
ShaderMacro.
|
|
7336
|
+
(function() {
|
|
7337
|
+
/** @internal */ ShaderMacro._macroNameIdMap = Object.create(null);
|
|
7338
|
+
})();
|
|
7339
|
+
(function() {
|
|
7340
|
+
ShaderMacro._macroNameCounter = 0;
|
|
7341
|
+
})();
|
|
7300
7342
|
/**
|
|
7301
7343
|
* Shader macro collection.
|
|
7302
7344
|
* @internal
|
|
@@ -7446,29 +7488,21 @@ ShaderMacro._macroNameCounter = 0;
|
|
|
7446
7488
|
};
|
|
7447
7489
|
return ShaderMacroCollection;
|
|
7448
7490
|
}();
|
|
7449
|
-
function
|
|
7450
|
-
|
|
7491
|
+
function _extends$2() {
|
|
7492
|
+
_extends$2 = Object.assign || function assign(target) {
|
|
7451
7493
|
for(var i = 1; i < arguments.length; i++){
|
|
7452
7494
|
var source = arguments[i];
|
|
7453
|
-
for(var key in source)
|
|
7454
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
7455
|
-
target[key] = source[key];
|
|
7456
|
-
}
|
|
7457
|
-
}
|
|
7495
|
+
for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
|
|
7458
7496
|
}
|
|
7459
7497
|
return target;
|
|
7460
7498
|
};
|
|
7461
|
-
return
|
|
7462
|
-
}
|
|
7463
|
-
function _extends$2() {
|
|
7464
|
-
return extends_$2.apply(this, arguments);
|
|
7499
|
+
return _extends$2.apply(this, arguments);
|
|
7465
7500
|
}
|
|
7466
7501
|
var camera_declare = "#define GLSLIFY 1\nuniform vec3 u_cameraPos;"; // eslint-disable-line
|
|
7467
7502
|
var common = "#define GLSLIFY 1\n#define PI 3.14159265359\n#define RECIPROCAL_PI 0.31830988618\n#define EPSILON 1e-6\n#define LOG2 1.442695\n#define saturate( a ) clamp( a, 0.0, 1.0 )\nfloat pow2(float x){return x*x;}vec4 RGBMToLinear(vec4 value,float maxRange){return vec4(value.rgb*value.a*maxRange,1.0);}vec4 gammaToLinear(vec4 srgbIn){return vec4(pow(srgbIn.rgb,vec3(2.2)),srgbIn.a);}vec4 linearToGamma(vec4 linearIn){return vec4(pow(linearIn.rgb,vec3(1.0/2.2)),linearIn.a);}\n#ifdef GRAPHICS_API_WEBGL2\n#define INVERSE_MAT(mat) inverse(mat)\n#else\nmat2 inverseMat(mat2 m){return mat2(m[1][1],-m[0][1],-m[1][0],m[0][0])/(m[0][0]*m[1][1]-m[0][1]*m[1][0]);}mat3 inverseMat(mat3 m){float a00=m[0][0],a01=m[0][1],a02=m[0][2];float a10=m[1][0],a11=m[1][1],a12=m[1][2];float a20=m[2][0],a21=m[2][1],a22=m[2][2];float b01=a22*a11-a12*a21;float b11=-a22*a10+a12*a20;float b21=a21*a10-a11*a20;float det=a00*b01+a01*b11+a02*b21;return mat3(b01,(-a22*a01+a02*a21),(a12*a01-a02*a11),b11,(a22*a00-a02*a20),(-a12*a00+a02*a10),b21,(-a21*a00+a01*a20),(a11*a00-a01*a10))/det;}mat4 inverseMat(mat4 m){float a00=m[0][0],a01=m[0][1],a02=m[0][2],a03=m[0][3],a10=m[1][0],a11=m[1][1],a12=m[1][2],a13=m[1][3],a20=m[2][0],a21=m[2][1],a22=m[2][2],a23=m[2][3],a30=m[3][0],a31=m[3][1],a32=m[3][2],a33=m[3][3],b00=a00*a11-a01*a10,b01=a00*a12-a02*a10,b02=a00*a13-a03*a10,b03=a01*a12-a02*a11,b04=a01*a13-a03*a11,b05=a02*a13-a03*a12,b06=a20*a31-a21*a30,b07=a20*a32-a22*a30,b08=a20*a33-a23*a30,b09=a21*a32-a22*a31,b10=a21*a33-a23*a31,b11=a22*a33-a23*a32,det=b00*b11-b01*b10+b02*b09+b03*b08-b04*b07+b05*b06;return mat4(a11*b11-a12*b10+a13*b09,a02*b10-a01*b11-a03*b09,a31*b05-a32*b04+a33*b03,a22*b04-a21*b05-a23*b03,a12*b08-a10*b11-a13*b07,a00*b11-a02*b08+a03*b07,a32*b02-a30*b05-a33*b01,a20*b05-a22*b02+a23*b01,a10*b10-a11*b08+a13*b06,a01*b08-a00*b10-a03*b06,a30*b04-a31*b02+a33*b00,a21*b02-a20*b04-a23*b00,a11*b07-a10*b09-a12*b06,a00*b09-a01*b07+a02*b06,a31*b01-a30*b03-a32*b00,a20*b03-a21*b01+a22*b00)/det;}\n#define INVERSE_MAT(mat) inverseMat(mat)\n#endif\n"; // eslint-disable-line
|
|
7468
7503
|
var common_vert = "#define GLSLIFY 1\nattribute vec3 POSITION;\n#ifdef O3_HAS_UV\nattribute vec2 TEXCOORD_0;\n#endif\n#ifdef O3_HAS_UV1\nattribute vec2 TEXCOORD_1;\n#endif\n#ifdef O3_HAS_SKIN\nattribute vec4 JOINTS_0;attribute vec4 WEIGHTS_0;\n#ifdef O3_USE_JOINT_TEXTURE\nuniform sampler2D u_jointSampler;uniform float u_jointCount;mat4 getJointMatrix(sampler2D smp,float index){float base=index/u_jointCount;float hf=0.5/u_jointCount;float v=base+hf;vec4 m0=texture2D(smp,vec2(0.125,v));vec4 m1=texture2D(smp,vec2(0.375,v));vec4 m2=texture2D(smp,vec2(0.625,v));vec4 m3=texture2D(smp,vec2(0.875,v));return mat4(m0,m1,m2,m3);}\n#else\nuniform mat4 u_jointMatrix[O3_JOINTS_NUM];\n#endif\n#endif\n#ifdef O3_HAS_VERTEXCOLOR\nattribute vec4 COLOR_0;\n#endif\n#include <transform_declare>\n#include <camera_declare>\nuniform vec4 u_tilingOffset;\n#ifndef OMIT_NORMAL\n#ifdef O3_HAS_NORMAL\nattribute vec3 NORMAL;\n#endif\n#ifdef O3_HAS_TANGENT\nattribute vec4 TANGENT;\n#endif\n#endif\n"; // eslint-disable-line
|
|
7469
7504
|
var transform_declare = "#define GLSLIFY 1\nuniform mat4 u_localMat;uniform mat4 u_modelMat;uniform mat4 u_viewMat;uniform mat4 u_projMat;uniform mat4 u_MVMat;uniform mat4 u_MVPMat;uniform mat4 u_normalMat;"; // eslint-disable-line
|
|
7470
7505
|
var color_share = "#define GLSLIFY 1\n#ifdef O3_HAS_VERTEXCOLOR\nvarying vec4 v_color;\n#endif\n"; // eslint-disable-line
|
|
7471
|
-
var RendererFragmentDeclaration = "#define GLSLIFY 1\nuniform highp ivec4 oasis_RendererLayer;"; // eslint-disable-line
|
|
7472
7506
|
var FogFragmentDeclaration = "#define GLSLIFY 1\n#if OASIS_FOG_MODE != 0\nvarying vec3 v_positionVS;uniform vec4 oasis_FogColor;uniform vec4 oasis_FogParams;float ComputeFogIntensity(float fogDepth){\n#if OASIS_FOG_MODE == 1\nreturn clamp(fogDepth*oasis_FogParams.x+oasis_FogParams.y,0.0,1.0);\n#elif OASIS_FOG_MODE == 2\nreturn clamp(exp2(-fogDepth*oasis_FogParams.z),0.0,1.0);\n#elif OASIS_FOG_MODE == 3\nfloat factor=fogDepth*oasis_FogParams.w;return clamp(exp2(-factor*factor),0.0,1.0);\n#endif\n}\n#endif\n"; // eslint-disable-line
|
|
7473
7507
|
var FogVertexDeclaration = "#define GLSLIFY 1\n#if OASIS_FOG_MODE != 0\nvarying vec3 v_positionVS;\n#endif\n"; // eslint-disable-line
|
|
7474
7508
|
var normal_share = "#define GLSLIFY 1\n#ifndef OMIT_NORMAL\n#ifdef O3_HAS_NORMAL\nvarying vec3 v_normal;\n#if defined(O3_HAS_TANGENT) && ( defined(NORMALTEXTURE) || defined(HAS_CLEARCOATNORMALTEXTURE) )\nvarying mat3 v_TBN;\n#endif\n#endif\n#endif\n"; // eslint-disable-line
|
|
@@ -7486,7 +7520,7 @@ var skinning_vert = "#define GLSLIFY 1\n#ifdef O3_HAS_SKIN\n#ifdef O3_USE_JOINT_
|
|
|
7486
7520
|
var uv_vert = "#define GLSLIFY 1\n#ifdef O3_HAS_UV\nv_uv=TEXCOORD_0;\n#else\nv_uv=vec2(0.,0.);\n#endif\n#ifdef O3_HAS_UV1\nv_uv1=TEXCOORD_1;\n#endif\n#ifdef O3_NEED_TILINGOFFSET\nv_uv=v_uv*u_tilingOffset.xy+u_tilingOffset.zw;\n#endif\n"; // eslint-disable-line
|
|
7487
7521
|
var worldpos_vert = "#define GLSLIFY 1\n#ifdef O3_NEED_WORLDPOS\nvec4 temp_pos=u_modelMat*position;v_pos=temp_pos.xyz/temp_pos.w;\n#endif\n"; // eslint-disable-line
|
|
7488
7522
|
var FogFragment = "#define GLSLIFY 1\n#if OASIS_FOG_MODE != 0\nfloat fogIntensity=ComputeFogIntensity(length(v_positionVS));gl_FragColor.rgb=mix(oasis_FogColor.rgb,gl_FragColor.rgb,fogIntensity);\n#endif\n"; // eslint-disable-line
|
|
7489
|
-
var light_frag_define = "#define GLSLIFY 1\n#ifdef O3_DIRECT_LIGHT_COUNT\nstruct DirectLight{vec3 color;vec3 direction;};uniform ivec2 u_directLightCullingMask[O3_DIRECT_LIGHT_COUNT];uniform vec3 u_directLightColor[O3_DIRECT_LIGHT_COUNT];uniform vec3 u_directLightDirection[O3_DIRECT_LIGHT_COUNT];\n#endif\n#ifdef O3_POINT_LIGHT_COUNT\nstruct PointLight{vec3 color;vec3 position;float distance;};uniform ivec2 u_pointLightCullingMask[O3_POINT_LIGHT_COUNT];uniform vec3 u_pointLightColor[O3_POINT_LIGHT_COUNT];uniform vec3 u_pointLightPosition[O3_POINT_LIGHT_COUNT];uniform float u_pointLightDistance[O3_POINT_LIGHT_COUNT];\n#endif\n#ifdef O3_SPOT_LIGHT_COUNT\nstruct SpotLight{vec3 color;vec3 position;vec3 direction;float distance;float angleCos;float penumbraCos;};uniform ivec2 u_spotLightCullingMask[O3_SPOT_LIGHT_COUNT];uniform vec3 u_spotLightColor[O3_SPOT_LIGHT_COUNT];uniform vec3 u_spotLightPosition[O3_SPOT_LIGHT_COUNT];uniform vec3 u_spotLightDirection[O3_SPOT_LIGHT_COUNT];uniform float u_spotLightDistance[O3_SPOT_LIGHT_COUNT];uniform float u_spotLightAngleCos[O3_SPOT_LIGHT_COUNT];uniform float u_spotLightPenumbraCos[O3_SPOT_LIGHT_COUNT];\n#endif\nstruct EnvMapLight{vec3 diffuse;float mipMapLevel;float diffuseIntensity;float specularIntensity;};uniform EnvMapLight u_envMapLight;\n#ifdef O3_USE_SH\nuniform vec3 u_env_sh[9];\n#endif\n#ifdef O3_USE_SPECULAR_ENV\nuniform samplerCube u_env_specularSampler;\n#endif\n#ifndef GRAPHICS_API_WEBGL2\nbool isBitSet(float value,float mask,float bitIndex){return mod(floor(value/pow(2.0,bitIndex)),2.0)==1.0&&mod(floor(mask/pow(2.0,bitIndex)),2.0)==1.0;}\n#endif\nbool isRendererCulledByLight(ivec2 rendererLayer,ivec2 lightCullingMask){\n#ifdef GRAPHICS_API_WEBGL2\nreturn!((rendererLayer.x&lightCullingMask.x)!=0||(rendererLayer.y&lightCullingMask.y)!=0);\n#else\nfor(int i=0;i<16;i++){if(isBitSet(float(rendererLayer.x),float(lightCullingMask.x),float(i))||isBitSet(float(rendererLayer.y),float(lightCullingMask.y),float(i))){return false;}}return true;\n#endif\n}"; // eslint-disable-line
|
|
7523
|
+
var light_frag_define = "#define GLSLIFY 1\n#ifdef O3_DIRECT_LIGHT_COUNT\nstruct DirectLight{vec3 color;vec3 direction;};uniform ivec2 u_directLightCullingMask[O3_DIRECT_LIGHT_COUNT];uniform vec3 u_directLightColor[O3_DIRECT_LIGHT_COUNT];uniform vec3 u_directLightDirection[O3_DIRECT_LIGHT_COUNT];\n#endif\n#ifdef O3_POINT_LIGHT_COUNT\nstruct PointLight{vec3 color;vec3 position;float distance;};uniform ivec2 u_pointLightCullingMask[O3_POINT_LIGHT_COUNT];uniform vec3 u_pointLightColor[O3_POINT_LIGHT_COUNT];uniform vec3 u_pointLightPosition[O3_POINT_LIGHT_COUNT];uniform float u_pointLightDistance[O3_POINT_LIGHT_COUNT];\n#endif\n#ifdef O3_SPOT_LIGHT_COUNT\nstruct SpotLight{vec3 color;vec3 position;vec3 direction;float distance;float angleCos;float penumbraCos;};uniform ivec2 u_spotLightCullingMask[O3_SPOT_LIGHT_COUNT];uniform vec3 u_spotLightColor[O3_SPOT_LIGHT_COUNT];uniform vec3 u_spotLightPosition[O3_SPOT_LIGHT_COUNT];uniform vec3 u_spotLightDirection[O3_SPOT_LIGHT_COUNT];uniform float u_spotLightDistance[O3_SPOT_LIGHT_COUNT];uniform float u_spotLightAngleCos[O3_SPOT_LIGHT_COUNT];uniform float u_spotLightPenumbraCos[O3_SPOT_LIGHT_COUNT];\n#endif\nstruct EnvMapLight{vec3 diffuse;float mipMapLevel;float diffuseIntensity;float specularIntensity;};uniform EnvMapLight u_envMapLight;uniform ivec4 oasis_RendererLayer;\n#ifdef O3_USE_SH\nuniform vec3 u_env_sh[9];\n#endif\n#ifdef O3_USE_SPECULAR_ENV\nuniform samplerCube u_env_specularSampler;\n#endif\n#ifndef GRAPHICS_API_WEBGL2\nbool isBitSet(float value,float mask,float bitIndex){return mod(floor(value/pow(2.0,bitIndex)),2.0)==1.0&&mod(floor(mask/pow(2.0,bitIndex)),2.0)==1.0;}\n#endif\nbool isRendererCulledByLight(ivec2 rendererLayer,ivec2 lightCullingMask){\n#ifdef GRAPHICS_API_WEBGL2\nreturn!((rendererLayer.x&lightCullingMask.x)!=0||(rendererLayer.y&lightCullingMask.y)!=0);\n#else\nfor(int i=0;i<16;i++){if(isBitSet(float(rendererLayer.x),float(lightCullingMask.x),float(i))||isBitSet(float(rendererLayer.y),float(lightCullingMask.y),float(i))){return false;}}return true;\n#endif\n}"; // eslint-disable-line
|
|
7490
7524
|
var mobile_material_frag = "#define GLSLIFY 1\nuniform vec4 u_emissiveColor;uniform vec4 u_baseColor;uniform vec4 u_specularColor;uniform float u_shininess;uniform float u_normalIntensity;uniform float u_alphaCutoff;\n#ifdef EMISSIVETEXTURE\nuniform sampler2D u_emissiveTexture;\n#endif\n#ifdef BASETEXTURE\nuniform sampler2D u_baseTexture;\n#endif\n#ifdef O3_SPECULAR_TEXTURE\nuniform sampler2D u_specularTexture;\n#endif\n#ifdef NORMALTEXTURE\nuniform sampler2D u_normalTexture;\n#endif\n"; // eslint-disable-line
|
|
7491
7525
|
var begin_mobile_frag = "#define GLSLIFY 1\nvec4 ambient=vec4(0.0);vec4 emission=u_emissiveColor;vec4 diffuse=u_baseColor;vec4 specular=u_specularColor;\n#ifdef EMISSIVETEXTURE\nvec4 emissiveTextureColor=texture2D(u_emissiveTexture,v_uv);\n#ifndef OASIS_COLORSPACE_GAMMA\nemissiveTextureColor=gammaToLinear(emissiveTextureColor);\n#endif\nemission*=emissiveTextureColor;\n#endif\n#ifdef BASETEXTURE\nvec4 diffuseTextureColor=texture2D(u_baseTexture,v_uv);\n#ifndef OASIS_COLORSPACE_GAMMA\ndiffuseTextureColor=gammaToLinear(diffuseTextureColor);\n#endif\ndiffuse*=diffuseTextureColor;\n#endif\n#ifdef O3_HAS_VERTEXCOLOR\ndiffuse*=v_color;\n#endif\n#ifdef O3_SPECULAR_TEXTURE\nvec4 specularTextureColor=texture2D(u_specularTexture,v_uv);\n#ifndef OASIS_COLORSPACE_GAMMA\nspecularTextureColor=gammaToLinear(specularTextureColor);\n#endif\nspecular*=specularTextureColor;\n#endif\nambient=vec4(u_envMapLight.diffuse*u_envMapLight.diffuseIntensity,1.0)*diffuse;"; // eslint-disable-line
|
|
7492
7526
|
var begin_viewdir_frag = "#define GLSLIFY 1\n#ifdef O3_NEED_WORLDPOS\nvec3 V=normalize(u_cameraPos-v_pos);\n#endif\n"; // eslint-disable-line
|
|
@@ -7543,7 +7577,6 @@ var ShaderLib = _extends$2({
|
|
|
7543
7577
|
normal_share: normal_share,
|
|
7544
7578
|
uv_share: uv_share,
|
|
7545
7579
|
worldpos_share: worldpos_share,
|
|
7546
|
-
RendererFragmentDeclaration: RendererFragmentDeclaration,
|
|
7547
7580
|
FogVertexDeclaration: FogVertexDeclaration,
|
|
7548
7581
|
FogFragmentDeclaration: FogFragmentDeclaration,
|
|
7549
7582
|
begin_normal_vert: begin_normal_vert,
|
|
@@ -8242,7 +8275,7 @@ var ShaderFactory = /*#__PURE__*/ function() {
|
|
|
8242
8275
|
return prefix + line;
|
|
8243
8276
|
}).join("\n");
|
|
8244
8277
|
};
|
|
8245
|
-
|
|
8278
|
+
_create_class$2(ShaderProgram, [
|
|
8246
8279
|
{
|
|
8247
8280
|
key: "isValid",
|
|
8248
8281
|
get: /**
|
|
@@ -8254,7 +8287,9 @@ var ShaderFactory = /*#__PURE__*/ function() {
|
|
|
8254
8287
|
]);
|
|
8255
8288
|
return ShaderProgram;
|
|
8256
8289
|
}();
|
|
8257
|
-
|
|
8290
|
+
(function() {
|
|
8291
|
+
ShaderProgram._counter = 0;
|
|
8292
|
+
})();
|
|
8258
8293
|
/**
|
|
8259
8294
|
* Shader pass containing vertex and fragment source.
|
|
8260
8295
|
*/ var ShaderPass = /*#__PURE__*/ function() {
|
|
@@ -8298,7 +8333,9 @@ ShaderProgram._counter = 0;
|
|
|
8298
8333
|
};
|
|
8299
8334
|
return ShaderPass;
|
|
8300
8335
|
}();
|
|
8301
|
-
|
|
8336
|
+
(function() {
|
|
8337
|
+
ShaderPass._shaderPassCounter = 0;
|
|
8338
|
+
})();
|
|
8302
8339
|
/**
|
|
8303
8340
|
* Shader property.
|
|
8304
8341
|
*/ var ShaderProperty = /*#__PURE__*/ function() {
|
|
@@ -8306,7 +8343,7 @@ ShaderPass._shaderPassCounter = 0;
|
|
|
8306
8343
|
this.name = name;
|
|
8307
8344
|
this._uniqueId = ShaderProperty._propertyNameCounter++;
|
|
8308
8345
|
}
|
|
8309
|
-
|
|
8346
|
+
_create_class$2(ShaderProperty, [
|
|
8310
8347
|
{
|
|
8311
8348
|
key: "type",
|
|
8312
8349
|
get: /**
|
|
@@ -8318,7 +8355,9 @@ ShaderPass._shaderPassCounter = 0;
|
|
|
8318
8355
|
]);
|
|
8319
8356
|
return ShaderProperty;
|
|
8320
8357
|
}();
|
|
8321
|
-
|
|
8358
|
+
(function() {
|
|
8359
|
+
ShaderProperty._propertyNameCounter = 0;
|
|
8360
|
+
})();
|
|
8322
8361
|
/**
|
|
8323
8362
|
* Shader for rendering.
|
|
8324
8363
|
*/ var Shader = /*#__PURE__*/ function() {
|
|
@@ -8430,7 +8469,7 @@ ShaderProperty._propertyNameCounter = 0;
|
|
|
8430
8469
|
}
|
|
8431
8470
|
}
|
|
8432
8471
|
};
|
|
8433
|
-
|
|
8472
|
+
_create_class$2(Shader, [
|
|
8434
8473
|
{
|
|
8435
8474
|
key: "passes",
|
|
8436
8475
|
get: /**
|
|
@@ -8442,18 +8481,34 @@ ShaderProperty._propertyNameCounter = 0;
|
|
|
8442
8481
|
]);
|
|
8443
8482
|
return Shader;
|
|
8444
8483
|
}();
|
|
8445
|
-
|
|
8446
|
-
/** @internal */ Shader.
|
|
8447
|
-
|
|
8448
|
-
|
|
8449
|
-
|
|
8450
|
-
|
|
8451
|
-
|
|
8452
|
-
|
|
8453
|
-
|
|
8454
|
-
|
|
8455
|
-
|
|
8456
|
-
Shader.
|
|
8484
|
+
(function() {
|
|
8485
|
+
/** @internal */ Shader._compileMacros = new ShaderMacroCollection();
|
|
8486
|
+
})();
|
|
8487
|
+
(function() {
|
|
8488
|
+
/** @internal */ Shader._shaderExtension = [
|
|
8489
|
+
"GL_EXT_shader_texture_lod",
|
|
8490
|
+
"GL_OES_standard_derivatives",
|
|
8491
|
+
"GL_EXT_draw_buffers"
|
|
8492
|
+
];
|
|
8493
|
+
})();
|
|
8494
|
+
(function() {
|
|
8495
|
+
/** @internal */ Shader._propertyIdMap = Object.create(null);
|
|
8496
|
+
})();
|
|
8497
|
+
(function() {
|
|
8498
|
+
Shader._shaderMap = Object.create(null);
|
|
8499
|
+
})();
|
|
8500
|
+
(function() {
|
|
8501
|
+
Shader._propertyNameMap = Object.create(null);
|
|
8502
|
+
})();
|
|
8503
|
+
(function() {
|
|
8504
|
+
Shader._macroMaskMap = [];
|
|
8505
|
+
})();
|
|
8506
|
+
(function() {
|
|
8507
|
+
Shader._macroCounter = 0;
|
|
8508
|
+
})();
|
|
8509
|
+
(function() {
|
|
8510
|
+
Shader._macroMap = Object.create(null);
|
|
8511
|
+
})();
|
|
8457
8512
|
/**
|
|
8458
8513
|
* Shader data collection,Correspondence includes shader properties data and macros data.
|
|
8459
8514
|
*/ var ShaderData = /*#__PURE__*/ function() {
|
|
@@ -8708,9 +8763,9 @@ Shader._macroMap = Object.create(null);
|
|
|
8708
8763
|
/** Shadow mapping normal-based bias. */ _this.shadowNormalBias = 1;
|
|
8709
8764
|
/** Near plane value to use for shadow frustums. */ _this.shadowNearPlane = 0.1;
|
|
8710
8765
|
/** Shadow intensity, the larger the value, the clearer and darker the shadow. */ _this.shadowStrength = 1.0;
|
|
8766
|
+
/** @internal */ _this._lightIndex = -1;
|
|
8711
8767
|
_this._color = new miniprogram$7.Color(1, 1, 1, 1);
|
|
8712
8768
|
_this._lightColor = new miniprogram$7.Color();
|
|
8713
|
-
/** @internal */ _this._lightIndex = -1;
|
|
8714
8769
|
return _this;
|
|
8715
8770
|
};
|
|
8716
8771
|
_inherits$2(Light, Component);
|
|
@@ -8722,7 +8777,7 @@ Shader._macroMap = Object.create(null);
|
|
|
8722
8777
|
this._lightColor.a = this.color.a * this.intensity;
|
|
8723
8778
|
return this._lightColor;
|
|
8724
8779
|
};
|
|
8725
|
-
|
|
8780
|
+
_create_class$2(Light, [
|
|
8726
8781
|
{
|
|
8727
8782
|
key: "color",
|
|
8728
8783
|
get: /**
|
|
@@ -8759,9 +8814,11 @@ Shader._macroMap = Object.create(null);
|
|
|
8759
8814
|
]);
|
|
8760
8815
|
return Light;
|
|
8761
8816
|
}(Component);
|
|
8762
|
-
|
|
8817
|
+
(function() {
|
|
8818
|
+
/**
|
|
8763
8819
|
* Each type of light source is at most 10, beyond which it will not take effect.
|
|
8764
8820
|
* */ Light._maxLight = 10;
|
|
8821
|
+
})();
|
|
8765
8822
|
__decorate$1([
|
|
8766
8823
|
ignoreClone
|
|
8767
8824
|
], Light.prototype, "_lightIndex", void 0);
|
|
@@ -8818,7 +8875,7 @@ __decorate$1([
|
|
|
8818
8875
|
shaderData.setFloatArray(DirectLight._colorProperty, data.color);
|
|
8819
8876
|
shaderData.setFloatArray(DirectLight._directionProperty, data.direction);
|
|
8820
8877
|
};
|
|
8821
|
-
|
|
8878
|
+
_create_class$2(DirectLight, [
|
|
8822
8879
|
{
|
|
8823
8880
|
key: "direction",
|
|
8824
8881
|
get: /**
|
|
@@ -8849,14 +8906,22 @@ __decorate$1([
|
|
|
8849
8906
|
]);
|
|
8850
8907
|
return DirectLight;
|
|
8851
8908
|
}(Light);
|
|
8852
|
-
|
|
8853
|
-
DirectLight.
|
|
8854
|
-
|
|
8855
|
-
|
|
8856
|
-
|
|
8857
|
-
|
|
8858
|
-
|
|
8859
|
-
|
|
8909
|
+
(function() {
|
|
8910
|
+
DirectLight._cullingMaskProperty = Shader.getPropertyByName("u_directLightCullingMask");
|
|
8911
|
+
})();
|
|
8912
|
+
(function() {
|
|
8913
|
+
DirectLight._colorProperty = Shader.getPropertyByName("u_directLightColor");
|
|
8914
|
+
})();
|
|
8915
|
+
(function() {
|
|
8916
|
+
DirectLight._directionProperty = Shader.getPropertyByName("u_directLightDirection");
|
|
8917
|
+
})();
|
|
8918
|
+
(function() {
|
|
8919
|
+
DirectLight._combinedData = {
|
|
8920
|
+
cullingMask: new Int32Array(Light._maxLight * 2),
|
|
8921
|
+
color: new Float32Array(Light._maxLight * 3),
|
|
8922
|
+
direction: new Float32Array(Light._maxLight * 3)
|
|
8923
|
+
};
|
|
8924
|
+
})();
|
|
8860
8925
|
/**
|
|
8861
8926
|
* Point light.
|
|
8862
8927
|
*/ var PointLight = /*#__PURE__*/ function(Light) {
|
|
@@ -8912,7 +8977,7 @@ DirectLight._combinedData = {
|
|
|
8912
8977
|
shaderData.setFloatArray(PointLight._positionProperty, data.position);
|
|
8913
8978
|
shaderData.setFloatArray(PointLight._distanceProperty, data.distance);
|
|
8914
8979
|
};
|
|
8915
|
-
|
|
8980
|
+
_create_class$2(PointLight, [
|
|
8916
8981
|
{
|
|
8917
8982
|
key: "position",
|
|
8918
8983
|
get: /**
|
|
@@ -8933,16 +8998,26 @@ DirectLight._combinedData = {
|
|
|
8933
8998
|
]);
|
|
8934
8999
|
return PointLight;
|
|
8935
9000
|
}(Light);
|
|
8936
|
-
|
|
8937
|
-
PointLight.
|
|
8938
|
-
|
|
8939
|
-
|
|
8940
|
-
PointLight.
|
|
8941
|
-
|
|
8942
|
-
|
|
8943
|
-
|
|
8944
|
-
|
|
8945
|
-
|
|
9001
|
+
(function() {
|
|
9002
|
+
PointLight._cullingMaskProperty = Shader.getPropertyByName("u_pointLightCullingMask");
|
|
9003
|
+
})();
|
|
9004
|
+
(function() {
|
|
9005
|
+
PointLight._colorProperty = Shader.getPropertyByName("u_pointLightColor");
|
|
9006
|
+
})();
|
|
9007
|
+
(function() {
|
|
9008
|
+
PointLight._positionProperty = Shader.getPropertyByName("u_pointLightPosition");
|
|
9009
|
+
})();
|
|
9010
|
+
(function() {
|
|
9011
|
+
PointLight._distanceProperty = Shader.getPropertyByName("u_pointLightDistance");
|
|
9012
|
+
})();
|
|
9013
|
+
(function() {
|
|
9014
|
+
PointLight._combinedData = {
|
|
9015
|
+
cullingMask: new Int32Array(Light._maxLight * 2),
|
|
9016
|
+
color: new Float32Array(Light._maxLight * 3),
|
|
9017
|
+
position: new Float32Array(Light._maxLight * 3),
|
|
9018
|
+
distance: new Float32Array(Light._maxLight)
|
|
9019
|
+
};
|
|
9020
|
+
})();
|
|
8946
9021
|
/**
|
|
8947
9022
|
* Spot light.
|
|
8948
9023
|
*/ var SpotLight = /*#__PURE__*/ function(Light) {
|
|
@@ -9015,7 +9090,7 @@ PointLight._combinedData = {
|
|
|
9015
9090
|
shaderData.setFloatArray(SpotLight._angleCosProperty, data.angleCos);
|
|
9016
9091
|
shaderData.setFloatArray(SpotLight._penumbraCosProperty, data.penumbraCos);
|
|
9017
9092
|
};
|
|
9018
|
-
|
|
9093
|
+
_create_class$2(SpotLight, [
|
|
9019
9094
|
{
|
|
9020
9095
|
key: "position",
|
|
9021
9096
|
get: /**
|
|
@@ -9057,22 +9132,38 @@ PointLight._combinedData = {
|
|
|
9057
9132
|
]);
|
|
9058
9133
|
return SpotLight;
|
|
9059
9134
|
}(Light);
|
|
9060
|
-
|
|
9061
|
-
SpotLight.
|
|
9062
|
-
|
|
9063
|
-
|
|
9064
|
-
SpotLight.
|
|
9065
|
-
|
|
9066
|
-
|
|
9067
|
-
SpotLight.
|
|
9068
|
-
|
|
9069
|
-
|
|
9070
|
-
|
|
9071
|
-
|
|
9072
|
-
|
|
9073
|
-
|
|
9074
|
-
|
|
9075
|
-
|
|
9135
|
+
(function() {
|
|
9136
|
+
SpotLight._cullingMaskProperty = Shader.getPropertyByName("u_spotLightCullingMask");
|
|
9137
|
+
})();
|
|
9138
|
+
(function() {
|
|
9139
|
+
SpotLight._colorProperty = Shader.getPropertyByName("u_spotLightColor");
|
|
9140
|
+
})();
|
|
9141
|
+
(function() {
|
|
9142
|
+
SpotLight._positionProperty = Shader.getPropertyByName("u_spotLightPosition");
|
|
9143
|
+
})();
|
|
9144
|
+
(function() {
|
|
9145
|
+
SpotLight._directionProperty = Shader.getPropertyByName("u_spotLightDirection");
|
|
9146
|
+
})();
|
|
9147
|
+
(function() {
|
|
9148
|
+
SpotLight._distanceProperty = Shader.getPropertyByName("u_spotLightDistance");
|
|
9149
|
+
})();
|
|
9150
|
+
(function() {
|
|
9151
|
+
SpotLight._angleCosProperty = Shader.getPropertyByName("u_spotLightAngleCos");
|
|
9152
|
+
})();
|
|
9153
|
+
(function() {
|
|
9154
|
+
SpotLight._penumbraCosProperty = Shader.getPropertyByName("u_spotLightPenumbraCos");
|
|
9155
|
+
})();
|
|
9156
|
+
(function() {
|
|
9157
|
+
SpotLight._combinedData = {
|
|
9158
|
+
cullingMask: new Int32Array(Light._maxLight * 2),
|
|
9159
|
+
color: new Float32Array(Light._maxLight * 3),
|
|
9160
|
+
position: new Float32Array(Light._maxLight * 3),
|
|
9161
|
+
direction: new Float32Array(Light._maxLight * 3),
|
|
9162
|
+
distance: new Float32Array(Light._maxLight),
|
|
9163
|
+
angleCos: new Float32Array(Light._maxLight),
|
|
9164
|
+
penumbraCos: new Float32Array(Light._maxLight)
|
|
9165
|
+
};
|
|
9166
|
+
})();
|
|
9076
9167
|
/**
|
|
9077
9168
|
* Light manager.
|
|
9078
9169
|
*/ var LightManager = /*#__PURE__*/ function() {
|
|
@@ -9625,7 +9716,7 @@ SpotLight._combinedData = {
|
|
|
9625
9716
|
/**
|
|
9626
9717
|
* @override
|
|
9627
9718
|
*/ _proto._onDestroy = function _onDestroy() {};
|
|
9628
|
-
|
|
9719
|
+
_create_class$2(Material, [
|
|
9629
9720
|
{
|
|
9630
9721
|
key: "shader",
|
|
9631
9722
|
get: /**
|
|
@@ -9729,9 +9820,15 @@ var RenderElement = function RenderElement() {};
|
|
|
9729
9820
|
};
|
|
9730
9821
|
return RenderContext;
|
|
9731
9822
|
}();
|
|
9732
|
-
|
|
9733
|
-
RenderContext.
|
|
9734
|
-
|
|
9823
|
+
(function() {
|
|
9824
|
+
/** @internal */ RenderContext._vpMatrixProperty = Shader.getPropertyByName("u_VPMat");
|
|
9825
|
+
})();
|
|
9826
|
+
(function() {
|
|
9827
|
+
RenderContext._viewMatrixProperty = Shader.getPropertyByName("u_viewMat");
|
|
9828
|
+
})();
|
|
9829
|
+
(function() {
|
|
9830
|
+
RenderContext._projectionMatrixProperty = Shader.getPropertyByName("u_projMat");
|
|
9831
|
+
})();
|
|
9735
9832
|
var SpriteElement = /*#__PURE__*/ function(RenderElement) {
|
|
9736
9833
|
var SpriteElement = function SpriteElement() {
|
|
9737
9834
|
var _this;
|
|
@@ -9781,7 +9878,6 @@ exports.Renderer = (_Renderer = /*#__PURE__*/ function(Component) {
|
|
|
9781
9878
|
var Renderer1 = function Renderer1(entity) {
|
|
9782
9879
|
var _this;
|
|
9783
9880
|
_this = Component.call(this, entity) || this;
|
|
9784
|
-
/** Whether cast shadow. */ _this.castShadows = true;
|
|
9785
9881
|
/** ShaderData related to renderer. */ _this.shaderData = new ShaderData(ShaderDataGroup.Renderer);
|
|
9786
9882
|
/** @internal */ _this._onUpdateIndex = -1;
|
|
9787
9883
|
/** @internal */ _this._rendererIndex = -1;
|
|
@@ -9798,11 +9894,12 @@ exports.Renderer = (_Renderer = /*#__PURE__*/ function(Component) {
|
|
|
9798
9894
|
_this._priority = 0;
|
|
9799
9895
|
_this._receiveShadows = true;
|
|
9800
9896
|
_this._rendererLayer = new miniprogram$7.Vector4();
|
|
9897
|
+
/** Whether cast shadow. */ _this.castShadows = true;
|
|
9801
9898
|
var prototype = exports.Renderer.prototype;
|
|
9802
9899
|
var shaderData = _this.shaderData;
|
|
9803
9900
|
_this._overrideUpdate = _this.update !== prototype.update;
|
|
9804
9901
|
shaderData._addRefCount(1);
|
|
9805
|
-
_this._onTransformChanged = _this._onTransformChanged.bind(
|
|
9902
|
+
_this._onTransformChanged = _this._onTransformChanged.bind(_assert_this_initialized(_this));
|
|
9806
9903
|
_this._registerEntityTransformListener();
|
|
9807
9904
|
shaderData.enableMacro(exports.Renderer._receiveShadowMacro);
|
|
9808
9905
|
shaderData.setVector4(exports.Renderer._rendererLayerProperty, _this._rendererLayer);
|
|
@@ -9988,7 +10085,7 @@ exports.Renderer = (_Renderer = /*#__PURE__*/ function(Component) {
|
|
|
9988
10085
|
_proto._onTransformChanged = function _onTransformChanged(type) {
|
|
9989
10086
|
this._dirtyUpdateFlag |= 0x1;
|
|
9990
10087
|
};
|
|
9991
|
-
|
|
10088
|
+
_create_class$2(Renderer1, [
|
|
9992
10089
|
{
|
|
9993
10090
|
key: "isCulled",
|
|
9994
10091
|
get: /**
|
|
@@ -10054,7 +10151,25 @@ exports.Renderer = (_Renderer = /*#__PURE__*/ function(Component) {
|
|
|
10054
10151
|
}
|
|
10055
10152
|
]);
|
|
10056
10153
|
return Renderer1;
|
|
10057
|
-
}(Component),
|
|
10154
|
+
}(Component), function() {
|
|
10155
|
+
_Renderer._tempVector0 = new miniprogram$7.Vector3();
|
|
10156
|
+
}(), function() {
|
|
10157
|
+
_Renderer._receiveShadowMacro = Shader.getMacroByName("OASIS_RECEIVE_SHADOWS");
|
|
10158
|
+
}(), function() {
|
|
10159
|
+
_Renderer._localMatrixProperty = Shader.getPropertyByName("u_localMat");
|
|
10160
|
+
}(), function() {
|
|
10161
|
+
_Renderer._worldMatrixProperty = Shader.getPropertyByName("u_modelMat");
|
|
10162
|
+
}(), function() {
|
|
10163
|
+
_Renderer._mvMatrixProperty = Shader.getPropertyByName("u_MVMat");
|
|
10164
|
+
}(), function() {
|
|
10165
|
+
_Renderer._mvpMatrixProperty = Shader.getPropertyByName("u_MVPMat");
|
|
10166
|
+
}(), function() {
|
|
10167
|
+
_Renderer._mvInvMatrixProperty = Shader.getPropertyByName("u_MVInvMat");
|
|
10168
|
+
}(), function() {
|
|
10169
|
+
_Renderer._normalMatrixProperty = Shader.getPropertyByName("u_normalMat");
|
|
10170
|
+
}(), function() {
|
|
10171
|
+
_Renderer._rendererLayerProperty = Shader.getPropertyByName("oasis_RendererLayer");
|
|
10172
|
+
}(), _Renderer);
|
|
10058
10173
|
__decorate$1([
|
|
10059
10174
|
deepClone
|
|
10060
10175
|
], exports.Renderer.prototype, "shaderData", void 0);
|
|
@@ -10181,14 +10296,18 @@ var SimpleSpriteAssembler = (_SimpleSpriteAssembler = /*#__PURE__*/ function() {
|
|
|
10181
10296
|
renderUVs[3].set(right, top);
|
|
10182
10297
|
};
|
|
10183
10298
|
return SimpleSpriteAssembler1;
|
|
10184
|
-
}(),
|
|
10185
|
-
|
|
10186
|
-
|
|
10187
|
-
|
|
10188
|
-
|
|
10189
|
-
|
|
10190
|
-
|
|
10191
|
-
|
|
10299
|
+
}(), function() {
|
|
10300
|
+
_SimpleSpriteAssembler._rectangleTriangles = [
|
|
10301
|
+
0,
|
|
10302
|
+
1,
|
|
10303
|
+
2,
|
|
10304
|
+
2,
|
|
10305
|
+
1,
|
|
10306
|
+
3
|
|
10307
|
+
];
|
|
10308
|
+
}(), function() {
|
|
10309
|
+
_SimpleSpriteAssembler._worldMatrix = new miniprogram$7.Matrix();
|
|
10310
|
+
}(), _SimpleSpriteAssembler);
|
|
10192
10311
|
SimpleSpriteAssembler = __decorate$1([
|
|
10193
10312
|
StaticInterfaceImplement$1()
|
|
10194
10313
|
], SimpleSpriteAssembler);
|
|
@@ -10269,10 +10388,10 @@ SimpleSpriteAssembler = __decorate$1([
|
|
|
10269
10388
|
_this._flipY = false;
|
|
10270
10389
|
_this._alphaCutoff = 0.5;
|
|
10271
10390
|
_this._renderData = new RenderData2D(4, [], []);
|
|
10272
|
-
SimpleSpriteAssembler.resetData(
|
|
10391
|
+
SimpleSpriteAssembler.resetData(_assert_this_initialized(_this));
|
|
10273
10392
|
_this.setMaterial(_this._engine._spriteMaskDefaultMaterial);
|
|
10274
10393
|
_this.shaderData.setFloat(SpriteMask._alphaCutoffProperty, _this._alphaCutoff);
|
|
10275
|
-
_this._onSpriteChange = _this._onSpriteChange.bind(
|
|
10394
|
+
_this._onSpriteChange = _this._onSpriteChange.bind(_assert_this_initialized(_this));
|
|
10276
10395
|
return _this;
|
|
10277
10396
|
}
|
|
10278
10397
|
var _proto = SpriteMask.prototype;
|
|
@@ -10340,7 +10459,7 @@ SimpleSpriteAssembler = __decorate$1([
|
|
|
10340
10459
|
break;
|
|
10341
10460
|
}
|
|
10342
10461
|
};
|
|
10343
|
-
|
|
10462
|
+
_create_class$2(SpriteMask, [
|
|
10344
10463
|
{
|
|
10345
10464
|
key: "width",
|
|
10346
10465
|
get: /**
|
|
@@ -10442,8 +10561,12 @@ SimpleSpriteAssembler = __decorate$1([
|
|
|
10442
10561
|
]);
|
|
10443
10562
|
return SpriteMask;
|
|
10444
10563
|
}(exports.Renderer);
|
|
10445
|
-
|
|
10446
|
-
/** @internal */ SpriteMask.
|
|
10564
|
+
(function() {
|
|
10565
|
+
/** @internal */ SpriteMask._textureProperty = Shader.getPropertyByName("u_maskTexture");
|
|
10566
|
+
})();
|
|
10567
|
+
(function() {
|
|
10568
|
+
/** @internal */ SpriteMask._alphaCutoffProperty = Shader.getPropertyByName("u_maskAlphaCutoff");
|
|
10569
|
+
})();
|
|
10447
10570
|
__decorate$1([
|
|
10448
10571
|
assignmentClone
|
|
10449
10572
|
], SpriteMask.prototype, "influenceLayers", void 0);
|
|
@@ -10644,7 +10767,7 @@ var BufferUtil = /*#__PURE__*/ function() {
|
|
|
10644
10767
|
this._glElementInfo = BufferUtil._getElementInfo(this.format);
|
|
10645
10768
|
this._instanceStepRate = Math.floor(instanceStepRate);
|
|
10646
10769
|
};
|
|
10647
|
-
|
|
10770
|
+
_create_class$2(VertexElement, [
|
|
10648
10771
|
{
|
|
10649
10772
|
key: "semantic",
|
|
10650
10773
|
get: /**
|
|
@@ -10801,7 +10924,7 @@ var BufferUtil = /*#__PURE__*/ function() {
|
|
|
10801
10924
|
gl.bufferData(this._glBindTarget, dataLength, this._glBufferUsage);
|
|
10802
10925
|
this._byteLength = dataLength;
|
|
10803
10926
|
};
|
|
10804
|
-
|
|
10927
|
+
_create_class$2(Buffer, [
|
|
10805
10928
|
{
|
|
10806
10929
|
key: "type",
|
|
10807
10930
|
get: /**
|
|
@@ -10848,7 +10971,7 @@ var BufferUtil = /*#__PURE__*/ function() {
|
|
|
10848
10971
|
this._buffer = buffer;
|
|
10849
10972
|
this._format = format;
|
|
10850
10973
|
};
|
|
10851
|
-
|
|
10974
|
+
_create_class$2(IndexBufferBinding, [
|
|
10852
10975
|
{
|
|
10853
10976
|
key: "buffer",
|
|
10854
10977
|
get: /**
|
|
@@ -10894,8 +11017,8 @@ var BufferUtil = /*#__PURE__*/ function() {
|
|
|
10894
11017
|
_this._bounds = new miniprogram$7.BoundingBox();
|
|
10895
11018
|
_this._subMeshes = [];
|
|
10896
11019
|
_this.name = name;
|
|
10897
|
-
_this._platformPrimitive = _this._engine._hardwareRenderer.createPlatformPrimitive(
|
|
10898
|
-
_this._onBoundsChanged = _this._onBoundsChanged.bind(
|
|
11020
|
+
_this._platformPrimitive = _this._engine._hardwareRenderer.createPlatformPrimitive(_assert_this_initialized(_this));
|
|
11021
|
+
_this._onBoundsChanged = _this._onBoundsChanged.bind(_assert_this_initialized(_this));
|
|
10899
11022
|
var bounds = _this._bounds;
|
|
10900
11023
|
// @ts-ignore
|
|
10901
11024
|
bounds.min._onValueChanged = _this._onBoundsChanged;
|
|
@@ -11013,7 +11136,7 @@ var BufferUtil = /*#__PURE__*/ function() {
|
|
|
11013
11136
|
_proto._onBoundsChanged = function _onBoundsChanged() {
|
|
11014
11137
|
this._updateFlagManager.dispatch(0x1);
|
|
11015
11138
|
};
|
|
11016
|
-
|
|
11139
|
+
_create_class$2(Mesh, [
|
|
11017
11140
|
{
|
|
11018
11141
|
key: "bounds",
|
|
11019
11142
|
get: /**
|
|
@@ -11058,7 +11181,7 @@ var MeshModifyFlags;
|
|
|
11058
11181
|
this._buffer = buffer;
|
|
11059
11182
|
this._stride = stride;
|
|
11060
11183
|
};
|
|
11061
|
-
|
|
11184
|
+
_create_class$2(VertexBufferBinding, [
|
|
11062
11185
|
{
|
|
11063
11186
|
key: "buffer",
|
|
11064
11187
|
get: /**
|
|
@@ -11503,13 +11626,27 @@ var MeshModifyFlags;
|
|
|
11503
11626
|
};
|
|
11504
11627
|
return BlendShapeManager;
|
|
11505
11628
|
}();
|
|
11506
|
-
|
|
11507
|
-
BlendShapeManager.
|
|
11508
|
-
|
|
11509
|
-
|
|
11510
|
-
BlendShapeManager.
|
|
11511
|
-
|
|
11512
|
-
|
|
11629
|
+
(function() {
|
|
11630
|
+
BlendShapeManager._blendShapeMacro = Shader.getMacroByName("OASIS_BLENDSHAPE");
|
|
11631
|
+
})();
|
|
11632
|
+
(function() {
|
|
11633
|
+
BlendShapeManager._blendShapeTextureMacro = Shader.getMacroByName("OASIS_BLENDSHAPE_TEXTURE");
|
|
11634
|
+
})();
|
|
11635
|
+
(function() {
|
|
11636
|
+
BlendShapeManager._blendShapeNormalMacro = Shader.getMacroByName("OASIS_BLENDSHAPE_NORMAL");
|
|
11637
|
+
})();
|
|
11638
|
+
(function() {
|
|
11639
|
+
BlendShapeManager._blendShapeTangentMacro = Shader.getMacroByName("OASIS_BLENDSHAPE_TANGENT");
|
|
11640
|
+
})();
|
|
11641
|
+
(function() {
|
|
11642
|
+
BlendShapeManager._blendShapeWeightsProperty = Shader.getPropertyByName("u_blendShapeWeights");
|
|
11643
|
+
})();
|
|
11644
|
+
(function() {
|
|
11645
|
+
BlendShapeManager._blendShapeTextureProperty = Shader.getPropertyByName("u_blendShapeTexture");
|
|
11646
|
+
})();
|
|
11647
|
+
(function() {
|
|
11648
|
+
BlendShapeManager._blendShapeTextureInfoProperty = Shader.getPropertyByName("u_blendShapeTextureInfo");
|
|
11649
|
+
})();
|
|
11513
11650
|
/**
|
|
11514
11651
|
* Vertex attribute types of a vertex in a ModelMesh.
|
|
11515
11652
|
*/ var VertexAttribute;
|
|
@@ -11563,7 +11700,7 @@ BlendShapeManager._blendShapeTextureInfoProperty = Shader.getPropertyByName("u_b
|
|
|
11563
11700
|
_this._customVertexElements = [];
|
|
11564
11701
|
_this._vertexCountChanged = false;
|
|
11565
11702
|
_this.name = name;
|
|
11566
|
-
_this._blendShapeManager = new BlendShapeManager(engine,
|
|
11703
|
+
_this._blendShapeManager = new BlendShapeManager(engine, _assert_this_initialized(_this));
|
|
11567
11704
|
return _this;
|
|
11568
11705
|
};
|
|
11569
11706
|
_inherits$2(ModelMesh, Mesh);
|
|
@@ -12514,7 +12651,7 @@ BlendShapeManager._blendShapeTextureInfoProperty = Shader.getPropertyByName("u_b
|
|
|
12514
12651
|
this._uv7 = null;
|
|
12515
12652
|
this._blendShapeManager._releaseMemoryCache();
|
|
12516
12653
|
};
|
|
12517
|
-
|
|
12654
|
+
_create_class$2(ModelMesh, [
|
|
12518
12655
|
{
|
|
12519
12656
|
key: "accessible",
|
|
12520
12657
|
get: /**
|
|
@@ -12582,11 +12719,21 @@ BlendShapeManager._blendShapeTextureInfoProperty = Shader.getPropertyByName("u_b
|
|
|
12582
12719
|
]);
|
|
12583
12720
|
return ModelMesh;
|
|
12584
12721
|
}(Mesh);
|
|
12585
|
-
|
|
12586
|
-
ModelMesh.
|
|
12587
|
-
|
|
12588
|
-
|
|
12589
|
-
ModelMesh.
|
|
12722
|
+
(function() {
|
|
12723
|
+
ModelMesh._tempVec0 = new miniprogram$7.Vector3();
|
|
12724
|
+
})();
|
|
12725
|
+
(function() {
|
|
12726
|
+
ModelMesh._tempVec1 = new miniprogram$7.Vector3();
|
|
12727
|
+
})();
|
|
12728
|
+
(function() {
|
|
12729
|
+
ModelMesh._tempVec2 = new miniprogram$7.Vector3();
|
|
12730
|
+
})();
|
|
12731
|
+
(function() {
|
|
12732
|
+
ModelMesh._tempVec3 = new miniprogram$7.Vector3();
|
|
12733
|
+
})();
|
|
12734
|
+
(function() {
|
|
12735
|
+
ModelMesh._tempVec4 = new miniprogram$7.Vector3();
|
|
12736
|
+
})();
|
|
12590
12737
|
var VertexChangedFlags;
|
|
12591
12738
|
(function(VertexChangedFlags) {
|
|
12592
12739
|
VertexChangedFlags[VertexChangedFlags["Position"] = 0x1] = "Position";
|
|
@@ -12626,7 +12773,7 @@ var VertexChangedFlags;
|
|
|
12626
12773
|
var MeshRenderer = function MeshRenderer(entity) {
|
|
12627
12774
|
var _this;
|
|
12628
12775
|
_this = Renderer.call(this, entity) || this;
|
|
12629
|
-
_this._onMeshChanged = _this._onMeshChanged.bind(
|
|
12776
|
+
_this._onMeshChanged = _this._onMeshChanged.bind(_assert_this_initialized(_this));
|
|
12630
12777
|
return _this;
|
|
12631
12778
|
};
|
|
12632
12779
|
_inherits$2(MeshRenderer, Renderer);
|
|
@@ -12730,7 +12877,7 @@ var VertexChangedFlags;
|
|
|
12730
12877
|
type & MeshModifyFlags.Bounds && (this._dirtyUpdateFlag |= RendererUpdateFlags.WorldVolume);
|
|
12731
12878
|
type & MeshModifyFlags.VertexElements && (this._dirtyUpdateFlag |= 0x2);
|
|
12732
12879
|
};
|
|
12733
|
-
|
|
12880
|
+
_create_class$2(MeshRenderer, [
|
|
12734
12881
|
{
|
|
12735
12882
|
key: "mesh",
|
|
12736
12883
|
get: /**
|
|
@@ -12747,11 +12894,21 @@ var VertexChangedFlags;
|
|
|
12747
12894
|
]);
|
|
12748
12895
|
return MeshRenderer;
|
|
12749
12896
|
}(exports.Renderer);
|
|
12750
|
-
|
|
12751
|
-
MeshRenderer.
|
|
12752
|
-
|
|
12753
|
-
|
|
12754
|
-
MeshRenderer.
|
|
12897
|
+
(function() {
|
|
12898
|
+
MeshRenderer._uvMacro = Shader.getMacroByName("O3_HAS_UV");
|
|
12899
|
+
})();
|
|
12900
|
+
(function() {
|
|
12901
|
+
MeshRenderer._uv1Macro = Shader.getMacroByName("O3_HAS_UV1");
|
|
12902
|
+
})();
|
|
12903
|
+
(function() {
|
|
12904
|
+
MeshRenderer._normalMacro = Shader.getMacroByName("O3_HAS_NORMAL");
|
|
12905
|
+
})();
|
|
12906
|
+
(function() {
|
|
12907
|
+
MeshRenderer._tangentMacro = Shader.getMacroByName("O3_HAS_TANGENT");
|
|
12908
|
+
})();
|
|
12909
|
+
(function() {
|
|
12910
|
+
MeshRenderer._vertexColorMacro = Shader.getMacroByName("O3_HAS_VERTEXCOLOR");
|
|
12911
|
+
})();
|
|
12755
12912
|
__decorate$1([
|
|
12756
12913
|
ignoreClone
|
|
12757
12914
|
], MeshRenderer.prototype, "_mesh", void 0);
|
|
@@ -12850,7 +13007,7 @@ var rePropName = RegExp("[^.[\\]]+" + "|" + // Or match property names within br
|
|
|
12850
13007
|
// For renderer is "ANGLE (AMD, AMD Radeon(TM) Graphics Direct3011 vs_5_0 ps_5_0, D3011)", compile shader si very slow because of max uniform is 4096.
|
|
12851
13008
|
maxVertexUniformVectors = Math.min(maxVertexUniformVectors, 256);
|
|
12852
13009
|
_this._maxVertexUniformVectors = maxVertexUniformVectors;
|
|
12853
|
-
_this._onLocalBoundsChanged = _this._onLocalBoundsChanged.bind(
|
|
13010
|
+
_this._onLocalBoundsChanged = _this._onLocalBoundsChanged.bind(_assert_this_initialized(_this));
|
|
12854
13011
|
var localBounds = _this._localBounds;
|
|
12855
13012
|
// @ts-ignore
|
|
12856
13013
|
localBounds.min._onValueChanged = _this._onLocalBoundsChanged;
|
|
@@ -13049,7 +13206,7 @@ var rePropName = RegExp("[^.[\\]]+" + "|" + // Or match property names within br
|
|
|
13049
13206
|
_proto._onLocalBoundsChanged = function _onLocalBoundsChanged() {
|
|
13050
13207
|
this._dirtyUpdateFlag |= RendererUpdateFlags.WorldVolume;
|
|
13051
13208
|
};
|
|
13052
|
-
|
|
13209
|
+
_create_class$2(SkinnedMeshRenderer, [
|
|
13053
13210
|
{
|
|
13054
13211
|
key: "blendShapeWeights",
|
|
13055
13212
|
get: /**
|
|
@@ -13114,10 +13271,18 @@ var rePropName = RegExp("[^.[\\]]+" + "|" + // Or match property names within br
|
|
|
13114
13271
|
]);
|
|
13115
13272
|
return SkinnedMeshRenderer;
|
|
13116
13273
|
}(MeshRenderer);
|
|
13117
|
-
|
|
13118
|
-
SkinnedMeshRenderer.
|
|
13119
|
-
|
|
13120
|
-
|
|
13274
|
+
(function() {
|
|
13275
|
+
SkinnedMeshRenderer._tempMatrix = new miniprogram$7.Matrix();
|
|
13276
|
+
})();
|
|
13277
|
+
(function() {
|
|
13278
|
+
SkinnedMeshRenderer._jointCountProperty = Shader.getPropertyByName("u_jointCount");
|
|
13279
|
+
})();
|
|
13280
|
+
(function() {
|
|
13281
|
+
SkinnedMeshRenderer._jointSamplerProperty = Shader.getPropertyByName("u_jointSampler");
|
|
13282
|
+
})();
|
|
13283
|
+
(function() {
|
|
13284
|
+
SkinnedMeshRenderer._jointMatrixProperty = Shader.getPropertyByName("u_jointMatrix");
|
|
13285
|
+
})();
|
|
13121
13286
|
__decorate$1([
|
|
13122
13287
|
ignoreClone
|
|
13123
13288
|
], SkinnedMeshRenderer.prototype, "_hasInitSkin", void 0);
|
|
@@ -13876,7 +14041,7 @@ __decorate$1([
|
|
|
13876
14041
|
}
|
|
13877
14042
|
this._setIndexBufferBinding(binding);
|
|
13878
14043
|
};
|
|
13879
|
-
|
|
14044
|
+
_create_class$2(BufferMesh, [
|
|
13880
14045
|
{
|
|
13881
14046
|
key: "instanceCount",
|
|
13882
14047
|
get: /**
|
|
@@ -13988,7 +14153,7 @@ __decorate$1([
|
|
|
13988
14153
|
this._layoutChangeManager.dispatch(0, this);
|
|
13989
14154
|
}
|
|
13990
14155
|
};
|
|
13991
|
-
|
|
14156
|
+
_create_class$2(BlendShape, [
|
|
13992
14157
|
{
|
|
13993
14158
|
key: "frames",
|
|
13994
14159
|
get: /**
|
|
@@ -14145,8 +14310,12 @@ var Basic2DBatcher = /*#__PURE__*/ function() {
|
|
|
14145
14310
|
};
|
|
14146
14311
|
return Basic2DBatcher;
|
|
14147
14312
|
}();
|
|
14148
|
-
|
|
14149
|
-
Basic2DBatcher.
|
|
14313
|
+
(function() {
|
|
14314
|
+
/** The maximum number of vertex. */ Basic2DBatcher.MAX_VERTEX_COUNT = 4096;
|
|
14315
|
+
})();
|
|
14316
|
+
(function() {
|
|
14317
|
+
Basic2DBatcher._canUploadSameBuffer = true;
|
|
14318
|
+
})();
|
|
14150
14319
|
var SpriteMaskBatcher = /*#__PURE__*/ function(Basic2DBatcher) {
|
|
14151
14320
|
var SpriteMaskBatcher = function SpriteMaskBatcher() {
|
|
14152
14321
|
return Basic2DBatcher.apply(this, arguments);
|
|
@@ -14355,9 +14524,15 @@ var TextRenderElement = /*#__PURE__*/ function(RenderElement) {
|
|
|
14355
14524
|
};
|
|
14356
14525
|
return Sky;
|
|
14357
14526
|
}();
|
|
14358
|
-
|
|
14359
|
-
Sky.
|
|
14360
|
-
|
|
14527
|
+
(function() {
|
|
14528
|
+
Sky._epsilon = 1e-6;
|
|
14529
|
+
})();
|
|
14530
|
+
(function() {
|
|
14531
|
+
Sky._viewProjMatrix = new miniprogram$7.Matrix();
|
|
14532
|
+
})();
|
|
14533
|
+
(function() {
|
|
14534
|
+
Sky._projectionMatrix = new miniprogram$7.Matrix(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, Sky._epsilon - 1, -1, 0, 0, 0, 0);
|
|
14535
|
+
})();
|
|
14361
14536
|
/**
|
|
14362
14537
|
* Background of scene.
|
|
14363
14538
|
*/ var Background = /*#__PURE__*/ function() {
|
|
@@ -14438,7 +14613,7 @@ Sky._projectionMatrix = new miniprogram$7.Matrix(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, S
|
|
|
14438
14613
|
mesh.addSubMesh(0, indices.length);
|
|
14439
14614
|
return mesh;
|
|
14440
14615
|
};
|
|
14441
|
-
|
|
14616
|
+
_create_class$2(Background, [
|
|
14442
14617
|
{
|
|
14443
14618
|
key: "texture",
|
|
14444
14619
|
get: /**
|
|
@@ -14603,7 +14778,7 @@ Sky._projectionMatrix = new miniprogram$7.Matrix(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, S
|
|
|
14603
14778
|
out[25] = src[25] * 0.429042;
|
|
14604
14779
|
out[26] = src[26] * 0.429042;
|
|
14605
14780
|
};
|
|
14606
|
-
|
|
14781
|
+
_create_class$2(AmbientLight, [
|
|
14607
14782
|
{
|
|
14608
14783
|
key: "specularTextureDecodeRGBM",
|
|
14609
14784
|
get: /**
|
|
@@ -14714,15 +14889,33 @@ Sky._projectionMatrix = new miniprogram$7.Matrix(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, S
|
|
|
14714
14889
|
]);
|
|
14715
14890
|
return AmbientLight;
|
|
14716
14891
|
}();
|
|
14717
|
-
|
|
14718
|
-
AmbientLight.
|
|
14719
|
-
|
|
14720
|
-
|
|
14721
|
-
AmbientLight.
|
|
14722
|
-
|
|
14723
|
-
|
|
14724
|
-
AmbientLight.
|
|
14725
|
-
|
|
14892
|
+
(function() {
|
|
14893
|
+
AmbientLight._shMacro = Shader.getMacroByName("O3_USE_SH");
|
|
14894
|
+
})();
|
|
14895
|
+
(function() {
|
|
14896
|
+
AmbientLight._specularMacro = Shader.getMacroByName("O3_USE_SPECULAR_ENV");
|
|
14897
|
+
})();
|
|
14898
|
+
(function() {
|
|
14899
|
+
AmbientLight._decodeRGBMMacro = Shader.getMacroByName("O3_DECODE_ENV_RGBM");
|
|
14900
|
+
})();
|
|
14901
|
+
(function() {
|
|
14902
|
+
AmbientLight._diffuseColorProperty = Shader.getPropertyByName("u_envMapLight.diffuse");
|
|
14903
|
+
})();
|
|
14904
|
+
(function() {
|
|
14905
|
+
AmbientLight._diffuseSHProperty = Shader.getPropertyByName("u_env_sh");
|
|
14906
|
+
})();
|
|
14907
|
+
(function() {
|
|
14908
|
+
AmbientLight._diffuseIntensityProperty = Shader.getPropertyByName("u_envMapLight.diffuseIntensity");
|
|
14909
|
+
})();
|
|
14910
|
+
(function() {
|
|
14911
|
+
AmbientLight._specularTextureProperty = Shader.getPropertyByName("u_env_specularSampler");
|
|
14912
|
+
})();
|
|
14913
|
+
(function() {
|
|
14914
|
+
AmbientLight._specularIntensityProperty = Shader.getPropertyByName("u_envMapLight.specularIntensity");
|
|
14915
|
+
})();
|
|
14916
|
+
(function() {
|
|
14917
|
+
AmbientLight._mipLevelProperty = Shader.getPropertyByName("u_envMapLight.mipMapLevel");
|
|
14918
|
+
})();
|
|
14726
14919
|
/**
|
|
14727
14920
|
* Scene.
|
|
14728
14921
|
*/ var Scene = /*#__PURE__*/ function(EngineObject) {
|
|
@@ -14752,7 +14945,7 @@ AmbientLight._mipLevelProperty = Shader.getPropertyByName("u_envMapLight.mipMapL
|
|
|
14752
14945
|
var shaderData = _this.shaderData;
|
|
14753
14946
|
shaderData._addRefCount(1);
|
|
14754
14947
|
_this.ambientLight = new AmbientLight();
|
|
14755
|
-
engine.sceneManager._allScenes.push(
|
|
14948
|
+
engine.sceneManager._allScenes.push(_assert_this_initialized(_this));
|
|
14756
14949
|
shaderData.enableMacro("OASIS_FOG_MODE", _this._fogMode.toString());
|
|
14757
14950
|
shaderData.enableMacro("CASCADED_COUNT", _this.shadowCascades.toString());
|
|
14758
14951
|
shaderData.setColor(Scene._fogColorProperty, _this._fogColor);
|
|
@@ -14959,7 +15152,7 @@ AmbientLight._mipLevelProperty = Shader.getPropertyByName("u_envMapLight.mipMapL
|
|
|
14959
15152
|
this._fogParams.z = density / Math.LN2;
|
|
14960
15153
|
this._fogParams.w = density / Math.sqrt(Math.LN2);
|
|
14961
15154
|
};
|
|
14962
|
-
|
|
15155
|
+
_create_class$2(Scene, [
|
|
14963
15156
|
{
|
|
14964
15157
|
key: "shadowCascades",
|
|
14965
15158
|
get: /**
|
|
@@ -15087,8 +15280,12 @@ AmbientLight._mipLevelProperty = Shader.getPropertyByName("u_envMapLight.mipMapL
|
|
|
15087
15280
|
]);
|
|
15088
15281
|
return Scene;
|
|
15089
15282
|
}(EngineObject);
|
|
15090
|
-
|
|
15091
|
-
Scene.
|
|
15283
|
+
(function() {
|
|
15284
|
+
Scene._fogColorProperty = Shader.getPropertyByName("oasis_FogColor");
|
|
15285
|
+
})();
|
|
15286
|
+
(function() {
|
|
15287
|
+
Scene._fogParamsProperty = Shader.getPropertyByName("oasis_FogParams");
|
|
15288
|
+
})();
|
|
15092
15289
|
/**
|
|
15093
15290
|
* Scene manager.
|
|
15094
15291
|
*/ var SceneManager = /*#__PURE__*/ function() {
|
|
@@ -15135,7 +15332,7 @@ Scene._fogParamsProperty = Shader.getPropertyByName("oasis_FogParams");
|
|
|
15135
15332
|
}
|
|
15136
15333
|
allScenes.length = 0;
|
|
15137
15334
|
};
|
|
15138
|
-
|
|
15335
|
+
_create_class$2(SceneManager, [
|
|
15139
15336
|
{
|
|
15140
15337
|
key: "activeScene",
|
|
15141
15338
|
get: /**
|
|
@@ -15155,11 +15352,11 @@ Scene._fogParamsProperty = Shader.getPropertyByName("oasis_FogParams");
|
|
|
15155
15352
|
]);
|
|
15156
15353
|
return SceneManager;
|
|
15157
15354
|
}();
|
|
15158
|
-
var blinnPhongFs = "#define GLSLIFY 1\n#include <common>\n#include <camera_declare>\n#include <uv_share>\n#include <normal_share>\n#include <color_share>\n#include <worldpos_share>\n#include <light_frag_define>\n#include <ShadowFragmentDeclaration>\n#include <mobile_material_frag>\n#include <
|
|
15355
|
+
var blinnPhongFs = "#define GLSLIFY 1\n#include <common>\n#include <camera_declare>\n#include <uv_share>\n#include <normal_share>\n#include <color_share>\n#include <worldpos_share>\n#include <light_frag_define>\n#include <ShadowFragmentDeclaration>\n#include <mobile_material_frag>\n#include <FogFragmentDeclaration>\n#include <normal_get>\nvoid main(){\n#include <begin_mobile_frag>\n#include <begin_viewdir_frag>\n#include <mobile_blinnphong_frag>\ngl_FragColor=emission+ambient+diffuse+specular;\n#ifdef OASIS_TRANSPARENT\ngl_FragColor.a=diffuse.a;\n#else\ngl_FragColor.a=1.0;\n#endif\n#include <FogFragment>\n#ifndef OASIS_COLORSPACE_GAMMA\ngl_FragColor=linearToGamma(gl_FragColor);\n#endif\n}"; // eslint-disable-line
|
|
15159
15356
|
var blinnPhongVs = "#define GLSLIFY 1\n#include <common>\n#include <common_vert>\n#include <blendShape_input>\n#include <uv_share>\n#include <color_share>\n#include <normal_share>\n#include <worldpos_share>\n#include <ShadowVertexDeclaration>\n#include <FogVertexDeclaration>\nvoid main(){\n#include <begin_position_vert>\n#include <begin_normal_vert>\n#include <blendShape_vert>\n#include <skinning_vert>\n#include <uv_vert>\n#include <color_vert>\n#include <normal_vert>\n#include <worldpos_vert>\n#include <position_vert>\n#include <ShadowVertex>\n#include <FogVertex>\n}"; // eslint-disable-line
|
|
15160
15357
|
var particleFs = "#define GLSLIFY 1\nvarying vec4 v_color;varying float v_lifeLeft;varying vec2 v_uv;uniform sampler2D u_texture;void main(){if(v_lifeLeft==1.0){discard;}float alphaFactor=1.0;\n#ifdef fadeIn\nfloat fadeInFactor=step(0.5,v_lifeLeft);alphaFactor=2.0*fadeInFactor*(1.0-v_lifeLeft)+(1.0-fadeInFactor);\n#endif\n#ifdef fadeOut\nfloat fadeOutFactor=step(0.5,v_lifeLeft);alphaFactor=alphaFactor*2.0*(1.0-fadeOutFactor)*v_lifeLeft+alphaFactor*fadeOutFactor;\n#endif\n#ifdef particleTexture\nvec4 tex=texture2D(u_texture,v_uv);\n#ifdef useOriginColor\ngl_FragColor=vec4(tex.rgb,alphaFactor*tex.a*v_color.w);\n#else\ngl_FragColor=vec4(v_color.xyz*tex.rgb,alphaFactor*tex.a*v_color.w);\n#endif\n#else\ngl_FragColor=vec4(v_color.xyz,alphaFactor*v_color.w);\n#endif\n}"; // eslint-disable-line
|
|
15161
15358
|
var particleVs = "#define GLSLIFY 1\nattribute vec3 a_position;attribute vec3 a_velocity;attribute vec3 a_acceleration;attribute vec4 a_color;attribute vec4 a_lifeAndSize;attribute vec2 a_rotation;attribute vec3 a_uv;attribute vec2 a_normalizedUv;uniform float u_time;uniform bool u_once;uniform mat4 u_MVPMat;varying vec4 v_color;varying float v_lifeLeft;varying vec2 v_uv;\n#ifdef is2d\nuniform mat4 u_viewInvMat;uniform mat4 u_projMat;uniform mat4 u_viewMat;uniform mat4 u_modelMat;\n#endif\nmat2 rotation2d(float angle){float s=sin(angle);float c=cos(angle);return mat2(c,-s,s,c);}void main(){v_color=a_color;v_uv=a_uv.xy;float life=a_lifeAndSize.y;float startTime=a_lifeAndSize.x;float deltaTime=max(mod(u_time-startTime,life),0.0);if((u_once&&u_time>life+startTime)){deltaTime=0.0;}v_lifeLeft=1.0-deltaTime/life;float scale=a_lifeAndSize.z;vec3 position=a_position+(a_velocity+a_acceleration*deltaTime*0.5)*deltaTime;\n#ifdef isScaleByLifetime\nscale*=v_lifeLeft;\n#else\nscale*=pow(a_lifeAndSize.w,deltaTime);\n#endif\n#ifdef rotateToVelocity\nvec3 v=a_velocity+a_acceleration*deltaTime;float angle=atan(v.z,v.x)*2.0;\n#else\nfloat deltaAngle=deltaTime*a_rotation.y;float angle=a_rotation.x+deltaAngle;\n#endif\n#ifdef is2d\nvec2 rotatedPoint=rotation2d(angle)*vec2(a_normalizedUv.x,a_normalizedUv.y*a_uv.z);vec3 basisX=u_viewInvMat[0].xyz;vec3 basisZ=u_viewInvMat[1].xyz;vec3 localPosition=vec3(basisX*rotatedPoint.x+basisZ*rotatedPoint.y)*scale+position;gl_Position=u_projMat*u_viewMat*vec4(localPosition+u_modelMat[3].xyz,1.);\n#else\n#ifdef rotateToVelocity\nfloat s=sin(angle);float c=cos(angle);\n#else\nfloat s=sin(angle);float c=cos(angle);\n#endif\nvec4 rotatedPoint=vec4((a_normalizedUv.x*c+a_normalizedUv.y*a_uv.z*s)*scale,0.,(a_normalizedUv.x*s-a_normalizedUv.y*a_uv.z*c)*scale,1.);vec4 orientation=vec4(0,0,0,1);vec4 q2=orientation+orientation;vec4 qx=orientation.xxxw*q2.xyzx;vec4 qy=orientation.xyyw*q2.xyzy;vec4 qz=orientation.xxzw*q2.xxzz;mat4 localMatrix=mat4((1.0-qy.y)-qz.z,qx.y+qz.w,qx.z-qy.w,0,qx.y-qz.w,(1.0-qx.x)-qz.z,qy.z+qx.w,0,qx.z+qy.w,qy.z-qx.w,(1.0-qx.x)-qy.y,0,position.x,position.y,position.z,1);rotatedPoint=localMatrix*rotatedPoint;gl_Position=u_MVPMat*rotatedPoint;\n#endif\n}"; // eslint-disable-line
|
|
15162
|
-
var pbrFs = "#define GLSLIFY 1\n#define IS_METALLIC_WORKFLOW\n#include <common>\n#include <camera_declare>\n#include <
|
|
15359
|
+
var pbrFs = "#define GLSLIFY 1\n#define IS_METALLIC_WORKFLOW\n#include <common>\n#include <camera_declare>\n#include <FogFragmentDeclaration>\n#include <uv_share>\n#include <normal_share>\n#include <color_share>\n#include <worldpos_share>\n#include <light_frag_define>\n#include <pbr_frag_define>\n#include <pbr_helper>\nvoid main(){\n#include <pbr_frag>\n#include <FogFragment>\n#ifndef OASIS_COLORSPACE_GAMMA\ngl_FragColor=linearToGamma(gl_FragColor);\n#endif\n}"; // eslint-disable-line
|
|
15163
15360
|
var pbrSpecularFs = "#define GLSLIFY 1\n#include <common>\n#include <camera_declare>\n#include <FogFragmentDeclaration>\n#include <uv_share>\n#include <normal_share>\n#include <color_share>\n#include <worldpos_share>\n#include <light_frag_define>\n#include <pbr_frag_define>\n#include <pbr_helper>\nvoid main(){\n#include <pbr_frag>\n#include <FogFragment>\n#ifndef OASIS_COLORSPACE_GAMMA\ngl_FragColor=linearToGamma(gl_FragColor);\n#endif\n}"; // eslint-disable-line
|
|
15164
15361
|
var pbrVs = "#define GLSLIFY 1\n#include <common>\n#include <common_vert>\n#include <blendShape_input>\n#include <uv_share>\n#include <color_share>\n#include <normal_share>\n#include <worldpos_share>\n#include <ShadowVertexDeclaration>\n#include <FogVertexDeclaration>\nvoid main(){\n#include <begin_position_vert>\n#include <begin_normal_vert>\n#include <blendShape_vert>\n#include <skinning_vert>\n#include <uv_vert>\n#include <color_vert>\n#include <normal_vert>\n#include <worldpos_vert>\n#include <position_vert>\n#include <ShadowVertex>\n#include <FogVertex>\n}"; // eslint-disable-line
|
|
15165
15362
|
var shadowMapFs = "#define GLSLIFY 1\n#ifdef OASIS_NO_DEPTH_TEXTURE\nvec4 pack(float depth){const vec4 bitShift=vec4(1.0,256.0,256.0*256.0,256.0*256.0*256.0);const vec4 bitMask=vec4(1.0/256.0,1.0/256.0,1.0/256.0,0.0);vec4 rgbaDepth=fract(depth*bitShift);rgbaDepth-=rgbaDepth.gbaa*bitMask;return rgbaDepth;}\n#endif\nvoid main(){\n#ifdef OASIS_NO_DEPTH_TEXTURE\ngl_FragColor=pack(gl_FragCoord.z);\n#else\ngl_FragColor=vec4(0.0,0.0,0.0,0.0);\n#endif\n}"; // eslint-disable-line
|
|
@@ -15284,8 +15481,8 @@ ShaderPool.init();
|
|
|
15284
15481
|
/** @internal */ _this._canSpriteBatch = true;
|
|
15285
15482
|
/** @internal @todo: temporary solution */ _this._macroCollection = new ShaderMacroCollection();
|
|
15286
15483
|
_this._settings = {};
|
|
15287
|
-
_this._resourceManager = new ResourceManager(
|
|
15288
|
-
_this._sceneManager = new SceneManager(
|
|
15484
|
+
_this._resourceManager = new ResourceManager(_assert_this_initialized(_this));
|
|
15485
|
+
_this._sceneManager = new SceneManager(_assert_this_initialized(_this));
|
|
15289
15486
|
_this._vSyncCount = 1;
|
|
15290
15487
|
_this._targetFrameRate = 60;
|
|
15291
15488
|
_this._time = new Time();
|
|
@@ -15309,25 +15506,25 @@ ShaderPool.init();
|
|
|
15309
15506
|
};
|
|
15310
15507
|
_this._hardwareRenderer = hardwareRenderer;
|
|
15311
15508
|
_this._hardwareRenderer.init(canvas);
|
|
15312
|
-
_this.physicsManager = new PhysicsManager(
|
|
15509
|
+
_this.physicsManager = new PhysicsManager(_assert_this_initialized(_this));
|
|
15313
15510
|
_this._canvas = canvas;
|
|
15314
|
-
_this._sceneManager.activeScene = new Scene(
|
|
15315
|
-
_this._spriteMaskManager = new SpriteMaskManager(
|
|
15511
|
+
_this._sceneManager.activeScene = new Scene(_assert_this_initialized(_this), "DefaultScene");
|
|
15512
|
+
_this._spriteMaskManager = new SpriteMaskManager(_assert_this_initialized(_this));
|
|
15316
15513
|
_this._spriteDefaultMaterial = _this._createSpriteMaterial();
|
|
15317
15514
|
_this._spriteMaskDefaultMaterial = _this._createSpriteMaskMaterial();
|
|
15318
|
-
_this._textDefaultFont = Font.createFromOS(
|
|
15515
|
+
_this._textDefaultFont = Font.createFromOS(_assert_this_initialized(_this), "Arial");
|
|
15319
15516
|
_this._textDefaultFont.isGCIgnored = false;
|
|
15320
|
-
_this.inputManager = new InputManager(
|
|
15517
|
+
_this.inputManager = new InputManager(_assert_this_initialized(_this));
|
|
15321
15518
|
var magentaPixel = new Uint8Array([
|
|
15322
15519
|
255,
|
|
15323
15520
|
0,
|
|
15324
15521
|
255,
|
|
15325
15522
|
255
|
|
15326
15523
|
]);
|
|
15327
|
-
var magentaTexture2D = new Texture2D(
|
|
15524
|
+
var magentaTexture2D = new Texture2D(_assert_this_initialized(_this), 1, 1, exports.TextureFormat.R8G8B8A8, false);
|
|
15328
15525
|
magentaTexture2D.setPixelBuffer(magentaPixel);
|
|
15329
15526
|
magentaTexture2D.isGCIgnored = true;
|
|
15330
|
-
var magentaTextureCube = new TextureCube(
|
|
15527
|
+
var magentaTextureCube = new TextureCube(_assert_this_initialized(_this), 1, exports.TextureFormat.R8G8B8A8, false);
|
|
15331
15528
|
magentaTextureCube.setPixelBuffer(exports.TextureCubeFace.PositiveX, magentaPixel);
|
|
15332
15529
|
magentaTextureCube.setPixelBuffer(exports.TextureCubeFace.NegativeX, magentaPixel);
|
|
15333
15530
|
magentaTextureCube.setPixelBuffer(exports.TextureCubeFace.PositiveY, magentaPixel);
|
|
@@ -15338,22 +15535,22 @@ ShaderPool.init();
|
|
|
15338
15535
|
if (!hardwareRenderer.canIUse(exports.GLCapabilityType.depthTexture)) {
|
|
15339
15536
|
_this._macroCollection.enable(Engine._noDepthTextureMacro);
|
|
15340
15537
|
} else {
|
|
15341
|
-
var depthTexture2D = new Texture2D(
|
|
15538
|
+
var depthTexture2D = new Texture2D(_assert_this_initialized(_this), 1, 1, exports.TextureFormat.Depth16, false);
|
|
15342
15539
|
depthTexture2D.isGCIgnored = true;
|
|
15343
15540
|
_this._depthTexture2D = depthTexture2D;
|
|
15344
15541
|
}
|
|
15345
15542
|
_this._magentaTexture2D = magentaTexture2D;
|
|
15346
15543
|
_this._magentaTextureCube = magentaTextureCube;
|
|
15347
15544
|
if (hardwareRenderer.isWebGL2) {
|
|
15348
|
-
var magentaTexture2DArray = new Texture2DArray(
|
|
15545
|
+
var magentaTexture2DArray = new Texture2DArray(_assert_this_initialized(_this), 1, 1, 1, exports.TextureFormat.R8G8B8A8, false);
|
|
15349
15546
|
magentaTexture2DArray.setPixelBuffer(0, magentaPixel);
|
|
15350
15547
|
magentaTexture2DArray.isGCIgnored = true;
|
|
15351
15548
|
_this._magentaTexture2DArray = magentaTexture2DArray;
|
|
15352
15549
|
}
|
|
15353
|
-
var magentaMaterial = new Material(
|
|
15550
|
+
var magentaMaterial = new Material(_assert_this_initialized(_this), Shader.find("unlit"));
|
|
15354
15551
|
magentaMaterial.shaderData.setColor("u_baseColor", new Color(1.0, 0.0, 1.01, 1.0));
|
|
15355
15552
|
_this._magentaMaterial = magentaMaterial;
|
|
15356
|
-
var backgroundTextureMaterial = new Material(
|
|
15553
|
+
var backgroundTextureMaterial = new Material(_assert_this_initialized(_this), Shader.find("background-texture"));
|
|
15357
15554
|
backgroundTextureMaterial.isGCIgnored = true;
|
|
15358
15555
|
backgroundTextureMaterial.renderState.depthState.compareFunction = exports.CompareFunction.LessEqual;
|
|
15359
15556
|
_this._backgroundTextureMaterial = backgroundTextureMaterial;
|
|
@@ -15524,7 +15721,7 @@ ShaderPool.init();
|
|
|
15524
15721
|
material.isGCIgnored = true;
|
|
15525
15722
|
return material;
|
|
15526
15723
|
};
|
|
15527
|
-
|
|
15724
|
+
_create_class$2(Engine, [
|
|
15528
15725
|
{
|
|
15529
15726
|
key: "settings",
|
|
15530
15727
|
get: /**
|
|
@@ -15612,9 +15809,15 @@ ShaderPool.init();
|
|
|
15612
15809
|
]);
|
|
15613
15810
|
return Engine;
|
|
15614
15811
|
}(EventDispatcher);
|
|
15615
|
-
|
|
15616
|
-
/** @internal */ Engine.
|
|
15617
|
-
|
|
15812
|
+
(function() {
|
|
15813
|
+
/** @internal */ Engine._gammaMacro = Shader.getMacroByName("OASIS_COLORSPACE_GAMMA");
|
|
15814
|
+
})();
|
|
15815
|
+
(function() {
|
|
15816
|
+
/** @internal */ Engine._noDepthTextureMacro = Shader.getMacroByName("OASIS_NO_DEPTH_TEXTURE");
|
|
15817
|
+
})();
|
|
15818
|
+
(function() {
|
|
15819
|
+
/** @internal Conversion of space units to pixel units for 2D. */ Engine._pixelsPerUnit = 100;
|
|
15820
|
+
})();
|
|
15618
15821
|
/**
|
|
15619
15822
|
* Script class, used for logic writing.
|
|
15620
15823
|
*/ var Script = /*#__PURE__*/ function(Component) {
|
|
@@ -15927,7 +16130,9 @@ __decorate$1([
|
|
|
15927
16130
|
};
|
|
15928
16131
|
return SpriteBatcher;
|
|
15929
16132
|
}(Basic2DBatcher);
|
|
15930
|
-
|
|
16133
|
+
(function() {
|
|
16134
|
+
SpriteBatcher._textureProperty = Shader.getPropertyByName("u_spriteTexture");
|
|
16135
|
+
})();
|
|
15931
16136
|
/**
|
|
15932
16137
|
* Render queue.
|
|
15933
16138
|
*/ var RenderQueue = /*#__PURE__*/ function() {
|
|
@@ -16421,227 +16626,247 @@ var /**
|
|
|
16421
16626
|
};
|
|
16422
16627
|
return ShadowUtils;
|
|
16423
16628
|
}();
|
|
16424
|
-
|
|
16425
|
-
|
|
16426
|
-
|
|
16427
|
-
|
|
16428
|
-
|
|
16429
|
-
new miniprogram$7.
|
|
16430
|
-
|
|
16431
|
-
|
|
16432
|
-
|
|
16433
|
-
|
|
16434
|
-
|
|
16435
|
-
|
|
16436
|
-
|
|
16437
|
-
|
|
16438
|
-
|
|
16439
|
-
|
|
16440
|
-
|
|
16441
|
-
|
|
16442
|
-
|
|
16443
|
-
|
|
16444
|
-
|
|
16445
|
-
|
|
16446
|
-
|
|
16447
|
-
|
|
16448
|
-
|
|
16449
|
-
|
|
16450
|
-
|
|
16451
|
-
|
|
16452
|
-
|
|
16453
|
-
|
|
16454
|
-
|
|
16455
|
-
|
|
16456
|
-
|
|
16457
|
-
miniprogram$7.FrustumFace.Top,
|
|
16458
|
-
miniprogram$7.FrustumFace.Bottom
|
|
16459
|
-
],
|
|
16460
|
-
[
|
|
16461
|
-
miniprogram$7.FrustumFace.Near,
|
|
16462
|
-
miniprogram$7.FrustumFace.Far,
|
|
16463
|
-
miniprogram$7.FrustumFace.Top,
|
|
16464
|
-
miniprogram$7.FrustumFace.Bottom
|
|
16465
|
-
],
|
|
16466
|
-
[
|
|
16467
|
-
miniprogram$7.FrustumFace.Near,
|
|
16468
|
-
miniprogram$7.FrustumFace.Far,
|
|
16469
|
-
miniprogram$7.FrustumFace.Left,
|
|
16470
|
-
miniprogram$7.FrustumFace.Right
|
|
16471
|
-
],
|
|
16472
|
-
[
|
|
16473
|
-
miniprogram$7.FrustumFace.Near,
|
|
16474
|
-
miniprogram$7.FrustumFace.Far,
|
|
16475
|
-
miniprogram$7.FrustumFace.Left,
|
|
16476
|
-
miniprogram$7.FrustumFace.Right
|
|
16477
|
-
]
|
|
16478
|
-
];
|
|
16479
|
-
/** near, far, left, right, bottom, top */ ShadowUtils._frustumTwoPlaneCorners = [
|
|
16480
|
-
[
|
|
16481
|
-
// near, far, left, right, bottom, top
|
|
16482
|
-
[
|
|
16483
|
-
8,
|
|
16484
|
-
8
|
|
16485
|
-
],
|
|
16486
|
-
[
|
|
16487
|
-
8,
|
|
16488
|
-
8
|
|
16489
|
-
],
|
|
16490
|
-
[
|
|
16491
|
-
4,
|
|
16492
|
-
5
|
|
16493
|
-
],
|
|
16494
|
-
[
|
|
16495
|
-
6,
|
|
16496
|
-
7
|
|
16497
|
-
],
|
|
16498
|
-
[
|
|
16499
|
-
7,
|
|
16500
|
-
4
|
|
16501
|
-
],
|
|
16502
|
-
[
|
|
16503
|
-
5,
|
|
16504
|
-
6
|
|
16505
|
-
]
|
|
16506
|
-
],
|
|
16507
|
-
[
|
|
16508
|
-
// near, far, left, right, bottom, top
|
|
16509
|
-
[
|
|
16510
|
-
8,
|
|
16511
|
-
8
|
|
16512
|
-
],
|
|
16513
|
-
[
|
|
16514
|
-
8,
|
|
16515
|
-
8
|
|
16516
|
-
],
|
|
16517
|
-
[
|
|
16518
|
-
1,
|
|
16519
|
-
0
|
|
16520
|
-
],
|
|
16521
|
-
[
|
|
16522
|
-
3,
|
|
16523
|
-
2
|
|
16524
|
-
],
|
|
16525
|
-
[
|
|
16526
|
-
0,
|
|
16527
|
-
3
|
|
16528
|
-
],
|
|
16529
|
-
[
|
|
16530
|
-
2,
|
|
16531
|
-
1
|
|
16532
|
-
]
|
|
16533
|
-
],
|
|
16534
|
-
[
|
|
16535
|
-
// near, far, left, right, bottom, top
|
|
16536
|
-
[
|
|
16537
|
-
5,
|
|
16538
|
-
4
|
|
16539
|
-
],
|
|
16540
|
-
[
|
|
16541
|
-
0,
|
|
16542
|
-
1
|
|
16543
|
-
],
|
|
16544
|
-
[
|
|
16545
|
-
8,
|
|
16546
|
-
8
|
|
16547
|
-
],
|
|
16548
|
-
[
|
|
16549
|
-
8,
|
|
16550
|
-
8
|
|
16551
|
-
],
|
|
16552
|
-
[
|
|
16553
|
-
4,
|
|
16554
|
-
0
|
|
16555
|
-
],
|
|
16556
|
-
[
|
|
16557
|
-
1,
|
|
16558
|
-
5
|
|
16559
|
-
]
|
|
16560
|
-
],
|
|
16561
|
-
[
|
|
16562
|
-
// near, far, left, right, bottom, top
|
|
16563
|
-
[
|
|
16564
|
-
7,
|
|
16565
|
-
6
|
|
16566
|
-
],
|
|
16567
|
-
[
|
|
16568
|
-
2,
|
|
16569
|
-
3
|
|
16570
|
-
],
|
|
16571
|
-
[
|
|
16572
|
-
8,
|
|
16573
|
-
8
|
|
16574
|
-
],
|
|
16575
|
-
[
|
|
16576
|
-
8,
|
|
16577
|
-
8
|
|
16578
|
-
],
|
|
16579
|
-
[
|
|
16580
|
-
3,
|
|
16581
|
-
7
|
|
16582
|
-
],
|
|
16583
|
-
[
|
|
16584
|
-
6,
|
|
16585
|
-
2
|
|
16586
|
-
]
|
|
16587
|
-
],
|
|
16588
|
-
[
|
|
16589
|
-
// near, far, left, right, bottom, top
|
|
16629
|
+
(function() {
|
|
16630
|
+
ShadowUtils._tempMatrix0 = new miniprogram$7.Matrix();
|
|
16631
|
+
})();
|
|
16632
|
+
(function() {
|
|
16633
|
+
// prettier-ignore
|
|
16634
|
+
/** @internal */ ShadowUtils._shadowMapCoordMatrix = new miniprogram$7.Matrix(0.5, 0.0, 0.0, 0.0, 0.0, 0.5, 0.0, 0.0, 0.0, 0.0, 0.5, 0.0, 0.5, 0.5, 0.5, 1.0);
|
|
16635
|
+
})();
|
|
16636
|
+
(function() {
|
|
16637
|
+
ShadowUtils._frustumCorners = [
|
|
16638
|
+
new miniprogram$7.Vector3(),
|
|
16639
|
+
new miniprogram$7.Vector3(),
|
|
16640
|
+
new miniprogram$7.Vector3(),
|
|
16641
|
+
new miniprogram$7.Vector3(),
|
|
16642
|
+
new miniprogram$7.Vector3(),
|
|
16643
|
+
new miniprogram$7.Vector3(),
|
|
16644
|
+
new miniprogram$7.Vector3(),
|
|
16645
|
+
new miniprogram$7.Vector3()
|
|
16646
|
+
];
|
|
16647
|
+
})();
|
|
16648
|
+
(function() {
|
|
16649
|
+
ShadowUtils._adjustNearPlane = new miniprogram$7.Plane(new miniprogram$7.Vector3());
|
|
16650
|
+
})();
|
|
16651
|
+
(function() {
|
|
16652
|
+
ShadowUtils._adjustFarPlane = new miniprogram$7.Plane(new miniprogram$7.Vector3());
|
|
16653
|
+
})();
|
|
16654
|
+
(function() {
|
|
16655
|
+
ShadowUtils._backPlaneFaces = new Array(5);
|
|
16656
|
+
})();
|
|
16657
|
+
(function() {
|
|
16658
|
+
ShadowUtils._edgePlanePoint2 = new miniprogram$7.Vector3();
|
|
16659
|
+
})();
|
|
16660
|
+
(function() {
|
|
16661
|
+
/** near, far, left, right, bottom, top */ ShadowUtils._frustumPlaneNeighbors = [
|
|
16590
16662
|
[
|
|
16591
|
-
|
|
16592
|
-
7
|
|
16663
|
+
miniprogram$7.FrustumFace.Left,
|
|
16664
|
+
miniprogram$7.FrustumFace.Right,
|
|
16665
|
+
miniprogram$7.FrustumFace.Top,
|
|
16666
|
+
miniprogram$7.FrustumFace.Bottom
|
|
16593
16667
|
],
|
|
16594
16668
|
[
|
|
16595
|
-
|
|
16596
|
-
|
|
16669
|
+
miniprogram$7.FrustumFace.Left,
|
|
16670
|
+
miniprogram$7.FrustumFace.Right,
|
|
16671
|
+
miniprogram$7.FrustumFace.Top,
|
|
16672
|
+
miniprogram$7.FrustumFace.Bottom
|
|
16597
16673
|
],
|
|
16598
16674
|
[
|
|
16599
|
-
|
|
16600
|
-
|
|
16675
|
+
miniprogram$7.FrustumFace.Near,
|
|
16676
|
+
miniprogram$7.FrustumFace.Far,
|
|
16677
|
+
miniprogram$7.FrustumFace.Top,
|
|
16678
|
+
miniprogram$7.FrustumFace.Bottom
|
|
16601
16679
|
],
|
|
16602
16680
|
[
|
|
16603
|
-
7,
|
|
16604
|
-
|
|
16681
|
+
miniprogram$7.FrustumFace.Near,
|
|
16682
|
+
miniprogram$7.FrustumFace.Far,
|
|
16683
|
+
miniprogram$7.FrustumFace.Top,
|
|
16684
|
+
miniprogram$7.FrustumFace.Bottom
|
|
16605
16685
|
],
|
|
16606
16686
|
[
|
|
16607
|
-
|
|
16608
|
-
|
|
16687
|
+
miniprogram$7.FrustumFace.Near,
|
|
16688
|
+
miniprogram$7.FrustumFace.Far,
|
|
16689
|
+
miniprogram$7.FrustumFace.Left,
|
|
16690
|
+
miniprogram$7.FrustumFace.Right
|
|
16609
16691
|
],
|
|
16610
16692
|
[
|
|
16611
|
-
|
|
16612
|
-
|
|
16693
|
+
miniprogram$7.FrustumFace.Near,
|
|
16694
|
+
miniprogram$7.FrustumFace.Far,
|
|
16695
|
+
miniprogram$7.FrustumFace.Left,
|
|
16696
|
+
miniprogram$7.FrustumFace.Right
|
|
16613
16697
|
]
|
|
16614
|
-
]
|
|
16615
|
-
|
|
16616
|
-
|
|
16698
|
+
];
|
|
16699
|
+
})();
|
|
16700
|
+
(function() {
|
|
16701
|
+
/** near, far, left, right, bottom, top */ ShadowUtils._frustumTwoPlaneCorners = [
|
|
16617
16702
|
[
|
|
16618
|
-
|
|
16619
|
-
|
|
16703
|
+
// near, far, left, right, bottom, top
|
|
16704
|
+
[
|
|
16705
|
+
8,
|
|
16706
|
+
8
|
|
16707
|
+
],
|
|
16708
|
+
[
|
|
16709
|
+
8,
|
|
16710
|
+
8
|
|
16711
|
+
],
|
|
16712
|
+
[
|
|
16713
|
+
4,
|
|
16714
|
+
5
|
|
16715
|
+
],
|
|
16716
|
+
[
|
|
16717
|
+
6,
|
|
16718
|
+
7
|
|
16719
|
+
],
|
|
16720
|
+
[
|
|
16721
|
+
7,
|
|
16722
|
+
4
|
|
16723
|
+
],
|
|
16724
|
+
[
|
|
16725
|
+
5,
|
|
16726
|
+
6
|
|
16727
|
+
]
|
|
16620
16728
|
],
|
|
16621
16729
|
[
|
|
16622
|
-
|
|
16623
|
-
|
|
16730
|
+
// near, far, left, right, bottom, top
|
|
16731
|
+
[
|
|
16732
|
+
8,
|
|
16733
|
+
8
|
|
16734
|
+
],
|
|
16735
|
+
[
|
|
16736
|
+
8,
|
|
16737
|
+
8
|
|
16738
|
+
],
|
|
16739
|
+
[
|
|
16740
|
+
1,
|
|
16741
|
+
0
|
|
16742
|
+
],
|
|
16743
|
+
[
|
|
16744
|
+
3,
|
|
16745
|
+
2
|
|
16746
|
+
],
|
|
16747
|
+
[
|
|
16748
|
+
0,
|
|
16749
|
+
3
|
|
16750
|
+
],
|
|
16751
|
+
[
|
|
16752
|
+
2,
|
|
16753
|
+
1
|
|
16754
|
+
]
|
|
16624
16755
|
],
|
|
16625
16756
|
[
|
|
16626
|
-
|
|
16627
|
-
|
|
16757
|
+
// near, far, left, right, bottom, top
|
|
16758
|
+
[
|
|
16759
|
+
5,
|
|
16760
|
+
4
|
|
16761
|
+
],
|
|
16762
|
+
[
|
|
16763
|
+
0,
|
|
16764
|
+
1
|
|
16765
|
+
],
|
|
16766
|
+
[
|
|
16767
|
+
8,
|
|
16768
|
+
8
|
|
16769
|
+
],
|
|
16770
|
+
[
|
|
16771
|
+
8,
|
|
16772
|
+
8
|
|
16773
|
+
],
|
|
16774
|
+
[
|
|
16775
|
+
4,
|
|
16776
|
+
0
|
|
16777
|
+
],
|
|
16778
|
+
[
|
|
16779
|
+
1,
|
|
16780
|
+
5
|
|
16781
|
+
]
|
|
16628
16782
|
],
|
|
16629
16783
|
[
|
|
16630
|
-
|
|
16631
|
-
|
|
16784
|
+
// near, far, left, right, bottom, top
|
|
16785
|
+
[
|
|
16786
|
+
7,
|
|
16787
|
+
6
|
|
16788
|
+
],
|
|
16789
|
+
[
|
|
16790
|
+
2,
|
|
16791
|
+
3
|
|
16792
|
+
],
|
|
16793
|
+
[
|
|
16794
|
+
8,
|
|
16795
|
+
8
|
|
16796
|
+
],
|
|
16797
|
+
[
|
|
16798
|
+
8,
|
|
16799
|
+
8
|
|
16800
|
+
],
|
|
16801
|
+
[
|
|
16802
|
+
3,
|
|
16803
|
+
7
|
|
16804
|
+
],
|
|
16805
|
+
[
|
|
16806
|
+
6,
|
|
16807
|
+
2
|
|
16808
|
+
]
|
|
16632
16809
|
],
|
|
16633
16810
|
[
|
|
16634
|
-
|
|
16635
|
-
|
|
16811
|
+
// near, far, left, right, bottom, top
|
|
16812
|
+
[
|
|
16813
|
+
4,
|
|
16814
|
+
7
|
|
16815
|
+
],
|
|
16816
|
+
[
|
|
16817
|
+
3,
|
|
16818
|
+
0
|
|
16819
|
+
],
|
|
16820
|
+
[
|
|
16821
|
+
0,
|
|
16822
|
+
4
|
|
16823
|
+
],
|
|
16824
|
+
[
|
|
16825
|
+
7,
|
|
16826
|
+
3
|
|
16827
|
+
],
|
|
16828
|
+
[
|
|
16829
|
+
8,
|
|
16830
|
+
8
|
|
16831
|
+
],
|
|
16832
|
+
[
|
|
16833
|
+
8,
|
|
16834
|
+
8
|
|
16835
|
+
]
|
|
16636
16836
|
],
|
|
16637
16837
|
[
|
|
16638
|
-
|
|
16639
|
-
|
|
16838
|
+
// near, far, left, right, bottom, top
|
|
16839
|
+
[
|
|
16840
|
+
6,
|
|
16841
|
+
5
|
|
16842
|
+
],
|
|
16843
|
+
[
|
|
16844
|
+
1,
|
|
16845
|
+
2
|
|
16846
|
+
],
|
|
16847
|
+
[
|
|
16848
|
+
5,
|
|
16849
|
+
1
|
|
16850
|
+
],
|
|
16851
|
+
[
|
|
16852
|
+
2,
|
|
16853
|
+
6
|
|
16854
|
+
],
|
|
16855
|
+
[
|
|
16856
|
+
8,
|
|
16857
|
+
8
|
|
16858
|
+
],
|
|
16859
|
+
[
|
|
16860
|
+
8,
|
|
16861
|
+
8
|
|
16862
|
+
]
|
|
16640
16863
|
]
|
|
16641
|
-
]
|
|
16642
|
-
|
|
16643
|
-
|
|
16644
|
-
|
|
16864
|
+
];
|
|
16865
|
+
})();
|
|
16866
|
+
(function() {
|
|
16867
|
+
//now max shadow sample tent is 5x5, atlas borderSize at least 3=ceil(2.5),and +1 pixel is for global border for no cascade mode.
|
|
16868
|
+
ShadowUtils.atlasBorderSize = 4.0;
|
|
16869
|
+
})();
|
|
16645
16870
|
/**
|
|
16646
16871
|
* Cascade shadow caster.
|
|
16647
16872
|
*/ var CascadedShadowCasterPass = /*#__PURE__*/ function() {
|
|
@@ -16877,18 +17102,42 @@ ShadowUtils.atlasBorderSize = 4.0;
|
|
|
16877
17102
|
};
|
|
16878
17103
|
return CascadedShadowCasterPass;
|
|
16879
17104
|
}();
|
|
16880
|
-
|
|
16881
|
-
CascadedShadowCasterPass.
|
|
16882
|
-
|
|
16883
|
-
|
|
16884
|
-
CascadedShadowCasterPass.
|
|
16885
|
-
|
|
16886
|
-
|
|
16887
|
-
CascadedShadowCasterPass.
|
|
16888
|
-
|
|
16889
|
-
|
|
16890
|
-
CascadedShadowCasterPass.
|
|
16891
|
-
|
|
17105
|
+
(function() {
|
|
17106
|
+
CascadedShadowCasterPass._lightShadowBiasProperty = Shader.getPropertyByName("u_shadowBias");
|
|
17107
|
+
})();
|
|
17108
|
+
(function() {
|
|
17109
|
+
CascadedShadowCasterPass._lightDirectionProperty = Shader.getPropertyByName("u_lightDirection");
|
|
17110
|
+
})();
|
|
17111
|
+
(function() {
|
|
17112
|
+
CascadedShadowCasterPass._shadowMatricesProperty = Shader.getPropertyByName("u_shadowMatrices");
|
|
17113
|
+
})();
|
|
17114
|
+
(function() {
|
|
17115
|
+
CascadedShadowCasterPass._shadowMapSize = Shader.getPropertyByName("u_shadowMapSize");
|
|
17116
|
+
})();
|
|
17117
|
+
(function() {
|
|
17118
|
+
CascadedShadowCasterPass._shadowInfosProperty = Shader.getPropertyByName("u_shadowInfo");
|
|
17119
|
+
})();
|
|
17120
|
+
(function() {
|
|
17121
|
+
CascadedShadowCasterPass._shadowMapsProperty = Shader.getPropertyByName("u_shadowMap");
|
|
17122
|
+
})();
|
|
17123
|
+
(function() {
|
|
17124
|
+
CascadedShadowCasterPass._shadowSplitSpheresProperty = Shader.getPropertyByName("u_shadowSplitSpheres");
|
|
17125
|
+
})();
|
|
17126
|
+
(function() {
|
|
17127
|
+
CascadedShadowCasterPass._maxCascades = 4;
|
|
17128
|
+
})();
|
|
17129
|
+
(function() {
|
|
17130
|
+
CascadedShadowCasterPass._cascadesSplitDistance = new Array(CascadedShadowCasterPass._maxCascades + 1);
|
|
17131
|
+
})();
|
|
17132
|
+
(function() {
|
|
17133
|
+
CascadedShadowCasterPass._clearColor = new miniprogram$7.Color(1, 1, 1, 1);
|
|
17134
|
+
})();
|
|
17135
|
+
(function() {
|
|
17136
|
+
CascadedShadowCasterPass._tempVector = new miniprogram$7.Vector3();
|
|
17137
|
+
})();
|
|
17138
|
+
(function() {
|
|
17139
|
+
CascadedShadowCasterPass._tempMatrix0 = new miniprogram$7.Matrix();
|
|
17140
|
+
})();
|
|
16892
17141
|
var passNum = 0;
|
|
16893
17142
|
/**
|
|
16894
17143
|
* RenderPass.
|
|
@@ -17119,7 +17368,7 @@ var passNum = 0;
|
|
|
17119
17368
|
renderer._prepareRender(context);
|
|
17120
17369
|
}
|
|
17121
17370
|
};
|
|
17122
|
-
|
|
17371
|
+
_create_class$2(BasicRenderPipeline, [
|
|
17123
17372
|
{
|
|
17124
17373
|
key: "defaultRenderPass",
|
|
17125
17374
|
get: /**
|
|
@@ -17131,13 +17380,23 @@ var passNum = 0;
|
|
|
17131
17380
|
]);
|
|
17132
17381
|
return BasicRenderPipeline;
|
|
17133
17382
|
}();
|
|
17134
|
-
|
|
17135
|
-
BasicRenderPipeline.
|
|
17383
|
+
(function() {
|
|
17384
|
+
BasicRenderPipeline._tempVector0 = new miniprogram$7.Vector3();
|
|
17385
|
+
})();
|
|
17386
|
+
(function() {
|
|
17387
|
+
BasicRenderPipeline._tempVector1 = new miniprogram$7.Vector3();
|
|
17388
|
+
})();
|
|
17136
17389
|
var _Camera;
|
|
17137
17390
|
var MathTemp = function MathTemp() {};
|
|
17138
|
-
|
|
17139
|
-
MathTemp.
|
|
17140
|
-
|
|
17391
|
+
(function() {
|
|
17392
|
+
MathTemp.tempVec4 = new miniprogram$7.Vector4();
|
|
17393
|
+
})();
|
|
17394
|
+
(function() {
|
|
17395
|
+
MathTemp.tempVec3 = new miniprogram$7.Vector3();
|
|
17396
|
+
})();
|
|
17397
|
+
(function() {
|
|
17398
|
+
MathTemp.tempVec2 = new miniprogram$7.Vector2();
|
|
17399
|
+
})();
|
|
17141
17400
|
exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
|
|
17142
17401
|
var Camera1 = function Camera1(entity) {
|
|
17143
17402
|
var _this;
|
|
@@ -17154,6 +17413,8 @@ exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
|
|
|
17154
17413
|
* @remarks Support bit manipulation, corresponding to `Layer`.
|
|
17155
17414
|
*/ _this.cullingMask = exports.Layer.Everything;
|
|
17156
17415
|
/** @internal */ _this._globalShaderMacro = new ShaderMacroCollection();
|
|
17416
|
+
/** @internal */ _this._frustum = new miniprogram$7.BoundingFrustum();
|
|
17417
|
+
/** @internal */ _this._virtualCamera = new VirtualCamera();
|
|
17157
17418
|
_this._isProjMatSetting = false;
|
|
17158
17419
|
_this._nearClipPlane = 0.1;
|
|
17159
17420
|
_this._farClipPlane = 100;
|
|
@@ -17164,8 +17425,6 @@ exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
|
|
|
17164
17425
|
_this._isFrustumProjectDirty = true;
|
|
17165
17426
|
_this._customAspectRatio = undefined;
|
|
17166
17427
|
_this._renderTarget = null;
|
|
17167
|
-
/** @internal */ _this._frustum = new miniprogram$7.BoundingFrustum();
|
|
17168
|
-
/** @internal */ _this._virtualCamera = new VirtualCamera();
|
|
17169
17428
|
_this._viewport = new miniprogram$7.Vector4(0, 0, 1, 1);
|
|
17170
17429
|
_this._inverseProjectionMatrix = new miniprogram$7.Matrix();
|
|
17171
17430
|
_this._lastAspectSize = new miniprogram$7.Vector2(0, 0);
|
|
@@ -17175,7 +17434,7 @@ exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
|
|
|
17175
17434
|
_this._isViewMatrixDirty = transform.registerWorldChangeFlag();
|
|
17176
17435
|
_this._isInvViewProjDirty = transform.registerWorldChangeFlag();
|
|
17177
17436
|
_this._frustumViewChangeFlag = transform.registerWorldChangeFlag();
|
|
17178
|
-
_this._renderPipeline = new BasicRenderPipeline(
|
|
17437
|
+
_this._renderPipeline = new BasicRenderPipeline(_assert_this_initialized(_this));
|
|
17179
17438
|
_this.shaderData._addRefCount(1);
|
|
17180
17439
|
return _this;
|
|
17181
17440
|
};
|
|
@@ -17393,7 +17652,7 @@ exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
|
|
|
17393
17652
|
}
|
|
17394
17653
|
return this._inverseProjectionMatrix;
|
|
17395
17654
|
};
|
|
17396
|
-
|
|
17655
|
+
_create_class$2(Camera1, [
|
|
17397
17656
|
{
|
|
17398
17657
|
key: "nearClipPlane",
|
|
17399
17658
|
get: /**
|
|
@@ -17557,7 +17816,11 @@ exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
|
|
|
17557
17816
|
}
|
|
17558
17817
|
]);
|
|
17559
17818
|
return Camera1;
|
|
17560
|
-
}(Component),
|
|
17819
|
+
}(Component), function() {
|
|
17820
|
+
/** @internal */ _Camera._inverseViewMatrixProperty = Shader.getPropertyByName("u_viewInvMat");
|
|
17821
|
+
}(), function() {
|
|
17822
|
+
/** @internal */ _Camera._cameraPositionProperty = Shader.getPropertyByName("u_cameraPos");
|
|
17823
|
+
}(), _Camera);
|
|
17561
17824
|
__decorate$1([
|
|
17562
17825
|
deepClone
|
|
17563
17826
|
], exports.Camera.prototype, "_frustum", void 0);
|
|
@@ -17766,7 +18029,9 @@ var MultiExecutor = /*#__PURE__*/ function() {
|
|
|
17766
18029
|
};
|
|
17767
18030
|
return Loader;
|
|
17768
18031
|
}();
|
|
17769
|
-
|
|
18032
|
+
(function() {
|
|
18033
|
+
Loader._engineObjects = {};
|
|
18034
|
+
})();
|
|
17770
18035
|
/**
|
|
17771
18036
|
* Asset Type.
|
|
17772
18037
|
*/ exports.AssetType = void 0;
|
|
@@ -17915,7 +18180,7 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
|
|
|
17915
18180
|
target._isTransparent = this._isTransparent;
|
|
17916
18181
|
target._blendMode = this._blendMode;
|
|
17917
18182
|
};
|
|
17918
|
-
|
|
18183
|
+
_create_class$2(BaseMaterial, [
|
|
17919
18184
|
{
|
|
17920
18185
|
key: "shader",
|
|
17921
18186
|
get: /**
|
|
@@ -18015,19 +18280,45 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
|
|
|
18015
18280
|
]);
|
|
18016
18281
|
return BaseMaterial;
|
|
18017
18282
|
}(Material);
|
|
18018
|
-
|
|
18019
|
-
BaseMaterial.
|
|
18020
|
-
|
|
18021
|
-
|
|
18022
|
-
BaseMaterial.
|
|
18023
|
-
|
|
18024
|
-
|
|
18025
|
-
BaseMaterial.
|
|
18026
|
-
|
|
18027
|
-
|
|
18028
|
-
BaseMaterial.
|
|
18029
|
-
|
|
18030
|
-
|
|
18283
|
+
(function() {
|
|
18284
|
+
BaseMaterial._baseColorProp = Shader.getPropertyByName("u_baseColor");
|
|
18285
|
+
})();
|
|
18286
|
+
(function() {
|
|
18287
|
+
BaseMaterial._baseTextureProp = Shader.getPropertyByName("u_baseTexture");
|
|
18288
|
+
})();
|
|
18289
|
+
(function() {
|
|
18290
|
+
BaseMaterial._baseTextureMacro = Shader.getMacroByName("BASETEXTURE");
|
|
18291
|
+
})();
|
|
18292
|
+
(function() {
|
|
18293
|
+
BaseMaterial._tilingOffsetProp = Shader.getPropertyByName("u_tilingOffset");
|
|
18294
|
+
})();
|
|
18295
|
+
(function() {
|
|
18296
|
+
BaseMaterial._normalTextureProp = Shader.getPropertyByName("u_normalTexture");
|
|
18297
|
+
})();
|
|
18298
|
+
(function() {
|
|
18299
|
+
BaseMaterial._normalIntensityProp = Shader.getPropertyByName("u_normalIntensity");
|
|
18300
|
+
})();
|
|
18301
|
+
(function() {
|
|
18302
|
+
BaseMaterial._normalTextureMacro = Shader.getMacroByName("NORMALTEXTURE");
|
|
18303
|
+
})();
|
|
18304
|
+
(function() {
|
|
18305
|
+
BaseMaterial._emissiveColorProp = Shader.getPropertyByName("u_emissiveColor");
|
|
18306
|
+
})();
|
|
18307
|
+
(function() {
|
|
18308
|
+
BaseMaterial._emissiveTextureProp = Shader.getPropertyByName("u_emissiveTexture");
|
|
18309
|
+
})();
|
|
18310
|
+
(function() {
|
|
18311
|
+
BaseMaterial._emissiveTextureMacro = Shader.getMacroByName("EMISSIVETEXTURE");
|
|
18312
|
+
})();
|
|
18313
|
+
(function() {
|
|
18314
|
+
BaseMaterial._transparentMacro = Shader.getMacroByName("OASIS_TRANSPARENT");
|
|
18315
|
+
})();
|
|
18316
|
+
(function() {
|
|
18317
|
+
BaseMaterial._alphaCutoffProp = Shader.getPropertyByName("u_alphaCutoff");
|
|
18318
|
+
})();
|
|
18319
|
+
(function() {
|
|
18320
|
+
BaseMaterial._alphaCutoffMacro = Shader.getMacroByName("ALPHA_CUTOFF");
|
|
18321
|
+
})();
|
|
18031
18322
|
/**
|
|
18032
18323
|
* Blinn-phong Material.
|
|
18033
18324
|
*/ var BlinnPhongMaterial = /*#__PURE__*/ function(BaseMaterial) {
|
|
@@ -18054,7 +18345,7 @@ BaseMaterial._alphaCutoffMacro = Shader.getMacroByName("ALPHA_CUTOFF");
|
|
|
18054
18345
|
this.cloneTo(dest);
|
|
18055
18346
|
return dest;
|
|
18056
18347
|
};
|
|
18057
|
-
|
|
18348
|
+
_create_class$2(BlinnPhongMaterial, [
|
|
18058
18349
|
{
|
|
18059
18350
|
key: "baseColor",
|
|
18060
18351
|
get: /**
|
|
@@ -18200,9 +18491,15 @@ BaseMaterial._alphaCutoffMacro = Shader.getMacroByName("ALPHA_CUTOFF");
|
|
|
18200
18491
|
]);
|
|
18201
18492
|
return BlinnPhongMaterial;
|
|
18202
18493
|
}(BaseMaterial);
|
|
18203
|
-
|
|
18204
|
-
BlinnPhongMaterial.
|
|
18205
|
-
|
|
18494
|
+
(function() {
|
|
18495
|
+
BlinnPhongMaterial._specularColorProp = Shader.getPropertyByName("u_specularColor");
|
|
18496
|
+
})();
|
|
18497
|
+
(function() {
|
|
18498
|
+
BlinnPhongMaterial._shininessProp = Shader.getPropertyByName("u_shininess");
|
|
18499
|
+
})();
|
|
18500
|
+
(function() {
|
|
18501
|
+
BlinnPhongMaterial._specularTextureProp = Shader.getPropertyByName("u_specularTexture");
|
|
18502
|
+
})();
|
|
18206
18503
|
/**
|
|
18207
18504
|
* Texture UV coordinate.
|
|
18208
18505
|
*/ exports.TextureCoordinate = void 0;
|
|
@@ -18236,7 +18533,7 @@ BlinnPhongMaterial._specularTextureProp = Shader.getPropertyByName("u_specularTe
|
|
|
18236
18533
|
shaderData.setFloat(PBRBaseMaterial._clearCoatRoughnessProp, 0);
|
|
18237
18534
|
return _this;
|
|
18238
18535
|
}
|
|
18239
|
-
|
|
18536
|
+
_create_class$2(PBRBaseMaterial, [
|
|
18240
18537
|
{
|
|
18241
18538
|
key: "baseColor",
|
|
18242
18539
|
get: /**
|
|
@@ -18460,14 +18757,30 @@ BlinnPhongMaterial._specularTextureProp = Shader.getPropertyByName("u_specularTe
|
|
|
18460
18757
|
]);
|
|
18461
18758
|
return PBRBaseMaterial;
|
|
18462
18759
|
}(BaseMaterial);
|
|
18463
|
-
|
|
18464
|
-
PBRBaseMaterial.
|
|
18465
|
-
|
|
18466
|
-
|
|
18467
|
-
PBRBaseMaterial.
|
|
18468
|
-
|
|
18469
|
-
|
|
18470
|
-
PBRBaseMaterial.
|
|
18760
|
+
(function() {
|
|
18761
|
+
PBRBaseMaterial._occlusionTextureIntensityProp = Shader.getPropertyByName("u_occlusionIntensity");
|
|
18762
|
+
})();
|
|
18763
|
+
(function() {
|
|
18764
|
+
PBRBaseMaterial._occlusionTextureCoordProp = Shader.getPropertyByName("u_occlusionTextureCoord");
|
|
18765
|
+
})();
|
|
18766
|
+
(function() {
|
|
18767
|
+
PBRBaseMaterial._occlusionTextureProp = Shader.getPropertyByName("u_occlusionTexture");
|
|
18768
|
+
})();
|
|
18769
|
+
(function() {
|
|
18770
|
+
PBRBaseMaterial._clearCoatProp = Shader.getPropertyByName("u_clearCoat");
|
|
18771
|
+
})();
|
|
18772
|
+
(function() {
|
|
18773
|
+
PBRBaseMaterial._clearCoatTextureProp = Shader.getPropertyByName("u_clearCoatTexture");
|
|
18774
|
+
})();
|
|
18775
|
+
(function() {
|
|
18776
|
+
PBRBaseMaterial._clearCoatRoughnessProp = Shader.getPropertyByName("u_clearCoatRoughness");
|
|
18777
|
+
})();
|
|
18778
|
+
(function() {
|
|
18779
|
+
PBRBaseMaterial._clearCoatRoughnessTextureProp = Shader.getPropertyByName("u_clearCoatRoughnessTexture");
|
|
18780
|
+
})();
|
|
18781
|
+
(function() {
|
|
18782
|
+
PBRBaseMaterial._clearCoatNormalTextureProp = Shader.getPropertyByName("u_clearCoatNormalTexture");
|
|
18783
|
+
})();
|
|
18471
18784
|
/**
|
|
18472
18785
|
* PBR (Metallic-Roughness Workflow) Material.
|
|
18473
18786
|
*/ var PBRMaterial = /*#__PURE__*/ function(PBRBaseMaterial) {
|
|
@@ -18487,7 +18800,7 @@ PBRBaseMaterial._clearCoatNormalTextureProp = Shader.getPropertyByName("u_clearC
|
|
|
18487
18800
|
this.cloneTo(dest);
|
|
18488
18801
|
return dest;
|
|
18489
18802
|
};
|
|
18490
|
-
|
|
18803
|
+
_create_class$2(PBRMaterial, [
|
|
18491
18804
|
{
|
|
18492
18805
|
key: "metallic",
|
|
18493
18806
|
get: /**
|
|
@@ -18530,9 +18843,15 @@ PBRBaseMaterial._clearCoatNormalTextureProp = Shader.getPropertyByName("u_clearC
|
|
|
18530
18843
|
]);
|
|
18531
18844
|
return PBRMaterial;
|
|
18532
18845
|
}(PBRBaseMaterial);
|
|
18533
|
-
|
|
18534
|
-
PBRMaterial.
|
|
18535
|
-
|
|
18846
|
+
(function() {
|
|
18847
|
+
PBRMaterial._metallicProp = Shader.getPropertyByName("u_metal");
|
|
18848
|
+
})();
|
|
18849
|
+
(function() {
|
|
18850
|
+
PBRMaterial._roughnessProp = Shader.getPropertyByName("u_roughness");
|
|
18851
|
+
})();
|
|
18852
|
+
(function() {
|
|
18853
|
+
PBRMaterial._roughnessMetallicTextureProp = Shader.getPropertyByName("u_roughnessMetallicTexture");
|
|
18854
|
+
})();
|
|
18536
18855
|
/**
|
|
18537
18856
|
* PBR (Specular-Glossiness Workflow) Material.
|
|
18538
18857
|
*/ var PBRSpecularMaterial = /*#__PURE__*/ function(PBRBaseMaterial) {
|
|
@@ -18552,7 +18871,7 @@ PBRMaterial._roughnessMetallicTextureProp = Shader.getPropertyByName("u_roughnes
|
|
|
18552
18871
|
this.cloneTo(dest);
|
|
18553
18872
|
return dest;
|
|
18554
18873
|
};
|
|
18555
|
-
|
|
18874
|
+
_create_class$2(PBRSpecularMaterial, [
|
|
18556
18875
|
{
|
|
18557
18876
|
key: "specularColor",
|
|
18558
18877
|
get: /**
|
|
@@ -18598,10 +18917,18 @@ PBRMaterial._roughnessMetallicTextureProp = Shader.getPropertyByName("u_roughnes
|
|
|
18598
18917
|
]);
|
|
18599
18918
|
return PBRSpecularMaterial;
|
|
18600
18919
|
}(PBRBaseMaterial);
|
|
18601
|
-
|
|
18602
|
-
PBRSpecularMaterial.
|
|
18603
|
-
|
|
18604
|
-
|
|
18920
|
+
(function() {
|
|
18921
|
+
PBRSpecularMaterial._specularColorProp = Shader.getPropertyByName("u_PBRSpecularColor");
|
|
18922
|
+
})();
|
|
18923
|
+
(function() {
|
|
18924
|
+
PBRSpecularMaterial._glossinessProp = Shader.getPropertyByName("u_glossiness");
|
|
18925
|
+
})();
|
|
18926
|
+
(function() {
|
|
18927
|
+
PBRSpecularMaterial._specularGlossinessTextureProp = Shader.getPropertyByName("u_specularGlossinessTexture");
|
|
18928
|
+
})();
|
|
18929
|
+
(function() {
|
|
18930
|
+
PBRSpecularMaterial._specularGlossinessTextureMacro = Shader.getMacroByName("SPECULARGLOSSINESSTEXTURE");
|
|
18931
|
+
})();
|
|
18605
18932
|
/**
|
|
18606
18933
|
* Unlit Material.
|
|
18607
18934
|
*/ var UnlitMaterial = /*#__PURE__*/ function(BaseMaterial) {
|
|
@@ -18624,7 +18951,7 @@ PBRSpecularMaterial._specularGlossinessTextureMacro = Shader.getMacroByName("SPE
|
|
|
18624
18951
|
this.cloneTo(dest);
|
|
18625
18952
|
return dest;
|
|
18626
18953
|
};
|
|
18627
|
-
|
|
18954
|
+
_create_class$2(UnlitMaterial, [
|
|
18628
18955
|
{
|
|
18629
18956
|
key: "baseColor",
|
|
18630
18957
|
get: /**
|
|
@@ -18754,7 +19081,7 @@ exports.TextVerticalAlignment = void 0;
|
|
|
18754
19081
|
this._sprites = null;
|
|
18755
19082
|
this._spriteNamesToIndex = null;
|
|
18756
19083
|
};
|
|
18757
|
-
|
|
19084
|
+
_create_class$2(SpriteAtlas, [
|
|
18758
19085
|
{
|
|
18759
19086
|
key: "sprites",
|
|
18760
19087
|
get: /**
|
|
@@ -18923,7 +19250,7 @@ exports.TextVerticalAlignment = void 0;
|
|
|
18923
19250
|
}
|
|
18924
19251
|
this._updateFlagManager.dispatch(type);
|
|
18925
19252
|
};
|
|
18926
|
-
|
|
19253
|
+
_create_class$2(Sprite, [
|
|
18927
19254
|
{
|
|
18928
19255
|
key: "texture",
|
|
18929
19256
|
get: /**
|
|
@@ -19211,7 +19538,9 @@ var SlicedSpriteAssembler = (_SlicedSpriteAssembler = /*#__PURE__*/ function() {
|
|
|
19211
19538
|
};
|
|
19212
19539
|
SlicedSpriteAssembler1.updateUVs = function updateUVs(renderer) {};
|
|
19213
19540
|
return SlicedSpriteAssembler1;
|
|
19214
|
-
}(),
|
|
19541
|
+
}(), function() {
|
|
19542
|
+
_SlicedSpriteAssembler._worldMatrix = new miniprogram$7.Matrix();
|
|
19543
|
+
}(), _SlicedSpriteAssembler);
|
|
19215
19544
|
SlicedSpriteAssembler = __decorate$1([
|
|
19216
19545
|
StaticInterfaceImplement$1()
|
|
19217
19546
|
], SlicedSpriteAssembler);
|
|
@@ -19232,7 +19561,7 @@ SlicedSpriteAssembler = __decorate$1([
|
|
|
19232
19561
|
_this._renderData = new RenderData2D(4, [], [], null, _this._color);
|
|
19233
19562
|
_this.drawMode = exports.SpriteDrawMode.Simple;
|
|
19234
19563
|
_this.setMaterial(_this._engine._spriteDefaultMaterial);
|
|
19235
|
-
_this._onSpriteChange = _this._onSpriteChange.bind(
|
|
19564
|
+
_this._onSpriteChange = _this._onSpriteChange.bind(_assert_this_initialized(_this));
|
|
19236
19565
|
return _this;
|
|
19237
19566
|
};
|
|
19238
19567
|
_inherits$2(SpriteRenderer, Renderer);
|
|
@@ -19338,7 +19667,7 @@ SlicedSpriteAssembler = __decorate$1([
|
|
|
19338
19667
|
break;
|
|
19339
19668
|
}
|
|
19340
19669
|
};
|
|
19341
|
-
|
|
19670
|
+
_create_class$2(SpriteRenderer, [
|
|
19342
19671
|
{
|
|
19343
19672
|
key: "drawMode",
|
|
19344
19673
|
get: /**
|
|
@@ -19487,7 +19816,9 @@ SlicedSpriteAssembler = __decorate$1([
|
|
|
19487
19816
|
]);
|
|
19488
19817
|
return SpriteRenderer;
|
|
19489
19818
|
}(exports.Renderer);
|
|
19490
|
-
|
|
19819
|
+
(function() {
|
|
19820
|
+
/** @internal */ SpriteRenderer._textureProperty = Shader.getPropertyByName("u_spriteTexture");
|
|
19821
|
+
})();
|
|
19491
19822
|
__decorate$1([
|
|
19492
19823
|
ignoreClone
|
|
19493
19824
|
], SpriteRenderer.prototype, "_renderData", void 0);
|
|
@@ -19543,14 +19874,16 @@ var /**
|
|
|
19543
19874
|
];
|
|
19544
19875
|
this.renderData = new RenderData2D(4, positions, null, CharRenderData.triangles, null);
|
|
19545
19876
|
};
|
|
19546
|
-
|
|
19547
|
-
|
|
19548
|
-
|
|
19549
|
-
|
|
19550
|
-
|
|
19551
|
-
|
|
19552
|
-
|
|
19553
|
-
|
|
19877
|
+
(function() {
|
|
19878
|
+
CharRenderData.triangles = [
|
|
19879
|
+
0,
|
|
19880
|
+
2,
|
|
19881
|
+
1,
|
|
19882
|
+
2,
|
|
19883
|
+
0,
|
|
19884
|
+
3
|
|
19885
|
+
];
|
|
19886
|
+
})();
|
|
19554
19887
|
/**
|
|
19555
19888
|
* @internal
|
|
19556
19889
|
*/ var CharRenderDataPool = /*#__PURE__*/ function() {
|
|
@@ -19872,23 +20205,37 @@ CharRenderData.triangles = [
|
|
|
19872
20205
|
};
|
|
19873
20206
|
return TextUtils;
|
|
19874
20207
|
}();
|
|
19875
|
-
|
|
19876
|
-
|
|
19877
|
-
|
|
19878
|
-
|
|
19879
|
-
|
|
19880
|
-
|
|
19881
|
-
|
|
19882
|
-
|
|
19883
|
-
|
|
19884
|
-
|
|
19885
|
-
|
|
19886
|
-
|
|
19887
|
-
|
|
19888
|
-
|
|
19889
|
-
TextUtils.
|
|
19890
|
-
|
|
19891
|
-
|
|
20208
|
+
(function() {
|
|
20209
|
+
/** @internal */ TextUtils._genericFontFamilies = [
|
|
20210
|
+
"serif",
|
|
20211
|
+
"sans-serif",
|
|
20212
|
+
"monospace",
|
|
20213
|
+
"cursive",
|
|
20214
|
+
"fantasy",
|
|
20215
|
+
"system-ui",
|
|
20216
|
+
"math",
|
|
20217
|
+
"emoji",
|
|
20218
|
+
"fangsong"
|
|
20219
|
+
];
|
|
20220
|
+
})();
|
|
20221
|
+
(function() {
|
|
20222
|
+
/** These characters are all tall to help calculate the height required for text. */ TextUtils._measureString = "|\xc9q\xc5";
|
|
20223
|
+
})();
|
|
20224
|
+
(function() {
|
|
20225
|
+
TextUtils._measureBaseline = "M";
|
|
20226
|
+
})();
|
|
20227
|
+
(function() {
|
|
20228
|
+
TextUtils._heightMultiplier = 2;
|
|
20229
|
+
})();
|
|
20230
|
+
(function() {
|
|
20231
|
+
TextUtils._baselineMultiplier = 1.4;
|
|
20232
|
+
})();
|
|
20233
|
+
(function() {
|
|
20234
|
+
TextUtils._fontSizeInfoCache = {};
|
|
20235
|
+
})();
|
|
20236
|
+
(function() {
|
|
20237
|
+
TextUtils._textContext = null;
|
|
20238
|
+
})();
|
|
19892
20239
|
/**
|
|
19893
20240
|
* Renders a text for 2D graphics.
|
|
19894
20241
|
*/ var TextRenderer = /*#__PURE__*/ function(Renderer) {
|
|
@@ -19913,7 +20260,7 @@ TextUtils._textContext = null;
|
|
|
19913
20260
|
_this._overflowMode = exports.OverflowMode.Overflow;
|
|
19914
20261
|
_this._maskInteraction = exports.SpriteMaskInteraction.None;
|
|
19915
20262
|
_this._maskLayer = exports.SpriteMaskLayer.Layer0;
|
|
19916
|
-
var engine =
|
|
20263
|
+
var engine = _assert_this_initialized(_this).engine;
|
|
19917
20264
|
_this._font = engine._textDefaultFont;
|
|
19918
20265
|
_this._font._addRefCount(1);
|
|
19919
20266
|
_this.setMaterial(engine._spriteDefaultMaterial);
|
|
@@ -20153,7 +20500,7 @@ TextUtils._textContext = null;
|
|
|
20153
20500
|
Renderer.prototype._onTransformChanged.call(this, bit);
|
|
20154
20501
|
this._setDirtyFlagTrue(0x4 | 0x8);
|
|
20155
20502
|
};
|
|
20156
|
-
|
|
20503
|
+
_create_class$2(TextRenderer, [
|
|
20157
20504
|
{
|
|
20158
20505
|
key: "color",
|
|
20159
20506
|
get: /**
|
|
@@ -20366,9 +20713,15 @@ TextUtils._textContext = null;
|
|
|
20366
20713
|
]);
|
|
20367
20714
|
return TextRenderer;
|
|
20368
20715
|
}(exports.Renderer);
|
|
20369
|
-
|
|
20370
|
-
TextRenderer.
|
|
20371
|
-
|
|
20716
|
+
(function() {
|
|
20717
|
+
TextRenderer._charRenderDataPool = new CharRenderDataPool(CharRenderData, 50);
|
|
20718
|
+
})();
|
|
20719
|
+
(function() {
|
|
20720
|
+
TextRenderer._tempVec30 = new miniprogram$7.Vector3();
|
|
20721
|
+
})();
|
|
20722
|
+
(function() {
|
|
20723
|
+
TextRenderer._tempVec31 = new miniprogram$7.Vector3();
|
|
20724
|
+
})();
|
|
20372
20725
|
__decorate$1([
|
|
20373
20726
|
assignmentClone
|
|
20374
20727
|
], TextRenderer.prototype, "_subFont", void 0);
|
|
@@ -20583,7 +20936,9 @@ var DirtyFlag;
|
|
|
20583
20936
|
};
|
|
20584
20937
|
return AnimationCurveOwner;
|
|
20585
20938
|
}();
|
|
20586
|
-
|
|
20939
|
+
(function() {
|
|
20940
|
+
AnimationCurveOwner._assemblerMap = new Map();
|
|
20941
|
+
})();
|
|
20587
20942
|
/**
|
|
20588
20943
|
* @internal
|
|
20589
20944
|
*/ var PositionAnimationCurveOwnerAssembler = /*#__PURE__*/ function() {
|
|
@@ -20749,7 +21104,7 @@ AnimationCurveOwner.registerAssembler(SkinnedMeshRenderer, "blendShapeWeights",
|
|
|
20749
21104
|
}
|
|
20750
21105
|
}
|
|
20751
21106
|
};
|
|
20752
|
-
|
|
21107
|
+
_create_class$2(AnimationClip, [
|
|
20753
21108
|
{
|
|
20754
21109
|
key: "events",
|
|
20755
21110
|
get: /**
|
|
@@ -20895,7 +21250,7 @@ AnimationCurveOwner.registerAssembler(SkinnedMeshRenderer, "blendShapeWeights",
|
|
|
20895
21250
|
var result = this._evaluate(time, evaluateData);
|
|
20896
21251
|
return this._type._subtractValue(result, this.keys[0].value, evaluateData.value);
|
|
20897
21252
|
};
|
|
20898
|
-
|
|
21253
|
+
_create_class$2(AnimationCurve, [
|
|
20899
21254
|
{
|
|
20900
21255
|
key: "interpolation",
|
|
20901
21256
|
get: /**
|
|
@@ -21004,7 +21359,11 @@ exports.AnimationArrayCurve = (_AnimationArrayCurve = /*#__PURE__*/ function(Ani
|
|
|
21004
21359
|
return out;
|
|
21005
21360
|
};
|
|
21006
21361
|
return AnimationArrayCurve;
|
|
21007
|
-
}(AnimationCurve),
|
|
21362
|
+
}(AnimationCurve), function() {
|
|
21363
|
+
/** @internal */ _AnimationArrayCurve._isReferenceType = true;
|
|
21364
|
+
}(), function() {
|
|
21365
|
+
/** @internal */ _AnimationArrayCurve._isInterpolationType = true;
|
|
21366
|
+
}(), _AnimationArrayCurve);
|
|
21008
21367
|
exports.AnimationArrayCurve = __decorate$1([
|
|
21009
21368
|
StaticInterfaceImplement$1()
|
|
21010
21369
|
], exports.AnimationArrayCurve);
|
|
@@ -21056,7 +21415,11 @@ exports.AnimationBoolCurve = (_AnimationBoolCurve = /*#__PURE__*/ function(Anima
|
|
|
21056
21415
|
return frame.value;
|
|
21057
21416
|
};
|
|
21058
21417
|
return AnimationBoolCurve;
|
|
21059
|
-
}(AnimationCurve),
|
|
21418
|
+
}(AnimationCurve), function() {
|
|
21419
|
+
/** @internal */ _AnimationBoolCurve._isReferenceType = false;
|
|
21420
|
+
}(), function() {
|
|
21421
|
+
/** @internal */ _AnimationBoolCurve._isInterpolationType = false;
|
|
21422
|
+
}(), _AnimationBoolCurve);
|
|
21060
21423
|
exports.AnimationBoolCurve = __decorate$1([
|
|
21061
21424
|
StaticInterfaceImplement$1()
|
|
21062
21425
|
], exports.AnimationBoolCurve);
|
|
@@ -21148,7 +21511,11 @@ exports.AnimationColorCurve = (_AnimationColorCurve = /*#__PURE__*/ function(Ani
|
|
|
21148
21511
|
return out;
|
|
21149
21512
|
};
|
|
21150
21513
|
return AnimationColorCurve;
|
|
21151
|
-
}(AnimationCurve),
|
|
21514
|
+
}(AnimationCurve), function() {
|
|
21515
|
+
/** @internal */ _AnimationColorCurve._isReferenceType = true;
|
|
21516
|
+
}(), function() {
|
|
21517
|
+
/** @internal */ _AnimationColorCurve._isInterpolationType = true;
|
|
21518
|
+
}(), _AnimationColorCurve);
|
|
21152
21519
|
exports.AnimationColorCurve = __decorate$1([
|
|
21153
21520
|
StaticInterfaceImplement$1()
|
|
21154
21521
|
], exports.AnimationColorCurve);
|
|
@@ -21243,7 +21610,11 @@ exports.AnimationFloatArrayCurve = (_AnimationFloatArrayCurve = /*#__PURE__*/ fu
|
|
|
21243
21610
|
return out;
|
|
21244
21611
|
};
|
|
21245
21612
|
return AnimationFloatArrayCurve;
|
|
21246
|
-
}(AnimationCurve),
|
|
21613
|
+
}(AnimationCurve), function() {
|
|
21614
|
+
/** @internal */ _AnimationFloatArrayCurve._isReferenceType = true;
|
|
21615
|
+
}(), function() {
|
|
21616
|
+
/** @internal */ _AnimationFloatArrayCurve._isInterpolationType = true;
|
|
21617
|
+
}(), _AnimationFloatArrayCurve);
|
|
21247
21618
|
exports.AnimationFloatArrayCurve = __decorate$1([
|
|
21248
21619
|
StaticInterfaceImplement$1()
|
|
21249
21620
|
], exports.AnimationFloatArrayCurve);
|
|
@@ -21307,7 +21678,11 @@ exports.AnimationFloatCurve = (_AnimationFloatCurve = /*#__PURE__*/ function(Ani
|
|
|
21307
21678
|
}
|
|
21308
21679
|
};
|
|
21309
21680
|
return AnimationFloatCurve;
|
|
21310
|
-
}(AnimationCurve),
|
|
21681
|
+
}(AnimationCurve), function() {
|
|
21682
|
+
/** @internal */ _AnimationFloatCurve._isReferenceType = false;
|
|
21683
|
+
}(), function() {
|
|
21684
|
+
/** @internal */ _AnimationFloatCurve._isInterpolationType = true;
|
|
21685
|
+
}(), _AnimationFloatCurve);
|
|
21311
21686
|
exports.AnimationFloatCurve = __decorate$1([
|
|
21312
21687
|
StaticInterfaceImplement$1()
|
|
21313
21688
|
], exports.AnimationFloatCurve);
|
|
@@ -21404,7 +21779,13 @@ exports.AnimationQuaternionCurve = (_AnimationQuaternionCurve = /*#__PURE__*/ fu
|
|
|
21404
21779
|
return out;
|
|
21405
21780
|
};
|
|
21406
21781
|
return AnimationQuaternionCurve1;
|
|
21407
|
-
}(AnimationCurve),
|
|
21782
|
+
}(AnimationCurve), function() {
|
|
21783
|
+
/** @internal */ _AnimationQuaternionCurve._isInterpolationType = true;
|
|
21784
|
+
}(), function() {
|
|
21785
|
+
/** @internal */ _AnimationQuaternionCurve._isReferenceType = true;
|
|
21786
|
+
}(), function() {
|
|
21787
|
+
/** @internal */ _AnimationQuaternionCurve._tempConjugateQuat = new miniprogram$7.Quaternion();
|
|
21788
|
+
}(), _AnimationQuaternionCurve);
|
|
21408
21789
|
exports.AnimationQuaternionCurve = __decorate$1([
|
|
21409
21790
|
StaticInterfaceImplement$1()
|
|
21410
21791
|
], exports.AnimationQuaternionCurve);
|
|
@@ -21484,7 +21865,11 @@ exports.AnimationVector2Curve = (_AnimationVector2Curve = /*#__PURE__*/ function
|
|
|
21484
21865
|
return out;
|
|
21485
21866
|
};
|
|
21486
21867
|
return AnimationVector2Curve;
|
|
21487
|
-
}(AnimationCurve),
|
|
21868
|
+
}(AnimationCurve), function() {
|
|
21869
|
+
/** @internal */ _AnimationVector2Curve._isReferenceType = true;
|
|
21870
|
+
}(), function() {
|
|
21871
|
+
/** @internal */ _AnimationVector2Curve._isInterpolationType = true;
|
|
21872
|
+
}(), _AnimationVector2Curve);
|
|
21488
21873
|
exports.AnimationVector2Curve = __decorate$1([
|
|
21489
21874
|
StaticInterfaceImplement$1()
|
|
21490
21875
|
], exports.AnimationVector2Curve);
|
|
@@ -21576,7 +21961,11 @@ exports.AnimationVector3Curve = (_AnimationVector3Curve = /*#__PURE__*/ function
|
|
|
21576
21961
|
return out;
|
|
21577
21962
|
};
|
|
21578
21963
|
return AnimationVector3Curve;
|
|
21579
|
-
}(AnimationCurve),
|
|
21964
|
+
}(AnimationCurve), function() {
|
|
21965
|
+
/** @internal */ _AnimationVector3Curve._isReferenceType = true;
|
|
21966
|
+
}(), function() {
|
|
21967
|
+
/** @internal */ _AnimationVector3Curve._isInterpolationType = true;
|
|
21968
|
+
}(), _AnimationVector3Curve);
|
|
21580
21969
|
exports.AnimationVector3Curve = __decorate$1([
|
|
21581
21970
|
StaticInterfaceImplement$1()
|
|
21582
21971
|
], exports.AnimationVector3Curve);
|
|
@@ -21668,7 +22057,11 @@ exports.AnimationVector4Curve = (_AnimationVector4Curve = /*#__PURE__*/ function
|
|
|
21668
22057
|
return out;
|
|
21669
22058
|
};
|
|
21670
22059
|
return AnimationVector4Curve;
|
|
21671
|
-
}(AnimationCurve),
|
|
22060
|
+
}(AnimationCurve), function() {
|
|
22061
|
+
/** @internal */ _AnimationVector4Curve._isReferenceType = true;
|
|
22062
|
+
}(), function() {
|
|
22063
|
+
/** @internal */ _AnimationVector4Curve._isInterpolationType = true;
|
|
22064
|
+
}(), _AnimationVector4Curve);
|
|
21672
22065
|
exports.AnimationVector4Curve = __decorate$1([
|
|
21673
22066
|
StaticInterfaceImplement$1()
|
|
21674
22067
|
], exports.AnimationVector4Curve);
|
|
@@ -22373,7 +22766,7 @@ exports.AnimatorLayerBlendingMode = void 0;
|
|
|
22373
22766
|
}
|
|
22374
22767
|
}
|
|
22375
22768
|
};
|
|
22376
|
-
|
|
22769
|
+
_create_class$2(Animator, [
|
|
22377
22770
|
{
|
|
22378
22771
|
key: "animatorController",
|
|
22379
22772
|
get: /**
|
|
@@ -22463,7 +22856,7 @@ __decorate$1([
|
|
|
22463
22856
|
*/ _proto._registerChangeFlag = function _registerChangeFlag() {
|
|
22464
22857
|
return this._updateFlagManager.createFlag(BoolUpdateFlag);
|
|
22465
22858
|
};
|
|
22466
|
-
|
|
22859
|
+
_create_class$2(AnimatorController, [
|
|
22467
22860
|
{
|
|
22468
22861
|
key: "layers",
|
|
22469
22862
|
get: /**
|
|
@@ -22594,7 +22987,7 @@ __decorate$1([
|
|
|
22594
22987
|
index2 !== -1 && this._onStateExitScripts.splice(index2, 1);
|
|
22595
22988
|
}
|
|
22596
22989
|
};
|
|
22597
|
-
|
|
22990
|
+
_create_class$2(AnimatorState, [
|
|
22598
22991
|
{
|
|
22599
22992
|
key: "transitions",
|
|
22600
22993
|
get: /**
|
|
@@ -22721,7 +23114,7 @@ exports.AnimatorConditionMode = void 0;
|
|
|
22721
23114
|
return _this;
|
|
22722
23115
|
};
|
|
22723
23116
|
_inherits$2(SkyBoxMaterial, Material);
|
|
22724
|
-
|
|
23117
|
+
_create_class$2(SkyBoxMaterial, [
|
|
22725
23118
|
{
|
|
22726
23119
|
key: "textureDecodeRGBM",
|
|
22727
23120
|
get: /**
|
|
@@ -22818,7 +23211,7 @@ exports.ParticleRendererBlendMode = void 0;
|
|
|
22818
23211
|
_this._isFadeOut = false;
|
|
22819
23212
|
_this._playOnEnable = true;
|
|
22820
23213
|
_this._blendMode = 0;
|
|
22821
|
-
_this._onColorChanged = _this._onColorChanged.bind(
|
|
23214
|
+
_this._onColorChanged = _this._onColorChanged.bind(_assert_this_initialized(_this));
|
|
22822
23215
|
//@ts-ignore
|
|
22823
23216
|
_this._color._onValueChanged = _this._onColorChanged;
|
|
22824
23217
|
_this.setMaterial(_this._createMaterial());
|
|
@@ -23096,7 +23489,7 @@ exports.ParticleRendererBlendMode = void 0;
|
|
|
23096
23489
|
ParticleRenderer._getRandom = function _getRandom() {
|
|
23097
23490
|
return Math.random() - 0.5;
|
|
23098
23491
|
};
|
|
23099
|
-
|
|
23492
|
+
_create_class$2(ParticleRenderer, [
|
|
23100
23493
|
{
|
|
23101
23494
|
key: "texture",
|
|
23102
23495
|
get: /**
|
|
@@ -23527,7 +23920,9 @@ exports.ParticleRendererBlendMode = void 0;
|
|
|
23527
23920
|
]);
|
|
23528
23921
|
return ParticleRenderer;
|
|
23529
23922
|
}(MeshRenderer);
|
|
23530
|
-
|
|
23923
|
+
(function() {
|
|
23924
|
+
/** The max number of indices that Uint16Array can support. */ ParticleRenderer._uint16VertexLimit = 65535;
|
|
23925
|
+
})();
|
|
23531
23926
|
__decorate$1([
|
|
23532
23927
|
ignoreClone
|
|
23533
23928
|
], ParticleRenderer.prototype, "_onColorChanged", null);
|
|
@@ -23792,7 +24187,7 @@ var _tempVector3 = new miniprogram$7.Vector3();
|
|
|
23792
24187
|
this._camera.renderTarget = this._oriCameraRenderTarget;
|
|
23793
24188
|
this._camera.cullingMask = this._oriCameraCullingMask;
|
|
23794
24189
|
};
|
|
23795
|
-
|
|
24190
|
+
_create_class$2(Probe, [
|
|
23796
24191
|
{
|
|
23797
24192
|
key: "_texture",
|
|
23798
24193
|
get: function get() {
|
|
@@ -24018,32 +24413,22 @@ var engineMiniprogramAdapter$1 = require("@galacean/engine-miniprogram-adapter")
|
|
|
24018
24413
|
var miniprogram$1$2 = require("@galacean/engine-math/dist/miniprogram");
|
|
24019
24414
|
var miniprogram$2$1 = require("@galacean/engine-draco/dist/miniprogram");
|
|
24020
24415
|
var miniprogram$3$1 = require("@galacean/engine-rhi-webgl/dist/miniprogram");
|
|
24021
|
-
function
|
|
24022
|
-
|
|
24416
|
+
function _extends$1() {
|
|
24417
|
+
_extends$1 = Object.assign || function assign(target) {
|
|
24023
24418
|
for(var i = 1; i < arguments.length; i++){
|
|
24024
24419
|
var source = arguments[i];
|
|
24025
|
-
for(var key in source)
|
|
24026
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
24027
|
-
target[key] = source[key];
|
|
24028
|
-
}
|
|
24029
|
-
}
|
|
24420
|
+
for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
|
|
24030
24421
|
}
|
|
24031
24422
|
return target;
|
|
24032
24423
|
};
|
|
24033
|
-
return
|
|
24034
|
-
}
|
|
24035
|
-
function _extends$1() {
|
|
24036
|
-
return extends_$1.apply(this, arguments);
|
|
24424
|
+
return _extends$1.apply(this, arguments);
|
|
24037
24425
|
}
|
|
24038
|
-
function
|
|
24039
|
-
|
|
24426
|
+
function _set_prototype_of$1(o, p) {
|
|
24427
|
+
_set_prototype_of$1 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
24040
24428
|
o.__proto__ = p;
|
|
24041
24429
|
return o;
|
|
24042
24430
|
};
|
|
24043
|
-
return
|
|
24044
|
-
}
|
|
24045
|
-
function _setPrototypeOf$1(o, p) {
|
|
24046
|
-
return setPrototypeOf$1(o, p);
|
|
24431
|
+
return _set_prototype_of$1(o, p);
|
|
24047
24432
|
}
|
|
24048
24433
|
function _inherits$1(subClass, superClass) {
|
|
24049
24434
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
@@ -24056,7 +24441,7 @@ function _inherits$1(subClass, superClass) {
|
|
|
24056
24441
|
configurable: true
|
|
24057
24442
|
}
|
|
24058
24443
|
});
|
|
24059
|
-
if (superClass)
|
|
24444
|
+
if (superClass) _set_prototype_of$1(subClass, superClass);
|
|
24060
24445
|
}
|
|
24061
24446
|
/******************************************************************************
|
|
24062
24447
|
Copyright (c) Microsoft Corporation.
|
|
@@ -24339,13 +24724,10 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
24339
24724
|
reject(error);
|
|
24340
24725
|
return;
|
|
24341
24726
|
}
|
|
24342
|
-
if (info.done)
|
|
24343
|
-
|
|
24344
|
-
} else {
|
|
24345
|
-
Promise.resolve(value).then(_next, _throw);
|
|
24346
|
-
}
|
|
24727
|
+
if (info.done) resolve(value);
|
|
24728
|
+
else Promise.resolve(value).then(_next, _throw);
|
|
24347
24729
|
}
|
|
24348
|
-
function
|
|
24730
|
+
function _async_to_generator(fn) {
|
|
24349
24731
|
return function() {
|
|
24350
24732
|
var self = this, args = arguments;
|
|
24351
24733
|
return new Promise(function(resolve, reject) {
|
|
@@ -24390,7 +24772,7 @@ var FontLoader = /*#__PURE__*/ function(Loader) {
|
|
|
24390
24772
|
});
|
|
24391
24773
|
};
|
|
24392
24774
|
_proto._registerFont = function _registerFont(fontName, fontUrl) {
|
|
24393
|
-
return
|
|
24775
|
+
return _async_to_generator(function() {
|
|
24394
24776
|
var fontFace;
|
|
24395
24777
|
return __generator(this, function(_state) {
|
|
24396
24778
|
switch(_state.label){
|
|
@@ -24998,30 +25380,32 @@ var TextureWrapMode;
|
|
|
24998
25380
|
};
|
|
24999
25381
|
return GLTFUtil;
|
|
25000
25382
|
}();
|
|
25001
|
-
function
|
|
25383
|
+
function _array_like_to_array(arr, len) {
|
|
25002
25384
|
if (len == null || len > arr.length) len = arr.length;
|
|
25003
25385
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
25004
25386
|
return arr2;
|
|
25005
25387
|
}
|
|
25006
|
-
function
|
|
25007
|
-
if (Array.isArray(arr)) return
|
|
25388
|
+
function _array_without_holes(arr) {
|
|
25389
|
+
if (Array.isArray(arr)) return _array_like_to_array(arr);
|
|
25008
25390
|
}
|
|
25009
|
-
function
|
|
25010
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
|
|
25391
|
+
function _iterable_to_array(iter) {
|
|
25392
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) {
|
|
25393
|
+
return Array.from(iter);
|
|
25394
|
+
}
|
|
25011
25395
|
}
|
|
25012
|
-
function
|
|
25013
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance
|
|
25396
|
+
function _non_iterable_spread() {
|
|
25397
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
25014
25398
|
}
|
|
25015
|
-
function
|
|
25399
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
|
25016
25400
|
if (!o) return;
|
|
25017
|
-
if (typeof o === "string") return
|
|
25401
|
+
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
25018
25402
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
25019
25403
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
25020
25404
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
25021
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return
|
|
25405
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
25022
25406
|
}
|
|
25023
|
-
function
|
|
25024
|
-
return
|
|
25407
|
+
function _to_consumable_array(arr) {
|
|
25408
|
+
return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
|
|
25025
25409
|
}
|
|
25026
25410
|
var Parser = /*#__PURE__*/ function() {
|
|
25027
25411
|
var Parser = function Parser() {};
|
|
@@ -25037,7 +25421,7 @@ var Parser = /*#__PURE__*/ function() {
|
|
|
25037
25421
|
extensionSchema,
|
|
25038
25422
|
parseResource,
|
|
25039
25423
|
context
|
|
25040
|
-
].concat(
|
|
25424
|
+
].concat(_to_consumable_array(extra)));
|
|
25041
25425
|
}
|
|
25042
25426
|
}
|
|
25043
25427
|
};
|
|
@@ -25051,7 +25435,7 @@ var Parser = /*#__PURE__*/ function() {
|
|
|
25051
25435
|
return (_parsers_ = parsers[0]).createEngineResource.apply(_parsers_, [
|
|
25052
25436
|
extensionSchema,
|
|
25053
25437
|
context
|
|
25054
|
-
].concat(
|
|
25438
|
+
].concat(_to_consumable_array(extra)));
|
|
25055
25439
|
}
|
|
25056
25440
|
};
|
|
25057
25441
|
Parser.hasExtensionParser = function hasExtensionParser(extensionName) {
|
|
@@ -25076,7 +25460,9 @@ var Parser = /*#__PURE__*/ function() {
|
|
|
25076
25460
|
};
|
|
25077
25461
|
return Parser;
|
|
25078
25462
|
}();
|
|
25079
|
-
|
|
25463
|
+
(function() {
|
|
25464
|
+
Parser._extensionParsers = {};
|
|
25465
|
+
})();
|
|
25080
25466
|
/**
|
|
25081
25467
|
* Declare ExtensionParser's decorator.
|
|
25082
25468
|
* @param extensionName - Extension name
|
|
@@ -25150,9 +25536,7 @@ KHR_draco_mesh_compression = __decorate([
|
|
|
25150
25536
|
function _instanceof1$1(left, right) {
|
|
25151
25537
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
25152
25538
|
return !!right[Symbol.hasInstance](left);
|
|
25153
|
-
} else
|
|
25154
|
-
return _instanceof(left, right);
|
|
25155
|
-
}
|
|
25539
|
+
} else return _instanceof(left, right);
|
|
25156
25540
|
}
|
|
25157
25541
|
var KHR_lights_punctual = /*#__PURE__*/ function(ExtensionParser) {
|
|
25158
25542
|
var KHR_lights_punctual = function KHR_lights_punctual() {
|
|
@@ -25465,11 +25849,11 @@ var GalaceanMaterialsRemap = /*#__PURE__*/ function(ExtensionParser) {
|
|
|
25465
25849
|
GalaceanMaterialsRemap = __decorate([
|
|
25466
25850
|
registerExtension("OASIS_materials_remap")
|
|
25467
25851
|
], GalaceanMaterialsRemap);
|
|
25468
|
-
function
|
|
25852
|
+
function _create_for_of_iterator_helper_loose(o, allowArrayLike) {
|
|
25469
25853
|
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
|
25470
25854
|
if (it) return (it = it.call(o)).next.bind(it);
|
|
25471
25855
|
// Fallback for engines without symbol support
|
|
25472
|
-
if (Array.isArray(o) || (it =
|
|
25856
|
+
if (Array.isArray(o) || (it = _unsupported_iterable_to_array(o)) || allowArrayLike && o && typeof o.length === "number") {
|
|
25473
25857
|
if (it) o = it;
|
|
25474
25858
|
var i = 0;
|
|
25475
25859
|
return function() {
|
|
@@ -25482,7 +25866,7 @@ function _createForOfIteratorHelperLoose(o, allowArrayLike) {
|
|
|
25482
25866
|
};
|
|
25483
25867
|
};
|
|
25484
25868
|
}
|
|
25485
|
-
throw new TypeError("Invalid attempt to iterate non-iterable instance
|
|
25869
|
+
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
25486
25870
|
}
|
|
25487
25871
|
var AnimationParser = /*#__PURE__*/ function(Parser) {
|
|
25488
25872
|
var AnimationParser = function AnimationParser() {
|
|
@@ -25774,7 +26158,9 @@ var EntityParser = /*#__PURE__*/ function(Parser) {
|
|
|
25774
26158
|
};
|
|
25775
26159
|
return EntityParser;
|
|
25776
26160
|
}(Parser);
|
|
25777
|
-
|
|
26161
|
+
(function() {
|
|
26162
|
+
/** @internal */ EntityParser._defaultName = "_GLTF_ENTITY_";
|
|
26163
|
+
})();
|
|
25778
26164
|
var MeshParser = /*#__PURE__*/ function(Parser1) {
|
|
25779
26165
|
var MeshParser = function MeshParser() {
|
|
25780
26166
|
return Parser1.apply(this, arguments);
|
|
@@ -25849,6 +26235,8 @@ var MeshParser = /*#__PURE__*/ function(Parser1) {
|
|
|
25849
26235
|
var vertexElements = new Array();
|
|
25850
26236
|
var vertexCount;
|
|
25851
26237
|
var bufferBindIndex = 0;
|
|
26238
|
+
var positions;
|
|
26239
|
+
keepMeshData && (positions = new Array(vertexCount));
|
|
25852
26240
|
for(var attribute in attributes){
|
|
25853
26241
|
var accessor = accessors[attributes[attribute]];
|
|
25854
26242
|
var accessorBuffer = GLTFUtil.getAccessorBuffer(context, gltf, accessor);
|
|
@@ -25890,16 +26278,24 @@ var MeshParser = /*#__PURE__*/ function(Parser1) {
|
|
|
25890
26278
|
if (accessor.min && accessor.max) {
|
|
25891
26279
|
min.copyFromArray(accessor.min);
|
|
25892
26280
|
max.copyFromArray(accessor.max);
|
|
26281
|
+
if (keepMeshData) {
|
|
26282
|
+
var stride1 = vertices.length / attributeCount;
|
|
26283
|
+
for(var j = 0; j < attributeCount; j++){
|
|
26284
|
+
var offset = j * stride1;
|
|
26285
|
+
positions[j] = new miniprogram$1$2.Vector3(vertices[offset], vertices[offset + 1], vertices[offset + 2]);
|
|
26286
|
+
}
|
|
26287
|
+
}
|
|
25893
26288
|
} else {
|
|
25894
26289
|
var position = MeshParser._tempVector3;
|
|
25895
26290
|
min.set(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE);
|
|
25896
26291
|
max.set(-Number.MAX_VALUE, -Number.MAX_VALUE, -Number.MAX_VALUE);
|
|
25897
|
-
var
|
|
25898
|
-
for(var
|
|
25899
|
-
var
|
|
25900
|
-
position.copyFromArray(vertices,
|
|
26292
|
+
var stride2 = vertices.length / attributeCount;
|
|
26293
|
+
for(var j1 = 0; j1 < attributeCount; j1++){
|
|
26294
|
+
var offset1 = j1 * stride2;
|
|
26295
|
+
position.copyFromArray(vertices, offset1);
|
|
25901
26296
|
miniprogram$1$2.Vector3.min(min, position, min);
|
|
25902
26297
|
miniprogram$1$2.Vector3.max(max, position, max);
|
|
26298
|
+
keepMeshData && (positions[j1] = position.clone());
|
|
25903
26299
|
}
|
|
25904
26300
|
}
|
|
25905
26301
|
if (accessor.normalized) {
|
|
@@ -25922,6 +26318,8 @@ var MeshParser = /*#__PURE__*/ function(Parser1) {
|
|
|
25922
26318
|
// BlendShapes
|
|
25923
26319
|
targets && this._createBlendShape(mesh, gltfMesh, targets, getBlendShapeData);
|
|
25924
26320
|
mesh.uploadData(!keepMeshData);
|
|
26321
|
+
//@ts-ignore
|
|
26322
|
+
mesh._positions = positions;
|
|
25925
26323
|
return Promise.resolve(mesh);
|
|
25926
26324
|
};
|
|
25927
26325
|
_proto._createBlendShape = function _createBlendShape(mesh, glTFMesh, glTFTargets, getBlendShapeData) {
|
|
@@ -26043,7 +26441,9 @@ var MeshParser = /*#__PURE__*/ function(Parser1) {
|
|
|
26043
26441
|
};
|
|
26044
26442
|
return MeshParser;
|
|
26045
26443
|
}(Parser);
|
|
26046
|
-
|
|
26444
|
+
(function() {
|
|
26445
|
+
MeshParser._tempVector3 = new miniprogram$1$2.Vector3();
|
|
26446
|
+
})();
|
|
26047
26447
|
var SceneParser$1 = /*#__PURE__*/ function(Parser1) {
|
|
26048
26448
|
var SceneParser = function SceneParser() {
|
|
26049
26449
|
return Parser1.apply(this, arguments);
|
|
@@ -26251,7 +26651,7 @@ var SkinParser = /*#__PURE__*/ function(Parser) {
|
|
|
26251
26651
|
};
|
|
26252
26652
|
_proto._findSkeletonRootBone = function _findSkeletonRootBone(joints, entities) {
|
|
26253
26653
|
var paths = {};
|
|
26254
|
-
for(var _iterator =
|
|
26654
|
+
for(var _iterator = _create_for_of_iterator_helper_loose(joints), _step; !(_step = _iterator()).done;){
|
|
26255
26655
|
var index = _step.value;
|
|
26256
26656
|
var path = new Array();
|
|
26257
26657
|
var entity = entities[index];
|
|
@@ -26352,8 +26752,10 @@ var TextureParser = /*#__PURE__*/ function(Parser) {
|
|
|
26352
26752
|
};
|
|
26353
26753
|
return TextureParser;
|
|
26354
26754
|
}(Parser);
|
|
26355
|
-
|
|
26356
|
-
|
|
26755
|
+
(function() {
|
|
26756
|
+
var _obj;
|
|
26757
|
+
TextureParser._wrapMap = (_obj = {}, _obj[TextureWrapMode.CLAMP_TO_EDGE] = miniprogram$5.TextureWrapMode.Clamp, _obj[TextureWrapMode.MIRRORED_REPEAT] = miniprogram$5.TextureWrapMode.Mirror, _obj[TextureWrapMode.REPEAT] = miniprogram$5.TextureWrapMode.Repeat, _obj);
|
|
26758
|
+
})();
|
|
26357
26759
|
var Validator = /*#__PURE__*/ function(Parser1) {
|
|
26358
26760
|
var Validator = function Validator() {
|
|
26359
26761
|
return Parser1.apply(this, arguments);
|
|
@@ -26423,17 +26825,19 @@ var GLTFParser = /*#__PURE__*/ function() {
|
|
|
26423
26825
|
};
|
|
26424
26826
|
return GLTFParser;
|
|
26425
26827
|
}();
|
|
26426
|
-
|
|
26427
|
-
|
|
26428
|
-
|
|
26429
|
-
|
|
26430
|
-
|
|
26431
|
-
|
|
26432
|
-
|
|
26433
|
-
|
|
26434
|
-
|
|
26435
|
-
|
|
26436
|
-
|
|
26828
|
+
(function() {
|
|
26829
|
+
GLTFParser.defaultPipeline = new GLTFParser([
|
|
26830
|
+
BufferParser,
|
|
26831
|
+
Validator,
|
|
26832
|
+
TextureParser,
|
|
26833
|
+
MaterialParser,
|
|
26834
|
+
MeshParser,
|
|
26835
|
+
EntityParser,
|
|
26836
|
+
SkinParser,
|
|
26837
|
+
AnimationParser,
|
|
26838
|
+
SceneParser$1
|
|
26839
|
+
]);
|
|
26840
|
+
})();
|
|
26437
26841
|
/**
|
|
26438
26842
|
* Product after GLTF parser, usually, `defaultSceneRoot` is only needed to use.
|
|
26439
26843
|
*/ var GLTFResource = /*#__PURE__*/ function(EngineObject) {
|
|
@@ -26483,7 +26887,7 @@ var GLTFLoader = /*#__PURE__*/ function(Loader) {
|
|
|
26483
26887
|
context.keepMeshData = (_item_params_keepMeshData = (_item_params = item.params) == null ? void 0 : _item_params.keepMeshData) != null ? _item_params_keepMeshData : false;
|
|
26484
26888
|
masterPromiseInfo.onCancel(function() {
|
|
26485
26889
|
var chainPromises = context.chainPromises;
|
|
26486
|
-
for(var _iterator =
|
|
26890
|
+
for(var _iterator = _create_for_of_iterator_helper_loose(chainPromises), _step; !(_step = _iterator()).done;){
|
|
26487
26891
|
var promise = _step.value;
|
|
26488
26892
|
promise.cancel();
|
|
26489
26893
|
}
|
|
@@ -26743,37 +27147,75 @@ var HDRLoader = (_HDRLoader = /*#__PURE__*/ function(Loader) {
|
|
|
26743
27147
|
color.a *= M;
|
|
26744
27148
|
};
|
|
26745
27149
|
return HDRLoader1;
|
|
26746
|
-
}(miniprogram$5.Loader),
|
|
26747
|
-
_HDRLoader._rightBottomBack,
|
|
26748
|
-
|
|
26749
|
-
_HDRLoader.
|
|
26750
|
-
|
|
26751
|
-
|
|
26752
|
-
|
|
26753
|
-
_HDRLoader.
|
|
26754
|
-
|
|
26755
|
-
_HDRLoader.
|
|
26756
|
-
|
|
26757
|
-
_HDRLoader._leftBottomFront,
|
|
26758
|
-
|
|
26759
|
-
_HDRLoader.
|
|
26760
|
-
|
|
26761
|
-
|
|
26762
|
-
|
|
26763
|
-
_HDRLoader.
|
|
26764
|
-
|
|
26765
|
-
|
|
26766
|
-
|
|
26767
|
-
|
|
26768
|
-
|
|
26769
|
-
|
|
26770
|
-
_HDRLoader.
|
|
26771
|
-
|
|
26772
|
-
|
|
26773
|
-
|
|
26774
|
-
|
|
26775
|
-
|
|
26776
|
-
|
|
27150
|
+
}(miniprogram$5.Loader), function() {
|
|
27151
|
+
_HDRLoader._rightBottomBack = new miniprogram$1$2.Vector3(1.0, -1.0, -1.0);
|
|
27152
|
+
}(), function() {
|
|
27153
|
+
_HDRLoader._rightBottomFront = new miniprogram$1$2.Vector3(1.0, -1.0, 1.0);
|
|
27154
|
+
}(), function() {
|
|
27155
|
+
_HDRLoader._rightUpBack = new miniprogram$1$2.Vector3(1.0, 1.0, -1.0);
|
|
27156
|
+
}(), function() {
|
|
27157
|
+
_HDRLoader._rightUpFront = new miniprogram$1$2.Vector3(1.0, 1.0, 1.0);
|
|
27158
|
+
}(), function() {
|
|
27159
|
+
_HDRLoader._leftBottomBack = new miniprogram$1$2.Vector3(-1.0, -1.0, -1.0);
|
|
27160
|
+
}(), function() {
|
|
27161
|
+
_HDRLoader._leftBottomFront = new miniprogram$1$2.Vector3(-1.0, -1.0, 1.0);
|
|
27162
|
+
}(), function() {
|
|
27163
|
+
_HDRLoader._leftUpBack = new miniprogram$1$2.Vector3(-1.0, 1.0, -1.0);
|
|
27164
|
+
}(), function() {
|
|
27165
|
+
_HDRLoader._leftUpFront = new miniprogram$1$2.Vector3(-1.0, 1.0, 1.0);
|
|
27166
|
+
}(), function() {
|
|
27167
|
+
_HDRLoader._faceRight = [
|
|
27168
|
+
_HDRLoader._rightBottomBack,
|
|
27169
|
+
_HDRLoader._rightBottomFront,
|
|
27170
|
+
_HDRLoader._rightUpBack,
|
|
27171
|
+
_HDRLoader._rightUpFront
|
|
27172
|
+
];
|
|
27173
|
+
}(), function() {
|
|
27174
|
+
_HDRLoader._faceLeft = [
|
|
27175
|
+
_HDRLoader._leftBottomFront,
|
|
27176
|
+
_HDRLoader._leftBottomBack,
|
|
27177
|
+
_HDRLoader._leftUpFront,
|
|
27178
|
+
_HDRLoader._leftUpBack
|
|
27179
|
+
];
|
|
27180
|
+
}(), function() {
|
|
27181
|
+
_HDRLoader._faceUp = [
|
|
27182
|
+
_HDRLoader._leftBottomFront,
|
|
27183
|
+
_HDRLoader._rightBottomFront,
|
|
27184
|
+
_HDRLoader._leftBottomBack,
|
|
27185
|
+
_HDRLoader._rightBottomBack
|
|
27186
|
+
];
|
|
27187
|
+
}(), function() {
|
|
27188
|
+
_HDRLoader._faceBottom = [
|
|
27189
|
+
_HDRLoader._leftUpBack,
|
|
27190
|
+
_HDRLoader._rightUpBack,
|
|
27191
|
+
_HDRLoader._leftUpFront,
|
|
27192
|
+
_HDRLoader._rightUpFront
|
|
27193
|
+
];
|
|
27194
|
+
}(), function() {
|
|
27195
|
+
_HDRLoader._faceFront = [
|
|
27196
|
+
_HDRLoader._leftBottomBack,
|
|
27197
|
+
_HDRLoader._rightBottomBack,
|
|
27198
|
+
_HDRLoader._leftUpBack,
|
|
27199
|
+
_HDRLoader._rightUpBack
|
|
27200
|
+
];
|
|
27201
|
+
}(), function() {
|
|
27202
|
+
_HDRLoader._faceBack = [
|
|
27203
|
+
_HDRLoader._rightBottomFront,
|
|
27204
|
+
_HDRLoader._leftBottomFront,
|
|
27205
|
+
_HDRLoader._rightUpFront,
|
|
27206
|
+
_HDRLoader._leftUpFront
|
|
27207
|
+
];
|
|
27208
|
+
}(), function() {
|
|
27209
|
+
_HDRLoader._tempVector3 = new miniprogram$1$2.Vector3();
|
|
27210
|
+
}(), function() {
|
|
27211
|
+
_HDRLoader._temp2Vector3 = new miniprogram$1$2.Vector3();
|
|
27212
|
+
}(), function() {
|
|
27213
|
+
_HDRLoader._temp3Vector3 = new miniprogram$1$2.Vector3();
|
|
27214
|
+
}(), function() {
|
|
27215
|
+
_HDRLoader._temp4Vector3 = new miniprogram$1$2.Vector3();
|
|
27216
|
+
}(), function() {
|
|
27217
|
+
_HDRLoader._temp5Vector3 = new miniprogram$1$2.Vector3();
|
|
27218
|
+
}(), _HDRLoader);
|
|
26777
27219
|
HDRLoader = __decorate([
|
|
26778
27220
|
miniprogram$5.resourceLoader(miniprogram$5.AssetType.HDR, [
|
|
26779
27221
|
"hdr"
|
|
@@ -27143,7 +27585,7 @@ function _defineProperties$1(target, props) {
|
|
|
27143
27585
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
27144
27586
|
}
|
|
27145
27587
|
}
|
|
27146
|
-
function
|
|
27588
|
+
function _create_class$1(Constructor, protoProps, staticProps) {
|
|
27147
27589
|
if (protoProps) _defineProperties$1(Constructor.prototype, protoProps);
|
|
27148
27590
|
if (staticProps) _defineProperties$1(Constructor, staticProps);
|
|
27149
27591
|
return Constructor;
|
|
@@ -27254,7 +27696,7 @@ var BufferReader = /*#__PURE__*/ function() {
|
|
|
27254
27696
|
if (byteLength < maxByteLength) this._offset++;
|
|
27255
27697
|
return new Uint8Array(this._dataView.buffer, this._dataView.byteOffset + byteOffset, byteLength);
|
|
27256
27698
|
};
|
|
27257
|
-
|
|
27699
|
+
_create_class$1(BufferReader, [
|
|
27258
27700
|
{
|
|
27259
27701
|
key: "offset",
|
|
27260
27702
|
get: function get() {
|
|
@@ -27264,12 +27706,14 @@ var BufferReader = /*#__PURE__*/ function() {
|
|
|
27264
27706
|
]);
|
|
27265
27707
|
return BufferReader;
|
|
27266
27708
|
}();
|
|
27267
|
-
|
|
27268
|
-
|
|
27269
|
-
|
|
27270
|
-
|
|
27271
|
-
|
|
27272
|
-
|
|
27709
|
+
(function() {
|
|
27710
|
+
BufferReader.imageMapping = {
|
|
27711
|
+
0: "image/png",
|
|
27712
|
+
1: "image/jpg",
|
|
27713
|
+
2: "image/webp",
|
|
27714
|
+
3: "ktx"
|
|
27715
|
+
};
|
|
27716
|
+
})();
|
|
27273
27717
|
var decoderMap = {};
|
|
27274
27718
|
/**
|
|
27275
27719
|
* Decoder decorator generator.
|
|
@@ -27306,7 +27750,7 @@ var FileHeader = /*#__PURE__*/ function() {
|
|
|
27306
27750
|
header.headerLength = nameUint8Array.byteLength + typeUint8Array.byteLength + 9;
|
|
27307
27751
|
return header;
|
|
27308
27752
|
};
|
|
27309
|
-
|
|
27753
|
+
_create_class$1(FileHeader, [
|
|
27310
27754
|
{
|
|
27311
27755
|
key: "dataLength",
|
|
27312
27756
|
get: function get() {
|
|
@@ -27522,36 +27966,32 @@ exports.Texture2DDecoder = /*#__PURE__*/ function() {
|
|
|
27522
27966
|
exports.Texture2DDecoder = __decorate([
|
|
27523
27967
|
decoder("Texture2D")
|
|
27524
27968
|
], exports.Texture2DDecoder);
|
|
27525
|
-
function
|
|
27969
|
+
function _is_native_reflect_construct() {
|
|
27526
27970
|
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
27527
27971
|
if (Reflect.construct.sham) return false;
|
|
27528
27972
|
if (typeof Proxy === "function") return true;
|
|
27529
27973
|
try {
|
|
27530
|
-
|
|
27974
|
+
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
27531
27975
|
return true;
|
|
27532
27976
|
} catch (e) {
|
|
27533
27977
|
return false;
|
|
27534
27978
|
}
|
|
27535
27979
|
}
|
|
27536
|
-
function
|
|
27537
|
-
if (
|
|
27538
|
-
|
|
27539
|
-
|
|
27540
|
-
construct = function construct(Parent, args, Class) {
|
|
27980
|
+
function _construct(Parent, args, Class) {
|
|
27981
|
+
if (_is_native_reflect_construct()) _construct = Reflect.construct;
|
|
27982
|
+
else {
|
|
27983
|
+
_construct = function construct(Parent, args, Class) {
|
|
27541
27984
|
var a = [
|
|
27542
27985
|
null
|
|
27543
27986
|
];
|
|
27544
27987
|
a.push.apply(a, args);
|
|
27545
27988
|
var Constructor = Function.bind.apply(Parent, a);
|
|
27546
27989
|
var instance = new Constructor();
|
|
27547
|
-
if (Class)
|
|
27990
|
+
if (Class) _set_prototype_of$1(instance, Class.prototype);
|
|
27548
27991
|
return instance;
|
|
27549
27992
|
};
|
|
27550
27993
|
}
|
|
27551
|
-
return
|
|
27552
|
-
}
|
|
27553
|
-
function _construct(Parent, args, Class) {
|
|
27554
|
-
return construct.apply(null, arguments);
|
|
27994
|
+
return _construct.apply(null, arguments);
|
|
27555
27995
|
}
|
|
27556
27996
|
var ReflectionParser = /*#__PURE__*/ function() {
|
|
27557
27997
|
var ReflectionParser = function ReflectionParser() {};
|
|
@@ -27665,7 +28105,9 @@ var ReflectionParser = /*#__PURE__*/ function() {
|
|
|
27665
28105
|
};
|
|
27666
28106
|
return ReflectionParser;
|
|
27667
28107
|
}();
|
|
27668
|
-
|
|
28108
|
+
(function() {
|
|
28109
|
+
ReflectionParser.customParseComponentHandles = new Map();
|
|
28110
|
+
})();
|
|
27669
28111
|
var PrefabParser = /*#__PURE__*/ function() {
|
|
27670
28112
|
var PrefabParser = function PrefabParser() {};
|
|
27671
28113
|
PrefabParser.parseChildren = function parseChildren(entitiesConfig, entities, parentId) {
|
|
@@ -27914,7 +28356,7 @@ var SceneParserContext = /*#__PURE__*/ function() {
|
|
|
27914
28356
|
};
|
|
27915
28357
|
_proto._organizeEntities = function _organizeEntities() {
|
|
27916
28358
|
var _this_context = this.context, entityConfigMap = _this_context.entityConfigMap, entityMap = _this_context.entityMap, scene = _this_context.scene, rootIds = _this_context.rootIds;
|
|
27917
|
-
for(var _iterator =
|
|
28359
|
+
for(var _iterator = _create_for_of_iterator_helper_loose(rootIds), _step; !(_step = _iterator()).done;){
|
|
27918
28360
|
var rootId = _step.value;
|
|
27919
28361
|
PrefabParser.parseChildren(entityConfigMap, entityMap, rootId);
|
|
27920
28362
|
}
|
|
@@ -28073,7 +28515,7 @@ var SourceFontLoader = /*#__PURE__*/ function(Loader) {
|
|
|
28073
28515
|
});
|
|
28074
28516
|
};
|
|
28075
28517
|
_proto._registerFont = function _registerFont(fontName, fontUrl) {
|
|
28076
|
-
return
|
|
28518
|
+
return _async_to_generator(function() {
|
|
28077
28519
|
var fontFace;
|
|
28078
28520
|
return __generator(this, function(_state) {
|
|
28079
28521
|
switch(_state.label){
|
|
@@ -28389,7 +28831,7 @@ SceneLoader = __decorate([
|
|
|
28389
28831
|
"prefab"
|
|
28390
28832
|
], true)
|
|
28391
28833
|
], SceneLoader);
|
|
28392
|
-
ReflectionParser.registerCustomParseComponent("TextRenderer", /*#__PURE__*/
|
|
28834
|
+
ReflectionParser.registerCustomParseComponent("TextRenderer", /*#__PURE__*/ _async_to_generator(function(instance, item, engine) {
|
|
28393
28835
|
var props;
|
|
28394
28836
|
return __generator(this, function(_state) {
|
|
28395
28837
|
props = item.props;
|
|
@@ -28455,7 +28897,7 @@ function _defineProperties(target, props) {
|
|
|
28455
28897
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
28456
28898
|
}
|
|
28457
28899
|
}
|
|
28458
|
-
function
|
|
28900
|
+
function _create_class(Constructor, protoProps, staticProps) {
|
|
28459
28901
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
28460
28902
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
28461
28903
|
return Constructor;
|
|
@@ -28505,9 +28947,15 @@ function _createClass(Constructor, protoProps, staticProps) {
|
|
|
28505
28947
|
};
|
|
28506
28948
|
return MathUtil;
|
|
28507
28949
|
}();
|
|
28508
|
-
|
|
28509
|
-
/** The
|
|
28510
|
-
|
|
28950
|
+
(function() {
|
|
28951
|
+
/** The value for which all absolute numbers smaller than are considered equal to zero. */ MathUtil.zeroTolerance = 1e-6;
|
|
28952
|
+
})();
|
|
28953
|
+
(function() {
|
|
28954
|
+
/** The conversion factor that radian to degree. */ MathUtil.radToDegreeFactor = 180 / Math.PI;
|
|
28955
|
+
})();
|
|
28956
|
+
(function() {
|
|
28957
|
+
/** The conversion factor that degree to radian. */ MathUtil.degreeToRadFactor = Math.PI / 180;
|
|
28958
|
+
})();
|
|
28511
28959
|
/**
|
|
28512
28960
|
* Describes a 3D-vector.
|
|
28513
28961
|
*/ var Vector3 = /*#__PURE__*/ function() {
|
|
@@ -28965,7 +29413,7 @@ function _createClass(Constructor, protoProps, staticProps) {
|
|
|
28965
29413
|
out._z = iz * qw - iw * qz - ix * qy + iy * qx;
|
|
28966
29414
|
out._onValueChanged && out._onValueChanged();
|
|
28967
29415
|
};
|
|
28968
|
-
|
|
29416
|
+
_create_class(Vector3, [
|
|
28969
29417
|
{
|
|
28970
29418
|
key: "x",
|
|
28971
29419
|
get: /**
|
|
@@ -29005,8 +29453,12 @@ function _createClass(Constructor, protoProps, staticProps) {
|
|
|
29005
29453
|
]);
|
|
29006
29454
|
return Vector3;
|
|
29007
29455
|
}();
|
|
29008
|
-
|
|
29009
|
-
/** @internal */ Vector3.
|
|
29456
|
+
(function() {
|
|
29457
|
+
/** @internal */ Vector3._zero = new Vector3(0.0, 0.0, 0.0);
|
|
29458
|
+
})();
|
|
29459
|
+
(function() {
|
|
29460
|
+
/** @internal */ Vector3._one = new Vector3(1.0, 1.0, 1.0);
|
|
29461
|
+
})();
|
|
29010
29462
|
/**
|
|
29011
29463
|
* A bounding sphere.
|
|
29012
29464
|
* */ var BoundingSphere = /*#__PURE__*/ function() {
|
|
@@ -29074,7 +29526,9 @@ function _createClass(Constructor, protoProps, staticProps) {
|
|
|
29074
29526
|
};
|
|
29075
29527
|
return BoundingSphere;
|
|
29076
29528
|
}();
|
|
29077
|
-
|
|
29529
|
+
(function() {
|
|
29530
|
+
BoundingSphere._tempVec30 = new Vector3();
|
|
29531
|
+
})();
|
|
29078
29532
|
/**
|
|
29079
29533
|
* Axis Aligned Bound Box (AABB).
|
|
29080
29534
|
*/ var BoundingBox = /*#__PURE__*/ function() {
|
|
@@ -29232,8 +29686,12 @@ BoundingSphere._tempVec30 = new Vector3();
|
|
|
29232
29686
|
};
|
|
29233
29687
|
return BoundingBox;
|
|
29234
29688
|
}();
|
|
29235
|
-
|
|
29236
|
-
BoundingBox.
|
|
29689
|
+
(function() {
|
|
29690
|
+
BoundingBox._tempVec30 = new Vector3();
|
|
29691
|
+
})();
|
|
29692
|
+
(function() {
|
|
29693
|
+
BoundingBox._tempVec31 = new Vector3();
|
|
29694
|
+
})();
|
|
29237
29695
|
/**
|
|
29238
29696
|
* Contains static methods to help in determining intersections, containment, etc.
|
|
29239
29697
|
*/ var CollisionUtil = /*#__PURE__*/ function() {
|
|
@@ -29581,9 +30039,15 @@ BoundingBox._tempVec31 = new Vector3();
|
|
|
29581
30039
|
};
|
|
29582
30040
|
return CollisionUtil;
|
|
29583
30041
|
}();
|
|
29584
|
-
|
|
29585
|
-
CollisionUtil.
|
|
29586
|
-
|
|
30042
|
+
(function() {
|
|
30043
|
+
CollisionUtil._tempVec30 = new Vector3();
|
|
30044
|
+
})();
|
|
30045
|
+
(function() {
|
|
30046
|
+
CollisionUtil._tempVec31 = new Vector3();
|
|
30047
|
+
})();
|
|
30048
|
+
(function() {
|
|
30049
|
+
CollisionUtil._tempVec32 = new Vector3();
|
|
30050
|
+
})();
|
|
29587
30051
|
/**
|
|
29588
30052
|
* Represents a plane in three-dimensional space.
|
|
29589
30053
|
*/ var Plane = /*#__PURE__*/ function() {
|
|
@@ -30903,7 +31367,7 @@ CollisionUtil._tempVec32 = new Vector3();
|
|
|
30903
31367
|
out._w = a._w * s;
|
|
30904
31368
|
out._onValueChanged && out._onValueChanged();
|
|
30905
31369
|
};
|
|
30906
|
-
|
|
31370
|
+
_create_class(Quaternion, [
|
|
30907
31371
|
{
|
|
30908
31372
|
key: "x",
|
|
30909
31373
|
get: /**
|
|
@@ -30963,8 +31427,12 @@ CollisionUtil._tempVec32 = new Vector3();
|
|
|
30963
31427
|
]);
|
|
30964
31428
|
return Quaternion;
|
|
30965
31429
|
}();
|
|
30966
|
-
|
|
30967
|
-
/** @internal */ Quaternion.
|
|
31430
|
+
(function() {
|
|
31431
|
+
/** @internal */ Quaternion._tempVector3 = new Vector3();
|
|
31432
|
+
})();
|
|
31433
|
+
(function() {
|
|
31434
|
+
/** @internal */ Quaternion._tempQuat1 = new Quaternion();
|
|
31435
|
+
})();
|
|
30968
31436
|
/**
|
|
30969
31437
|
* Represents a 4x4 mathematical matrix.
|
|
30970
31438
|
*/ var Matrix = /*#__PURE__*/ function() {
|
|
@@ -31909,11 +32377,21 @@ CollisionUtil._tempVec32 = new Vector3();
|
|
|
31909
32377
|
};
|
|
31910
32378
|
return Matrix;
|
|
31911
32379
|
}();
|
|
31912
|
-
|
|
31913
|
-
Matrix.
|
|
31914
|
-
|
|
31915
|
-
|
|
31916
|
-
|
|
32380
|
+
(function() {
|
|
32381
|
+
Matrix._tempVec30 = new Vector3();
|
|
32382
|
+
})();
|
|
32383
|
+
(function() {
|
|
32384
|
+
Matrix._tempVec31 = new Vector3();
|
|
32385
|
+
})();
|
|
32386
|
+
(function() {
|
|
32387
|
+
Matrix._tempVec32 = new Vector3();
|
|
32388
|
+
})();
|
|
32389
|
+
(function() {
|
|
32390
|
+
Matrix._tempMat30 = new Matrix3x3();
|
|
32391
|
+
})();
|
|
32392
|
+
(function() {
|
|
32393
|
+
/** @internal Identity matrix. */ Matrix._identity = new Matrix(1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0);
|
|
32394
|
+
})();
|
|
31917
32395
|
/**
|
|
31918
32396
|
* Represents a ray with an origin and a direction in 3D space.
|
|
31919
32397
|
*/ var Ray = /*#__PURE__*/ function() {
|
|
@@ -32247,7 +32725,7 @@ Matrix._tempMat30 = new Matrix3x3();
|
|
|
32247
32725
|
out._y = left._y * s;
|
|
32248
32726
|
out._onValueChanged && out._onValueChanged();
|
|
32249
32727
|
};
|
|
32250
|
-
|
|
32728
|
+
_create_class(Vector2, [
|
|
32251
32729
|
{
|
|
32252
32730
|
key: "x",
|
|
32253
32731
|
get: /**
|
|
@@ -32275,8 +32753,12 @@ Matrix._tempMat30 = new Matrix3x3();
|
|
|
32275
32753
|
]);
|
|
32276
32754
|
return Vector2;
|
|
32277
32755
|
}();
|
|
32278
|
-
|
|
32279
|
-
/** @internal */ Vector2.
|
|
32756
|
+
(function() {
|
|
32757
|
+
/** @internal */ Vector2._zero = new Vector2(0.0, 0.0);
|
|
32758
|
+
})();
|
|
32759
|
+
(function() {
|
|
32760
|
+
/** @internal */ Vector2._one = new Vector2(1.0, 1.0);
|
|
32761
|
+
})();
|
|
32280
32762
|
/**
|
|
32281
32763
|
* Describes a 4D-vector.
|
|
32282
32764
|
*/ var Vector4 = /*#__PURE__*/ function() {
|
|
@@ -32656,7 +33138,7 @@ Matrix._tempMat30 = new Matrix3x3();
|
|
|
32656
33138
|
out._w = w;
|
|
32657
33139
|
out._onValueChanged && out._onValueChanged();
|
|
32658
33140
|
};
|
|
32659
|
-
|
|
33141
|
+
_create_class(Vector4, [
|
|
32660
33142
|
{
|
|
32661
33143
|
key: "x",
|
|
32662
33144
|
get: /**
|
|
@@ -32708,8 +33190,12 @@ Matrix._tempMat30 = new Matrix3x3();
|
|
|
32708
33190
|
]);
|
|
32709
33191
|
return Vector4;
|
|
32710
33192
|
}();
|
|
32711
|
-
|
|
32712
|
-
/** @internal */ Vector4.
|
|
33193
|
+
(function() {
|
|
33194
|
+
/** @internal */ Vector4._zero = new Vector4(0.0, 0.0, 0.0, 0.0);
|
|
33195
|
+
})();
|
|
33196
|
+
(function() {
|
|
33197
|
+
/** @internal */ Vector4._one = new Vector4(1.0, 1.0, 1.0, 1.0);
|
|
33198
|
+
})();
|
|
32713
33199
|
/**
|
|
32714
33200
|
* Describes a color in the from of RGBA (in order: R, G, B, A).
|
|
32715
33201
|
*/ var Color = /*#__PURE__*/ function() {
|
|
@@ -32918,7 +33404,7 @@ Matrix._tempMat30 = new Matrix3x3();
|
|
|
32918
33404
|
out._onValueChanged && out._onValueChanged();
|
|
32919
33405
|
return out;
|
|
32920
33406
|
};
|
|
32921
|
-
|
|
33407
|
+
_create_class(Color, [
|
|
32922
33408
|
{
|
|
32923
33409
|
key: "r",
|
|
32924
33410
|
get: /**
|
|
@@ -33276,7 +33762,7 @@ function _defineProperties(target, props) {
|
|
|
33276
33762
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
33277
33763
|
}
|
|
33278
33764
|
}
|
|
33279
|
-
function
|
|
33765
|
+
function _create_class(Constructor, protoProps, staticProps) {
|
|
33280
33766
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
33281
33767
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
33282
33768
|
return Constructor;
|
|
@@ -33284,9 +33770,7 @@ function _createClass(Constructor, protoProps, staticProps) {
|
|
|
33284
33770
|
function _instanceof1(left, right) {
|
|
33285
33771
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
33286
33772
|
return !!right[Symbol.hasInstance](left);
|
|
33287
|
-
} else
|
|
33288
|
-
return _instanceof(left, right);
|
|
33289
|
-
}
|
|
33773
|
+
} else return _instanceof(left, right);
|
|
33290
33774
|
}
|
|
33291
33775
|
/**
|
|
33292
33776
|
* The canvas used on the web, which can support HTMLCanvasElement and OffscreenCanvas.
|
|
@@ -33319,7 +33803,7 @@ function _instanceof1(left, right) {
|
|
|
33319
33803
|
this._scale.set(x, y);
|
|
33320
33804
|
this.scale = this._scale;
|
|
33321
33805
|
};
|
|
33322
|
-
|
|
33806
|
+
_create_class(WebCanvas, [
|
|
33323
33807
|
{
|
|
33324
33808
|
key: "width",
|
|
33325
33809
|
get: /**
|
|
@@ -33371,15 +33855,12 @@ function _instanceof1(left, right) {
|
|
|
33371
33855
|
]);
|
|
33372
33856
|
return WebCanvas;
|
|
33373
33857
|
}();
|
|
33374
|
-
function
|
|
33375
|
-
|
|
33858
|
+
function _set_prototype_of(o, p) {
|
|
33859
|
+
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
33376
33860
|
o.__proto__ = p;
|
|
33377
33861
|
return o;
|
|
33378
33862
|
};
|
|
33379
|
-
return
|
|
33380
|
-
}
|
|
33381
|
-
function _setPrototypeOf(o, p) {
|
|
33382
|
-
return setPrototypeOf(o, p);
|
|
33863
|
+
return _set_prototype_of(o, p);
|
|
33383
33864
|
}
|
|
33384
33865
|
function _inherits(subClass, superClass) {
|
|
33385
33866
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
@@ -33392,24 +33873,17 @@ function _inherits(subClass, superClass) {
|
|
|
33392
33873
|
configurable: true
|
|
33393
33874
|
}
|
|
33394
33875
|
});
|
|
33395
|
-
if (superClass)
|
|
33876
|
+
if (superClass) _set_prototype_of(subClass, superClass);
|
|
33396
33877
|
}
|
|
33397
|
-
function
|
|
33398
|
-
|
|
33878
|
+
function _extends() {
|
|
33879
|
+
_extends = Object.assign || function assign(target) {
|
|
33399
33880
|
for(var i = 1; i < arguments.length; i++){
|
|
33400
33881
|
var source = arguments[i];
|
|
33401
|
-
for(var key in source)
|
|
33402
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
33403
|
-
target[key] = source[key];
|
|
33404
|
-
}
|
|
33405
|
-
}
|
|
33882
|
+
for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
|
|
33406
33883
|
}
|
|
33407
33884
|
return target;
|
|
33408
33885
|
};
|
|
33409
|
-
return
|
|
33410
|
-
}
|
|
33411
|
-
function _extends() {
|
|
33412
|
-
return extends_.apply(this, arguments);
|
|
33886
|
+
return _extends.apply(this, arguments);
|
|
33413
33887
|
}
|
|
33414
33888
|
/**
|
|
33415
33889
|
* GL capability.
|
|
@@ -33542,7 +34016,7 @@ function _extends() {
|
|
|
33542
34016
|
TEXTURE_MAX_ANISOTROPY_EXT: "TEXTURE_MAX_ANISOTROPY_EXT"
|
|
33543
34017
|
});
|
|
33544
34018
|
};
|
|
33545
|
-
|
|
34019
|
+
_create_class(GLCapability, [
|
|
33546
34020
|
{
|
|
33547
34021
|
key: "maxTextureSize",
|
|
33548
34022
|
get: function get() {
|
|
@@ -34292,7 +34766,7 @@ function _extends() {
|
|
|
34292
34766
|
}
|
|
34293
34767
|
return true;
|
|
34294
34768
|
};
|
|
34295
|
-
|
|
34769
|
+
_create_class(GLTexture, [
|
|
34296
34770
|
{
|
|
34297
34771
|
key: "wrapModeU",
|
|
34298
34772
|
set: /**
|
|
@@ -35030,7 +35504,7 @@ exports.WebGLMode = void 0;
|
|
|
35030
35504
|
this._gl.flush();
|
|
35031
35505
|
};
|
|
35032
35506
|
_proto.destroy = function destroy() {};
|
|
35033
|
-
|
|
35507
|
+
_create_class(WebGLRenderer, [
|
|
35034
35508
|
{
|
|
35035
35509
|
key: "isWebGL2",
|
|
35036
35510
|
get: function get() {
|
|
@@ -35082,7 +35556,7 @@ exports.WebGLMode = void 0;
|
|
|
35082
35556
|
return Engine.call(this, webCanvas, hardwareRenderer);
|
|
35083
35557
|
};
|
|
35084
35558
|
_inherits(WebGLEngine, Engine);
|
|
35085
|
-
|
|
35559
|
+
_create_class(WebGLEngine, [
|
|
35086
35560
|
{
|
|
35087
35561
|
key: "canvas",
|
|
35088
35562
|
get: /**
|
|
@@ -35137,7 +35611,7 @@ function _interopNamespace(e) {
|
|
|
35137
35611
|
}
|
|
35138
35612
|
var CoreObjects__namespace = /*#__PURE__*/ _interopNamespace(CoreObjects);
|
|
35139
35613
|
//@ts-ignore
|
|
35140
|
-
var version = "0.9.0
|
|
35614
|
+
var version = "0.9.0";
|
|
35141
35615
|
console.log("Galacean engine version: " + version);
|
|
35142
35616
|
for(var key in CoreObjects__namespace){
|
|
35143
35617
|
CoreObjects.Loader.registerClass(key, CoreObjects__namespace[key]);
|
|
@@ -35305,8 +35779,12 @@ Object.keys(miniprogram$2).forEach(function(k) {
|
|
|
35305
35779
|
};
|
|
35306
35780
|
return LiteColliderShape;
|
|
35307
35781
|
}();
|
|
35308
|
-
|
|
35309
|
-
LiteColliderShape.
|
|
35782
|
+
(function() {
|
|
35783
|
+
LiteColliderShape._ray = new miniprogram_1.Ray();
|
|
35784
|
+
})();
|
|
35785
|
+
(function() {
|
|
35786
|
+
LiteColliderShape._tempPoint = new miniprogram_1.Vector3();
|
|
35787
|
+
})();
|
|
35310
35788
|
|
|
35311
35789
|
/**
|
|
35312
35790
|
* Used to implement transformation related functions.
|
|
@@ -35449,7 +35927,7 @@ LiteColliderShape._tempPoint = new miniprogram_1.Vector3();
|
|
|
35449
35927
|
this._dirtyFlag |= type;
|
|
35450
35928
|
this._updateFlagManager.distribute();
|
|
35451
35929
|
};
|
|
35452
|
-
|
|
35930
|
+
_create_class$3(LiteTransform, [
|
|
35453
35931
|
{
|
|
35454
35932
|
key: "owner",
|
|
35455
35933
|
set: function set(value) {
|
|
@@ -35598,8 +36076,12 @@ LiteColliderShape._tempPoint = new miniprogram_1.Vector3();
|
|
|
35598
36076
|
]);
|
|
35599
36077
|
return LiteTransform;
|
|
35600
36078
|
}();
|
|
35601
|
-
|
|
35602
|
-
LiteTransform.
|
|
36079
|
+
(function() {
|
|
36080
|
+
LiteTransform._tempQuat0 = new miniprogram_1.Quaternion();
|
|
36081
|
+
})();
|
|
36082
|
+
(function() {
|
|
36083
|
+
LiteTransform._tempMat42 = new miniprogram_1.Matrix();
|
|
36084
|
+
})();
|
|
35603
36085
|
var /**
|
|
35604
36086
|
* Dirty flag of transform.
|
|
35605
36087
|
*/ TransformFlag;
|
|
@@ -35904,7 +36386,9 @@ var /**
|
|
|
35904
36386
|
};
|
|
35905
36387
|
return LiteBoxColliderShape;
|
|
35906
36388
|
}(LiteColliderShape);
|
|
35907
|
-
|
|
36389
|
+
(function() {
|
|
36390
|
+
LiteBoxColliderShape._tempBox = new miniprogram_1.BoundingBox();
|
|
36391
|
+
})();
|
|
35908
36392
|
|
|
35909
36393
|
/**
|
|
35910
36394
|
* Sphere collider shape in Lite.
|
|
@@ -35944,7 +36428,7 @@ LiteBoxColliderShape._tempBox = new miniprogram_1.BoundingBox();
|
|
|
35944
36428
|
return false;
|
|
35945
36429
|
}
|
|
35946
36430
|
};
|
|
35947
|
-
|
|
36431
|
+
_create_class$3(LiteSphereColliderShape, [
|
|
35948
36432
|
{
|
|
35949
36433
|
key: "worldRadius",
|
|
35950
36434
|
get: function get() {
|
|
@@ -35954,7 +36438,9 @@ LiteBoxColliderShape._tempBox = new miniprogram_1.BoundingBox();
|
|
|
35954
36438
|
]);
|
|
35955
36439
|
return LiteSphereColliderShape;
|
|
35956
36440
|
}(LiteColliderShape);
|
|
35957
|
-
|
|
36441
|
+
(function() {
|
|
36442
|
+
LiteSphereColliderShape._tempSphere = new miniprogram_1.BoundingSphere();
|
|
36443
|
+
})();
|
|
35958
36444
|
|
|
35959
36445
|
/**
|
|
35960
36446
|
* A manager is a collection of colliders and constraints which can interact.
|
|
@@ -36206,10 +36692,18 @@ LiteSphereColliderShape._tempSphere = new miniprogram_1.BoundingSphere();
|
|
|
36206
36692
|
};
|
|
36207
36693
|
return LitePhysicsManager;
|
|
36208
36694
|
}();
|
|
36209
|
-
|
|
36210
|
-
LitePhysicsManager.
|
|
36211
|
-
|
|
36212
|
-
|
|
36695
|
+
(function() {
|
|
36696
|
+
LitePhysicsManager._tempSphere = new miniprogram_1.BoundingSphere();
|
|
36697
|
+
})();
|
|
36698
|
+
(function() {
|
|
36699
|
+
LitePhysicsManager._tempBox = new miniprogram_1.BoundingBox();
|
|
36700
|
+
})();
|
|
36701
|
+
(function() {
|
|
36702
|
+
LitePhysicsManager._currentHit = new LiteHitResult();
|
|
36703
|
+
})();
|
|
36704
|
+
(function() {
|
|
36705
|
+
LitePhysicsManager._hitResult = new LiteHitResult();
|
|
36706
|
+
})();
|
|
36213
36707
|
var /**
|
|
36214
36708
|
* Physics state
|
|
36215
36709
|
*/ TriggerEventState;
|