@galacean/engine-physics-lite 0.9.0-beta.82 → 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 +1328 -981
- 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,22 +7488,15 @@ 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
|
|
@@ -8240,7 +8275,7 @@ var ShaderFactory = /*#__PURE__*/ function() {
|
|
|
8240
8275
|
return prefix + line;
|
|
8241
8276
|
}).join("\n");
|
|
8242
8277
|
};
|
|
8243
|
-
|
|
8278
|
+
_create_class$2(ShaderProgram, [
|
|
8244
8279
|
{
|
|
8245
8280
|
key: "isValid",
|
|
8246
8281
|
get: /**
|
|
@@ -8252,7 +8287,9 @@ var ShaderFactory = /*#__PURE__*/ function() {
|
|
|
8252
8287
|
]);
|
|
8253
8288
|
return ShaderProgram;
|
|
8254
8289
|
}();
|
|
8255
|
-
|
|
8290
|
+
(function() {
|
|
8291
|
+
ShaderProgram._counter = 0;
|
|
8292
|
+
})();
|
|
8256
8293
|
/**
|
|
8257
8294
|
* Shader pass containing vertex and fragment source.
|
|
8258
8295
|
*/ var ShaderPass = /*#__PURE__*/ function() {
|
|
@@ -8296,7 +8333,9 @@ ShaderProgram._counter = 0;
|
|
|
8296
8333
|
};
|
|
8297
8334
|
return ShaderPass;
|
|
8298
8335
|
}();
|
|
8299
|
-
|
|
8336
|
+
(function() {
|
|
8337
|
+
ShaderPass._shaderPassCounter = 0;
|
|
8338
|
+
})();
|
|
8300
8339
|
/**
|
|
8301
8340
|
* Shader property.
|
|
8302
8341
|
*/ var ShaderProperty = /*#__PURE__*/ function() {
|
|
@@ -8304,7 +8343,7 @@ ShaderPass._shaderPassCounter = 0;
|
|
|
8304
8343
|
this.name = name;
|
|
8305
8344
|
this._uniqueId = ShaderProperty._propertyNameCounter++;
|
|
8306
8345
|
}
|
|
8307
|
-
|
|
8346
|
+
_create_class$2(ShaderProperty, [
|
|
8308
8347
|
{
|
|
8309
8348
|
key: "type",
|
|
8310
8349
|
get: /**
|
|
@@ -8316,7 +8355,9 @@ ShaderPass._shaderPassCounter = 0;
|
|
|
8316
8355
|
]);
|
|
8317
8356
|
return ShaderProperty;
|
|
8318
8357
|
}();
|
|
8319
|
-
|
|
8358
|
+
(function() {
|
|
8359
|
+
ShaderProperty._propertyNameCounter = 0;
|
|
8360
|
+
})();
|
|
8320
8361
|
/**
|
|
8321
8362
|
* Shader for rendering.
|
|
8322
8363
|
*/ var Shader = /*#__PURE__*/ function() {
|
|
@@ -8428,7 +8469,7 @@ ShaderProperty._propertyNameCounter = 0;
|
|
|
8428
8469
|
}
|
|
8429
8470
|
}
|
|
8430
8471
|
};
|
|
8431
|
-
|
|
8472
|
+
_create_class$2(Shader, [
|
|
8432
8473
|
{
|
|
8433
8474
|
key: "passes",
|
|
8434
8475
|
get: /**
|
|
@@ -8440,18 +8481,34 @@ ShaderProperty._propertyNameCounter = 0;
|
|
|
8440
8481
|
]);
|
|
8441
8482
|
return Shader;
|
|
8442
8483
|
}();
|
|
8443
|
-
|
|
8444
|
-
/** @internal */ Shader.
|
|
8445
|
-
|
|
8446
|
-
|
|
8447
|
-
|
|
8448
|
-
|
|
8449
|
-
|
|
8450
|
-
|
|
8451
|
-
|
|
8452
|
-
|
|
8453
|
-
|
|
8454
|
-
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
|
+
})();
|
|
8455
8512
|
/**
|
|
8456
8513
|
* Shader data collection,Correspondence includes shader properties data and macros data.
|
|
8457
8514
|
*/ var ShaderData = /*#__PURE__*/ function() {
|
|
@@ -8706,9 +8763,9 @@ Shader._macroMap = Object.create(null);
|
|
|
8706
8763
|
/** Shadow mapping normal-based bias. */ _this.shadowNormalBias = 1;
|
|
8707
8764
|
/** Near plane value to use for shadow frustums. */ _this.shadowNearPlane = 0.1;
|
|
8708
8765
|
/** Shadow intensity, the larger the value, the clearer and darker the shadow. */ _this.shadowStrength = 1.0;
|
|
8766
|
+
/** @internal */ _this._lightIndex = -1;
|
|
8709
8767
|
_this._color = new miniprogram$7.Color(1, 1, 1, 1);
|
|
8710
8768
|
_this._lightColor = new miniprogram$7.Color();
|
|
8711
|
-
/** @internal */ _this._lightIndex = -1;
|
|
8712
8769
|
return _this;
|
|
8713
8770
|
};
|
|
8714
8771
|
_inherits$2(Light, Component);
|
|
@@ -8720,7 +8777,7 @@ Shader._macroMap = Object.create(null);
|
|
|
8720
8777
|
this._lightColor.a = this.color.a * this.intensity;
|
|
8721
8778
|
return this._lightColor;
|
|
8722
8779
|
};
|
|
8723
|
-
|
|
8780
|
+
_create_class$2(Light, [
|
|
8724
8781
|
{
|
|
8725
8782
|
key: "color",
|
|
8726
8783
|
get: /**
|
|
@@ -8757,9 +8814,11 @@ Shader._macroMap = Object.create(null);
|
|
|
8757
8814
|
]);
|
|
8758
8815
|
return Light;
|
|
8759
8816
|
}(Component);
|
|
8760
|
-
|
|
8817
|
+
(function() {
|
|
8818
|
+
/**
|
|
8761
8819
|
* Each type of light source is at most 10, beyond which it will not take effect.
|
|
8762
8820
|
* */ Light._maxLight = 10;
|
|
8821
|
+
})();
|
|
8763
8822
|
__decorate$1([
|
|
8764
8823
|
ignoreClone
|
|
8765
8824
|
], Light.prototype, "_lightIndex", void 0);
|
|
@@ -8816,7 +8875,7 @@ __decorate$1([
|
|
|
8816
8875
|
shaderData.setFloatArray(DirectLight._colorProperty, data.color);
|
|
8817
8876
|
shaderData.setFloatArray(DirectLight._directionProperty, data.direction);
|
|
8818
8877
|
};
|
|
8819
|
-
|
|
8878
|
+
_create_class$2(DirectLight, [
|
|
8820
8879
|
{
|
|
8821
8880
|
key: "direction",
|
|
8822
8881
|
get: /**
|
|
@@ -8847,14 +8906,22 @@ __decorate$1([
|
|
|
8847
8906
|
]);
|
|
8848
8907
|
return DirectLight;
|
|
8849
8908
|
}(Light);
|
|
8850
|
-
|
|
8851
|
-
DirectLight.
|
|
8852
|
-
|
|
8853
|
-
|
|
8854
|
-
|
|
8855
|
-
|
|
8856
|
-
|
|
8857
|
-
|
|
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
|
+
})();
|
|
8858
8925
|
/**
|
|
8859
8926
|
* Point light.
|
|
8860
8927
|
*/ var PointLight = /*#__PURE__*/ function(Light) {
|
|
@@ -8910,7 +8977,7 @@ DirectLight._combinedData = {
|
|
|
8910
8977
|
shaderData.setFloatArray(PointLight._positionProperty, data.position);
|
|
8911
8978
|
shaderData.setFloatArray(PointLight._distanceProperty, data.distance);
|
|
8912
8979
|
};
|
|
8913
|
-
|
|
8980
|
+
_create_class$2(PointLight, [
|
|
8914
8981
|
{
|
|
8915
8982
|
key: "position",
|
|
8916
8983
|
get: /**
|
|
@@ -8931,16 +8998,26 @@ DirectLight._combinedData = {
|
|
|
8931
8998
|
]);
|
|
8932
8999
|
return PointLight;
|
|
8933
9000
|
}(Light);
|
|
8934
|
-
|
|
8935
|
-
PointLight.
|
|
8936
|
-
|
|
8937
|
-
|
|
8938
|
-
PointLight.
|
|
8939
|
-
|
|
8940
|
-
|
|
8941
|
-
|
|
8942
|
-
|
|
8943
|
-
|
|
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
|
+
})();
|
|
8944
9021
|
/**
|
|
8945
9022
|
* Spot light.
|
|
8946
9023
|
*/ var SpotLight = /*#__PURE__*/ function(Light) {
|
|
@@ -9013,7 +9090,7 @@ PointLight._combinedData = {
|
|
|
9013
9090
|
shaderData.setFloatArray(SpotLight._angleCosProperty, data.angleCos);
|
|
9014
9091
|
shaderData.setFloatArray(SpotLight._penumbraCosProperty, data.penumbraCos);
|
|
9015
9092
|
};
|
|
9016
|
-
|
|
9093
|
+
_create_class$2(SpotLight, [
|
|
9017
9094
|
{
|
|
9018
9095
|
key: "position",
|
|
9019
9096
|
get: /**
|
|
@@ -9055,22 +9132,38 @@ PointLight._combinedData = {
|
|
|
9055
9132
|
]);
|
|
9056
9133
|
return SpotLight;
|
|
9057
9134
|
}(Light);
|
|
9058
|
-
|
|
9059
|
-
SpotLight.
|
|
9060
|
-
|
|
9061
|
-
|
|
9062
|
-
SpotLight.
|
|
9063
|
-
|
|
9064
|
-
|
|
9065
|
-
SpotLight.
|
|
9066
|
-
|
|
9067
|
-
|
|
9068
|
-
|
|
9069
|
-
|
|
9070
|
-
|
|
9071
|
-
|
|
9072
|
-
|
|
9073
|
-
|
|
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
|
+
})();
|
|
9074
9167
|
/**
|
|
9075
9168
|
* Light manager.
|
|
9076
9169
|
*/ var LightManager = /*#__PURE__*/ function() {
|
|
@@ -9623,7 +9716,7 @@ SpotLight._combinedData = {
|
|
|
9623
9716
|
/**
|
|
9624
9717
|
* @override
|
|
9625
9718
|
*/ _proto._onDestroy = function _onDestroy() {};
|
|
9626
|
-
|
|
9719
|
+
_create_class$2(Material, [
|
|
9627
9720
|
{
|
|
9628
9721
|
key: "shader",
|
|
9629
9722
|
get: /**
|
|
@@ -9727,9 +9820,15 @@ var RenderElement = function RenderElement() {};
|
|
|
9727
9820
|
};
|
|
9728
9821
|
return RenderContext;
|
|
9729
9822
|
}();
|
|
9730
|
-
|
|
9731
|
-
RenderContext.
|
|
9732
|
-
|
|
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
|
+
})();
|
|
9733
9832
|
var SpriteElement = /*#__PURE__*/ function(RenderElement) {
|
|
9734
9833
|
var SpriteElement = function SpriteElement() {
|
|
9735
9834
|
var _this;
|
|
@@ -9779,7 +9878,6 @@ exports.Renderer = (_Renderer = /*#__PURE__*/ function(Component) {
|
|
|
9779
9878
|
var Renderer1 = function Renderer1(entity) {
|
|
9780
9879
|
var _this;
|
|
9781
9880
|
_this = Component.call(this, entity) || this;
|
|
9782
|
-
/** Whether cast shadow. */ _this.castShadows = true;
|
|
9783
9881
|
/** ShaderData related to renderer. */ _this.shaderData = new ShaderData(ShaderDataGroup.Renderer);
|
|
9784
9882
|
/** @internal */ _this._onUpdateIndex = -1;
|
|
9785
9883
|
/** @internal */ _this._rendererIndex = -1;
|
|
@@ -9796,11 +9894,12 @@ exports.Renderer = (_Renderer = /*#__PURE__*/ function(Component) {
|
|
|
9796
9894
|
_this._priority = 0;
|
|
9797
9895
|
_this._receiveShadows = true;
|
|
9798
9896
|
_this._rendererLayer = new miniprogram$7.Vector4();
|
|
9897
|
+
/** Whether cast shadow. */ _this.castShadows = true;
|
|
9799
9898
|
var prototype = exports.Renderer.prototype;
|
|
9800
9899
|
var shaderData = _this.shaderData;
|
|
9801
9900
|
_this._overrideUpdate = _this.update !== prototype.update;
|
|
9802
9901
|
shaderData._addRefCount(1);
|
|
9803
|
-
_this._onTransformChanged = _this._onTransformChanged.bind(
|
|
9902
|
+
_this._onTransformChanged = _this._onTransformChanged.bind(_assert_this_initialized(_this));
|
|
9804
9903
|
_this._registerEntityTransformListener();
|
|
9805
9904
|
shaderData.enableMacro(exports.Renderer._receiveShadowMacro);
|
|
9806
9905
|
shaderData.setVector4(exports.Renderer._rendererLayerProperty, _this._rendererLayer);
|
|
@@ -9986,7 +10085,7 @@ exports.Renderer = (_Renderer = /*#__PURE__*/ function(Component) {
|
|
|
9986
10085
|
_proto._onTransformChanged = function _onTransformChanged(type) {
|
|
9987
10086
|
this._dirtyUpdateFlag |= 0x1;
|
|
9988
10087
|
};
|
|
9989
|
-
|
|
10088
|
+
_create_class$2(Renderer1, [
|
|
9990
10089
|
{
|
|
9991
10090
|
key: "isCulled",
|
|
9992
10091
|
get: /**
|
|
@@ -10052,7 +10151,25 @@ exports.Renderer = (_Renderer = /*#__PURE__*/ function(Component) {
|
|
|
10052
10151
|
}
|
|
10053
10152
|
]);
|
|
10054
10153
|
return Renderer1;
|
|
10055
|
-
}(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);
|
|
10056
10173
|
__decorate$1([
|
|
10057
10174
|
deepClone
|
|
10058
10175
|
], exports.Renderer.prototype, "shaderData", void 0);
|
|
@@ -10179,14 +10296,18 @@ var SimpleSpriteAssembler = (_SimpleSpriteAssembler = /*#__PURE__*/ function() {
|
|
|
10179
10296
|
renderUVs[3].set(right, top);
|
|
10180
10297
|
};
|
|
10181
10298
|
return SimpleSpriteAssembler1;
|
|
10182
|
-
}(),
|
|
10183
|
-
|
|
10184
|
-
|
|
10185
|
-
|
|
10186
|
-
|
|
10187
|
-
|
|
10188
|
-
|
|
10189
|
-
|
|
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);
|
|
10190
10311
|
SimpleSpriteAssembler = __decorate$1([
|
|
10191
10312
|
StaticInterfaceImplement$1()
|
|
10192
10313
|
], SimpleSpriteAssembler);
|
|
@@ -10267,10 +10388,10 @@ SimpleSpriteAssembler = __decorate$1([
|
|
|
10267
10388
|
_this._flipY = false;
|
|
10268
10389
|
_this._alphaCutoff = 0.5;
|
|
10269
10390
|
_this._renderData = new RenderData2D(4, [], []);
|
|
10270
|
-
SimpleSpriteAssembler.resetData(
|
|
10391
|
+
SimpleSpriteAssembler.resetData(_assert_this_initialized(_this));
|
|
10271
10392
|
_this.setMaterial(_this._engine._spriteMaskDefaultMaterial);
|
|
10272
10393
|
_this.shaderData.setFloat(SpriteMask._alphaCutoffProperty, _this._alphaCutoff);
|
|
10273
|
-
_this._onSpriteChange = _this._onSpriteChange.bind(
|
|
10394
|
+
_this._onSpriteChange = _this._onSpriteChange.bind(_assert_this_initialized(_this));
|
|
10274
10395
|
return _this;
|
|
10275
10396
|
}
|
|
10276
10397
|
var _proto = SpriteMask.prototype;
|
|
@@ -10338,7 +10459,7 @@ SimpleSpriteAssembler = __decorate$1([
|
|
|
10338
10459
|
break;
|
|
10339
10460
|
}
|
|
10340
10461
|
};
|
|
10341
|
-
|
|
10462
|
+
_create_class$2(SpriteMask, [
|
|
10342
10463
|
{
|
|
10343
10464
|
key: "width",
|
|
10344
10465
|
get: /**
|
|
@@ -10440,8 +10561,12 @@ SimpleSpriteAssembler = __decorate$1([
|
|
|
10440
10561
|
]);
|
|
10441
10562
|
return SpriteMask;
|
|
10442
10563
|
}(exports.Renderer);
|
|
10443
|
-
|
|
10444
|
-
/** @internal */ SpriteMask.
|
|
10564
|
+
(function() {
|
|
10565
|
+
/** @internal */ SpriteMask._textureProperty = Shader.getPropertyByName("u_maskTexture");
|
|
10566
|
+
})();
|
|
10567
|
+
(function() {
|
|
10568
|
+
/** @internal */ SpriteMask._alphaCutoffProperty = Shader.getPropertyByName("u_maskAlphaCutoff");
|
|
10569
|
+
})();
|
|
10445
10570
|
__decorate$1([
|
|
10446
10571
|
assignmentClone
|
|
10447
10572
|
], SpriteMask.prototype, "influenceLayers", void 0);
|
|
@@ -10642,7 +10767,7 @@ var BufferUtil = /*#__PURE__*/ function() {
|
|
|
10642
10767
|
this._glElementInfo = BufferUtil._getElementInfo(this.format);
|
|
10643
10768
|
this._instanceStepRate = Math.floor(instanceStepRate);
|
|
10644
10769
|
};
|
|
10645
|
-
|
|
10770
|
+
_create_class$2(VertexElement, [
|
|
10646
10771
|
{
|
|
10647
10772
|
key: "semantic",
|
|
10648
10773
|
get: /**
|
|
@@ -10799,7 +10924,7 @@ var BufferUtil = /*#__PURE__*/ function() {
|
|
|
10799
10924
|
gl.bufferData(this._glBindTarget, dataLength, this._glBufferUsage);
|
|
10800
10925
|
this._byteLength = dataLength;
|
|
10801
10926
|
};
|
|
10802
|
-
|
|
10927
|
+
_create_class$2(Buffer, [
|
|
10803
10928
|
{
|
|
10804
10929
|
key: "type",
|
|
10805
10930
|
get: /**
|
|
@@ -10846,7 +10971,7 @@ var BufferUtil = /*#__PURE__*/ function() {
|
|
|
10846
10971
|
this._buffer = buffer;
|
|
10847
10972
|
this._format = format;
|
|
10848
10973
|
};
|
|
10849
|
-
|
|
10974
|
+
_create_class$2(IndexBufferBinding, [
|
|
10850
10975
|
{
|
|
10851
10976
|
key: "buffer",
|
|
10852
10977
|
get: /**
|
|
@@ -10892,8 +11017,8 @@ var BufferUtil = /*#__PURE__*/ function() {
|
|
|
10892
11017
|
_this._bounds = new miniprogram$7.BoundingBox();
|
|
10893
11018
|
_this._subMeshes = [];
|
|
10894
11019
|
_this.name = name;
|
|
10895
|
-
_this._platformPrimitive = _this._engine._hardwareRenderer.createPlatformPrimitive(
|
|
10896
|
-
_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));
|
|
10897
11022
|
var bounds = _this._bounds;
|
|
10898
11023
|
// @ts-ignore
|
|
10899
11024
|
bounds.min._onValueChanged = _this._onBoundsChanged;
|
|
@@ -11011,7 +11136,7 @@ var BufferUtil = /*#__PURE__*/ function() {
|
|
|
11011
11136
|
_proto._onBoundsChanged = function _onBoundsChanged() {
|
|
11012
11137
|
this._updateFlagManager.dispatch(0x1);
|
|
11013
11138
|
};
|
|
11014
|
-
|
|
11139
|
+
_create_class$2(Mesh, [
|
|
11015
11140
|
{
|
|
11016
11141
|
key: "bounds",
|
|
11017
11142
|
get: /**
|
|
@@ -11056,7 +11181,7 @@ var MeshModifyFlags;
|
|
|
11056
11181
|
this._buffer = buffer;
|
|
11057
11182
|
this._stride = stride;
|
|
11058
11183
|
};
|
|
11059
|
-
|
|
11184
|
+
_create_class$2(VertexBufferBinding, [
|
|
11060
11185
|
{
|
|
11061
11186
|
key: "buffer",
|
|
11062
11187
|
get: /**
|
|
@@ -11501,13 +11626,27 @@ var MeshModifyFlags;
|
|
|
11501
11626
|
};
|
|
11502
11627
|
return BlendShapeManager;
|
|
11503
11628
|
}();
|
|
11504
|
-
|
|
11505
|
-
BlendShapeManager.
|
|
11506
|
-
|
|
11507
|
-
|
|
11508
|
-
BlendShapeManager.
|
|
11509
|
-
|
|
11510
|
-
|
|
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
|
+
})();
|
|
11511
11650
|
/**
|
|
11512
11651
|
* Vertex attribute types of a vertex in a ModelMesh.
|
|
11513
11652
|
*/ var VertexAttribute;
|
|
@@ -11561,7 +11700,7 @@ BlendShapeManager._blendShapeTextureInfoProperty = Shader.getPropertyByName("u_b
|
|
|
11561
11700
|
_this._customVertexElements = [];
|
|
11562
11701
|
_this._vertexCountChanged = false;
|
|
11563
11702
|
_this.name = name;
|
|
11564
|
-
_this._blendShapeManager = new BlendShapeManager(engine,
|
|
11703
|
+
_this._blendShapeManager = new BlendShapeManager(engine, _assert_this_initialized(_this));
|
|
11565
11704
|
return _this;
|
|
11566
11705
|
};
|
|
11567
11706
|
_inherits$2(ModelMesh, Mesh);
|
|
@@ -12512,7 +12651,7 @@ BlendShapeManager._blendShapeTextureInfoProperty = Shader.getPropertyByName("u_b
|
|
|
12512
12651
|
this._uv7 = null;
|
|
12513
12652
|
this._blendShapeManager._releaseMemoryCache();
|
|
12514
12653
|
};
|
|
12515
|
-
|
|
12654
|
+
_create_class$2(ModelMesh, [
|
|
12516
12655
|
{
|
|
12517
12656
|
key: "accessible",
|
|
12518
12657
|
get: /**
|
|
@@ -12580,11 +12719,21 @@ BlendShapeManager._blendShapeTextureInfoProperty = Shader.getPropertyByName("u_b
|
|
|
12580
12719
|
]);
|
|
12581
12720
|
return ModelMesh;
|
|
12582
12721
|
}(Mesh);
|
|
12583
|
-
|
|
12584
|
-
ModelMesh.
|
|
12585
|
-
|
|
12586
|
-
|
|
12587
|
-
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
|
+
})();
|
|
12588
12737
|
var VertexChangedFlags;
|
|
12589
12738
|
(function(VertexChangedFlags) {
|
|
12590
12739
|
VertexChangedFlags[VertexChangedFlags["Position"] = 0x1] = "Position";
|
|
@@ -12624,7 +12773,7 @@ var VertexChangedFlags;
|
|
|
12624
12773
|
var MeshRenderer = function MeshRenderer(entity) {
|
|
12625
12774
|
var _this;
|
|
12626
12775
|
_this = Renderer.call(this, entity) || this;
|
|
12627
|
-
_this._onMeshChanged = _this._onMeshChanged.bind(
|
|
12776
|
+
_this._onMeshChanged = _this._onMeshChanged.bind(_assert_this_initialized(_this));
|
|
12628
12777
|
return _this;
|
|
12629
12778
|
};
|
|
12630
12779
|
_inherits$2(MeshRenderer, Renderer);
|
|
@@ -12728,7 +12877,7 @@ var VertexChangedFlags;
|
|
|
12728
12877
|
type & MeshModifyFlags.Bounds && (this._dirtyUpdateFlag |= RendererUpdateFlags.WorldVolume);
|
|
12729
12878
|
type & MeshModifyFlags.VertexElements && (this._dirtyUpdateFlag |= 0x2);
|
|
12730
12879
|
};
|
|
12731
|
-
|
|
12880
|
+
_create_class$2(MeshRenderer, [
|
|
12732
12881
|
{
|
|
12733
12882
|
key: "mesh",
|
|
12734
12883
|
get: /**
|
|
@@ -12745,11 +12894,21 @@ var VertexChangedFlags;
|
|
|
12745
12894
|
]);
|
|
12746
12895
|
return MeshRenderer;
|
|
12747
12896
|
}(exports.Renderer);
|
|
12748
|
-
|
|
12749
|
-
MeshRenderer.
|
|
12750
|
-
|
|
12751
|
-
|
|
12752
|
-
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
|
+
})();
|
|
12753
12912
|
__decorate$1([
|
|
12754
12913
|
ignoreClone
|
|
12755
12914
|
], MeshRenderer.prototype, "_mesh", void 0);
|
|
@@ -12848,7 +13007,7 @@ var rePropName = RegExp("[^.[\\]]+" + "|" + // Or match property names within br
|
|
|
12848
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.
|
|
12849
13008
|
maxVertexUniformVectors = Math.min(maxVertexUniformVectors, 256);
|
|
12850
13009
|
_this._maxVertexUniformVectors = maxVertexUniformVectors;
|
|
12851
|
-
_this._onLocalBoundsChanged = _this._onLocalBoundsChanged.bind(
|
|
13010
|
+
_this._onLocalBoundsChanged = _this._onLocalBoundsChanged.bind(_assert_this_initialized(_this));
|
|
12852
13011
|
var localBounds = _this._localBounds;
|
|
12853
13012
|
// @ts-ignore
|
|
12854
13013
|
localBounds.min._onValueChanged = _this._onLocalBoundsChanged;
|
|
@@ -13047,7 +13206,7 @@ var rePropName = RegExp("[^.[\\]]+" + "|" + // Or match property names within br
|
|
|
13047
13206
|
_proto._onLocalBoundsChanged = function _onLocalBoundsChanged() {
|
|
13048
13207
|
this._dirtyUpdateFlag |= RendererUpdateFlags.WorldVolume;
|
|
13049
13208
|
};
|
|
13050
|
-
|
|
13209
|
+
_create_class$2(SkinnedMeshRenderer, [
|
|
13051
13210
|
{
|
|
13052
13211
|
key: "blendShapeWeights",
|
|
13053
13212
|
get: /**
|
|
@@ -13112,10 +13271,18 @@ var rePropName = RegExp("[^.[\\]]+" + "|" + // Or match property names within br
|
|
|
13112
13271
|
]);
|
|
13113
13272
|
return SkinnedMeshRenderer;
|
|
13114
13273
|
}(MeshRenderer);
|
|
13115
|
-
|
|
13116
|
-
SkinnedMeshRenderer.
|
|
13117
|
-
|
|
13118
|
-
|
|
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
|
+
})();
|
|
13119
13286
|
__decorate$1([
|
|
13120
13287
|
ignoreClone
|
|
13121
13288
|
], SkinnedMeshRenderer.prototype, "_hasInitSkin", void 0);
|
|
@@ -13874,7 +14041,7 @@ __decorate$1([
|
|
|
13874
14041
|
}
|
|
13875
14042
|
this._setIndexBufferBinding(binding);
|
|
13876
14043
|
};
|
|
13877
|
-
|
|
14044
|
+
_create_class$2(BufferMesh, [
|
|
13878
14045
|
{
|
|
13879
14046
|
key: "instanceCount",
|
|
13880
14047
|
get: /**
|
|
@@ -13986,7 +14153,7 @@ __decorate$1([
|
|
|
13986
14153
|
this._layoutChangeManager.dispatch(0, this);
|
|
13987
14154
|
}
|
|
13988
14155
|
};
|
|
13989
|
-
|
|
14156
|
+
_create_class$2(BlendShape, [
|
|
13990
14157
|
{
|
|
13991
14158
|
key: "frames",
|
|
13992
14159
|
get: /**
|
|
@@ -14143,8 +14310,12 @@ var Basic2DBatcher = /*#__PURE__*/ function() {
|
|
|
14143
14310
|
};
|
|
14144
14311
|
return Basic2DBatcher;
|
|
14145
14312
|
}();
|
|
14146
|
-
|
|
14147
|
-
Basic2DBatcher.
|
|
14313
|
+
(function() {
|
|
14314
|
+
/** The maximum number of vertex. */ Basic2DBatcher.MAX_VERTEX_COUNT = 4096;
|
|
14315
|
+
})();
|
|
14316
|
+
(function() {
|
|
14317
|
+
Basic2DBatcher._canUploadSameBuffer = true;
|
|
14318
|
+
})();
|
|
14148
14319
|
var SpriteMaskBatcher = /*#__PURE__*/ function(Basic2DBatcher) {
|
|
14149
14320
|
var SpriteMaskBatcher = function SpriteMaskBatcher() {
|
|
14150
14321
|
return Basic2DBatcher.apply(this, arguments);
|
|
@@ -14353,9 +14524,15 @@ var TextRenderElement = /*#__PURE__*/ function(RenderElement) {
|
|
|
14353
14524
|
};
|
|
14354
14525
|
return Sky;
|
|
14355
14526
|
}();
|
|
14356
|
-
|
|
14357
|
-
Sky.
|
|
14358
|
-
|
|
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
|
+
})();
|
|
14359
14536
|
/**
|
|
14360
14537
|
* Background of scene.
|
|
14361
14538
|
*/ var Background = /*#__PURE__*/ function() {
|
|
@@ -14436,7 +14613,7 @@ Sky._projectionMatrix = new miniprogram$7.Matrix(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, S
|
|
|
14436
14613
|
mesh.addSubMesh(0, indices.length);
|
|
14437
14614
|
return mesh;
|
|
14438
14615
|
};
|
|
14439
|
-
|
|
14616
|
+
_create_class$2(Background, [
|
|
14440
14617
|
{
|
|
14441
14618
|
key: "texture",
|
|
14442
14619
|
get: /**
|
|
@@ -14601,7 +14778,7 @@ Sky._projectionMatrix = new miniprogram$7.Matrix(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, S
|
|
|
14601
14778
|
out[25] = src[25] * 0.429042;
|
|
14602
14779
|
out[26] = src[26] * 0.429042;
|
|
14603
14780
|
};
|
|
14604
|
-
|
|
14781
|
+
_create_class$2(AmbientLight, [
|
|
14605
14782
|
{
|
|
14606
14783
|
key: "specularTextureDecodeRGBM",
|
|
14607
14784
|
get: /**
|
|
@@ -14712,15 +14889,33 @@ Sky._projectionMatrix = new miniprogram$7.Matrix(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, S
|
|
|
14712
14889
|
]);
|
|
14713
14890
|
return AmbientLight;
|
|
14714
14891
|
}();
|
|
14715
|
-
|
|
14716
|
-
AmbientLight.
|
|
14717
|
-
|
|
14718
|
-
|
|
14719
|
-
AmbientLight.
|
|
14720
|
-
|
|
14721
|
-
|
|
14722
|
-
AmbientLight.
|
|
14723
|
-
|
|
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
|
+
})();
|
|
14724
14919
|
/**
|
|
14725
14920
|
* Scene.
|
|
14726
14921
|
*/ var Scene = /*#__PURE__*/ function(EngineObject) {
|
|
@@ -14750,7 +14945,7 @@ AmbientLight._mipLevelProperty = Shader.getPropertyByName("u_envMapLight.mipMapL
|
|
|
14750
14945
|
var shaderData = _this.shaderData;
|
|
14751
14946
|
shaderData._addRefCount(1);
|
|
14752
14947
|
_this.ambientLight = new AmbientLight();
|
|
14753
|
-
engine.sceneManager._allScenes.push(
|
|
14948
|
+
engine.sceneManager._allScenes.push(_assert_this_initialized(_this));
|
|
14754
14949
|
shaderData.enableMacro("OASIS_FOG_MODE", _this._fogMode.toString());
|
|
14755
14950
|
shaderData.enableMacro("CASCADED_COUNT", _this.shadowCascades.toString());
|
|
14756
14951
|
shaderData.setColor(Scene._fogColorProperty, _this._fogColor);
|
|
@@ -14957,7 +15152,7 @@ AmbientLight._mipLevelProperty = Shader.getPropertyByName("u_envMapLight.mipMapL
|
|
|
14957
15152
|
this._fogParams.z = density / Math.LN2;
|
|
14958
15153
|
this._fogParams.w = density / Math.sqrt(Math.LN2);
|
|
14959
15154
|
};
|
|
14960
|
-
|
|
15155
|
+
_create_class$2(Scene, [
|
|
14961
15156
|
{
|
|
14962
15157
|
key: "shadowCascades",
|
|
14963
15158
|
get: /**
|
|
@@ -15085,8 +15280,12 @@ AmbientLight._mipLevelProperty = Shader.getPropertyByName("u_envMapLight.mipMapL
|
|
|
15085
15280
|
]);
|
|
15086
15281
|
return Scene;
|
|
15087
15282
|
}(EngineObject);
|
|
15088
|
-
|
|
15089
|
-
Scene.
|
|
15283
|
+
(function() {
|
|
15284
|
+
Scene._fogColorProperty = Shader.getPropertyByName("oasis_FogColor");
|
|
15285
|
+
})();
|
|
15286
|
+
(function() {
|
|
15287
|
+
Scene._fogParamsProperty = Shader.getPropertyByName("oasis_FogParams");
|
|
15288
|
+
})();
|
|
15090
15289
|
/**
|
|
15091
15290
|
* Scene manager.
|
|
15092
15291
|
*/ var SceneManager = /*#__PURE__*/ function() {
|
|
@@ -15133,7 +15332,7 @@ Scene._fogParamsProperty = Shader.getPropertyByName("oasis_FogParams");
|
|
|
15133
15332
|
}
|
|
15134
15333
|
allScenes.length = 0;
|
|
15135
15334
|
};
|
|
15136
|
-
|
|
15335
|
+
_create_class$2(SceneManager, [
|
|
15137
15336
|
{
|
|
15138
15337
|
key: "activeScene",
|
|
15139
15338
|
get: /**
|
|
@@ -15282,8 +15481,8 @@ ShaderPool.init();
|
|
|
15282
15481
|
/** @internal */ _this._canSpriteBatch = true;
|
|
15283
15482
|
/** @internal @todo: temporary solution */ _this._macroCollection = new ShaderMacroCollection();
|
|
15284
15483
|
_this._settings = {};
|
|
15285
|
-
_this._resourceManager = new ResourceManager(
|
|
15286
|
-
_this._sceneManager = new SceneManager(
|
|
15484
|
+
_this._resourceManager = new ResourceManager(_assert_this_initialized(_this));
|
|
15485
|
+
_this._sceneManager = new SceneManager(_assert_this_initialized(_this));
|
|
15287
15486
|
_this._vSyncCount = 1;
|
|
15288
15487
|
_this._targetFrameRate = 60;
|
|
15289
15488
|
_this._time = new Time();
|
|
@@ -15307,25 +15506,25 @@ ShaderPool.init();
|
|
|
15307
15506
|
};
|
|
15308
15507
|
_this._hardwareRenderer = hardwareRenderer;
|
|
15309
15508
|
_this._hardwareRenderer.init(canvas);
|
|
15310
|
-
_this.physicsManager = new PhysicsManager(
|
|
15509
|
+
_this.physicsManager = new PhysicsManager(_assert_this_initialized(_this));
|
|
15311
15510
|
_this._canvas = canvas;
|
|
15312
|
-
_this._sceneManager.activeScene = new Scene(
|
|
15313
|
-
_this._spriteMaskManager = new SpriteMaskManager(
|
|
15511
|
+
_this._sceneManager.activeScene = new Scene(_assert_this_initialized(_this), "DefaultScene");
|
|
15512
|
+
_this._spriteMaskManager = new SpriteMaskManager(_assert_this_initialized(_this));
|
|
15314
15513
|
_this._spriteDefaultMaterial = _this._createSpriteMaterial();
|
|
15315
15514
|
_this._spriteMaskDefaultMaterial = _this._createSpriteMaskMaterial();
|
|
15316
|
-
_this._textDefaultFont = Font.createFromOS(
|
|
15515
|
+
_this._textDefaultFont = Font.createFromOS(_assert_this_initialized(_this), "Arial");
|
|
15317
15516
|
_this._textDefaultFont.isGCIgnored = false;
|
|
15318
|
-
_this.inputManager = new InputManager(
|
|
15517
|
+
_this.inputManager = new InputManager(_assert_this_initialized(_this));
|
|
15319
15518
|
var magentaPixel = new Uint8Array([
|
|
15320
15519
|
255,
|
|
15321
15520
|
0,
|
|
15322
15521
|
255,
|
|
15323
15522
|
255
|
|
15324
15523
|
]);
|
|
15325
|
-
var magentaTexture2D = new Texture2D(
|
|
15524
|
+
var magentaTexture2D = new Texture2D(_assert_this_initialized(_this), 1, 1, exports.TextureFormat.R8G8B8A8, false);
|
|
15326
15525
|
magentaTexture2D.setPixelBuffer(magentaPixel);
|
|
15327
15526
|
magentaTexture2D.isGCIgnored = true;
|
|
15328
|
-
var magentaTextureCube = new TextureCube(
|
|
15527
|
+
var magentaTextureCube = new TextureCube(_assert_this_initialized(_this), 1, exports.TextureFormat.R8G8B8A8, false);
|
|
15329
15528
|
magentaTextureCube.setPixelBuffer(exports.TextureCubeFace.PositiveX, magentaPixel);
|
|
15330
15529
|
magentaTextureCube.setPixelBuffer(exports.TextureCubeFace.NegativeX, magentaPixel);
|
|
15331
15530
|
magentaTextureCube.setPixelBuffer(exports.TextureCubeFace.PositiveY, magentaPixel);
|
|
@@ -15336,22 +15535,22 @@ ShaderPool.init();
|
|
|
15336
15535
|
if (!hardwareRenderer.canIUse(exports.GLCapabilityType.depthTexture)) {
|
|
15337
15536
|
_this._macroCollection.enable(Engine._noDepthTextureMacro);
|
|
15338
15537
|
} else {
|
|
15339
|
-
var depthTexture2D = new Texture2D(
|
|
15538
|
+
var depthTexture2D = new Texture2D(_assert_this_initialized(_this), 1, 1, exports.TextureFormat.Depth16, false);
|
|
15340
15539
|
depthTexture2D.isGCIgnored = true;
|
|
15341
15540
|
_this._depthTexture2D = depthTexture2D;
|
|
15342
15541
|
}
|
|
15343
15542
|
_this._magentaTexture2D = magentaTexture2D;
|
|
15344
15543
|
_this._magentaTextureCube = magentaTextureCube;
|
|
15345
15544
|
if (hardwareRenderer.isWebGL2) {
|
|
15346
|
-
var magentaTexture2DArray = new Texture2DArray(
|
|
15545
|
+
var magentaTexture2DArray = new Texture2DArray(_assert_this_initialized(_this), 1, 1, 1, exports.TextureFormat.R8G8B8A8, false);
|
|
15347
15546
|
magentaTexture2DArray.setPixelBuffer(0, magentaPixel);
|
|
15348
15547
|
magentaTexture2DArray.isGCIgnored = true;
|
|
15349
15548
|
_this._magentaTexture2DArray = magentaTexture2DArray;
|
|
15350
15549
|
}
|
|
15351
|
-
var magentaMaterial = new Material(
|
|
15550
|
+
var magentaMaterial = new Material(_assert_this_initialized(_this), Shader.find("unlit"));
|
|
15352
15551
|
magentaMaterial.shaderData.setColor("u_baseColor", new Color(1.0, 0.0, 1.01, 1.0));
|
|
15353
15552
|
_this._magentaMaterial = magentaMaterial;
|
|
15354
|
-
var backgroundTextureMaterial = new Material(
|
|
15553
|
+
var backgroundTextureMaterial = new Material(_assert_this_initialized(_this), Shader.find("background-texture"));
|
|
15355
15554
|
backgroundTextureMaterial.isGCIgnored = true;
|
|
15356
15555
|
backgroundTextureMaterial.renderState.depthState.compareFunction = exports.CompareFunction.LessEqual;
|
|
15357
15556
|
_this._backgroundTextureMaterial = backgroundTextureMaterial;
|
|
@@ -15522,7 +15721,7 @@ ShaderPool.init();
|
|
|
15522
15721
|
material.isGCIgnored = true;
|
|
15523
15722
|
return material;
|
|
15524
15723
|
};
|
|
15525
|
-
|
|
15724
|
+
_create_class$2(Engine, [
|
|
15526
15725
|
{
|
|
15527
15726
|
key: "settings",
|
|
15528
15727
|
get: /**
|
|
@@ -15610,9 +15809,15 @@ ShaderPool.init();
|
|
|
15610
15809
|
]);
|
|
15611
15810
|
return Engine;
|
|
15612
15811
|
}(EventDispatcher);
|
|
15613
|
-
|
|
15614
|
-
/** @internal */ Engine.
|
|
15615
|
-
|
|
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
|
+
})();
|
|
15616
15821
|
/**
|
|
15617
15822
|
* Script class, used for logic writing.
|
|
15618
15823
|
*/ var Script = /*#__PURE__*/ function(Component) {
|
|
@@ -15925,7 +16130,9 @@ __decorate$1([
|
|
|
15925
16130
|
};
|
|
15926
16131
|
return SpriteBatcher;
|
|
15927
16132
|
}(Basic2DBatcher);
|
|
15928
|
-
|
|
16133
|
+
(function() {
|
|
16134
|
+
SpriteBatcher._textureProperty = Shader.getPropertyByName("u_spriteTexture");
|
|
16135
|
+
})();
|
|
15929
16136
|
/**
|
|
15930
16137
|
* Render queue.
|
|
15931
16138
|
*/ var RenderQueue = /*#__PURE__*/ function() {
|
|
@@ -16419,227 +16626,247 @@ var /**
|
|
|
16419
16626
|
};
|
|
16420
16627
|
return ShadowUtils;
|
|
16421
16628
|
}();
|
|
16422
|
-
|
|
16423
|
-
|
|
16424
|
-
|
|
16425
|
-
|
|
16426
|
-
|
|
16427
|
-
new miniprogram$7.
|
|
16428
|
-
|
|
16429
|
-
|
|
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
|
-
miniprogram$7.FrustumFace.Top,
|
|
16456
|
-
miniprogram$7.FrustumFace.Bottom
|
|
16457
|
-
],
|
|
16458
|
-
[
|
|
16459
|
-
miniprogram$7.FrustumFace.Near,
|
|
16460
|
-
miniprogram$7.FrustumFace.Far,
|
|
16461
|
-
miniprogram$7.FrustumFace.Top,
|
|
16462
|
-
miniprogram$7.FrustumFace.Bottom
|
|
16463
|
-
],
|
|
16464
|
-
[
|
|
16465
|
-
miniprogram$7.FrustumFace.Near,
|
|
16466
|
-
miniprogram$7.FrustumFace.Far,
|
|
16467
|
-
miniprogram$7.FrustumFace.Left,
|
|
16468
|
-
miniprogram$7.FrustumFace.Right
|
|
16469
|
-
],
|
|
16470
|
-
[
|
|
16471
|
-
miniprogram$7.FrustumFace.Near,
|
|
16472
|
-
miniprogram$7.FrustumFace.Far,
|
|
16473
|
-
miniprogram$7.FrustumFace.Left,
|
|
16474
|
-
miniprogram$7.FrustumFace.Right
|
|
16475
|
-
]
|
|
16476
|
-
];
|
|
16477
|
-
/** near, far, left, right, bottom, top */ ShadowUtils._frustumTwoPlaneCorners = [
|
|
16478
|
-
[
|
|
16479
|
-
// near, far, left, right, bottom, top
|
|
16480
|
-
[
|
|
16481
|
-
8,
|
|
16482
|
-
8
|
|
16483
|
-
],
|
|
16484
|
-
[
|
|
16485
|
-
8,
|
|
16486
|
-
8
|
|
16487
|
-
],
|
|
16488
|
-
[
|
|
16489
|
-
4,
|
|
16490
|
-
5
|
|
16491
|
-
],
|
|
16492
|
-
[
|
|
16493
|
-
6,
|
|
16494
|
-
7
|
|
16495
|
-
],
|
|
16496
|
-
[
|
|
16497
|
-
7,
|
|
16498
|
-
4
|
|
16499
|
-
],
|
|
16500
|
-
[
|
|
16501
|
-
5,
|
|
16502
|
-
6
|
|
16503
|
-
]
|
|
16504
|
-
],
|
|
16505
|
-
[
|
|
16506
|
-
// near, far, left, right, bottom, top
|
|
16507
|
-
[
|
|
16508
|
-
8,
|
|
16509
|
-
8
|
|
16510
|
-
],
|
|
16511
|
-
[
|
|
16512
|
-
8,
|
|
16513
|
-
8
|
|
16514
|
-
],
|
|
16515
|
-
[
|
|
16516
|
-
1,
|
|
16517
|
-
0
|
|
16518
|
-
],
|
|
16519
|
-
[
|
|
16520
|
-
3,
|
|
16521
|
-
2
|
|
16522
|
-
],
|
|
16523
|
-
[
|
|
16524
|
-
0,
|
|
16525
|
-
3
|
|
16526
|
-
],
|
|
16527
|
-
[
|
|
16528
|
-
2,
|
|
16529
|
-
1
|
|
16530
|
-
]
|
|
16531
|
-
],
|
|
16532
|
-
[
|
|
16533
|
-
// near, far, left, right, bottom, top
|
|
16534
|
-
[
|
|
16535
|
-
5,
|
|
16536
|
-
4
|
|
16537
|
-
],
|
|
16538
|
-
[
|
|
16539
|
-
0,
|
|
16540
|
-
1
|
|
16541
|
-
],
|
|
16542
|
-
[
|
|
16543
|
-
8,
|
|
16544
|
-
8
|
|
16545
|
-
],
|
|
16546
|
-
[
|
|
16547
|
-
8,
|
|
16548
|
-
8
|
|
16549
|
-
],
|
|
16550
|
-
[
|
|
16551
|
-
4,
|
|
16552
|
-
0
|
|
16553
|
-
],
|
|
16554
|
-
[
|
|
16555
|
-
1,
|
|
16556
|
-
5
|
|
16557
|
-
]
|
|
16558
|
-
],
|
|
16559
|
-
[
|
|
16560
|
-
// near, far, left, right, bottom, top
|
|
16561
|
-
[
|
|
16562
|
-
7,
|
|
16563
|
-
6
|
|
16564
|
-
],
|
|
16565
|
-
[
|
|
16566
|
-
2,
|
|
16567
|
-
3
|
|
16568
|
-
],
|
|
16569
|
-
[
|
|
16570
|
-
8,
|
|
16571
|
-
8
|
|
16572
|
-
],
|
|
16573
|
-
[
|
|
16574
|
-
8,
|
|
16575
|
-
8
|
|
16576
|
-
],
|
|
16577
|
-
[
|
|
16578
|
-
3,
|
|
16579
|
-
7
|
|
16580
|
-
],
|
|
16581
|
-
[
|
|
16582
|
-
6,
|
|
16583
|
-
2
|
|
16584
|
-
]
|
|
16585
|
-
],
|
|
16586
|
-
[
|
|
16587
|
-
// 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 = [
|
|
16588
16662
|
[
|
|
16589
|
-
|
|
16590
|
-
7
|
|
16663
|
+
miniprogram$7.FrustumFace.Left,
|
|
16664
|
+
miniprogram$7.FrustumFace.Right,
|
|
16665
|
+
miniprogram$7.FrustumFace.Top,
|
|
16666
|
+
miniprogram$7.FrustumFace.Bottom
|
|
16591
16667
|
],
|
|
16592
16668
|
[
|
|
16593
|
-
|
|
16594
|
-
|
|
16669
|
+
miniprogram$7.FrustumFace.Left,
|
|
16670
|
+
miniprogram$7.FrustumFace.Right,
|
|
16671
|
+
miniprogram$7.FrustumFace.Top,
|
|
16672
|
+
miniprogram$7.FrustumFace.Bottom
|
|
16595
16673
|
],
|
|
16596
16674
|
[
|
|
16597
|
-
|
|
16598
|
-
|
|
16675
|
+
miniprogram$7.FrustumFace.Near,
|
|
16676
|
+
miniprogram$7.FrustumFace.Far,
|
|
16677
|
+
miniprogram$7.FrustumFace.Top,
|
|
16678
|
+
miniprogram$7.FrustumFace.Bottom
|
|
16599
16679
|
],
|
|
16600
16680
|
[
|
|
16601
|
-
7,
|
|
16602
|
-
|
|
16681
|
+
miniprogram$7.FrustumFace.Near,
|
|
16682
|
+
miniprogram$7.FrustumFace.Far,
|
|
16683
|
+
miniprogram$7.FrustumFace.Top,
|
|
16684
|
+
miniprogram$7.FrustumFace.Bottom
|
|
16603
16685
|
],
|
|
16604
16686
|
[
|
|
16605
|
-
|
|
16606
|
-
|
|
16687
|
+
miniprogram$7.FrustumFace.Near,
|
|
16688
|
+
miniprogram$7.FrustumFace.Far,
|
|
16689
|
+
miniprogram$7.FrustumFace.Left,
|
|
16690
|
+
miniprogram$7.FrustumFace.Right
|
|
16607
16691
|
],
|
|
16608
16692
|
[
|
|
16609
|
-
|
|
16610
|
-
|
|
16693
|
+
miniprogram$7.FrustumFace.Near,
|
|
16694
|
+
miniprogram$7.FrustumFace.Far,
|
|
16695
|
+
miniprogram$7.FrustumFace.Left,
|
|
16696
|
+
miniprogram$7.FrustumFace.Right
|
|
16611
16697
|
]
|
|
16612
|
-
]
|
|
16613
|
-
|
|
16614
|
-
|
|
16698
|
+
];
|
|
16699
|
+
})();
|
|
16700
|
+
(function() {
|
|
16701
|
+
/** near, far, left, right, bottom, top */ ShadowUtils._frustumTwoPlaneCorners = [
|
|
16615
16702
|
[
|
|
16616
|
-
|
|
16617
|
-
|
|
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
|
+
]
|
|
16618
16728
|
],
|
|
16619
16729
|
[
|
|
16620
|
-
|
|
16621
|
-
|
|
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
|
+
]
|
|
16622
16755
|
],
|
|
16623
16756
|
[
|
|
16624
|
-
|
|
16625
|
-
|
|
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
|
+
]
|
|
16626
16782
|
],
|
|
16627
16783
|
[
|
|
16628
|
-
|
|
16629
|
-
|
|
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
|
+
]
|
|
16630
16809
|
],
|
|
16631
16810
|
[
|
|
16632
|
-
|
|
16633
|
-
|
|
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
|
+
]
|
|
16634
16836
|
],
|
|
16635
16837
|
[
|
|
16636
|
-
|
|
16637
|
-
|
|
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
|
+
]
|
|
16638
16863
|
]
|
|
16639
|
-
]
|
|
16640
|
-
|
|
16641
|
-
|
|
16642
|
-
|
|
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
|
+
})();
|
|
16643
16870
|
/**
|
|
16644
16871
|
* Cascade shadow caster.
|
|
16645
16872
|
*/ var CascadedShadowCasterPass = /*#__PURE__*/ function() {
|
|
@@ -16875,18 +17102,42 @@ ShadowUtils.atlasBorderSize = 4.0;
|
|
|
16875
17102
|
};
|
|
16876
17103
|
return CascadedShadowCasterPass;
|
|
16877
17104
|
}();
|
|
16878
|
-
|
|
16879
|
-
CascadedShadowCasterPass.
|
|
16880
|
-
|
|
16881
|
-
|
|
16882
|
-
CascadedShadowCasterPass.
|
|
16883
|
-
|
|
16884
|
-
|
|
16885
|
-
CascadedShadowCasterPass.
|
|
16886
|
-
|
|
16887
|
-
|
|
16888
|
-
CascadedShadowCasterPass.
|
|
16889
|
-
|
|
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
|
+
})();
|
|
16890
17141
|
var passNum = 0;
|
|
16891
17142
|
/**
|
|
16892
17143
|
* RenderPass.
|
|
@@ -17117,7 +17368,7 @@ var passNum = 0;
|
|
|
17117
17368
|
renderer._prepareRender(context);
|
|
17118
17369
|
}
|
|
17119
17370
|
};
|
|
17120
|
-
|
|
17371
|
+
_create_class$2(BasicRenderPipeline, [
|
|
17121
17372
|
{
|
|
17122
17373
|
key: "defaultRenderPass",
|
|
17123
17374
|
get: /**
|
|
@@ -17129,13 +17380,23 @@ var passNum = 0;
|
|
|
17129
17380
|
]);
|
|
17130
17381
|
return BasicRenderPipeline;
|
|
17131
17382
|
}();
|
|
17132
|
-
|
|
17133
|
-
BasicRenderPipeline.
|
|
17383
|
+
(function() {
|
|
17384
|
+
BasicRenderPipeline._tempVector0 = new miniprogram$7.Vector3();
|
|
17385
|
+
})();
|
|
17386
|
+
(function() {
|
|
17387
|
+
BasicRenderPipeline._tempVector1 = new miniprogram$7.Vector3();
|
|
17388
|
+
})();
|
|
17134
17389
|
var _Camera;
|
|
17135
17390
|
var MathTemp = function MathTemp() {};
|
|
17136
|
-
|
|
17137
|
-
MathTemp.
|
|
17138
|
-
|
|
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
|
+
})();
|
|
17139
17400
|
exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
|
|
17140
17401
|
var Camera1 = function Camera1(entity) {
|
|
17141
17402
|
var _this;
|
|
@@ -17152,6 +17413,8 @@ exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
|
|
|
17152
17413
|
* @remarks Support bit manipulation, corresponding to `Layer`.
|
|
17153
17414
|
*/ _this.cullingMask = exports.Layer.Everything;
|
|
17154
17415
|
/** @internal */ _this._globalShaderMacro = new ShaderMacroCollection();
|
|
17416
|
+
/** @internal */ _this._frustum = new miniprogram$7.BoundingFrustum();
|
|
17417
|
+
/** @internal */ _this._virtualCamera = new VirtualCamera();
|
|
17155
17418
|
_this._isProjMatSetting = false;
|
|
17156
17419
|
_this._nearClipPlane = 0.1;
|
|
17157
17420
|
_this._farClipPlane = 100;
|
|
@@ -17162,8 +17425,6 @@ exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
|
|
|
17162
17425
|
_this._isFrustumProjectDirty = true;
|
|
17163
17426
|
_this._customAspectRatio = undefined;
|
|
17164
17427
|
_this._renderTarget = null;
|
|
17165
|
-
/** @internal */ _this._frustum = new miniprogram$7.BoundingFrustum();
|
|
17166
|
-
/** @internal */ _this._virtualCamera = new VirtualCamera();
|
|
17167
17428
|
_this._viewport = new miniprogram$7.Vector4(0, 0, 1, 1);
|
|
17168
17429
|
_this._inverseProjectionMatrix = new miniprogram$7.Matrix();
|
|
17169
17430
|
_this._lastAspectSize = new miniprogram$7.Vector2(0, 0);
|
|
@@ -17173,7 +17434,7 @@ exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
|
|
|
17173
17434
|
_this._isViewMatrixDirty = transform.registerWorldChangeFlag();
|
|
17174
17435
|
_this._isInvViewProjDirty = transform.registerWorldChangeFlag();
|
|
17175
17436
|
_this._frustumViewChangeFlag = transform.registerWorldChangeFlag();
|
|
17176
|
-
_this._renderPipeline = new BasicRenderPipeline(
|
|
17437
|
+
_this._renderPipeline = new BasicRenderPipeline(_assert_this_initialized(_this));
|
|
17177
17438
|
_this.shaderData._addRefCount(1);
|
|
17178
17439
|
return _this;
|
|
17179
17440
|
};
|
|
@@ -17391,7 +17652,7 @@ exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
|
|
|
17391
17652
|
}
|
|
17392
17653
|
return this._inverseProjectionMatrix;
|
|
17393
17654
|
};
|
|
17394
|
-
|
|
17655
|
+
_create_class$2(Camera1, [
|
|
17395
17656
|
{
|
|
17396
17657
|
key: "nearClipPlane",
|
|
17397
17658
|
get: /**
|
|
@@ -17555,7 +17816,11 @@ exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
|
|
|
17555
17816
|
}
|
|
17556
17817
|
]);
|
|
17557
17818
|
return Camera1;
|
|
17558
|
-
}(Component),
|
|
17819
|
+
}(Component), function() {
|
|
17820
|
+
/** @internal */ _Camera._inverseViewMatrixProperty = Shader.getPropertyByName("u_viewInvMat");
|
|
17821
|
+
}(), function() {
|
|
17822
|
+
/** @internal */ _Camera._cameraPositionProperty = Shader.getPropertyByName("u_cameraPos");
|
|
17823
|
+
}(), _Camera);
|
|
17559
17824
|
__decorate$1([
|
|
17560
17825
|
deepClone
|
|
17561
17826
|
], exports.Camera.prototype, "_frustum", void 0);
|
|
@@ -17764,7 +18029,9 @@ var MultiExecutor = /*#__PURE__*/ function() {
|
|
|
17764
18029
|
};
|
|
17765
18030
|
return Loader;
|
|
17766
18031
|
}();
|
|
17767
|
-
|
|
18032
|
+
(function() {
|
|
18033
|
+
Loader._engineObjects = {};
|
|
18034
|
+
})();
|
|
17768
18035
|
/**
|
|
17769
18036
|
* Asset Type.
|
|
17770
18037
|
*/ exports.AssetType = void 0;
|
|
@@ -17913,7 +18180,7 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
|
|
|
17913
18180
|
target._isTransparent = this._isTransparent;
|
|
17914
18181
|
target._blendMode = this._blendMode;
|
|
17915
18182
|
};
|
|
17916
|
-
|
|
18183
|
+
_create_class$2(BaseMaterial, [
|
|
17917
18184
|
{
|
|
17918
18185
|
key: "shader",
|
|
17919
18186
|
get: /**
|
|
@@ -18013,19 +18280,45 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
|
|
|
18013
18280
|
]);
|
|
18014
18281
|
return BaseMaterial;
|
|
18015
18282
|
}(Material);
|
|
18016
|
-
|
|
18017
|
-
BaseMaterial.
|
|
18018
|
-
|
|
18019
|
-
|
|
18020
|
-
BaseMaterial.
|
|
18021
|
-
|
|
18022
|
-
|
|
18023
|
-
BaseMaterial.
|
|
18024
|
-
|
|
18025
|
-
|
|
18026
|
-
BaseMaterial.
|
|
18027
|
-
|
|
18028
|
-
|
|
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
|
+
})();
|
|
18029
18322
|
/**
|
|
18030
18323
|
* Blinn-phong Material.
|
|
18031
18324
|
*/ var BlinnPhongMaterial = /*#__PURE__*/ function(BaseMaterial) {
|
|
@@ -18052,7 +18345,7 @@ BaseMaterial._alphaCutoffMacro = Shader.getMacroByName("ALPHA_CUTOFF");
|
|
|
18052
18345
|
this.cloneTo(dest);
|
|
18053
18346
|
return dest;
|
|
18054
18347
|
};
|
|
18055
|
-
|
|
18348
|
+
_create_class$2(BlinnPhongMaterial, [
|
|
18056
18349
|
{
|
|
18057
18350
|
key: "baseColor",
|
|
18058
18351
|
get: /**
|
|
@@ -18198,9 +18491,15 @@ BaseMaterial._alphaCutoffMacro = Shader.getMacroByName("ALPHA_CUTOFF");
|
|
|
18198
18491
|
]);
|
|
18199
18492
|
return BlinnPhongMaterial;
|
|
18200
18493
|
}(BaseMaterial);
|
|
18201
|
-
|
|
18202
|
-
BlinnPhongMaterial.
|
|
18203
|
-
|
|
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
|
+
})();
|
|
18204
18503
|
/**
|
|
18205
18504
|
* Texture UV coordinate.
|
|
18206
18505
|
*/ exports.TextureCoordinate = void 0;
|
|
@@ -18234,7 +18533,7 @@ BlinnPhongMaterial._specularTextureProp = Shader.getPropertyByName("u_specularTe
|
|
|
18234
18533
|
shaderData.setFloat(PBRBaseMaterial._clearCoatRoughnessProp, 0);
|
|
18235
18534
|
return _this;
|
|
18236
18535
|
}
|
|
18237
|
-
|
|
18536
|
+
_create_class$2(PBRBaseMaterial, [
|
|
18238
18537
|
{
|
|
18239
18538
|
key: "baseColor",
|
|
18240
18539
|
get: /**
|
|
@@ -18458,14 +18757,30 @@ BlinnPhongMaterial._specularTextureProp = Shader.getPropertyByName("u_specularTe
|
|
|
18458
18757
|
]);
|
|
18459
18758
|
return PBRBaseMaterial;
|
|
18460
18759
|
}(BaseMaterial);
|
|
18461
|
-
|
|
18462
|
-
PBRBaseMaterial.
|
|
18463
|
-
|
|
18464
|
-
|
|
18465
|
-
PBRBaseMaterial.
|
|
18466
|
-
|
|
18467
|
-
|
|
18468
|
-
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
|
+
})();
|
|
18469
18784
|
/**
|
|
18470
18785
|
* PBR (Metallic-Roughness Workflow) Material.
|
|
18471
18786
|
*/ var PBRMaterial = /*#__PURE__*/ function(PBRBaseMaterial) {
|
|
@@ -18485,7 +18800,7 @@ PBRBaseMaterial._clearCoatNormalTextureProp = Shader.getPropertyByName("u_clearC
|
|
|
18485
18800
|
this.cloneTo(dest);
|
|
18486
18801
|
return dest;
|
|
18487
18802
|
};
|
|
18488
|
-
|
|
18803
|
+
_create_class$2(PBRMaterial, [
|
|
18489
18804
|
{
|
|
18490
18805
|
key: "metallic",
|
|
18491
18806
|
get: /**
|
|
@@ -18528,9 +18843,15 @@ PBRBaseMaterial._clearCoatNormalTextureProp = Shader.getPropertyByName("u_clearC
|
|
|
18528
18843
|
]);
|
|
18529
18844
|
return PBRMaterial;
|
|
18530
18845
|
}(PBRBaseMaterial);
|
|
18531
|
-
|
|
18532
|
-
PBRMaterial.
|
|
18533
|
-
|
|
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
|
+
})();
|
|
18534
18855
|
/**
|
|
18535
18856
|
* PBR (Specular-Glossiness Workflow) Material.
|
|
18536
18857
|
*/ var PBRSpecularMaterial = /*#__PURE__*/ function(PBRBaseMaterial) {
|
|
@@ -18550,7 +18871,7 @@ PBRMaterial._roughnessMetallicTextureProp = Shader.getPropertyByName("u_roughnes
|
|
|
18550
18871
|
this.cloneTo(dest);
|
|
18551
18872
|
return dest;
|
|
18552
18873
|
};
|
|
18553
|
-
|
|
18874
|
+
_create_class$2(PBRSpecularMaterial, [
|
|
18554
18875
|
{
|
|
18555
18876
|
key: "specularColor",
|
|
18556
18877
|
get: /**
|
|
@@ -18596,10 +18917,18 @@ PBRMaterial._roughnessMetallicTextureProp = Shader.getPropertyByName("u_roughnes
|
|
|
18596
18917
|
]);
|
|
18597
18918
|
return PBRSpecularMaterial;
|
|
18598
18919
|
}(PBRBaseMaterial);
|
|
18599
|
-
|
|
18600
|
-
PBRSpecularMaterial.
|
|
18601
|
-
|
|
18602
|
-
|
|
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
|
+
})();
|
|
18603
18932
|
/**
|
|
18604
18933
|
* Unlit Material.
|
|
18605
18934
|
*/ var UnlitMaterial = /*#__PURE__*/ function(BaseMaterial) {
|
|
@@ -18622,7 +18951,7 @@ PBRSpecularMaterial._specularGlossinessTextureMacro = Shader.getMacroByName("SPE
|
|
|
18622
18951
|
this.cloneTo(dest);
|
|
18623
18952
|
return dest;
|
|
18624
18953
|
};
|
|
18625
|
-
|
|
18954
|
+
_create_class$2(UnlitMaterial, [
|
|
18626
18955
|
{
|
|
18627
18956
|
key: "baseColor",
|
|
18628
18957
|
get: /**
|
|
@@ -18752,7 +19081,7 @@ exports.TextVerticalAlignment = void 0;
|
|
|
18752
19081
|
this._sprites = null;
|
|
18753
19082
|
this._spriteNamesToIndex = null;
|
|
18754
19083
|
};
|
|
18755
|
-
|
|
19084
|
+
_create_class$2(SpriteAtlas, [
|
|
18756
19085
|
{
|
|
18757
19086
|
key: "sprites",
|
|
18758
19087
|
get: /**
|
|
@@ -18921,7 +19250,7 @@ exports.TextVerticalAlignment = void 0;
|
|
|
18921
19250
|
}
|
|
18922
19251
|
this._updateFlagManager.dispatch(type);
|
|
18923
19252
|
};
|
|
18924
|
-
|
|
19253
|
+
_create_class$2(Sprite, [
|
|
18925
19254
|
{
|
|
18926
19255
|
key: "texture",
|
|
18927
19256
|
get: /**
|
|
@@ -19209,7 +19538,9 @@ var SlicedSpriteAssembler = (_SlicedSpriteAssembler = /*#__PURE__*/ function() {
|
|
|
19209
19538
|
};
|
|
19210
19539
|
SlicedSpriteAssembler1.updateUVs = function updateUVs(renderer) {};
|
|
19211
19540
|
return SlicedSpriteAssembler1;
|
|
19212
|
-
}(),
|
|
19541
|
+
}(), function() {
|
|
19542
|
+
_SlicedSpriteAssembler._worldMatrix = new miniprogram$7.Matrix();
|
|
19543
|
+
}(), _SlicedSpriteAssembler);
|
|
19213
19544
|
SlicedSpriteAssembler = __decorate$1([
|
|
19214
19545
|
StaticInterfaceImplement$1()
|
|
19215
19546
|
], SlicedSpriteAssembler);
|
|
@@ -19230,7 +19561,7 @@ SlicedSpriteAssembler = __decorate$1([
|
|
|
19230
19561
|
_this._renderData = new RenderData2D(4, [], [], null, _this._color);
|
|
19231
19562
|
_this.drawMode = exports.SpriteDrawMode.Simple;
|
|
19232
19563
|
_this.setMaterial(_this._engine._spriteDefaultMaterial);
|
|
19233
|
-
_this._onSpriteChange = _this._onSpriteChange.bind(
|
|
19564
|
+
_this._onSpriteChange = _this._onSpriteChange.bind(_assert_this_initialized(_this));
|
|
19234
19565
|
return _this;
|
|
19235
19566
|
};
|
|
19236
19567
|
_inherits$2(SpriteRenderer, Renderer);
|
|
@@ -19336,7 +19667,7 @@ SlicedSpriteAssembler = __decorate$1([
|
|
|
19336
19667
|
break;
|
|
19337
19668
|
}
|
|
19338
19669
|
};
|
|
19339
|
-
|
|
19670
|
+
_create_class$2(SpriteRenderer, [
|
|
19340
19671
|
{
|
|
19341
19672
|
key: "drawMode",
|
|
19342
19673
|
get: /**
|
|
@@ -19485,7 +19816,9 @@ SlicedSpriteAssembler = __decorate$1([
|
|
|
19485
19816
|
]);
|
|
19486
19817
|
return SpriteRenderer;
|
|
19487
19818
|
}(exports.Renderer);
|
|
19488
|
-
|
|
19819
|
+
(function() {
|
|
19820
|
+
/** @internal */ SpriteRenderer._textureProperty = Shader.getPropertyByName("u_spriteTexture");
|
|
19821
|
+
})();
|
|
19489
19822
|
__decorate$1([
|
|
19490
19823
|
ignoreClone
|
|
19491
19824
|
], SpriteRenderer.prototype, "_renderData", void 0);
|
|
@@ -19541,14 +19874,16 @@ var /**
|
|
|
19541
19874
|
];
|
|
19542
19875
|
this.renderData = new RenderData2D(4, positions, null, CharRenderData.triangles, null);
|
|
19543
19876
|
};
|
|
19544
|
-
|
|
19545
|
-
|
|
19546
|
-
|
|
19547
|
-
|
|
19548
|
-
|
|
19549
|
-
|
|
19550
|
-
|
|
19551
|
-
|
|
19877
|
+
(function() {
|
|
19878
|
+
CharRenderData.triangles = [
|
|
19879
|
+
0,
|
|
19880
|
+
2,
|
|
19881
|
+
1,
|
|
19882
|
+
2,
|
|
19883
|
+
0,
|
|
19884
|
+
3
|
|
19885
|
+
];
|
|
19886
|
+
})();
|
|
19552
19887
|
/**
|
|
19553
19888
|
* @internal
|
|
19554
19889
|
*/ var CharRenderDataPool = /*#__PURE__*/ function() {
|
|
@@ -19870,23 +20205,37 @@ CharRenderData.triangles = [
|
|
|
19870
20205
|
};
|
|
19871
20206
|
return TextUtils;
|
|
19872
20207
|
}();
|
|
19873
|
-
|
|
19874
|
-
|
|
19875
|
-
|
|
19876
|
-
|
|
19877
|
-
|
|
19878
|
-
|
|
19879
|
-
|
|
19880
|
-
|
|
19881
|
-
|
|
19882
|
-
|
|
19883
|
-
|
|
19884
|
-
|
|
19885
|
-
|
|
19886
|
-
|
|
19887
|
-
TextUtils.
|
|
19888
|
-
|
|
19889
|
-
|
|
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
|
+
})();
|
|
19890
20239
|
/**
|
|
19891
20240
|
* Renders a text for 2D graphics.
|
|
19892
20241
|
*/ var TextRenderer = /*#__PURE__*/ function(Renderer) {
|
|
@@ -19911,7 +20260,7 @@ TextUtils._textContext = null;
|
|
|
19911
20260
|
_this._overflowMode = exports.OverflowMode.Overflow;
|
|
19912
20261
|
_this._maskInteraction = exports.SpriteMaskInteraction.None;
|
|
19913
20262
|
_this._maskLayer = exports.SpriteMaskLayer.Layer0;
|
|
19914
|
-
var engine =
|
|
20263
|
+
var engine = _assert_this_initialized(_this).engine;
|
|
19915
20264
|
_this._font = engine._textDefaultFont;
|
|
19916
20265
|
_this._font._addRefCount(1);
|
|
19917
20266
|
_this.setMaterial(engine._spriteDefaultMaterial);
|
|
@@ -20151,7 +20500,7 @@ TextUtils._textContext = null;
|
|
|
20151
20500
|
Renderer.prototype._onTransformChanged.call(this, bit);
|
|
20152
20501
|
this._setDirtyFlagTrue(0x4 | 0x8);
|
|
20153
20502
|
};
|
|
20154
|
-
|
|
20503
|
+
_create_class$2(TextRenderer, [
|
|
20155
20504
|
{
|
|
20156
20505
|
key: "color",
|
|
20157
20506
|
get: /**
|
|
@@ -20364,9 +20713,15 @@ TextUtils._textContext = null;
|
|
|
20364
20713
|
]);
|
|
20365
20714
|
return TextRenderer;
|
|
20366
20715
|
}(exports.Renderer);
|
|
20367
|
-
|
|
20368
|
-
TextRenderer.
|
|
20369
|
-
|
|
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
|
+
})();
|
|
20370
20725
|
__decorate$1([
|
|
20371
20726
|
assignmentClone
|
|
20372
20727
|
], TextRenderer.prototype, "_subFont", void 0);
|
|
@@ -20581,7 +20936,9 @@ var DirtyFlag;
|
|
|
20581
20936
|
};
|
|
20582
20937
|
return AnimationCurveOwner;
|
|
20583
20938
|
}();
|
|
20584
|
-
|
|
20939
|
+
(function() {
|
|
20940
|
+
AnimationCurveOwner._assemblerMap = new Map();
|
|
20941
|
+
})();
|
|
20585
20942
|
/**
|
|
20586
20943
|
* @internal
|
|
20587
20944
|
*/ var PositionAnimationCurveOwnerAssembler = /*#__PURE__*/ function() {
|
|
@@ -20747,7 +21104,7 @@ AnimationCurveOwner.registerAssembler(SkinnedMeshRenderer, "blendShapeWeights",
|
|
|
20747
21104
|
}
|
|
20748
21105
|
}
|
|
20749
21106
|
};
|
|
20750
|
-
|
|
21107
|
+
_create_class$2(AnimationClip, [
|
|
20751
21108
|
{
|
|
20752
21109
|
key: "events",
|
|
20753
21110
|
get: /**
|
|
@@ -20893,7 +21250,7 @@ AnimationCurveOwner.registerAssembler(SkinnedMeshRenderer, "blendShapeWeights",
|
|
|
20893
21250
|
var result = this._evaluate(time, evaluateData);
|
|
20894
21251
|
return this._type._subtractValue(result, this.keys[0].value, evaluateData.value);
|
|
20895
21252
|
};
|
|
20896
|
-
|
|
21253
|
+
_create_class$2(AnimationCurve, [
|
|
20897
21254
|
{
|
|
20898
21255
|
key: "interpolation",
|
|
20899
21256
|
get: /**
|
|
@@ -21002,7 +21359,11 @@ exports.AnimationArrayCurve = (_AnimationArrayCurve = /*#__PURE__*/ function(Ani
|
|
|
21002
21359
|
return out;
|
|
21003
21360
|
};
|
|
21004
21361
|
return AnimationArrayCurve;
|
|
21005
|
-
}(AnimationCurve),
|
|
21362
|
+
}(AnimationCurve), function() {
|
|
21363
|
+
/** @internal */ _AnimationArrayCurve._isReferenceType = true;
|
|
21364
|
+
}(), function() {
|
|
21365
|
+
/** @internal */ _AnimationArrayCurve._isInterpolationType = true;
|
|
21366
|
+
}(), _AnimationArrayCurve);
|
|
21006
21367
|
exports.AnimationArrayCurve = __decorate$1([
|
|
21007
21368
|
StaticInterfaceImplement$1()
|
|
21008
21369
|
], exports.AnimationArrayCurve);
|
|
@@ -21054,7 +21415,11 @@ exports.AnimationBoolCurve = (_AnimationBoolCurve = /*#__PURE__*/ function(Anima
|
|
|
21054
21415
|
return frame.value;
|
|
21055
21416
|
};
|
|
21056
21417
|
return AnimationBoolCurve;
|
|
21057
|
-
}(AnimationCurve),
|
|
21418
|
+
}(AnimationCurve), function() {
|
|
21419
|
+
/** @internal */ _AnimationBoolCurve._isReferenceType = false;
|
|
21420
|
+
}(), function() {
|
|
21421
|
+
/** @internal */ _AnimationBoolCurve._isInterpolationType = false;
|
|
21422
|
+
}(), _AnimationBoolCurve);
|
|
21058
21423
|
exports.AnimationBoolCurve = __decorate$1([
|
|
21059
21424
|
StaticInterfaceImplement$1()
|
|
21060
21425
|
], exports.AnimationBoolCurve);
|
|
@@ -21146,7 +21511,11 @@ exports.AnimationColorCurve = (_AnimationColorCurve = /*#__PURE__*/ function(Ani
|
|
|
21146
21511
|
return out;
|
|
21147
21512
|
};
|
|
21148
21513
|
return AnimationColorCurve;
|
|
21149
|
-
}(AnimationCurve),
|
|
21514
|
+
}(AnimationCurve), function() {
|
|
21515
|
+
/** @internal */ _AnimationColorCurve._isReferenceType = true;
|
|
21516
|
+
}(), function() {
|
|
21517
|
+
/** @internal */ _AnimationColorCurve._isInterpolationType = true;
|
|
21518
|
+
}(), _AnimationColorCurve);
|
|
21150
21519
|
exports.AnimationColorCurve = __decorate$1([
|
|
21151
21520
|
StaticInterfaceImplement$1()
|
|
21152
21521
|
], exports.AnimationColorCurve);
|
|
@@ -21241,7 +21610,11 @@ exports.AnimationFloatArrayCurve = (_AnimationFloatArrayCurve = /*#__PURE__*/ fu
|
|
|
21241
21610
|
return out;
|
|
21242
21611
|
};
|
|
21243
21612
|
return AnimationFloatArrayCurve;
|
|
21244
|
-
}(AnimationCurve),
|
|
21613
|
+
}(AnimationCurve), function() {
|
|
21614
|
+
/** @internal */ _AnimationFloatArrayCurve._isReferenceType = true;
|
|
21615
|
+
}(), function() {
|
|
21616
|
+
/** @internal */ _AnimationFloatArrayCurve._isInterpolationType = true;
|
|
21617
|
+
}(), _AnimationFloatArrayCurve);
|
|
21245
21618
|
exports.AnimationFloatArrayCurve = __decorate$1([
|
|
21246
21619
|
StaticInterfaceImplement$1()
|
|
21247
21620
|
], exports.AnimationFloatArrayCurve);
|
|
@@ -21305,7 +21678,11 @@ exports.AnimationFloatCurve = (_AnimationFloatCurve = /*#__PURE__*/ function(Ani
|
|
|
21305
21678
|
}
|
|
21306
21679
|
};
|
|
21307
21680
|
return AnimationFloatCurve;
|
|
21308
|
-
}(AnimationCurve),
|
|
21681
|
+
}(AnimationCurve), function() {
|
|
21682
|
+
/** @internal */ _AnimationFloatCurve._isReferenceType = false;
|
|
21683
|
+
}(), function() {
|
|
21684
|
+
/** @internal */ _AnimationFloatCurve._isInterpolationType = true;
|
|
21685
|
+
}(), _AnimationFloatCurve);
|
|
21309
21686
|
exports.AnimationFloatCurve = __decorate$1([
|
|
21310
21687
|
StaticInterfaceImplement$1()
|
|
21311
21688
|
], exports.AnimationFloatCurve);
|
|
@@ -21402,7 +21779,13 @@ exports.AnimationQuaternionCurve = (_AnimationQuaternionCurve = /*#__PURE__*/ fu
|
|
|
21402
21779
|
return out;
|
|
21403
21780
|
};
|
|
21404
21781
|
return AnimationQuaternionCurve1;
|
|
21405
|
-
}(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);
|
|
21406
21789
|
exports.AnimationQuaternionCurve = __decorate$1([
|
|
21407
21790
|
StaticInterfaceImplement$1()
|
|
21408
21791
|
], exports.AnimationQuaternionCurve);
|
|
@@ -21482,7 +21865,11 @@ exports.AnimationVector2Curve = (_AnimationVector2Curve = /*#__PURE__*/ function
|
|
|
21482
21865
|
return out;
|
|
21483
21866
|
};
|
|
21484
21867
|
return AnimationVector2Curve;
|
|
21485
|
-
}(AnimationCurve),
|
|
21868
|
+
}(AnimationCurve), function() {
|
|
21869
|
+
/** @internal */ _AnimationVector2Curve._isReferenceType = true;
|
|
21870
|
+
}(), function() {
|
|
21871
|
+
/** @internal */ _AnimationVector2Curve._isInterpolationType = true;
|
|
21872
|
+
}(), _AnimationVector2Curve);
|
|
21486
21873
|
exports.AnimationVector2Curve = __decorate$1([
|
|
21487
21874
|
StaticInterfaceImplement$1()
|
|
21488
21875
|
], exports.AnimationVector2Curve);
|
|
@@ -21574,7 +21961,11 @@ exports.AnimationVector3Curve = (_AnimationVector3Curve = /*#__PURE__*/ function
|
|
|
21574
21961
|
return out;
|
|
21575
21962
|
};
|
|
21576
21963
|
return AnimationVector3Curve;
|
|
21577
|
-
}(AnimationCurve),
|
|
21964
|
+
}(AnimationCurve), function() {
|
|
21965
|
+
/** @internal */ _AnimationVector3Curve._isReferenceType = true;
|
|
21966
|
+
}(), function() {
|
|
21967
|
+
/** @internal */ _AnimationVector3Curve._isInterpolationType = true;
|
|
21968
|
+
}(), _AnimationVector3Curve);
|
|
21578
21969
|
exports.AnimationVector3Curve = __decorate$1([
|
|
21579
21970
|
StaticInterfaceImplement$1()
|
|
21580
21971
|
], exports.AnimationVector3Curve);
|
|
@@ -21666,7 +22057,11 @@ exports.AnimationVector4Curve = (_AnimationVector4Curve = /*#__PURE__*/ function
|
|
|
21666
22057
|
return out;
|
|
21667
22058
|
};
|
|
21668
22059
|
return AnimationVector4Curve;
|
|
21669
|
-
}(AnimationCurve),
|
|
22060
|
+
}(AnimationCurve), function() {
|
|
22061
|
+
/** @internal */ _AnimationVector4Curve._isReferenceType = true;
|
|
22062
|
+
}(), function() {
|
|
22063
|
+
/** @internal */ _AnimationVector4Curve._isInterpolationType = true;
|
|
22064
|
+
}(), _AnimationVector4Curve);
|
|
21670
22065
|
exports.AnimationVector4Curve = __decorate$1([
|
|
21671
22066
|
StaticInterfaceImplement$1()
|
|
21672
22067
|
], exports.AnimationVector4Curve);
|
|
@@ -22371,7 +22766,7 @@ exports.AnimatorLayerBlendingMode = void 0;
|
|
|
22371
22766
|
}
|
|
22372
22767
|
}
|
|
22373
22768
|
};
|
|
22374
|
-
|
|
22769
|
+
_create_class$2(Animator, [
|
|
22375
22770
|
{
|
|
22376
22771
|
key: "animatorController",
|
|
22377
22772
|
get: /**
|
|
@@ -22461,7 +22856,7 @@ __decorate$1([
|
|
|
22461
22856
|
*/ _proto._registerChangeFlag = function _registerChangeFlag() {
|
|
22462
22857
|
return this._updateFlagManager.createFlag(BoolUpdateFlag);
|
|
22463
22858
|
};
|
|
22464
|
-
|
|
22859
|
+
_create_class$2(AnimatorController, [
|
|
22465
22860
|
{
|
|
22466
22861
|
key: "layers",
|
|
22467
22862
|
get: /**
|
|
@@ -22592,7 +22987,7 @@ __decorate$1([
|
|
|
22592
22987
|
index2 !== -1 && this._onStateExitScripts.splice(index2, 1);
|
|
22593
22988
|
}
|
|
22594
22989
|
};
|
|
22595
|
-
|
|
22990
|
+
_create_class$2(AnimatorState, [
|
|
22596
22991
|
{
|
|
22597
22992
|
key: "transitions",
|
|
22598
22993
|
get: /**
|
|
@@ -22719,7 +23114,7 @@ exports.AnimatorConditionMode = void 0;
|
|
|
22719
23114
|
return _this;
|
|
22720
23115
|
};
|
|
22721
23116
|
_inherits$2(SkyBoxMaterial, Material);
|
|
22722
|
-
|
|
23117
|
+
_create_class$2(SkyBoxMaterial, [
|
|
22723
23118
|
{
|
|
22724
23119
|
key: "textureDecodeRGBM",
|
|
22725
23120
|
get: /**
|
|
@@ -22816,7 +23211,7 @@ exports.ParticleRendererBlendMode = void 0;
|
|
|
22816
23211
|
_this._isFadeOut = false;
|
|
22817
23212
|
_this._playOnEnable = true;
|
|
22818
23213
|
_this._blendMode = 0;
|
|
22819
|
-
_this._onColorChanged = _this._onColorChanged.bind(
|
|
23214
|
+
_this._onColorChanged = _this._onColorChanged.bind(_assert_this_initialized(_this));
|
|
22820
23215
|
//@ts-ignore
|
|
22821
23216
|
_this._color._onValueChanged = _this._onColorChanged;
|
|
22822
23217
|
_this.setMaterial(_this._createMaterial());
|
|
@@ -23094,7 +23489,7 @@ exports.ParticleRendererBlendMode = void 0;
|
|
|
23094
23489
|
ParticleRenderer._getRandom = function _getRandom() {
|
|
23095
23490
|
return Math.random() - 0.5;
|
|
23096
23491
|
};
|
|
23097
|
-
|
|
23492
|
+
_create_class$2(ParticleRenderer, [
|
|
23098
23493
|
{
|
|
23099
23494
|
key: "texture",
|
|
23100
23495
|
get: /**
|
|
@@ -23525,7 +23920,9 @@ exports.ParticleRendererBlendMode = void 0;
|
|
|
23525
23920
|
]);
|
|
23526
23921
|
return ParticleRenderer;
|
|
23527
23922
|
}(MeshRenderer);
|
|
23528
|
-
|
|
23923
|
+
(function() {
|
|
23924
|
+
/** The max number of indices that Uint16Array can support. */ ParticleRenderer._uint16VertexLimit = 65535;
|
|
23925
|
+
})();
|
|
23529
23926
|
__decorate$1([
|
|
23530
23927
|
ignoreClone
|
|
23531
23928
|
], ParticleRenderer.prototype, "_onColorChanged", null);
|
|
@@ -23790,7 +24187,7 @@ var _tempVector3 = new miniprogram$7.Vector3();
|
|
|
23790
24187
|
this._camera.renderTarget = this._oriCameraRenderTarget;
|
|
23791
24188
|
this._camera.cullingMask = this._oriCameraCullingMask;
|
|
23792
24189
|
};
|
|
23793
|
-
|
|
24190
|
+
_create_class$2(Probe, [
|
|
23794
24191
|
{
|
|
23795
24192
|
key: "_texture",
|
|
23796
24193
|
get: function get() {
|
|
@@ -24016,32 +24413,22 @@ var engineMiniprogramAdapter$1 = require("@galacean/engine-miniprogram-adapter")
|
|
|
24016
24413
|
var miniprogram$1$2 = require("@galacean/engine-math/dist/miniprogram");
|
|
24017
24414
|
var miniprogram$2$1 = require("@galacean/engine-draco/dist/miniprogram");
|
|
24018
24415
|
var miniprogram$3$1 = require("@galacean/engine-rhi-webgl/dist/miniprogram");
|
|
24019
|
-
function
|
|
24020
|
-
|
|
24416
|
+
function _extends$1() {
|
|
24417
|
+
_extends$1 = Object.assign || function assign(target) {
|
|
24021
24418
|
for(var i = 1; i < arguments.length; i++){
|
|
24022
24419
|
var source = arguments[i];
|
|
24023
|
-
for(var key in source)
|
|
24024
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
24025
|
-
target[key] = source[key];
|
|
24026
|
-
}
|
|
24027
|
-
}
|
|
24420
|
+
for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
|
|
24028
24421
|
}
|
|
24029
24422
|
return target;
|
|
24030
24423
|
};
|
|
24031
|
-
return
|
|
24424
|
+
return _extends$1.apply(this, arguments);
|
|
24032
24425
|
}
|
|
24033
|
-
function
|
|
24034
|
-
|
|
24035
|
-
}
|
|
24036
|
-
function setPrototypeOf$1(o, p) {
|
|
24037
|
-
setPrototypeOf$1 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
24426
|
+
function _set_prototype_of$1(o, p) {
|
|
24427
|
+
_set_prototype_of$1 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
24038
24428
|
o.__proto__ = p;
|
|
24039
24429
|
return o;
|
|
24040
24430
|
};
|
|
24041
|
-
return
|
|
24042
|
-
}
|
|
24043
|
-
function _setPrototypeOf$1(o, p) {
|
|
24044
|
-
return setPrototypeOf$1(o, p);
|
|
24431
|
+
return _set_prototype_of$1(o, p);
|
|
24045
24432
|
}
|
|
24046
24433
|
function _inherits$1(subClass, superClass) {
|
|
24047
24434
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
@@ -24054,7 +24441,7 @@ function _inherits$1(subClass, superClass) {
|
|
|
24054
24441
|
configurable: true
|
|
24055
24442
|
}
|
|
24056
24443
|
});
|
|
24057
|
-
if (superClass)
|
|
24444
|
+
if (superClass) _set_prototype_of$1(subClass, superClass);
|
|
24058
24445
|
}
|
|
24059
24446
|
/******************************************************************************
|
|
24060
24447
|
Copyright (c) Microsoft Corporation.
|
|
@@ -24337,13 +24724,10 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
24337
24724
|
reject(error);
|
|
24338
24725
|
return;
|
|
24339
24726
|
}
|
|
24340
|
-
if (info.done)
|
|
24341
|
-
|
|
24342
|
-
} else {
|
|
24343
|
-
Promise.resolve(value).then(_next, _throw);
|
|
24344
|
-
}
|
|
24727
|
+
if (info.done) resolve(value);
|
|
24728
|
+
else Promise.resolve(value).then(_next, _throw);
|
|
24345
24729
|
}
|
|
24346
|
-
function
|
|
24730
|
+
function _async_to_generator(fn) {
|
|
24347
24731
|
return function() {
|
|
24348
24732
|
var self = this, args = arguments;
|
|
24349
24733
|
return new Promise(function(resolve, reject) {
|
|
@@ -24388,7 +24772,7 @@ var FontLoader = /*#__PURE__*/ function(Loader) {
|
|
|
24388
24772
|
});
|
|
24389
24773
|
};
|
|
24390
24774
|
_proto._registerFont = function _registerFont(fontName, fontUrl) {
|
|
24391
|
-
return
|
|
24775
|
+
return _async_to_generator(function() {
|
|
24392
24776
|
var fontFace;
|
|
24393
24777
|
return __generator(this, function(_state) {
|
|
24394
24778
|
switch(_state.label){
|
|
@@ -24996,30 +25380,32 @@ var TextureWrapMode;
|
|
|
24996
25380
|
};
|
|
24997
25381
|
return GLTFUtil;
|
|
24998
25382
|
}();
|
|
24999
|
-
function
|
|
25383
|
+
function _array_like_to_array(arr, len) {
|
|
25000
25384
|
if (len == null || len > arr.length) len = arr.length;
|
|
25001
25385
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
25002
25386
|
return arr2;
|
|
25003
25387
|
}
|
|
25004
|
-
function
|
|
25005
|
-
if (Array.isArray(arr)) return
|
|
25388
|
+
function _array_without_holes(arr) {
|
|
25389
|
+
if (Array.isArray(arr)) return _array_like_to_array(arr);
|
|
25006
25390
|
}
|
|
25007
|
-
function
|
|
25008
|
-
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
|
+
}
|
|
25009
25395
|
}
|
|
25010
|
-
function
|
|
25011
|
-
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.");
|
|
25012
25398
|
}
|
|
25013
|
-
function
|
|
25399
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
|
25014
25400
|
if (!o) return;
|
|
25015
|
-
if (typeof o === "string") return
|
|
25401
|
+
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
25016
25402
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
25017
25403
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
25018
25404
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
25019
|
-
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);
|
|
25020
25406
|
}
|
|
25021
|
-
function
|
|
25022
|
-
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();
|
|
25023
25409
|
}
|
|
25024
25410
|
var Parser = /*#__PURE__*/ function() {
|
|
25025
25411
|
var Parser = function Parser() {};
|
|
@@ -25035,7 +25421,7 @@ var Parser = /*#__PURE__*/ function() {
|
|
|
25035
25421
|
extensionSchema,
|
|
25036
25422
|
parseResource,
|
|
25037
25423
|
context
|
|
25038
|
-
].concat(
|
|
25424
|
+
].concat(_to_consumable_array(extra)));
|
|
25039
25425
|
}
|
|
25040
25426
|
}
|
|
25041
25427
|
};
|
|
@@ -25049,7 +25435,7 @@ var Parser = /*#__PURE__*/ function() {
|
|
|
25049
25435
|
return (_parsers_ = parsers[0]).createEngineResource.apply(_parsers_, [
|
|
25050
25436
|
extensionSchema,
|
|
25051
25437
|
context
|
|
25052
|
-
].concat(
|
|
25438
|
+
].concat(_to_consumable_array(extra)));
|
|
25053
25439
|
}
|
|
25054
25440
|
};
|
|
25055
25441
|
Parser.hasExtensionParser = function hasExtensionParser(extensionName) {
|
|
@@ -25074,7 +25460,9 @@ var Parser = /*#__PURE__*/ function() {
|
|
|
25074
25460
|
};
|
|
25075
25461
|
return Parser;
|
|
25076
25462
|
}();
|
|
25077
|
-
|
|
25463
|
+
(function() {
|
|
25464
|
+
Parser._extensionParsers = {};
|
|
25465
|
+
})();
|
|
25078
25466
|
/**
|
|
25079
25467
|
* Declare ExtensionParser's decorator.
|
|
25080
25468
|
* @param extensionName - Extension name
|
|
@@ -25148,9 +25536,7 @@ KHR_draco_mesh_compression = __decorate([
|
|
|
25148
25536
|
function _instanceof1$1(left, right) {
|
|
25149
25537
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
25150
25538
|
return !!right[Symbol.hasInstance](left);
|
|
25151
|
-
} else
|
|
25152
|
-
return _instanceof(left, right);
|
|
25153
|
-
}
|
|
25539
|
+
} else return _instanceof(left, right);
|
|
25154
25540
|
}
|
|
25155
25541
|
var KHR_lights_punctual = /*#__PURE__*/ function(ExtensionParser) {
|
|
25156
25542
|
var KHR_lights_punctual = function KHR_lights_punctual() {
|
|
@@ -25463,11 +25849,11 @@ var GalaceanMaterialsRemap = /*#__PURE__*/ function(ExtensionParser) {
|
|
|
25463
25849
|
GalaceanMaterialsRemap = __decorate([
|
|
25464
25850
|
registerExtension("OASIS_materials_remap")
|
|
25465
25851
|
], GalaceanMaterialsRemap);
|
|
25466
|
-
function
|
|
25852
|
+
function _create_for_of_iterator_helper_loose(o, allowArrayLike) {
|
|
25467
25853
|
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
|
25468
25854
|
if (it) return (it = it.call(o)).next.bind(it);
|
|
25469
25855
|
// Fallback for engines without symbol support
|
|
25470
|
-
if (Array.isArray(o) || (it =
|
|
25856
|
+
if (Array.isArray(o) || (it = _unsupported_iterable_to_array(o)) || allowArrayLike && o && typeof o.length === "number") {
|
|
25471
25857
|
if (it) o = it;
|
|
25472
25858
|
var i = 0;
|
|
25473
25859
|
return function() {
|
|
@@ -25480,7 +25866,7 @@ function _createForOfIteratorHelperLoose(o, allowArrayLike) {
|
|
|
25480
25866
|
};
|
|
25481
25867
|
};
|
|
25482
25868
|
}
|
|
25483
|
-
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.");
|
|
25484
25870
|
}
|
|
25485
25871
|
var AnimationParser = /*#__PURE__*/ function(Parser) {
|
|
25486
25872
|
var AnimationParser = function AnimationParser() {
|
|
@@ -25772,7 +26158,9 @@ var EntityParser = /*#__PURE__*/ function(Parser) {
|
|
|
25772
26158
|
};
|
|
25773
26159
|
return EntityParser;
|
|
25774
26160
|
}(Parser);
|
|
25775
|
-
|
|
26161
|
+
(function() {
|
|
26162
|
+
/** @internal */ EntityParser._defaultName = "_GLTF_ENTITY_";
|
|
26163
|
+
})();
|
|
25776
26164
|
var MeshParser = /*#__PURE__*/ function(Parser1) {
|
|
25777
26165
|
var MeshParser = function MeshParser() {
|
|
25778
26166
|
return Parser1.apply(this, arguments);
|
|
@@ -26053,7 +26441,9 @@ var MeshParser = /*#__PURE__*/ function(Parser1) {
|
|
|
26053
26441
|
};
|
|
26054
26442
|
return MeshParser;
|
|
26055
26443
|
}(Parser);
|
|
26056
|
-
|
|
26444
|
+
(function() {
|
|
26445
|
+
MeshParser._tempVector3 = new miniprogram$1$2.Vector3();
|
|
26446
|
+
})();
|
|
26057
26447
|
var SceneParser$1 = /*#__PURE__*/ function(Parser1) {
|
|
26058
26448
|
var SceneParser = function SceneParser() {
|
|
26059
26449
|
return Parser1.apply(this, arguments);
|
|
@@ -26261,7 +26651,7 @@ var SkinParser = /*#__PURE__*/ function(Parser) {
|
|
|
26261
26651
|
};
|
|
26262
26652
|
_proto._findSkeletonRootBone = function _findSkeletonRootBone(joints, entities) {
|
|
26263
26653
|
var paths = {};
|
|
26264
|
-
for(var _iterator =
|
|
26654
|
+
for(var _iterator = _create_for_of_iterator_helper_loose(joints), _step; !(_step = _iterator()).done;){
|
|
26265
26655
|
var index = _step.value;
|
|
26266
26656
|
var path = new Array();
|
|
26267
26657
|
var entity = entities[index];
|
|
@@ -26362,8 +26752,10 @@ var TextureParser = /*#__PURE__*/ function(Parser) {
|
|
|
26362
26752
|
};
|
|
26363
26753
|
return TextureParser;
|
|
26364
26754
|
}(Parser);
|
|
26365
|
-
|
|
26366
|
-
|
|
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
|
+
})();
|
|
26367
26759
|
var Validator = /*#__PURE__*/ function(Parser1) {
|
|
26368
26760
|
var Validator = function Validator() {
|
|
26369
26761
|
return Parser1.apply(this, arguments);
|
|
@@ -26433,17 +26825,19 @@ var GLTFParser = /*#__PURE__*/ function() {
|
|
|
26433
26825
|
};
|
|
26434
26826
|
return GLTFParser;
|
|
26435
26827
|
}();
|
|
26436
|
-
|
|
26437
|
-
|
|
26438
|
-
|
|
26439
|
-
|
|
26440
|
-
|
|
26441
|
-
|
|
26442
|
-
|
|
26443
|
-
|
|
26444
|
-
|
|
26445
|
-
|
|
26446
|
-
|
|
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
|
+
})();
|
|
26447
26841
|
/**
|
|
26448
26842
|
* Product after GLTF parser, usually, `defaultSceneRoot` is only needed to use.
|
|
26449
26843
|
*/ var GLTFResource = /*#__PURE__*/ function(EngineObject) {
|
|
@@ -26493,7 +26887,7 @@ var GLTFLoader = /*#__PURE__*/ function(Loader) {
|
|
|
26493
26887
|
context.keepMeshData = (_item_params_keepMeshData = (_item_params = item.params) == null ? void 0 : _item_params.keepMeshData) != null ? _item_params_keepMeshData : false;
|
|
26494
26888
|
masterPromiseInfo.onCancel(function() {
|
|
26495
26889
|
var chainPromises = context.chainPromises;
|
|
26496
|
-
for(var _iterator =
|
|
26890
|
+
for(var _iterator = _create_for_of_iterator_helper_loose(chainPromises), _step; !(_step = _iterator()).done;){
|
|
26497
26891
|
var promise = _step.value;
|
|
26498
26892
|
promise.cancel();
|
|
26499
26893
|
}
|
|
@@ -26753,37 +27147,75 @@ var HDRLoader = (_HDRLoader = /*#__PURE__*/ function(Loader) {
|
|
|
26753
27147
|
color.a *= M;
|
|
26754
27148
|
};
|
|
26755
27149
|
return HDRLoader1;
|
|
26756
|
-
}(miniprogram$5.Loader),
|
|
26757
|
-
_HDRLoader._rightBottomBack,
|
|
26758
|
-
|
|
26759
|
-
_HDRLoader.
|
|
26760
|
-
|
|
26761
|
-
|
|
26762
|
-
|
|
26763
|
-
_HDRLoader.
|
|
26764
|
-
|
|
26765
|
-
_HDRLoader.
|
|
26766
|
-
|
|
26767
|
-
_HDRLoader._leftBottomFront,
|
|
26768
|
-
|
|
26769
|
-
_HDRLoader.
|
|
26770
|
-
|
|
26771
|
-
|
|
26772
|
-
|
|
26773
|
-
_HDRLoader.
|
|
26774
|
-
|
|
26775
|
-
|
|
26776
|
-
|
|
26777
|
-
|
|
26778
|
-
|
|
26779
|
-
|
|
26780
|
-
_HDRLoader.
|
|
26781
|
-
|
|
26782
|
-
|
|
26783
|
-
|
|
26784
|
-
|
|
26785
|
-
|
|
26786
|
-
|
|
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);
|
|
26787
27219
|
HDRLoader = __decorate([
|
|
26788
27220
|
miniprogram$5.resourceLoader(miniprogram$5.AssetType.HDR, [
|
|
26789
27221
|
"hdr"
|
|
@@ -27153,7 +27585,7 @@ function _defineProperties$1(target, props) {
|
|
|
27153
27585
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
27154
27586
|
}
|
|
27155
27587
|
}
|
|
27156
|
-
function
|
|
27588
|
+
function _create_class$1(Constructor, protoProps, staticProps) {
|
|
27157
27589
|
if (protoProps) _defineProperties$1(Constructor.prototype, protoProps);
|
|
27158
27590
|
if (staticProps) _defineProperties$1(Constructor, staticProps);
|
|
27159
27591
|
return Constructor;
|
|
@@ -27264,7 +27696,7 @@ var BufferReader = /*#__PURE__*/ function() {
|
|
|
27264
27696
|
if (byteLength < maxByteLength) this._offset++;
|
|
27265
27697
|
return new Uint8Array(this._dataView.buffer, this._dataView.byteOffset + byteOffset, byteLength);
|
|
27266
27698
|
};
|
|
27267
|
-
|
|
27699
|
+
_create_class$1(BufferReader, [
|
|
27268
27700
|
{
|
|
27269
27701
|
key: "offset",
|
|
27270
27702
|
get: function get() {
|
|
@@ -27274,12 +27706,14 @@ var BufferReader = /*#__PURE__*/ function() {
|
|
|
27274
27706
|
]);
|
|
27275
27707
|
return BufferReader;
|
|
27276
27708
|
}();
|
|
27277
|
-
|
|
27278
|
-
|
|
27279
|
-
|
|
27280
|
-
|
|
27281
|
-
|
|
27282
|
-
|
|
27709
|
+
(function() {
|
|
27710
|
+
BufferReader.imageMapping = {
|
|
27711
|
+
0: "image/png",
|
|
27712
|
+
1: "image/jpg",
|
|
27713
|
+
2: "image/webp",
|
|
27714
|
+
3: "ktx"
|
|
27715
|
+
};
|
|
27716
|
+
})();
|
|
27283
27717
|
var decoderMap = {};
|
|
27284
27718
|
/**
|
|
27285
27719
|
* Decoder decorator generator.
|
|
@@ -27316,7 +27750,7 @@ var FileHeader = /*#__PURE__*/ function() {
|
|
|
27316
27750
|
header.headerLength = nameUint8Array.byteLength + typeUint8Array.byteLength + 9;
|
|
27317
27751
|
return header;
|
|
27318
27752
|
};
|
|
27319
|
-
|
|
27753
|
+
_create_class$1(FileHeader, [
|
|
27320
27754
|
{
|
|
27321
27755
|
key: "dataLength",
|
|
27322
27756
|
get: function get() {
|
|
@@ -27532,36 +27966,32 @@ exports.Texture2DDecoder = /*#__PURE__*/ function() {
|
|
|
27532
27966
|
exports.Texture2DDecoder = __decorate([
|
|
27533
27967
|
decoder("Texture2D")
|
|
27534
27968
|
], exports.Texture2DDecoder);
|
|
27535
|
-
function
|
|
27969
|
+
function _is_native_reflect_construct() {
|
|
27536
27970
|
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
27537
27971
|
if (Reflect.construct.sham) return false;
|
|
27538
27972
|
if (typeof Proxy === "function") return true;
|
|
27539
27973
|
try {
|
|
27540
|
-
|
|
27974
|
+
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
27541
27975
|
return true;
|
|
27542
27976
|
} catch (e) {
|
|
27543
27977
|
return false;
|
|
27544
27978
|
}
|
|
27545
27979
|
}
|
|
27546
|
-
function
|
|
27547
|
-
if (
|
|
27548
|
-
|
|
27549
|
-
|
|
27550
|
-
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) {
|
|
27551
27984
|
var a = [
|
|
27552
27985
|
null
|
|
27553
27986
|
];
|
|
27554
27987
|
a.push.apply(a, args);
|
|
27555
27988
|
var Constructor = Function.bind.apply(Parent, a);
|
|
27556
27989
|
var instance = new Constructor();
|
|
27557
|
-
if (Class)
|
|
27990
|
+
if (Class) _set_prototype_of$1(instance, Class.prototype);
|
|
27558
27991
|
return instance;
|
|
27559
27992
|
};
|
|
27560
27993
|
}
|
|
27561
|
-
return
|
|
27562
|
-
}
|
|
27563
|
-
function _construct(Parent, args, Class) {
|
|
27564
|
-
return construct.apply(null, arguments);
|
|
27994
|
+
return _construct.apply(null, arguments);
|
|
27565
27995
|
}
|
|
27566
27996
|
var ReflectionParser = /*#__PURE__*/ function() {
|
|
27567
27997
|
var ReflectionParser = function ReflectionParser() {};
|
|
@@ -27675,7 +28105,9 @@ var ReflectionParser = /*#__PURE__*/ function() {
|
|
|
27675
28105
|
};
|
|
27676
28106
|
return ReflectionParser;
|
|
27677
28107
|
}();
|
|
27678
|
-
|
|
28108
|
+
(function() {
|
|
28109
|
+
ReflectionParser.customParseComponentHandles = new Map();
|
|
28110
|
+
})();
|
|
27679
28111
|
var PrefabParser = /*#__PURE__*/ function() {
|
|
27680
28112
|
var PrefabParser = function PrefabParser() {};
|
|
27681
28113
|
PrefabParser.parseChildren = function parseChildren(entitiesConfig, entities, parentId) {
|
|
@@ -27924,7 +28356,7 @@ var SceneParserContext = /*#__PURE__*/ function() {
|
|
|
27924
28356
|
};
|
|
27925
28357
|
_proto._organizeEntities = function _organizeEntities() {
|
|
27926
28358
|
var _this_context = this.context, entityConfigMap = _this_context.entityConfigMap, entityMap = _this_context.entityMap, scene = _this_context.scene, rootIds = _this_context.rootIds;
|
|
27927
|
-
for(var _iterator =
|
|
28359
|
+
for(var _iterator = _create_for_of_iterator_helper_loose(rootIds), _step; !(_step = _iterator()).done;){
|
|
27928
28360
|
var rootId = _step.value;
|
|
27929
28361
|
PrefabParser.parseChildren(entityConfigMap, entityMap, rootId);
|
|
27930
28362
|
}
|
|
@@ -28083,7 +28515,7 @@ var SourceFontLoader = /*#__PURE__*/ function(Loader) {
|
|
|
28083
28515
|
});
|
|
28084
28516
|
};
|
|
28085
28517
|
_proto._registerFont = function _registerFont(fontName, fontUrl) {
|
|
28086
|
-
return
|
|
28518
|
+
return _async_to_generator(function() {
|
|
28087
28519
|
var fontFace;
|
|
28088
28520
|
return __generator(this, function(_state) {
|
|
28089
28521
|
switch(_state.label){
|
|
@@ -28399,7 +28831,7 @@ SceneLoader = __decorate([
|
|
|
28399
28831
|
"prefab"
|
|
28400
28832
|
], true)
|
|
28401
28833
|
], SceneLoader);
|
|
28402
|
-
ReflectionParser.registerCustomParseComponent("TextRenderer", /*#__PURE__*/
|
|
28834
|
+
ReflectionParser.registerCustomParseComponent("TextRenderer", /*#__PURE__*/ _async_to_generator(function(instance, item, engine) {
|
|
28403
28835
|
var props;
|
|
28404
28836
|
return __generator(this, function(_state) {
|
|
28405
28837
|
props = item.props;
|
|
@@ -28465,7 +28897,7 @@ function _defineProperties(target, props) {
|
|
|
28465
28897
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
28466
28898
|
}
|
|
28467
28899
|
}
|
|
28468
|
-
function
|
|
28900
|
+
function _create_class(Constructor, protoProps, staticProps) {
|
|
28469
28901
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
28470
28902
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
28471
28903
|
return Constructor;
|
|
@@ -28515,9 +28947,15 @@ function _createClass(Constructor, protoProps, staticProps) {
|
|
|
28515
28947
|
};
|
|
28516
28948
|
return MathUtil;
|
|
28517
28949
|
}();
|
|
28518
|
-
|
|
28519
|
-
/** The
|
|
28520
|
-
|
|
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
|
+
})();
|
|
28521
28959
|
/**
|
|
28522
28960
|
* Describes a 3D-vector.
|
|
28523
28961
|
*/ var Vector3 = /*#__PURE__*/ function() {
|
|
@@ -28975,7 +29413,7 @@ function _createClass(Constructor, protoProps, staticProps) {
|
|
|
28975
29413
|
out._z = iz * qw - iw * qz - ix * qy + iy * qx;
|
|
28976
29414
|
out._onValueChanged && out._onValueChanged();
|
|
28977
29415
|
};
|
|
28978
|
-
|
|
29416
|
+
_create_class(Vector3, [
|
|
28979
29417
|
{
|
|
28980
29418
|
key: "x",
|
|
28981
29419
|
get: /**
|
|
@@ -29015,8 +29453,12 @@ function _createClass(Constructor, protoProps, staticProps) {
|
|
|
29015
29453
|
]);
|
|
29016
29454
|
return Vector3;
|
|
29017
29455
|
}();
|
|
29018
|
-
|
|
29019
|
-
/** @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
|
+
})();
|
|
29020
29462
|
/**
|
|
29021
29463
|
* A bounding sphere.
|
|
29022
29464
|
* */ var BoundingSphere = /*#__PURE__*/ function() {
|
|
@@ -29084,7 +29526,9 @@ function _createClass(Constructor, protoProps, staticProps) {
|
|
|
29084
29526
|
};
|
|
29085
29527
|
return BoundingSphere;
|
|
29086
29528
|
}();
|
|
29087
|
-
|
|
29529
|
+
(function() {
|
|
29530
|
+
BoundingSphere._tempVec30 = new Vector3();
|
|
29531
|
+
})();
|
|
29088
29532
|
/**
|
|
29089
29533
|
* Axis Aligned Bound Box (AABB).
|
|
29090
29534
|
*/ var BoundingBox = /*#__PURE__*/ function() {
|
|
@@ -29242,8 +29686,12 @@ BoundingSphere._tempVec30 = new Vector3();
|
|
|
29242
29686
|
};
|
|
29243
29687
|
return BoundingBox;
|
|
29244
29688
|
}();
|
|
29245
|
-
|
|
29246
|
-
BoundingBox.
|
|
29689
|
+
(function() {
|
|
29690
|
+
BoundingBox._tempVec30 = new Vector3();
|
|
29691
|
+
})();
|
|
29692
|
+
(function() {
|
|
29693
|
+
BoundingBox._tempVec31 = new Vector3();
|
|
29694
|
+
})();
|
|
29247
29695
|
/**
|
|
29248
29696
|
* Contains static methods to help in determining intersections, containment, etc.
|
|
29249
29697
|
*/ var CollisionUtil = /*#__PURE__*/ function() {
|
|
@@ -29591,9 +30039,15 @@ BoundingBox._tempVec31 = new Vector3();
|
|
|
29591
30039
|
};
|
|
29592
30040
|
return CollisionUtil;
|
|
29593
30041
|
}();
|
|
29594
|
-
|
|
29595
|
-
CollisionUtil.
|
|
29596
|
-
|
|
30042
|
+
(function() {
|
|
30043
|
+
CollisionUtil._tempVec30 = new Vector3();
|
|
30044
|
+
})();
|
|
30045
|
+
(function() {
|
|
30046
|
+
CollisionUtil._tempVec31 = new Vector3();
|
|
30047
|
+
})();
|
|
30048
|
+
(function() {
|
|
30049
|
+
CollisionUtil._tempVec32 = new Vector3();
|
|
30050
|
+
})();
|
|
29597
30051
|
/**
|
|
29598
30052
|
* Represents a plane in three-dimensional space.
|
|
29599
30053
|
*/ var Plane = /*#__PURE__*/ function() {
|
|
@@ -30913,7 +31367,7 @@ CollisionUtil._tempVec32 = new Vector3();
|
|
|
30913
31367
|
out._w = a._w * s;
|
|
30914
31368
|
out._onValueChanged && out._onValueChanged();
|
|
30915
31369
|
};
|
|
30916
|
-
|
|
31370
|
+
_create_class(Quaternion, [
|
|
30917
31371
|
{
|
|
30918
31372
|
key: "x",
|
|
30919
31373
|
get: /**
|
|
@@ -30973,8 +31427,12 @@ CollisionUtil._tempVec32 = new Vector3();
|
|
|
30973
31427
|
]);
|
|
30974
31428
|
return Quaternion;
|
|
30975
31429
|
}();
|
|
30976
|
-
|
|
30977
|
-
/** @internal */ Quaternion.
|
|
31430
|
+
(function() {
|
|
31431
|
+
/** @internal */ Quaternion._tempVector3 = new Vector3();
|
|
31432
|
+
})();
|
|
31433
|
+
(function() {
|
|
31434
|
+
/** @internal */ Quaternion._tempQuat1 = new Quaternion();
|
|
31435
|
+
})();
|
|
30978
31436
|
/**
|
|
30979
31437
|
* Represents a 4x4 mathematical matrix.
|
|
30980
31438
|
*/ var Matrix = /*#__PURE__*/ function() {
|
|
@@ -31919,11 +32377,21 @@ CollisionUtil._tempVec32 = new Vector3();
|
|
|
31919
32377
|
};
|
|
31920
32378
|
return Matrix;
|
|
31921
32379
|
}();
|
|
31922
|
-
|
|
31923
|
-
Matrix.
|
|
31924
|
-
|
|
31925
|
-
|
|
31926
|
-
|
|
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
|
+
})();
|
|
31927
32395
|
/**
|
|
31928
32396
|
* Represents a ray with an origin and a direction in 3D space.
|
|
31929
32397
|
*/ var Ray = /*#__PURE__*/ function() {
|
|
@@ -32257,7 +32725,7 @@ Matrix._tempMat30 = new Matrix3x3();
|
|
|
32257
32725
|
out._y = left._y * s;
|
|
32258
32726
|
out._onValueChanged && out._onValueChanged();
|
|
32259
32727
|
};
|
|
32260
|
-
|
|
32728
|
+
_create_class(Vector2, [
|
|
32261
32729
|
{
|
|
32262
32730
|
key: "x",
|
|
32263
32731
|
get: /**
|
|
@@ -32285,8 +32753,12 @@ Matrix._tempMat30 = new Matrix3x3();
|
|
|
32285
32753
|
]);
|
|
32286
32754
|
return Vector2;
|
|
32287
32755
|
}();
|
|
32288
|
-
|
|
32289
|
-
/** @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
|
+
})();
|
|
32290
32762
|
/**
|
|
32291
32763
|
* Describes a 4D-vector.
|
|
32292
32764
|
*/ var Vector4 = /*#__PURE__*/ function() {
|
|
@@ -32666,7 +33138,7 @@ Matrix._tempMat30 = new Matrix3x3();
|
|
|
32666
33138
|
out._w = w;
|
|
32667
33139
|
out._onValueChanged && out._onValueChanged();
|
|
32668
33140
|
};
|
|
32669
|
-
|
|
33141
|
+
_create_class(Vector4, [
|
|
32670
33142
|
{
|
|
32671
33143
|
key: "x",
|
|
32672
33144
|
get: /**
|
|
@@ -32718,8 +33190,12 @@ Matrix._tempMat30 = new Matrix3x3();
|
|
|
32718
33190
|
]);
|
|
32719
33191
|
return Vector4;
|
|
32720
33192
|
}();
|
|
32721
|
-
|
|
32722
|
-
/** @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
|
+
})();
|
|
32723
33199
|
/**
|
|
32724
33200
|
* Describes a color in the from of RGBA (in order: R, G, B, A).
|
|
32725
33201
|
*/ var Color = /*#__PURE__*/ function() {
|
|
@@ -32928,7 +33404,7 @@ Matrix._tempMat30 = new Matrix3x3();
|
|
|
32928
33404
|
out._onValueChanged && out._onValueChanged();
|
|
32929
33405
|
return out;
|
|
32930
33406
|
};
|
|
32931
|
-
|
|
33407
|
+
_create_class(Color, [
|
|
32932
33408
|
{
|
|
32933
33409
|
key: "r",
|
|
32934
33410
|
get: /**
|
|
@@ -33286,7 +33762,7 @@ function _defineProperties(target, props) {
|
|
|
33286
33762
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
33287
33763
|
}
|
|
33288
33764
|
}
|
|
33289
|
-
function
|
|
33765
|
+
function _create_class(Constructor, protoProps, staticProps) {
|
|
33290
33766
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
33291
33767
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
33292
33768
|
return Constructor;
|
|
@@ -33294,9 +33770,7 @@ function _createClass(Constructor, protoProps, staticProps) {
|
|
|
33294
33770
|
function _instanceof1(left, right) {
|
|
33295
33771
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
33296
33772
|
return !!right[Symbol.hasInstance](left);
|
|
33297
|
-
} else
|
|
33298
|
-
return _instanceof(left, right);
|
|
33299
|
-
}
|
|
33773
|
+
} else return _instanceof(left, right);
|
|
33300
33774
|
}
|
|
33301
33775
|
/**
|
|
33302
33776
|
* The canvas used on the web, which can support HTMLCanvasElement and OffscreenCanvas.
|
|
@@ -33329,7 +33803,7 @@ function _instanceof1(left, right) {
|
|
|
33329
33803
|
this._scale.set(x, y);
|
|
33330
33804
|
this.scale = this._scale;
|
|
33331
33805
|
};
|
|
33332
|
-
|
|
33806
|
+
_create_class(WebCanvas, [
|
|
33333
33807
|
{
|
|
33334
33808
|
key: "width",
|
|
33335
33809
|
get: /**
|
|
@@ -33381,15 +33855,12 @@ function _instanceof1(left, right) {
|
|
|
33381
33855
|
]);
|
|
33382
33856
|
return WebCanvas;
|
|
33383
33857
|
}();
|
|
33384
|
-
function
|
|
33385
|
-
|
|
33858
|
+
function _set_prototype_of(o, p) {
|
|
33859
|
+
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
33386
33860
|
o.__proto__ = p;
|
|
33387
33861
|
return o;
|
|
33388
33862
|
};
|
|
33389
|
-
return
|
|
33390
|
-
}
|
|
33391
|
-
function _setPrototypeOf(o, p) {
|
|
33392
|
-
return setPrototypeOf(o, p);
|
|
33863
|
+
return _set_prototype_of(o, p);
|
|
33393
33864
|
}
|
|
33394
33865
|
function _inherits(subClass, superClass) {
|
|
33395
33866
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
@@ -33402,132 +33873,18 @@ function _inherits(subClass, superClass) {
|
|
|
33402
33873
|
configurable: true
|
|
33403
33874
|
}
|
|
33404
33875
|
});
|
|
33405
|
-
if (superClass)
|
|
33876
|
+
if (superClass) _set_prototype_of(subClass, superClass);
|
|
33406
33877
|
}
|
|
33407
|
-
|
|
33408
|
-
|
|
33409
|
-
*/ var WebGLEngine = /*#__PURE__*/ function(Engine) {
|
|
33410
|
-
var WebGLEngine = function WebGLEngine() {
|
|
33411
|
-
return Engine.apply(this, arguments);
|
|
33412
|
-
};
|
|
33413
|
-
_inherits(WebGLEngine, Engine);
|
|
33414
|
-
/**
|
|
33415
|
-
* Create a WebGL engine.
|
|
33416
|
-
* @param configuration - WebGL engine configuration
|
|
33417
|
-
* @returns A promise that will resolve when the engine is created
|
|
33418
|
-
*/ WebGLEngine.create = function create(configuration) {
|
|
33419
|
-
var canvas = configuration.canvas;
|
|
33420
|
-
var webCanvas = new WebCanvas(typeof canvas === "string" ? engineMiniprogramAdapter.document.getElementById(canvas) : canvas);
|
|
33421
|
-
var webGLRenderer = new WebGLGraphicDevice(configuration.graphicDeviceOptions);
|
|
33422
|
-
var engine = new WebGLEngine(webCanvas, webGLRenderer, configuration);
|
|
33423
|
-
return engine._initialize(configuration);
|
|
33424
|
-
};
|
|
33425
|
-
_createClass(WebGLEngine, [
|
|
33426
|
-
{
|
|
33427
|
-
key: "canvas",
|
|
33428
|
-
get: /**
|
|
33429
|
-
* Web canvas.
|
|
33430
|
-
*/ function get() {
|
|
33431
|
-
return this._canvas;
|
|
33432
|
-
}
|
|
33433
|
-
}
|
|
33434
|
-
]);
|
|
33435
|
-
return WebGLEngine;
|
|
33436
|
-
}(miniprogram$1$1.Engine);
|
|
33437
|
-
function extends_() {
|
|
33438
|
-
extends_ = Object.assign || function(target) {
|
|
33878
|
+
function _extends() {
|
|
33879
|
+
_extends = Object.assign || function assign(target) {
|
|
33439
33880
|
for(var i = 1; i < arguments.length; i++){
|
|
33440
33881
|
var source = arguments[i];
|
|
33441
|
-
for(var key in source)
|
|
33442
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
33443
|
-
target[key] = source[key];
|
|
33444
|
-
}
|
|
33445
|
-
}
|
|
33882
|
+
for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
|
|
33446
33883
|
}
|
|
33447
33884
|
return target;
|
|
33448
33885
|
};
|
|
33449
|
-
return
|
|
33450
|
-
}
|
|
33451
|
-
function _extends() {
|
|
33452
|
-
return extends_.apply(this, arguments);
|
|
33886
|
+
return _extends.apply(this, arguments);
|
|
33453
33887
|
}
|
|
33454
|
-
var GLBuffer = /*#__PURE__*/ function() {
|
|
33455
|
-
var GLBuffer = function GLBuffer(rhi, type, byteLength, bufferUsage, data) {
|
|
33456
|
-
if (bufferUsage === void 0) bufferUsage = miniprogram$1$1.BufferUsage.Static;
|
|
33457
|
-
var gl = rhi.gl;
|
|
33458
|
-
var glBuffer = gl.createBuffer();
|
|
33459
|
-
var glBufferUsage = this._getGLBufferUsage(gl, bufferUsage);
|
|
33460
|
-
var glBindTarget = type === miniprogram$1$1.BufferBindFlag.VertexBuffer ? gl.ARRAY_BUFFER : gl.ELEMENT_ARRAY_BUFFER;
|
|
33461
|
-
this._gl = gl;
|
|
33462
|
-
this._glBuffer = glBuffer;
|
|
33463
|
-
this._glBufferUsage = glBufferUsage;
|
|
33464
|
-
this._glBindTarget = glBindTarget;
|
|
33465
|
-
this._isWebGL2 = rhi.isWebGL2;
|
|
33466
|
-
this.bind();
|
|
33467
|
-
if (data) {
|
|
33468
|
-
gl.bufferData(glBindTarget, data, glBufferUsage);
|
|
33469
|
-
} else {
|
|
33470
|
-
gl.bufferData(glBindTarget, byteLength, glBufferUsage);
|
|
33471
|
-
}
|
|
33472
|
-
gl.bindBuffer(glBindTarget, null);
|
|
33473
|
-
};
|
|
33474
|
-
var _proto = GLBuffer.prototype;
|
|
33475
|
-
_proto.bind = function bind() {
|
|
33476
|
-
this._gl.bindBuffer(this._glBindTarget, this._glBuffer);
|
|
33477
|
-
};
|
|
33478
|
-
_proto.setData = function setData(byteLength, data, bufferByteOffset, dataOffset, dataLength, options) {
|
|
33479
|
-
var gl = this._gl;
|
|
33480
|
-
var glBindTarget = this._glBindTarget;
|
|
33481
|
-
this.bind();
|
|
33482
|
-
if (options === miniprogram$1$1.SetDataOptions.Discard) {
|
|
33483
|
-
gl.bufferData(glBindTarget, byteLength, this._glBufferUsage);
|
|
33484
|
-
}
|
|
33485
|
-
// TypeArray is BYTES_PER_ELEMENT, unTypeArray is 1
|
|
33486
|
-
var byteSize = data.BYTES_PER_ELEMENT || 1;
|
|
33487
|
-
var dataByteLength = dataLength ? byteSize * dataLength : data.byteLength;
|
|
33488
|
-
if (dataOffset !== 0 || dataByteLength < data.byteLength) {
|
|
33489
|
-
var isArrayBufferView = data.byteOffset !== undefined;
|
|
33490
|
-
if (this._isWebGL2 && isArrayBufferView) {
|
|
33491
|
-
gl.bufferSubData(glBindTarget, bufferByteOffset, data, dataOffset, dataByteLength / byteSize);
|
|
33492
|
-
} else {
|
|
33493
|
-
var subData = new Uint8Array(isArrayBufferView ? data.buffer : data, dataOffset * byteSize, dataByteLength);
|
|
33494
|
-
gl.bufferSubData(glBindTarget, bufferByteOffset, subData);
|
|
33495
|
-
}
|
|
33496
|
-
} else {
|
|
33497
|
-
gl.bufferSubData(glBindTarget, bufferByteOffset, data);
|
|
33498
|
-
}
|
|
33499
|
-
gl.bindBuffer(glBindTarget, null);
|
|
33500
|
-
};
|
|
33501
|
-
_proto.getData = function getData(data, bufferByteOffset, dataOffset, dataLength) {
|
|
33502
|
-
if (this._isWebGL2) {
|
|
33503
|
-
var gl = this._gl;
|
|
33504
|
-
this.bind();
|
|
33505
|
-
gl.getBufferSubData(this._glBindTarget, bufferByteOffset, data, dataOffset, dataLength);
|
|
33506
|
-
} else {
|
|
33507
|
-
throw "Buffer is write-only on WebGL1.0 platforms.";
|
|
33508
|
-
}
|
|
33509
|
-
};
|
|
33510
|
-
_proto.resize = function resize(byteLength) {
|
|
33511
|
-
this.bind();
|
|
33512
|
-
this._gl.bufferData(this._glBindTarget, byteLength, this._glBufferUsage);
|
|
33513
|
-
};
|
|
33514
|
-
_proto.destroy = function destroy() {
|
|
33515
|
-
this._gl.deleteBuffer(this._glBuffer);
|
|
33516
|
-
this._gl = null;
|
|
33517
|
-
this._glBuffer = null;
|
|
33518
|
-
};
|
|
33519
|
-
_proto._getGLBufferUsage = function _getGLBufferUsage(gl, bufferUsage) {
|
|
33520
|
-
switch(bufferUsage){
|
|
33521
|
-
case miniprogram$1$1.BufferUsage.Static:
|
|
33522
|
-
return gl.STATIC_DRAW;
|
|
33523
|
-
case miniprogram$1$1.BufferUsage.Dynamic:
|
|
33524
|
-
return gl.DYNAMIC_DRAW;
|
|
33525
|
-
case miniprogram$1$1.BufferUsage.Stream:
|
|
33526
|
-
return gl.STREAM_DRAW;
|
|
33527
|
-
}
|
|
33528
|
-
};
|
|
33529
|
-
return GLBuffer;
|
|
33530
|
-
}();
|
|
33531
33888
|
/**
|
|
33532
33889
|
* GL capability.
|
|
33533
33890
|
*/ var GLCapability = /*#__PURE__*/ function() {
|
|
@@ -33659,7 +34016,7 @@ var GLBuffer = /*#__PURE__*/ function() {
|
|
|
33659
34016
|
TEXTURE_MAX_ANISOTROPY_EXT: "TEXTURE_MAX_ANISOTROPY_EXT"
|
|
33660
34017
|
});
|
|
33661
34018
|
};
|
|
33662
|
-
|
|
34019
|
+
_create_class(GLCapability, [
|
|
33663
34020
|
{
|
|
33664
34021
|
key: "maxTextureSize",
|
|
33665
34022
|
get: function get() {
|
|
@@ -33790,8 +34147,8 @@ var GLBuffer = /*#__PURE__*/ function() {
|
|
|
33790
34147
|
if (useVao) {
|
|
33791
34148
|
gl.drawElements(topology, count, _glIndexType, start * _glIndexByteCount);
|
|
33792
34149
|
} else {
|
|
33793
|
-
var
|
|
33794
|
-
gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER,
|
|
34150
|
+
var _nativeBuffer = _indexBufferBinding.buffer._nativeBuffer;
|
|
34151
|
+
gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, _nativeBuffer);
|
|
33795
34152
|
gl.drawElements(topology, count, _glIndexType, start * _glIndexByteCount);
|
|
33796
34153
|
gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null);
|
|
33797
34154
|
}
|
|
@@ -33804,8 +34161,8 @@ var GLBuffer = /*#__PURE__*/ function() {
|
|
|
33804
34161
|
if (useVao) {
|
|
33805
34162
|
gl.drawElementsInstanced(topology, count, _glIndexType, start * _glIndexByteCount, _instanceCount);
|
|
33806
34163
|
} else {
|
|
33807
|
-
var
|
|
33808
|
-
gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER,
|
|
34164
|
+
var _nativeBuffer1 = _indexBufferBinding.buffer._nativeBuffer;
|
|
34165
|
+
gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, _nativeBuffer1);
|
|
33809
34166
|
gl.drawElementsInstanced(topology, count, _glIndexType, start * _glIndexByteCount, _instanceCount);
|
|
33810
34167
|
gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null);
|
|
33811
34168
|
}
|
|
@@ -33845,7 +34202,7 @@ var GLBuffer = /*#__PURE__*/ function() {
|
|
|
33845
34202
|
var element = attributes[name];
|
|
33846
34203
|
if (element) {
|
|
33847
34204
|
var _vertexBufferBindings_element_bindingIndex = vertexBufferBindings[element.bindingIndex], buffer = _vertexBufferBindings_element_bindingIndex.buffer, stride = _vertexBufferBindings_element_bindingIndex.stride;
|
|
33848
|
-
vbo = buffer.
|
|
34205
|
+
vbo = buffer._nativeBuffer;
|
|
33849
34206
|
// prevent binding the vbo which already bound at the last loop, e.g. a buffer with multiple attributes.
|
|
33850
34207
|
if (lastBoundVbo !== vbo) {
|
|
33851
34208
|
lastBoundVbo = vbo;
|
|
@@ -33877,7 +34234,7 @@ var GLBuffer = /*#__PURE__*/ function() {
|
|
|
33877
34234
|
// @ts-ignore
|
|
33878
34235
|
var _indexBufferBinding = this._primitive._indexBufferBinding;
|
|
33879
34236
|
if (_indexBufferBinding) {
|
|
33880
|
-
gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, _indexBufferBinding.buffer.
|
|
34237
|
+
gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, _indexBufferBinding.buffer._nativeBuffer);
|
|
33881
34238
|
}
|
|
33882
34239
|
this._bindBufferAndAttrib(shaderProgram);
|
|
33883
34240
|
/** unbind */ gl.bindVertexArray(null);
|
|
@@ -34409,7 +34766,7 @@ var GLBuffer = /*#__PURE__*/ function() {
|
|
|
34409
34766
|
}
|
|
34410
34767
|
return true;
|
|
34411
34768
|
};
|
|
34412
|
-
|
|
34769
|
+
_create_class(GLTexture, [
|
|
34413
34770
|
{
|
|
34414
34771
|
key: "wrapModeU",
|
|
34415
34772
|
set: /**
|
|
@@ -34934,19 +35291,20 @@ exports.WebGLMode = void 0;
|
|
|
34934
35291
|
WebGLMode[WebGLMode[/** WebGL1.0, */ "WebGL1"] = 2] = "WebGL1";
|
|
34935
35292
|
})(exports.WebGLMode || (exports.WebGLMode = {}));
|
|
34936
35293
|
/**
|
|
34937
|
-
* WebGL
|
|
34938
|
-
*/ var
|
|
34939
|
-
var
|
|
35294
|
+
* WebGL renderer, including WebGL1.0 and WebGL2.0.
|
|
35295
|
+
*/ var WebGLRenderer = /*#__PURE__*/ function() {
|
|
35296
|
+
var WebGLRenderer = function WebGLRenderer(initializeOptions) {
|
|
34940
35297
|
if (initializeOptions === void 0) initializeOptions = {};
|
|
34941
|
-
/** @internal */ this._readFrameBuffer = null;
|
|
34942
35298
|
/** @internal */ this._enableGlobalDepthBias = false;
|
|
34943
35299
|
this._activeTextures = new Array(32);
|
|
35300
|
+
// cache value
|
|
34944
35301
|
this._lastViewport = new miniprogram$1.Vector4(null, null, null, null);
|
|
34945
35302
|
this._lastScissor = new miniprogram$1.Vector4(null, null, null, null);
|
|
34946
35303
|
this._lastClearColor = new miniprogram$1.Color(null, null, null, null);
|
|
34947
35304
|
this._scissorEnable = false;
|
|
34948
35305
|
var options = _extends({
|
|
34949
35306
|
webGLMode: 0,
|
|
35307
|
+
alpha: false,
|
|
34950
35308
|
stencil: true,
|
|
34951
35309
|
_forceFlush: false
|
|
34952
35310
|
}, initializeOptions);
|
|
@@ -34961,20 +35319,12 @@ exports.WebGLMode = void 0;
|
|
|
34961
35319
|
}
|
|
34962
35320
|
}
|
|
34963
35321
|
this._options = options;
|
|
34964
|
-
this._onWebGLContextLost = this._onWebGLContextLost.bind(this);
|
|
34965
|
-
this._onWebGLContextRestored = this._onWebGLContextRestored.bind(this);
|
|
34966
35322
|
};
|
|
34967
|
-
var _proto =
|
|
34968
|
-
_proto.init = function init(canvas
|
|
35323
|
+
var _proto = WebGLRenderer.prototype;
|
|
35324
|
+
_proto.init = function init(canvas) {
|
|
34969
35325
|
var options = this._options;
|
|
34970
|
-
var webCanvas = canvas._webCanvas;
|
|
35326
|
+
var webCanvas = this._webCanvas = canvas._webCanvas;
|
|
34971
35327
|
var webGLMode = options.webGLMode;
|
|
34972
|
-
this._onDeviceLost = onDeviceLost;
|
|
34973
|
-
this._onDeviceRestored = onDeviceRestored;
|
|
34974
|
-
webCanvas.addEventListener("webglcontextlost", this._onWebGLContextLost, false);
|
|
34975
|
-
webCanvas.addEventListener("webglcontextrestored", this._onWebGLContextRestored, false);
|
|
34976
|
-
webCanvas.addEventListener("webglcontextcreationerror", this._onContextCreationError, false);
|
|
34977
|
-
this._webCanvas = webCanvas;
|
|
34978
35328
|
var gl;
|
|
34979
35329
|
if (webGLMode == 0 || webGLMode == 1) {
|
|
34980
35330
|
gl = webCanvas.getContext("webgl2", options);
|
|
@@ -35000,7 +35350,16 @@ exports.WebGLMode = void 0;
|
|
|
35000
35350
|
throw new Error("Get GL Context FAILED.");
|
|
35001
35351
|
}
|
|
35002
35352
|
this._gl = gl;
|
|
35003
|
-
this.
|
|
35353
|
+
this._activeTextureID = gl.TEXTURE0;
|
|
35354
|
+
this._renderStates = new GLRenderStates(gl);
|
|
35355
|
+
this._extensions = new GLExtensions(this);
|
|
35356
|
+
this._capability = new GLCapability(this);
|
|
35357
|
+
// Make sure the active texture in gl context is on default, because gl context may be used in other webgl renderer.
|
|
35358
|
+
gl.activeTexture(gl.TEXTURE0);
|
|
35359
|
+
var debugRenderInfo = gl.getExtension("WEBGL_debug_renderer_info");
|
|
35360
|
+
if (debugRenderInfo != null) {
|
|
35361
|
+
this._renderer = gl.getParameter(debugRenderInfo.UNMASKED_RENDERER_WEBGL);
|
|
35362
|
+
}
|
|
35004
35363
|
};
|
|
35005
35364
|
_proto.createPlatformPrimitive = function createPlatformPrimitive(primitive) {
|
|
35006
35365
|
return new GLPrimitive(this, primitive);
|
|
@@ -35017,10 +35376,6 @@ exports.WebGLMode = void 0;
|
|
|
35017
35376
|
_proto.createPlatformRenderTarget = function createPlatformRenderTarget(target) {
|
|
35018
35377
|
return new GLRenderTarget(this, target);
|
|
35019
35378
|
};
|
|
35020
|
-
_proto.createPlatformBuffer = function createPlatformBuffer(type, byteLength, bufferUsage, data) {
|
|
35021
|
-
if (bufferUsage === void 0) bufferUsage = miniprogram$1$1.BufferUsage.Static;
|
|
35022
|
-
return new GLBuffer(this, type, byteLength, bufferUsage, data);
|
|
35023
|
-
};
|
|
35024
35379
|
_proto.requireExtension = function requireExtension(ext) {
|
|
35025
35380
|
return this._extensions.requireExtension(ext);
|
|
35026
35381
|
};
|
|
@@ -35148,57 +35503,8 @@ exports.WebGLMode = void 0;
|
|
|
35148
35503
|
_proto.flush = function flush() {
|
|
35149
35504
|
this._gl.flush();
|
|
35150
35505
|
};
|
|
35151
|
-
_proto.
|
|
35152
|
-
|
|
35153
|
-
extension.loseContext();
|
|
35154
|
-
};
|
|
35155
|
-
_proto.forceRestoreDevice = function forceRestoreDevice() {
|
|
35156
|
-
var extension = this.requireExtension(miniprogram$1$1.GLCapabilityType.WEBGL_lose_context);
|
|
35157
|
-
extension.restoreContext();
|
|
35158
|
-
};
|
|
35159
|
-
_proto.resetState = function resetState() {
|
|
35160
|
-
this._readFrameBuffer = null;
|
|
35161
|
-
this._enableGlobalDepthBias = false;
|
|
35162
|
-
this._currentBindShaderProgram = null;
|
|
35163
|
-
var activeTextures = this._activeTextures;
|
|
35164
|
-
for(var i = 0, n = activeTextures.length; i < n; i++){
|
|
35165
|
-
activeTextures[i] = null;
|
|
35166
|
-
}
|
|
35167
|
-
this._lastViewport.set(null, null, null, null);
|
|
35168
|
-
this._lastScissor.set(null, null, null, null);
|
|
35169
|
-
this._lastClearColor.set(null, null, null, null);
|
|
35170
|
-
this._scissorEnable = false;
|
|
35171
|
-
this._initGLState(this._gl);
|
|
35172
|
-
};
|
|
35173
|
-
_proto._initGLState = function _initGLState(gl) {
|
|
35174
|
-
this._activeTextureID = gl.TEXTURE0;
|
|
35175
|
-
this._renderStates = new GLRenderStates(gl);
|
|
35176
|
-
this._extensions = new GLExtensions(this);
|
|
35177
|
-
this._capability = new GLCapability(this);
|
|
35178
|
-
// Make sure the active texture in gl context is on default, because gl context may be used in other webgl renderer.
|
|
35179
|
-
gl.activeTexture(gl.TEXTURE0);
|
|
35180
|
-
var debugRenderInfo = gl.getExtension("WEBGL_debug_renderer_info");
|
|
35181
|
-
if (debugRenderInfo != null) {
|
|
35182
|
-
this._renderer = gl.getParameter(debugRenderInfo.UNMASKED_RENDERER_WEBGL);
|
|
35183
|
-
}
|
|
35184
|
-
};
|
|
35185
|
-
_proto.destroy = function destroy() {
|
|
35186
|
-
var webCanvas = this._webCanvas;
|
|
35187
|
-
webCanvas.removeEventListener("webglcontextcreationerror", this._onContextCreationError, false);
|
|
35188
|
-
webCanvas.removeEventListener("webglcontextlost", this._onWebGLContextLost, false);
|
|
35189
|
-
webCanvas.removeEventListener("webglcontextrestored", this._onWebGLContextRestored, false);
|
|
35190
|
-
};
|
|
35191
|
-
_proto._onContextCreationError = function _onContextCreationError(event) {
|
|
35192
|
-
console.error("WebGLRenderer: WebGL context could not be created. Reason: ", event.statusMessage);
|
|
35193
|
-
};
|
|
35194
|
-
_proto._onWebGLContextLost = function _onWebGLContextLost(event) {
|
|
35195
|
-
event.preventDefault();
|
|
35196
|
-
this._onDeviceLost();
|
|
35197
|
-
};
|
|
35198
|
-
_proto._onWebGLContextRestored = function _onWebGLContextRestored(event) {
|
|
35199
|
-
this._onDeviceRestored();
|
|
35200
|
-
};
|
|
35201
|
-
_createClass(WebGLGraphicDevice, [
|
|
35506
|
+
_proto.destroy = function destroy() {};
|
|
35507
|
+
_create_class(WebGLRenderer, [
|
|
35202
35508
|
{
|
|
35203
35509
|
key: "isWebGL2",
|
|
35204
35510
|
get: function get() {
|
|
@@ -35239,11 +35545,32 @@ exports.WebGLMode = void 0;
|
|
|
35239
35545
|
}
|
|
35240
35546
|
}
|
|
35241
35547
|
]);
|
|
35242
|
-
return
|
|
35548
|
+
return WebGLRenderer;
|
|
35243
35549
|
}();
|
|
35550
|
+
/**
|
|
35551
|
+
* WebGL platform engine,support includes WebGL1.0 and WebGL2.0.
|
|
35552
|
+
*/ var WebGLEngine = /*#__PURE__*/ function(Engine) {
|
|
35553
|
+
var WebGLEngine = function WebGLEngine(canvas, webGLRendererOptions) {
|
|
35554
|
+
var webCanvas = new WebCanvas(typeof canvas === "string" ? engineMiniprogramAdapter.document.getElementById(canvas) : canvas);
|
|
35555
|
+
var hardwareRenderer = new WebGLRenderer(webGLRendererOptions);
|
|
35556
|
+
return Engine.call(this, webCanvas, hardwareRenderer);
|
|
35557
|
+
};
|
|
35558
|
+
_inherits(WebGLEngine, Engine);
|
|
35559
|
+
_create_class(WebGLEngine, [
|
|
35560
|
+
{
|
|
35561
|
+
key: "canvas",
|
|
35562
|
+
get: /**
|
|
35563
|
+
* Web canvas.
|
|
35564
|
+
*/ function get() {
|
|
35565
|
+
return this._canvas;
|
|
35566
|
+
}
|
|
35567
|
+
}
|
|
35568
|
+
]);
|
|
35569
|
+
return WebGLEngine;
|
|
35570
|
+
}(miniprogram$1$1.Engine);
|
|
35244
35571
|
exports.WebCanvas = WebCanvas;
|
|
35245
35572
|
exports.WebGLEngine = WebGLEngine;
|
|
35246
|
-
exports.
|
|
35573
|
+
exports.WebGLRenderer = WebGLRenderer;
|
|
35247
35574
|
|
|
35248
35575
|
var miniprogram$3 = /*#__PURE__*/Object.freeze({
|
|
35249
35576
|
__proto__: null
|
|
@@ -35284,7 +35611,7 @@ function _interopNamespace(e) {
|
|
|
35284
35611
|
}
|
|
35285
35612
|
var CoreObjects__namespace = /*#__PURE__*/ _interopNamespace(CoreObjects);
|
|
35286
35613
|
//@ts-ignore
|
|
35287
|
-
var version = "0.9.0
|
|
35614
|
+
var version = "0.9.0";
|
|
35288
35615
|
console.log("Galacean engine version: " + version);
|
|
35289
35616
|
for(var key in CoreObjects__namespace){
|
|
35290
35617
|
CoreObjects.Loader.registerClass(key, CoreObjects__namespace[key]);
|
|
@@ -35452,8 +35779,12 @@ Object.keys(miniprogram$2).forEach(function(k) {
|
|
|
35452
35779
|
};
|
|
35453
35780
|
return LiteColliderShape;
|
|
35454
35781
|
}();
|
|
35455
|
-
|
|
35456
|
-
LiteColliderShape.
|
|
35782
|
+
(function() {
|
|
35783
|
+
LiteColliderShape._ray = new miniprogram_1.Ray();
|
|
35784
|
+
})();
|
|
35785
|
+
(function() {
|
|
35786
|
+
LiteColliderShape._tempPoint = new miniprogram_1.Vector3();
|
|
35787
|
+
})();
|
|
35457
35788
|
|
|
35458
35789
|
/**
|
|
35459
35790
|
* Used to implement transformation related functions.
|
|
@@ -35596,7 +35927,7 @@ LiteColliderShape._tempPoint = new miniprogram_1.Vector3();
|
|
|
35596
35927
|
this._dirtyFlag |= type;
|
|
35597
35928
|
this._updateFlagManager.distribute();
|
|
35598
35929
|
};
|
|
35599
|
-
|
|
35930
|
+
_create_class$3(LiteTransform, [
|
|
35600
35931
|
{
|
|
35601
35932
|
key: "owner",
|
|
35602
35933
|
set: function set(value) {
|
|
@@ -35745,8 +36076,12 @@ LiteColliderShape._tempPoint = new miniprogram_1.Vector3();
|
|
|
35745
36076
|
]);
|
|
35746
36077
|
return LiteTransform;
|
|
35747
36078
|
}();
|
|
35748
|
-
|
|
35749
|
-
LiteTransform.
|
|
36079
|
+
(function() {
|
|
36080
|
+
LiteTransform._tempQuat0 = new miniprogram_1.Quaternion();
|
|
36081
|
+
})();
|
|
36082
|
+
(function() {
|
|
36083
|
+
LiteTransform._tempMat42 = new miniprogram_1.Matrix();
|
|
36084
|
+
})();
|
|
35750
36085
|
var /**
|
|
35751
36086
|
* Dirty flag of transform.
|
|
35752
36087
|
*/ TransformFlag;
|
|
@@ -36051,7 +36386,9 @@ var /**
|
|
|
36051
36386
|
};
|
|
36052
36387
|
return LiteBoxColliderShape;
|
|
36053
36388
|
}(LiteColliderShape);
|
|
36054
|
-
|
|
36389
|
+
(function() {
|
|
36390
|
+
LiteBoxColliderShape._tempBox = new miniprogram_1.BoundingBox();
|
|
36391
|
+
})();
|
|
36055
36392
|
|
|
36056
36393
|
/**
|
|
36057
36394
|
* Sphere collider shape in Lite.
|
|
@@ -36091,7 +36428,7 @@ LiteBoxColliderShape._tempBox = new miniprogram_1.BoundingBox();
|
|
|
36091
36428
|
return false;
|
|
36092
36429
|
}
|
|
36093
36430
|
};
|
|
36094
|
-
|
|
36431
|
+
_create_class$3(LiteSphereColliderShape, [
|
|
36095
36432
|
{
|
|
36096
36433
|
key: "worldRadius",
|
|
36097
36434
|
get: function get() {
|
|
@@ -36101,7 +36438,9 @@ LiteBoxColliderShape._tempBox = new miniprogram_1.BoundingBox();
|
|
|
36101
36438
|
]);
|
|
36102
36439
|
return LiteSphereColliderShape;
|
|
36103
36440
|
}(LiteColliderShape);
|
|
36104
|
-
|
|
36441
|
+
(function() {
|
|
36442
|
+
LiteSphereColliderShape._tempSphere = new miniprogram_1.BoundingSphere();
|
|
36443
|
+
})();
|
|
36105
36444
|
|
|
36106
36445
|
/**
|
|
36107
36446
|
* A manager is a collection of colliders and constraints which can interact.
|
|
@@ -36353,10 +36692,18 @@ LiteSphereColliderShape._tempSphere = new miniprogram_1.BoundingSphere();
|
|
|
36353
36692
|
};
|
|
36354
36693
|
return LitePhysicsManager;
|
|
36355
36694
|
}();
|
|
36356
|
-
|
|
36357
|
-
LitePhysicsManager.
|
|
36358
|
-
|
|
36359
|
-
|
|
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
|
+
})();
|
|
36360
36707
|
var /**
|
|
36361
36708
|
* Physics state
|
|
36362
36709
|
*/ TriggerEventState;
|