@galacean/engine-physics-physx 0.9.0-beta.82 → 0.9.1
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 +1349 -1337
- package/dist/main.js +54 -42
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +1388 -1001
- package/dist/module.js +54 -42
- package/dist/module.js.map +1 -1
- package/package.json +4 -4
package/dist/miniprogram.js
CHANGED
|
@@ -5,11 +5,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var engineMiniprogramAdapter$3 = require('@galacean/engine-miniprogram-adapter');
|
|
6
6
|
|
|
7
7
|
function _instanceof(left, right) {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
return left instanceof right;
|
|
12
|
-
}
|
|
8
|
+
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
9
|
+
return !!right[Symbol.hasInstance](left);
|
|
10
|
+
} else return left instanceof right;
|
|
13
11
|
}
|
|
14
12
|
|
|
15
13
|
/******************************************************************************
|
|
@@ -43,32 +41,24 @@ function __decorate$2(decorators, target, key, desc) {
|
|
|
43
41
|
PhysXRuntimeMode[PhysXRuntimeMode[/** JavaScript mode. */ "JavaScript"] = 2] = "JavaScript";
|
|
44
42
|
})(exports.PhysXRuntimeMode || (exports.PhysXRuntimeMode = {}));
|
|
45
43
|
|
|
46
|
-
function
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
return o;
|
|
50
|
-
};
|
|
44
|
+
function _set_prototype_of$3(o, p) {
|
|
45
|
+
_set_prototype_of$3 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
46
|
+
o.__proto__ = p;
|
|
51
47
|
|
|
52
|
-
|
|
53
|
-
}
|
|
48
|
+
return o;
|
|
49
|
+
};
|
|
54
50
|
|
|
55
|
-
|
|
56
|
-
return setPrototypeOf$3(o, p);
|
|
51
|
+
return _set_prototype_of$3(o, p);
|
|
57
52
|
}
|
|
58
53
|
|
|
59
54
|
function _inherits$3(subClass, superClass) {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
65
|
-
constructor: {
|
|
66
|
-
value: subClass,
|
|
67
|
-
writable: true,
|
|
68
|
-
configurable: true
|
|
55
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
56
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
69
57
|
}
|
|
70
|
-
|
|
71
|
-
|
|
58
|
+
|
|
59
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } });
|
|
60
|
+
|
|
61
|
+
if (superClass) _set_prototype_of$3(subClass, superClass);
|
|
72
62
|
}
|
|
73
63
|
|
|
74
64
|
function getAugmentedNamespace(n) {
|
|
@@ -106,10 +96,8 @@ var miniprogram$7 = require("@galacean/engine-math/dist/miniprogram");
|
|
|
106
96
|
Platform[Platform[/** Mac platform. */ "Mac"] = 3] = "Mac";
|
|
107
97
|
Platform[Platform[/** Unknown platform. */ "Unknown"] = 4] = "Unknown";
|
|
108
98
|
})(exports.Platform || (exports.Platform = {}));
|
|
109
|
-
function
|
|
110
|
-
if (self === void 0)
|
|
111
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
112
|
-
}
|
|
99
|
+
function _assert_this_initialized(self) {
|
|
100
|
+
if (self === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
113
101
|
return self;
|
|
114
102
|
}
|
|
115
103
|
function _defineProperties$2(target, props) {
|
|
@@ -121,20 +109,17 @@ function _defineProperties$2(target, props) {
|
|
|
121
109
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
122
110
|
}
|
|
123
111
|
}
|
|
124
|
-
function
|
|
112
|
+
function _create_class$2(Constructor, protoProps, staticProps) {
|
|
125
113
|
if (protoProps) _defineProperties$2(Constructor.prototype, protoProps);
|
|
126
114
|
if (staticProps) _defineProperties$2(Constructor, staticProps);
|
|
127
115
|
return Constructor;
|
|
128
116
|
}
|
|
129
|
-
function
|
|
130
|
-
|
|
117
|
+
function _set_prototype_of$2(o, p) {
|
|
118
|
+
_set_prototype_of$2 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
131
119
|
o.__proto__ = p;
|
|
132
120
|
return o;
|
|
133
121
|
};
|
|
134
|
-
return
|
|
135
|
-
}
|
|
136
|
-
function _setPrototypeOf$2(o, p) {
|
|
137
|
-
return setPrototypeOf$2(o, p);
|
|
122
|
+
return _set_prototype_of$2(o, p);
|
|
138
123
|
}
|
|
139
124
|
function _inherits$2(subClass, superClass) {
|
|
140
125
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
@@ -147,7 +132,7 @@ function _inherits$2(subClass, superClass) {
|
|
|
147
132
|
configurable: true
|
|
148
133
|
}
|
|
149
134
|
});
|
|
150
|
-
if (superClass)
|
|
135
|
+
if (superClass) _set_prototype_of$2(subClass, superClass);
|
|
151
136
|
}
|
|
152
137
|
/**
|
|
153
138
|
* Common utility methods for math operations.
|
|
@@ -194,9 +179,15 @@ function _inherits$2(subClass, superClass) {
|
|
|
194
179
|
};
|
|
195
180
|
return MathUtil;
|
|
196
181
|
}();
|
|
197
|
-
|
|
198
|
-
/** The
|
|
199
|
-
|
|
182
|
+
(function() {
|
|
183
|
+
/** The value for which all absolute numbers smaller than are considered equal to zero. */ MathUtil.zeroTolerance = 1e-6;
|
|
184
|
+
})();
|
|
185
|
+
(function() {
|
|
186
|
+
/** The conversion factor that radian to degree. */ MathUtil.radToDegreeFactor = 180 / Math.PI;
|
|
187
|
+
})();
|
|
188
|
+
(function() {
|
|
189
|
+
/** The conversion factor that degree to radian. */ MathUtil.degreeToRadFactor = Math.PI / 180;
|
|
190
|
+
})();
|
|
200
191
|
/**
|
|
201
192
|
* Describes a color in the from of RGBA (in order: R, G, B, A).
|
|
202
193
|
*/ var Color = /*#__PURE__*/ function() {
|
|
@@ -405,7 +396,7 @@ function _inherits$2(subClass, superClass) {
|
|
|
405
396
|
out._onValueChanged && out._onValueChanged();
|
|
406
397
|
return out;
|
|
407
398
|
};
|
|
408
|
-
|
|
399
|
+
_create_class$2(Color, [
|
|
409
400
|
{
|
|
410
401
|
key: "r",
|
|
411
402
|
get: /**
|
|
@@ -479,9 +470,7 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
|
479
470
|
function _instanceof1$2(left, right) {
|
|
480
471
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
481
472
|
return !!right[Symbol.hasInstance](left);
|
|
482
|
-
} else
|
|
483
|
-
return _instanceof(left, right);
|
|
484
|
-
}
|
|
473
|
+
} else return _instanceof(left, right);
|
|
485
474
|
}
|
|
486
475
|
/**
|
|
487
476
|
* Clone mode.
|
|
@@ -660,15 +649,21 @@ function _instanceof1$2(left, right) {
|
|
|
660
649
|
};
|
|
661
650
|
return CloneManager;
|
|
662
651
|
}();
|
|
663
|
-
|
|
664
|
-
/** @internal */ CloneManager.
|
|
665
|
-
|
|
652
|
+
(function() {
|
|
653
|
+
/** @internal */ CloneManager._subCloneModeMap = new Map();
|
|
654
|
+
})();
|
|
655
|
+
(function() {
|
|
656
|
+
/** @internal */ CloneManager._cloneModeMap = new Map();
|
|
657
|
+
})();
|
|
658
|
+
(function() {
|
|
659
|
+
CloneManager._objectType = Object.getPrototypeOf(Object);
|
|
660
|
+
})();
|
|
666
661
|
/**
|
|
667
662
|
* EngineObject.
|
|
668
663
|
*/ var EngineObject = /*#__PURE__*/ function() {
|
|
669
664
|
function EngineObject(engine) {
|
|
670
|
-
this._destroyed = false;
|
|
671
665
|
/** Engine unique id. */ this.instanceId = ++EngineObject._instanceIdCounter;
|
|
666
|
+
this._destroyed = false;
|
|
672
667
|
this._engine = engine;
|
|
673
668
|
}
|
|
674
669
|
var _proto = EngineObject.prototype;
|
|
@@ -680,7 +675,7 @@ CloneManager._objectType = Object.getPrototypeOf(Object);
|
|
|
680
675
|
(_this__engine_resourceManager = this._engine.resourceManager) == null ? void 0 : _this__engine_resourceManager._deleteAsset(this);
|
|
681
676
|
this._destroyed = true;
|
|
682
677
|
};
|
|
683
|
-
|
|
678
|
+
_create_class$2(EngineObject, [
|
|
684
679
|
{
|
|
685
680
|
key: "engine",
|
|
686
681
|
get: /**
|
|
@@ -700,7 +695,9 @@ CloneManager._objectType = Object.getPrototypeOf(Object);
|
|
|
700
695
|
]);
|
|
701
696
|
return EngineObject;
|
|
702
697
|
}();
|
|
703
|
-
|
|
698
|
+
(function() {
|
|
699
|
+
EngineObject._instanceIdCounter = 0;
|
|
700
|
+
})();
|
|
704
701
|
__decorate$1([
|
|
705
702
|
ignoreClone
|
|
706
703
|
], EngineObject.prototype, "instanceId", void 0);
|
|
@@ -715,7 +712,7 @@ __decorate$1([
|
|
|
715
712
|
_this = EngineObject.call(this, engine) || this;
|
|
716
713
|
/** Whether to ignore the garbage collection check, if it is true, it will not be affected by ResourceManager.gc(). */ _this.isGCIgnored = false;
|
|
717
714
|
_this._refCount = 0;
|
|
718
|
-
engine.resourceManager._addRefObject(_this.instanceId,
|
|
715
|
+
engine.resourceManager._addRefObject(_this.instanceId, _assert_this_initialized(_this));
|
|
719
716
|
return _this;
|
|
720
717
|
};
|
|
721
718
|
_inherits$2(RefObject, EngineObject);
|
|
@@ -758,7 +755,7 @@ __decorate$1([
|
|
|
758
755
|
*/ _proto._addToResourceManager = function _addToResourceManager(path) {
|
|
759
756
|
this._engine.resourceManager._addAsset(path, this);
|
|
760
757
|
};
|
|
761
|
-
|
|
758
|
+
_create_class$2(RefObject, [
|
|
762
759
|
{
|
|
763
760
|
key: "refCount",
|
|
764
761
|
get: /**
|
|
@@ -877,7 +874,7 @@ __decorate$1([
|
|
|
877
874
|
_proto.stopPropagation = function stopPropagation() {
|
|
878
875
|
this._propagationStopped = true;
|
|
879
876
|
};
|
|
880
|
-
|
|
877
|
+
_create_class$2(Event, [
|
|
881
878
|
{
|
|
882
879
|
key: "propagationStopped",
|
|
883
880
|
get: function get() {
|
|
@@ -1150,7 +1147,7 @@ var Time = /*#__PURE__*/ function() {
|
|
|
1150
1147
|
this._lastTickTime = now;
|
|
1151
1148
|
this._frameCount++;
|
|
1152
1149
|
};
|
|
1153
|
-
|
|
1150
|
+
_create_class$2(Time, [
|
|
1154
1151
|
{
|
|
1155
1152
|
key: "frameCount",
|
|
1156
1153
|
get: /*
|
|
@@ -1385,7 +1382,7 @@ exports.GLCapabilityType = void 0;
|
|
|
1385
1382
|
_proto._getMipmapCount = function _getMipmapCount() {
|
|
1386
1383
|
return this._mipmap ? Math.floor(Math.log2(Math.max(this._width, this._height))) + 1 : 1;
|
|
1387
1384
|
};
|
|
1388
|
-
|
|
1385
|
+
_create_class$2(Texture, [
|
|
1389
1386
|
{
|
|
1390
1387
|
key: "format",
|
|
1391
1388
|
get: /**
|
|
@@ -1533,7 +1530,7 @@ exports.GLCapabilityType = void 0;
|
|
|
1533
1530
|
}
|
|
1534
1531
|
_this._depthTexture = depth;
|
|
1535
1532
|
}
|
|
1536
|
-
_this._platformRenderTarget = engine._hardwareRenderer.createPlatformRenderTarget(
|
|
1533
|
+
_this._platformRenderTarget = engine._hardwareRenderer.createPlatformRenderTarget(_assert_this_initialized(_this));
|
|
1537
1534
|
return _this;
|
|
1538
1535
|
};
|
|
1539
1536
|
_inherits$2(RenderTarget, EngineObject);
|
|
@@ -1576,7 +1573,7 @@ exports.GLCapabilityType = void 0;
|
|
|
1576
1573
|
*/ _proto._blitRenderTarget = function _blitRenderTarget() {
|
|
1577
1574
|
this._platformRenderTarget.blitRenderTarget();
|
|
1578
1575
|
};
|
|
1579
|
-
|
|
1576
|
+
_create_class$2(RenderTarget, [
|
|
1580
1577
|
{
|
|
1581
1578
|
key: "autoGenerateMipmaps",
|
|
1582
1579
|
get: /**
|
|
@@ -1646,7 +1643,7 @@ exports.GLCapabilityType = void 0;
|
|
|
1646
1643
|
_this._format = format;
|
|
1647
1644
|
_this._mipmapCount = _this._getMipmapCount();
|
|
1648
1645
|
_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;
|
|
1649
|
-
_this._platformTexture = engine._hardwareRenderer.createPlatformTexture2D(
|
|
1646
|
+
_this._platformTexture = engine._hardwareRenderer.createPlatformTexture2D(_assert_this_initialized(_this));
|
|
1650
1647
|
_this.filterMode = exports.TextureFilterMode.Bilinear;
|
|
1651
1648
|
_this.wrapModeU = _this.wrapModeV = exports.TextureWrapMode.Repeat;
|
|
1652
1649
|
return _this;
|
|
@@ -1712,7 +1709,7 @@ exports.GLCapabilityType = void 0;
|
|
|
1712
1709
|
_this._length = length1;
|
|
1713
1710
|
_this._format = format;
|
|
1714
1711
|
_this._mipmapCount = _this._getMipmapCount();
|
|
1715
|
-
_this._platformTexture = engine._hardwareRenderer.createPlatformTexture2DArray(
|
|
1712
|
+
_this._platformTexture = engine._hardwareRenderer.createPlatformTexture2DArray(_assert_this_initialized(_this));
|
|
1716
1713
|
_this.filterMode = exports.TextureFilterMode.Bilinear;
|
|
1717
1714
|
_this.wrapModeU = _this.wrapModeV = exports.TextureWrapMode.Repeat;
|
|
1718
1715
|
return _this;
|
|
@@ -1765,7 +1762,7 @@ exports.GLCapabilityType = void 0;
|
|
|
1765
1762
|
this._platformTexture.getPixelBuffer(elementIndex, xOrMipLevelOrOut, yOrMipLevel, width, height, mipLevelOrOut, out);
|
|
1766
1763
|
}
|
|
1767
1764
|
};
|
|
1768
|
-
|
|
1765
|
+
_create_class$2(Texture2DArray, [
|
|
1769
1766
|
{
|
|
1770
1767
|
key: "length",
|
|
1771
1768
|
get: /**
|
|
@@ -1790,7 +1787,7 @@ exports.GLCapabilityType = void 0;
|
|
|
1790
1787
|
_this._height = size;
|
|
1791
1788
|
_this._format = format;
|
|
1792
1789
|
_this._mipmapCount = _this._getMipmapCount();
|
|
1793
|
-
_this._platformTexture = engine._hardwareRenderer.createPlatformTextureCube(
|
|
1790
|
+
_this._platformTexture = engine._hardwareRenderer.createPlatformTextureCube(_assert_this_initialized(_this));
|
|
1794
1791
|
_this.filterMode = exports.TextureFilterMode.Bilinear;
|
|
1795
1792
|
_this.wrapModeU = _this.wrapModeV = exports.TextureWrapMode.Clamp;
|
|
1796
1793
|
return _this;
|
|
@@ -1917,7 +1914,7 @@ exports.GLCapabilityType = void 0;
|
|
|
1917
1914
|
_proto.getCharInfo = function getCharInfo(char) {
|
|
1918
1915
|
return this._charInfoMap[char.charCodeAt(0)];
|
|
1919
1916
|
};
|
|
1920
|
-
|
|
1917
|
+
_create_class$2(FontAtlas, [
|
|
1921
1918
|
{
|
|
1922
1919
|
key: "texture",
|
|
1923
1920
|
get: function get() {
|
|
@@ -2063,7 +2060,7 @@ exports.GLCapabilityType = void 0;
|
|
|
2063
2060
|
}
|
|
2064
2061
|
return null;
|
|
2065
2062
|
};
|
|
2066
|
-
|
|
2063
|
+
_create_class$2(Font, [
|
|
2067
2064
|
{
|
|
2068
2065
|
key: "name",
|
|
2069
2066
|
get: /**
|
|
@@ -2075,8 +2072,9 @@ exports.GLCapabilityType = void 0;
|
|
|
2075
2072
|
]);
|
|
2076
2073
|
return Font;
|
|
2077
2074
|
}(RefObject);
|
|
2078
|
-
|
|
2079
|
-
|
|
2075
|
+
(function() {
|
|
2076
|
+
Font._fontMap = {};
|
|
2077
|
+
})();
|
|
2080
2078
|
var AssetPromise = /*#__PURE__*/ function() {
|
|
2081
2079
|
var AssetPromise = function AssetPromise(executor) {
|
|
2082
2080
|
var _this = this;
|
|
@@ -2195,9 +2193,9 @@ var AssetPromise = /*#__PURE__*/ function() {
|
|
|
2195
2193
|
}
|
|
2196
2194
|
});
|
|
2197
2195
|
};
|
|
2198
|
-
|
|
2196
|
+
_create_class$2(AssetPromise, [
|
|
2199
2197
|
{
|
|
2200
|
-
key:
|
|
2198
|
+
key: Symbol.toStringTag,
|
|
2201
2199
|
get: /** compatible with Promise */ function get() {
|
|
2202
2200
|
return "AssetPromise";
|
|
2203
2201
|
}
|
|
@@ -2508,8 +2506,12 @@ var /** @internal */ PromiseState;
|
|
|
2508
2506
|
};
|
|
2509
2507
|
return ResourceManager;
|
|
2510
2508
|
}();
|
|
2511
|
-
|
|
2512
|
-
ResourceManager.
|
|
2509
|
+
(function() {
|
|
2510
|
+
/** Loader collection. */ ResourceManager._loaders = {};
|
|
2511
|
+
})();
|
|
2512
|
+
(function() {
|
|
2513
|
+
ResourceManager._extTypeMapping = {};
|
|
2514
|
+
})();
|
|
2513
2515
|
/**
|
|
2514
2516
|
* Declare ResourceLoader's decorator.
|
|
2515
2517
|
* @param assetType - Type of asset
|
|
@@ -2862,10 +2864,14 @@ var ComponentCloner = /*#__PURE__*/ function() {
|
|
|
2862
2864
|
};
|
|
2863
2865
|
return ComponentsDependencies;
|
|
2864
2866
|
}();
|
|
2865
|
-
|
|
2867
|
+
(function() {
|
|
2868
|
+
/**
|
|
2866
2869
|
* @internal
|
|
2867
2870
|
*/ ComponentsDependencies._dependenciesMap = new Map();
|
|
2868
|
-
|
|
2871
|
+
})();
|
|
2872
|
+
(function() {
|
|
2873
|
+
ComponentsDependencies._invDependenciesMap = new Map();
|
|
2874
|
+
})();
|
|
2869
2875
|
/**
|
|
2870
2876
|
* Dependent components, automatically added if they do not exist.
|
|
2871
2877
|
* @param components - Dependent components
|
|
@@ -3027,7 +3033,7 @@ ComponentsDependencies._invDependenciesMap = new Map();
|
|
|
3027
3033
|
}
|
|
3028
3034
|
}
|
|
3029
3035
|
};
|
|
3030
|
-
|
|
3036
|
+
_create_class$2(Component, [
|
|
3031
3037
|
{
|
|
3032
3038
|
key: "enabled",
|
|
3033
3039
|
get: /**
|
|
@@ -3158,7 +3164,6 @@ __decorate$1([
|
|
|
3158
3164
|
var Transform = function Transform(entity) {
|
|
3159
3165
|
var _this;
|
|
3160
3166
|
_this = Component.call(this, entity) || this;
|
|
3161
|
-
_this._dirtyFlag = 0xbc;
|
|
3162
3167
|
_this._position = new miniprogram$7.Vector3();
|
|
3163
3168
|
_this._rotation = new miniprogram$7.Vector3();
|
|
3164
3169
|
_this._rotationQuaternion = new miniprogram$7.Quaternion();
|
|
@@ -3171,14 +3176,15 @@ __decorate$1([
|
|
|
3171
3176
|
_this._worldMatrix = new miniprogram$7.Matrix();
|
|
3172
3177
|
_this._isParentDirty = true;
|
|
3173
3178
|
_this._parentTransformCache = null;
|
|
3179
|
+
_this._dirtyFlag = 0xbc;
|
|
3174
3180
|
/** @internal */ _this._updateFlagManager = new UpdateFlagManager();
|
|
3175
|
-
_this._onPositionChanged = _this._onPositionChanged.bind(
|
|
3176
|
-
_this._onWorldPositionChanged = _this._onWorldPositionChanged.bind(
|
|
3177
|
-
_this._onRotationChanged = _this._onRotationChanged.bind(
|
|
3178
|
-
_this._onWorldRotationChanged = _this._onWorldRotationChanged.bind(
|
|
3179
|
-
_this._onRotationQuaternionChanged = _this._onRotationQuaternionChanged.bind(
|
|
3180
|
-
_this._onWorldRotationQuaternionChanged = _this._onWorldRotationQuaternionChanged.bind(
|
|
3181
|
-
_this._onScaleChanged = _this._onScaleChanged.bind(
|
|
3181
|
+
_this._onPositionChanged = _this._onPositionChanged.bind(_assert_this_initialized(_this));
|
|
3182
|
+
_this._onWorldPositionChanged = _this._onWorldPositionChanged.bind(_assert_this_initialized(_this));
|
|
3183
|
+
_this._onRotationChanged = _this._onRotationChanged.bind(_assert_this_initialized(_this));
|
|
3184
|
+
_this._onWorldRotationChanged = _this._onWorldRotationChanged.bind(_assert_this_initialized(_this));
|
|
3185
|
+
_this._onRotationQuaternionChanged = _this._onRotationQuaternionChanged.bind(_assert_this_initialized(_this));
|
|
3186
|
+
_this._onWorldRotationQuaternionChanged = _this._onWorldRotationQuaternionChanged.bind(_assert_this_initialized(_this));
|
|
3187
|
+
_this._onScaleChanged = _this._onScaleChanged.bind(_assert_this_initialized(_this));
|
|
3182
3188
|
//@ts-ignore
|
|
3183
3189
|
_this._position._onValueChanged = _this._onPositionChanged;
|
|
3184
3190
|
//@ts-ignore
|
|
@@ -3571,7 +3577,7 @@ __decorate$1([
|
|
|
3571
3577
|
this._setDirtyFlagTrue(0x40);
|
|
3572
3578
|
this._updateWorldScaleFlag();
|
|
3573
3579
|
};
|
|
3574
|
-
|
|
3580
|
+
_create_class$2(Transform, [
|
|
3575
3581
|
{
|
|
3576
3582
|
key: "position",
|
|
3577
3583
|
get: /**
|
|
@@ -3817,15 +3823,33 @@ __decorate$1([
|
|
|
3817
3823
|
]);
|
|
3818
3824
|
return Transform;
|
|
3819
3825
|
}(Component);
|
|
3820
|
-
|
|
3821
|
-
Transform.
|
|
3822
|
-
|
|
3823
|
-
|
|
3824
|
-
Transform.
|
|
3825
|
-
|
|
3826
|
-
|
|
3827
|
-
Transform.
|
|
3828
|
-
|
|
3826
|
+
(function() {
|
|
3827
|
+
Transform._tempQuat0 = new miniprogram$7.Quaternion();
|
|
3828
|
+
})();
|
|
3829
|
+
(function() {
|
|
3830
|
+
Transform._tempVec30 = new miniprogram$7.Vector3();
|
|
3831
|
+
})();
|
|
3832
|
+
(function() {
|
|
3833
|
+
Transform._tempVec31 = new miniprogram$7.Vector3();
|
|
3834
|
+
})();
|
|
3835
|
+
(function() {
|
|
3836
|
+
Transform._tempVec32 = new miniprogram$7.Vector3();
|
|
3837
|
+
})();
|
|
3838
|
+
(function() {
|
|
3839
|
+
Transform._tempMat30 = new miniprogram$7.Matrix3x3();
|
|
3840
|
+
})();
|
|
3841
|
+
(function() {
|
|
3842
|
+
Transform._tempMat31 = new miniprogram$7.Matrix3x3();
|
|
3843
|
+
})();
|
|
3844
|
+
(function() {
|
|
3845
|
+
Transform._tempMat32 = new miniprogram$7.Matrix3x3();
|
|
3846
|
+
})();
|
|
3847
|
+
(function() {
|
|
3848
|
+
Transform._tempMat41 = new miniprogram$7.Matrix();
|
|
3849
|
+
})();
|
|
3850
|
+
(function() {
|
|
3851
|
+
Transform._tempMat42 = new miniprogram$7.Matrix();
|
|
3852
|
+
})();
|
|
3829
3853
|
__decorate$1([
|
|
3830
3854
|
deepClone
|
|
3831
3855
|
], Transform.prototype, "_position", void 0);
|
|
@@ -4324,7 +4348,7 @@ var TransformModifyFlags;
|
|
|
4324
4348
|
this._traverseSetOwnerScene(children[i], scene);
|
|
4325
4349
|
}
|
|
4326
4350
|
};
|
|
4327
|
-
|
|
4351
|
+
_create_class$2(Entity, [
|
|
4328
4352
|
{
|
|
4329
4353
|
key: "isActive",
|
|
4330
4354
|
get: /**
|
|
@@ -4538,7 +4562,7 @@ var TransformModifyFlags;
|
|
|
4538
4562
|
}
|
|
4539
4563
|
}
|
|
4540
4564
|
};
|
|
4541
|
-
|
|
4565
|
+
_create_class$2(SystemInfo, null, [
|
|
4542
4566
|
{
|
|
4543
4567
|
key: "devicePixelRatio",
|
|
4544
4568
|
get: /**
|
|
@@ -4550,8 +4574,12 @@ var TransformModifyFlags;
|
|
|
4550
4574
|
]);
|
|
4551
4575
|
return SystemInfo;
|
|
4552
4576
|
}();
|
|
4553
|
-
|
|
4554
|
-
/** The
|
|
4577
|
+
(function() {
|
|
4578
|
+
/** The platform is running on. */ SystemInfo.platform = exports.Platform.Unknown;
|
|
4579
|
+
})();
|
|
4580
|
+
(function() {
|
|
4581
|
+
/** The operating system is running on. */ SystemInfo.operatingSystem = "";
|
|
4582
|
+
})();
|
|
4555
4583
|
SystemInfo._initialize();
|
|
4556
4584
|
/**
|
|
4557
4585
|
* The keys of the keyboard.
|
|
@@ -5163,7 +5191,7 @@ SystemInfo._initialize();
|
|
|
5163
5191
|
_proto._setGravity = function _setGravity() {
|
|
5164
5192
|
this._nativePhysicsManager.setGravity(this._gravity);
|
|
5165
5193
|
};
|
|
5166
|
-
|
|
5194
|
+
_create_class$2(PhysicsManager, [
|
|
5167
5195
|
{
|
|
5168
5196
|
key: "gravity",
|
|
5169
5197
|
get: /**
|
|
@@ -5219,7 +5247,7 @@ SystemInfo._initialize();
|
|
|
5219
5247
|
*/ _proto._destroy = function _destroy() {
|
|
5220
5248
|
this._nativeMaterial.destroy();
|
|
5221
5249
|
};
|
|
5222
|
-
|
|
5250
|
+
_create_class$2(PhysicsMaterial, [
|
|
5223
5251
|
{
|
|
5224
5252
|
key: "bounciness",
|
|
5225
5253
|
get: /**
|
|
@@ -5297,8 +5325,8 @@ exports.Collider = /*#__PURE__*/ function(Component) {
|
|
|
5297
5325
|
var Collider = function Collider(entity) {
|
|
5298
5326
|
var _this;
|
|
5299
5327
|
_this = Component.call(this, entity) || this;
|
|
5300
|
-
_this._shapes = [];
|
|
5301
5328
|
/** @internal */ _this._index = -1;
|
|
5329
|
+
_this._shapes = [];
|
|
5302
5330
|
_this._updateFlag = _this.entity.transform.registerWorldChangeFlag();
|
|
5303
5331
|
return _this;
|
|
5304
5332
|
};
|
|
@@ -5378,7 +5406,7 @@ exports.Collider = /*#__PURE__*/ function(Component) {
|
|
|
5378
5406
|
this.clearShapes();
|
|
5379
5407
|
this._nativeCollider.destroy();
|
|
5380
5408
|
};
|
|
5381
|
-
|
|
5409
|
+
_create_class$2(Collider, [
|
|
5382
5410
|
{
|
|
5383
5411
|
key: "shapes",
|
|
5384
5412
|
get: /**
|
|
@@ -5415,7 +5443,7 @@ exports.Collider = __decorate$1([
|
|
|
5415
5443
|
_this._upDirection = new miniprogram$7.Vector3(0, 1, 0);
|
|
5416
5444
|
_this._slopeLimit = 0.707;
|
|
5417
5445
|
_this._nativeCollider = PhysicsManager._nativePhysics.createCharacterController();
|
|
5418
|
-
_this._setUpDirection = _this._setUpDirection.bind(
|
|
5446
|
+
_this._setUpDirection = _this._setUpDirection.bind(_assert_this_initialized(_this));
|
|
5419
5447
|
//@ts-ignore
|
|
5420
5448
|
_this._upDirection._onValueChanged = _this._setUpDirection;
|
|
5421
5449
|
return _this;
|
|
@@ -5489,7 +5517,7 @@ exports.Collider = __decorate$1([
|
|
|
5489
5517
|
_proto._setUpDirection = function _setUpDirection() {
|
|
5490
5518
|
this._nativeCollider.setUpDirection(this._upDirection);
|
|
5491
5519
|
};
|
|
5492
|
-
|
|
5520
|
+
_create_class$2(CharacterController, [
|
|
5493
5521
|
{
|
|
5494
5522
|
key: "stepOffset",
|
|
5495
5523
|
get: /**
|
|
@@ -5583,7 +5611,7 @@ exports.Collider = __decorate$1([
|
|
|
5583
5611
|
_proto._setRotation = function _setRotation() {
|
|
5584
5612
|
this._nativeShape.setRotation(this._rotation);
|
|
5585
5613
|
};
|
|
5586
|
-
|
|
5614
|
+
_create_class$2(ColliderShape, [
|
|
5587
5615
|
{
|
|
5588
5616
|
key: "collider",
|
|
5589
5617
|
get: /**
|
|
@@ -5671,7 +5699,9 @@ exports.Collider = __decorate$1([
|
|
|
5671
5699
|
]);
|
|
5672
5700
|
return ColliderShape;
|
|
5673
5701
|
}();
|
|
5674
|
-
|
|
5702
|
+
(function() {
|
|
5703
|
+
ColliderShape._idGenerator = 0;
|
|
5704
|
+
})();
|
|
5675
5705
|
/**
|
|
5676
5706
|
* Physical collider shape for box.
|
|
5677
5707
|
*/ var BoxColliderShape = /*#__PURE__*/ function(ColliderShape) {
|
|
@@ -5680,7 +5710,7 @@ ColliderShape._idGenerator = 0;
|
|
|
5680
5710
|
_this = ColliderShape.call(this) || this;
|
|
5681
5711
|
_this._size = new miniprogram$7.Vector3(1, 1, 1);
|
|
5682
5712
|
_this._nativeShape = PhysicsManager._nativePhysics.createBoxColliderShape(_this._id, _this._size, _this._material._nativeMaterial);
|
|
5683
|
-
_this._setSize = _this._setSize.bind(
|
|
5713
|
+
_this._setSize = _this._setSize.bind(_assert_this_initialized(_this));
|
|
5684
5714
|
//@ts-ignore
|
|
5685
5715
|
_this._size._onValueChanged = _this._setSize;
|
|
5686
5716
|
return _this;
|
|
@@ -5690,7 +5720,7 @@ ColliderShape._idGenerator = 0;
|
|
|
5690
5720
|
_proto._setSize = function _setSize() {
|
|
5691
5721
|
this._nativeShape.setSize(this._size);
|
|
5692
5722
|
};
|
|
5693
|
-
|
|
5723
|
+
_create_class$2(BoxColliderShape, [
|
|
5694
5724
|
{
|
|
5695
5725
|
key: "size",
|
|
5696
5726
|
get: /**
|
|
@@ -5718,7 +5748,7 @@ ColliderShape._idGenerator = 0;
|
|
|
5718
5748
|
return _this;
|
|
5719
5749
|
};
|
|
5720
5750
|
_inherits$2(SphereColliderShape, ColliderShape);
|
|
5721
|
-
|
|
5751
|
+
_create_class$2(SphereColliderShape, [
|
|
5722
5752
|
{
|
|
5723
5753
|
key: "radius",
|
|
5724
5754
|
get: /**
|
|
@@ -5769,7 +5799,7 @@ ColliderShape._idGenerator = 0;
|
|
|
5769
5799
|
return _this;
|
|
5770
5800
|
};
|
|
5771
5801
|
_inherits$2(CapsuleColliderShape, ColliderShape);
|
|
5772
|
-
|
|
5802
|
+
_create_class$2(CapsuleColliderShape, [
|
|
5773
5803
|
{
|
|
5774
5804
|
key: "radius",
|
|
5775
5805
|
get: /**
|
|
@@ -5827,7 +5857,7 @@ exports.Joint = /*#__PURE__*/ function(Component) {
|
|
|
5827
5857
|
return _this;
|
|
5828
5858
|
};
|
|
5829
5859
|
_inherits$2(Joint, Component);
|
|
5830
|
-
|
|
5860
|
+
_create_class$2(Joint, [
|
|
5831
5861
|
{
|
|
5832
5862
|
key: "connectedCollider",
|
|
5833
5863
|
get: /**
|
|
@@ -6004,7 +6034,7 @@ exports.Joint = __decorate$1([
|
|
|
6004
6034
|
collider.collider = this.entity.getComponent(exports.Collider);
|
|
6005
6035
|
this._nativeJoint = PhysicsManager._nativePhysics.createHingeJoint(collider.collider._nativeCollider);
|
|
6006
6036
|
};
|
|
6007
|
-
|
|
6037
|
+
_create_class$2(HingeJoint, [
|
|
6008
6038
|
{
|
|
6009
6039
|
key: "axis",
|
|
6010
6040
|
get: /**
|
|
@@ -6155,7 +6185,7 @@ exports.Joint = __decorate$1([
|
|
|
6155
6185
|
collider.collider = this.entity.getComponent(exports.Collider);
|
|
6156
6186
|
this._nativeJoint = PhysicsManager._nativePhysics.createSpringJoint(collider.collider._nativeCollider);
|
|
6157
6187
|
};
|
|
6158
|
-
|
|
6188
|
+
_create_class$2(SpringJoint, [
|
|
6159
6189
|
{
|
|
6160
6190
|
key: "swingOffset",
|
|
6161
6191
|
get: /**
|
|
@@ -6305,10 +6335,10 @@ exports.Joint = __decorate$1([
|
|
|
6305
6335
|
_this._sleepThreshold = 5e-3;
|
|
6306
6336
|
var transform = _this.entity.transform;
|
|
6307
6337
|
_this._nativeCollider = PhysicsManager._nativePhysics.createDynamicCollider(transform.worldPosition, transform.worldRotationQuaternion);
|
|
6308
|
-
_this._setLinearVelocity = _this._setLinearVelocity.bind(
|
|
6309
|
-
_this._setAngularVelocity = _this._setAngularVelocity.bind(
|
|
6310
|
-
_this._setCenterOfMass = _this._setCenterOfMass.bind(
|
|
6311
|
-
_this._setInertiaTensor = _this._setInertiaTensor.bind(
|
|
6338
|
+
_this._setLinearVelocity = _this._setLinearVelocity.bind(_assert_this_initialized(_this));
|
|
6339
|
+
_this._setAngularVelocity = _this._setAngularVelocity.bind(_assert_this_initialized(_this));
|
|
6340
|
+
_this._setCenterOfMass = _this._setCenterOfMass.bind(_assert_this_initialized(_this));
|
|
6341
|
+
_this._setInertiaTensor = _this._setInertiaTensor.bind(_assert_this_initialized(_this));
|
|
6312
6342
|
//@ts-ignore
|
|
6313
6343
|
_this._linearVelocity._onValueChanged = _this._setLinearVelocity;
|
|
6314
6344
|
//@ts-ignore
|
|
@@ -6367,7 +6397,7 @@ exports.Joint = __decorate$1([
|
|
|
6367
6397
|
_proto._setInertiaTensor = function _setInertiaTensor() {
|
|
6368
6398
|
this._nativeCollider.setInertiaTensor(this._inertiaTensor);
|
|
6369
6399
|
};
|
|
6370
|
-
|
|
6400
|
+
_create_class$2(DynamicCollider, [
|
|
6371
6401
|
{
|
|
6372
6402
|
key: "linearDamping",
|
|
6373
6403
|
get: /**
|
|
@@ -6909,9 +6939,15 @@ exports.DynamicColliderConstraints = void 0;
|
|
|
6909
6939
|
};
|
|
6910
6940
|
return PointerManager;
|
|
6911
6941
|
}();
|
|
6912
|
-
|
|
6913
|
-
PointerManager.
|
|
6914
|
-
|
|
6942
|
+
(function() {
|
|
6943
|
+
PointerManager._tempRay = new miniprogram$7.Ray();
|
|
6944
|
+
})();
|
|
6945
|
+
(function() {
|
|
6946
|
+
PointerManager._tempPoint = new miniprogram$7.Vector2();
|
|
6947
|
+
})();
|
|
6948
|
+
(function() {
|
|
6949
|
+
PointerManager._tempHitResult = new HitResult();
|
|
6950
|
+
})();
|
|
6915
6951
|
/**
|
|
6916
6952
|
* Wheel Manager.
|
|
6917
6953
|
* @internal
|
|
@@ -7115,7 +7151,7 @@ PointerManager._tempHitResult = new HitResult();
|
|
|
7115
7151
|
this._pointerManager._onFocus();
|
|
7116
7152
|
this._keyboardManager._onFocus();
|
|
7117
7153
|
};
|
|
7118
|
-
|
|
7154
|
+
_create_class$2(InputManager, [
|
|
7119
7155
|
{
|
|
7120
7156
|
key: "pointers",
|
|
7121
7157
|
get: /**
|
|
@@ -7290,8 +7326,12 @@ PointerManager._tempHitResult = new HitResult();
|
|
|
7290
7326
|
}
|
|
7291
7327
|
this._nameId = nameID;
|
|
7292
7328
|
};
|
|
7293
|
-
|
|
7294
|
-
ShaderMacro.
|
|
7329
|
+
(function() {
|
|
7330
|
+
/** @internal */ ShaderMacro._macroNameIdMap = Object.create(null);
|
|
7331
|
+
})();
|
|
7332
|
+
(function() {
|
|
7333
|
+
ShaderMacro._macroNameCounter = 0;
|
|
7334
|
+
})();
|
|
7295
7335
|
/**
|
|
7296
7336
|
* Shader macro collection.
|
|
7297
7337
|
* @internal
|
|
@@ -7441,22 +7481,15 @@ ShaderMacro._macroNameCounter = 0;
|
|
|
7441
7481
|
};
|
|
7442
7482
|
return ShaderMacroCollection;
|
|
7443
7483
|
}();
|
|
7444
|
-
function
|
|
7445
|
-
|
|
7484
|
+
function _extends$2() {
|
|
7485
|
+
_extends$2 = Object.assign || function assign(target) {
|
|
7446
7486
|
for(var i = 1; i < arguments.length; i++){
|
|
7447
7487
|
var source = arguments[i];
|
|
7448
|
-
for(var key in source)
|
|
7449
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
7450
|
-
target[key] = source[key];
|
|
7451
|
-
}
|
|
7452
|
-
}
|
|
7488
|
+
for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
|
|
7453
7489
|
}
|
|
7454
7490
|
return target;
|
|
7455
7491
|
};
|
|
7456
|
-
return
|
|
7457
|
-
}
|
|
7458
|
-
function _extends$2() {
|
|
7459
|
-
return extends_$2.apply(this, arguments);
|
|
7492
|
+
return _extends$2.apply(this, arguments);
|
|
7460
7493
|
}
|
|
7461
7494
|
var camera_declare = "#define GLSLIFY 1\nuniform vec3 u_cameraPos;"; // eslint-disable-line
|
|
7462
7495
|
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
|
|
@@ -8235,7 +8268,7 @@ var ShaderFactory = /*#__PURE__*/ function() {
|
|
|
8235
8268
|
return prefix + line;
|
|
8236
8269
|
}).join("\n");
|
|
8237
8270
|
};
|
|
8238
|
-
|
|
8271
|
+
_create_class$2(ShaderProgram, [
|
|
8239
8272
|
{
|
|
8240
8273
|
key: "isValid",
|
|
8241
8274
|
get: /**
|
|
@@ -8247,7 +8280,9 @@ var ShaderFactory = /*#__PURE__*/ function() {
|
|
|
8247
8280
|
]);
|
|
8248
8281
|
return ShaderProgram;
|
|
8249
8282
|
}();
|
|
8250
|
-
|
|
8283
|
+
(function() {
|
|
8284
|
+
ShaderProgram._counter = 0;
|
|
8285
|
+
})();
|
|
8251
8286
|
/**
|
|
8252
8287
|
* Shader pass containing vertex and fragment source.
|
|
8253
8288
|
*/ var ShaderPass = /*#__PURE__*/ function() {
|
|
@@ -8291,7 +8326,9 @@ ShaderProgram._counter = 0;
|
|
|
8291
8326
|
};
|
|
8292
8327
|
return ShaderPass;
|
|
8293
8328
|
}();
|
|
8294
|
-
|
|
8329
|
+
(function() {
|
|
8330
|
+
ShaderPass._shaderPassCounter = 0;
|
|
8331
|
+
})();
|
|
8295
8332
|
/**
|
|
8296
8333
|
* Shader property.
|
|
8297
8334
|
*/ var ShaderProperty = /*#__PURE__*/ function() {
|
|
@@ -8299,7 +8336,7 @@ ShaderPass._shaderPassCounter = 0;
|
|
|
8299
8336
|
this.name = name;
|
|
8300
8337
|
this._uniqueId = ShaderProperty._propertyNameCounter++;
|
|
8301
8338
|
}
|
|
8302
|
-
|
|
8339
|
+
_create_class$2(ShaderProperty, [
|
|
8303
8340
|
{
|
|
8304
8341
|
key: "type",
|
|
8305
8342
|
get: /**
|
|
@@ -8311,7 +8348,9 @@ ShaderPass._shaderPassCounter = 0;
|
|
|
8311
8348
|
]);
|
|
8312
8349
|
return ShaderProperty;
|
|
8313
8350
|
}();
|
|
8314
|
-
|
|
8351
|
+
(function() {
|
|
8352
|
+
ShaderProperty._propertyNameCounter = 0;
|
|
8353
|
+
})();
|
|
8315
8354
|
/**
|
|
8316
8355
|
* Shader for rendering.
|
|
8317
8356
|
*/ var Shader = /*#__PURE__*/ function() {
|
|
@@ -8423,7 +8462,7 @@ ShaderProperty._propertyNameCounter = 0;
|
|
|
8423
8462
|
}
|
|
8424
8463
|
}
|
|
8425
8464
|
};
|
|
8426
|
-
|
|
8465
|
+
_create_class$2(Shader, [
|
|
8427
8466
|
{
|
|
8428
8467
|
key: "passes",
|
|
8429
8468
|
get: /**
|
|
@@ -8435,18 +8474,34 @@ ShaderProperty._propertyNameCounter = 0;
|
|
|
8435
8474
|
]);
|
|
8436
8475
|
return Shader;
|
|
8437
8476
|
}();
|
|
8438
|
-
|
|
8439
|
-
/** @internal */ Shader.
|
|
8440
|
-
|
|
8441
|
-
|
|
8442
|
-
|
|
8443
|
-
|
|
8444
|
-
|
|
8445
|
-
|
|
8446
|
-
|
|
8447
|
-
|
|
8448
|
-
|
|
8449
|
-
Shader.
|
|
8477
|
+
(function() {
|
|
8478
|
+
/** @internal */ Shader._compileMacros = new ShaderMacroCollection();
|
|
8479
|
+
})();
|
|
8480
|
+
(function() {
|
|
8481
|
+
/** @internal */ Shader._shaderExtension = [
|
|
8482
|
+
"GL_EXT_shader_texture_lod",
|
|
8483
|
+
"GL_OES_standard_derivatives",
|
|
8484
|
+
"GL_EXT_draw_buffers"
|
|
8485
|
+
];
|
|
8486
|
+
})();
|
|
8487
|
+
(function() {
|
|
8488
|
+
/** @internal */ Shader._propertyIdMap = Object.create(null);
|
|
8489
|
+
})();
|
|
8490
|
+
(function() {
|
|
8491
|
+
Shader._shaderMap = Object.create(null);
|
|
8492
|
+
})();
|
|
8493
|
+
(function() {
|
|
8494
|
+
Shader._propertyNameMap = Object.create(null);
|
|
8495
|
+
})();
|
|
8496
|
+
(function() {
|
|
8497
|
+
Shader._macroMaskMap = [];
|
|
8498
|
+
})();
|
|
8499
|
+
(function() {
|
|
8500
|
+
Shader._macroCounter = 0;
|
|
8501
|
+
})();
|
|
8502
|
+
(function() {
|
|
8503
|
+
Shader._macroMap = Object.create(null);
|
|
8504
|
+
})();
|
|
8450
8505
|
/**
|
|
8451
8506
|
* Shader data collection,Correspondence includes shader properties data and macros data.
|
|
8452
8507
|
*/ var ShaderData = /*#__PURE__*/ function() {
|
|
@@ -8701,9 +8756,9 @@ Shader._macroMap = Object.create(null);
|
|
|
8701
8756
|
/** Shadow mapping normal-based bias. */ _this.shadowNormalBias = 1;
|
|
8702
8757
|
/** Near plane value to use for shadow frustums. */ _this.shadowNearPlane = 0.1;
|
|
8703
8758
|
/** Shadow intensity, the larger the value, the clearer and darker the shadow. */ _this.shadowStrength = 1.0;
|
|
8759
|
+
/** @internal */ _this._lightIndex = -1;
|
|
8704
8760
|
_this._color = new miniprogram$7.Color(1, 1, 1, 1);
|
|
8705
8761
|
_this._lightColor = new miniprogram$7.Color();
|
|
8706
|
-
/** @internal */ _this._lightIndex = -1;
|
|
8707
8762
|
return _this;
|
|
8708
8763
|
};
|
|
8709
8764
|
_inherits$2(Light, Component);
|
|
@@ -8715,7 +8770,7 @@ Shader._macroMap = Object.create(null);
|
|
|
8715
8770
|
this._lightColor.a = this.color.a * this.intensity;
|
|
8716
8771
|
return this._lightColor;
|
|
8717
8772
|
};
|
|
8718
|
-
|
|
8773
|
+
_create_class$2(Light, [
|
|
8719
8774
|
{
|
|
8720
8775
|
key: "color",
|
|
8721
8776
|
get: /**
|
|
@@ -8752,9 +8807,11 @@ Shader._macroMap = Object.create(null);
|
|
|
8752
8807
|
]);
|
|
8753
8808
|
return Light;
|
|
8754
8809
|
}(Component);
|
|
8755
|
-
|
|
8810
|
+
(function() {
|
|
8811
|
+
/**
|
|
8756
8812
|
* Each type of light source is at most 10, beyond which it will not take effect.
|
|
8757
8813
|
* */ Light._maxLight = 10;
|
|
8814
|
+
})();
|
|
8758
8815
|
__decorate$1([
|
|
8759
8816
|
ignoreClone
|
|
8760
8817
|
], Light.prototype, "_lightIndex", void 0);
|
|
@@ -8811,7 +8868,7 @@ __decorate$1([
|
|
|
8811
8868
|
shaderData.setFloatArray(DirectLight._colorProperty, data.color);
|
|
8812
8869
|
shaderData.setFloatArray(DirectLight._directionProperty, data.direction);
|
|
8813
8870
|
};
|
|
8814
|
-
|
|
8871
|
+
_create_class$2(DirectLight, [
|
|
8815
8872
|
{
|
|
8816
8873
|
key: "direction",
|
|
8817
8874
|
get: /**
|
|
@@ -8842,14 +8899,22 @@ __decorate$1([
|
|
|
8842
8899
|
]);
|
|
8843
8900
|
return DirectLight;
|
|
8844
8901
|
}(Light);
|
|
8845
|
-
|
|
8846
|
-
DirectLight.
|
|
8847
|
-
|
|
8848
|
-
|
|
8849
|
-
|
|
8850
|
-
|
|
8851
|
-
|
|
8852
|
-
|
|
8902
|
+
(function() {
|
|
8903
|
+
DirectLight._cullingMaskProperty = Shader.getPropertyByName("u_directLightCullingMask");
|
|
8904
|
+
})();
|
|
8905
|
+
(function() {
|
|
8906
|
+
DirectLight._colorProperty = Shader.getPropertyByName("u_directLightColor");
|
|
8907
|
+
})();
|
|
8908
|
+
(function() {
|
|
8909
|
+
DirectLight._directionProperty = Shader.getPropertyByName("u_directLightDirection");
|
|
8910
|
+
})();
|
|
8911
|
+
(function() {
|
|
8912
|
+
DirectLight._combinedData = {
|
|
8913
|
+
cullingMask: new Int32Array(Light._maxLight * 2),
|
|
8914
|
+
color: new Float32Array(Light._maxLight * 3),
|
|
8915
|
+
direction: new Float32Array(Light._maxLight * 3)
|
|
8916
|
+
};
|
|
8917
|
+
})();
|
|
8853
8918
|
/**
|
|
8854
8919
|
* Point light.
|
|
8855
8920
|
*/ var PointLight = /*#__PURE__*/ function(Light) {
|
|
@@ -8905,7 +8970,7 @@ DirectLight._combinedData = {
|
|
|
8905
8970
|
shaderData.setFloatArray(PointLight._positionProperty, data.position);
|
|
8906
8971
|
shaderData.setFloatArray(PointLight._distanceProperty, data.distance);
|
|
8907
8972
|
};
|
|
8908
|
-
|
|
8973
|
+
_create_class$2(PointLight, [
|
|
8909
8974
|
{
|
|
8910
8975
|
key: "position",
|
|
8911
8976
|
get: /**
|
|
@@ -8926,16 +8991,26 @@ DirectLight._combinedData = {
|
|
|
8926
8991
|
]);
|
|
8927
8992
|
return PointLight;
|
|
8928
8993
|
}(Light);
|
|
8929
|
-
|
|
8930
|
-
PointLight.
|
|
8931
|
-
|
|
8932
|
-
|
|
8933
|
-
PointLight.
|
|
8934
|
-
|
|
8935
|
-
|
|
8936
|
-
|
|
8937
|
-
|
|
8938
|
-
|
|
8994
|
+
(function() {
|
|
8995
|
+
PointLight._cullingMaskProperty = Shader.getPropertyByName("u_pointLightCullingMask");
|
|
8996
|
+
})();
|
|
8997
|
+
(function() {
|
|
8998
|
+
PointLight._colorProperty = Shader.getPropertyByName("u_pointLightColor");
|
|
8999
|
+
})();
|
|
9000
|
+
(function() {
|
|
9001
|
+
PointLight._positionProperty = Shader.getPropertyByName("u_pointLightPosition");
|
|
9002
|
+
})();
|
|
9003
|
+
(function() {
|
|
9004
|
+
PointLight._distanceProperty = Shader.getPropertyByName("u_pointLightDistance");
|
|
9005
|
+
})();
|
|
9006
|
+
(function() {
|
|
9007
|
+
PointLight._combinedData = {
|
|
9008
|
+
cullingMask: new Int32Array(Light._maxLight * 2),
|
|
9009
|
+
color: new Float32Array(Light._maxLight * 3),
|
|
9010
|
+
position: new Float32Array(Light._maxLight * 3),
|
|
9011
|
+
distance: new Float32Array(Light._maxLight)
|
|
9012
|
+
};
|
|
9013
|
+
})();
|
|
8939
9014
|
/**
|
|
8940
9015
|
* Spot light.
|
|
8941
9016
|
*/ var SpotLight = /*#__PURE__*/ function(Light) {
|
|
@@ -9008,7 +9083,7 @@ PointLight._combinedData = {
|
|
|
9008
9083
|
shaderData.setFloatArray(SpotLight._angleCosProperty, data.angleCos);
|
|
9009
9084
|
shaderData.setFloatArray(SpotLight._penumbraCosProperty, data.penumbraCos);
|
|
9010
9085
|
};
|
|
9011
|
-
|
|
9086
|
+
_create_class$2(SpotLight, [
|
|
9012
9087
|
{
|
|
9013
9088
|
key: "position",
|
|
9014
9089
|
get: /**
|
|
@@ -9050,22 +9125,38 @@ PointLight._combinedData = {
|
|
|
9050
9125
|
]);
|
|
9051
9126
|
return SpotLight;
|
|
9052
9127
|
}(Light);
|
|
9053
|
-
|
|
9054
|
-
SpotLight.
|
|
9055
|
-
|
|
9056
|
-
|
|
9057
|
-
SpotLight.
|
|
9058
|
-
|
|
9059
|
-
|
|
9060
|
-
SpotLight.
|
|
9061
|
-
|
|
9062
|
-
|
|
9063
|
-
|
|
9064
|
-
|
|
9065
|
-
|
|
9066
|
-
|
|
9067
|
-
|
|
9068
|
-
|
|
9128
|
+
(function() {
|
|
9129
|
+
SpotLight._cullingMaskProperty = Shader.getPropertyByName("u_spotLightCullingMask");
|
|
9130
|
+
})();
|
|
9131
|
+
(function() {
|
|
9132
|
+
SpotLight._colorProperty = Shader.getPropertyByName("u_spotLightColor");
|
|
9133
|
+
})();
|
|
9134
|
+
(function() {
|
|
9135
|
+
SpotLight._positionProperty = Shader.getPropertyByName("u_spotLightPosition");
|
|
9136
|
+
})();
|
|
9137
|
+
(function() {
|
|
9138
|
+
SpotLight._directionProperty = Shader.getPropertyByName("u_spotLightDirection");
|
|
9139
|
+
})();
|
|
9140
|
+
(function() {
|
|
9141
|
+
SpotLight._distanceProperty = Shader.getPropertyByName("u_spotLightDistance");
|
|
9142
|
+
})();
|
|
9143
|
+
(function() {
|
|
9144
|
+
SpotLight._angleCosProperty = Shader.getPropertyByName("u_spotLightAngleCos");
|
|
9145
|
+
})();
|
|
9146
|
+
(function() {
|
|
9147
|
+
SpotLight._penumbraCosProperty = Shader.getPropertyByName("u_spotLightPenumbraCos");
|
|
9148
|
+
})();
|
|
9149
|
+
(function() {
|
|
9150
|
+
SpotLight._combinedData = {
|
|
9151
|
+
cullingMask: new Int32Array(Light._maxLight * 2),
|
|
9152
|
+
color: new Float32Array(Light._maxLight * 3),
|
|
9153
|
+
position: new Float32Array(Light._maxLight * 3),
|
|
9154
|
+
direction: new Float32Array(Light._maxLight * 3),
|
|
9155
|
+
distance: new Float32Array(Light._maxLight),
|
|
9156
|
+
angleCos: new Float32Array(Light._maxLight),
|
|
9157
|
+
penumbraCos: new Float32Array(Light._maxLight)
|
|
9158
|
+
};
|
|
9159
|
+
})();
|
|
9069
9160
|
/**
|
|
9070
9161
|
* Light manager.
|
|
9071
9162
|
*/ var LightManager = /*#__PURE__*/ function() {
|
|
@@ -9618,7 +9709,7 @@ SpotLight._combinedData = {
|
|
|
9618
9709
|
/**
|
|
9619
9710
|
* @override
|
|
9620
9711
|
*/ _proto._onDestroy = function _onDestroy() {};
|
|
9621
|
-
|
|
9712
|
+
_create_class$2(Material, [
|
|
9622
9713
|
{
|
|
9623
9714
|
key: "shader",
|
|
9624
9715
|
get: /**
|
|
@@ -9722,9 +9813,15 @@ var RenderElement = function RenderElement() {};
|
|
|
9722
9813
|
};
|
|
9723
9814
|
return RenderContext;
|
|
9724
9815
|
}();
|
|
9725
|
-
|
|
9726
|
-
RenderContext.
|
|
9727
|
-
|
|
9816
|
+
(function() {
|
|
9817
|
+
/** @internal */ RenderContext._vpMatrixProperty = Shader.getPropertyByName("u_VPMat");
|
|
9818
|
+
})();
|
|
9819
|
+
(function() {
|
|
9820
|
+
RenderContext._viewMatrixProperty = Shader.getPropertyByName("u_viewMat");
|
|
9821
|
+
})();
|
|
9822
|
+
(function() {
|
|
9823
|
+
RenderContext._projectionMatrixProperty = Shader.getPropertyByName("u_projMat");
|
|
9824
|
+
})();
|
|
9728
9825
|
var SpriteElement = /*#__PURE__*/ function(RenderElement) {
|
|
9729
9826
|
var SpriteElement = function SpriteElement() {
|
|
9730
9827
|
var _this;
|
|
@@ -9774,7 +9871,6 @@ exports.Renderer = (_Renderer = /*#__PURE__*/ function(Component) {
|
|
|
9774
9871
|
var Renderer1 = function Renderer1(entity) {
|
|
9775
9872
|
var _this;
|
|
9776
9873
|
_this = Component.call(this, entity) || this;
|
|
9777
|
-
/** Whether cast shadow. */ _this.castShadows = true;
|
|
9778
9874
|
/** ShaderData related to renderer. */ _this.shaderData = new ShaderData(ShaderDataGroup.Renderer);
|
|
9779
9875
|
/** @internal */ _this._onUpdateIndex = -1;
|
|
9780
9876
|
/** @internal */ _this._rendererIndex = -1;
|
|
@@ -9791,11 +9887,12 @@ exports.Renderer = (_Renderer = /*#__PURE__*/ function(Component) {
|
|
|
9791
9887
|
_this._priority = 0;
|
|
9792
9888
|
_this._receiveShadows = true;
|
|
9793
9889
|
_this._rendererLayer = new miniprogram$7.Vector4();
|
|
9890
|
+
/** Whether cast shadow. */ _this.castShadows = true;
|
|
9794
9891
|
var prototype = exports.Renderer.prototype;
|
|
9795
9892
|
var shaderData = _this.shaderData;
|
|
9796
9893
|
_this._overrideUpdate = _this.update !== prototype.update;
|
|
9797
9894
|
shaderData._addRefCount(1);
|
|
9798
|
-
_this._onTransformChanged = _this._onTransformChanged.bind(
|
|
9895
|
+
_this._onTransformChanged = _this._onTransformChanged.bind(_assert_this_initialized(_this));
|
|
9799
9896
|
_this._registerEntityTransformListener();
|
|
9800
9897
|
shaderData.enableMacro(exports.Renderer._receiveShadowMacro);
|
|
9801
9898
|
shaderData.setVector4(exports.Renderer._rendererLayerProperty, _this._rendererLayer);
|
|
@@ -9981,7 +10078,7 @@ exports.Renderer = (_Renderer = /*#__PURE__*/ function(Component) {
|
|
|
9981
10078
|
_proto._onTransformChanged = function _onTransformChanged(type) {
|
|
9982
10079
|
this._dirtyUpdateFlag |= 0x1;
|
|
9983
10080
|
};
|
|
9984
|
-
|
|
10081
|
+
_create_class$2(Renderer1, [
|
|
9985
10082
|
{
|
|
9986
10083
|
key: "isCulled",
|
|
9987
10084
|
get: /**
|
|
@@ -10047,7 +10144,25 @@ exports.Renderer = (_Renderer = /*#__PURE__*/ function(Component) {
|
|
|
10047
10144
|
}
|
|
10048
10145
|
]);
|
|
10049
10146
|
return Renderer1;
|
|
10050
|
-
}(Component),
|
|
10147
|
+
}(Component), function() {
|
|
10148
|
+
_Renderer._tempVector0 = new miniprogram$7.Vector3();
|
|
10149
|
+
}(), function() {
|
|
10150
|
+
_Renderer._receiveShadowMacro = Shader.getMacroByName("OASIS_RECEIVE_SHADOWS");
|
|
10151
|
+
}(), function() {
|
|
10152
|
+
_Renderer._localMatrixProperty = Shader.getPropertyByName("u_localMat");
|
|
10153
|
+
}(), function() {
|
|
10154
|
+
_Renderer._worldMatrixProperty = Shader.getPropertyByName("u_modelMat");
|
|
10155
|
+
}(), function() {
|
|
10156
|
+
_Renderer._mvMatrixProperty = Shader.getPropertyByName("u_MVMat");
|
|
10157
|
+
}(), function() {
|
|
10158
|
+
_Renderer._mvpMatrixProperty = Shader.getPropertyByName("u_MVPMat");
|
|
10159
|
+
}(), function() {
|
|
10160
|
+
_Renderer._mvInvMatrixProperty = Shader.getPropertyByName("u_MVInvMat");
|
|
10161
|
+
}(), function() {
|
|
10162
|
+
_Renderer._normalMatrixProperty = Shader.getPropertyByName("u_normalMat");
|
|
10163
|
+
}(), function() {
|
|
10164
|
+
_Renderer._rendererLayerProperty = Shader.getPropertyByName("oasis_RendererLayer");
|
|
10165
|
+
}(), _Renderer);
|
|
10051
10166
|
__decorate$1([
|
|
10052
10167
|
deepClone
|
|
10053
10168
|
], exports.Renderer.prototype, "shaderData", void 0);
|
|
@@ -10174,14 +10289,18 @@ var SimpleSpriteAssembler = (_SimpleSpriteAssembler = /*#__PURE__*/ function() {
|
|
|
10174
10289
|
renderUVs[3].set(right, top);
|
|
10175
10290
|
};
|
|
10176
10291
|
return SimpleSpriteAssembler1;
|
|
10177
|
-
}(),
|
|
10178
|
-
|
|
10179
|
-
|
|
10180
|
-
|
|
10181
|
-
|
|
10182
|
-
|
|
10183
|
-
|
|
10184
|
-
|
|
10292
|
+
}(), function() {
|
|
10293
|
+
_SimpleSpriteAssembler._rectangleTriangles = [
|
|
10294
|
+
0,
|
|
10295
|
+
1,
|
|
10296
|
+
2,
|
|
10297
|
+
2,
|
|
10298
|
+
1,
|
|
10299
|
+
3
|
|
10300
|
+
];
|
|
10301
|
+
}(), function() {
|
|
10302
|
+
_SimpleSpriteAssembler._worldMatrix = new miniprogram$7.Matrix();
|
|
10303
|
+
}(), _SimpleSpriteAssembler);
|
|
10185
10304
|
SimpleSpriteAssembler = __decorate$1([
|
|
10186
10305
|
StaticInterfaceImplement$1()
|
|
10187
10306
|
], SimpleSpriteAssembler);
|
|
@@ -10262,10 +10381,10 @@ SimpleSpriteAssembler = __decorate$1([
|
|
|
10262
10381
|
_this._flipY = false;
|
|
10263
10382
|
_this._alphaCutoff = 0.5;
|
|
10264
10383
|
_this._renderData = new RenderData2D(4, [], []);
|
|
10265
|
-
SimpleSpriteAssembler.resetData(
|
|
10384
|
+
SimpleSpriteAssembler.resetData(_assert_this_initialized(_this));
|
|
10266
10385
|
_this.setMaterial(_this._engine._spriteMaskDefaultMaterial);
|
|
10267
10386
|
_this.shaderData.setFloat(SpriteMask._alphaCutoffProperty, _this._alphaCutoff);
|
|
10268
|
-
_this._onSpriteChange = _this._onSpriteChange.bind(
|
|
10387
|
+
_this._onSpriteChange = _this._onSpriteChange.bind(_assert_this_initialized(_this));
|
|
10269
10388
|
return _this;
|
|
10270
10389
|
}
|
|
10271
10390
|
var _proto = SpriteMask.prototype;
|
|
@@ -10333,7 +10452,7 @@ SimpleSpriteAssembler = __decorate$1([
|
|
|
10333
10452
|
break;
|
|
10334
10453
|
}
|
|
10335
10454
|
};
|
|
10336
|
-
|
|
10455
|
+
_create_class$2(SpriteMask, [
|
|
10337
10456
|
{
|
|
10338
10457
|
key: "width",
|
|
10339
10458
|
get: /**
|
|
@@ -10435,8 +10554,12 @@ SimpleSpriteAssembler = __decorate$1([
|
|
|
10435
10554
|
]);
|
|
10436
10555
|
return SpriteMask;
|
|
10437
10556
|
}(exports.Renderer);
|
|
10438
|
-
|
|
10439
|
-
/** @internal */ SpriteMask.
|
|
10557
|
+
(function() {
|
|
10558
|
+
/** @internal */ SpriteMask._textureProperty = Shader.getPropertyByName("u_maskTexture");
|
|
10559
|
+
})();
|
|
10560
|
+
(function() {
|
|
10561
|
+
/** @internal */ SpriteMask._alphaCutoffProperty = Shader.getPropertyByName("u_maskAlphaCutoff");
|
|
10562
|
+
})();
|
|
10440
10563
|
__decorate$1([
|
|
10441
10564
|
assignmentClone
|
|
10442
10565
|
], SpriteMask.prototype, "influenceLayers", void 0);
|
|
@@ -10637,7 +10760,7 @@ var BufferUtil = /*#__PURE__*/ function() {
|
|
|
10637
10760
|
this._glElementInfo = BufferUtil._getElementInfo(this.format);
|
|
10638
10761
|
this._instanceStepRate = Math.floor(instanceStepRate);
|
|
10639
10762
|
};
|
|
10640
|
-
|
|
10763
|
+
_create_class$2(VertexElement, [
|
|
10641
10764
|
{
|
|
10642
10765
|
key: "semantic",
|
|
10643
10766
|
get: /**
|
|
@@ -10794,7 +10917,7 @@ var BufferUtil = /*#__PURE__*/ function() {
|
|
|
10794
10917
|
gl.bufferData(this._glBindTarget, dataLength, this._glBufferUsage);
|
|
10795
10918
|
this._byteLength = dataLength;
|
|
10796
10919
|
};
|
|
10797
|
-
|
|
10920
|
+
_create_class$2(Buffer, [
|
|
10798
10921
|
{
|
|
10799
10922
|
key: "type",
|
|
10800
10923
|
get: /**
|
|
@@ -10841,7 +10964,7 @@ var BufferUtil = /*#__PURE__*/ function() {
|
|
|
10841
10964
|
this._buffer = buffer;
|
|
10842
10965
|
this._format = format;
|
|
10843
10966
|
};
|
|
10844
|
-
|
|
10967
|
+
_create_class$2(IndexBufferBinding, [
|
|
10845
10968
|
{
|
|
10846
10969
|
key: "buffer",
|
|
10847
10970
|
get: /**
|
|
@@ -10887,8 +11010,8 @@ var BufferUtil = /*#__PURE__*/ function() {
|
|
|
10887
11010
|
_this._bounds = new miniprogram$7.BoundingBox();
|
|
10888
11011
|
_this._subMeshes = [];
|
|
10889
11012
|
_this.name = name;
|
|
10890
|
-
_this._platformPrimitive = _this._engine._hardwareRenderer.createPlatformPrimitive(
|
|
10891
|
-
_this._onBoundsChanged = _this._onBoundsChanged.bind(
|
|
11013
|
+
_this._platformPrimitive = _this._engine._hardwareRenderer.createPlatformPrimitive(_assert_this_initialized(_this));
|
|
11014
|
+
_this._onBoundsChanged = _this._onBoundsChanged.bind(_assert_this_initialized(_this));
|
|
10892
11015
|
var bounds = _this._bounds;
|
|
10893
11016
|
// @ts-ignore
|
|
10894
11017
|
bounds.min._onValueChanged = _this._onBoundsChanged;
|
|
@@ -11006,7 +11129,7 @@ var BufferUtil = /*#__PURE__*/ function() {
|
|
|
11006
11129
|
_proto._onBoundsChanged = function _onBoundsChanged() {
|
|
11007
11130
|
this._updateFlagManager.dispatch(0x1);
|
|
11008
11131
|
};
|
|
11009
|
-
|
|
11132
|
+
_create_class$2(Mesh, [
|
|
11010
11133
|
{
|
|
11011
11134
|
key: "bounds",
|
|
11012
11135
|
get: /**
|
|
@@ -11051,7 +11174,7 @@ var MeshModifyFlags;
|
|
|
11051
11174
|
this._buffer = buffer;
|
|
11052
11175
|
this._stride = stride;
|
|
11053
11176
|
};
|
|
11054
|
-
|
|
11177
|
+
_create_class$2(VertexBufferBinding, [
|
|
11055
11178
|
{
|
|
11056
11179
|
key: "buffer",
|
|
11057
11180
|
get: /**
|
|
@@ -11496,13 +11619,27 @@ var MeshModifyFlags;
|
|
|
11496
11619
|
};
|
|
11497
11620
|
return BlendShapeManager;
|
|
11498
11621
|
}();
|
|
11499
|
-
|
|
11500
|
-
BlendShapeManager.
|
|
11501
|
-
|
|
11502
|
-
|
|
11503
|
-
BlendShapeManager.
|
|
11504
|
-
|
|
11505
|
-
|
|
11622
|
+
(function() {
|
|
11623
|
+
BlendShapeManager._blendShapeMacro = Shader.getMacroByName("OASIS_BLENDSHAPE");
|
|
11624
|
+
})();
|
|
11625
|
+
(function() {
|
|
11626
|
+
BlendShapeManager._blendShapeTextureMacro = Shader.getMacroByName("OASIS_BLENDSHAPE_TEXTURE");
|
|
11627
|
+
})();
|
|
11628
|
+
(function() {
|
|
11629
|
+
BlendShapeManager._blendShapeNormalMacro = Shader.getMacroByName("OASIS_BLENDSHAPE_NORMAL");
|
|
11630
|
+
})();
|
|
11631
|
+
(function() {
|
|
11632
|
+
BlendShapeManager._blendShapeTangentMacro = Shader.getMacroByName("OASIS_BLENDSHAPE_TANGENT");
|
|
11633
|
+
})();
|
|
11634
|
+
(function() {
|
|
11635
|
+
BlendShapeManager._blendShapeWeightsProperty = Shader.getPropertyByName("u_blendShapeWeights");
|
|
11636
|
+
})();
|
|
11637
|
+
(function() {
|
|
11638
|
+
BlendShapeManager._blendShapeTextureProperty = Shader.getPropertyByName("u_blendShapeTexture");
|
|
11639
|
+
})();
|
|
11640
|
+
(function() {
|
|
11641
|
+
BlendShapeManager._blendShapeTextureInfoProperty = Shader.getPropertyByName("u_blendShapeTextureInfo");
|
|
11642
|
+
})();
|
|
11506
11643
|
/**
|
|
11507
11644
|
* Vertex attribute types of a vertex in a ModelMesh.
|
|
11508
11645
|
*/ var VertexAttribute;
|
|
@@ -11556,7 +11693,7 @@ BlendShapeManager._blendShapeTextureInfoProperty = Shader.getPropertyByName("u_b
|
|
|
11556
11693
|
_this._customVertexElements = [];
|
|
11557
11694
|
_this._vertexCountChanged = false;
|
|
11558
11695
|
_this.name = name;
|
|
11559
|
-
_this._blendShapeManager = new BlendShapeManager(engine,
|
|
11696
|
+
_this._blendShapeManager = new BlendShapeManager(engine, _assert_this_initialized(_this));
|
|
11560
11697
|
return _this;
|
|
11561
11698
|
};
|
|
11562
11699
|
_inherits$2(ModelMesh, Mesh);
|
|
@@ -12507,7 +12644,7 @@ BlendShapeManager._blendShapeTextureInfoProperty = Shader.getPropertyByName("u_b
|
|
|
12507
12644
|
this._uv7 = null;
|
|
12508
12645
|
this._blendShapeManager._releaseMemoryCache();
|
|
12509
12646
|
};
|
|
12510
|
-
|
|
12647
|
+
_create_class$2(ModelMesh, [
|
|
12511
12648
|
{
|
|
12512
12649
|
key: "accessible",
|
|
12513
12650
|
get: /**
|
|
@@ -12575,11 +12712,21 @@ BlendShapeManager._blendShapeTextureInfoProperty = Shader.getPropertyByName("u_b
|
|
|
12575
12712
|
]);
|
|
12576
12713
|
return ModelMesh;
|
|
12577
12714
|
}(Mesh);
|
|
12578
|
-
|
|
12579
|
-
ModelMesh.
|
|
12580
|
-
|
|
12581
|
-
|
|
12582
|
-
ModelMesh.
|
|
12715
|
+
(function() {
|
|
12716
|
+
ModelMesh._tempVec0 = new miniprogram$7.Vector3();
|
|
12717
|
+
})();
|
|
12718
|
+
(function() {
|
|
12719
|
+
ModelMesh._tempVec1 = new miniprogram$7.Vector3();
|
|
12720
|
+
})();
|
|
12721
|
+
(function() {
|
|
12722
|
+
ModelMesh._tempVec2 = new miniprogram$7.Vector3();
|
|
12723
|
+
})();
|
|
12724
|
+
(function() {
|
|
12725
|
+
ModelMesh._tempVec3 = new miniprogram$7.Vector3();
|
|
12726
|
+
})();
|
|
12727
|
+
(function() {
|
|
12728
|
+
ModelMesh._tempVec4 = new miniprogram$7.Vector3();
|
|
12729
|
+
})();
|
|
12583
12730
|
var VertexChangedFlags;
|
|
12584
12731
|
(function(VertexChangedFlags) {
|
|
12585
12732
|
VertexChangedFlags[VertexChangedFlags["Position"] = 0x1] = "Position";
|
|
@@ -12619,7 +12766,7 @@ var VertexChangedFlags;
|
|
|
12619
12766
|
var MeshRenderer = function MeshRenderer(entity) {
|
|
12620
12767
|
var _this;
|
|
12621
12768
|
_this = Renderer.call(this, entity) || this;
|
|
12622
|
-
_this._onMeshChanged = _this._onMeshChanged.bind(
|
|
12769
|
+
_this._onMeshChanged = _this._onMeshChanged.bind(_assert_this_initialized(_this));
|
|
12623
12770
|
return _this;
|
|
12624
12771
|
};
|
|
12625
12772
|
_inherits$2(MeshRenderer, Renderer);
|
|
@@ -12723,7 +12870,7 @@ var VertexChangedFlags;
|
|
|
12723
12870
|
type & MeshModifyFlags.Bounds && (this._dirtyUpdateFlag |= RendererUpdateFlags.WorldVolume);
|
|
12724
12871
|
type & MeshModifyFlags.VertexElements && (this._dirtyUpdateFlag |= 0x2);
|
|
12725
12872
|
};
|
|
12726
|
-
|
|
12873
|
+
_create_class$2(MeshRenderer, [
|
|
12727
12874
|
{
|
|
12728
12875
|
key: "mesh",
|
|
12729
12876
|
get: /**
|
|
@@ -12740,11 +12887,21 @@ var VertexChangedFlags;
|
|
|
12740
12887
|
]);
|
|
12741
12888
|
return MeshRenderer;
|
|
12742
12889
|
}(exports.Renderer);
|
|
12743
|
-
|
|
12744
|
-
MeshRenderer.
|
|
12745
|
-
|
|
12746
|
-
|
|
12747
|
-
MeshRenderer.
|
|
12890
|
+
(function() {
|
|
12891
|
+
MeshRenderer._uvMacro = Shader.getMacroByName("O3_HAS_UV");
|
|
12892
|
+
})();
|
|
12893
|
+
(function() {
|
|
12894
|
+
MeshRenderer._uv1Macro = Shader.getMacroByName("O3_HAS_UV1");
|
|
12895
|
+
})();
|
|
12896
|
+
(function() {
|
|
12897
|
+
MeshRenderer._normalMacro = Shader.getMacroByName("O3_HAS_NORMAL");
|
|
12898
|
+
})();
|
|
12899
|
+
(function() {
|
|
12900
|
+
MeshRenderer._tangentMacro = Shader.getMacroByName("O3_HAS_TANGENT");
|
|
12901
|
+
})();
|
|
12902
|
+
(function() {
|
|
12903
|
+
MeshRenderer._vertexColorMacro = Shader.getMacroByName("O3_HAS_VERTEXCOLOR");
|
|
12904
|
+
})();
|
|
12748
12905
|
__decorate$1([
|
|
12749
12906
|
ignoreClone
|
|
12750
12907
|
], MeshRenderer.prototype, "_mesh", void 0);
|
|
@@ -12843,7 +13000,7 @@ var rePropName = RegExp("[^.[\\]]+" + "|" + // Or match property names within br
|
|
|
12843
13000
|
// 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.
|
|
12844
13001
|
maxVertexUniformVectors = Math.min(maxVertexUniformVectors, 256);
|
|
12845
13002
|
_this._maxVertexUniformVectors = maxVertexUniformVectors;
|
|
12846
|
-
_this._onLocalBoundsChanged = _this._onLocalBoundsChanged.bind(
|
|
13003
|
+
_this._onLocalBoundsChanged = _this._onLocalBoundsChanged.bind(_assert_this_initialized(_this));
|
|
12847
13004
|
var localBounds = _this._localBounds;
|
|
12848
13005
|
// @ts-ignore
|
|
12849
13006
|
localBounds.min._onValueChanged = _this._onLocalBoundsChanged;
|
|
@@ -13042,7 +13199,7 @@ var rePropName = RegExp("[^.[\\]]+" + "|" + // Or match property names within br
|
|
|
13042
13199
|
_proto._onLocalBoundsChanged = function _onLocalBoundsChanged() {
|
|
13043
13200
|
this._dirtyUpdateFlag |= RendererUpdateFlags.WorldVolume;
|
|
13044
13201
|
};
|
|
13045
|
-
|
|
13202
|
+
_create_class$2(SkinnedMeshRenderer, [
|
|
13046
13203
|
{
|
|
13047
13204
|
key: "blendShapeWeights",
|
|
13048
13205
|
get: /**
|
|
@@ -13107,10 +13264,18 @@ var rePropName = RegExp("[^.[\\]]+" + "|" + // Or match property names within br
|
|
|
13107
13264
|
]);
|
|
13108
13265
|
return SkinnedMeshRenderer;
|
|
13109
13266
|
}(MeshRenderer);
|
|
13110
|
-
|
|
13111
|
-
SkinnedMeshRenderer.
|
|
13112
|
-
|
|
13113
|
-
|
|
13267
|
+
(function() {
|
|
13268
|
+
SkinnedMeshRenderer._tempMatrix = new miniprogram$7.Matrix();
|
|
13269
|
+
})();
|
|
13270
|
+
(function() {
|
|
13271
|
+
SkinnedMeshRenderer._jointCountProperty = Shader.getPropertyByName("u_jointCount");
|
|
13272
|
+
})();
|
|
13273
|
+
(function() {
|
|
13274
|
+
SkinnedMeshRenderer._jointSamplerProperty = Shader.getPropertyByName("u_jointSampler");
|
|
13275
|
+
})();
|
|
13276
|
+
(function() {
|
|
13277
|
+
SkinnedMeshRenderer._jointMatrixProperty = Shader.getPropertyByName("u_jointMatrix");
|
|
13278
|
+
})();
|
|
13114
13279
|
__decorate$1([
|
|
13115
13280
|
ignoreClone
|
|
13116
13281
|
], SkinnedMeshRenderer.prototype, "_hasInitSkin", void 0);
|
|
@@ -13869,7 +14034,7 @@ __decorate$1([
|
|
|
13869
14034
|
}
|
|
13870
14035
|
this._setIndexBufferBinding(binding);
|
|
13871
14036
|
};
|
|
13872
|
-
|
|
14037
|
+
_create_class$2(BufferMesh, [
|
|
13873
14038
|
{
|
|
13874
14039
|
key: "instanceCount",
|
|
13875
14040
|
get: /**
|
|
@@ -13981,7 +14146,7 @@ __decorate$1([
|
|
|
13981
14146
|
this._layoutChangeManager.dispatch(0, this);
|
|
13982
14147
|
}
|
|
13983
14148
|
};
|
|
13984
|
-
|
|
14149
|
+
_create_class$2(BlendShape, [
|
|
13985
14150
|
{
|
|
13986
14151
|
key: "frames",
|
|
13987
14152
|
get: /**
|
|
@@ -14138,8 +14303,12 @@ var Basic2DBatcher = /*#__PURE__*/ function() {
|
|
|
14138
14303
|
};
|
|
14139
14304
|
return Basic2DBatcher;
|
|
14140
14305
|
}();
|
|
14141
|
-
|
|
14142
|
-
Basic2DBatcher.
|
|
14306
|
+
(function() {
|
|
14307
|
+
/** The maximum number of vertex. */ Basic2DBatcher.MAX_VERTEX_COUNT = 4096;
|
|
14308
|
+
})();
|
|
14309
|
+
(function() {
|
|
14310
|
+
Basic2DBatcher._canUploadSameBuffer = true;
|
|
14311
|
+
})();
|
|
14143
14312
|
var SpriteMaskBatcher = /*#__PURE__*/ function(Basic2DBatcher) {
|
|
14144
14313
|
var SpriteMaskBatcher = function SpriteMaskBatcher() {
|
|
14145
14314
|
return Basic2DBatcher.apply(this, arguments);
|
|
@@ -14348,9 +14517,15 @@ var TextRenderElement = /*#__PURE__*/ function(RenderElement) {
|
|
|
14348
14517
|
};
|
|
14349
14518
|
return Sky;
|
|
14350
14519
|
}();
|
|
14351
|
-
|
|
14352
|
-
Sky.
|
|
14353
|
-
|
|
14520
|
+
(function() {
|
|
14521
|
+
Sky._epsilon = 1e-6;
|
|
14522
|
+
})();
|
|
14523
|
+
(function() {
|
|
14524
|
+
Sky._viewProjMatrix = new miniprogram$7.Matrix();
|
|
14525
|
+
})();
|
|
14526
|
+
(function() {
|
|
14527
|
+
Sky._projectionMatrix = new miniprogram$7.Matrix(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, Sky._epsilon - 1, -1, 0, 0, 0, 0);
|
|
14528
|
+
})();
|
|
14354
14529
|
/**
|
|
14355
14530
|
* Background of scene.
|
|
14356
14531
|
*/ var Background = /*#__PURE__*/ function() {
|
|
@@ -14431,7 +14606,7 @@ Sky._projectionMatrix = new miniprogram$7.Matrix(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, S
|
|
|
14431
14606
|
mesh.addSubMesh(0, indices.length);
|
|
14432
14607
|
return mesh;
|
|
14433
14608
|
};
|
|
14434
|
-
|
|
14609
|
+
_create_class$2(Background, [
|
|
14435
14610
|
{
|
|
14436
14611
|
key: "texture",
|
|
14437
14612
|
get: /**
|
|
@@ -14596,7 +14771,7 @@ Sky._projectionMatrix = new miniprogram$7.Matrix(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, S
|
|
|
14596
14771
|
out[25] = src[25] * 0.429042;
|
|
14597
14772
|
out[26] = src[26] * 0.429042;
|
|
14598
14773
|
};
|
|
14599
|
-
|
|
14774
|
+
_create_class$2(AmbientLight, [
|
|
14600
14775
|
{
|
|
14601
14776
|
key: "specularTextureDecodeRGBM",
|
|
14602
14777
|
get: /**
|
|
@@ -14707,15 +14882,33 @@ Sky._projectionMatrix = new miniprogram$7.Matrix(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, S
|
|
|
14707
14882
|
]);
|
|
14708
14883
|
return AmbientLight;
|
|
14709
14884
|
}();
|
|
14710
|
-
|
|
14711
|
-
AmbientLight.
|
|
14712
|
-
|
|
14713
|
-
|
|
14714
|
-
AmbientLight.
|
|
14715
|
-
|
|
14716
|
-
|
|
14717
|
-
AmbientLight.
|
|
14718
|
-
|
|
14885
|
+
(function() {
|
|
14886
|
+
AmbientLight._shMacro = Shader.getMacroByName("O3_USE_SH");
|
|
14887
|
+
})();
|
|
14888
|
+
(function() {
|
|
14889
|
+
AmbientLight._specularMacro = Shader.getMacroByName("O3_USE_SPECULAR_ENV");
|
|
14890
|
+
})();
|
|
14891
|
+
(function() {
|
|
14892
|
+
AmbientLight._decodeRGBMMacro = Shader.getMacroByName("O3_DECODE_ENV_RGBM");
|
|
14893
|
+
})();
|
|
14894
|
+
(function() {
|
|
14895
|
+
AmbientLight._diffuseColorProperty = Shader.getPropertyByName("u_envMapLight.diffuse");
|
|
14896
|
+
})();
|
|
14897
|
+
(function() {
|
|
14898
|
+
AmbientLight._diffuseSHProperty = Shader.getPropertyByName("u_env_sh");
|
|
14899
|
+
})();
|
|
14900
|
+
(function() {
|
|
14901
|
+
AmbientLight._diffuseIntensityProperty = Shader.getPropertyByName("u_envMapLight.diffuseIntensity");
|
|
14902
|
+
})();
|
|
14903
|
+
(function() {
|
|
14904
|
+
AmbientLight._specularTextureProperty = Shader.getPropertyByName("u_env_specularSampler");
|
|
14905
|
+
})();
|
|
14906
|
+
(function() {
|
|
14907
|
+
AmbientLight._specularIntensityProperty = Shader.getPropertyByName("u_envMapLight.specularIntensity");
|
|
14908
|
+
})();
|
|
14909
|
+
(function() {
|
|
14910
|
+
AmbientLight._mipLevelProperty = Shader.getPropertyByName("u_envMapLight.mipMapLevel");
|
|
14911
|
+
})();
|
|
14719
14912
|
/**
|
|
14720
14913
|
* Scene.
|
|
14721
14914
|
*/ var Scene = /*#__PURE__*/ function(EngineObject) {
|
|
@@ -14745,7 +14938,7 @@ AmbientLight._mipLevelProperty = Shader.getPropertyByName("u_envMapLight.mipMapL
|
|
|
14745
14938
|
var shaderData = _this.shaderData;
|
|
14746
14939
|
shaderData._addRefCount(1);
|
|
14747
14940
|
_this.ambientLight = new AmbientLight();
|
|
14748
|
-
engine.sceneManager._allScenes.push(
|
|
14941
|
+
engine.sceneManager._allScenes.push(_assert_this_initialized(_this));
|
|
14749
14942
|
shaderData.enableMacro("OASIS_FOG_MODE", _this._fogMode.toString());
|
|
14750
14943
|
shaderData.enableMacro("CASCADED_COUNT", _this.shadowCascades.toString());
|
|
14751
14944
|
shaderData.setColor(Scene._fogColorProperty, _this._fogColor);
|
|
@@ -14952,7 +15145,7 @@ AmbientLight._mipLevelProperty = Shader.getPropertyByName("u_envMapLight.mipMapL
|
|
|
14952
15145
|
this._fogParams.z = density / Math.LN2;
|
|
14953
15146
|
this._fogParams.w = density / Math.sqrt(Math.LN2);
|
|
14954
15147
|
};
|
|
14955
|
-
|
|
15148
|
+
_create_class$2(Scene, [
|
|
14956
15149
|
{
|
|
14957
15150
|
key: "shadowCascades",
|
|
14958
15151
|
get: /**
|
|
@@ -15080,8 +15273,12 @@ AmbientLight._mipLevelProperty = Shader.getPropertyByName("u_envMapLight.mipMapL
|
|
|
15080
15273
|
]);
|
|
15081
15274
|
return Scene;
|
|
15082
15275
|
}(EngineObject);
|
|
15083
|
-
|
|
15084
|
-
Scene.
|
|
15276
|
+
(function() {
|
|
15277
|
+
Scene._fogColorProperty = Shader.getPropertyByName("oasis_FogColor");
|
|
15278
|
+
})();
|
|
15279
|
+
(function() {
|
|
15280
|
+
Scene._fogParamsProperty = Shader.getPropertyByName("oasis_FogParams");
|
|
15281
|
+
})();
|
|
15085
15282
|
/**
|
|
15086
15283
|
* Scene manager.
|
|
15087
15284
|
*/ var SceneManager = /*#__PURE__*/ function() {
|
|
@@ -15128,7 +15325,7 @@ Scene._fogParamsProperty = Shader.getPropertyByName("oasis_FogParams");
|
|
|
15128
15325
|
}
|
|
15129
15326
|
allScenes.length = 0;
|
|
15130
15327
|
};
|
|
15131
|
-
|
|
15328
|
+
_create_class$2(SceneManager, [
|
|
15132
15329
|
{
|
|
15133
15330
|
key: "activeScene",
|
|
15134
15331
|
get: /**
|
|
@@ -15277,8 +15474,8 @@ ShaderPool.init();
|
|
|
15277
15474
|
/** @internal */ _this._canSpriteBatch = true;
|
|
15278
15475
|
/** @internal @todo: temporary solution */ _this._macroCollection = new ShaderMacroCollection();
|
|
15279
15476
|
_this._settings = {};
|
|
15280
|
-
_this._resourceManager = new ResourceManager(
|
|
15281
|
-
_this._sceneManager = new SceneManager(
|
|
15477
|
+
_this._resourceManager = new ResourceManager(_assert_this_initialized(_this));
|
|
15478
|
+
_this._sceneManager = new SceneManager(_assert_this_initialized(_this));
|
|
15282
15479
|
_this._vSyncCount = 1;
|
|
15283
15480
|
_this._targetFrameRate = 60;
|
|
15284
15481
|
_this._time = new Time();
|
|
@@ -15302,25 +15499,25 @@ ShaderPool.init();
|
|
|
15302
15499
|
};
|
|
15303
15500
|
_this._hardwareRenderer = hardwareRenderer;
|
|
15304
15501
|
_this._hardwareRenderer.init(canvas);
|
|
15305
|
-
_this.physicsManager = new PhysicsManager(
|
|
15502
|
+
_this.physicsManager = new PhysicsManager(_assert_this_initialized(_this));
|
|
15306
15503
|
_this._canvas = canvas;
|
|
15307
|
-
_this._sceneManager.activeScene = new Scene(
|
|
15308
|
-
_this._spriteMaskManager = new SpriteMaskManager(
|
|
15504
|
+
_this._sceneManager.activeScene = new Scene(_assert_this_initialized(_this), "DefaultScene");
|
|
15505
|
+
_this._spriteMaskManager = new SpriteMaskManager(_assert_this_initialized(_this));
|
|
15309
15506
|
_this._spriteDefaultMaterial = _this._createSpriteMaterial();
|
|
15310
15507
|
_this._spriteMaskDefaultMaterial = _this._createSpriteMaskMaterial();
|
|
15311
|
-
_this._textDefaultFont = Font.createFromOS(
|
|
15508
|
+
_this._textDefaultFont = Font.createFromOS(_assert_this_initialized(_this), "Arial");
|
|
15312
15509
|
_this._textDefaultFont.isGCIgnored = false;
|
|
15313
|
-
_this.inputManager = new InputManager(
|
|
15510
|
+
_this.inputManager = new InputManager(_assert_this_initialized(_this));
|
|
15314
15511
|
var magentaPixel = new Uint8Array([
|
|
15315
15512
|
255,
|
|
15316
15513
|
0,
|
|
15317
15514
|
255,
|
|
15318
15515
|
255
|
|
15319
15516
|
]);
|
|
15320
|
-
var magentaTexture2D = new Texture2D(
|
|
15517
|
+
var magentaTexture2D = new Texture2D(_assert_this_initialized(_this), 1, 1, exports.TextureFormat.R8G8B8A8, false);
|
|
15321
15518
|
magentaTexture2D.setPixelBuffer(magentaPixel);
|
|
15322
15519
|
magentaTexture2D.isGCIgnored = true;
|
|
15323
|
-
var magentaTextureCube = new TextureCube(
|
|
15520
|
+
var magentaTextureCube = new TextureCube(_assert_this_initialized(_this), 1, exports.TextureFormat.R8G8B8A8, false);
|
|
15324
15521
|
magentaTextureCube.setPixelBuffer(exports.TextureCubeFace.PositiveX, magentaPixel);
|
|
15325
15522
|
magentaTextureCube.setPixelBuffer(exports.TextureCubeFace.NegativeX, magentaPixel);
|
|
15326
15523
|
magentaTextureCube.setPixelBuffer(exports.TextureCubeFace.PositiveY, magentaPixel);
|
|
@@ -15331,22 +15528,22 @@ ShaderPool.init();
|
|
|
15331
15528
|
if (!hardwareRenderer.canIUse(exports.GLCapabilityType.depthTexture)) {
|
|
15332
15529
|
_this._macroCollection.enable(Engine._noDepthTextureMacro);
|
|
15333
15530
|
} else {
|
|
15334
|
-
var depthTexture2D = new Texture2D(
|
|
15531
|
+
var depthTexture2D = new Texture2D(_assert_this_initialized(_this), 1, 1, exports.TextureFormat.Depth16, false);
|
|
15335
15532
|
depthTexture2D.isGCIgnored = true;
|
|
15336
15533
|
_this._depthTexture2D = depthTexture2D;
|
|
15337
15534
|
}
|
|
15338
15535
|
_this._magentaTexture2D = magentaTexture2D;
|
|
15339
15536
|
_this._magentaTextureCube = magentaTextureCube;
|
|
15340
15537
|
if (hardwareRenderer.isWebGL2) {
|
|
15341
|
-
var magentaTexture2DArray = new Texture2DArray(
|
|
15538
|
+
var magentaTexture2DArray = new Texture2DArray(_assert_this_initialized(_this), 1, 1, 1, exports.TextureFormat.R8G8B8A8, false);
|
|
15342
15539
|
magentaTexture2DArray.setPixelBuffer(0, magentaPixel);
|
|
15343
15540
|
magentaTexture2DArray.isGCIgnored = true;
|
|
15344
15541
|
_this._magentaTexture2DArray = magentaTexture2DArray;
|
|
15345
15542
|
}
|
|
15346
|
-
var magentaMaterial = new Material(
|
|
15543
|
+
var magentaMaterial = new Material(_assert_this_initialized(_this), Shader.find("unlit"));
|
|
15347
15544
|
magentaMaterial.shaderData.setColor("u_baseColor", new Color(1.0, 0.0, 1.01, 1.0));
|
|
15348
15545
|
_this._magentaMaterial = magentaMaterial;
|
|
15349
|
-
var backgroundTextureMaterial = new Material(
|
|
15546
|
+
var backgroundTextureMaterial = new Material(_assert_this_initialized(_this), Shader.find("background-texture"));
|
|
15350
15547
|
backgroundTextureMaterial.isGCIgnored = true;
|
|
15351
15548
|
backgroundTextureMaterial.renderState.depthState.compareFunction = exports.CompareFunction.LessEqual;
|
|
15352
15549
|
_this._backgroundTextureMaterial = backgroundTextureMaterial;
|
|
@@ -15517,7 +15714,7 @@ ShaderPool.init();
|
|
|
15517
15714
|
material.isGCIgnored = true;
|
|
15518
15715
|
return material;
|
|
15519
15716
|
};
|
|
15520
|
-
|
|
15717
|
+
_create_class$2(Engine, [
|
|
15521
15718
|
{
|
|
15522
15719
|
key: "settings",
|
|
15523
15720
|
get: /**
|
|
@@ -15605,9 +15802,15 @@ ShaderPool.init();
|
|
|
15605
15802
|
]);
|
|
15606
15803
|
return Engine;
|
|
15607
15804
|
}(EventDispatcher);
|
|
15608
|
-
|
|
15609
|
-
/** @internal */ Engine.
|
|
15610
|
-
|
|
15805
|
+
(function() {
|
|
15806
|
+
/** @internal */ Engine._gammaMacro = Shader.getMacroByName("OASIS_COLORSPACE_GAMMA");
|
|
15807
|
+
})();
|
|
15808
|
+
(function() {
|
|
15809
|
+
/** @internal */ Engine._noDepthTextureMacro = Shader.getMacroByName("OASIS_NO_DEPTH_TEXTURE");
|
|
15810
|
+
})();
|
|
15811
|
+
(function() {
|
|
15812
|
+
/** @internal Conversion of space units to pixel units for 2D. */ Engine._pixelsPerUnit = 100;
|
|
15813
|
+
})();
|
|
15611
15814
|
/**
|
|
15612
15815
|
* Script class, used for logic writing.
|
|
15613
15816
|
*/ var Script = /*#__PURE__*/ function(Component) {
|
|
@@ -15920,7 +16123,9 @@ __decorate$1([
|
|
|
15920
16123
|
};
|
|
15921
16124
|
return SpriteBatcher;
|
|
15922
16125
|
}(Basic2DBatcher);
|
|
15923
|
-
|
|
16126
|
+
(function() {
|
|
16127
|
+
SpriteBatcher._textureProperty = Shader.getPropertyByName("u_spriteTexture");
|
|
16128
|
+
})();
|
|
15924
16129
|
/**
|
|
15925
16130
|
* Render queue.
|
|
15926
16131
|
*/ var RenderQueue = /*#__PURE__*/ function() {
|
|
@@ -16414,227 +16619,247 @@ var /**
|
|
|
16414
16619
|
};
|
|
16415
16620
|
return ShadowUtils;
|
|
16416
16621
|
}();
|
|
16417
|
-
|
|
16418
|
-
|
|
16419
|
-
|
|
16420
|
-
|
|
16421
|
-
|
|
16422
|
-
new miniprogram$7.
|
|
16423
|
-
|
|
16424
|
-
|
|
16425
|
-
|
|
16426
|
-
|
|
16427
|
-
|
|
16428
|
-
|
|
16429
|
-
|
|
16430
|
-
|
|
16431
|
-
|
|
16432
|
-
|
|
16433
|
-
|
|
16434
|
-
|
|
16435
|
-
|
|
16436
|
-
|
|
16437
|
-
|
|
16438
|
-
|
|
16439
|
-
|
|
16440
|
-
|
|
16441
|
-
|
|
16442
|
-
|
|
16443
|
-
|
|
16444
|
-
|
|
16445
|
-
|
|
16446
|
-
|
|
16447
|
-
|
|
16448
|
-
|
|
16449
|
-
|
|
16450
|
-
miniprogram$7.FrustumFace.Top,
|
|
16451
|
-
miniprogram$7.FrustumFace.Bottom
|
|
16452
|
-
],
|
|
16453
|
-
[
|
|
16454
|
-
miniprogram$7.FrustumFace.Near,
|
|
16455
|
-
miniprogram$7.FrustumFace.Far,
|
|
16456
|
-
miniprogram$7.FrustumFace.Top,
|
|
16457
|
-
miniprogram$7.FrustumFace.Bottom
|
|
16458
|
-
],
|
|
16459
|
-
[
|
|
16460
|
-
miniprogram$7.FrustumFace.Near,
|
|
16461
|
-
miniprogram$7.FrustumFace.Far,
|
|
16462
|
-
miniprogram$7.FrustumFace.Left,
|
|
16463
|
-
miniprogram$7.FrustumFace.Right
|
|
16464
|
-
],
|
|
16465
|
-
[
|
|
16466
|
-
miniprogram$7.FrustumFace.Near,
|
|
16467
|
-
miniprogram$7.FrustumFace.Far,
|
|
16468
|
-
miniprogram$7.FrustumFace.Left,
|
|
16469
|
-
miniprogram$7.FrustumFace.Right
|
|
16470
|
-
]
|
|
16471
|
-
];
|
|
16472
|
-
/** near, far, left, right, bottom, top */ ShadowUtils._frustumTwoPlaneCorners = [
|
|
16473
|
-
[
|
|
16474
|
-
// near, far, left, right, bottom, top
|
|
16475
|
-
[
|
|
16476
|
-
8,
|
|
16477
|
-
8
|
|
16478
|
-
],
|
|
16479
|
-
[
|
|
16480
|
-
8,
|
|
16481
|
-
8
|
|
16482
|
-
],
|
|
16483
|
-
[
|
|
16484
|
-
4,
|
|
16485
|
-
5
|
|
16486
|
-
],
|
|
16487
|
-
[
|
|
16488
|
-
6,
|
|
16489
|
-
7
|
|
16490
|
-
],
|
|
16491
|
-
[
|
|
16492
|
-
7,
|
|
16493
|
-
4
|
|
16494
|
-
],
|
|
16495
|
-
[
|
|
16496
|
-
5,
|
|
16497
|
-
6
|
|
16498
|
-
]
|
|
16499
|
-
],
|
|
16500
|
-
[
|
|
16501
|
-
// near, far, left, right, bottom, top
|
|
16502
|
-
[
|
|
16503
|
-
8,
|
|
16504
|
-
8
|
|
16505
|
-
],
|
|
16506
|
-
[
|
|
16507
|
-
8,
|
|
16508
|
-
8
|
|
16509
|
-
],
|
|
16510
|
-
[
|
|
16511
|
-
1,
|
|
16512
|
-
0
|
|
16513
|
-
],
|
|
16514
|
-
[
|
|
16515
|
-
3,
|
|
16516
|
-
2
|
|
16517
|
-
],
|
|
16518
|
-
[
|
|
16519
|
-
0,
|
|
16520
|
-
3
|
|
16521
|
-
],
|
|
16522
|
-
[
|
|
16523
|
-
2,
|
|
16524
|
-
1
|
|
16525
|
-
]
|
|
16526
|
-
],
|
|
16527
|
-
[
|
|
16528
|
-
// near, far, left, right, bottom, top
|
|
16529
|
-
[
|
|
16530
|
-
5,
|
|
16531
|
-
4
|
|
16532
|
-
],
|
|
16533
|
-
[
|
|
16534
|
-
0,
|
|
16535
|
-
1
|
|
16536
|
-
],
|
|
16537
|
-
[
|
|
16538
|
-
8,
|
|
16539
|
-
8
|
|
16540
|
-
],
|
|
16541
|
-
[
|
|
16542
|
-
8,
|
|
16543
|
-
8
|
|
16544
|
-
],
|
|
16545
|
-
[
|
|
16546
|
-
4,
|
|
16547
|
-
0
|
|
16548
|
-
],
|
|
16549
|
-
[
|
|
16550
|
-
1,
|
|
16551
|
-
5
|
|
16552
|
-
]
|
|
16553
|
-
],
|
|
16554
|
-
[
|
|
16555
|
-
// near, far, left, right, bottom, top
|
|
16556
|
-
[
|
|
16557
|
-
7,
|
|
16558
|
-
6
|
|
16559
|
-
],
|
|
16560
|
-
[
|
|
16561
|
-
2,
|
|
16562
|
-
3
|
|
16563
|
-
],
|
|
16564
|
-
[
|
|
16565
|
-
8,
|
|
16566
|
-
8
|
|
16567
|
-
],
|
|
16568
|
-
[
|
|
16569
|
-
8,
|
|
16570
|
-
8
|
|
16571
|
-
],
|
|
16572
|
-
[
|
|
16573
|
-
3,
|
|
16574
|
-
7
|
|
16575
|
-
],
|
|
16576
|
-
[
|
|
16577
|
-
6,
|
|
16578
|
-
2
|
|
16579
|
-
]
|
|
16580
|
-
],
|
|
16581
|
-
[
|
|
16582
|
-
// near, far, left, right, bottom, top
|
|
16622
|
+
(function() {
|
|
16623
|
+
ShadowUtils._tempMatrix0 = new miniprogram$7.Matrix();
|
|
16624
|
+
})();
|
|
16625
|
+
(function() {
|
|
16626
|
+
// prettier-ignore
|
|
16627
|
+
/** @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);
|
|
16628
|
+
})();
|
|
16629
|
+
(function() {
|
|
16630
|
+
ShadowUtils._frustumCorners = [
|
|
16631
|
+
new miniprogram$7.Vector3(),
|
|
16632
|
+
new miniprogram$7.Vector3(),
|
|
16633
|
+
new miniprogram$7.Vector3(),
|
|
16634
|
+
new miniprogram$7.Vector3(),
|
|
16635
|
+
new miniprogram$7.Vector3(),
|
|
16636
|
+
new miniprogram$7.Vector3(),
|
|
16637
|
+
new miniprogram$7.Vector3(),
|
|
16638
|
+
new miniprogram$7.Vector3()
|
|
16639
|
+
];
|
|
16640
|
+
})();
|
|
16641
|
+
(function() {
|
|
16642
|
+
ShadowUtils._adjustNearPlane = new miniprogram$7.Plane(new miniprogram$7.Vector3());
|
|
16643
|
+
})();
|
|
16644
|
+
(function() {
|
|
16645
|
+
ShadowUtils._adjustFarPlane = new miniprogram$7.Plane(new miniprogram$7.Vector3());
|
|
16646
|
+
})();
|
|
16647
|
+
(function() {
|
|
16648
|
+
ShadowUtils._backPlaneFaces = new Array(5);
|
|
16649
|
+
})();
|
|
16650
|
+
(function() {
|
|
16651
|
+
ShadowUtils._edgePlanePoint2 = new miniprogram$7.Vector3();
|
|
16652
|
+
})();
|
|
16653
|
+
(function() {
|
|
16654
|
+
/** near, far, left, right, bottom, top */ ShadowUtils._frustumPlaneNeighbors = [
|
|
16583
16655
|
[
|
|
16584
|
-
|
|
16585
|
-
7
|
|
16656
|
+
miniprogram$7.FrustumFace.Left,
|
|
16657
|
+
miniprogram$7.FrustumFace.Right,
|
|
16658
|
+
miniprogram$7.FrustumFace.Top,
|
|
16659
|
+
miniprogram$7.FrustumFace.Bottom
|
|
16586
16660
|
],
|
|
16587
16661
|
[
|
|
16588
|
-
|
|
16589
|
-
|
|
16662
|
+
miniprogram$7.FrustumFace.Left,
|
|
16663
|
+
miniprogram$7.FrustumFace.Right,
|
|
16664
|
+
miniprogram$7.FrustumFace.Top,
|
|
16665
|
+
miniprogram$7.FrustumFace.Bottom
|
|
16590
16666
|
],
|
|
16591
16667
|
[
|
|
16592
|
-
|
|
16593
|
-
|
|
16668
|
+
miniprogram$7.FrustumFace.Near,
|
|
16669
|
+
miniprogram$7.FrustumFace.Far,
|
|
16670
|
+
miniprogram$7.FrustumFace.Top,
|
|
16671
|
+
miniprogram$7.FrustumFace.Bottom
|
|
16594
16672
|
],
|
|
16595
16673
|
[
|
|
16596
|
-
7,
|
|
16597
|
-
|
|
16674
|
+
miniprogram$7.FrustumFace.Near,
|
|
16675
|
+
miniprogram$7.FrustumFace.Far,
|
|
16676
|
+
miniprogram$7.FrustumFace.Top,
|
|
16677
|
+
miniprogram$7.FrustumFace.Bottom
|
|
16598
16678
|
],
|
|
16599
16679
|
[
|
|
16600
|
-
|
|
16601
|
-
|
|
16680
|
+
miniprogram$7.FrustumFace.Near,
|
|
16681
|
+
miniprogram$7.FrustumFace.Far,
|
|
16682
|
+
miniprogram$7.FrustumFace.Left,
|
|
16683
|
+
miniprogram$7.FrustumFace.Right
|
|
16602
16684
|
],
|
|
16603
16685
|
[
|
|
16604
|
-
|
|
16605
|
-
|
|
16686
|
+
miniprogram$7.FrustumFace.Near,
|
|
16687
|
+
miniprogram$7.FrustumFace.Far,
|
|
16688
|
+
miniprogram$7.FrustumFace.Left,
|
|
16689
|
+
miniprogram$7.FrustumFace.Right
|
|
16606
16690
|
]
|
|
16607
|
-
]
|
|
16608
|
-
|
|
16609
|
-
|
|
16691
|
+
];
|
|
16692
|
+
})();
|
|
16693
|
+
(function() {
|
|
16694
|
+
/** near, far, left, right, bottom, top */ ShadowUtils._frustumTwoPlaneCorners = [
|
|
16610
16695
|
[
|
|
16611
|
-
|
|
16612
|
-
|
|
16696
|
+
// near, far, left, right, bottom, top
|
|
16697
|
+
[
|
|
16698
|
+
8,
|
|
16699
|
+
8
|
|
16700
|
+
],
|
|
16701
|
+
[
|
|
16702
|
+
8,
|
|
16703
|
+
8
|
|
16704
|
+
],
|
|
16705
|
+
[
|
|
16706
|
+
4,
|
|
16707
|
+
5
|
|
16708
|
+
],
|
|
16709
|
+
[
|
|
16710
|
+
6,
|
|
16711
|
+
7
|
|
16712
|
+
],
|
|
16713
|
+
[
|
|
16714
|
+
7,
|
|
16715
|
+
4
|
|
16716
|
+
],
|
|
16717
|
+
[
|
|
16718
|
+
5,
|
|
16719
|
+
6
|
|
16720
|
+
]
|
|
16613
16721
|
],
|
|
16614
16722
|
[
|
|
16615
|
-
|
|
16616
|
-
|
|
16723
|
+
// near, far, left, right, bottom, top
|
|
16724
|
+
[
|
|
16725
|
+
8,
|
|
16726
|
+
8
|
|
16727
|
+
],
|
|
16728
|
+
[
|
|
16729
|
+
8,
|
|
16730
|
+
8
|
|
16731
|
+
],
|
|
16732
|
+
[
|
|
16733
|
+
1,
|
|
16734
|
+
0
|
|
16735
|
+
],
|
|
16736
|
+
[
|
|
16737
|
+
3,
|
|
16738
|
+
2
|
|
16739
|
+
],
|
|
16740
|
+
[
|
|
16741
|
+
0,
|
|
16742
|
+
3
|
|
16743
|
+
],
|
|
16744
|
+
[
|
|
16745
|
+
2,
|
|
16746
|
+
1
|
|
16747
|
+
]
|
|
16617
16748
|
],
|
|
16618
16749
|
[
|
|
16619
|
-
|
|
16620
|
-
|
|
16750
|
+
// near, far, left, right, bottom, top
|
|
16751
|
+
[
|
|
16752
|
+
5,
|
|
16753
|
+
4
|
|
16754
|
+
],
|
|
16755
|
+
[
|
|
16756
|
+
0,
|
|
16757
|
+
1
|
|
16758
|
+
],
|
|
16759
|
+
[
|
|
16760
|
+
8,
|
|
16761
|
+
8
|
|
16762
|
+
],
|
|
16763
|
+
[
|
|
16764
|
+
8,
|
|
16765
|
+
8
|
|
16766
|
+
],
|
|
16767
|
+
[
|
|
16768
|
+
4,
|
|
16769
|
+
0
|
|
16770
|
+
],
|
|
16771
|
+
[
|
|
16772
|
+
1,
|
|
16773
|
+
5
|
|
16774
|
+
]
|
|
16621
16775
|
],
|
|
16622
16776
|
[
|
|
16623
|
-
|
|
16624
|
-
|
|
16777
|
+
// near, far, left, right, bottom, top
|
|
16778
|
+
[
|
|
16779
|
+
7,
|
|
16780
|
+
6
|
|
16781
|
+
],
|
|
16782
|
+
[
|
|
16783
|
+
2,
|
|
16784
|
+
3
|
|
16785
|
+
],
|
|
16786
|
+
[
|
|
16787
|
+
8,
|
|
16788
|
+
8
|
|
16789
|
+
],
|
|
16790
|
+
[
|
|
16791
|
+
8,
|
|
16792
|
+
8
|
|
16793
|
+
],
|
|
16794
|
+
[
|
|
16795
|
+
3,
|
|
16796
|
+
7
|
|
16797
|
+
],
|
|
16798
|
+
[
|
|
16799
|
+
6,
|
|
16800
|
+
2
|
|
16801
|
+
]
|
|
16625
16802
|
],
|
|
16626
16803
|
[
|
|
16627
|
-
|
|
16628
|
-
|
|
16804
|
+
// near, far, left, right, bottom, top
|
|
16805
|
+
[
|
|
16806
|
+
4,
|
|
16807
|
+
7
|
|
16808
|
+
],
|
|
16809
|
+
[
|
|
16810
|
+
3,
|
|
16811
|
+
0
|
|
16812
|
+
],
|
|
16813
|
+
[
|
|
16814
|
+
0,
|
|
16815
|
+
4
|
|
16816
|
+
],
|
|
16817
|
+
[
|
|
16818
|
+
7,
|
|
16819
|
+
3
|
|
16820
|
+
],
|
|
16821
|
+
[
|
|
16822
|
+
8,
|
|
16823
|
+
8
|
|
16824
|
+
],
|
|
16825
|
+
[
|
|
16826
|
+
8,
|
|
16827
|
+
8
|
|
16828
|
+
]
|
|
16629
16829
|
],
|
|
16630
16830
|
[
|
|
16631
|
-
|
|
16632
|
-
|
|
16831
|
+
// near, far, left, right, bottom, top
|
|
16832
|
+
[
|
|
16833
|
+
6,
|
|
16834
|
+
5
|
|
16835
|
+
],
|
|
16836
|
+
[
|
|
16837
|
+
1,
|
|
16838
|
+
2
|
|
16839
|
+
],
|
|
16840
|
+
[
|
|
16841
|
+
5,
|
|
16842
|
+
1
|
|
16843
|
+
],
|
|
16844
|
+
[
|
|
16845
|
+
2,
|
|
16846
|
+
6
|
|
16847
|
+
],
|
|
16848
|
+
[
|
|
16849
|
+
8,
|
|
16850
|
+
8
|
|
16851
|
+
],
|
|
16852
|
+
[
|
|
16853
|
+
8,
|
|
16854
|
+
8
|
|
16855
|
+
]
|
|
16633
16856
|
]
|
|
16634
|
-
]
|
|
16635
|
-
|
|
16636
|
-
|
|
16637
|
-
|
|
16857
|
+
];
|
|
16858
|
+
})();
|
|
16859
|
+
(function() {
|
|
16860
|
+
//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.
|
|
16861
|
+
ShadowUtils.atlasBorderSize = 4.0;
|
|
16862
|
+
})();
|
|
16638
16863
|
/**
|
|
16639
16864
|
* Cascade shadow caster.
|
|
16640
16865
|
*/ var CascadedShadowCasterPass = /*#__PURE__*/ function() {
|
|
@@ -16870,18 +17095,42 @@ ShadowUtils.atlasBorderSize = 4.0;
|
|
|
16870
17095
|
};
|
|
16871
17096
|
return CascadedShadowCasterPass;
|
|
16872
17097
|
}();
|
|
16873
|
-
|
|
16874
|
-
CascadedShadowCasterPass.
|
|
16875
|
-
|
|
16876
|
-
|
|
16877
|
-
CascadedShadowCasterPass.
|
|
16878
|
-
|
|
16879
|
-
|
|
16880
|
-
CascadedShadowCasterPass.
|
|
16881
|
-
|
|
16882
|
-
|
|
16883
|
-
CascadedShadowCasterPass.
|
|
16884
|
-
|
|
17098
|
+
(function() {
|
|
17099
|
+
CascadedShadowCasterPass._lightShadowBiasProperty = Shader.getPropertyByName("u_shadowBias");
|
|
17100
|
+
})();
|
|
17101
|
+
(function() {
|
|
17102
|
+
CascadedShadowCasterPass._lightDirectionProperty = Shader.getPropertyByName("u_lightDirection");
|
|
17103
|
+
})();
|
|
17104
|
+
(function() {
|
|
17105
|
+
CascadedShadowCasterPass._shadowMatricesProperty = Shader.getPropertyByName("u_shadowMatrices");
|
|
17106
|
+
})();
|
|
17107
|
+
(function() {
|
|
17108
|
+
CascadedShadowCasterPass._shadowMapSize = Shader.getPropertyByName("u_shadowMapSize");
|
|
17109
|
+
})();
|
|
17110
|
+
(function() {
|
|
17111
|
+
CascadedShadowCasterPass._shadowInfosProperty = Shader.getPropertyByName("u_shadowInfo");
|
|
17112
|
+
})();
|
|
17113
|
+
(function() {
|
|
17114
|
+
CascadedShadowCasterPass._shadowMapsProperty = Shader.getPropertyByName("u_shadowMap");
|
|
17115
|
+
})();
|
|
17116
|
+
(function() {
|
|
17117
|
+
CascadedShadowCasterPass._shadowSplitSpheresProperty = Shader.getPropertyByName("u_shadowSplitSpheres");
|
|
17118
|
+
})();
|
|
17119
|
+
(function() {
|
|
17120
|
+
CascadedShadowCasterPass._maxCascades = 4;
|
|
17121
|
+
})();
|
|
17122
|
+
(function() {
|
|
17123
|
+
CascadedShadowCasterPass._cascadesSplitDistance = new Array(CascadedShadowCasterPass._maxCascades + 1);
|
|
17124
|
+
})();
|
|
17125
|
+
(function() {
|
|
17126
|
+
CascadedShadowCasterPass._clearColor = new miniprogram$7.Color(1, 1, 1, 1);
|
|
17127
|
+
})();
|
|
17128
|
+
(function() {
|
|
17129
|
+
CascadedShadowCasterPass._tempVector = new miniprogram$7.Vector3();
|
|
17130
|
+
})();
|
|
17131
|
+
(function() {
|
|
17132
|
+
CascadedShadowCasterPass._tempMatrix0 = new miniprogram$7.Matrix();
|
|
17133
|
+
})();
|
|
16885
17134
|
var passNum = 0;
|
|
16886
17135
|
/**
|
|
16887
17136
|
* RenderPass.
|
|
@@ -17112,7 +17361,7 @@ var passNum = 0;
|
|
|
17112
17361
|
renderer._prepareRender(context);
|
|
17113
17362
|
}
|
|
17114
17363
|
};
|
|
17115
|
-
|
|
17364
|
+
_create_class$2(BasicRenderPipeline, [
|
|
17116
17365
|
{
|
|
17117
17366
|
key: "defaultRenderPass",
|
|
17118
17367
|
get: /**
|
|
@@ -17124,13 +17373,23 @@ var passNum = 0;
|
|
|
17124
17373
|
]);
|
|
17125
17374
|
return BasicRenderPipeline;
|
|
17126
17375
|
}();
|
|
17127
|
-
|
|
17128
|
-
BasicRenderPipeline.
|
|
17376
|
+
(function() {
|
|
17377
|
+
BasicRenderPipeline._tempVector0 = new miniprogram$7.Vector3();
|
|
17378
|
+
})();
|
|
17379
|
+
(function() {
|
|
17380
|
+
BasicRenderPipeline._tempVector1 = new miniprogram$7.Vector3();
|
|
17381
|
+
})();
|
|
17129
17382
|
var _Camera;
|
|
17130
17383
|
var MathTemp = function MathTemp() {};
|
|
17131
|
-
|
|
17132
|
-
MathTemp.
|
|
17133
|
-
|
|
17384
|
+
(function() {
|
|
17385
|
+
MathTemp.tempVec4 = new miniprogram$7.Vector4();
|
|
17386
|
+
})();
|
|
17387
|
+
(function() {
|
|
17388
|
+
MathTemp.tempVec3 = new miniprogram$7.Vector3();
|
|
17389
|
+
})();
|
|
17390
|
+
(function() {
|
|
17391
|
+
MathTemp.tempVec2 = new miniprogram$7.Vector2();
|
|
17392
|
+
})();
|
|
17134
17393
|
exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
|
|
17135
17394
|
var Camera1 = function Camera1(entity) {
|
|
17136
17395
|
var _this;
|
|
@@ -17147,6 +17406,8 @@ exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
|
|
|
17147
17406
|
* @remarks Support bit manipulation, corresponding to `Layer`.
|
|
17148
17407
|
*/ _this.cullingMask = exports.Layer.Everything;
|
|
17149
17408
|
/** @internal */ _this._globalShaderMacro = new ShaderMacroCollection();
|
|
17409
|
+
/** @internal */ _this._frustum = new miniprogram$7.BoundingFrustum();
|
|
17410
|
+
/** @internal */ _this._virtualCamera = new VirtualCamera();
|
|
17150
17411
|
_this._isProjMatSetting = false;
|
|
17151
17412
|
_this._nearClipPlane = 0.1;
|
|
17152
17413
|
_this._farClipPlane = 100;
|
|
@@ -17157,8 +17418,6 @@ exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
|
|
|
17157
17418
|
_this._isFrustumProjectDirty = true;
|
|
17158
17419
|
_this._customAspectRatio = undefined;
|
|
17159
17420
|
_this._renderTarget = null;
|
|
17160
|
-
/** @internal */ _this._frustum = new miniprogram$7.BoundingFrustum();
|
|
17161
|
-
/** @internal */ _this._virtualCamera = new VirtualCamera();
|
|
17162
17421
|
_this._viewport = new miniprogram$7.Vector4(0, 0, 1, 1);
|
|
17163
17422
|
_this._inverseProjectionMatrix = new miniprogram$7.Matrix();
|
|
17164
17423
|
_this._lastAspectSize = new miniprogram$7.Vector2(0, 0);
|
|
@@ -17168,7 +17427,7 @@ exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
|
|
|
17168
17427
|
_this._isViewMatrixDirty = transform.registerWorldChangeFlag();
|
|
17169
17428
|
_this._isInvViewProjDirty = transform.registerWorldChangeFlag();
|
|
17170
17429
|
_this._frustumViewChangeFlag = transform.registerWorldChangeFlag();
|
|
17171
|
-
_this._renderPipeline = new BasicRenderPipeline(
|
|
17430
|
+
_this._renderPipeline = new BasicRenderPipeline(_assert_this_initialized(_this));
|
|
17172
17431
|
_this.shaderData._addRefCount(1);
|
|
17173
17432
|
return _this;
|
|
17174
17433
|
};
|
|
@@ -17386,7 +17645,7 @@ exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
|
|
|
17386
17645
|
}
|
|
17387
17646
|
return this._inverseProjectionMatrix;
|
|
17388
17647
|
};
|
|
17389
|
-
|
|
17648
|
+
_create_class$2(Camera1, [
|
|
17390
17649
|
{
|
|
17391
17650
|
key: "nearClipPlane",
|
|
17392
17651
|
get: /**
|
|
@@ -17550,7 +17809,11 @@ exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
|
|
|
17550
17809
|
}
|
|
17551
17810
|
]);
|
|
17552
17811
|
return Camera1;
|
|
17553
|
-
}(Component),
|
|
17812
|
+
}(Component), function() {
|
|
17813
|
+
/** @internal */ _Camera._inverseViewMatrixProperty = Shader.getPropertyByName("u_viewInvMat");
|
|
17814
|
+
}(), function() {
|
|
17815
|
+
/** @internal */ _Camera._cameraPositionProperty = Shader.getPropertyByName("u_cameraPos");
|
|
17816
|
+
}(), _Camera);
|
|
17554
17817
|
__decorate$1([
|
|
17555
17818
|
deepClone
|
|
17556
17819
|
], exports.Camera.prototype, "_frustum", void 0);
|
|
@@ -17759,7 +18022,9 @@ var MultiExecutor = /*#__PURE__*/ function() {
|
|
|
17759
18022
|
};
|
|
17760
18023
|
return Loader;
|
|
17761
18024
|
}();
|
|
17762
|
-
|
|
18025
|
+
(function() {
|
|
18026
|
+
Loader._engineObjects = {};
|
|
18027
|
+
})();
|
|
17763
18028
|
/**
|
|
17764
18029
|
* Asset Type.
|
|
17765
18030
|
*/ exports.AssetType = void 0;
|
|
@@ -17908,7 +18173,7 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
|
|
|
17908
18173
|
target._isTransparent = this._isTransparent;
|
|
17909
18174
|
target._blendMode = this._blendMode;
|
|
17910
18175
|
};
|
|
17911
|
-
|
|
18176
|
+
_create_class$2(BaseMaterial, [
|
|
17912
18177
|
{
|
|
17913
18178
|
key: "shader",
|
|
17914
18179
|
get: /**
|
|
@@ -18008,19 +18273,45 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
|
|
|
18008
18273
|
]);
|
|
18009
18274
|
return BaseMaterial;
|
|
18010
18275
|
}(Material);
|
|
18011
|
-
|
|
18012
|
-
BaseMaterial.
|
|
18013
|
-
|
|
18014
|
-
|
|
18015
|
-
BaseMaterial.
|
|
18016
|
-
|
|
18017
|
-
|
|
18018
|
-
BaseMaterial.
|
|
18019
|
-
|
|
18020
|
-
|
|
18021
|
-
BaseMaterial.
|
|
18022
|
-
|
|
18023
|
-
|
|
18276
|
+
(function() {
|
|
18277
|
+
BaseMaterial._baseColorProp = Shader.getPropertyByName("u_baseColor");
|
|
18278
|
+
})();
|
|
18279
|
+
(function() {
|
|
18280
|
+
BaseMaterial._baseTextureProp = Shader.getPropertyByName("u_baseTexture");
|
|
18281
|
+
})();
|
|
18282
|
+
(function() {
|
|
18283
|
+
BaseMaterial._baseTextureMacro = Shader.getMacroByName("BASETEXTURE");
|
|
18284
|
+
})();
|
|
18285
|
+
(function() {
|
|
18286
|
+
BaseMaterial._tilingOffsetProp = Shader.getPropertyByName("u_tilingOffset");
|
|
18287
|
+
})();
|
|
18288
|
+
(function() {
|
|
18289
|
+
BaseMaterial._normalTextureProp = Shader.getPropertyByName("u_normalTexture");
|
|
18290
|
+
})();
|
|
18291
|
+
(function() {
|
|
18292
|
+
BaseMaterial._normalIntensityProp = Shader.getPropertyByName("u_normalIntensity");
|
|
18293
|
+
})();
|
|
18294
|
+
(function() {
|
|
18295
|
+
BaseMaterial._normalTextureMacro = Shader.getMacroByName("NORMALTEXTURE");
|
|
18296
|
+
})();
|
|
18297
|
+
(function() {
|
|
18298
|
+
BaseMaterial._emissiveColorProp = Shader.getPropertyByName("u_emissiveColor");
|
|
18299
|
+
})();
|
|
18300
|
+
(function() {
|
|
18301
|
+
BaseMaterial._emissiveTextureProp = Shader.getPropertyByName("u_emissiveTexture");
|
|
18302
|
+
})();
|
|
18303
|
+
(function() {
|
|
18304
|
+
BaseMaterial._emissiveTextureMacro = Shader.getMacroByName("EMISSIVETEXTURE");
|
|
18305
|
+
})();
|
|
18306
|
+
(function() {
|
|
18307
|
+
BaseMaterial._transparentMacro = Shader.getMacroByName("OASIS_TRANSPARENT");
|
|
18308
|
+
})();
|
|
18309
|
+
(function() {
|
|
18310
|
+
BaseMaterial._alphaCutoffProp = Shader.getPropertyByName("u_alphaCutoff");
|
|
18311
|
+
})();
|
|
18312
|
+
(function() {
|
|
18313
|
+
BaseMaterial._alphaCutoffMacro = Shader.getMacroByName("ALPHA_CUTOFF");
|
|
18314
|
+
})();
|
|
18024
18315
|
/**
|
|
18025
18316
|
* Blinn-phong Material.
|
|
18026
18317
|
*/ var BlinnPhongMaterial = /*#__PURE__*/ function(BaseMaterial) {
|
|
@@ -18047,7 +18338,7 @@ BaseMaterial._alphaCutoffMacro = Shader.getMacroByName("ALPHA_CUTOFF");
|
|
|
18047
18338
|
this.cloneTo(dest);
|
|
18048
18339
|
return dest;
|
|
18049
18340
|
};
|
|
18050
|
-
|
|
18341
|
+
_create_class$2(BlinnPhongMaterial, [
|
|
18051
18342
|
{
|
|
18052
18343
|
key: "baseColor",
|
|
18053
18344
|
get: /**
|
|
@@ -18193,9 +18484,15 @@ BaseMaterial._alphaCutoffMacro = Shader.getMacroByName("ALPHA_CUTOFF");
|
|
|
18193
18484
|
]);
|
|
18194
18485
|
return BlinnPhongMaterial;
|
|
18195
18486
|
}(BaseMaterial);
|
|
18196
|
-
|
|
18197
|
-
BlinnPhongMaterial.
|
|
18198
|
-
|
|
18487
|
+
(function() {
|
|
18488
|
+
BlinnPhongMaterial._specularColorProp = Shader.getPropertyByName("u_specularColor");
|
|
18489
|
+
})();
|
|
18490
|
+
(function() {
|
|
18491
|
+
BlinnPhongMaterial._shininessProp = Shader.getPropertyByName("u_shininess");
|
|
18492
|
+
})();
|
|
18493
|
+
(function() {
|
|
18494
|
+
BlinnPhongMaterial._specularTextureProp = Shader.getPropertyByName("u_specularTexture");
|
|
18495
|
+
})();
|
|
18199
18496
|
/**
|
|
18200
18497
|
* Texture UV coordinate.
|
|
18201
18498
|
*/ exports.TextureCoordinate = void 0;
|
|
@@ -18229,7 +18526,7 @@ BlinnPhongMaterial._specularTextureProp = Shader.getPropertyByName("u_specularTe
|
|
|
18229
18526
|
shaderData.setFloat(PBRBaseMaterial._clearCoatRoughnessProp, 0);
|
|
18230
18527
|
return _this;
|
|
18231
18528
|
}
|
|
18232
|
-
|
|
18529
|
+
_create_class$2(PBRBaseMaterial, [
|
|
18233
18530
|
{
|
|
18234
18531
|
key: "baseColor",
|
|
18235
18532
|
get: /**
|
|
@@ -18453,14 +18750,30 @@ BlinnPhongMaterial._specularTextureProp = Shader.getPropertyByName("u_specularTe
|
|
|
18453
18750
|
]);
|
|
18454
18751
|
return PBRBaseMaterial;
|
|
18455
18752
|
}(BaseMaterial);
|
|
18456
|
-
|
|
18457
|
-
PBRBaseMaterial.
|
|
18458
|
-
|
|
18459
|
-
|
|
18460
|
-
PBRBaseMaterial.
|
|
18461
|
-
|
|
18462
|
-
|
|
18463
|
-
PBRBaseMaterial.
|
|
18753
|
+
(function() {
|
|
18754
|
+
PBRBaseMaterial._occlusionTextureIntensityProp = Shader.getPropertyByName("u_occlusionIntensity");
|
|
18755
|
+
})();
|
|
18756
|
+
(function() {
|
|
18757
|
+
PBRBaseMaterial._occlusionTextureCoordProp = Shader.getPropertyByName("u_occlusionTextureCoord");
|
|
18758
|
+
})();
|
|
18759
|
+
(function() {
|
|
18760
|
+
PBRBaseMaterial._occlusionTextureProp = Shader.getPropertyByName("u_occlusionTexture");
|
|
18761
|
+
})();
|
|
18762
|
+
(function() {
|
|
18763
|
+
PBRBaseMaterial._clearCoatProp = Shader.getPropertyByName("u_clearCoat");
|
|
18764
|
+
})();
|
|
18765
|
+
(function() {
|
|
18766
|
+
PBRBaseMaterial._clearCoatTextureProp = Shader.getPropertyByName("u_clearCoatTexture");
|
|
18767
|
+
})();
|
|
18768
|
+
(function() {
|
|
18769
|
+
PBRBaseMaterial._clearCoatRoughnessProp = Shader.getPropertyByName("u_clearCoatRoughness");
|
|
18770
|
+
})();
|
|
18771
|
+
(function() {
|
|
18772
|
+
PBRBaseMaterial._clearCoatRoughnessTextureProp = Shader.getPropertyByName("u_clearCoatRoughnessTexture");
|
|
18773
|
+
})();
|
|
18774
|
+
(function() {
|
|
18775
|
+
PBRBaseMaterial._clearCoatNormalTextureProp = Shader.getPropertyByName("u_clearCoatNormalTexture");
|
|
18776
|
+
})();
|
|
18464
18777
|
/**
|
|
18465
18778
|
* PBR (Metallic-Roughness Workflow) Material.
|
|
18466
18779
|
*/ var PBRMaterial = /*#__PURE__*/ function(PBRBaseMaterial) {
|
|
@@ -18480,7 +18793,7 @@ PBRBaseMaterial._clearCoatNormalTextureProp = Shader.getPropertyByName("u_clearC
|
|
|
18480
18793
|
this.cloneTo(dest);
|
|
18481
18794
|
return dest;
|
|
18482
18795
|
};
|
|
18483
|
-
|
|
18796
|
+
_create_class$2(PBRMaterial, [
|
|
18484
18797
|
{
|
|
18485
18798
|
key: "metallic",
|
|
18486
18799
|
get: /**
|
|
@@ -18523,9 +18836,15 @@ PBRBaseMaterial._clearCoatNormalTextureProp = Shader.getPropertyByName("u_clearC
|
|
|
18523
18836
|
]);
|
|
18524
18837
|
return PBRMaterial;
|
|
18525
18838
|
}(PBRBaseMaterial);
|
|
18526
|
-
|
|
18527
|
-
PBRMaterial.
|
|
18528
|
-
|
|
18839
|
+
(function() {
|
|
18840
|
+
PBRMaterial._metallicProp = Shader.getPropertyByName("u_metal");
|
|
18841
|
+
})();
|
|
18842
|
+
(function() {
|
|
18843
|
+
PBRMaterial._roughnessProp = Shader.getPropertyByName("u_roughness");
|
|
18844
|
+
})();
|
|
18845
|
+
(function() {
|
|
18846
|
+
PBRMaterial._roughnessMetallicTextureProp = Shader.getPropertyByName("u_roughnessMetallicTexture");
|
|
18847
|
+
})();
|
|
18529
18848
|
/**
|
|
18530
18849
|
* PBR (Specular-Glossiness Workflow) Material.
|
|
18531
18850
|
*/ var PBRSpecularMaterial = /*#__PURE__*/ function(PBRBaseMaterial) {
|
|
@@ -18545,7 +18864,7 @@ PBRMaterial._roughnessMetallicTextureProp = Shader.getPropertyByName("u_roughnes
|
|
|
18545
18864
|
this.cloneTo(dest);
|
|
18546
18865
|
return dest;
|
|
18547
18866
|
};
|
|
18548
|
-
|
|
18867
|
+
_create_class$2(PBRSpecularMaterial, [
|
|
18549
18868
|
{
|
|
18550
18869
|
key: "specularColor",
|
|
18551
18870
|
get: /**
|
|
@@ -18591,10 +18910,18 @@ PBRMaterial._roughnessMetallicTextureProp = Shader.getPropertyByName("u_roughnes
|
|
|
18591
18910
|
]);
|
|
18592
18911
|
return PBRSpecularMaterial;
|
|
18593
18912
|
}(PBRBaseMaterial);
|
|
18594
|
-
|
|
18595
|
-
PBRSpecularMaterial.
|
|
18596
|
-
|
|
18597
|
-
|
|
18913
|
+
(function() {
|
|
18914
|
+
PBRSpecularMaterial._specularColorProp = Shader.getPropertyByName("u_PBRSpecularColor");
|
|
18915
|
+
})();
|
|
18916
|
+
(function() {
|
|
18917
|
+
PBRSpecularMaterial._glossinessProp = Shader.getPropertyByName("u_glossiness");
|
|
18918
|
+
})();
|
|
18919
|
+
(function() {
|
|
18920
|
+
PBRSpecularMaterial._specularGlossinessTextureProp = Shader.getPropertyByName("u_specularGlossinessTexture");
|
|
18921
|
+
})();
|
|
18922
|
+
(function() {
|
|
18923
|
+
PBRSpecularMaterial._specularGlossinessTextureMacro = Shader.getMacroByName("SPECULARGLOSSINESSTEXTURE");
|
|
18924
|
+
})();
|
|
18598
18925
|
/**
|
|
18599
18926
|
* Unlit Material.
|
|
18600
18927
|
*/ var UnlitMaterial = /*#__PURE__*/ function(BaseMaterial) {
|
|
@@ -18617,7 +18944,7 @@ PBRSpecularMaterial._specularGlossinessTextureMacro = Shader.getMacroByName("SPE
|
|
|
18617
18944
|
this.cloneTo(dest);
|
|
18618
18945
|
return dest;
|
|
18619
18946
|
};
|
|
18620
|
-
|
|
18947
|
+
_create_class$2(UnlitMaterial, [
|
|
18621
18948
|
{
|
|
18622
18949
|
key: "baseColor",
|
|
18623
18950
|
get: /**
|
|
@@ -18747,7 +19074,7 @@ exports.TextVerticalAlignment = void 0;
|
|
|
18747
19074
|
this._sprites = null;
|
|
18748
19075
|
this._spriteNamesToIndex = null;
|
|
18749
19076
|
};
|
|
18750
|
-
|
|
19077
|
+
_create_class$2(SpriteAtlas, [
|
|
18751
19078
|
{
|
|
18752
19079
|
key: "sprites",
|
|
18753
19080
|
get: /**
|
|
@@ -18916,7 +19243,7 @@ exports.TextVerticalAlignment = void 0;
|
|
|
18916
19243
|
}
|
|
18917
19244
|
this._updateFlagManager.dispatch(type);
|
|
18918
19245
|
};
|
|
18919
|
-
|
|
19246
|
+
_create_class$2(Sprite, [
|
|
18920
19247
|
{
|
|
18921
19248
|
key: "texture",
|
|
18922
19249
|
get: /**
|
|
@@ -19204,7 +19531,9 @@ var SlicedSpriteAssembler = (_SlicedSpriteAssembler = /*#__PURE__*/ function() {
|
|
|
19204
19531
|
};
|
|
19205
19532
|
SlicedSpriteAssembler1.updateUVs = function updateUVs(renderer) {};
|
|
19206
19533
|
return SlicedSpriteAssembler1;
|
|
19207
|
-
}(),
|
|
19534
|
+
}(), function() {
|
|
19535
|
+
_SlicedSpriteAssembler._worldMatrix = new miniprogram$7.Matrix();
|
|
19536
|
+
}(), _SlicedSpriteAssembler);
|
|
19208
19537
|
SlicedSpriteAssembler = __decorate$1([
|
|
19209
19538
|
StaticInterfaceImplement$1()
|
|
19210
19539
|
], SlicedSpriteAssembler);
|
|
@@ -19225,7 +19554,7 @@ SlicedSpriteAssembler = __decorate$1([
|
|
|
19225
19554
|
_this._renderData = new RenderData2D(4, [], [], null, _this._color);
|
|
19226
19555
|
_this.drawMode = exports.SpriteDrawMode.Simple;
|
|
19227
19556
|
_this.setMaterial(_this._engine._spriteDefaultMaterial);
|
|
19228
|
-
_this._onSpriteChange = _this._onSpriteChange.bind(
|
|
19557
|
+
_this._onSpriteChange = _this._onSpriteChange.bind(_assert_this_initialized(_this));
|
|
19229
19558
|
return _this;
|
|
19230
19559
|
};
|
|
19231
19560
|
_inherits$2(SpriteRenderer, Renderer);
|
|
@@ -19331,7 +19660,7 @@ SlicedSpriteAssembler = __decorate$1([
|
|
|
19331
19660
|
break;
|
|
19332
19661
|
}
|
|
19333
19662
|
};
|
|
19334
|
-
|
|
19663
|
+
_create_class$2(SpriteRenderer, [
|
|
19335
19664
|
{
|
|
19336
19665
|
key: "drawMode",
|
|
19337
19666
|
get: /**
|
|
@@ -19480,7 +19809,9 @@ SlicedSpriteAssembler = __decorate$1([
|
|
|
19480
19809
|
]);
|
|
19481
19810
|
return SpriteRenderer;
|
|
19482
19811
|
}(exports.Renderer);
|
|
19483
|
-
|
|
19812
|
+
(function() {
|
|
19813
|
+
/** @internal */ SpriteRenderer._textureProperty = Shader.getPropertyByName("u_spriteTexture");
|
|
19814
|
+
})();
|
|
19484
19815
|
__decorate$1([
|
|
19485
19816
|
ignoreClone
|
|
19486
19817
|
], SpriteRenderer.prototype, "_renderData", void 0);
|
|
@@ -19536,14 +19867,16 @@ var /**
|
|
|
19536
19867
|
];
|
|
19537
19868
|
this.renderData = new RenderData2D(4, positions, null, CharRenderData.triangles, null);
|
|
19538
19869
|
};
|
|
19539
|
-
|
|
19540
|
-
|
|
19541
|
-
|
|
19542
|
-
|
|
19543
|
-
|
|
19544
|
-
|
|
19545
|
-
|
|
19546
|
-
|
|
19870
|
+
(function() {
|
|
19871
|
+
CharRenderData.triangles = [
|
|
19872
|
+
0,
|
|
19873
|
+
2,
|
|
19874
|
+
1,
|
|
19875
|
+
2,
|
|
19876
|
+
0,
|
|
19877
|
+
3
|
|
19878
|
+
];
|
|
19879
|
+
})();
|
|
19547
19880
|
/**
|
|
19548
19881
|
* @internal
|
|
19549
19882
|
*/ var CharRenderDataPool = /*#__PURE__*/ function() {
|
|
@@ -19865,23 +20198,37 @@ CharRenderData.triangles = [
|
|
|
19865
20198
|
};
|
|
19866
20199
|
return TextUtils;
|
|
19867
20200
|
}();
|
|
19868
|
-
|
|
19869
|
-
|
|
19870
|
-
|
|
19871
|
-
|
|
19872
|
-
|
|
19873
|
-
|
|
19874
|
-
|
|
19875
|
-
|
|
19876
|
-
|
|
19877
|
-
|
|
19878
|
-
|
|
19879
|
-
|
|
19880
|
-
|
|
19881
|
-
|
|
19882
|
-
TextUtils.
|
|
19883
|
-
|
|
19884
|
-
|
|
20201
|
+
(function() {
|
|
20202
|
+
/** @internal */ TextUtils._genericFontFamilies = [
|
|
20203
|
+
"serif",
|
|
20204
|
+
"sans-serif",
|
|
20205
|
+
"monospace",
|
|
20206
|
+
"cursive",
|
|
20207
|
+
"fantasy",
|
|
20208
|
+
"system-ui",
|
|
20209
|
+
"math",
|
|
20210
|
+
"emoji",
|
|
20211
|
+
"fangsong"
|
|
20212
|
+
];
|
|
20213
|
+
})();
|
|
20214
|
+
(function() {
|
|
20215
|
+
/** These characters are all tall to help calculate the height required for text. */ TextUtils._measureString = "|\xc9q\xc5";
|
|
20216
|
+
})();
|
|
20217
|
+
(function() {
|
|
20218
|
+
TextUtils._measureBaseline = "M";
|
|
20219
|
+
})();
|
|
20220
|
+
(function() {
|
|
20221
|
+
TextUtils._heightMultiplier = 2;
|
|
20222
|
+
})();
|
|
20223
|
+
(function() {
|
|
20224
|
+
TextUtils._baselineMultiplier = 1.4;
|
|
20225
|
+
})();
|
|
20226
|
+
(function() {
|
|
20227
|
+
TextUtils._fontSizeInfoCache = {};
|
|
20228
|
+
})();
|
|
20229
|
+
(function() {
|
|
20230
|
+
TextUtils._textContext = null;
|
|
20231
|
+
})();
|
|
19885
20232
|
/**
|
|
19886
20233
|
* Renders a text for 2D graphics.
|
|
19887
20234
|
*/ var TextRenderer = /*#__PURE__*/ function(Renderer) {
|
|
@@ -19906,7 +20253,7 @@ TextUtils._textContext = null;
|
|
|
19906
20253
|
_this._overflowMode = exports.OverflowMode.Overflow;
|
|
19907
20254
|
_this._maskInteraction = exports.SpriteMaskInteraction.None;
|
|
19908
20255
|
_this._maskLayer = exports.SpriteMaskLayer.Layer0;
|
|
19909
|
-
var engine =
|
|
20256
|
+
var engine = _assert_this_initialized(_this).engine;
|
|
19910
20257
|
_this._font = engine._textDefaultFont;
|
|
19911
20258
|
_this._font._addRefCount(1);
|
|
19912
20259
|
_this.setMaterial(engine._spriteDefaultMaterial);
|
|
@@ -20146,7 +20493,7 @@ TextUtils._textContext = null;
|
|
|
20146
20493
|
Renderer.prototype._onTransformChanged.call(this, bit);
|
|
20147
20494
|
this._setDirtyFlagTrue(0x4 | 0x8);
|
|
20148
20495
|
};
|
|
20149
|
-
|
|
20496
|
+
_create_class$2(TextRenderer, [
|
|
20150
20497
|
{
|
|
20151
20498
|
key: "color",
|
|
20152
20499
|
get: /**
|
|
@@ -20359,9 +20706,15 @@ TextUtils._textContext = null;
|
|
|
20359
20706
|
]);
|
|
20360
20707
|
return TextRenderer;
|
|
20361
20708
|
}(exports.Renderer);
|
|
20362
|
-
|
|
20363
|
-
TextRenderer.
|
|
20364
|
-
|
|
20709
|
+
(function() {
|
|
20710
|
+
TextRenderer._charRenderDataPool = new CharRenderDataPool(CharRenderData, 50);
|
|
20711
|
+
})();
|
|
20712
|
+
(function() {
|
|
20713
|
+
TextRenderer._tempVec30 = new miniprogram$7.Vector3();
|
|
20714
|
+
})();
|
|
20715
|
+
(function() {
|
|
20716
|
+
TextRenderer._tempVec31 = new miniprogram$7.Vector3();
|
|
20717
|
+
})();
|
|
20365
20718
|
__decorate$1([
|
|
20366
20719
|
assignmentClone
|
|
20367
20720
|
], TextRenderer.prototype, "_subFont", void 0);
|
|
@@ -20576,7 +20929,9 @@ var DirtyFlag;
|
|
|
20576
20929
|
};
|
|
20577
20930
|
return AnimationCurveOwner;
|
|
20578
20931
|
}();
|
|
20579
|
-
|
|
20932
|
+
(function() {
|
|
20933
|
+
AnimationCurveOwner._assemblerMap = new Map();
|
|
20934
|
+
})();
|
|
20580
20935
|
/**
|
|
20581
20936
|
* @internal
|
|
20582
20937
|
*/ var PositionAnimationCurveOwnerAssembler = /*#__PURE__*/ function() {
|
|
@@ -20742,7 +21097,7 @@ AnimationCurveOwner.registerAssembler(SkinnedMeshRenderer, "blendShapeWeights",
|
|
|
20742
21097
|
}
|
|
20743
21098
|
}
|
|
20744
21099
|
};
|
|
20745
|
-
|
|
21100
|
+
_create_class$2(AnimationClip, [
|
|
20746
21101
|
{
|
|
20747
21102
|
key: "events",
|
|
20748
21103
|
get: /**
|
|
@@ -20888,7 +21243,7 @@ AnimationCurveOwner.registerAssembler(SkinnedMeshRenderer, "blendShapeWeights",
|
|
|
20888
21243
|
var result = this._evaluate(time, evaluateData);
|
|
20889
21244
|
return this._type._subtractValue(result, this.keys[0].value, evaluateData.value);
|
|
20890
21245
|
};
|
|
20891
|
-
|
|
21246
|
+
_create_class$2(AnimationCurve, [
|
|
20892
21247
|
{
|
|
20893
21248
|
key: "interpolation",
|
|
20894
21249
|
get: /**
|
|
@@ -20997,7 +21352,11 @@ exports.AnimationArrayCurve = (_AnimationArrayCurve = /*#__PURE__*/ function(Ani
|
|
|
20997
21352
|
return out;
|
|
20998
21353
|
};
|
|
20999
21354
|
return AnimationArrayCurve;
|
|
21000
|
-
}(AnimationCurve),
|
|
21355
|
+
}(AnimationCurve), function() {
|
|
21356
|
+
/** @internal */ _AnimationArrayCurve._isReferenceType = true;
|
|
21357
|
+
}(), function() {
|
|
21358
|
+
/** @internal */ _AnimationArrayCurve._isInterpolationType = true;
|
|
21359
|
+
}(), _AnimationArrayCurve);
|
|
21001
21360
|
exports.AnimationArrayCurve = __decorate$1([
|
|
21002
21361
|
StaticInterfaceImplement$1()
|
|
21003
21362
|
], exports.AnimationArrayCurve);
|
|
@@ -21049,7 +21408,11 @@ exports.AnimationBoolCurve = (_AnimationBoolCurve = /*#__PURE__*/ function(Anima
|
|
|
21049
21408
|
return frame.value;
|
|
21050
21409
|
};
|
|
21051
21410
|
return AnimationBoolCurve;
|
|
21052
|
-
}(AnimationCurve),
|
|
21411
|
+
}(AnimationCurve), function() {
|
|
21412
|
+
/** @internal */ _AnimationBoolCurve._isReferenceType = false;
|
|
21413
|
+
}(), function() {
|
|
21414
|
+
/** @internal */ _AnimationBoolCurve._isInterpolationType = false;
|
|
21415
|
+
}(), _AnimationBoolCurve);
|
|
21053
21416
|
exports.AnimationBoolCurve = __decorate$1([
|
|
21054
21417
|
StaticInterfaceImplement$1()
|
|
21055
21418
|
], exports.AnimationBoolCurve);
|
|
@@ -21141,7 +21504,11 @@ exports.AnimationColorCurve = (_AnimationColorCurve = /*#__PURE__*/ function(Ani
|
|
|
21141
21504
|
return out;
|
|
21142
21505
|
};
|
|
21143
21506
|
return AnimationColorCurve;
|
|
21144
|
-
}(AnimationCurve),
|
|
21507
|
+
}(AnimationCurve), function() {
|
|
21508
|
+
/** @internal */ _AnimationColorCurve._isReferenceType = true;
|
|
21509
|
+
}(), function() {
|
|
21510
|
+
/** @internal */ _AnimationColorCurve._isInterpolationType = true;
|
|
21511
|
+
}(), _AnimationColorCurve);
|
|
21145
21512
|
exports.AnimationColorCurve = __decorate$1([
|
|
21146
21513
|
StaticInterfaceImplement$1()
|
|
21147
21514
|
], exports.AnimationColorCurve);
|
|
@@ -21236,7 +21603,11 @@ exports.AnimationFloatArrayCurve = (_AnimationFloatArrayCurve = /*#__PURE__*/ fu
|
|
|
21236
21603
|
return out;
|
|
21237
21604
|
};
|
|
21238
21605
|
return AnimationFloatArrayCurve;
|
|
21239
|
-
}(AnimationCurve),
|
|
21606
|
+
}(AnimationCurve), function() {
|
|
21607
|
+
/** @internal */ _AnimationFloatArrayCurve._isReferenceType = true;
|
|
21608
|
+
}(), function() {
|
|
21609
|
+
/** @internal */ _AnimationFloatArrayCurve._isInterpolationType = true;
|
|
21610
|
+
}(), _AnimationFloatArrayCurve);
|
|
21240
21611
|
exports.AnimationFloatArrayCurve = __decorate$1([
|
|
21241
21612
|
StaticInterfaceImplement$1()
|
|
21242
21613
|
], exports.AnimationFloatArrayCurve);
|
|
@@ -21300,7 +21671,11 @@ exports.AnimationFloatCurve = (_AnimationFloatCurve = /*#__PURE__*/ function(Ani
|
|
|
21300
21671
|
}
|
|
21301
21672
|
};
|
|
21302
21673
|
return AnimationFloatCurve;
|
|
21303
|
-
}(AnimationCurve),
|
|
21674
|
+
}(AnimationCurve), function() {
|
|
21675
|
+
/** @internal */ _AnimationFloatCurve._isReferenceType = false;
|
|
21676
|
+
}(), function() {
|
|
21677
|
+
/** @internal */ _AnimationFloatCurve._isInterpolationType = true;
|
|
21678
|
+
}(), _AnimationFloatCurve);
|
|
21304
21679
|
exports.AnimationFloatCurve = __decorate$1([
|
|
21305
21680
|
StaticInterfaceImplement$1()
|
|
21306
21681
|
], exports.AnimationFloatCurve);
|
|
@@ -21397,7 +21772,13 @@ exports.AnimationQuaternionCurve = (_AnimationQuaternionCurve = /*#__PURE__*/ fu
|
|
|
21397
21772
|
return out;
|
|
21398
21773
|
};
|
|
21399
21774
|
return AnimationQuaternionCurve1;
|
|
21400
|
-
}(AnimationCurve),
|
|
21775
|
+
}(AnimationCurve), function() {
|
|
21776
|
+
/** @internal */ _AnimationQuaternionCurve._isInterpolationType = true;
|
|
21777
|
+
}(), function() {
|
|
21778
|
+
/** @internal */ _AnimationQuaternionCurve._isReferenceType = true;
|
|
21779
|
+
}(), function() {
|
|
21780
|
+
/** @internal */ _AnimationQuaternionCurve._tempConjugateQuat = new miniprogram$7.Quaternion();
|
|
21781
|
+
}(), _AnimationQuaternionCurve);
|
|
21401
21782
|
exports.AnimationQuaternionCurve = __decorate$1([
|
|
21402
21783
|
StaticInterfaceImplement$1()
|
|
21403
21784
|
], exports.AnimationQuaternionCurve);
|
|
@@ -21477,7 +21858,11 @@ exports.AnimationVector2Curve = (_AnimationVector2Curve = /*#__PURE__*/ function
|
|
|
21477
21858
|
return out;
|
|
21478
21859
|
};
|
|
21479
21860
|
return AnimationVector2Curve;
|
|
21480
|
-
}(AnimationCurve),
|
|
21861
|
+
}(AnimationCurve), function() {
|
|
21862
|
+
/** @internal */ _AnimationVector2Curve._isReferenceType = true;
|
|
21863
|
+
}(), function() {
|
|
21864
|
+
/** @internal */ _AnimationVector2Curve._isInterpolationType = true;
|
|
21865
|
+
}(), _AnimationVector2Curve);
|
|
21481
21866
|
exports.AnimationVector2Curve = __decorate$1([
|
|
21482
21867
|
StaticInterfaceImplement$1()
|
|
21483
21868
|
], exports.AnimationVector2Curve);
|
|
@@ -21569,7 +21954,11 @@ exports.AnimationVector3Curve = (_AnimationVector3Curve = /*#__PURE__*/ function
|
|
|
21569
21954
|
return out;
|
|
21570
21955
|
};
|
|
21571
21956
|
return AnimationVector3Curve;
|
|
21572
|
-
}(AnimationCurve),
|
|
21957
|
+
}(AnimationCurve), function() {
|
|
21958
|
+
/** @internal */ _AnimationVector3Curve._isReferenceType = true;
|
|
21959
|
+
}(), function() {
|
|
21960
|
+
/** @internal */ _AnimationVector3Curve._isInterpolationType = true;
|
|
21961
|
+
}(), _AnimationVector3Curve);
|
|
21573
21962
|
exports.AnimationVector3Curve = __decorate$1([
|
|
21574
21963
|
StaticInterfaceImplement$1()
|
|
21575
21964
|
], exports.AnimationVector3Curve);
|
|
@@ -21661,7 +22050,11 @@ exports.AnimationVector4Curve = (_AnimationVector4Curve = /*#__PURE__*/ function
|
|
|
21661
22050
|
return out;
|
|
21662
22051
|
};
|
|
21663
22052
|
return AnimationVector4Curve;
|
|
21664
|
-
}(AnimationCurve),
|
|
22053
|
+
}(AnimationCurve), function() {
|
|
22054
|
+
/** @internal */ _AnimationVector4Curve._isReferenceType = true;
|
|
22055
|
+
}(), function() {
|
|
22056
|
+
/** @internal */ _AnimationVector4Curve._isInterpolationType = true;
|
|
22057
|
+
}(), _AnimationVector4Curve);
|
|
21665
22058
|
exports.AnimationVector4Curve = __decorate$1([
|
|
21666
22059
|
StaticInterfaceImplement$1()
|
|
21667
22060
|
], exports.AnimationVector4Curve);
|
|
@@ -22366,7 +22759,7 @@ exports.AnimatorLayerBlendingMode = void 0;
|
|
|
22366
22759
|
}
|
|
22367
22760
|
}
|
|
22368
22761
|
};
|
|
22369
|
-
|
|
22762
|
+
_create_class$2(Animator, [
|
|
22370
22763
|
{
|
|
22371
22764
|
key: "animatorController",
|
|
22372
22765
|
get: /**
|
|
@@ -22456,7 +22849,7 @@ __decorate$1([
|
|
|
22456
22849
|
*/ _proto._registerChangeFlag = function _registerChangeFlag() {
|
|
22457
22850
|
return this._updateFlagManager.createFlag(BoolUpdateFlag);
|
|
22458
22851
|
};
|
|
22459
|
-
|
|
22852
|
+
_create_class$2(AnimatorController, [
|
|
22460
22853
|
{
|
|
22461
22854
|
key: "layers",
|
|
22462
22855
|
get: /**
|
|
@@ -22587,7 +22980,7 @@ __decorate$1([
|
|
|
22587
22980
|
index2 !== -1 && this._onStateExitScripts.splice(index2, 1);
|
|
22588
22981
|
}
|
|
22589
22982
|
};
|
|
22590
|
-
|
|
22983
|
+
_create_class$2(AnimatorState, [
|
|
22591
22984
|
{
|
|
22592
22985
|
key: "transitions",
|
|
22593
22986
|
get: /**
|
|
@@ -22714,7 +23107,7 @@ exports.AnimatorConditionMode = void 0;
|
|
|
22714
23107
|
return _this;
|
|
22715
23108
|
};
|
|
22716
23109
|
_inherits$2(SkyBoxMaterial, Material);
|
|
22717
|
-
|
|
23110
|
+
_create_class$2(SkyBoxMaterial, [
|
|
22718
23111
|
{
|
|
22719
23112
|
key: "textureDecodeRGBM",
|
|
22720
23113
|
get: /**
|
|
@@ -22811,7 +23204,7 @@ exports.ParticleRendererBlendMode = void 0;
|
|
|
22811
23204
|
_this._isFadeOut = false;
|
|
22812
23205
|
_this._playOnEnable = true;
|
|
22813
23206
|
_this._blendMode = 0;
|
|
22814
|
-
_this._onColorChanged = _this._onColorChanged.bind(
|
|
23207
|
+
_this._onColorChanged = _this._onColorChanged.bind(_assert_this_initialized(_this));
|
|
22815
23208
|
//@ts-ignore
|
|
22816
23209
|
_this._color._onValueChanged = _this._onColorChanged;
|
|
22817
23210
|
_this.setMaterial(_this._createMaterial());
|
|
@@ -23089,7 +23482,7 @@ exports.ParticleRendererBlendMode = void 0;
|
|
|
23089
23482
|
ParticleRenderer._getRandom = function _getRandom() {
|
|
23090
23483
|
return Math.random() - 0.5;
|
|
23091
23484
|
};
|
|
23092
|
-
|
|
23485
|
+
_create_class$2(ParticleRenderer, [
|
|
23093
23486
|
{
|
|
23094
23487
|
key: "texture",
|
|
23095
23488
|
get: /**
|
|
@@ -23520,7 +23913,9 @@ exports.ParticleRendererBlendMode = void 0;
|
|
|
23520
23913
|
]);
|
|
23521
23914
|
return ParticleRenderer;
|
|
23522
23915
|
}(MeshRenderer);
|
|
23523
|
-
|
|
23916
|
+
(function() {
|
|
23917
|
+
/** The max number of indices that Uint16Array can support. */ ParticleRenderer._uint16VertexLimit = 65535;
|
|
23918
|
+
})();
|
|
23524
23919
|
__decorate$1([
|
|
23525
23920
|
ignoreClone
|
|
23526
23921
|
], ParticleRenderer.prototype, "_onColorChanged", null);
|
|
@@ -23785,7 +24180,7 @@ var _tempVector3 = new miniprogram$7.Vector3();
|
|
|
23785
24180
|
this._camera.renderTarget = this._oriCameraRenderTarget;
|
|
23786
24181
|
this._camera.cullingMask = this._oriCameraCullingMask;
|
|
23787
24182
|
};
|
|
23788
|
-
|
|
24183
|
+
_create_class$2(Probe, [
|
|
23789
24184
|
{
|
|
23790
24185
|
key: "_texture",
|
|
23791
24186
|
get: function get() {
|
|
@@ -24000,7 +24395,7 @@ exports.resourceLoader = resourceLoader;
|
|
|
24000
24395
|
exports.shallowClone = shallowClone;
|
|
24001
24396
|
|
|
24002
24397
|
var miniprogram$8 = /*#__PURE__*/Object.freeze({
|
|
24003
|
-
|
|
24398
|
+
__proto__: null
|
|
24004
24399
|
});
|
|
24005
24400
|
|
|
24006
24401
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -24011,32 +24406,22 @@ var engineMiniprogramAdapter$1 = require("@galacean/engine-miniprogram-adapter")
|
|
|
24011
24406
|
var miniprogram$1$2 = require("@galacean/engine-math/dist/miniprogram");
|
|
24012
24407
|
var miniprogram$2$1 = require("@galacean/engine-draco/dist/miniprogram");
|
|
24013
24408
|
var miniprogram$3$1 = require("@galacean/engine-rhi-webgl/dist/miniprogram");
|
|
24014
|
-
function
|
|
24015
|
-
|
|
24409
|
+
function _extends$1() {
|
|
24410
|
+
_extends$1 = Object.assign || function assign(target) {
|
|
24016
24411
|
for(var i = 1; i < arguments.length; i++){
|
|
24017
24412
|
var source = arguments[i];
|
|
24018
|
-
for(var key in source)
|
|
24019
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
24020
|
-
target[key] = source[key];
|
|
24021
|
-
}
|
|
24022
|
-
}
|
|
24413
|
+
for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
|
|
24023
24414
|
}
|
|
24024
24415
|
return target;
|
|
24025
24416
|
};
|
|
24026
|
-
return
|
|
24027
|
-
}
|
|
24028
|
-
function _extends$1() {
|
|
24029
|
-
return extends_$1.apply(this, arguments);
|
|
24417
|
+
return _extends$1.apply(this, arguments);
|
|
24030
24418
|
}
|
|
24031
|
-
function
|
|
24032
|
-
|
|
24419
|
+
function _set_prototype_of$1(o, p) {
|
|
24420
|
+
_set_prototype_of$1 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
24033
24421
|
o.__proto__ = p;
|
|
24034
24422
|
return o;
|
|
24035
24423
|
};
|
|
24036
|
-
return
|
|
24037
|
-
}
|
|
24038
|
-
function _setPrototypeOf$1(o, p) {
|
|
24039
|
-
return setPrototypeOf$1(o, p);
|
|
24424
|
+
return _set_prototype_of$1(o, p);
|
|
24040
24425
|
}
|
|
24041
24426
|
function _inherits$1(subClass, superClass) {
|
|
24042
24427
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
@@ -24049,7 +24434,7 @@ function _inherits$1(subClass, superClass) {
|
|
|
24049
24434
|
configurable: true
|
|
24050
24435
|
}
|
|
24051
24436
|
});
|
|
24052
|
-
if (superClass)
|
|
24437
|
+
if (superClass) _set_prototype_of$1(subClass, superClass);
|
|
24053
24438
|
}
|
|
24054
24439
|
/******************************************************************************
|
|
24055
24440
|
Copyright (c) Microsoft Corporation.
|
|
@@ -24332,13 +24717,10 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
24332
24717
|
reject(error);
|
|
24333
24718
|
return;
|
|
24334
24719
|
}
|
|
24335
|
-
if (info.done)
|
|
24336
|
-
|
|
24337
|
-
} else {
|
|
24338
|
-
Promise.resolve(value).then(_next, _throw);
|
|
24339
|
-
}
|
|
24720
|
+
if (info.done) resolve(value);
|
|
24721
|
+
else Promise.resolve(value).then(_next, _throw);
|
|
24340
24722
|
}
|
|
24341
|
-
function
|
|
24723
|
+
function _async_to_generator(fn) {
|
|
24342
24724
|
return function() {
|
|
24343
24725
|
var self = this, args = arguments;
|
|
24344
24726
|
return new Promise(function(resolve, reject) {
|
|
@@ -24383,7 +24765,7 @@ var FontLoader = /*#__PURE__*/ function(Loader) {
|
|
|
24383
24765
|
});
|
|
24384
24766
|
};
|
|
24385
24767
|
_proto._registerFont = function _registerFont(fontName, fontUrl) {
|
|
24386
|
-
return
|
|
24768
|
+
return _async_to_generator(function() {
|
|
24387
24769
|
var fontFace;
|
|
24388
24770
|
return __generator(this, function(_state) {
|
|
24389
24771
|
switch(_state.label){
|
|
@@ -24991,30 +25373,32 @@ var TextureWrapMode;
|
|
|
24991
25373
|
};
|
|
24992
25374
|
return GLTFUtil;
|
|
24993
25375
|
}();
|
|
24994
|
-
function
|
|
25376
|
+
function _array_like_to_array(arr, len) {
|
|
24995
25377
|
if (len == null || len > arr.length) len = arr.length;
|
|
24996
25378
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
24997
25379
|
return arr2;
|
|
24998
25380
|
}
|
|
24999
|
-
function
|
|
25000
|
-
if (Array.isArray(arr)) return
|
|
25381
|
+
function _array_without_holes(arr) {
|
|
25382
|
+
if (Array.isArray(arr)) return _array_like_to_array(arr);
|
|
25001
25383
|
}
|
|
25002
|
-
function
|
|
25003
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
|
|
25384
|
+
function _iterable_to_array(iter) {
|
|
25385
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) {
|
|
25386
|
+
return Array.from(iter);
|
|
25387
|
+
}
|
|
25004
25388
|
}
|
|
25005
|
-
function
|
|
25006
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance
|
|
25389
|
+
function _non_iterable_spread() {
|
|
25390
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
25007
25391
|
}
|
|
25008
|
-
function
|
|
25392
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
|
25009
25393
|
if (!o) return;
|
|
25010
|
-
if (typeof o === "string") return
|
|
25394
|
+
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
25011
25395
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
25012
25396
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
25013
25397
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
25014
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return
|
|
25398
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
25015
25399
|
}
|
|
25016
|
-
function
|
|
25017
|
-
return
|
|
25400
|
+
function _to_consumable_array(arr) {
|
|
25401
|
+
return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
|
|
25018
25402
|
}
|
|
25019
25403
|
var Parser = /*#__PURE__*/ function() {
|
|
25020
25404
|
var Parser = function Parser() {};
|
|
@@ -25030,7 +25414,7 @@ var Parser = /*#__PURE__*/ function() {
|
|
|
25030
25414
|
extensionSchema,
|
|
25031
25415
|
parseResource,
|
|
25032
25416
|
context
|
|
25033
|
-
].concat(
|
|
25417
|
+
].concat(_to_consumable_array(extra)));
|
|
25034
25418
|
}
|
|
25035
25419
|
}
|
|
25036
25420
|
};
|
|
@@ -25044,7 +25428,7 @@ var Parser = /*#__PURE__*/ function() {
|
|
|
25044
25428
|
return (_parsers_ = parsers[0]).createEngineResource.apply(_parsers_, [
|
|
25045
25429
|
extensionSchema,
|
|
25046
25430
|
context
|
|
25047
|
-
].concat(
|
|
25431
|
+
].concat(_to_consumable_array(extra)));
|
|
25048
25432
|
}
|
|
25049
25433
|
};
|
|
25050
25434
|
Parser.hasExtensionParser = function hasExtensionParser(extensionName) {
|
|
@@ -25069,7 +25453,9 @@ var Parser = /*#__PURE__*/ function() {
|
|
|
25069
25453
|
};
|
|
25070
25454
|
return Parser;
|
|
25071
25455
|
}();
|
|
25072
|
-
|
|
25456
|
+
(function() {
|
|
25457
|
+
Parser._extensionParsers = {};
|
|
25458
|
+
})();
|
|
25073
25459
|
/**
|
|
25074
25460
|
* Declare ExtensionParser's decorator.
|
|
25075
25461
|
* @param extensionName - Extension name
|
|
@@ -25143,9 +25529,7 @@ KHR_draco_mesh_compression = __decorate([
|
|
|
25143
25529
|
function _instanceof1$1(left, right) {
|
|
25144
25530
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
25145
25531
|
return !!right[Symbol.hasInstance](left);
|
|
25146
|
-
} else
|
|
25147
|
-
return _instanceof(left, right);
|
|
25148
|
-
}
|
|
25532
|
+
} else return _instanceof(left, right);
|
|
25149
25533
|
}
|
|
25150
25534
|
var KHR_lights_punctual = /*#__PURE__*/ function(ExtensionParser) {
|
|
25151
25535
|
var KHR_lights_punctual = function KHR_lights_punctual() {
|
|
@@ -25458,11 +25842,11 @@ var GalaceanMaterialsRemap = /*#__PURE__*/ function(ExtensionParser) {
|
|
|
25458
25842
|
GalaceanMaterialsRemap = __decorate([
|
|
25459
25843
|
registerExtension("OASIS_materials_remap")
|
|
25460
25844
|
], GalaceanMaterialsRemap);
|
|
25461
|
-
function
|
|
25845
|
+
function _create_for_of_iterator_helper_loose(o, allowArrayLike) {
|
|
25462
25846
|
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
|
25463
25847
|
if (it) return (it = it.call(o)).next.bind(it);
|
|
25464
25848
|
// Fallback for engines without symbol support
|
|
25465
|
-
if (Array.isArray(o) || (it =
|
|
25849
|
+
if (Array.isArray(o) || (it = _unsupported_iterable_to_array(o)) || allowArrayLike && o && typeof o.length === "number") {
|
|
25466
25850
|
if (it) o = it;
|
|
25467
25851
|
var i = 0;
|
|
25468
25852
|
return function() {
|
|
@@ -25475,7 +25859,7 @@ function _createForOfIteratorHelperLoose(o, allowArrayLike) {
|
|
|
25475
25859
|
};
|
|
25476
25860
|
};
|
|
25477
25861
|
}
|
|
25478
|
-
throw new TypeError("Invalid attempt to iterate non-iterable instance
|
|
25862
|
+
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
25479
25863
|
}
|
|
25480
25864
|
var AnimationParser = /*#__PURE__*/ function(Parser) {
|
|
25481
25865
|
var AnimationParser = function AnimationParser() {
|
|
@@ -25767,7 +26151,9 @@ var EntityParser = /*#__PURE__*/ function(Parser) {
|
|
|
25767
26151
|
};
|
|
25768
26152
|
return EntityParser;
|
|
25769
26153
|
}(Parser);
|
|
25770
|
-
|
|
26154
|
+
(function() {
|
|
26155
|
+
/** @internal */ EntityParser._defaultName = "_GLTF_ENTITY_";
|
|
26156
|
+
})();
|
|
25771
26157
|
var MeshParser = /*#__PURE__*/ function(Parser1) {
|
|
25772
26158
|
var MeshParser = function MeshParser() {
|
|
25773
26159
|
return Parser1.apply(this, arguments);
|
|
@@ -25843,21 +26229,31 @@ var MeshParser = /*#__PURE__*/ function(Parser1) {
|
|
|
25843
26229
|
var vertexCount;
|
|
25844
26230
|
var bufferBindIndex = 0;
|
|
25845
26231
|
var positions;
|
|
25846
|
-
|
|
26232
|
+
var boneIndices;
|
|
26233
|
+
var boneWeights;
|
|
26234
|
+
if (keepMeshData) {
|
|
26235
|
+
positions = new Array(vertexCount);
|
|
26236
|
+
boneIndices = new Array(vertexCount);
|
|
26237
|
+
boneWeights = new Array(vertexCount);
|
|
26238
|
+
}
|
|
25847
26239
|
for(var attribute in attributes){
|
|
25848
26240
|
var accessor = accessors[attributes[attribute]];
|
|
25849
26241
|
var accessorBuffer = GLTFUtil.getAccessorBuffer(context, gltf, accessor);
|
|
25850
|
-
var
|
|
25851
|
-
var
|
|
26242
|
+
var dataElementSize = GLTFUtil.getAccessorTypeSize(accessor.type);
|
|
26243
|
+
var accessorCount = accessor.count;
|
|
25852
26244
|
var vertices = accessorBuffer.data;
|
|
25853
26245
|
var vertexElement = void 0;
|
|
25854
26246
|
var meshId = mesh.instanceId;
|
|
25855
26247
|
var vertexBindingInfos = accessorBuffer.vertexBindingInfos;
|
|
25856
|
-
var
|
|
26248
|
+
var elementNormalized = accessor.normalized;
|
|
26249
|
+
var elementFormat = GLTFUtil.getElementFormat(accessor.componentType, dataElementSize, elementNormalized);
|
|
26250
|
+
var scaleFactor = void 0;
|
|
26251
|
+
elementNormalized && (scaleFactor = GLTFUtil.getNormalizedComponentScale(accessor.componentType));
|
|
26252
|
+
var elementOffset = void 0;
|
|
25857
26253
|
if (accessorBuffer.interleaved) {
|
|
25858
26254
|
var byteOffset = accessor.byteOffset || 0;
|
|
25859
26255
|
var stride = accessorBuffer.stride;
|
|
25860
|
-
|
|
26256
|
+
elementOffset = byteOffset % stride;
|
|
25861
26257
|
if (vertexBindingInfos[meshId] === undefined) {
|
|
25862
26258
|
vertexElement = new miniprogram$5.VertexElement(attribute, elementOffset, elementFormat, bufferBindIndex);
|
|
25863
26259
|
var vertexBuffer = accessorBuffer.vertexBuffer;
|
|
@@ -25872,7 +26268,8 @@ var MeshParser = /*#__PURE__*/ function(Parser1) {
|
|
|
25872
26268
|
vertexElement = new miniprogram$5.VertexElement(attribute, elementOffset, elementFormat, vertexBindingInfos[meshId]);
|
|
25873
26269
|
}
|
|
25874
26270
|
} else {
|
|
25875
|
-
|
|
26271
|
+
elementOffset = 0;
|
|
26272
|
+
vertexElement = new miniprogram$5.VertexElement(attribute, elementOffset, elementFormat, bufferBindIndex);
|
|
25876
26273
|
var vertexBuffer1 = new miniprogram$5.Buffer(engine, miniprogram$5.BufferBindFlag.VertexBuffer, vertices.byteLength, miniprogram$5.BufferUsage.Static);
|
|
25877
26274
|
vertexBuffer1.setData(vertices);
|
|
25878
26275
|
mesh.setVertexBufferBinding(vertexBuffer1, accessorBuffer.stride, bufferBindIndex);
|
|
@@ -25880,35 +26277,60 @@ var MeshParser = /*#__PURE__*/ function(Parser1) {
|
|
|
25880
26277
|
}
|
|
25881
26278
|
vertexElements.push(vertexElement);
|
|
25882
26279
|
if (attribute === "POSITION") {
|
|
25883
|
-
vertexCount =
|
|
26280
|
+
vertexCount = accessorCount;
|
|
25884
26281
|
var _mesh_bounds = mesh.bounds, min = _mesh_bounds.min, max = _mesh_bounds.max;
|
|
25885
26282
|
if (accessor.min && accessor.max) {
|
|
25886
26283
|
min.copyFromArray(accessor.min);
|
|
25887
26284
|
max.copyFromArray(accessor.max);
|
|
25888
26285
|
if (keepMeshData) {
|
|
25889
|
-
var
|
|
25890
|
-
|
|
25891
|
-
|
|
25892
|
-
|
|
26286
|
+
var baseOffset = elementOffset / vertices.BYTES_PER_ELEMENT;
|
|
26287
|
+
var stride1 = vertices.length / accessorCount;
|
|
26288
|
+
for(var j = 0; j < accessorCount; j++){
|
|
26289
|
+
var offset = baseOffset + j * stride1;
|
|
26290
|
+
var position = new miniprogram$1$2.Vector3(vertices[offset], vertices[offset + 1], vertices[offset + 2]);
|
|
26291
|
+
elementNormalized && position.scale(scaleFactor);
|
|
26292
|
+
positions[j] = position;
|
|
25893
26293
|
}
|
|
25894
26294
|
}
|
|
25895
26295
|
} else {
|
|
25896
|
-
var
|
|
26296
|
+
var position1 = MeshParser._tempVector3;
|
|
25897
26297
|
min.set(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE);
|
|
25898
26298
|
max.set(-Number.MAX_VALUE, -Number.MAX_VALUE, -Number.MAX_VALUE);
|
|
25899
|
-
var
|
|
25900
|
-
|
|
25901
|
-
|
|
25902
|
-
|
|
25903
|
-
|
|
25904
|
-
miniprogram$1$2.Vector3.
|
|
25905
|
-
|
|
26299
|
+
var baseOffset1 = elementOffset / vertices.BYTES_PER_ELEMENT;
|
|
26300
|
+
var stride2 = vertices.length / accessorCount;
|
|
26301
|
+
for(var j1 = 0; j1 < accessorCount; j1++){
|
|
26302
|
+
var offset1 = baseOffset1 + j1 * stride2;
|
|
26303
|
+
position1.copyFromArray(vertices, offset1);
|
|
26304
|
+
miniprogram$1$2.Vector3.min(min, position1, min);
|
|
26305
|
+
miniprogram$1$2.Vector3.max(max, position1, max);
|
|
26306
|
+
if (keepMeshData) {
|
|
26307
|
+
var clonePosition = position1.clone();
|
|
26308
|
+
elementNormalized && clonePosition.scale(scaleFactor);
|
|
26309
|
+
positions[j1] = clonePosition;
|
|
26310
|
+
}
|
|
25906
26311
|
}
|
|
25907
26312
|
}
|
|
25908
|
-
if (
|
|
25909
|
-
|
|
25910
|
-
|
|
25911
|
-
|
|
26313
|
+
if (elementNormalized) {
|
|
26314
|
+
min.scale(scaleFactor);
|
|
26315
|
+
max.scale(scaleFactor);
|
|
26316
|
+
}
|
|
26317
|
+
} else if (attribute === "JOINTS_0" && keepMeshData) {
|
|
26318
|
+
var baseOffset2 = elementOffset / vertices.BYTES_PER_ELEMENT;
|
|
26319
|
+
var stride3 = vertices.length / accessorCount;
|
|
26320
|
+
for(var j2 = 0; j2 < accessorCount; j2++){
|
|
26321
|
+
var offset2 = baseOffset2 + j2 * stride3;
|
|
26322
|
+
var boneIndex = new miniprogram$1$2.Vector4(vertices[offset2], vertices[offset2 + 1], vertices[offset2 + 2], vertices[offset2 + 3]);
|
|
26323
|
+
elementNormalized && boneIndex.scale(scaleFactor);
|
|
26324
|
+
boneIndices[j2] = boneIndex;
|
|
26325
|
+
}
|
|
26326
|
+
} else if (attribute === "WEIGHTS_0" && keepMeshData) {
|
|
26327
|
+
var baseOffset3 = elementOffset / vertices.BYTES_PER_ELEMENT;
|
|
26328
|
+
var stride4 = vertices.length / accessorCount;
|
|
26329
|
+
for(var j3 = 0; j3 < accessorCount; j3++){
|
|
26330
|
+
var offset3 = baseOffset3 + j3 * stride4;
|
|
26331
|
+
var boneWeight = new miniprogram$1$2.Vector4(vertices[offset3], vertices[offset3 + 1], vertices[offset3 + 2], vertices[offset3 + 3]);
|
|
26332
|
+
elementNormalized && boneWeight.scale(scaleFactor);
|
|
26333
|
+
boneWeights[j3] = boneWeight;
|
|
25912
26334
|
}
|
|
25913
26335
|
}
|
|
25914
26336
|
}
|
|
@@ -25927,6 +26349,10 @@ var MeshParser = /*#__PURE__*/ function(Parser1) {
|
|
|
25927
26349
|
mesh.uploadData(!keepMeshData);
|
|
25928
26350
|
//@ts-ignore
|
|
25929
26351
|
mesh._positions = positions;
|
|
26352
|
+
//@ts-ignore
|
|
26353
|
+
mesh._boneIndices = boneIndices;
|
|
26354
|
+
//@ts-ignore
|
|
26355
|
+
mesh._boneWeights = boneWeights;
|
|
25930
26356
|
return Promise.resolve(mesh);
|
|
25931
26357
|
};
|
|
25932
26358
|
_proto._createBlendShape = function _createBlendShape(mesh, glTFMesh, glTFTargets, getBlendShapeData) {
|
|
@@ -26048,7 +26474,9 @@ var MeshParser = /*#__PURE__*/ function(Parser1) {
|
|
|
26048
26474
|
};
|
|
26049
26475
|
return MeshParser;
|
|
26050
26476
|
}(Parser);
|
|
26051
|
-
|
|
26477
|
+
(function() {
|
|
26478
|
+
MeshParser._tempVector3 = new miniprogram$1$2.Vector3();
|
|
26479
|
+
})();
|
|
26052
26480
|
var SceneParser$1 = /*#__PURE__*/ function(Parser1) {
|
|
26053
26481
|
var SceneParser = function SceneParser() {
|
|
26054
26482
|
return Parser1.apply(this, arguments);
|
|
@@ -26256,7 +26684,7 @@ var SkinParser = /*#__PURE__*/ function(Parser) {
|
|
|
26256
26684
|
};
|
|
26257
26685
|
_proto._findSkeletonRootBone = function _findSkeletonRootBone(joints, entities) {
|
|
26258
26686
|
var paths = {};
|
|
26259
|
-
for(var _iterator =
|
|
26687
|
+
for(var _iterator = _create_for_of_iterator_helper_loose(joints), _step; !(_step = _iterator()).done;){
|
|
26260
26688
|
var index = _step.value;
|
|
26261
26689
|
var path = new Array();
|
|
26262
26690
|
var entity = entities[index];
|
|
@@ -26357,8 +26785,10 @@ var TextureParser = /*#__PURE__*/ function(Parser) {
|
|
|
26357
26785
|
};
|
|
26358
26786
|
return TextureParser;
|
|
26359
26787
|
}(Parser);
|
|
26360
|
-
|
|
26361
|
-
|
|
26788
|
+
(function() {
|
|
26789
|
+
var _obj;
|
|
26790
|
+
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);
|
|
26791
|
+
})();
|
|
26362
26792
|
var Validator = /*#__PURE__*/ function(Parser1) {
|
|
26363
26793
|
var Validator = function Validator() {
|
|
26364
26794
|
return Parser1.apply(this, arguments);
|
|
@@ -26428,17 +26858,19 @@ var GLTFParser = /*#__PURE__*/ function() {
|
|
|
26428
26858
|
};
|
|
26429
26859
|
return GLTFParser;
|
|
26430
26860
|
}();
|
|
26431
|
-
|
|
26432
|
-
|
|
26433
|
-
|
|
26434
|
-
|
|
26435
|
-
|
|
26436
|
-
|
|
26437
|
-
|
|
26438
|
-
|
|
26439
|
-
|
|
26440
|
-
|
|
26441
|
-
|
|
26861
|
+
(function() {
|
|
26862
|
+
GLTFParser.defaultPipeline = new GLTFParser([
|
|
26863
|
+
BufferParser,
|
|
26864
|
+
Validator,
|
|
26865
|
+
TextureParser,
|
|
26866
|
+
MaterialParser,
|
|
26867
|
+
MeshParser,
|
|
26868
|
+
EntityParser,
|
|
26869
|
+
SkinParser,
|
|
26870
|
+
AnimationParser,
|
|
26871
|
+
SceneParser$1
|
|
26872
|
+
]);
|
|
26873
|
+
})();
|
|
26442
26874
|
/**
|
|
26443
26875
|
* Product after GLTF parser, usually, `defaultSceneRoot` is only needed to use.
|
|
26444
26876
|
*/ var GLTFResource = /*#__PURE__*/ function(EngineObject) {
|
|
@@ -26488,7 +26920,7 @@ var GLTFLoader = /*#__PURE__*/ function(Loader) {
|
|
|
26488
26920
|
context.keepMeshData = (_item_params_keepMeshData = (_item_params = item.params) == null ? void 0 : _item_params.keepMeshData) != null ? _item_params_keepMeshData : false;
|
|
26489
26921
|
masterPromiseInfo.onCancel(function() {
|
|
26490
26922
|
var chainPromises = context.chainPromises;
|
|
26491
|
-
for(var _iterator =
|
|
26923
|
+
for(var _iterator = _create_for_of_iterator_helper_loose(chainPromises), _step; !(_step = _iterator()).done;){
|
|
26492
26924
|
var promise = _step.value;
|
|
26493
26925
|
promise.cancel();
|
|
26494
26926
|
}
|
|
@@ -26748,37 +27180,75 @@ var HDRLoader = (_HDRLoader = /*#__PURE__*/ function(Loader) {
|
|
|
26748
27180
|
color.a *= M;
|
|
26749
27181
|
};
|
|
26750
27182
|
return HDRLoader1;
|
|
26751
|
-
}(miniprogram$5.Loader),
|
|
26752
|
-
_HDRLoader._rightBottomBack,
|
|
26753
|
-
|
|
26754
|
-
_HDRLoader.
|
|
26755
|
-
|
|
26756
|
-
|
|
26757
|
-
|
|
26758
|
-
_HDRLoader.
|
|
26759
|
-
|
|
26760
|
-
_HDRLoader.
|
|
26761
|
-
|
|
26762
|
-
_HDRLoader._leftBottomFront,
|
|
26763
|
-
|
|
26764
|
-
_HDRLoader.
|
|
26765
|
-
|
|
26766
|
-
|
|
26767
|
-
|
|
26768
|
-
_HDRLoader.
|
|
26769
|
-
|
|
26770
|
-
|
|
26771
|
-
|
|
26772
|
-
|
|
26773
|
-
|
|
26774
|
-
|
|
26775
|
-
_HDRLoader.
|
|
26776
|
-
|
|
26777
|
-
|
|
26778
|
-
|
|
26779
|
-
|
|
26780
|
-
|
|
26781
|
-
|
|
27183
|
+
}(miniprogram$5.Loader), function() {
|
|
27184
|
+
_HDRLoader._rightBottomBack = new miniprogram$1$2.Vector3(1.0, -1.0, -1.0);
|
|
27185
|
+
}(), function() {
|
|
27186
|
+
_HDRLoader._rightBottomFront = new miniprogram$1$2.Vector3(1.0, -1.0, 1.0);
|
|
27187
|
+
}(), function() {
|
|
27188
|
+
_HDRLoader._rightUpBack = new miniprogram$1$2.Vector3(1.0, 1.0, -1.0);
|
|
27189
|
+
}(), function() {
|
|
27190
|
+
_HDRLoader._rightUpFront = new miniprogram$1$2.Vector3(1.0, 1.0, 1.0);
|
|
27191
|
+
}(), function() {
|
|
27192
|
+
_HDRLoader._leftBottomBack = new miniprogram$1$2.Vector3(-1.0, -1.0, -1.0);
|
|
27193
|
+
}(), function() {
|
|
27194
|
+
_HDRLoader._leftBottomFront = new miniprogram$1$2.Vector3(-1.0, -1.0, 1.0);
|
|
27195
|
+
}(), function() {
|
|
27196
|
+
_HDRLoader._leftUpBack = new miniprogram$1$2.Vector3(-1.0, 1.0, -1.0);
|
|
27197
|
+
}(), function() {
|
|
27198
|
+
_HDRLoader._leftUpFront = new miniprogram$1$2.Vector3(-1.0, 1.0, 1.0);
|
|
27199
|
+
}(), function() {
|
|
27200
|
+
_HDRLoader._faceRight = [
|
|
27201
|
+
_HDRLoader._rightBottomBack,
|
|
27202
|
+
_HDRLoader._rightBottomFront,
|
|
27203
|
+
_HDRLoader._rightUpBack,
|
|
27204
|
+
_HDRLoader._rightUpFront
|
|
27205
|
+
];
|
|
27206
|
+
}(), function() {
|
|
27207
|
+
_HDRLoader._faceLeft = [
|
|
27208
|
+
_HDRLoader._leftBottomFront,
|
|
27209
|
+
_HDRLoader._leftBottomBack,
|
|
27210
|
+
_HDRLoader._leftUpFront,
|
|
27211
|
+
_HDRLoader._leftUpBack
|
|
27212
|
+
];
|
|
27213
|
+
}(), function() {
|
|
27214
|
+
_HDRLoader._faceUp = [
|
|
27215
|
+
_HDRLoader._leftBottomFront,
|
|
27216
|
+
_HDRLoader._rightBottomFront,
|
|
27217
|
+
_HDRLoader._leftBottomBack,
|
|
27218
|
+
_HDRLoader._rightBottomBack
|
|
27219
|
+
];
|
|
27220
|
+
}(), function() {
|
|
27221
|
+
_HDRLoader._faceBottom = [
|
|
27222
|
+
_HDRLoader._leftUpBack,
|
|
27223
|
+
_HDRLoader._rightUpBack,
|
|
27224
|
+
_HDRLoader._leftUpFront,
|
|
27225
|
+
_HDRLoader._rightUpFront
|
|
27226
|
+
];
|
|
27227
|
+
}(), function() {
|
|
27228
|
+
_HDRLoader._faceFront = [
|
|
27229
|
+
_HDRLoader._leftBottomBack,
|
|
27230
|
+
_HDRLoader._rightBottomBack,
|
|
27231
|
+
_HDRLoader._leftUpBack,
|
|
27232
|
+
_HDRLoader._rightUpBack
|
|
27233
|
+
];
|
|
27234
|
+
}(), function() {
|
|
27235
|
+
_HDRLoader._faceBack = [
|
|
27236
|
+
_HDRLoader._rightBottomFront,
|
|
27237
|
+
_HDRLoader._leftBottomFront,
|
|
27238
|
+
_HDRLoader._rightUpFront,
|
|
27239
|
+
_HDRLoader._leftUpFront
|
|
27240
|
+
];
|
|
27241
|
+
}(), function() {
|
|
27242
|
+
_HDRLoader._tempVector3 = new miniprogram$1$2.Vector3();
|
|
27243
|
+
}(), function() {
|
|
27244
|
+
_HDRLoader._temp2Vector3 = new miniprogram$1$2.Vector3();
|
|
27245
|
+
}(), function() {
|
|
27246
|
+
_HDRLoader._temp3Vector3 = new miniprogram$1$2.Vector3();
|
|
27247
|
+
}(), function() {
|
|
27248
|
+
_HDRLoader._temp4Vector3 = new miniprogram$1$2.Vector3();
|
|
27249
|
+
}(), function() {
|
|
27250
|
+
_HDRLoader._temp5Vector3 = new miniprogram$1$2.Vector3();
|
|
27251
|
+
}(), _HDRLoader);
|
|
26782
27252
|
HDRLoader = __decorate([
|
|
26783
27253
|
miniprogram$5.resourceLoader(miniprogram$5.AssetType.HDR, [
|
|
26784
27254
|
"hdr"
|
|
@@ -27148,7 +27618,7 @@ function _defineProperties$1(target, props) {
|
|
|
27148
27618
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
27149
27619
|
}
|
|
27150
27620
|
}
|
|
27151
|
-
function
|
|
27621
|
+
function _create_class$1(Constructor, protoProps, staticProps) {
|
|
27152
27622
|
if (protoProps) _defineProperties$1(Constructor.prototype, protoProps);
|
|
27153
27623
|
if (staticProps) _defineProperties$1(Constructor, staticProps);
|
|
27154
27624
|
return Constructor;
|
|
@@ -27259,7 +27729,7 @@ var BufferReader = /*#__PURE__*/ function() {
|
|
|
27259
27729
|
if (byteLength < maxByteLength) this._offset++;
|
|
27260
27730
|
return new Uint8Array(this._dataView.buffer, this._dataView.byteOffset + byteOffset, byteLength);
|
|
27261
27731
|
};
|
|
27262
|
-
|
|
27732
|
+
_create_class$1(BufferReader, [
|
|
27263
27733
|
{
|
|
27264
27734
|
key: "offset",
|
|
27265
27735
|
get: function get() {
|
|
@@ -27269,12 +27739,14 @@ var BufferReader = /*#__PURE__*/ function() {
|
|
|
27269
27739
|
]);
|
|
27270
27740
|
return BufferReader;
|
|
27271
27741
|
}();
|
|
27272
|
-
|
|
27273
|
-
|
|
27274
|
-
|
|
27275
|
-
|
|
27276
|
-
|
|
27277
|
-
|
|
27742
|
+
(function() {
|
|
27743
|
+
BufferReader.imageMapping = {
|
|
27744
|
+
0: "image/png",
|
|
27745
|
+
1: "image/jpg",
|
|
27746
|
+
2: "image/webp",
|
|
27747
|
+
3: "ktx"
|
|
27748
|
+
};
|
|
27749
|
+
})();
|
|
27278
27750
|
var decoderMap = {};
|
|
27279
27751
|
/**
|
|
27280
27752
|
* Decoder decorator generator.
|
|
@@ -27311,7 +27783,7 @@ var FileHeader = /*#__PURE__*/ function() {
|
|
|
27311
27783
|
header.headerLength = nameUint8Array.byteLength + typeUint8Array.byteLength + 9;
|
|
27312
27784
|
return header;
|
|
27313
27785
|
};
|
|
27314
|
-
|
|
27786
|
+
_create_class$1(FileHeader, [
|
|
27315
27787
|
{
|
|
27316
27788
|
key: "dataLength",
|
|
27317
27789
|
get: function get() {
|
|
@@ -27527,36 +27999,32 @@ exports.Texture2DDecoder = /*#__PURE__*/ function() {
|
|
|
27527
27999
|
exports.Texture2DDecoder = __decorate([
|
|
27528
28000
|
decoder("Texture2D")
|
|
27529
28001
|
], exports.Texture2DDecoder);
|
|
27530
|
-
function
|
|
28002
|
+
function _is_native_reflect_construct() {
|
|
27531
28003
|
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
27532
28004
|
if (Reflect.construct.sham) return false;
|
|
27533
28005
|
if (typeof Proxy === "function") return true;
|
|
27534
28006
|
try {
|
|
27535
|
-
|
|
28007
|
+
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
27536
28008
|
return true;
|
|
27537
28009
|
} catch (e) {
|
|
27538
28010
|
return false;
|
|
27539
28011
|
}
|
|
27540
28012
|
}
|
|
27541
|
-
function
|
|
27542
|
-
if (
|
|
27543
|
-
|
|
27544
|
-
|
|
27545
|
-
construct = function construct(Parent, args, Class) {
|
|
28013
|
+
function _construct(Parent, args, Class) {
|
|
28014
|
+
if (_is_native_reflect_construct()) _construct = Reflect.construct;
|
|
28015
|
+
else {
|
|
28016
|
+
_construct = function construct(Parent, args, Class) {
|
|
27546
28017
|
var a = [
|
|
27547
28018
|
null
|
|
27548
28019
|
];
|
|
27549
28020
|
a.push.apply(a, args);
|
|
27550
28021
|
var Constructor = Function.bind.apply(Parent, a);
|
|
27551
28022
|
var instance = new Constructor();
|
|
27552
|
-
if (Class)
|
|
28023
|
+
if (Class) _set_prototype_of$1(instance, Class.prototype);
|
|
27553
28024
|
return instance;
|
|
27554
28025
|
};
|
|
27555
28026
|
}
|
|
27556
|
-
return
|
|
27557
|
-
}
|
|
27558
|
-
function _construct(Parent, args, Class) {
|
|
27559
|
-
return construct.apply(null, arguments);
|
|
28027
|
+
return _construct.apply(null, arguments);
|
|
27560
28028
|
}
|
|
27561
28029
|
var ReflectionParser = /*#__PURE__*/ function() {
|
|
27562
28030
|
var ReflectionParser = function ReflectionParser() {};
|
|
@@ -27670,7 +28138,9 @@ var ReflectionParser = /*#__PURE__*/ function() {
|
|
|
27670
28138
|
};
|
|
27671
28139
|
return ReflectionParser;
|
|
27672
28140
|
}();
|
|
27673
|
-
|
|
28141
|
+
(function() {
|
|
28142
|
+
ReflectionParser.customParseComponentHandles = new Map();
|
|
28143
|
+
})();
|
|
27674
28144
|
var PrefabParser = /*#__PURE__*/ function() {
|
|
27675
28145
|
var PrefabParser = function PrefabParser() {};
|
|
27676
28146
|
PrefabParser.parseChildren = function parseChildren(entitiesConfig, entities, parentId) {
|
|
@@ -27919,7 +28389,7 @@ var SceneParserContext = /*#__PURE__*/ function() {
|
|
|
27919
28389
|
};
|
|
27920
28390
|
_proto._organizeEntities = function _organizeEntities() {
|
|
27921
28391
|
var _this_context = this.context, entityConfigMap = _this_context.entityConfigMap, entityMap = _this_context.entityMap, scene = _this_context.scene, rootIds = _this_context.rootIds;
|
|
27922
|
-
for(var _iterator =
|
|
28392
|
+
for(var _iterator = _create_for_of_iterator_helper_loose(rootIds), _step; !(_step = _iterator()).done;){
|
|
27923
28393
|
var rootId = _step.value;
|
|
27924
28394
|
PrefabParser.parseChildren(entityConfigMap, entityMap, rootId);
|
|
27925
28395
|
}
|
|
@@ -28078,7 +28548,7 @@ var SourceFontLoader = /*#__PURE__*/ function(Loader) {
|
|
|
28078
28548
|
});
|
|
28079
28549
|
};
|
|
28080
28550
|
_proto._registerFont = function _registerFont(fontName, fontUrl) {
|
|
28081
|
-
return
|
|
28551
|
+
return _async_to_generator(function() {
|
|
28082
28552
|
var fontFace;
|
|
28083
28553
|
return __generator(this, function(_state) {
|
|
28084
28554
|
switch(_state.label){
|
|
@@ -28394,7 +28864,7 @@ SceneLoader = __decorate([
|
|
|
28394
28864
|
"prefab"
|
|
28395
28865
|
], true)
|
|
28396
28866
|
], SceneLoader);
|
|
28397
|
-
ReflectionParser.registerCustomParseComponent("TextRenderer", /*#__PURE__*/
|
|
28867
|
+
ReflectionParser.registerCustomParseComponent("TextRenderer", /*#__PURE__*/ _async_to_generator(function(instance, item, engine) {
|
|
28398
28868
|
var props;
|
|
28399
28869
|
return __generator(this, function(_state) {
|
|
28400
28870
|
props = item.props;
|
|
@@ -28417,7 +28887,7 @@ exports.decode = decode;
|
|
|
28417
28887
|
exports.parseSingleKTX = parseSingleKTX;
|
|
28418
28888
|
|
|
28419
28889
|
var miniprogram$6 = /*#__PURE__*/Object.freeze({
|
|
28420
|
-
|
|
28890
|
+
__proto__: null
|
|
28421
28891
|
});
|
|
28422
28892
|
|
|
28423
28893
|
var miniprogram$4 = createCommonjsModule(function (module, exports) {
|
|
@@ -28460,7 +28930,7 @@ function _defineProperties(target, props) {
|
|
|
28460
28930
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
28461
28931
|
}
|
|
28462
28932
|
}
|
|
28463
|
-
function
|
|
28933
|
+
function _create_class(Constructor, protoProps, staticProps) {
|
|
28464
28934
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
28465
28935
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
28466
28936
|
return Constructor;
|
|
@@ -28510,9 +28980,15 @@ function _createClass(Constructor, protoProps, staticProps) {
|
|
|
28510
28980
|
};
|
|
28511
28981
|
return MathUtil;
|
|
28512
28982
|
}();
|
|
28513
|
-
|
|
28514
|
-
/** The
|
|
28515
|
-
|
|
28983
|
+
(function() {
|
|
28984
|
+
/** The value for which all absolute numbers smaller than are considered equal to zero. */ MathUtil.zeroTolerance = 1e-6;
|
|
28985
|
+
})();
|
|
28986
|
+
(function() {
|
|
28987
|
+
/** The conversion factor that radian to degree. */ MathUtil.radToDegreeFactor = 180 / Math.PI;
|
|
28988
|
+
})();
|
|
28989
|
+
(function() {
|
|
28990
|
+
/** The conversion factor that degree to radian. */ MathUtil.degreeToRadFactor = Math.PI / 180;
|
|
28991
|
+
})();
|
|
28516
28992
|
/**
|
|
28517
28993
|
* Describes a 3D-vector.
|
|
28518
28994
|
*/ var Vector3 = /*#__PURE__*/ function() {
|
|
@@ -28970,7 +29446,7 @@ function _createClass(Constructor, protoProps, staticProps) {
|
|
|
28970
29446
|
out._z = iz * qw - iw * qz - ix * qy + iy * qx;
|
|
28971
29447
|
out._onValueChanged && out._onValueChanged();
|
|
28972
29448
|
};
|
|
28973
|
-
|
|
29449
|
+
_create_class(Vector3, [
|
|
28974
29450
|
{
|
|
28975
29451
|
key: "x",
|
|
28976
29452
|
get: /**
|
|
@@ -29010,8 +29486,12 @@ function _createClass(Constructor, protoProps, staticProps) {
|
|
|
29010
29486
|
]);
|
|
29011
29487
|
return Vector3;
|
|
29012
29488
|
}();
|
|
29013
|
-
|
|
29014
|
-
/** @internal */ Vector3.
|
|
29489
|
+
(function() {
|
|
29490
|
+
/** @internal */ Vector3._zero = new Vector3(0.0, 0.0, 0.0);
|
|
29491
|
+
})();
|
|
29492
|
+
(function() {
|
|
29493
|
+
/** @internal */ Vector3._one = new Vector3(1.0, 1.0, 1.0);
|
|
29494
|
+
})();
|
|
29015
29495
|
/**
|
|
29016
29496
|
* A bounding sphere.
|
|
29017
29497
|
* */ var BoundingSphere = /*#__PURE__*/ function() {
|
|
@@ -29079,7 +29559,9 @@ function _createClass(Constructor, protoProps, staticProps) {
|
|
|
29079
29559
|
};
|
|
29080
29560
|
return BoundingSphere;
|
|
29081
29561
|
}();
|
|
29082
|
-
|
|
29562
|
+
(function() {
|
|
29563
|
+
BoundingSphere._tempVec30 = new Vector3();
|
|
29564
|
+
})();
|
|
29083
29565
|
/**
|
|
29084
29566
|
* Axis Aligned Bound Box (AABB).
|
|
29085
29567
|
*/ var BoundingBox = /*#__PURE__*/ function() {
|
|
@@ -29237,8 +29719,12 @@ BoundingSphere._tempVec30 = new Vector3();
|
|
|
29237
29719
|
};
|
|
29238
29720
|
return BoundingBox;
|
|
29239
29721
|
}();
|
|
29240
|
-
|
|
29241
|
-
BoundingBox.
|
|
29722
|
+
(function() {
|
|
29723
|
+
BoundingBox._tempVec30 = new Vector3();
|
|
29724
|
+
})();
|
|
29725
|
+
(function() {
|
|
29726
|
+
BoundingBox._tempVec31 = new Vector3();
|
|
29727
|
+
})();
|
|
29242
29728
|
/**
|
|
29243
29729
|
* Contains static methods to help in determining intersections, containment, etc.
|
|
29244
29730
|
*/ var CollisionUtil = /*#__PURE__*/ function() {
|
|
@@ -29586,9 +30072,15 @@ BoundingBox._tempVec31 = new Vector3();
|
|
|
29586
30072
|
};
|
|
29587
30073
|
return CollisionUtil;
|
|
29588
30074
|
}();
|
|
29589
|
-
|
|
29590
|
-
CollisionUtil.
|
|
29591
|
-
|
|
30075
|
+
(function() {
|
|
30076
|
+
CollisionUtil._tempVec30 = new Vector3();
|
|
30077
|
+
})();
|
|
30078
|
+
(function() {
|
|
30079
|
+
CollisionUtil._tempVec31 = new Vector3();
|
|
30080
|
+
})();
|
|
30081
|
+
(function() {
|
|
30082
|
+
CollisionUtil._tempVec32 = new Vector3();
|
|
30083
|
+
})();
|
|
29592
30084
|
/**
|
|
29593
30085
|
* Represents a plane in three-dimensional space.
|
|
29594
30086
|
*/ var Plane = /*#__PURE__*/ function() {
|
|
@@ -30908,7 +31400,7 @@ CollisionUtil._tempVec32 = new Vector3();
|
|
|
30908
31400
|
out._w = a._w * s;
|
|
30909
31401
|
out._onValueChanged && out._onValueChanged();
|
|
30910
31402
|
};
|
|
30911
|
-
|
|
31403
|
+
_create_class(Quaternion, [
|
|
30912
31404
|
{
|
|
30913
31405
|
key: "x",
|
|
30914
31406
|
get: /**
|
|
@@ -30968,8 +31460,12 @@ CollisionUtil._tempVec32 = new Vector3();
|
|
|
30968
31460
|
]);
|
|
30969
31461
|
return Quaternion;
|
|
30970
31462
|
}();
|
|
30971
|
-
|
|
30972
|
-
/** @internal */ Quaternion.
|
|
31463
|
+
(function() {
|
|
31464
|
+
/** @internal */ Quaternion._tempVector3 = new Vector3();
|
|
31465
|
+
})();
|
|
31466
|
+
(function() {
|
|
31467
|
+
/** @internal */ Quaternion._tempQuat1 = new Quaternion();
|
|
31468
|
+
})();
|
|
30973
31469
|
/**
|
|
30974
31470
|
* Represents a 4x4 mathematical matrix.
|
|
30975
31471
|
*/ var Matrix = /*#__PURE__*/ function() {
|
|
@@ -31914,11 +32410,21 @@ CollisionUtil._tempVec32 = new Vector3();
|
|
|
31914
32410
|
};
|
|
31915
32411
|
return Matrix;
|
|
31916
32412
|
}();
|
|
31917
|
-
|
|
31918
|
-
Matrix.
|
|
31919
|
-
|
|
31920
|
-
|
|
31921
|
-
|
|
32413
|
+
(function() {
|
|
32414
|
+
Matrix._tempVec30 = new Vector3();
|
|
32415
|
+
})();
|
|
32416
|
+
(function() {
|
|
32417
|
+
Matrix._tempVec31 = new Vector3();
|
|
32418
|
+
})();
|
|
32419
|
+
(function() {
|
|
32420
|
+
Matrix._tempVec32 = new Vector3();
|
|
32421
|
+
})();
|
|
32422
|
+
(function() {
|
|
32423
|
+
Matrix._tempMat30 = new Matrix3x3();
|
|
32424
|
+
})();
|
|
32425
|
+
(function() {
|
|
32426
|
+
/** @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);
|
|
32427
|
+
})();
|
|
31922
32428
|
/**
|
|
31923
32429
|
* Represents a ray with an origin and a direction in 3D space.
|
|
31924
32430
|
*/ var Ray = /*#__PURE__*/ function() {
|
|
@@ -32252,7 +32758,7 @@ Matrix._tempMat30 = new Matrix3x3();
|
|
|
32252
32758
|
out._y = left._y * s;
|
|
32253
32759
|
out._onValueChanged && out._onValueChanged();
|
|
32254
32760
|
};
|
|
32255
|
-
|
|
32761
|
+
_create_class(Vector2, [
|
|
32256
32762
|
{
|
|
32257
32763
|
key: "x",
|
|
32258
32764
|
get: /**
|
|
@@ -32280,8 +32786,12 @@ Matrix._tempMat30 = new Matrix3x3();
|
|
|
32280
32786
|
]);
|
|
32281
32787
|
return Vector2;
|
|
32282
32788
|
}();
|
|
32283
|
-
|
|
32284
|
-
/** @internal */ Vector2.
|
|
32789
|
+
(function() {
|
|
32790
|
+
/** @internal */ Vector2._zero = new Vector2(0.0, 0.0);
|
|
32791
|
+
})();
|
|
32792
|
+
(function() {
|
|
32793
|
+
/** @internal */ Vector2._one = new Vector2(1.0, 1.0);
|
|
32794
|
+
})();
|
|
32285
32795
|
/**
|
|
32286
32796
|
* Describes a 4D-vector.
|
|
32287
32797
|
*/ var Vector4 = /*#__PURE__*/ function() {
|
|
@@ -32661,7 +33171,7 @@ Matrix._tempMat30 = new Matrix3x3();
|
|
|
32661
33171
|
out._w = w;
|
|
32662
33172
|
out._onValueChanged && out._onValueChanged();
|
|
32663
33173
|
};
|
|
32664
|
-
|
|
33174
|
+
_create_class(Vector4, [
|
|
32665
33175
|
{
|
|
32666
33176
|
key: "x",
|
|
32667
33177
|
get: /**
|
|
@@ -32713,8 +33223,12 @@ Matrix._tempMat30 = new Matrix3x3();
|
|
|
32713
33223
|
]);
|
|
32714
33224
|
return Vector4;
|
|
32715
33225
|
}();
|
|
32716
|
-
|
|
32717
|
-
/** @internal */ Vector4.
|
|
33226
|
+
(function() {
|
|
33227
|
+
/** @internal */ Vector4._zero = new Vector4(0.0, 0.0, 0.0, 0.0);
|
|
33228
|
+
})();
|
|
33229
|
+
(function() {
|
|
33230
|
+
/** @internal */ Vector4._one = new Vector4(1.0, 1.0, 1.0, 1.0);
|
|
33231
|
+
})();
|
|
32718
33232
|
/**
|
|
32719
33233
|
* Describes a color in the from of RGBA (in order: R, G, B, A).
|
|
32720
33234
|
*/ var Color = /*#__PURE__*/ function() {
|
|
@@ -32923,7 +33437,7 @@ Matrix._tempMat30 = new Matrix3x3();
|
|
|
32923
33437
|
out._onValueChanged && out._onValueChanged();
|
|
32924
33438
|
return out;
|
|
32925
33439
|
};
|
|
32926
|
-
|
|
33440
|
+
_create_class(Color, [
|
|
32927
33441
|
{
|
|
32928
33442
|
key: "r",
|
|
32929
33443
|
get: /**
|
|
@@ -33281,7 +33795,7 @@ function _defineProperties(target, props) {
|
|
|
33281
33795
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
33282
33796
|
}
|
|
33283
33797
|
}
|
|
33284
|
-
function
|
|
33798
|
+
function _create_class(Constructor, protoProps, staticProps) {
|
|
33285
33799
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
33286
33800
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
33287
33801
|
return Constructor;
|
|
@@ -33289,9 +33803,7 @@ function _createClass(Constructor, protoProps, staticProps) {
|
|
|
33289
33803
|
function _instanceof1(left, right) {
|
|
33290
33804
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
33291
33805
|
return !!right[Symbol.hasInstance](left);
|
|
33292
|
-
} else
|
|
33293
|
-
return _instanceof(left, right);
|
|
33294
|
-
}
|
|
33806
|
+
} else return _instanceof(left, right);
|
|
33295
33807
|
}
|
|
33296
33808
|
/**
|
|
33297
33809
|
* The canvas used on the web, which can support HTMLCanvasElement and OffscreenCanvas.
|
|
@@ -33324,7 +33836,7 @@ function _instanceof1(left, right) {
|
|
|
33324
33836
|
this._scale.set(x, y);
|
|
33325
33837
|
this.scale = this._scale;
|
|
33326
33838
|
};
|
|
33327
|
-
|
|
33839
|
+
_create_class(WebCanvas, [
|
|
33328
33840
|
{
|
|
33329
33841
|
key: "width",
|
|
33330
33842
|
get: /**
|
|
@@ -33376,15 +33888,12 @@ function _instanceof1(left, right) {
|
|
|
33376
33888
|
]);
|
|
33377
33889
|
return WebCanvas;
|
|
33378
33890
|
}();
|
|
33379
|
-
function
|
|
33380
|
-
|
|
33891
|
+
function _set_prototype_of(o, p) {
|
|
33892
|
+
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
33381
33893
|
o.__proto__ = p;
|
|
33382
33894
|
return o;
|
|
33383
33895
|
};
|
|
33384
|
-
return
|
|
33385
|
-
}
|
|
33386
|
-
function _setPrototypeOf(o, p) {
|
|
33387
|
-
return setPrototypeOf(o, p);
|
|
33896
|
+
return _set_prototype_of(o, p);
|
|
33388
33897
|
}
|
|
33389
33898
|
function _inherits(subClass, superClass) {
|
|
33390
33899
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
@@ -33397,132 +33906,18 @@ function _inherits(subClass, superClass) {
|
|
|
33397
33906
|
configurable: true
|
|
33398
33907
|
}
|
|
33399
33908
|
});
|
|
33400
|
-
if (superClass)
|
|
33909
|
+
if (superClass) _set_prototype_of(subClass, superClass);
|
|
33401
33910
|
}
|
|
33402
|
-
|
|
33403
|
-
|
|
33404
|
-
*/ var WebGLEngine = /*#__PURE__*/ function(Engine) {
|
|
33405
|
-
var WebGLEngine = function WebGLEngine() {
|
|
33406
|
-
return Engine.apply(this, arguments);
|
|
33407
|
-
};
|
|
33408
|
-
_inherits(WebGLEngine, Engine);
|
|
33409
|
-
/**
|
|
33410
|
-
* Create a WebGL engine.
|
|
33411
|
-
* @param configuration - WebGL engine configuration
|
|
33412
|
-
* @returns A promise that will resolve when the engine is created
|
|
33413
|
-
*/ WebGLEngine.create = function create(configuration) {
|
|
33414
|
-
var canvas = configuration.canvas;
|
|
33415
|
-
var webCanvas = new WebCanvas(typeof canvas === "string" ? engineMiniprogramAdapter.document.getElementById(canvas) : canvas);
|
|
33416
|
-
var webGLRenderer = new WebGLGraphicDevice(configuration.graphicDeviceOptions);
|
|
33417
|
-
var engine = new WebGLEngine(webCanvas, webGLRenderer, configuration);
|
|
33418
|
-
return engine._initialize(configuration);
|
|
33419
|
-
};
|
|
33420
|
-
_createClass(WebGLEngine, [
|
|
33421
|
-
{
|
|
33422
|
-
key: "canvas",
|
|
33423
|
-
get: /**
|
|
33424
|
-
* Web canvas.
|
|
33425
|
-
*/ function get() {
|
|
33426
|
-
return this._canvas;
|
|
33427
|
-
}
|
|
33428
|
-
}
|
|
33429
|
-
]);
|
|
33430
|
-
return WebGLEngine;
|
|
33431
|
-
}(miniprogram$1$1.Engine);
|
|
33432
|
-
function extends_() {
|
|
33433
|
-
extends_ = Object.assign || function(target) {
|
|
33911
|
+
function _extends() {
|
|
33912
|
+
_extends = Object.assign || function assign(target) {
|
|
33434
33913
|
for(var i = 1; i < arguments.length; i++){
|
|
33435
33914
|
var source = arguments[i];
|
|
33436
|
-
for(var key in source)
|
|
33437
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
33438
|
-
target[key] = source[key];
|
|
33439
|
-
}
|
|
33440
|
-
}
|
|
33915
|
+
for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
|
|
33441
33916
|
}
|
|
33442
33917
|
return target;
|
|
33443
33918
|
};
|
|
33444
|
-
return
|
|
33919
|
+
return _extends.apply(this, arguments);
|
|
33445
33920
|
}
|
|
33446
|
-
function _extends() {
|
|
33447
|
-
return extends_.apply(this, arguments);
|
|
33448
|
-
}
|
|
33449
|
-
var GLBuffer = /*#__PURE__*/ function() {
|
|
33450
|
-
var GLBuffer = function GLBuffer(rhi, type, byteLength, bufferUsage, data) {
|
|
33451
|
-
if (bufferUsage === void 0) bufferUsage = miniprogram$1$1.BufferUsage.Static;
|
|
33452
|
-
var gl = rhi.gl;
|
|
33453
|
-
var glBuffer = gl.createBuffer();
|
|
33454
|
-
var glBufferUsage = this._getGLBufferUsage(gl, bufferUsage);
|
|
33455
|
-
var glBindTarget = type === miniprogram$1$1.BufferBindFlag.VertexBuffer ? gl.ARRAY_BUFFER : gl.ELEMENT_ARRAY_BUFFER;
|
|
33456
|
-
this._gl = gl;
|
|
33457
|
-
this._glBuffer = glBuffer;
|
|
33458
|
-
this._glBufferUsage = glBufferUsage;
|
|
33459
|
-
this._glBindTarget = glBindTarget;
|
|
33460
|
-
this._isWebGL2 = rhi.isWebGL2;
|
|
33461
|
-
this.bind();
|
|
33462
|
-
if (data) {
|
|
33463
|
-
gl.bufferData(glBindTarget, data, glBufferUsage);
|
|
33464
|
-
} else {
|
|
33465
|
-
gl.bufferData(glBindTarget, byteLength, glBufferUsage);
|
|
33466
|
-
}
|
|
33467
|
-
gl.bindBuffer(glBindTarget, null);
|
|
33468
|
-
};
|
|
33469
|
-
var _proto = GLBuffer.prototype;
|
|
33470
|
-
_proto.bind = function bind() {
|
|
33471
|
-
this._gl.bindBuffer(this._glBindTarget, this._glBuffer);
|
|
33472
|
-
};
|
|
33473
|
-
_proto.setData = function setData(byteLength, data, bufferByteOffset, dataOffset, dataLength, options) {
|
|
33474
|
-
var gl = this._gl;
|
|
33475
|
-
var glBindTarget = this._glBindTarget;
|
|
33476
|
-
this.bind();
|
|
33477
|
-
if (options === miniprogram$1$1.SetDataOptions.Discard) {
|
|
33478
|
-
gl.bufferData(glBindTarget, byteLength, this._glBufferUsage);
|
|
33479
|
-
}
|
|
33480
|
-
// TypeArray is BYTES_PER_ELEMENT, unTypeArray is 1
|
|
33481
|
-
var byteSize = data.BYTES_PER_ELEMENT || 1;
|
|
33482
|
-
var dataByteLength = dataLength ? byteSize * dataLength : data.byteLength;
|
|
33483
|
-
if (dataOffset !== 0 || dataByteLength < data.byteLength) {
|
|
33484
|
-
var isArrayBufferView = data.byteOffset !== undefined;
|
|
33485
|
-
if (this._isWebGL2 && isArrayBufferView) {
|
|
33486
|
-
gl.bufferSubData(glBindTarget, bufferByteOffset, data, dataOffset, dataByteLength / byteSize);
|
|
33487
|
-
} else {
|
|
33488
|
-
var subData = new Uint8Array(isArrayBufferView ? data.buffer : data, dataOffset * byteSize, dataByteLength);
|
|
33489
|
-
gl.bufferSubData(glBindTarget, bufferByteOffset, subData);
|
|
33490
|
-
}
|
|
33491
|
-
} else {
|
|
33492
|
-
gl.bufferSubData(glBindTarget, bufferByteOffset, data);
|
|
33493
|
-
}
|
|
33494
|
-
gl.bindBuffer(glBindTarget, null);
|
|
33495
|
-
};
|
|
33496
|
-
_proto.getData = function getData(data, bufferByteOffset, dataOffset, dataLength) {
|
|
33497
|
-
if (this._isWebGL2) {
|
|
33498
|
-
var gl = this._gl;
|
|
33499
|
-
this.bind();
|
|
33500
|
-
gl.getBufferSubData(this._glBindTarget, bufferByteOffset, data, dataOffset, dataLength);
|
|
33501
|
-
} else {
|
|
33502
|
-
throw "Buffer is write-only on WebGL1.0 platforms.";
|
|
33503
|
-
}
|
|
33504
|
-
};
|
|
33505
|
-
_proto.resize = function resize(byteLength) {
|
|
33506
|
-
this.bind();
|
|
33507
|
-
this._gl.bufferData(this._glBindTarget, byteLength, this._glBufferUsage);
|
|
33508
|
-
};
|
|
33509
|
-
_proto.destroy = function destroy() {
|
|
33510
|
-
this._gl.deleteBuffer(this._glBuffer);
|
|
33511
|
-
this._gl = null;
|
|
33512
|
-
this._glBuffer = null;
|
|
33513
|
-
};
|
|
33514
|
-
_proto._getGLBufferUsage = function _getGLBufferUsage(gl, bufferUsage) {
|
|
33515
|
-
switch(bufferUsage){
|
|
33516
|
-
case miniprogram$1$1.BufferUsage.Static:
|
|
33517
|
-
return gl.STATIC_DRAW;
|
|
33518
|
-
case miniprogram$1$1.BufferUsage.Dynamic:
|
|
33519
|
-
return gl.DYNAMIC_DRAW;
|
|
33520
|
-
case miniprogram$1$1.BufferUsage.Stream:
|
|
33521
|
-
return gl.STREAM_DRAW;
|
|
33522
|
-
}
|
|
33523
|
-
};
|
|
33524
|
-
return GLBuffer;
|
|
33525
|
-
}();
|
|
33526
33921
|
/**
|
|
33527
33922
|
* GL capability.
|
|
33528
33923
|
*/ var GLCapability = /*#__PURE__*/ function() {
|
|
@@ -33654,7 +34049,7 @@ var GLBuffer = /*#__PURE__*/ function() {
|
|
|
33654
34049
|
TEXTURE_MAX_ANISOTROPY_EXT: "TEXTURE_MAX_ANISOTROPY_EXT"
|
|
33655
34050
|
});
|
|
33656
34051
|
};
|
|
33657
|
-
|
|
34052
|
+
_create_class(GLCapability, [
|
|
33658
34053
|
{
|
|
33659
34054
|
key: "maxTextureSize",
|
|
33660
34055
|
get: function get() {
|
|
@@ -33785,8 +34180,8 @@ var GLBuffer = /*#__PURE__*/ function() {
|
|
|
33785
34180
|
if (useVao) {
|
|
33786
34181
|
gl.drawElements(topology, count, _glIndexType, start * _glIndexByteCount);
|
|
33787
34182
|
} else {
|
|
33788
|
-
var
|
|
33789
|
-
gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER,
|
|
34183
|
+
var _nativeBuffer = _indexBufferBinding.buffer._nativeBuffer;
|
|
34184
|
+
gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, _nativeBuffer);
|
|
33790
34185
|
gl.drawElements(topology, count, _glIndexType, start * _glIndexByteCount);
|
|
33791
34186
|
gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null);
|
|
33792
34187
|
}
|
|
@@ -33799,8 +34194,8 @@ var GLBuffer = /*#__PURE__*/ function() {
|
|
|
33799
34194
|
if (useVao) {
|
|
33800
34195
|
gl.drawElementsInstanced(topology, count, _glIndexType, start * _glIndexByteCount, _instanceCount);
|
|
33801
34196
|
} else {
|
|
33802
|
-
var
|
|
33803
|
-
gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER,
|
|
34197
|
+
var _nativeBuffer1 = _indexBufferBinding.buffer._nativeBuffer;
|
|
34198
|
+
gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, _nativeBuffer1);
|
|
33804
34199
|
gl.drawElementsInstanced(topology, count, _glIndexType, start * _glIndexByteCount, _instanceCount);
|
|
33805
34200
|
gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null);
|
|
33806
34201
|
}
|
|
@@ -33840,7 +34235,7 @@ var GLBuffer = /*#__PURE__*/ function() {
|
|
|
33840
34235
|
var element = attributes[name];
|
|
33841
34236
|
if (element) {
|
|
33842
34237
|
var _vertexBufferBindings_element_bindingIndex = vertexBufferBindings[element.bindingIndex], buffer = _vertexBufferBindings_element_bindingIndex.buffer, stride = _vertexBufferBindings_element_bindingIndex.stride;
|
|
33843
|
-
vbo = buffer.
|
|
34238
|
+
vbo = buffer._nativeBuffer;
|
|
33844
34239
|
// prevent binding the vbo which already bound at the last loop, e.g. a buffer with multiple attributes.
|
|
33845
34240
|
if (lastBoundVbo !== vbo) {
|
|
33846
34241
|
lastBoundVbo = vbo;
|
|
@@ -33872,7 +34267,7 @@ var GLBuffer = /*#__PURE__*/ function() {
|
|
|
33872
34267
|
// @ts-ignore
|
|
33873
34268
|
var _indexBufferBinding = this._primitive._indexBufferBinding;
|
|
33874
34269
|
if (_indexBufferBinding) {
|
|
33875
|
-
gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, _indexBufferBinding.buffer.
|
|
34270
|
+
gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, _indexBufferBinding.buffer._nativeBuffer);
|
|
33876
34271
|
}
|
|
33877
34272
|
this._bindBufferAndAttrib(shaderProgram);
|
|
33878
34273
|
/** unbind */ gl.bindVertexArray(null);
|
|
@@ -34404,7 +34799,7 @@ var GLBuffer = /*#__PURE__*/ function() {
|
|
|
34404
34799
|
}
|
|
34405
34800
|
return true;
|
|
34406
34801
|
};
|
|
34407
|
-
|
|
34802
|
+
_create_class(GLTexture, [
|
|
34408
34803
|
{
|
|
34409
34804
|
key: "wrapModeU",
|
|
34410
34805
|
set: /**
|
|
@@ -34929,19 +35324,20 @@ exports.WebGLMode = void 0;
|
|
|
34929
35324
|
WebGLMode[WebGLMode[/** WebGL1.0, */ "WebGL1"] = 2] = "WebGL1";
|
|
34930
35325
|
})(exports.WebGLMode || (exports.WebGLMode = {}));
|
|
34931
35326
|
/**
|
|
34932
|
-
* WebGL
|
|
34933
|
-
*/ var
|
|
34934
|
-
var
|
|
35327
|
+
* WebGL renderer, including WebGL1.0 and WebGL2.0.
|
|
35328
|
+
*/ var WebGLRenderer = /*#__PURE__*/ function() {
|
|
35329
|
+
var WebGLRenderer = function WebGLRenderer(initializeOptions) {
|
|
34935
35330
|
if (initializeOptions === void 0) initializeOptions = {};
|
|
34936
|
-
/** @internal */ this._readFrameBuffer = null;
|
|
34937
35331
|
/** @internal */ this._enableGlobalDepthBias = false;
|
|
34938
35332
|
this._activeTextures = new Array(32);
|
|
35333
|
+
// cache value
|
|
34939
35334
|
this._lastViewport = new miniprogram$1.Vector4(null, null, null, null);
|
|
34940
35335
|
this._lastScissor = new miniprogram$1.Vector4(null, null, null, null);
|
|
34941
35336
|
this._lastClearColor = new miniprogram$1.Color(null, null, null, null);
|
|
34942
35337
|
this._scissorEnable = false;
|
|
34943
35338
|
var options = _extends({
|
|
34944
35339
|
webGLMode: 0,
|
|
35340
|
+
alpha: false,
|
|
34945
35341
|
stencil: true,
|
|
34946
35342
|
_forceFlush: false
|
|
34947
35343
|
}, initializeOptions);
|
|
@@ -34956,20 +35352,12 @@ exports.WebGLMode = void 0;
|
|
|
34956
35352
|
}
|
|
34957
35353
|
}
|
|
34958
35354
|
this._options = options;
|
|
34959
|
-
this._onWebGLContextLost = this._onWebGLContextLost.bind(this);
|
|
34960
|
-
this._onWebGLContextRestored = this._onWebGLContextRestored.bind(this);
|
|
34961
35355
|
};
|
|
34962
|
-
var _proto =
|
|
34963
|
-
_proto.init = function init(canvas
|
|
35356
|
+
var _proto = WebGLRenderer.prototype;
|
|
35357
|
+
_proto.init = function init(canvas) {
|
|
34964
35358
|
var options = this._options;
|
|
34965
|
-
var webCanvas = canvas._webCanvas;
|
|
35359
|
+
var webCanvas = this._webCanvas = canvas._webCanvas;
|
|
34966
35360
|
var webGLMode = options.webGLMode;
|
|
34967
|
-
this._onDeviceLost = onDeviceLost;
|
|
34968
|
-
this._onDeviceRestored = onDeviceRestored;
|
|
34969
|
-
webCanvas.addEventListener("webglcontextlost", this._onWebGLContextLost, false);
|
|
34970
|
-
webCanvas.addEventListener("webglcontextrestored", this._onWebGLContextRestored, false);
|
|
34971
|
-
webCanvas.addEventListener("webglcontextcreationerror", this._onContextCreationError, false);
|
|
34972
|
-
this._webCanvas = webCanvas;
|
|
34973
35361
|
var gl;
|
|
34974
35362
|
if (webGLMode == 0 || webGLMode == 1) {
|
|
34975
35363
|
gl = webCanvas.getContext("webgl2", options);
|
|
@@ -34995,7 +35383,16 @@ exports.WebGLMode = void 0;
|
|
|
34995
35383
|
throw new Error("Get GL Context FAILED.");
|
|
34996
35384
|
}
|
|
34997
35385
|
this._gl = gl;
|
|
34998
|
-
this.
|
|
35386
|
+
this._activeTextureID = gl.TEXTURE0;
|
|
35387
|
+
this._renderStates = new GLRenderStates(gl);
|
|
35388
|
+
this._extensions = new GLExtensions(this);
|
|
35389
|
+
this._capability = new GLCapability(this);
|
|
35390
|
+
// Make sure the active texture in gl context is on default, because gl context may be used in other webgl renderer.
|
|
35391
|
+
gl.activeTexture(gl.TEXTURE0);
|
|
35392
|
+
var debugRenderInfo = gl.getExtension("WEBGL_debug_renderer_info");
|
|
35393
|
+
if (debugRenderInfo != null) {
|
|
35394
|
+
this._renderer = gl.getParameter(debugRenderInfo.UNMASKED_RENDERER_WEBGL);
|
|
35395
|
+
}
|
|
34999
35396
|
};
|
|
35000
35397
|
_proto.createPlatformPrimitive = function createPlatformPrimitive(primitive) {
|
|
35001
35398
|
return new GLPrimitive(this, primitive);
|
|
@@ -35012,10 +35409,6 @@ exports.WebGLMode = void 0;
|
|
|
35012
35409
|
_proto.createPlatformRenderTarget = function createPlatformRenderTarget(target) {
|
|
35013
35410
|
return new GLRenderTarget(this, target);
|
|
35014
35411
|
};
|
|
35015
|
-
_proto.createPlatformBuffer = function createPlatformBuffer(type, byteLength, bufferUsage, data) {
|
|
35016
|
-
if (bufferUsage === void 0) bufferUsage = miniprogram$1$1.BufferUsage.Static;
|
|
35017
|
-
return new GLBuffer(this, type, byteLength, bufferUsage, data);
|
|
35018
|
-
};
|
|
35019
35412
|
_proto.requireExtension = function requireExtension(ext) {
|
|
35020
35413
|
return this._extensions.requireExtension(ext);
|
|
35021
35414
|
};
|
|
@@ -35143,57 +35536,8 @@ exports.WebGLMode = void 0;
|
|
|
35143
35536
|
_proto.flush = function flush() {
|
|
35144
35537
|
this._gl.flush();
|
|
35145
35538
|
};
|
|
35146
|
-
_proto.
|
|
35147
|
-
|
|
35148
|
-
extension.loseContext();
|
|
35149
|
-
};
|
|
35150
|
-
_proto.forceRestoreDevice = function forceRestoreDevice() {
|
|
35151
|
-
var extension = this.requireExtension(miniprogram$1$1.GLCapabilityType.WEBGL_lose_context);
|
|
35152
|
-
extension.restoreContext();
|
|
35153
|
-
};
|
|
35154
|
-
_proto.resetState = function resetState() {
|
|
35155
|
-
this._readFrameBuffer = null;
|
|
35156
|
-
this._enableGlobalDepthBias = false;
|
|
35157
|
-
this._currentBindShaderProgram = null;
|
|
35158
|
-
var activeTextures = this._activeTextures;
|
|
35159
|
-
for(var i = 0, n = activeTextures.length; i < n; i++){
|
|
35160
|
-
activeTextures[i] = null;
|
|
35161
|
-
}
|
|
35162
|
-
this._lastViewport.set(null, null, null, null);
|
|
35163
|
-
this._lastScissor.set(null, null, null, null);
|
|
35164
|
-
this._lastClearColor.set(null, null, null, null);
|
|
35165
|
-
this._scissorEnable = false;
|
|
35166
|
-
this._initGLState(this._gl);
|
|
35167
|
-
};
|
|
35168
|
-
_proto._initGLState = function _initGLState(gl) {
|
|
35169
|
-
this._activeTextureID = gl.TEXTURE0;
|
|
35170
|
-
this._renderStates = new GLRenderStates(gl);
|
|
35171
|
-
this._extensions = new GLExtensions(this);
|
|
35172
|
-
this._capability = new GLCapability(this);
|
|
35173
|
-
// Make sure the active texture in gl context is on default, because gl context may be used in other webgl renderer.
|
|
35174
|
-
gl.activeTexture(gl.TEXTURE0);
|
|
35175
|
-
var debugRenderInfo = gl.getExtension("WEBGL_debug_renderer_info");
|
|
35176
|
-
if (debugRenderInfo != null) {
|
|
35177
|
-
this._renderer = gl.getParameter(debugRenderInfo.UNMASKED_RENDERER_WEBGL);
|
|
35178
|
-
}
|
|
35179
|
-
};
|
|
35180
|
-
_proto.destroy = function destroy() {
|
|
35181
|
-
var webCanvas = this._webCanvas;
|
|
35182
|
-
webCanvas.removeEventListener("webglcontextcreationerror", this._onContextCreationError, false);
|
|
35183
|
-
webCanvas.removeEventListener("webglcontextlost", this._onWebGLContextLost, false);
|
|
35184
|
-
webCanvas.removeEventListener("webglcontextrestored", this._onWebGLContextRestored, false);
|
|
35185
|
-
};
|
|
35186
|
-
_proto._onContextCreationError = function _onContextCreationError(event) {
|
|
35187
|
-
console.error("WebGLRenderer: WebGL context could not be created. Reason: ", event.statusMessage);
|
|
35188
|
-
};
|
|
35189
|
-
_proto._onWebGLContextLost = function _onWebGLContextLost(event) {
|
|
35190
|
-
event.preventDefault();
|
|
35191
|
-
this._onDeviceLost();
|
|
35192
|
-
};
|
|
35193
|
-
_proto._onWebGLContextRestored = function _onWebGLContextRestored(event) {
|
|
35194
|
-
this._onDeviceRestored();
|
|
35195
|
-
};
|
|
35196
|
-
_createClass(WebGLGraphicDevice, [
|
|
35539
|
+
_proto.destroy = function destroy() {};
|
|
35540
|
+
_create_class(WebGLRenderer, [
|
|
35197
35541
|
{
|
|
35198
35542
|
key: "isWebGL2",
|
|
35199
35543
|
get: function get() {
|
|
@@ -35234,14 +35578,35 @@ exports.WebGLMode = void 0;
|
|
|
35234
35578
|
}
|
|
35235
35579
|
}
|
|
35236
35580
|
]);
|
|
35237
|
-
return
|
|
35581
|
+
return WebGLRenderer;
|
|
35238
35582
|
}();
|
|
35583
|
+
/**
|
|
35584
|
+
* WebGL platform engine,support includes WebGL1.0 and WebGL2.0.
|
|
35585
|
+
*/ var WebGLEngine = /*#__PURE__*/ function(Engine) {
|
|
35586
|
+
var WebGLEngine = function WebGLEngine(canvas, webGLRendererOptions) {
|
|
35587
|
+
var webCanvas = new WebCanvas(typeof canvas === "string" ? engineMiniprogramAdapter.document.getElementById(canvas) : canvas);
|
|
35588
|
+
var hardwareRenderer = new WebGLRenderer(webGLRendererOptions);
|
|
35589
|
+
return Engine.call(this, webCanvas, hardwareRenderer);
|
|
35590
|
+
};
|
|
35591
|
+
_inherits(WebGLEngine, Engine);
|
|
35592
|
+
_create_class(WebGLEngine, [
|
|
35593
|
+
{
|
|
35594
|
+
key: "canvas",
|
|
35595
|
+
get: /**
|
|
35596
|
+
* Web canvas.
|
|
35597
|
+
*/ function get() {
|
|
35598
|
+
return this._canvas;
|
|
35599
|
+
}
|
|
35600
|
+
}
|
|
35601
|
+
]);
|
|
35602
|
+
return WebGLEngine;
|
|
35603
|
+
}(miniprogram$1$1.Engine);
|
|
35239
35604
|
exports.WebCanvas = WebCanvas;
|
|
35240
35605
|
exports.WebGLEngine = WebGLEngine;
|
|
35241
|
-
exports.
|
|
35606
|
+
exports.WebGLRenderer = WebGLRenderer;
|
|
35242
35607
|
|
|
35243
35608
|
var miniprogram$3 = /*#__PURE__*/Object.freeze({
|
|
35244
|
-
|
|
35609
|
+
__proto__: null
|
|
35245
35610
|
});
|
|
35246
35611
|
|
|
35247
35612
|
var CoreObjects = /*@__PURE__*/getAugmentedNamespace(miniprogram$8);
|
|
@@ -35279,7 +35644,7 @@ function _interopNamespace(e) {
|
|
|
35279
35644
|
}
|
|
35280
35645
|
var CoreObjects__namespace = /*#__PURE__*/ _interopNamespace(CoreObjects);
|
|
35281
35646
|
//@ts-ignore
|
|
35282
|
-
var version = "0.9.
|
|
35647
|
+
var version = "0.9.1";
|
|
35283
35648
|
console.log("Galacean engine version: " + version);
|
|
35284
35649
|
for(var key in CoreObjects__namespace){
|
|
35285
35650
|
CoreObjects.Loader.registerClass(key, CoreObjects__namespace[key]);
|
|
@@ -35382,9 +35747,15 @@ Object.keys(miniprogram$2).forEach(function(k) {
|
|
|
35382
35747
|
};
|
|
35383
35748
|
return PhysXJoint;
|
|
35384
35749
|
}();
|
|
35385
|
-
|
|
35386
|
-
PhysXJoint.
|
|
35387
|
-
|
|
35750
|
+
(function() {
|
|
35751
|
+
PhysXJoint._xAxis = new miniprogram_1.Vector3(1, 0, 0);
|
|
35752
|
+
})();
|
|
35753
|
+
(function() {
|
|
35754
|
+
PhysXJoint._defaultVec = new miniprogram_1.Vector3();
|
|
35755
|
+
})();
|
|
35756
|
+
(function() {
|
|
35757
|
+
PhysXJoint._defaultQuat = new miniprogram_1.Quaternion();
|
|
35758
|
+
})();
|
|
35388
35759
|
|
|
35389
35760
|
/**
|
|
35390
35761
|
* A fixed joint permits no relative movement between two colliders. ie the bodies are glued together.
|
|
@@ -35662,11 +36033,15 @@ var ShapeFlag;
|
|
|
35662
36033
|
};
|
|
35663
36034
|
return PhysXColliderShape;
|
|
35664
36035
|
}();
|
|
35665
|
-
|
|
35666
|
-
PhysXColliderShape.
|
|
35667
|
-
|
|
35668
|
-
|
|
35669
|
-
|
|
36036
|
+
(function() {
|
|
36037
|
+
PhysXColliderShape.halfSqrt = 0.70710678118655;
|
|
36038
|
+
})();
|
|
36039
|
+
(function() {
|
|
36040
|
+
PhysXColliderShape.transform = {
|
|
36041
|
+
translation: new miniprogram_1.Vector3(),
|
|
36042
|
+
rotation: null
|
|
36043
|
+
};
|
|
36044
|
+
})();
|
|
35670
36045
|
|
|
35671
36046
|
/**
|
|
35672
36047
|
* Box collider shape in PhysX.
|
|
@@ -35709,7 +36084,9 @@ PhysXColliderShape.transform = {
|
|
|
35709
36084
|
};
|
|
35710
36085
|
return PhysXBoxColliderShape;
|
|
35711
36086
|
}(PhysXColliderShape);
|
|
35712
|
-
|
|
36087
|
+
(function() {
|
|
36088
|
+
PhysXBoxColliderShape._tempHalfExtents = new miniprogram_1.Vector3();
|
|
36089
|
+
})();
|
|
35713
36090
|
|
|
35714
36091
|
/**
|
|
35715
36092
|
* Capsule collider shape in PhysX.
|
|
@@ -35960,10 +36337,12 @@ var /**
|
|
|
35960
36337
|
};
|
|
35961
36338
|
return PhysXCollider;
|
|
35962
36339
|
}();
|
|
35963
|
-
|
|
35964
|
-
|
|
35965
|
-
|
|
35966
|
-
|
|
36340
|
+
(function() {
|
|
36341
|
+
PhysXCollider._tempTransform = {
|
|
36342
|
+
translation: null,
|
|
36343
|
+
rotation: null
|
|
36344
|
+
};
|
|
36345
|
+
})();
|
|
35967
36346
|
|
|
35968
36347
|
var CollisionDetectionMode;
|
|
35969
36348
|
(function(CollisionDetectionMode) {
|
|
@@ -36120,8 +36499,12 @@ var CollisionDetectionMode;
|
|
|
36120
36499
|
};
|
|
36121
36500
|
return PhysXDynamicCollider;
|
|
36122
36501
|
}(PhysXCollider);
|
|
36123
|
-
|
|
36124
|
-
PhysXDynamicCollider.
|
|
36502
|
+
(function() {
|
|
36503
|
+
PhysXDynamicCollider._tempTranslation = new miniprogram_1.Vector3();
|
|
36504
|
+
})();
|
|
36505
|
+
(function() {
|
|
36506
|
+
PhysXDynamicCollider._tempRotation = new miniprogram_1.Quaternion();
|
|
36507
|
+
})();
|
|
36125
36508
|
|
|
36126
36509
|
/**
|
|
36127
36510
|
* A manager is a collection of colliders and constraints which can interact.
|
|
@@ -36322,8 +36705,12 @@ PhysXDynamicCollider._tempRotation = new miniprogram_1.Quaternion();
|
|
|
36322
36705
|
};
|
|
36323
36706
|
return PhysXPhysicsManager;
|
|
36324
36707
|
}();
|
|
36325
|
-
|
|
36326
|
-
PhysXPhysicsManager.
|
|
36708
|
+
(function() {
|
|
36709
|
+
PhysXPhysicsManager._tempPosition = new miniprogram_1.Vector3();
|
|
36710
|
+
})();
|
|
36711
|
+
(function() {
|
|
36712
|
+
PhysXPhysicsManager._tempNormal = new miniprogram_1.Vector3();
|
|
36713
|
+
})();
|
|
36327
36714
|
var /**
|
|
36328
36715
|
* Filtering flags for scene queries.
|
|
36329
36716
|
*/ QueryFlag;
|