@galacean/engine-core 0.9.19 → 0.9.21
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/main.js +854 -1513
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +854 -1513
- package/dist/module.js +633 -1127
- package/dist/module.js.map +1 -1
- package/package.json +3 -3
- package/types/RenderPipeline/CullingResults.d.ts +1 -0
- package/types/RenderPipeline/DepthOnlyPass.d.ts +1 -0
- package/types/RenderPipeline/PipelinePass.d.ts +16 -0
- package/types/RenderPipeline/PipelineUtils.d.ts +1 -0
- package/types/RenderPipeline/RenderData.d.ts +8 -1
- package/types/RenderPipeline/RenderElementX.d.ts +12 -0
- package/types/RenderPipeline/enums/PipelineStage.d.ts +2 -0
- package/types/Ticker.d.ts +30 -0
- package/types/animation/animationCurve/AnimationRectCurve.d.ts +8 -0
- package/types/animation/animationCurve/AnimationRefCurve.d.ts +8 -0
- package/types/animation/internal/AnimationCurveOwnerLayerData.d.ts +1 -0
- package/types/asset/GraphicsResource.d.ts +4 -0
- package/types/asset/request.d.ts +7 -3
- package/types/enums/DepthTextureMode.d.ts +7 -0
- package/types/graphic/Primitive.d.ts +1 -0
- package/types/graphic/PrimitiveVertexBinding.d.ts +1 -0
- package/types/graphic/SubPrimitive.d.ts +9 -0
- package/types/particle/ParticleBufferUtils.d.ts +1 -0
- package/types/particle/ParticleData.d.ts +1 -0
- package/types/particle/ParticleGenerator.d.ts +72 -0
- package/types/particle/ParticleMaterial.d.ts +28 -0
- package/types/particle/ParticleMesh.d.ts +289 -0
- package/types/particle/ParticleShaderDeclaration.d.ts +1 -0
- package/types/particle/ParticleShaderMacro.d.ts +1 -0
- package/types/particle/ParticleShaderProperty.d.ts +1 -0
- package/types/particle/ParticleSystem.d.ts +41 -0
- package/types/particle/ParticleVertexElements.d.ts +1 -0
- package/types/particle/ParticleVertexUtils.d.ts +1 -0
- package/types/particle/enum/ParticleAnimationRowMode.d.ts +9 -0
- package/types/particle/enum/ParticleAnimationType.d.ts +9 -0
- package/types/particle/enum/ParticleCurveMode.d.ts +13 -0
- package/types/particle/enum/ParticleGradientMode.d.ts +13 -0
- package/types/particle/enum/ParticleRenderMode.d.ts +17 -0
- package/types/particle/enum/ParticleScaleMode.d.ts +11 -0
- package/types/particle/enum/ParticleShapeMultiModeValue.d.ts +9 -0
- package/types/particle/enum/ParticleShapeType.d.ts +15 -0
- package/types/particle/enum/ParticleSimulationSpace.d.ts +9 -0
- package/types/particle/enum/index.d.ts +9 -0
- package/types/particle/enums/ParticleCurveMode.d.ts +9 -0
- package/types/particle/enums/ParticleGradientMode.d.ts +9 -0
- package/types/particle/enums/ParticleRandomSubSeeds.d.ts +1 -0
- package/types/particle/enums/ParticleRenderMode.d.ts +17 -0
- package/types/particle/enums/ParticleScaleMode.d.ts +11 -0
- package/types/particle/enums/ParticleSimulationSpace.d.ts +9 -0
- package/types/particle/enums/ParticleStopMode.d.ts +6 -0
- package/types/particle/enums/attributes/BillboardParticleVertexAttribute.d.ts +1 -0
- package/types/particle/enums/attributes/MeshParticleVertexAttribute.d.ts +5 -0
- package/types/particle/enums/attributes/ParticleInstanceVertexAttribute.d.ts +1 -0
- package/types/particle/module/Burst.d.ts +38 -0
- package/types/particle/module/ColorGradient.d.ts +75 -0
- package/types/particle/module/ColorOverLifetimeModule.d.ts +20 -0
- package/types/particle/module/EmissionModule.d.ts +63 -0
- package/types/particle/module/FrameOverTime.d.ts +73 -0
- package/types/particle/module/ParticleCurve.d.ts +37 -0
- package/types/particle/module/RotationOverLifetimeModule.d.ts +21 -0
- package/types/particle/module/RotationVelocityGradient.d.ts +184 -0
- package/types/particle/module/SizeGradient.d.ts +151 -0
- package/types/particle/module/SizeOverLifetimeModule.d.ts +21 -0
- package/types/particle/module/StartFrame.d.ts +46 -0
- package/types/particle/module/TextureSheetAnimationModule.d.ts +37 -0
- package/types/particle/module/VelocityGradient.d.ts +110 -0
- package/types/particle/module/VelocityOverLifetimeModule.d.ts +22 -0
- package/types/particle/module/index.d.ts +15 -0
- package/types/particle/module/shape/BaseShape.d.ts +26 -0
- package/types/particle/module/shape/BoxShape.d.ts +20 -0
- package/types/particle/module/shape/CircleShape.d.ts +27 -0
- package/types/particle/module/shape/ConeShape.d.ts +35 -0
- package/types/particle/module/shape/HemisphereShape.d.ts +23 -0
- package/types/particle/module/shape/ShapeUtils.d.ts +1 -0
- package/types/particle/module/shape/SphereShape.d.ts +23 -0
- package/types/particle/module/shape/index.d.ts +5 -0
- package/types/particle/modules/Burst.d.ts +14 -0
- package/types/particle/modules/ColorOverLifetimeModule.d.ts +20 -0
- package/types/particle/modules/EmissionModule.d.ts +45 -0
- package/types/particle/modules/MainModule.d.ts +70 -0
- package/types/particle/modules/ParticleCompositeCurve.d.ts +56 -0
- package/types/particle/modules/ParticleCompositeGradient.d.ts +55 -0
- package/types/particle/modules/ParticleCurve.d.ts +56 -0
- package/types/particle/modules/ParticleGeneratorModule.d.ts +12 -0
- package/types/particle/modules/ParticleGradient.d.ts +94 -0
- package/types/particle/modules/RotationOverLifetimeModule.d.ts +34 -0
- package/types/particle/modules/ShapeModule.d.ts +9 -0
- package/types/particle/modules/SizeOverLifetimeModule.d.ts +34 -0
- package/types/particle/modules/TextureSheetAnimationModule.d.ts +38 -0
- package/types/particle/modules/VelocityOverLifetimeModule.d.ts +34 -0
- package/types/particle/modules/shape/BaseShape.d.ts +12 -0
- package/types/particle/modules/shape/BoxShape.d.ts +11 -0
- package/types/particle/modules/shape/CircleShape.d.ts +17 -0
- package/types/particle/modules/shape/ConeShape.d.ts +28 -0
- package/types/particle/modules/shape/HemisphereShape.d.ts +9 -0
- package/types/particle/modules/shape/ShapeUtils.d.ts +1 -0
- package/types/particle/modules/shape/SphereShape.d.ts +9 -0
- package/types/particle/modules/shape/enums/ParticleShapeArcMode.d.ts +9 -0
- package/types/particle/modules/shape/enums/ParticleShapeMultiModeValue.d.ts +9 -0
- package/types/particle/modules/shape/enums/ParticleShapeType.d.ts +15 -0
- package/types/particle/modules/shape/index.d.ts +6 -0
- package/types/particle/moudules/Burst.d.ts +25 -0
- package/types/particle/moudules/Emission.d.ts +47 -0
- package/types/particle/moudules/EmissionModule.d.ts +49 -0
- package/types/particle/moudules/MainModule.d.ts +59 -0
- package/types/particle/moudules/ParticleCurve.d.ts +27 -0
- package/types/particle/moudules/ParticleGradient.d.ts +28 -0
- package/types/particle/moudules/ShapeModule.d.ts +7 -0
- package/types/particle/moudules/shape/BaseShape.d.ts +28 -0
- package/types/particle/moudules/shape/BoxShape.d.ts +20 -0
- package/types/particle/moudules/shape/CircleShape.d.ts +27 -0
- package/types/particle/moudules/shape/ConeShape.d.ts +35 -0
- package/types/particle/moudules/shape/HemisphereShape.d.ts +23 -0
- package/types/particle/moudules/shape/ShapeUtils.d.ts +1 -0
- package/types/particle/moudules/shape/SphereShape.d.ts +23 -0
- package/types/particle/moudules/shape/enums/ParticleShapeMultiModeValue.d.ts +9 -0
- package/types/particle/moudules/shape/enums/ParticleShapeType.d.ts +15 -0
- package/types/particle/moudules/shape/index.d.ts +5 -0
- package/types/physics/PhysicsScene.d.ts +6 -2
- package/types/renderingHardwareInterface/IPlatformBuffer.d.ts +0 -1
- package/types/shader/ShaderPart.d.ts +5 -0
- package/types/shader/SubShader.d.ts +0 -1
- package/types/shader/enums/RenderStateElementKey.d.ts +60 -0
- package/types/shaderlib/particle/index.d.ts +14 -0
- package/types/shadow/PipelinePass.d.ts +16 -0
- package/types/utils/BoolUpdateFlag.d.ts +12 -0
- package/types/utils/DisorderedArray.d.ts +18 -0
- package/types/utils/UpdateFlag.d.ts +20 -0
- package/types/utils/UpdateFlagManager.d.ts +1 -0
- package/types/utils/Utils.d.ts +31 -0
- package/types/xr/XRManager.d.ts +31 -0
- package/types/xr/component/XRPoseDriver.d.ts +10 -0
- package/types/xr/data/XRCamera.d.ts +6 -0
- package/types/xr/data/XRDevice.d.ts +9 -0
- package/types/xr/data/XRHandle.d.ts +10 -0
- package/types/xr/enum/EnumXRButton.d.ts +5 -0
- package/types/xr/enum/EnumXRDevicePhase.d.ts +4 -0
- package/types/xr/enum/EnumXRFeature.d.ts +9 -0
- package/types/xr/enum/EnumXRInputSource.d.ts +8 -0
- package/types/xr/enum/EnumXRMode.d.ts +7 -0
- package/types/xr/enum/EnumXRSubsystem.d.ts +4 -0
- package/types/xr/enum/EnumXRTrackingMode.d.ts +7 -0
- package/types/xr/feature/XRCameraManager.d.ts +21 -0
- package/types/xr/feature/XRFeature.d.ts +29 -0
- package/types/xr/feature/XRImageTrackManager.d.ts +10 -0
- package/types/xr/feature/XRInputManager.d.ts +16 -0
- package/types/xr/index.d.ts +18 -0
- package/types/xr/provider/XRProvider.d.ts +19 -0
- package/types/xr/subsystem/XRInputSubsystem.d.ts +5 -0
- package/types/xr/subsystem/XRSubsystem.d.ts +30 -0
package/dist/main.js
CHANGED
|
@@ -2,11 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var _assert_this_initialized = require('@swc/helpers/src/_assert_this_initialized.mjs');
|
|
6
|
+
var _create_class = require('@swc/helpers/src/_create_class.mjs');
|
|
7
|
+
var _inherits = require('@swc/helpers/src/_inherits.mjs');
|
|
8
|
+
var _ts_decorate = require('@swc/helpers/src/_ts_decorate.mjs');
|
|
9
|
+
var _instanceof = require('@swc/helpers/src/_instanceof.mjs');
|
|
5
10
|
var engineMath = require('@galacean/engine-math');
|
|
11
|
+
var _extends = require('@swc/helpers/src/_extends.mjs');
|
|
12
|
+
|
|
13
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
14
|
+
|
|
15
|
+
var _assert_this_initialized__default = /*#__PURE__*/_interopDefaultLegacy(_assert_this_initialized);
|
|
16
|
+
var _create_class__default = /*#__PURE__*/_interopDefaultLegacy(_create_class);
|
|
17
|
+
var _inherits__default = /*#__PURE__*/_interopDefaultLegacy(_inherits);
|
|
18
|
+
var _ts_decorate__default = /*#__PURE__*/_interopDefaultLegacy(_ts_decorate);
|
|
19
|
+
var _instanceof__default = /*#__PURE__*/_interopDefaultLegacy(_instanceof);
|
|
20
|
+
var _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends);
|
|
6
21
|
|
|
7
|
-
/**
|
|
8
|
-
* The platform (including operating system and hardware) is running on.
|
|
9
|
-
*/ exports.Platform = void 0;
|
|
10
22
|
(function(Platform) {
|
|
11
23
|
Platform[Platform[/** Android platform. */ "Android"] = 0] = "Android";
|
|
12
24
|
Platform[Platform[/** IPhone platform. */ "IPhone"] = 1] = "IPhone";
|
|
@@ -15,50 +27,6 @@ var engineMath = require('@galacean/engine-math');
|
|
|
15
27
|
Platform[Platform[/** Unknown platform. */ "Unknown"] = 4] = "Unknown";
|
|
16
28
|
})(exports.Platform || (exports.Platform = {}));
|
|
17
29
|
|
|
18
|
-
function _assert_this_initialized(self) {
|
|
19
|
-
if (self === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
20
|
-
|
|
21
|
-
return self;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
function _defineProperties(target, props) {
|
|
25
|
-
for (var i = 0; i < props.length; i++) {
|
|
26
|
-
var descriptor = props[i];
|
|
27
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
28
|
-
descriptor.configurable = true;
|
|
29
|
-
|
|
30
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
31
|
-
|
|
32
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
function _create_class(Constructor, protoProps, staticProps) {
|
|
36
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
37
|
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
38
|
-
|
|
39
|
-
return Constructor;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
function _set_prototype_of(o, p) {
|
|
43
|
-
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
44
|
-
o.__proto__ = p;
|
|
45
|
-
|
|
46
|
-
return o;
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
return _set_prototype_of(o, p);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
function _inherits(subClass, superClass) {
|
|
53
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
54
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } });
|
|
58
|
-
|
|
59
|
-
if (superClass) _set_prototype_of(subClass, superClass);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
30
|
/**
|
|
63
31
|
* Common utility methods for math operations.
|
|
64
32
|
*/ var MathUtil = /*#__PURE__*/ function() {
|
|
@@ -104,15 +72,9 @@ function _inherits(subClass, superClass) {
|
|
|
104
72
|
};
|
|
105
73
|
return MathUtil;
|
|
106
74
|
}();
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
(function() {
|
|
111
|
-
/** The conversion factor that radian to degree. */ MathUtil.radToDegreeFactor = 180 / Math.PI;
|
|
112
|
-
})();
|
|
113
|
-
(function() {
|
|
114
|
-
/** The conversion factor that degree to radian. */ MathUtil.degreeToRadFactor = Math.PI / 180;
|
|
115
|
-
})();
|
|
75
|
+
/** The value for which all absolute numbers smaller than are considered equal to zero. */ MathUtil.zeroTolerance = 1e-6;
|
|
76
|
+
/** The conversion factor that radian to degree. */ MathUtil.radToDegreeFactor = 180 / Math.PI;
|
|
77
|
+
/** The conversion factor that degree to radian. */ MathUtil.degreeToRadFactor = Math.PI / 180;
|
|
116
78
|
|
|
117
79
|
/**
|
|
118
80
|
* Describes a color in the from of RGBA (in order: R, G, B, A).
|
|
@@ -322,7 +284,7 @@ function _inherits(subClass, superClass) {
|
|
|
322
284
|
out._onValueChanged && out._onValueChanged();
|
|
323
285
|
return out;
|
|
324
286
|
};
|
|
325
|
-
|
|
287
|
+
_create_class__default['default'](Color, [
|
|
326
288
|
{
|
|
327
289
|
key: "r",
|
|
328
290
|
get: /**
|
|
@@ -375,34 +337,6 @@ function _inherits(subClass, superClass) {
|
|
|
375
337
|
return Color;
|
|
376
338
|
}();
|
|
377
339
|
|
|
378
|
-
/******************************************************************************
|
|
379
|
-
Copyright (c) Microsoft Corporation.
|
|
380
|
-
|
|
381
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
382
|
-
purpose with or without fee is hereby granted.
|
|
383
|
-
|
|
384
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
385
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
386
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
387
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
388
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
389
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
390
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
391
|
-
***************************************************************************** */
|
|
392
|
-
|
|
393
|
-
function __decorate(decorators, target, key, desc) {
|
|
394
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
395
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
396
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
397
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
function _instanceof(left, right) {
|
|
401
|
-
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
402
|
-
return !!right[Symbol.hasInstance](left);
|
|
403
|
-
} else return left instanceof right;
|
|
404
|
-
}
|
|
405
|
-
|
|
406
340
|
/**
|
|
407
341
|
* Clone mode.
|
|
408
342
|
*/ var CloneMode;
|
|
@@ -525,7 +459,7 @@ function _instanceof(left, right) {
|
|
|
525
459
|
};
|
|
526
460
|
CloneManager._deepCloneObjectItem = function _deepCloneObjectItem(source, target, k) {
|
|
527
461
|
var sourceItem = source[k];
|
|
528
|
-
if (
|
|
462
|
+
if (_instanceof__default['default'](sourceItem, Object)) {
|
|
529
463
|
var itemType = sourceItem.constructor;
|
|
530
464
|
switch(itemType){
|
|
531
465
|
case Uint8Array:
|
|
@@ -581,22 +515,16 @@ function _instanceof(left, right) {
|
|
|
581
515
|
};
|
|
582
516
|
return CloneManager;
|
|
583
517
|
}();
|
|
584
|
-
(
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
(function() {
|
|
588
|
-
/** @internal */ CloneManager._cloneModeMap = new Map();
|
|
589
|
-
})();
|
|
590
|
-
(function() {
|
|
591
|
-
CloneManager._objectType = Object.getPrototypeOf(Object);
|
|
592
|
-
})();
|
|
518
|
+
/** @internal */ CloneManager._subCloneModeMap = new Map();
|
|
519
|
+
/** @internal */ CloneManager._cloneModeMap = new Map();
|
|
520
|
+
CloneManager._objectType = Object.getPrototypeOf(Object);
|
|
593
521
|
|
|
594
522
|
/**
|
|
595
523
|
* EngineObject.
|
|
596
524
|
*/ var EngineObject = /*#__PURE__*/ function() {
|
|
597
525
|
function EngineObject(engine) {
|
|
598
|
-
/** Engine unique id. */ this.instanceId = ++EngineObject._instanceIdCounter;
|
|
599
526
|
this._destroyed = false;
|
|
527
|
+
/** Engine unique id. */ this.instanceId = ++EngineObject._instanceIdCounter;
|
|
600
528
|
this._engine = engine;
|
|
601
529
|
}
|
|
602
530
|
var _proto = EngineObject.prototype;
|
|
@@ -608,7 +536,7 @@ function _instanceof(left, right) {
|
|
|
608
536
|
(_this__engine_resourceManager = this._engine.resourceManager) == null ? void 0 : _this__engine_resourceManager._deleteAsset(this);
|
|
609
537
|
this._destroyed = true;
|
|
610
538
|
};
|
|
611
|
-
|
|
539
|
+
_create_class__default['default'](EngineObject, [
|
|
612
540
|
{
|
|
613
541
|
key: "engine",
|
|
614
542
|
get: /**
|
|
@@ -628,26 +556,24 @@ function _instanceof(left, right) {
|
|
|
628
556
|
]);
|
|
629
557
|
return EngineObject;
|
|
630
558
|
}();
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
})();
|
|
634
|
-
__decorate([
|
|
559
|
+
EngineObject._instanceIdCounter = 0;
|
|
560
|
+
_ts_decorate__default['default']([
|
|
635
561
|
ignoreClone
|
|
636
562
|
], EngineObject.prototype, "instanceId", void 0);
|
|
637
|
-
|
|
563
|
+
_ts_decorate__default['default']([
|
|
638
564
|
ignoreClone
|
|
639
565
|
], EngineObject.prototype, "_engine", void 0);
|
|
640
566
|
|
|
641
567
|
/**
|
|
642
568
|
* The base class of assets, with reference counting capability.
|
|
643
569
|
*/ var RefObject = /*#__PURE__*/ function(EngineObject) {
|
|
644
|
-
|
|
570
|
+
_inherits__default['default'](RefObject, EngineObject);
|
|
645
571
|
function RefObject(engine) {
|
|
646
572
|
var _this;
|
|
647
573
|
_this = EngineObject.call(this, engine) || this;
|
|
648
574
|
/** Whether to ignore the garbage collection check, if it is true, it will not be affected by ResourceManager.gc(). */ _this.isGCIgnored = false;
|
|
649
575
|
_this._refCount = 0;
|
|
650
|
-
engine.resourceManager._addRefObject(_this.instanceId,
|
|
576
|
+
engine.resourceManager._addRefObject(_this.instanceId, _assert_this_initialized__default['default'](_this));
|
|
651
577
|
return _this;
|
|
652
578
|
}
|
|
653
579
|
var _proto = RefObject.prototype;
|
|
@@ -689,7 +615,7 @@ __decorate([
|
|
|
689
615
|
*/ _proto._addToResourceManager = function _addToResourceManager(path) {
|
|
690
616
|
this._engine.resourceManager._addAsset(path, this);
|
|
691
617
|
};
|
|
692
|
-
|
|
618
|
+
_create_class__default['default'](RefObject, [
|
|
693
619
|
{
|
|
694
620
|
key: "refCount",
|
|
695
621
|
get: /**
|
|
@@ -702,9 +628,6 @@ __decorate([
|
|
|
702
628
|
return RefObject;
|
|
703
629
|
}(EngineObject);
|
|
704
630
|
|
|
705
|
-
/**
|
|
706
|
-
* Render buffer depth format enumeration.
|
|
707
|
-
*/ exports.RenderBufferDepthFormat = void 0;
|
|
708
631
|
(function(RenderBufferDepthFormat) {
|
|
709
632
|
RenderBufferDepthFormat[RenderBufferDepthFormat[/** Render to depth buffer,engine will automatically select the supported precision. */ "Depth"] = 0] = "Depth";
|
|
710
633
|
RenderBufferDepthFormat[RenderBufferDepthFormat[/** Render to depth stencil buffer, engine will automatically select the supported precision. */ "DepthStencil"] = 1] = "DepthStencil";
|
|
@@ -716,9 +639,6 @@ __decorate([
|
|
|
716
639
|
RenderBufferDepthFormat[RenderBufferDepthFormat[/** Force 32-bit depth + 8-bit stencil buffer. */ "Depth32Stencil8"] = 7] = "Depth32Stencil8";
|
|
717
640
|
})(exports.RenderBufferDepthFormat || (exports.RenderBufferDepthFormat = {}));
|
|
718
641
|
|
|
719
|
-
/**
|
|
720
|
-
* Define the face of the cube texture.
|
|
721
|
-
*/ exports.TextureCubeFace = void 0;
|
|
722
642
|
(function(TextureCubeFace) {
|
|
723
643
|
TextureCubeFace[TextureCubeFace[/** Positive X face for a cube-mapped texture. */ "PositiveX"] = 0] = "PositiveX";
|
|
724
644
|
TextureCubeFace[TextureCubeFace[/** Negative X face for a cube-mapped texture. */ "NegativeX"] = 1] = "NegativeX";
|
|
@@ -728,9 +648,6 @@ __decorate([
|
|
|
728
648
|
TextureCubeFace[TextureCubeFace[/** Negative Z face for a cube-mapped texture. */ "NegativeZ"] = 5] = "NegativeZ";
|
|
729
649
|
})(exports.TextureCubeFace || (exports.TextureCubeFace = {}));
|
|
730
650
|
|
|
731
|
-
/**
|
|
732
|
-
* Define the compare mode of depth texture.
|
|
733
|
-
*/ exports.TextureDepthCompareFunction = void 0;
|
|
734
651
|
(function(TextureDepthCompareFunction) {
|
|
735
652
|
TextureDepthCompareFunction[TextureDepthCompareFunction[/** never pass. */ "Never"] = 0] = "Never";
|
|
736
653
|
TextureDepthCompareFunction[TextureDepthCompareFunction[/** pass if the compare value is less than the sample value. */ "Less"] = 1] = "Less";
|
|
@@ -742,18 +659,12 @@ __decorate([
|
|
|
742
659
|
TextureDepthCompareFunction[TextureDepthCompareFunction[/** always pass. */ "Always"] = 7] = "Always";
|
|
743
660
|
})(exports.TextureDepthCompareFunction || (exports.TextureDepthCompareFunction = {}));
|
|
744
661
|
|
|
745
|
-
/**
|
|
746
|
-
* The filter mode of the texture.
|
|
747
|
-
*/ exports.TextureFilterMode = void 0;
|
|
748
662
|
(function(TextureFilterMode) {
|
|
749
663
|
TextureFilterMode[TextureFilterMode[/** Point filtering. */ "Point"] = 0] = "Point";
|
|
750
664
|
TextureFilterMode[TextureFilterMode[/** Bilinear filtering. */ "Bilinear"] = 1] = "Bilinear";
|
|
751
665
|
TextureFilterMode[TextureFilterMode[/** Trilinear filtering. */ "Trilinear"] = 2] = "Trilinear";
|
|
752
666
|
})(exports.TextureFilterMode || (exports.TextureFilterMode = {}));
|
|
753
667
|
|
|
754
|
-
/**
|
|
755
|
-
* Texture format enumeration.
|
|
756
|
-
*/ exports.TextureFormat = void 0;
|
|
757
668
|
(function(TextureFormat) {
|
|
758
669
|
TextureFormat[TextureFormat[/** RGB format,8 bits per channel. */ "R8G8B8"] = 0] = "R8G8B8";
|
|
759
670
|
TextureFormat[TextureFormat[/** RGBA format,8 bits per channel. */ "R8G8B8A8"] = 1] = "R8G8B8A8";
|
|
@@ -789,9 +700,6 @@ __decorate([
|
|
|
789
700
|
TextureFormat[TextureFormat[/** 32-bit depth + 8-bit stencil format. */ "Depth32Stencil8"] = 31] = "Depth32Stencil8";
|
|
790
701
|
})(exports.TextureFormat || (exports.TextureFormat = {}));
|
|
791
702
|
|
|
792
|
-
/**
|
|
793
|
-
* Wrapping mode of the texture.
|
|
794
|
-
*/ exports.TextureWrapMode = void 0;
|
|
795
703
|
(function(TextureWrapMode) {
|
|
796
704
|
TextureWrapMode[TextureWrapMode[/** Clamping mode. use the color of edge pixels beyond the texture boundary. */ "Clamp"] = 0] = "Clamp";
|
|
797
705
|
TextureWrapMode[TextureWrapMode[/** Repeating mode. tiling will be repeated if it exceeds the texture boundary. */ "Repeat"] = 1] = "Repeat";
|
|
@@ -815,7 +723,7 @@ __decorate([
|
|
|
815
723
|
_proto.stopPropagation = function stopPropagation() {
|
|
816
724
|
this._propagationStopped = true;
|
|
817
725
|
};
|
|
818
|
-
|
|
726
|
+
_create_class__default['default'](Event, [
|
|
819
727
|
{
|
|
820
728
|
key: "propagationStopped",
|
|
821
729
|
get: function get() {
|
|
@@ -1091,7 +999,7 @@ var Time = /*#__PURE__*/ function() {
|
|
|
1091
999
|
this._lastTickTime = now;
|
|
1092
1000
|
this._frameCount++;
|
|
1093
1001
|
};
|
|
1094
|
-
|
|
1002
|
+
_create_class__default['default'](Time, [
|
|
1095
1003
|
{
|
|
1096
1004
|
key: "frameCount",
|
|
1097
1005
|
get: /*
|
|
@@ -1214,9 +1122,6 @@ function ObjectValues(obj) {
|
|
|
1214
1122
|
});
|
|
1215
1123
|
}
|
|
1216
1124
|
|
|
1217
|
-
/**
|
|
1218
|
-
* Data type enumeration
|
|
1219
|
-
*/ exports.DataType = void 0;
|
|
1220
1125
|
(function(DataType) {
|
|
1221
1126
|
DataType[DataType[/** Float */ "FLOAT"] = 5126] = "FLOAT";
|
|
1222
1127
|
DataType[DataType[/** Floating-point two-dimensional vector */ "FLOAT_VEC2"] = 35664] = "FLOAT_VEC2";
|
|
@@ -1255,7 +1160,6 @@ function ObjectValues(obj) {
|
|
|
1255
1160
|
DataType[DataType[/** Unsigned int */ "UNSIGNED_INT"] = 5125 // gl.UNSIGNED_INT
|
|
1256
1161
|
] = "UNSIGNED_INT";
|
|
1257
1162
|
})(exports.DataType || (exports.DataType = {}));
|
|
1258
|
-
exports.GLCapabilityType = void 0;
|
|
1259
1163
|
(function(GLCapabilityType) {
|
|
1260
1164
|
GLCapabilityType["shaderVertexID"] = "shaderVertexID";
|
|
1261
1165
|
GLCapabilityType["standardDerivatives"] = "OES_standard_derivatives";
|
|
@@ -1290,7 +1194,7 @@ exports.GLCapabilityType = void 0;
|
|
|
1290
1194
|
/**
|
|
1291
1195
|
* The base class of texture, contains some common functions of texture-related classes.
|
|
1292
1196
|
*/ var Texture = /*#__PURE__*/ function(RefObject) {
|
|
1293
|
-
|
|
1197
|
+
_inherits__default['default'](Texture, RefObject);
|
|
1294
1198
|
function Texture() {
|
|
1295
1199
|
var _this;
|
|
1296
1200
|
_this = RefObject.apply(this, arguments) || this;
|
|
@@ -1329,7 +1233,7 @@ exports.GLCapabilityType = void 0;
|
|
|
1329
1233
|
_proto._getMipmapCount = function _getMipmapCount() {
|
|
1330
1234
|
return this._mipmap ? Math.floor(Math.log2(Math.max(this._width, this._height))) + 1 : 1;
|
|
1331
1235
|
};
|
|
1332
|
-
|
|
1236
|
+
_create_class__default['default'](Texture, [
|
|
1333
1237
|
{
|
|
1334
1238
|
key: "format",
|
|
1335
1239
|
get: /**
|
|
@@ -1449,7 +1353,7 @@ exports.GLCapabilityType = void 0;
|
|
|
1449
1353
|
/**
|
|
1450
1354
|
* The render target used for off-screen rendering.
|
|
1451
1355
|
*/ var RenderTarget = /*#__PURE__*/ function(EngineObject) {
|
|
1452
|
-
|
|
1356
|
+
_inherits__default['default'](RenderTarget, EngineObject);
|
|
1453
1357
|
function RenderTarget(engine, width, height, renderTexture, depth, antiAliasing) {
|
|
1454
1358
|
if (depth === void 0) depth = exports.RenderBufferDepthFormat.Depth;
|
|
1455
1359
|
if (antiAliasing === void 0) antiAliasing = 1;
|
|
@@ -1461,7 +1365,7 @@ exports.GLCapabilityType = void 0;
|
|
|
1461
1365
|
_this._antiAliasing = antiAliasing;
|
|
1462
1366
|
_this._depth = depth;
|
|
1463
1367
|
if (renderTexture) {
|
|
1464
|
-
var colorTextures =
|
|
1368
|
+
var colorTextures = _instanceof__default['default'](renderTexture, Array) ? renderTexture.slice() : [
|
|
1465
1369
|
renderTexture
|
|
1466
1370
|
];
|
|
1467
1371
|
for(var i = 0, n = colorTextures.length; i < n; i++){
|
|
@@ -1475,14 +1379,14 @@ exports.GLCapabilityType = void 0;
|
|
|
1475
1379
|
} else {
|
|
1476
1380
|
_this._colorTextures = [];
|
|
1477
1381
|
}
|
|
1478
|
-
if (
|
|
1382
|
+
if (_instanceof__default['default'](depth, Texture)) {
|
|
1479
1383
|
if (!depth._isDepthTexture) {
|
|
1480
1384
|
throw "Depth texture must use depth format.";
|
|
1481
1385
|
}
|
|
1482
1386
|
_this._depthTexture = depth;
|
|
1483
1387
|
_this._depthTexture._addRefCount(1);
|
|
1484
1388
|
}
|
|
1485
|
-
_this._platformRenderTarget = engine._hardwareRenderer.createPlatformRenderTarget(
|
|
1389
|
+
_this._platformRenderTarget = engine._hardwareRenderer.createPlatformRenderTarget(_assert_this_initialized__default['default'](_this));
|
|
1486
1390
|
return _this;
|
|
1487
1391
|
}
|
|
1488
1392
|
var _proto = RenderTarget.prototype;
|
|
@@ -1530,7 +1434,7 @@ exports.GLCapabilityType = void 0;
|
|
|
1530
1434
|
*/ _proto._blitRenderTarget = function _blitRenderTarget() {
|
|
1531
1435
|
this._platformRenderTarget.blitRenderTarget();
|
|
1532
1436
|
};
|
|
1533
|
-
|
|
1437
|
+
_create_class__default['default'](RenderTarget, [
|
|
1534
1438
|
{
|
|
1535
1439
|
key: "autoGenerateMipmaps",
|
|
1536
1440
|
get: /**
|
|
@@ -1590,7 +1494,7 @@ exports.GLCapabilityType = void 0;
|
|
|
1590
1494
|
/**
|
|
1591
1495
|
* Two-dimensional texture.
|
|
1592
1496
|
*/ var Texture2D = /*#__PURE__*/ function(Texture) {
|
|
1593
|
-
|
|
1497
|
+
_inherits__default['default'](Texture2D, Texture);
|
|
1594
1498
|
function Texture2D(engine, width, height, format, mipmap) {
|
|
1595
1499
|
if (format === void 0) format = exports.TextureFormat.R8G8B8A8;
|
|
1596
1500
|
if (mipmap === void 0) mipmap = true;
|
|
@@ -1602,7 +1506,7 @@ exports.GLCapabilityType = void 0;
|
|
|
1602
1506
|
_this._format = format;
|
|
1603
1507
|
_this._mipmapCount = _this._getMipmapCount();
|
|
1604
1508
|
_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;
|
|
1605
|
-
_this._platformTexture = engine._hardwareRenderer.createPlatformTexture2D(
|
|
1509
|
+
_this._platformTexture = engine._hardwareRenderer.createPlatformTexture2D(_assert_this_initialized__default['default'](_this));
|
|
1606
1510
|
_this.filterMode = exports.TextureFilterMode.Bilinear;
|
|
1607
1511
|
_this.wrapModeU = _this.wrapModeV = exports.TextureWrapMode.Repeat;
|
|
1608
1512
|
return _this;
|
|
@@ -1657,7 +1561,7 @@ exports.GLCapabilityType = void 0;
|
|
|
1657
1561
|
/**
|
|
1658
1562
|
* Two-dimensional texture array.
|
|
1659
1563
|
*/ var Texture2DArray = /*#__PURE__*/ function(Texture) {
|
|
1660
|
-
|
|
1564
|
+
_inherits__default['default'](Texture2DArray, Texture);
|
|
1661
1565
|
function Texture2DArray(engine, width, height, length, format, mipmap) {
|
|
1662
1566
|
if (format === void 0) format = exports.TextureFormat.R8G8B8A8;
|
|
1663
1567
|
if (mipmap === void 0) mipmap = true;
|
|
@@ -1669,7 +1573,7 @@ exports.GLCapabilityType = void 0;
|
|
|
1669
1573
|
_this._length = length;
|
|
1670
1574
|
_this._format = format;
|
|
1671
1575
|
_this._mipmapCount = _this._getMipmapCount();
|
|
1672
|
-
_this._platformTexture = engine._hardwareRenderer.createPlatformTexture2DArray(
|
|
1576
|
+
_this._platformTexture = engine._hardwareRenderer.createPlatformTexture2DArray(_assert_this_initialized__default['default'](_this));
|
|
1673
1577
|
_this.filterMode = exports.TextureFilterMode.Bilinear;
|
|
1674
1578
|
_this.wrapModeU = _this.wrapModeV = exports.TextureWrapMode.Repeat;
|
|
1675
1579
|
return _this;
|
|
@@ -1721,7 +1625,7 @@ exports.GLCapabilityType = void 0;
|
|
|
1721
1625
|
this._platformTexture.getPixelBuffer(elementIndex, xOrMipLevelOrOut, yOrMipLevel, width, height, mipLevelOrOut, out);
|
|
1722
1626
|
}
|
|
1723
1627
|
};
|
|
1724
|
-
|
|
1628
|
+
_create_class__default['default'](Texture2DArray, [
|
|
1725
1629
|
{
|
|
1726
1630
|
key: "length",
|
|
1727
1631
|
get: /**
|
|
@@ -1737,7 +1641,7 @@ exports.GLCapabilityType = void 0;
|
|
|
1737
1641
|
/**
|
|
1738
1642
|
* Cube texture.
|
|
1739
1643
|
*/ var TextureCube = /*#__PURE__*/ function(Texture) {
|
|
1740
|
-
|
|
1644
|
+
_inherits__default['default'](TextureCube, Texture);
|
|
1741
1645
|
function TextureCube(engine, size, format, mipmap) {
|
|
1742
1646
|
if (format === void 0) format = exports.TextureFormat.R8G8B8A8;
|
|
1743
1647
|
if (mipmap === void 0) mipmap = true;
|
|
@@ -1748,7 +1652,7 @@ exports.GLCapabilityType = void 0;
|
|
|
1748
1652
|
_this._height = size;
|
|
1749
1653
|
_this._format = format;
|
|
1750
1654
|
_this._mipmapCount = _this._getMipmapCount();
|
|
1751
|
-
_this._platformTexture = engine._hardwareRenderer.createPlatformTextureCube(
|
|
1655
|
+
_this._platformTexture = engine._hardwareRenderer.createPlatformTextureCube(_assert_this_initialized__default['default'](_this));
|
|
1752
1656
|
_this.filterMode = exports.TextureFilterMode.Bilinear;
|
|
1753
1657
|
_this.wrapModeU = _this.wrapModeV = exports.TextureWrapMode.Clamp;
|
|
1754
1658
|
return _this;
|
|
@@ -1806,7 +1710,7 @@ exports.GLCapabilityType = void 0;
|
|
|
1806
1710
|
* @internal
|
|
1807
1711
|
* Font Atlas.
|
|
1808
1712
|
*/ var FontAtlas = /*#__PURE__*/ function(RefObject) {
|
|
1809
|
-
|
|
1713
|
+
_inherits__default['default'](FontAtlas, RefObject);
|
|
1810
1714
|
function FontAtlas(engine) {
|
|
1811
1715
|
var _this;
|
|
1812
1716
|
_this = RefObject.call(this, engine) || this;
|
|
@@ -1875,7 +1779,7 @@ exports.GLCapabilityType = void 0;
|
|
|
1875
1779
|
_proto.getCharInfo = function getCharInfo(char) {
|
|
1876
1780
|
return this._charInfoMap[char.charCodeAt(0)];
|
|
1877
1781
|
};
|
|
1878
|
-
|
|
1782
|
+
_create_class__default['default'](FontAtlas, [
|
|
1879
1783
|
{
|
|
1880
1784
|
key: "texture",
|
|
1881
1785
|
get: function get() {
|
|
@@ -1972,7 +1876,7 @@ exports.GLCapabilityType = void 0;
|
|
|
1972
1876
|
/**
|
|
1973
1877
|
* Font.
|
|
1974
1878
|
*/ var Font = /*#__PURE__*/ function(RefObject) {
|
|
1975
|
-
|
|
1879
|
+
_inherits__default['default'](Font, RefObject);
|
|
1976
1880
|
function Font(engine, name) {
|
|
1977
1881
|
if (name === void 0) name = "";
|
|
1978
1882
|
var _this;
|
|
@@ -2024,7 +1928,7 @@ exports.GLCapabilityType = void 0;
|
|
|
2024
1928
|
}
|
|
2025
1929
|
return null;
|
|
2026
1930
|
};
|
|
2027
|
-
|
|
1931
|
+
_create_class__default['default'](Font, [
|
|
2028
1932
|
{
|
|
2029
1933
|
key: "name",
|
|
2030
1934
|
get: /**
|
|
@@ -2036,10 +1940,9 @@ exports.GLCapabilityType = void 0;
|
|
|
2036
1940
|
]);
|
|
2037
1941
|
return Font;
|
|
2038
1942
|
}(RefObject);
|
|
2039
|
-
|
|
2040
|
-
Font._fontMap = {};
|
|
2041
|
-
})();
|
|
1943
|
+
Font._fontMap = {};
|
|
2042
1944
|
|
|
1945
|
+
var _Symbol_toStringTag = Symbol.toStringTag;
|
|
2043
1946
|
var AssetPromise = /*#__PURE__*/ function() {
|
|
2044
1947
|
function AssetPromise(executor) {
|
|
2045
1948
|
var _this = this;
|
|
@@ -2137,7 +2040,7 @@ var AssetPromise = /*#__PURE__*/ function() {
|
|
|
2137
2040
|
}
|
|
2138
2041
|
};
|
|
2139
2042
|
var onProgress = function onProgress(promise, index) {
|
|
2140
|
-
if (
|
|
2043
|
+
if (_instanceof__default['default'](promise, Promise) || _instanceof__default['default'](promise, AssetPromise)) {
|
|
2141
2044
|
promise.then(function(value) {
|
|
2142
2045
|
onComplete(index, value);
|
|
2143
2046
|
}, reject);
|
|
@@ -2158,9 +2061,9 @@ var AssetPromise = /*#__PURE__*/ function() {
|
|
|
2158
2061
|
}
|
|
2159
2062
|
});
|
|
2160
2063
|
};
|
|
2161
|
-
|
|
2064
|
+
_create_class__default['default'](AssetPromise, [
|
|
2162
2065
|
{
|
|
2163
|
-
key:
|
|
2066
|
+
key: _Symbol_toStringTag,
|
|
2164
2067
|
get: /** compatible with Promise */ function get() {
|
|
2165
2068
|
return "AssetPromise";
|
|
2166
2069
|
}
|
|
@@ -2359,7 +2262,7 @@ var /** @internal */ PromiseState;
|
|
|
2359
2262
|
// Load asset
|
|
2360
2263
|
item.url = assetBaseURL;
|
|
2361
2264
|
var promise = loader.load(item, this);
|
|
2362
|
-
if (
|
|
2265
|
+
if (_instanceof__default['default'](promise, AssetPromise)) {
|
|
2363
2266
|
loadingPromises[assetBaseURL] = promise;
|
|
2364
2267
|
promise.then(function(resource) {
|
|
2365
2268
|
if (loader.useCache) {
|
|
@@ -2431,13 +2334,13 @@ var /** @internal */ PromiseState;
|
|
|
2431
2334
|
};
|
|
2432
2335
|
_proto._parseQueryPath = function _parseQueryPath(string) {
|
|
2433
2336
|
var result = [];
|
|
2434
|
-
if (string.charCodeAt(0) === charCodeOfDot
|
|
2337
|
+
if (string.charCodeAt(0) === charCodeOfDot) {
|
|
2435
2338
|
result.push("");
|
|
2436
2339
|
}
|
|
2437
|
-
string.replace(rePropName
|
|
2340
|
+
string.replace(rePropName, function(match, expression, quote, subString) {
|
|
2438
2341
|
var key = match;
|
|
2439
2342
|
if (quote) {
|
|
2440
|
-
key = subString.replace(reEscapeChar
|
|
2343
|
+
key = subString.replace(reEscapeChar, "$1");
|
|
2441
2344
|
} else if (expression) {
|
|
2442
2345
|
key = expression.trim();
|
|
2443
2346
|
}
|
|
@@ -2495,12 +2398,8 @@ var /** @internal */ PromiseState;
|
|
|
2495
2398
|
};
|
|
2496
2399
|
return ResourceManager;
|
|
2497
2400
|
}();
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
})();
|
|
2501
|
-
(function() {
|
|
2502
|
-
ResourceManager._extTypeMapping = {};
|
|
2503
|
-
})();
|
|
2401
|
+
/** Loader collection. */ ResourceManager._loaders = {};
|
|
2402
|
+
ResourceManager._extTypeMapping = {};
|
|
2504
2403
|
/**
|
|
2505
2404
|
* Declare ResourceLoader's decorator.
|
|
2506
2405
|
* @param assetType - Type of asset
|
|
@@ -2512,9 +2411,9 @@ var /** @internal */ PromiseState;
|
|
|
2512
2411
|
ResourceManager._addLoader(assetType, loader, extnames);
|
|
2513
2412
|
};
|
|
2514
2413
|
}
|
|
2515
|
-
var charCodeOfDot
|
|
2516
|
-
var reEscapeChar
|
|
2517
|
-
var rePropName
|
|
2414
|
+
var charCodeOfDot = ".".charCodeAt(0);
|
|
2415
|
+
var reEscapeChar = /\\(\\)?/g;
|
|
2416
|
+
var rePropName = RegExp(// Match anything that isn't a dot or bracket.
|
|
2518
2417
|
"[^.[\\]]+" + "|" + // Or match property names within brackets.
|
|
2519
2418
|
"\\[(?:" + // Match a non-string expression.
|
|
2520
2419
|
"([^\"'][^[]*)" + "|" + // Or match strings (supports escaping characters).
|
|
@@ -2781,7 +2680,7 @@ var ComponentCloner = /*#__PURE__*/ function() {
|
|
|
2781
2680
|
break;
|
|
2782
2681
|
case CloneMode.Shallow:
|
|
2783
2682
|
var sourcePropS = source[k];
|
|
2784
|
-
if (
|
|
2683
|
+
if (_instanceof__default['default'](sourcePropS, Object)) {
|
|
2785
2684
|
var tarProp = target[k];
|
|
2786
2685
|
tarProp == null && (tarProp = target[k] = sourcePropS.constructor());
|
|
2787
2686
|
Object.assign(tarProp, sourcePropS);
|
|
@@ -2792,7 +2691,7 @@ var ComponentCloner = /*#__PURE__*/ function() {
|
|
|
2792
2691
|
break;
|
|
2793
2692
|
case CloneMode.Deep:
|
|
2794
2693
|
var sourcePropD = source[k];
|
|
2795
|
-
if (
|
|
2694
|
+
if (_instanceof__default['default'](sourcePropD, Object)) {
|
|
2796
2695
|
var tarProp1 = target[k];
|
|
2797
2696
|
tarProp1 == null && (tarProp1 = target[k] = sourcePropD.constructor());
|
|
2798
2697
|
CloneManager.deepCloneObject(sourcePropD, tarProp1);
|
|
@@ -2858,14 +2757,10 @@ var ComponentCloner = /*#__PURE__*/ function() {
|
|
|
2858
2757
|
};
|
|
2859
2758
|
return ComponentsDependencies;
|
|
2860
2759
|
}();
|
|
2861
|
-
|
|
2862
|
-
/**
|
|
2760
|
+
/**
|
|
2863
2761
|
* @internal
|
|
2864
2762
|
*/ ComponentsDependencies._dependenciesMap = new Map();
|
|
2865
|
-
|
|
2866
|
-
(function() {
|
|
2867
|
-
ComponentsDependencies._invDependenciesMap = new Map();
|
|
2868
|
-
})();
|
|
2763
|
+
ComponentsDependencies._invDependenciesMap = new Map();
|
|
2869
2764
|
/**
|
|
2870
2765
|
* Dependent components, automatically added if they do not exist.
|
|
2871
2766
|
* @param components - Dependent components
|
|
@@ -2880,9 +2775,6 @@ var ComponentCloner = /*#__PURE__*/ function() {
|
|
|
2880
2775
|
};
|
|
2881
2776
|
}
|
|
2882
2777
|
|
|
2883
|
-
/**
|
|
2884
|
-
* Layer, used for bit operations.
|
|
2885
|
-
*/ exports.Layer = void 0;
|
|
2886
2778
|
(function(Layer) {
|
|
2887
2779
|
Layer[Layer[/** Layer 0. */ "Layer0"] = 0x1] = "Layer0";
|
|
2888
2780
|
Layer[Layer[/** Layer 1. */ "Layer1"] = 0x2] = "Layer1";
|
|
@@ -2951,7 +2843,7 @@ var ComponentCloner = /*#__PURE__*/ function() {
|
|
|
2951
2843
|
/**
|
|
2952
2844
|
* Bool update flag.
|
|
2953
2845
|
*/ var BoolUpdateFlag = /*#__PURE__*/ function(UpdateFlag) {
|
|
2954
|
-
|
|
2846
|
+
_inherits__default['default'](BoolUpdateFlag, UpdateFlag);
|
|
2955
2847
|
function BoolUpdateFlag() {
|
|
2956
2848
|
var _this;
|
|
2957
2849
|
_this = UpdateFlag.apply(this, arguments) || this;
|
|
@@ -2970,7 +2862,7 @@ var ComponentCloner = /*#__PURE__*/ function() {
|
|
|
2970
2862
|
/**
|
|
2971
2863
|
* The base class of the components.
|
|
2972
2864
|
*/ var Component = /*#__PURE__*/ function(EngineObject) {
|
|
2973
|
-
|
|
2865
|
+
_inherits__default['default'](Component, EngineObject);
|
|
2974
2866
|
function Component(entity) {
|
|
2975
2867
|
var _this;
|
|
2976
2868
|
_this = EngineObject.call(this, entity.engine) || this;
|
|
@@ -3031,7 +2923,7 @@ var ComponentCloner = /*#__PURE__*/ function() {
|
|
|
3031
2923
|
}
|
|
3032
2924
|
}
|
|
3033
2925
|
};
|
|
3034
|
-
|
|
2926
|
+
_create_class__default['default'](Component, [
|
|
3035
2927
|
{
|
|
3036
2928
|
key: "enabled",
|
|
3037
2929
|
get: /**
|
|
@@ -3081,19 +2973,19 @@ var ComponentCloner = /*#__PURE__*/ function() {
|
|
|
3081
2973
|
]);
|
|
3082
2974
|
return Component;
|
|
3083
2975
|
}(EngineObject);
|
|
3084
|
-
|
|
2976
|
+
_ts_decorate__default['default']([
|
|
3085
2977
|
ignoreClone
|
|
3086
2978
|
], Component.prototype, "_entity", void 0);
|
|
3087
|
-
|
|
2979
|
+
_ts_decorate__default['default']([
|
|
3088
2980
|
ignoreClone
|
|
3089
2981
|
], Component.prototype, "_awoken", void 0);
|
|
3090
|
-
|
|
2982
|
+
_ts_decorate__default['default']([
|
|
3091
2983
|
ignoreClone
|
|
3092
2984
|
], Component.prototype, "_destroyed", void 0);
|
|
3093
|
-
|
|
2985
|
+
_ts_decorate__default['default']([
|
|
3094
2986
|
ignoreClone
|
|
3095
2987
|
], Component.prototype, "_phasedActive", void 0);
|
|
3096
|
-
|
|
2988
|
+
_ts_decorate__default['default']([
|
|
3097
2989
|
assignmentClone
|
|
3098
2990
|
], Component.prototype, "_enabled", void 0);
|
|
3099
2991
|
|
|
@@ -3161,10 +3053,11 @@ __decorate([
|
|
|
3161
3053
|
/**
|
|
3162
3054
|
* Used to implement transformation related functions.
|
|
3163
3055
|
*/ var Transform = /*#__PURE__*/ function(Component) {
|
|
3164
|
-
|
|
3056
|
+
_inherits__default['default'](Transform, Component);
|
|
3165
3057
|
function Transform(entity) {
|
|
3166
3058
|
var _this;
|
|
3167
3059
|
_this = Component.call(this, entity) || this;
|
|
3060
|
+
_this._dirtyFlag = 0xbc;
|
|
3168
3061
|
_this._position = new engineMath.Vector3();
|
|
3169
3062
|
_this._rotation = new engineMath.Vector3();
|
|
3170
3063
|
_this._rotationQuaternion = new engineMath.Quaternion();
|
|
@@ -3177,15 +3070,14 @@ __decorate([
|
|
|
3177
3070
|
_this._worldMatrix = new engineMath.Matrix();
|
|
3178
3071
|
_this._isParentDirty = true;
|
|
3179
3072
|
_this._parentTransformCache = null;
|
|
3180
|
-
_this._dirtyFlag = 0xbc;
|
|
3181
3073
|
/** @internal */ _this._updateFlagManager = new UpdateFlagManager();
|
|
3182
|
-
_this._onPositionChanged = _this._onPositionChanged.bind(
|
|
3183
|
-
_this._onWorldPositionChanged = _this._onWorldPositionChanged.bind(
|
|
3184
|
-
_this._onRotationChanged = _this._onRotationChanged.bind(
|
|
3185
|
-
_this._onWorldRotationChanged = _this._onWorldRotationChanged.bind(
|
|
3186
|
-
_this._onRotationQuaternionChanged = _this._onRotationQuaternionChanged.bind(
|
|
3187
|
-
_this._onWorldRotationQuaternionChanged = _this._onWorldRotationQuaternionChanged.bind(
|
|
3188
|
-
_this._onScaleChanged = _this._onScaleChanged.bind(
|
|
3074
|
+
_this._onPositionChanged = _this._onPositionChanged.bind(_assert_this_initialized__default['default'](_this));
|
|
3075
|
+
_this._onWorldPositionChanged = _this._onWorldPositionChanged.bind(_assert_this_initialized__default['default'](_this));
|
|
3076
|
+
_this._onRotationChanged = _this._onRotationChanged.bind(_assert_this_initialized__default['default'](_this));
|
|
3077
|
+
_this._onWorldRotationChanged = _this._onWorldRotationChanged.bind(_assert_this_initialized__default['default'](_this));
|
|
3078
|
+
_this._onRotationQuaternionChanged = _this._onRotationQuaternionChanged.bind(_assert_this_initialized__default['default'](_this));
|
|
3079
|
+
_this._onWorldRotationQuaternionChanged = _this._onWorldRotationQuaternionChanged.bind(_assert_this_initialized__default['default'](_this));
|
|
3080
|
+
_this._onScaleChanged = _this._onScaleChanged.bind(_assert_this_initialized__default['default'](_this));
|
|
3189
3081
|
//@ts-ignore
|
|
3190
3082
|
_this._position._onValueChanged = _this._onPositionChanged;
|
|
3191
3083
|
//@ts-ignore
|
|
@@ -3577,7 +3469,7 @@ __decorate([
|
|
|
3577
3469
|
this._setDirtyFlagTrue(0x40);
|
|
3578
3470
|
this._updateWorldScaleFlag();
|
|
3579
3471
|
};
|
|
3580
|
-
|
|
3472
|
+
_create_class__default['default'](Transform, [
|
|
3581
3473
|
{
|
|
3582
3474
|
key: "position",
|
|
3583
3475
|
get: /**
|
|
@@ -3823,91 +3715,73 @@ __decorate([
|
|
|
3823
3715
|
]);
|
|
3824
3716
|
return Transform;
|
|
3825
3717
|
}(Component);
|
|
3826
|
-
(
|
|
3827
|
-
|
|
3828
|
-
|
|
3829
|
-
(
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
(
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
(
|
|
3836
|
-
Transform._tempVec32 = new engineMath.Vector3();
|
|
3837
|
-
})();
|
|
3838
|
-
(function() {
|
|
3839
|
-
Transform._tempMat30 = new engineMath.Matrix3x3();
|
|
3840
|
-
})();
|
|
3841
|
-
(function() {
|
|
3842
|
-
Transform._tempMat31 = new engineMath.Matrix3x3();
|
|
3843
|
-
})();
|
|
3844
|
-
(function() {
|
|
3845
|
-
Transform._tempMat32 = new engineMath.Matrix3x3();
|
|
3846
|
-
})();
|
|
3847
|
-
(function() {
|
|
3848
|
-
Transform._tempMat41 = new engineMath.Matrix();
|
|
3849
|
-
})();
|
|
3850
|
-
(function() {
|
|
3851
|
-
Transform._tempMat42 = new engineMath.Matrix();
|
|
3852
|
-
})();
|
|
3853
|
-
__decorate([
|
|
3718
|
+
Transform._tempQuat0 = new engineMath.Quaternion();
|
|
3719
|
+
Transform._tempVec30 = new engineMath.Vector3();
|
|
3720
|
+
Transform._tempVec31 = new engineMath.Vector3();
|
|
3721
|
+
Transform._tempVec32 = new engineMath.Vector3();
|
|
3722
|
+
Transform._tempMat30 = new engineMath.Matrix3x3();
|
|
3723
|
+
Transform._tempMat31 = new engineMath.Matrix3x3();
|
|
3724
|
+
Transform._tempMat32 = new engineMath.Matrix3x3();
|
|
3725
|
+
Transform._tempMat41 = new engineMath.Matrix();
|
|
3726
|
+
Transform._tempMat42 = new engineMath.Matrix();
|
|
3727
|
+
_ts_decorate__default['default']([
|
|
3854
3728
|
deepClone
|
|
3855
3729
|
], Transform.prototype, "_position", void 0);
|
|
3856
|
-
|
|
3730
|
+
_ts_decorate__default['default']([
|
|
3857
3731
|
deepClone
|
|
3858
3732
|
], Transform.prototype, "_rotation", void 0);
|
|
3859
|
-
|
|
3733
|
+
_ts_decorate__default['default']([
|
|
3860
3734
|
deepClone
|
|
3861
3735
|
], Transform.prototype, "_rotationQuaternion", void 0);
|
|
3862
|
-
|
|
3736
|
+
_ts_decorate__default['default']([
|
|
3863
3737
|
deepClone
|
|
3864
3738
|
], Transform.prototype, "_scale", void 0);
|
|
3865
|
-
|
|
3739
|
+
_ts_decorate__default['default']([
|
|
3866
3740
|
deepClone
|
|
3867
3741
|
], Transform.prototype, "_worldPosition", void 0);
|
|
3868
|
-
|
|
3742
|
+
_ts_decorate__default['default']([
|
|
3869
3743
|
deepClone
|
|
3870
3744
|
], Transform.prototype, "_worldRotation", void 0);
|
|
3871
|
-
|
|
3745
|
+
_ts_decorate__default['default']([
|
|
3872
3746
|
deepClone
|
|
3873
3747
|
], Transform.prototype, "_worldRotationQuaternion", void 0);
|
|
3874
|
-
|
|
3748
|
+
_ts_decorate__default['default']([
|
|
3875
3749
|
deepClone
|
|
3876
3750
|
], Transform.prototype, "_lossyWorldScale", void 0);
|
|
3877
|
-
|
|
3751
|
+
_ts_decorate__default['default']([
|
|
3878
3752
|
deepClone
|
|
3879
3753
|
], Transform.prototype, "_localMatrix", void 0);
|
|
3880
|
-
|
|
3754
|
+
_ts_decorate__default['default']([
|
|
3881
3755
|
deepClone
|
|
3882
3756
|
], Transform.prototype, "_worldMatrix", void 0);
|
|
3883
|
-
|
|
3757
|
+
_ts_decorate__default['default']([
|
|
3884
3758
|
ignoreClone
|
|
3885
3759
|
], Transform.prototype, "_isParentDirty", void 0);
|
|
3886
|
-
|
|
3760
|
+
_ts_decorate__default['default']([
|
|
3887
3761
|
ignoreClone
|
|
3888
3762
|
], Transform.prototype, "_parentTransformCache", void 0);
|
|
3889
|
-
|
|
3763
|
+
_ts_decorate__default['default']([
|
|
3890
3764
|
ignoreClone
|
|
3891
3765
|
], Transform.prototype, "_updateFlagManager", void 0);
|
|
3892
|
-
|
|
3766
|
+
_ts_decorate__default['default']([
|
|
3893
3767
|
ignoreClone
|
|
3894
3768
|
], Transform.prototype, "_onPositionChanged", null);
|
|
3895
|
-
|
|
3769
|
+
_ts_decorate__default['default']([
|
|
3896
3770
|
ignoreClone
|
|
3897
3771
|
], Transform.prototype, "_onWorldPositionChanged", null);
|
|
3898
|
-
|
|
3772
|
+
_ts_decorate__default['default']([
|
|
3899
3773
|
ignoreClone
|
|
3900
3774
|
], Transform.prototype, "_onRotationChanged", null);
|
|
3901
|
-
|
|
3775
|
+
_ts_decorate__default['default']([
|
|
3902
3776
|
ignoreClone
|
|
3903
3777
|
], Transform.prototype, "_onWorldRotationChanged", null);
|
|
3904
|
-
|
|
3778
|
+
_ts_decorate__default['default']([
|
|
3905
3779
|
ignoreClone
|
|
3906
3780
|
], Transform.prototype, "_onRotationQuaternionChanged", null);
|
|
3907
|
-
|
|
3781
|
+
_ts_decorate__default['default']([
|
|
3908
3782
|
ignoreClone
|
|
3909
3783
|
], Transform.prototype, "_onWorldRotationQuaternionChanged", null);
|
|
3910
|
-
|
|
3784
|
+
_ts_decorate__default['default']([
|
|
3911
3785
|
ignoreClone
|
|
3912
3786
|
], Transform.prototype, "_onScaleChanged", null);
|
|
3913
3787
|
var TransformModifyFlags;
|
|
@@ -3931,7 +3805,7 @@ var TransformModifyFlags;
|
|
|
3931
3805
|
/**
|
|
3932
3806
|
* Entity, be used as components container.
|
|
3933
3807
|
*/ var Entity = /*#__PURE__*/ function(EngineObject) {
|
|
3934
|
-
|
|
3808
|
+
_inherits__default['default'](Entity, EngineObject);
|
|
3935
3809
|
function Entity(engine, name) {
|
|
3936
3810
|
var _this;
|
|
3937
3811
|
_this = EngineObject.call(this, engine) || this;
|
|
@@ -3972,7 +3846,7 @@ var TransformModifyFlags;
|
|
|
3972
3846
|
// @todo: should inverse traversal
|
|
3973
3847
|
for(var i = components.length - 1; i >= 0; i--){
|
|
3974
3848
|
var component = components[i];
|
|
3975
|
-
if (
|
|
3849
|
+
if (_instanceof__default['default'](component, type)) {
|
|
3976
3850
|
return component;
|
|
3977
3851
|
}
|
|
3978
3852
|
}
|
|
@@ -3987,7 +3861,7 @@ var TransformModifyFlags;
|
|
|
3987
3861
|
var components = this._components;
|
|
3988
3862
|
for(var i = 0, n = components.length; i < n; i++){
|
|
3989
3863
|
var component = components[i];
|
|
3990
|
-
if (
|
|
3864
|
+
if (_instanceof__default['default'](component, type)) {
|
|
3991
3865
|
results.push(component);
|
|
3992
3866
|
}
|
|
3993
3867
|
}
|
|
@@ -4121,7 +3995,7 @@ var TransformModifyFlags;
|
|
|
4121
3995
|
var components = this._components;
|
|
4122
3996
|
for(var i1 = 0, n = components.length; i1 < n; i1++){
|
|
4123
3997
|
var sourceComp = components[i1];
|
|
4124
|
-
if (!
|
|
3998
|
+
if (!_instanceof__default['default'](sourceComp, Transform)) {
|
|
4125
3999
|
var targetComp = cloneEntity.addComponent(sourceComp.constructor);
|
|
4126
4000
|
ComponentCloner.cloneComponent(sourceComp, targetComp);
|
|
4127
4001
|
}
|
|
@@ -4255,7 +4129,7 @@ var TransformModifyFlags;
|
|
|
4255
4129
|
_proto._getComponentsInChildren = function _getComponentsInChildren(type, results) {
|
|
4256
4130
|
for(var i = this._components.length - 1; i >= 0; i--){
|
|
4257
4131
|
var component = this._components[i];
|
|
4258
|
-
if (
|
|
4132
|
+
if (_instanceof__default['default'](component, type)) {
|
|
4259
4133
|
results.push(component);
|
|
4260
4134
|
}
|
|
4261
4135
|
}
|
|
@@ -4358,7 +4232,7 @@ var TransformModifyFlags;
|
|
|
4358
4232
|
this._traverseSetOwnerScene(children[i], scene);
|
|
4359
4233
|
}
|
|
4360
4234
|
};
|
|
4361
|
-
|
|
4235
|
+
_create_class__default['default'](Entity, [
|
|
4362
4236
|
{
|
|
4363
4237
|
key: "isActive",
|
|
4364
4238
|
get: /**
|
|
@@ -4444,17 +4318,11 @@ var TransformModifyFlags;
|
|
|
4444
4318
|
return Entity;
|
|
4445
4319
|
}(EngineObject);
|
|
4446
4320
|
|
|
4447
|
-
/**
|
|
4448
|
-
* Color Space.
|
|
4449
|
-
*/ exports.ColorSpace = void 0;
|
|
4450
4321
|
(function(ColorSpace) {
|
|
4451
4322
|
ColorSpace[ColorSpace[/** Linear color space. */ "Linear"] = 0] = "Linear";
|
|
4452
4323
|
ColorSpace[ColorSpace[/** Gamma color space. */ "Gamma"] = 1] = "Gamma";
|
|
4453
4324
|
})(exports.ColorSpace || (exports.ColorSpace = {}));
|
|
4454
4325
|
|
|
4455
|
-
/**
|
|
4456
|
-
* The current phase of the pointer.
|
|
4457
|
-
*/ exports.PointerPhase = void 0;
|
|
4458
4326
|
(function(PointerPhase) {
|
|
4459
4327
|
PointerPhase[PointerPhase[/** A Pointer pressed on the screen. */ "Down"] = 0] = "Down";
|
|
4460
4328
|
PointerPhase[PointerPhase[/** A pointer moved on the screen. */ "Move"] = 1] = "Move";
|
|
@@ -4576,7 +4444,7 @@ var TransformModifyFlags;
|
|
|
4576
4444
|
}
|
|
4577
4445
|
}
|
|
4578
4446
|
};
|
|
4579
|
-
|
|
4447
|
+
_create_class__default['default'](SystemInfo, null, [
|
|
4580
4448
|
{
|
|
4581
4449
|
key: "devicePixelRatio",
|
|
4582
4450
|
get: /**
|
|
@@ -4588,18 +4456,10 @@ var TransformModifyFlags;
|
|
|
4588
4456
|
]);
|
|
4589
4457
|
return SystemInfo;
|
|
4590
4458
|
}();
|
|
4591
|
-
|
|
4592
|
-
|
|
4593
|
-
})();
|
|
4594
|
-
(function() {
|
|
4595
|
-
/** The operating system is running on. */ SystemInfo.operatingSystem = "";
|
|
4596
|
-
})();
|
|
4459
|
+
/** The platform is running on. */ SystemInfo.platform = exports.Platform.Unknown;
|
|
4460
|
+
/** The operating system is running on. */ SystemInfo.operatingSystem = "";
|
|
4597
4461
|
SystemInfo._initialize();
|
|
4598
4462
|
|
|
4599
|
-
/**
|
|
4600
|
-
* The keys of the keyboard.
|
|
4601
|
-
* Keep up with W3C standards.(https://www.w3.org/TR/2017/CR-uievents-code-20170601/)
|
|
4602
|
-
*/ exports.Keys = void 0;
|
|
4603
4463
|
(function(Keys) {
|
|
4604
4464
|
Keys[Keys[/** `~ on a US keyboard. This is the 半角/全角/漢字 (hankaku/zenkaku/kanji) key on Japanese keyboards. */ "Backquote"] = 0] = "Backquote";
|
|
4605
4465
|
Keys[Keys[/** Used for both the US \| (on the 101-key layout) and also for the key located between the " and Enter keys on row C of the 102-, 104- and 106-key layouts. Labelled #~ on a UK (102) keyboard. */ "Backslash"] = 1] = "Backslash";
|
|
@@ -4933,9 +4793,6 @@ SystemInfo._initialize();
|
|
|
4933
4793
|
return KeyboardManager;
|
|
4934
4794
|
}();
|
|
4935
4795
|
|
|
4936
|
-
/**
|
|
4937
|
-
* Camera clear flags enumeration.
|
|
4938
|
-
*/ exports.CameraClearFlags = void 0;
|
|
4939
4796
|
(function(CameraClearFlags) {
|
|
4940
4797
|
CameraClearFlags[CameraClearFlags[/* Do nothing. */ "None"] = 0x0] = "None";
|
|
4941
4798
|
CameraClearFlags[CameraClearFlags[/* Clear color with scene background. */ "Color"] = 0x1] = "Color";
|
|
@@ -5210,7 +5067,7 @@ SystemInfo._initialize();
|
|
|
5210
5067
|
_proto._setGravity = function _setGravity() {
|
|
5211
5068
|
this._nativePhysicsManager.setGravity(this._gravity);
|
|
5212
5069
|
};
|
|
5213
|
-
|
|
5070
|
+
_create_class__default['default'](PhysicsManager, [
|
|
5214
5071
|
{
|
|
5215
5072
|
key: "gravity",
|
|
5216
5073
|
get: /**
|
|
@@ -5241,9 +5098,6 @@ SystemInfo._initialize();
|
|
|
5241
5098
|
return PhysicsManager;
|
|
5242
5099
|
}();
|
|
5243
5100
|
|
|
5244
|
-
/**
|
|
5245
|
-
* Describes how physics materials of the colliding objects are combined.
|
|
5246
|
-
*/ exports.PhysicsMaterialCombineMode = void 0;
|
|
5247
5101
|
(function(PhysicsMaterialCombineMode) {
|
|
5248
5102
|
PhysicsMaterialCombineMode[PhysicsMaterialCombineMode[/** Averages the friction/bounce of the two colliding materials. */ "Average"] = 0] = "Average";
|
|
5249
5103
|
PhysicsMaterialCombineMode[PhysicsMaterialCombineMode[/** Uses the smaller friction/bounce of the two colliding materials. */ "Minimum"] = 1] = "Minimum";
|
|
@@ -5268,7 +5122,7 @@ SystemInfo._initialize();
|
|
|
5268
5122
|
*/ _proto._destroy = function _destroy() {
|
|
5269
5123
|
this._nativeMaterial.destroy();
|
|
5270
5124
|
};
|
|
5271
|
-
|
|
5125
|
+
_create_class__default['default'](PhysicsMaterial, [
|
|
5272
5126
|
{
|
|
5273
5127
|
key: "bounciness",
|
|
5274
5128
|
get: /**
|
|
@@ -5344,12 +5198,12 @@ SystemInfo._initialize();
|
|
|
5344
5198
|
}();
|
|
5345
5199
|
|
|
5346
5200
|
exports.Collider = /*#__PURE__*/ function(Component) {
|
|
5347
|
-
|
|
5201
|
+
_inherits__default['default'](Collider, Component);
|
|
5348
5202
|
function Collider(entity) {
|
|
5349
5203
|
var _this;
|
|
5350
5204
|
_this = Component.call(this, entity) || this;
|
|
5351
|
-
/** @internal */ _this._index = -1;
|
|
5352
5205
|
_this._shapes = [];
|
|
5206
|
+
/** @internal */ _this._index = -1;
|
|
5353
5207
|
_this._updateFlag = _this.entity.transform.registerWorldChangeFlag();
|
|
5354
5208
|
return _this;
|
|
5355
5209
|
}
|
|
@@ -5428,7 +5282,7 @@ exports.Collider = /*#__PURE__*/ function(Component) {
|
|
|
5428
5282
|
this.clearShapes();
|
|
5429
5283
|
this._nativeCollider.destroy();
|
|
5430
5284
|
};
|
|
5431
|
-
|
|
5285
|
+
_create_class__default['default'](Collider, [
|
|
5432
5286
|
{
|
|
5433
5287
|
key: "shapes",
|
|
5434
5288
|
get: /**
|
|
@@ -5440,16 +5294,13 @@ exports.Collider = /*#__PURE__*/ function(Component) {
|
|
|
5440
5294
|
]);
|
|
5441
5295
|
return Collider;
|
|
5442
5296
|
}(Component);
|
|
5443
|
-
|
|
5297
|
+
_ts_decorate__default['default']([
|
|
5444
5298
|
ignoreClone
|
|
5445
5299
|
], exports.Collider.prototype, "_index", void 0);
|
|
5446
|
-
exports.Collider =
|
|
5300
|
+
exports.Collider = _ts_decorate__default['default']([
|
|
5447
5301
|
dependentComponents(Transform)
|
|
5448
5302
|
], exports.Collider);
|
|
5449
5303
|
|
|
5450
|
-
/**
|
|
5451
|
-
* The up axis of the collider shape.
|
|
5452
|
-
*/ exports.ControllerNonWalkableMode = void 0;
|
|
5453
5304
|
(function(ControllerNonWalkableMode) {
|
|
5454
5305
|
ControllerNonWalkableMode[ControllerNonWalkableMode[/** Stops character from climbing up non-walkable slopes, but doesn't move it otherwise. */ "PreventClimbing"] = 0] = "PreventClimbing";
|
|
5455
5306
|
ControllerNonWalkableMode[ControllerNonWalkableMode[/** Stops character from climbing up non-walkable slopes, and forces it to slide down those slopes. */ "PreventClimbingAndForceSliding"] = 1] = "PreventClimbingAndForceSliding";
|
|
@@ -5458,7 +5309,7 @@ exports.Collider = __decorate([
|
|
|
5458
5309
|
/**
|
|
5459
5310
|
* The character controllers.
|
|
5460
5311
|
*/ var CharacterController = /*#__PURE__*/ function(Collider) {
|
|
5461
|
-
|
|
5312
|
+
_inherits__default['default'](CharacterController, Collider);
|
|
5462
5313
|
function CharacterController(entity) {
|
|
5463
5314
|
var _this;
|
|
5464
5315
|
_this = Collider.call(this, entity) || this;
|
|
@@ -5468,7 +5319,7 @@ exports.Collider = __decorate([
|
|
|
5468
5319
|
_this._upDirection = new engineMath.Vector3(0, 1, 0);
|
|
5469
5320
|
_this._slopeLimit = 0.707;
|
|
5470
5321
|
_this._nativeCollider = PhysicsManager._nativePhysics.createCharacterController();
|
|
5471
|
-
_this._setUpDirection = _this._setUpDirection.bind(
|
|
5322
|
+
_this._setUpDirection = _this._setUpDirection.bind(_assert_this_initialized__default['default'](_this));
|
|
5472
5323
|
//@ts-ignore
|
|
5473
5324
|
_this._upDirection._onValueChanged = _this._setUpDirection;
|
|
5474
5325
|
return _this;
|
|
@@ -5541,7 +5392,7 @@ exports.Collider = __decorate([
|
|
|
5541
5392
|
_proto._setUpDirection = function _setUpDirection() {
|
|
5542
5393
|
this._nativeCollider.setUpDirection(this._upDirection);
|
|
5543
5394
|
};
|
|
5544
|
-
|
|
5395
|
+
_create_class__default['default'](CharacterController, [
|
|
5545
5396
|
{
|
|
5546
5397
|
key: "stepOffset",
|
|
5547
5398
|
get: /**
|
|
@@ -5636,7 +5487,7 @@ exports.Collider = __decorate([
|
|
|
5636
5487
|
_proto._setRotation = function _setRotation() {
|
|
5637
5488
|
this._nativeShape.setRotation(this._rotation);
|
|
5638
5489
|
};
|
|
5639
|
-
|
|
5490
|
+
_create_class__default['default'](ColliderShape, [
|
|
5640
5491
|
{
|
|
5641
5492
|
key: "collider",
|
|
5642
5493
|
get: /**
|
|
@@ -5724,20 +5575,18 @@ exports.Collider = __decorate([
|
|
|
5724
5575
|
]);
|
|
5725
5576
|
return ColliderShape;
|
|
5726
5577
|
}();
|
|
5727
|
-
|
|
5728
|
-
ColliderShape._idGenerator = 0;
|
|
5729
|
-
})();
|
|
5578
|
+
ColliderShape._idGenerator = 0;
|
|
5730
5579
|
|
|
5731
5580
|
/**
|
|
5732
5581
|
* Physical collider shape for box.
|
|
5733
5582
|
*/ var BoxColliderShape = /*#__PURE__*/ function(ColliderShape) {
|
|
5734
|
-
|
|
5583
|
+
_inherits__default['default'](BoxColliderShape, ColliderShape);
|
|
5735
5584
|
function BoxColliderShape() {
|
|
5736
5585
|
var _this;
|
|
5737
5586
|
_this = ColliderShape.call(this) || this;
|
|
5738
5587
|
_this._size = new engineMath.Vector3(1, 1, 1);
|
|
5739
5588
|
_this._nativeShape = PhysicsManager._nativePhysics.createBoxColliderShape(_this._id, _this._size, _this._material._nativeMaterial);
|
|
5740
|
-
_this._setSize = _this._setSize.bind(
|
|
5589
|
+
_this._setSize = _this._setSize.bind(_assert_this_initialized__default['default'](_this));
|
|
5741
5590
|
//@ts-ignore
|
|
5742
5591
|
_this._size._onValueChanged = _this._setSize;
|
|
5743
5592
|
return _this;
|
|
@@ -5746,7 +5595,7 @@ exports.Collider = __decorate([
|
|
|
5746
5595
|
_proto._setSize = function _setSize() {
|
|
5747
5596
|
this._nativeShape.setSize(this._size);
|
|
5748
5597
|
};
|
|
5749
|
-
|
|
5598
|
+
_create_class__default['default'](BoxColliderShape, [
|
|
5750
5599
|
{
|
|
5751
5600
|
key: "size",
|
|
5752
5601
|
get: /**
|
|
@@ -5767,7 +5616,7 @@ exports.Collider = __decorate([
|
|
|
5767
5616
|
/**
|
|
5768
5617
|
* Physical collider shape for sphere.
|
|
5769
5618
|
*/ var SphereColliderShape = /*#__PURE__*/ function(ColliderShape) {
|
|
5770
|
-
|
|
5619
|
+
_inherits__default['default'](SphereColliderShape, ColliderShape);
|
|
5771
5620
|
function SphereColliderShape() {
|
|
5772
5621
|
var _this;
|
|
5773
5622
|
_this = ColliderShape.call(this) || this;
|
|
@@ -5775,7 +5624,7 @@ exports.Collider = __decorate([
|
|
|
5775
5624
|
_this._nativeShape = PhysicsManager._nativePhysics.createSphereColliderShape(_this._id, _this._radius, _this._material._nativeMaterial);
|
|
5776
5625
|
return _this;
|
|
5777
5626
|
}
|
|
5778
|
-
|
|
5627
|
+
_create_class__default['default'](SphereColliderShape, [
|
|
5779
5628
|
{
|
|
5780
5629
|
key: "radius",
|
|
5781
5630
|
get: /**
|
|
@@ -5797,7 +5646,7 @@ exports.Collider = __decorate([
|
|
|
5797
5646
|
/**
|
|
5798
5647
|
* Physical collider shape plane.
|
|
5799
5648
|
*/ var PlaneColliderShape = /*#__PURE__*/ function(ColliderShape) {
|
|
5800
|
-
|
|
5649
|
+
_inherits__default['default'](PlaneColliderShape, ColliderShape);
|
|
5801
5650
|
function PlaneColliderShape() {
|
|
5802
5651
|
var _this;
|
|
5803
5652
|
_this = ColliderShape.call(this) || this;
|
|
@@ -5807,9 +5656,6 @@ exports.Collider = __decorate([
|
|
|
5807
5656
|
return PlaneColliderShape;
|
|
5808
5657
|
}(ColliderShape);
|
|
5809
5658
|
|
|
5810
|
-
/**
|
|
5811
|
-
* The up axis of the collider shape.
|
|
5812
|
-
*/ exports.ColliderShapeUpAxis = void 0;
|
|
5813
5659
|
(function(ColliderShapeUpAxis) {
|
|
5814
5660
|
ColliderShapeUpAxis[ColliderShapeUpAxis[/** Up axis is X. */ "X"] = 0] = "X";
|
|
5815
5661
|
ColliderShapeUpAxis[ColliderShapeUpAxis[/** Up axis is Y. */ "Y"] = 1] = "Y";
|
|
@@ -5819,7 +5665,7 @@ exports.Collider = __decorate([
|
|
|
5819
5665
|
/**
|
|
5820
5666
|
* Physical collider shape for capsule.
|
|
5821
5667
|
*/ var CapsuleColliderShape = /*#__PURE__*/ function(ColliderShape) {
|
|
5822
|
-
|
|
5668
|
+
_inherits__default['default'](CapsuleColliderShape, ColliderShape);
|
|
5823
5669
|
function CapsuleColliderShape() {
|
|
5824
5670
|
var _this;
|
|
5825
5671
|
_this = ColliderShape.call(this) || this;
|
|
@@ -5829,7 +5675,7 @@ exports.Collider = __decorate([
|
|
|
5829
5675
|
_this._nativeShape = PhysicsManager._nativePhysics.createCapsuleColliderShape(_this._id, _this._radius, _this._height, _this._material._nativeMaterial);
|
|
5830
5676
|
return _this;
|
|
5831
5677
|
}
|
|
5832
|
-
|
|
5678
|
+
_create_class__default['default'](CapsuleColliderShape, [
|
|
5833
5679
|
{
|
|
5834
5680
|
key: "radius",
|
|
5835
5681
|
get: /**
|
|
@@ -5877,7 +5723,7 @@ exports.Collider = __decorate([
|
|
|
5877
5723
|
}(ColliderShape);
|
|
5878
5724
|
|
|
5879
5725
|
exports.Joint = /*#__PURE__*/ function(Component) {
|
|
5880
|
-
|
|
5726
|
+
_inherits__default['default'](Joint, Component);
|
|
5881
5727
|
function Joint(entity) {
|
|
5882
5728
|
var _this;
|
|
5883
5729
|
_this = Component.call(this, entity) || this;
|
|
@@ -5888,7 +5734,7 @@ exports.Joint = /*#__PURE__*/ function(Component) {
|
|
|
5888
5734
|
_this._connectedCollider.localPosition = new engineMath.Vector3();
|
|
5889
5735
|
return _this;
|
|
5890
5736
|
}
|
|
5891
|
-
|
|
5737
|
+
_create_class__default['default'](Joint, [
|
|
5892
5738
|
{
|
|
5893
5739
|
key: "connectedCollider",
|
|
5894
5740
|
get: /**
|
|
@@ -6006,7 +5852,7 @@ exports.Joint = /*#__PURE__*/ function(Component) {
|
|
|
6006
5852
|
]);
|
|
6007
5853
|
return Joint;
|
|
6008
5854
|
}(Component);
|
|
6009
|
-
exports.Joint =
|
|
5855
|
+
exports.Joint = _ts_decorate__default['default']([
|
|
6010
5856
|
dependentComponents(exports.Collider)
|
|
6011
5857
|
], exports.Joint);
|
|
6012
5858
|
/**
|
|
@@ -6020,7 +5866,7 @@ exports.Joint = __decorate([
|
|
|
6020
5866
|
/*
|
|
6021
5867
|
* A fixed joint permits no relative movement between two colliders. ie the colliders are glued together.
|
|
6022
5868
|
*/ var FixedJoint = /*#__PURE__*/ function(Joint) {
|
|
6023
|
-
|
|
5869
|
+
_inherits__default['default'](FixedJoint, Joint);
|
|
6024
5870
|
function FixedJoint() {
|
|
6025
5871
|
return Joint.apply(this, arguments);
|
|
6026
5872
|
}
|
|
@@ -6049,7 +5895,7 @@ exports.Joint = __decorate([
|
|
|
6049
5895
|
/**
|
|
6050
5896
|
* A joint which behaves in a similar way to a hinge or axle.
|
|
6051
5897
|
*/ var HingeJoint = /*#__PURE__*/ function(Joint) {
|
|
6052
|
-
|
|
5898
|
+
_inherits__default['default'](HingeJoint, Joint);
|
|
6053
5899
|
function HingeJoint() {
|
|
6054
5900
|
var _this;
|
|
6055
5901
|
_this = Joint.apply(this, arguments) || this;
|
|
@@ -6068,7 +5914,7 @@ exports.Joint = __decorate([
|
|
|
6068
5914
|
collider.collider = this.entity.getComponent(exports.Collider);
|
|
6069
5915
|
this._nativeJoint = PhysicsManager._nativePhysics.createHingeJoint(collider.collider._nativeCollider);
|
|
6070
5916
|
};
|
|
6071
|
-
|
|
5917
|
+
_create_class__default['default'](HingeJoint, [
|
|
6072
5918
|
{
|
|
6073
5919
|
key: "axis",
|
|
6074
5920
|
get: /**
|
|
@@ -6199,7 +6045,7 @@ exports.Joint = __decorate([
|
|
|
6199
6045
|
/**
|
|
6200
6046
|
* A joint that maintains an upper or lower bound (or both) on the distance between two points on different objects.
|
|
6201
6047
|
*/ var SpringJoint = /*#__PURE__*/ function(Joint) {
|
|
6202
|
-
|
|
6048
|
+
_inherits__default['default'](SpringJoint, Joint);
|
|
6203
6049
|
function SpringJoint() {
|
|
6204
6050
|
var _this;
|
|
6205
6051
|
_this = Joint.apply(this, arguments) || this;
|
|
@@ -6220,7 +6066,7 @@ exports.Joint = __decorate([
|
|
|
6220
6066
|
collider.collider = this.entity.getComponent(exports.Collider);
|
|
6221
6067
|
this._nativeJoint = PhysicsManager._nativePhysics.createSpringJoint(collider.collider._nativeCollider);
|
|
6222
6068
|
};
|
|
6223
|
-
|
|
6069
|
+
_create_class__default['default'](SpringJoint, [
|
|
6224
6070
|
{
|
|
6225
6071
|
key: "swingOffset",
|
|
6226
6072
|
get: /**
|
|
@@ -6329,9 +6175,6 @@ exports.Joint = __decorate([
|
|
|
6329
6175
|
/** If freeSpin is enabled the motor will only accelerate but never slow down. */ this.freeSpin = false;
|
|
6330
6176
|
};
|
|
6331
6177
|
|
|
6332
|
-
/**
|
|
6333
|
-
* The up axis of the collider shape.
|
|
6334
|
-
*/ exports.ControllerCollisionFlag = void 0;
|
|
6335
6178
|
(function(ControllerCollisionFlag) {
|
|
6336
6179
|
ControllerCollisionFlag[ControllerCollisionFlag[/** Character is colliding to the sides. */ "Sides"] = 1] = "Sides";
|
|
6337
6180
|
ControllerCollisionFlag[ControllerCollisionFlag[/** Character has collision above. */ "Up"] = 2] = "Up";
|
|
@@ -6342,7 +6185,7 @@ exports.Joint = __decorate([
|
|
|
6342
6185
|
* A static collider component that will not move.
|
|
6343
6186
|
* @remarks Mostly used for object which always stays at the same place and never moves around.
|
|
6344
6187
|
*/ var StaticCollider = /*#__PURE__*/ function(Collider) {
|
|
6345
|
-
|
|
6188
|
+
_inherits__default['default'](StaticCollider, Collider);
|
|
6346
6189
|
function StaticCollider(entity) {
|
|
6347
6190
|
var _this;
|
|
6348
6191
|
_this = Collider.call(this, entity) || this;
|
|
@@ -6356,7 +6199,7 @@ exports.Joint = __decorate([
|
|
|
6356
6199
|
/**
|
|
6357
6200
|
* A dynamic collider can act with self-defined movement or physical force.
|
|
6358
6201
|
*/ var DynamicCollider = /*#__PURE__*/ function(Collider) {
|
|
6359
|
-
|
|
6202
|
+
_inherits__default['default'](DynamicCollider, Collider);
|
|
6360
6203
|
function DynamicCollider(entity) {
|
|
6361
6204
|
var _this;
|
|
6362
6205
|
_this = Collider.call(this, entity) || this;
|
|
@@ -6376,10 +6219,10 @@ exports.Joint = __decorate([
|
|
|
6376
6219
|
_this._sleepThreshold = 5e-3;
|
|
6377
6220
|
var transform = _this.entity.transform;
|
|
6378
6221
|
_this._nativeCollider = PhysicsManager._nativePhysics.createDynamicCollider(transform.worldPosition, transform.worldRotationQuaternion);
|
|
6379
|
-
_this._setLinearVelocity = _this._setLinearVelocity.bind(
|
|
6380
|
-
_this._setAngularVelocity = _this._setAngularVelocity.bind(
|
|
6381
|
-
_this._setCenterOfMass = _this._setCenterOfMass.bind(
|
|
6382
|
-
_this._setInertiaTensor = _this._setInertiaTensor.bind(
|
|
6222
|
+
_this._setLinearVelocity = _this._setLinearVelocity.bind(_assert_this_initialized__default['default'](_this));
|
|
6223
|
+
_this._setAngularVelocity = _this._setAngularVelocity.bind(_assert_this_initialized__default['default'](_this));
|
|
6224
|
+
_this._setCenterOfMass = _this._setCenterOfMass.bind(_assert_this_initialized__default['default'](_this));
|
|
6225
|
+
_this._setInertiaTensor = _this._setInertiaTensor.bind(_assert_this_initialized__default['default'](_this));
|
|
6383
6226
|
//@ts-ignore
|
|
6384
6227
|
_this._linearVelocity._onValueChanged = _this._setLinearVelocity;
|
|
6385
6228
|
//@ts-ignore
|
|
@@ -6437,7 +6280,7 @@ exports.Joint = __decorate([
|
|
|
6437
6280
|
_proto._setInertiaTensor = function _setInertiaTensor() {
|
|
6438
6281
|
this._nativeCollider.setInertiaTensor(this._inertiaTensor);
|
|
6439
6282
|
};
|
|
6440
|
-
|
|
6283
|
+
_create_class__default['default'](DynamicCollider, [
|
|
6441
6284
|
{
|
|
6442
6285
|
key: "linearDamping",
|
|
6443
6286
|
get: /**
|
|
@@ -6633,14 +6476,12 @@ exports.Joint = __decorate([
|
|
|
6633
6476
|
]);
|
|
6634
6477
|
return DynamicCollider;
|
|
6635
6478
|
}(exports.Collider);
|
|
6636
|
-
exports.CollisionDetectionMode = void 0;
|
|
6637
6479
|
(function(CollisionDetectionMode) {
|
|
6638
6480
|
CollisionDetectionMode[CollisionDetectionMode["Discrete"] = 0] = "Discrete";
|
|
6639
6481
|
CollisionDetectionMode[CollisionDetectionMode[/** Continuous collision detection is on for colliding with static mesh geometry. */ "Continuous"] = 1] = "Continuous";
|
|
6640
6482
|
CollisionDetectionMode[CollisionDetectionMode[/** Continuous collision detection is on for colliding with static and dynamic geometry. */ "ContinuousDynamic"] = 2] = "ContinuousDynamic";
|
|
6641
6483
|
CollisionDetectionMode[CollisionDetectionMode[/** Speculative continuous collision detection is on for static and dynamic geometries */ "ContinuousSpeculative"] = 3] = "ContinuousSpeculative";
|
|
6642
6484
|
})(exports.CollisionDetectionMode || (exports.CollisionDetectionMode = {}));
|
|
6643
|
-
exports.DynamicColliderConstraints = void 0;
|
|
6644
6485
|
(function(DynamicColliderConstraints) {
|
|
6645
6486
|
DynamicColliderConstraints[DynamicColliderConstraints[/** Not Freeze. */ "None"] = 0] = "None";
|
|
6646
6487
|
DynamicColliderConstraints[DynamicColliderConstraints[/** Freeze motion along the X-axis. */ "FreezePositionX"] = 1] = "FreezePositionX";
|
|
@@ -6651,13 +6492,6 @@ exports.DynamicColliderConstraints = void 0;
|
|
|
6651
6492
|
DynamicColliderConstraints[DynamicColliderConstraints[/** Freeze rotation along the Z-axis. */ "FreezeRotationZ"] = 32] = "FreezeRotationZ";
|
|
6652
6493
|
})(exports.DynamicColliderConstraints || (exports.DynamicColliderConstraints = {}));
|
|
6653
6494
|
|
|
6654
|
-
/**
|
|
6655
|
-
* Defines values that specify the buttons on a pointer device.
|
|
6656
|
-
* Refer to the W3C standards:
|
|
6657
|
-
* (https://www.w3.org/TR/uievents/#dom-mouseevent-button)
|
|
6658
|
-
* (https://www.w3.org/TR/uievents/#dom-mouseevent-buttons)
|
|
6659
|
-
* Refer to Microsoft's documentation.(https://docs.microsoft.com/en-us/dotnet/api/system.windows.input.mousebutton?view=windowsdesktop-6.0)
|
|
6660
|
-
*/ exports.PointerButton = void 0;
|
|
6661
6495
|
(function(PointerButton) {
|
|
6662
6496
|
PointerButton[PointerButton[/** No button. */ "None"] = 0x0] = "None";
|
|
6663
6497
|
PointerButton[PointerButton[/** Indicate the primary pointer of the device (in general, the left button or the only button on single-button devices, used to activate a user interface control or select text) or the un-initialized value. */ "Primary"] = 0x1] = "Primary";
|
|
@@ -6981,15 +6815,9 @@ exports.DynamicColliderConstraints = void 0;
|
|
|
6981
6815
|
};
|
|
6982
6816
|
return PointerManager;
|
|
6983
6817
|
}();
|
|
6984
|
-
(
|
|
6985
|
-
|
|
6986
|
-
|
|
6987
|
-
(function() {
|
|
6988
|
-
PointerManager._tempPoint = new engineMath.Vector2();
|
|
6989
|
-
})();
|
|
6990
|
-
(function() {
|
|
6991
|
-
PointerManager._tempHitResult = new HitResult();
|
|
6992
|
-
})();
|
|
6818
|
+
PointerManager._tempRay = new engineMath.Ray();
|
|
6819
|
+
PointerManager._tempPoint = new engineMath.Vector2();
|
|
6820
|
+
PointerManager._tempHitResult = new HitResult();
|
|
6993
6821
|
|
|
6994
6822
|
/**
|
|
6995
6823
|
* Wheel Manager.
|
|
@@ -7062,7 +6890,7 @@ exports.DynamicColliderConstraints = void 0;
|
|
|
7062
6890
|
this._curFrameCount = 0;
|
|
7063
6891
|
// @ts-ignore
|
|
7064
6892
|
var canvas = engine._canvas._webCanvas;
|
|
7065
|
-
if (typeof OffscreenCanvas === "undefined" || !
|
|
6893
|
+
if (typeof OffscreenCanvas === "undefined" || !_instanceof__default['default'](canvas, OffscreenCanvas)) {
|
|
7066
6894
|
this._wheelManager = new WheelManager(canvas);
|
|
7067
6895
|
this._pointerManager = new PointerManager(engine, canvas);
|
|
7068
6896
|
this._keyboardManager = new KeyboardManager(canvas);
|
|
@@ -7195,7 +7023,7 @@ exports.DynamicColliderConstraints = void 0;
|
|
|
7195
7023
|
this._pointerManager._onFocus();
|
|
7196
7024
|
this._keyboardManager._onFocus();
|
|
7197
7025
|
};
|
|
7198
|
-
|
|
7026
|
+
_create_class__default['default'](InputManager, [
|
|
7199
7027
|
{
|
|
7200
7028
|
key: "pointers",
|
|
7201
7029
|
get: /**
|
|
@@ -7228,18 +7056,12 @@ exports.DynamicColliderConstraints = void 0;
|
|
|
7228
7056
|
return InputManager;
|
|
7229
7057
|
}();
|
|
7230
7058
|
|
|
7231
|
-
/**
|
|
7232
|
-
* Number of cascades to use for directional light shadows.
|
|
7233
|
-
*/ exports.ShadowCascadesMode = void 0;
|
|
7234
7059
|
(function(ShadowCascadesMode) {
|
|
7235
7060
|
ShadowCascadesMode[ShadowCascadesMode[/** No cascades */ "NoCascades"] = 1] = "NoCascades";
|
|
7236
7061
|
ShadowCascadesMode[ShadowCascadesMode[/** Two cascades */ "TwoCascades"] = 2] = "TwoCascades";
|
|
7237
7062
|
ShadowCascadesMode[ShadowCascadesMode[/** Four cascades */ "FourCascades"] = 4] = "FourCascades";
|
|
7238
7063
|
})(exports.ShadowCascadesMode || (exports.ShadowCascadesMode = {}));
|
|
7239
7064
|
|
|
7240
|
-
/**
|
|
7241
|
-
* Default shadow resolution.
|
|
7242
|
-
*/ exports.ShadowResolution = void 0;
|
|
7243
7065
|
(function(ShadowResolution) {
|
|
7244
7066
|
ShadowResolution[ShadowResolution[/** Low shadow map resolution. */ "Low"] = 0] = "Low";
|
|
7245
7067
|
ShadowResolution[ShadowResolution[/** Medium shadow map resolution. */ "Medium"] = 1] = "Medium";
|
|
@@ -7247,9 +7069,6 @@ exports.DynamicColliderConstraints = void 0;
|
|
|
7247
7069
|
ShadowResolution[ShadowResolution[/** Very high shadow map resolution. */ "VeryHigh"] = 3] = "VeryHigh";
|
|
7248
7070
|
})(exports.ShadowResolution || (exports.ShadowResolution = {}));
|
|
7249
7071
|
|
|
7250
|
-
/**
|
|
7251
|
-
* Determines which type of shadows should be used.
|
|
7252
|
-
*/ exports.ShadowType = void 0;
|
|
7253
7072
|
(function(ShadowType) {
|
|
7254
7073
|
ShadowType[ShadowType[/** Disable Shadows. */ "None"] = 0] = "None";
|
|
7255
7074
|
ShadowType[ShadowType[/** Hard Shadows Only. */ "Hard"] = 1] = "Hard";
|
|
@@ -7257,19 +7076,12 @@ exports.DynamicColliderConstraints = void 0;
|
|
|
7257
7076
|
ShadowType[ShadowType[/** Cast "soft" shadows with large range. */ "SoftHigh"] = 3] = "SoftHigh";
|
|
7258
7077
|
})(exports.ShadowType || (exports.ShadowType = {}));
|
|
7259
7078
|
|
|
7260
|
-
/**
|
|
7261
|
-
* Render queue type.
|
|
7262
|
-
*/ exports.RenderQueueType = void 0;
|
|
7263
7079
|
(function(RenderQueueType) {
|
|
7264
7080
|
RenderQueueType[RenderQueueType[/** Opaque queue. */ "Opaque"] = 0] = "Opaque";
|
|
7265
7081
|
RenderQueueType[RenderQueueType[/** Opaque queue, alpha cutoff. */ "AlphaTest"] = 1] = "AlphaTest";
|
|
7266
7082
|
RenderQueueType[RenderQueueType[/** Transparent queue, rendering from back to front to ensure correct rendering of transparent objects. */ "Transparent"] = 2] = "Transparent";
|
|
7267
7083
|
})(exports.RenderQueueType || (exports.RenderQueueType = {}));
|
|
7268
7084
|
|
|
7269
|
-
/**
|
|
7270
|
-
* Blend factor.
|
|
7271
|
-
* @remarks defines which function is used for blending pixel arithmetic
|
|
7272
|
-
*/ exports.BlendFactor = void 0;
|
|
7273
7085
|
(function(BlendFactor) {
|
|
7274
7086
|
BlendFactor[BlendFactor[/** (0, 0, 0, 0)*/ "Zero"] = 0] = "Zero";
|
|
7275
7087
|
BlendFactor[BlendFactor[/** (1, 1, 1, 1)*/ "One"] = 1] = "One";
|
|
@@ -7286,10 +7098,6 @@ exports.DynamicColliderConstraints = void 0;
|
|
|
7286
7098
|
BlendFactor[BlendFactor[/** (1 - Rc, 1 - Gc, 1 - Bc, 1 - Ac)*/ "OneMinusBlendColor"] = 12] = "OneMinusBlendColor";
|
|
7287
7099
|
})(exports.BlendFactor || (exports.BlendFactor = {}));
|
|
7288
7100
|
|
|
7289
|
-
/**
|
|
7290
|
-
* Blend operation function.
|
|
7291
|
-
* @remarks defines how a new pixel is combined with a pixel.
|
|
7292
|
-
*/ exports.BlendOperation = void 0;
|
|
7293
7101
|
(function(BlendOperation) {
|
|
7294
7102
|
BlendOperation[BlendOperation[/** src + dst. */ "Add"] = 0] = "Add";
|
|
7295
7103
|
BlendOperation[BlendOperation[/** src - dst. */ "Subtract"] = 1] = "Subtract";
|
|
@@ -7298,10 +7106,6 @@ exports.DynamicColliderConstraints = void 0;
|
|
|
7298
7106
|
BlendOperation[BlendOperation[/** Maximum of source and destination. */ "Max"] = 4] = "Max";
|
|
7299
7107
|
})(exports.BlendOperation || (exports.BlendOperation = {}));
|
|
7300
7108
|
|
|
7301
|
-
/**
|
|
7302
|
-
* Set which color channels can be rendered to frame buffer.
|
|
7303
|
-
* @remarks enumeration can be combined using bit operations.
|
|
7304
|
-
*/ exports.ColorWriteMask = void 0;
|
|
7305
7109
|
(function(ColorWriteMask) {
|
|
7306
7110
|
ColorWriteMask[ColorWriteMask[/** Do not write to any channel. */ "None"] = 0] = "None";
|
|
7307
7111
|
ColorWriteMask[ColorWriteMask[/** Write to the red channel. */ "Red"] = 0x1] = "Red";
|
|
@@ -7311,10 +7115,6 @@ exports.DynamicColliderConstraints = void 0;
|
|
|
7311
7115
|
ColorWriteMask[ColorWriteMask[/** Write to all channel. */ "All"] = 0xf] = "All";
|
|
7312
7116
|
})(exports.ColorWriteMask || (exports.ColorWriteMask = {}));
|
|
7313
7117
|
|
|
7314
|
-
/**
|
|
7315
|
-
* Depth/Stencil comparison function.
|
|
7316
|
-
* @remarks Specifies a function that compares incoming pixel depth/stencil to the current depth/stencil buffer value.
|
|
7317
|
-
*/ exports.CompareFunction = void 0;
|
|
7318
7118
|
(function(CompareFunction) {
|
|
7319
7119
|
CompareFunction[CompareFunction[/** never pass. */ "Never"] = 0] = "Never";
|
|
7320
7120
|
CompareFunction[CompareFunction[/** pass if the incoming value is less than the depth/stencil buffer value. */ "Less"] = 1] = "Less";
|
|
@@ -7326,19 +7126,12 @@ exports.DynamicColliderConstraints = void 0;
|
|
|
7326
7126
|
CompareFunction[CompareFunction[/** always pass. */ "Always"] = 7] = "Always";
|
|
7327
7127
|
})(exports.CompareFunction || (exports.CompareFunction = {}));
|
|
7328
7128
|
|
|
7329
|
-
/**
|
|
7330
|
-
* Culling mode.
|
|
7331
|
-
* @remarks specifies whether or not front- and/or back-facing polygons can be culled.
|
|
7332
|
-
*/ exports.CullMode = void 0;
|
|
7333
7129
|
(function(CullMode) {
|
|
7334
7130
|
CullMode[CullMode[/** Disable culling. */ "Off"] = 0] = "Off";
|
|
7335
7131
|
CullMode[CullMode[/** cut the front-face of the polygons. */ "Front"] = 1] = "Front";
|
|
7336
7132
|
CullMode[CullMode[/** cut the back-face of the polygons. */ "Back"] = 2] = "Back";
|
|
7337
7133
|
})(exports.CullMode || (exports.CullMode = {}));
|
|
7338
7134
|
|
|
7339
|
-
/**
|
|
7340
|
-
* Shader Property type.
|
|
7341
|
-
*/ exports.ShaderPropertyType = void 0;
|
|
7342
7135
|
(function(ShaderPropertyType) {
|
|
7343
7136
|
ShaderPropertyType[ShaderPropertyType[/** Float type. */ "Float"] = 0] = "Float";
|
|
7344
7137
|
ShaderPropertyType[ShaderPropertyType[/** Int type. */ "Int"] = 1] = "Int";
|
|
@@ -7353,10 +7146,6 @@ exports.DynamicColliderConstraints = void 0;
|
|
|
7353
7146
|
ShaderPropertyType[ShaderPropertyType[/** Texture array type. */ "TextureArray"] = 10] = "TextureArray";
|
|
7354
7147
|
})(exports.ShaderPropertyType || (exports.ShaderPropertyType = {}));
|
|
7355
7148
|
|
|
7356
|
-
/**
|
|
7357
|
-
* Stencil operation mode.
|
|
7358
|
-
* @remarks sets the front and/or back-facing stencil test actions.
|
|
7359
|
-
*/ exports.StencilOperation = void 0;
|
|
7360
7149
|
(function(StencilOperation) {
|
|
7361
7150
|
StencilOperation[StencilOperation[/** Keeps the current value. */ "Keep"] = 0] = "Keep";
|
|
7362
7151
|
StencilOperation[StencilOperation[/** Sets the stencil buffer value to 0. */ "Zero"] = 1] = "Zero";
|
|
@@ -7382,12 +7171,8 @@ exports.DynamicColliderConstraints = void 0;
|
|
|
7382
7171
|
}
|
|
7383
7172
|
this._nameId = nameID;
|
|
7384
7173
|
};
|
|
7385
|
-
(
|
|
7386
|
-
|
|
7387
|
-
})();
|
|
7388
|
-
(function() {
|
|
7389
|
-
ShaderMacro._macroNameCounter = 0;
|
|
7390
|
-
})();
|
|
7174
|
+
/** @internal */ ShaderMacro._macroNameIdMap = Object.create(null);
|
|
7175
|
+
ShaderMacro._macroNameCounter = 0;
|
|
7391
7176
|
|
|
7392
7177
|
/**
|
|
7393
7178
|
* Shader macro collection.
|
|
@@ -7539,19 +7324,6 @@ exports.DynamicColliderConstraints = void 0;
|
|
|
7539
7324
|
return ShaderMacroCollection;
|
|
7540
7325
|
}();
|
|
7541
7326
|
|
|
7542
|
-
function _extends() {
|
|
7543
|
-
_extends = Object.assign || function assign(target) {
|
|
7544
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
7545
|
-
var source = arguments[i];
|
|
7546
|
-
for (var key in source) if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
|
|
7547
|
-
}
|
|
7548
|
-
|
|
7549
|
-
return target;
|
|
7550
|
-
};
|
|
7551
|
-
|
|
7552
|
-
return _extends.apply(this, arguments);
|
|
7553
|
-
}
|
|
7554
|
-
|
|
7555
7327
|
var camera_declare = "#define GLSLIFY 1\nuniform vec3 u_cameraPos;"; // eslint-disable-line
|
|
7556
7328
|
|
|
7557
7329
|
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
|
|
@@ -7661,7 +7433,7 @@ var PBRShaderLib = {
|
|
|
7661
7433
|
|
|
7662
7434
|
var ShadowCoord = "#define GLSLIFY 1\nuniform mat4 u_shadowMatrices[CASCADED_COUNT+1];uniform vec4 u_shadowSplitSpheres[4];mediump int computeCascadeIndex(vec3 positionWS){vec3 fromCenter0=positionWS-u_shadowSplitSpheres[0].xyz;vec3 fromCenter1=positionWS-u_shadowSplitSpheres[1].xyz;vec3 fromCenter2=positionWS-u_shadowSplitSpheres[2].xyz;vec3 fromCenter3=positionWS-u_shadowSplitSpheres[3].xyz;mediump vec4 comparison=vec4(dot(fromCenter0,fromCenter0)<u_shadowSplitSpheres[0].w,dot(fromCenter1,fromCenter1)<u_shadowSplitSpheres[1].w,dot(fromCenter2,fromCenter2)<u_shadowSplitSpheres[2].w,dot(fromCenter3,fromCenter3)<u_shadowSplitSpheres[3].w);comparison.yzw=clamp(comparison.yzw-comparison.xyz,0.0,1.0);mediump vec4 indexCoefficient=vec4(4.0,3.0,2.0,1.0);mediump int index=4-int(dot(comparison,indexCoefficient));return index;}vec3 getShadowCoord(){\n#if CASCADED_COUNT == 1\nmediump int cascadeIndex=0;\n#else\nmediump int cascadeIndex=computeCascadeIndex(v_pos);\n#endif\n#ifdef GRAPHICS_API_WEBGL2\nmat4 shadowMatrix=u_shadowMatrices[cascadeIndex];\n#else\nmat4 shadowMatrix;\n#if CASCADED_COUNT == 4\nif(cascadeIndex==0){shadowMatrix=u_shadowMatrices[0];}else if(cascadeIndex==1){shadowMatrix=u_shadowMatrices[1];}else if(cascadeIndex==2){shadowMatrix=u_shadowMatrices[2];}else if(cascadeIndex==3){shadowMatrix=u_shadowMatrices[3];}else{shadowMatrix=u_shadowMatrices[4];}\n#endif\n#if CASCADED_COUNT == 2\nif(cascadeIndex==0){shadowMatrix=u_shadowMatrices[0];}else if(cascadeIndex==1){shadowMatrix=u_shadowMatrices[1];}else{shadowMatrix=u_shadowMatrices[2];}\n#endif\n#if CASCADED_COUNT == 1\nif(cascadeIndex==0){shadowMatrix=u_shadowMatrices[0];}else{shadowMatrix=u_shadowMatrices[1];}\n#endif\n#endif\nvec4 shadowCoord=shadowMatrix*vec4(v_pos,1.0);return shadowCoord.xyz;}"; // eslint-disable-line
|
|
7663
7435
|
|
|
7664
|
-
var ShadowFragmentDeclaration = "#define GLSLIFY 1\n#if defined(SHADOW_TYPE) && defined(OASIS_RECEIVE_SHADOWS)\n#define OASIS_CALCULATE_SHADOWS\n#endif\n#ifdef OASIS_CALCULATE_SHADOWS\n#if CASCADED_COUNT == 1\nvarying vec3 v_shadowCoord;\n#else\n#include <ShadowCoord>\n#endif\nuniform vec3 u_shadowInfo;uniform vec4 u_shadowMapSize;\n#ifdef GRAPHICS_API_WEBGL2\nuniform mediump sampler2DShadow u_shadowMap;\n#define SAMPLE_TEXTURE2D_SHADOW(textureName, coord3) textureLod(textureName, coord3 , 0.0)\n#define TEXTURE2D_SHADOW_PARAM(shadowMap) mediump sampler2DShadow shadowMap\n#else\nuniform sampler2D u_shadowMap;\n#ifdef OASIS_NO_DEPTH_TEXTURE\nconst vec4 bitShift=vec4(1.0,1.0/256.0,1.0/(256.0*256.0),1.0/(256.0*256.0*256.0))
|
|
7436
|
+
var ShadowFragmentDeclaration = "#define GLSLIFY 1\n#if defined(SHADOW_TYPE) && defined(OASIS_RECEIVE_SHADOWS)\n#define OASIS_CALCULATE_SHADOWS\n#endif\n#ifdef OASIS_CALCULATE_SHADOWS\n#if CASCADED_COUNT == 1\nvarying vec3 v_shadowCoord;\n#else\n#include <ShadowCoord>\n#endif\nuniform vec3 u_shadowInfo;uniform vec4 u_shadowMapSize;\n#ifdef GRAPHICS_API_WEBGL2\nuniform mediump sampler2DShadow u_shadowMap;\n#define SAMPLE_TEXTURE2D_SHADOW(textureName, coord3) textureLod(textureName, coord3 , 0.0)\n#define TEXTURE2D_SHADOW_PARAM(shadowMap) mediump sampler2DShadow shadowMap\n#else\nuniform sampler2D u_shadowMap;\n#ifdef OASIS_NO_DEPTH_TEXTURE\nconst vec4 bitShift=vec4(1.0,1.0/256.0,1.0/(256.0*256.0),1.0/(256.0*256.0*256.0));/***Unpack depth value.*/float unpack(const in vec4 rgbaDepth){return dot(rgbaDepth,bitShift);}\n#define SAMPLE_TEXTURE2D_SHADOW(textureName, coord3) (unpack(texture2D(textureName, coord3.xy)) < coord3.z ? 0.0 : 1.0)\n#else\n#define SAMPLE_TEXTURE2D_SHADOW(textureName, coord3) (texture2D(textureName, coord3.xy).r < coord3.z ? 0.0 : 1.0)\n#endif\n#define TEXTURE2D_SHADOW_PARAM(shadowMap) mediump sampler2D shadowMap\n#endif\n#if SHADOW_TYPE == 2\nfloat sampleShadowMapFiltered4(TEXTURE2D_SHADOW_PARAM(shadowMap),vec3 shadowCoord,vec4 shadowMapSize){float attenuation;vec4 attenuation4;vec2 offset=shadowMapSize.xy/2.0;vec3 shadowCoord0=shadowCoord+vec3(-offset,0.0);vec3 shadowCoord1=shadowCoord+vec3(offset.x,-offset.y,0.0);vec3 shadowCoord2=shadowCoord+vec3(-offset.x,offset.y,0.0);vec3 shadowCoord3=shadowCoord+vec3(offset,0.0);attenuation4.x=SAMPLE_TEXTURE2D_SHADOW(shadowMap,shadowCoord0);attenuation4.y=SAMPLE_TEXTURE2D_SHADOW(shadowMap,shadowCoord1);attenuation4.z=SAMPLE_TEXTURE2D_SHADOW(shadowMap,shadowCoord2);attenuation4.w=SAMPLE_TEXTURE2D_SHADOW(shadowMap,shadowCoord3);attenuation=dot(attenuation4,vec4(0.25));return attenuation;}\n#endif\n#if SHADOW_TYPE == 3\n#include <shadow_sample_tent>\nfloat sampleShadowMapFiltered9(TEXTURE2D_SHADOW_PARAM(shadowMap),vec3 shadowCoord,vec4 shadowmapSize){float attenuation;float fetchesWeights[9];vec2 fetchesUV[9];sampleShadowComputeSamplesTent5x5(shadowmapSize,shadowCoord.xy,fetchesWeights,fetchesUV);attenuation=fetchesWeights[0]*SAMPLE_TEXTURE2D_SHADOW(shadowMap,vec3(fetchesUV[0].xy,shadowCoord.z));attenuation+=fetchesWeights[1]*SAMPLE_TEXTURE2D_SHADOW(shadowMap,vec3(fetchesUV[1].xy,shadowCoord.z));attenuation+=fetchesWeights[2]*SAMPLE_TEXTURE2D_SHADOW(shadowMap,vec3(fetchesUV[2].xy,shadowCoord.z));attenuation+=fetchesWeights[3]*SAMPLE_TEXTURE2D_SHADOW(shadowMap,vec3(fetchesUV[3].xy,shadowCoord.z));attenuation+=fetchesWeights[4]*SAMPLE_TEXTURE2D_SHADOW(shadowMap,vec3(fetchesUV[4].xy,shadowCoord.z));attenuation+=fetchesWeights[5]*SAMPLE_TEXTURE2D_SHADOW(shadowMap,vec3(fetchesUV[5].xy,shadowCoord.z));attenuation+=fetchesWeights[6]*SAMPLE_TEXTURE2D_SHADOW(shadowMap,vec3(fetchesUV[6].xy,shadowCoord.z));attenuation+=fetchesWeights[7]*SAMPLE_TEXTURE2D_SHADOW(shadowMap,vec3(fetchesUV[7].xy,shadowCoord.z));attenuation+=fetchesWeights[8]*SAMPLE_TEXTURE2D_SHADOW(shadowMap,vec3(fetchesUV[8].xy,shadowCoord.z));return attenuation;}\n#endif\nfloat sampleShadowMap(){\n#if CASCADED_COUNT == 1\nvec3 shadowCoord=v_shadowCoord;\n#else\nvec3 shadowCoord=getShadowCoord();\n#endif\nfloat attenuation=1.0;if(shadowCoord.z>0.0&&shadowCoord.z<1.0){\n#if SHADOW_TYPE == 1\nattenuation=SAMPLE_TEXTURE2D_SHADOW(u_shadowMap,shadowCoord);\n#endif\n#if SHADOW_TYPE == 2\nattenuation=sampleShadowMapFiltered4(u_shadowMap,shadowCoord,u_shadowMapSize);\n#endif\n#if SHADOW_TYPE == 3\nattenuation=sampleShadowMapFiltered9(u_shadowMap,shadowCoord,u_shadowMapSize);\n#endif\nattenuation=mix(1.0,attenuation,u_shadowInfo.x);}return attenuation;}\n#endif\n"; // eslint-disable-line
|
|
7665
7437
|
|
|
7666
7438
|
var shadow_sample_tent = "#define GLSLIFY 1\nfloat sampleShadowGetIRTriangleTexelArea(float triangleHeight){return triangleHeight-0.5;}void sampleShadowGetTexelAreasTent3x3(float offset,out vec4 computedArea,out vec4 computedAreaUncut){float a=offset+0.5;float offsetSquaredHalved=a*a*0.5;computedAreaUncut.x=computedArea.x=offsetSquaredHalved-offset;computedAreaUncut.w=computedArea.w=offsetSquaredHalved;computedAreaUncut.y=sampleShadowGetIRTriangleTexelArea(1.5-offset);float clampedOffsetLeft=min(offset,0.0);float areaOfSmallLeftTriangle=clampedOffsetLeft*clampedOffsetLeft;computedArea.y=computedAreaUncut.y-areaOfSmallLeftTriangle;computedAreaUncut.z=sampleShadowGetIRTriangleTexelArea(1.5+offset);float clampedOffsetRight=max(offset,0.0);float areaOfSmallRightTriangle=clampedOffsetRight*clampedOffsetRight;computedArea.z=computedAreaUncut.z-areaOfSmallRightTriangle;}void sampleShadowGetTexelWeightsTent5x5(float offset,out vec3 texelsWeightsA,out vec3 texelsWeightsB){vec4 areaFrom3texelTriangle;vec4 areaUncutFrom3texelTriangle;sampleShadowGetTexelAreasTent3x3(offset,areaFrom3texelTriangle,areaUncutFrom3texelTriangle);texelsWeightsA.x=0.16*(areaFrom3texelTriangle.x);texelsWeightsA.y=0.16*(areaUncutFrom3texelTriangle.y);texelsWeightsA.z=0.16*(areaFrom3texelTriangle.y+1.0);texelsWeightsB.x=0.16*(areaFrom3texelTriangle.z+1.0);texelsWeightsB.y=0.16*(areaUncutFrom3texelTriangle.z);texelsWeightsB.z=0.16*(areaFrom3texelTriangle.w);}void sampleShadowComputeSamplesTent5x5(vec4 shadowMapTextureTexelSize,vec2 coord,out float fetchesWeights[9],out vec2 fetchesUV[9]){vec2 tentCenterInTexelSpace=coord.xy*shadowMapTextureTexelSize.zw;vec2 centerOfFetchesInTexelSpace=floor(tentCenterInTexelSpace+0.5);vec2 offsetFromTentCenterToCenterOfFetches=tentCenterInTexelSpace-centerOfFetchesInTexelSpace;vec3 texelsWeightsUA,texelsWeightsUB;vec3 texelsWeightsVA,texelsWeightsVB;sampleShadowGetTexelWeightsTent5x5(offsetFromTentCenterToCenterOfFetches.x,texelsWeightsUA,texelsWeightsUB);sampleShadowGetTexelWeightsTent5x5(offsetFromTentCenterToCenterOfFetches.y,texelsWeightsVA,texelsWeightsVB);vec3 fetchesWeightsU=vec3(texelsWeightsUA.xz,texelsWeightsUB.y)+vec3(texelsWeightsUA.y,texelsWeightsUB.xz);vec3 fetchesWeightsV=vec3(texelsWeightsVA.xz,texelsWeightsVB.y)+vec3(texelsWeightsVA.y,texelsWeightsVB.xz);vec3 fetchesOffsetsU=vec3(texelsWeightsUA.y,texelsWeightsUB.xz)/fetchesWeightsU.xyz+vec3(-2.5,-0.5,1.5);vec3 fetchesOffsetsV=vec3(texelsWeightsVA.y,texelsWeightsVB.xz)/fetchesWeightsV.xyz+vec3(-2.5,-0.5,1.5);fetchesOffsetsU*=shadowMapTextureTexelSize.xxx;fetchesOffsetsV*=shadowMapTextureTexelSize.yyy;vec2 bilinearFetchOrigin=centerOfFetchesInTexelSpace*shadowMapTextureTexelSize.xy;fetchesUV[0]=bilinearFetchOrigin+vec2(fetchesOffsetsU.x,fetchesOffsetsV.x);fetchesUV[1]=bilinearFetchOrigin+vec2(fetchesOffsetsU.y,fetchesOffsetsV.x);fetchesUV[2]=bilinearFetchOrigin+vec2(fetchesOffsetsU.z,fetchesOffsetsV.x);fetchesUV[3]=bilinearFetchOrigin+vec2(fetchesOffsetsU.x,fetchesOffsetsV.y);fetchesUV[4]=bilinearFetchOrigin+vec2(fetchesOffsetsU.y,fetchesOffsetsV.y);fetchesUV[5]=bilinearFetchOrigin+vec2(fetchesOffsetsU.z,fetchesOffsetsV.y);fetchesUV[6]=bilinearFetchOrigin+vec2(fetchesOffsetsU.x,fetchesOffsetsV.z);fetchesUV[7]=bilinearFetchOrigin+vec2(fetchesOffsetsU.y,fetchesOffsetsV.z);fetchesUV[8]=bilinearFetchOrigin+vec2(fetchesOffsetsU.z,fetchesOffsetsV.z);fetchesWeights[0]=fetchesWeightsU.x*fetchesWeightsV.x;fetchesWeights[1]=fetchesWeightsU.y*fetchesWeightsV.x;fetchesWeights[2]=fetchesWeightsU.z*fetchesWeightsV.x;fetchesWeights[3]=fetchesWeightsU.x*fetchesWeightsV.y;fetchesWeights[4]=fetchesWeightsU.y*fetchesWeightsV.y;fetchesWeights[5]=fetchesWeightsU.z*fetchesWeightsV.y;fetchesWeights[6]=fetchesWeightsU.x*fetchesWeightsV.z;fetchesWeights[7]=fetchesWeightsU.y*fetchesWeightsV.z;fetchesWeights[8]=fetchesWeightsU.z*fetchesWeightsV.z;}"; // eslint-disable-line
|
|
7667
7439
|
|
|
@@ -7679,7 +7451,7 @@ var ShadowLib = {
|
|
|
7679
7451
|
|
|
7680
7452
|
var normal_get = "#define GLSLIFY 1\nvec3 getNormal(bool isFrontFacing){\n#ifdef O3_HAS_NORMAL\nvec3 normal=normalize(v_normal);\n#elif defined(HAS_DERIVATIVES)\nvec3 pos_dx=dFdx(v_pos);vec3 pos_dy=dFdy(v_pos);vec3 normal=normalize(cross(pos_dx,pos_dy));\n#else\nvec3 normal=vec3(0,0,1);\n#endif\nnormal*=float(isFrontFacing)*2.0-1.0;return normal;}vec3 getNormalByNormalTexture(mat3 tbn,sampler2D normalTexture,float normalIntensity,vec2 uv,bool isFrontFacing){vec3 normal=texture2D(normalTexture,uv).rgb;normal=normalize(tbn*((2.0*normal-1.0)*vec3(normalIntensity,normalIntensity,1.0)));normal*=float(isFrontFacing)*2.0-1.0;return normal;}mat3 getTBN(bool isFrontFacing){\n#if defined(O3_HAS_NORMAL) && defined(O3_HAS_TANGENT) && ( defined(NORMALTEXTURE) || defined(HAS_CLEARCOATNORMALTEXTURE) )\nmat3 tbn=v_TBN;\n#else\nvec3 normal=getNormal(isFrontFacing);vec3 position=v_pos;vec2 uv=isFrontFacing? v_uv:-v_uv;\n#ifdef HAS_DERIVATIVES\nvec3 dp1=dFdx(position);vec3 dp2=dFdy(position);vec2 duv1=dFdx(uv);vec2 duv2=dFdy(uv);vec3 dp2perp=cross(dp2,normal);vec3 dp1perp=cross(normal,dp1);vec3 tangent=dp2perp*duv1.x+dp1perp*duv2.x;vec3 binormal=dp2perp*duv1.y+dp1perp*duv2.y;float invmax=inversesqrt(max(dot(tangent,tangent),dot(binormal,binormal)));mat3 tbn=mat3(tangent*invmax,binormal*invmax,normal);\n#else\nmat3 tbn=mat3(vec3(0.0),vec3(0.0),normal);\n#endif\n#endif\nreturn tbn;}"; // eslint-disable-line
|
|
7681
7453
|
|
|
7682
|
-
var ShaderLib =
|
|
7454
|
+
var ShaderLib = _extends__default['default']({
|
|
7683
7455
|
common: common,
|
|
7684
7456
|
common_vert: common_vert,
|
|
7685
7457
|
transform_declare: transform_declare,
|
|
@@ -8391,7 +8163,7 @@ var ShaderFactory = /*#__PURE__*/ function() {
|
|
|
8391
8163
|
return prefix + line;
|
|
8392
8164
|
}).join("\n");
|
|
8393
8165
|
};
|
|
8394
|
-
|
|
8166
|
+
_create_class__default['default'](ShaderProgram, [
|
|
8395
8167
|
{
|
|
8396
8168
|
key: "isValid",
|
|
8397
8169
|
get: /**
|
|
@@ -8403,9 +8175,7 @@ var ShaderFactory = /*#__PURE__*/ function() {
|
|
|
8403
8175
|
]);
|
|
8404
8176
|
return ShaderProgram;
|
|
8405
8177
|
}();
|
|
8406
|
-
|
|
8407
|
-
ShaderProgram._counter = 0;
|
|
8408
|
-
})();
|
|
8178
|
+
ShaderProgram._counter = 0;
|
|
8409
8179
|
|
|
8410
8180
|
/**
|
|
8411
8181
|
* Shader pass containing vertex and fragment source.
|
|
@@ -8450,9 +8220,7 @@ var ShaderFactory = /*#__PURE__*/ function() {
|
|
|
8450
8220
|
};
|
|
8451
8221
|
return ShaderPass;
|
|
8452
8222
|
}();
|
|
8453
|
-
|
|
8454
|
-
ShaderPass._shaderPassCounter = 0;
|
|
8455
|
-
})();
|
|
8223
|
+
ShaderPass._shaderPassCounter = 0;
|
|
8456
8224
|
|
|
8457
8225
|
/**
|
|
8458
8226
|
* Shader property.
|
|
@@ -8461,7 +8229,7 @@ var ShaderFactory = /*#__PURE__*/ function() {
|
|
|
8461
8229
|
this.name = name;
|
|
8462
8230
|
this._uniqueId = ShaderProperty._propertyNameCounter++;
|
|
8463
8231
|
}
|
|
8464
|
-
|
|
8232
|
+
_create_class__default['default'](ShaderProperty, [
|
|
8465
8233
|
{
|
|
8466
8234
|
key: "type",
|
|
8467
8235
|
get: /**
|
|
@@ -8473,9 +8241,7 @@ var ShaderFactory = /*#__PURE__*/ function() {
|
|
|
8473
8241
|
]);
|
|
8474
8242
|
return ShaderProperty;
|
|
8475
8243
|
}();
|
|
8476
|
-
|
|
8477
|
-
ShaderProperty._propertyNameCounter = 0;
|
|
8478
|
-
})();
|
|
8244
|
+
ShaderProperty._propertyNameCounter = 0;
|
|
8479
8245
|
|
|
8480
8246
|
/**
|
|
8481
8247
|
* Shader for rendering.
|
|
@@ -8588,7 +8354,7 @@ var ShaderFactory = /*#__PURE__*/ function() {
|
|
|
8588
8354
|
}
|
|
8589
8355
|
}
|
|
8590
8356
|
};
|
|
8591
|
-
|
|
8357
|
+
_create_class__default['default'](Shader, [
|
|
8592
8358
|
{
|
|
8593
8359
|
key: "passes",
|
|
8594
8360
|
get: /**
|
|
@@ -8600,34 +8366,18 @@ var ShaderFactory = /*#__PURE__*/ function() {
|
|
|
8600
8366
|
]);
|
|
8601
8367
|
return Shader;
|
|
8602
8368
|
}();
|
|
8603
|
-
(
|
|
8604
|
-
|
|
8605
|
-
|
|
8606
|
-
|
|
8607
|
-
|
|
8608
|
-
|
|
8609
|
-
|
|
8610
|
-
|
|
8611
|
-
|
|
8612
|
-
|
|
8613
|
-
|
|
8614
|
-
|
|
8615
|
-
})();
|
|
8616
|
-
(function() {
|
|
8617
|
-
Shader._shaderMap = Object.create(null);
|
|
8618
|
-
})();
|
|
8619
|
-
(function() {
|
|
8620
|
-
Shader._propertyNameMap = Object.create(null);
|
|
8621
|
-
})();
|
|
8622
|
-
(function() {
|
|
8623
|
-
Shader._macroMaskMap = [];
|
|
8624
|
-
})();
|
|
8625
|
-
(function() {
|
|
8626
|
-
Shader._macroCounter = 0;
|
|
8627
|
-
})();
|
|
8628
|
-
(function() {
|
|
8629
|
-
Shader._macroMap = Object.create(null);
|
|
8630
|
-
})();
|
|
8369
|
+
/** @internal */ Shader._compileMacros = new ShaderMacroCollection();
|
|
8370
|
+
/** @internal */ Shader._shaderExtension = [
|
|
8371
|
+
"GL_EXT_shader_texture_lod",
|
|
8372
|
+
"GL_OES_standard_derivatives",
|
|
8373
|
+
"GL_EXT_draw_buffers"
|
|
8374
|
+
];
|
|
8375
|
+
/** @internal */ Shader._propertyIdMap = Object.create(null);
|
|
8376
|
+
Shader._shaderMap = Object.create(null);
|
|
8377
|
+
Shader._propertyNameMap = Object.create(null);
|
|
8378
|
+
Shader._macroMaskMap = [];
|
|
8379
|
+
Shader._macroCounter = 0;
|
|
8380
|
+
Shader._macroMap = Object.create(null);
|
|
8631
8381
|
|
|
8632
8382
|
/**
|
|
8633
8383
|
* Shader data collection,Correspondence includes shader properties data and macros data.
|
|
@@ -8809,10 +8559,10 @@ var ShaderFactory = /*#__PURE__*/ function() {
|
|
|
8809
8559
|
if (property != null) {
|
|
8810
8560
|
if (typeof property === "number") {
|
|
8811
8561
|
targetPropertyValueMap[k] = property;
|
|
8812
|
-
} else if (
|
|
8562
|
+
} else if (_instanceof__default['default'](property, Texture)) {
|
|
8813
8563
|
targetPropertyValueMap[k] = property;
|
|
8814
8564
|
referCount > 0 && property._addRefCount(referCount);
|
|
8815
|
-
} else if (
|
|
8565
|
+
} else if (_instanceof__default['default'](property, Array) || _instanceof__default['default'](property, Float32Array) || _instanceof__default['default'](property, Int32Array)) {
|
|
8816
8566
|
targetPropertyValueMap[k] = property.slice();
|
|
8817
8567
|
} else {
|
|
8818
8568
|
var targetProperty = targetPropertyValueMap[k];
|
|
@@ -8862,7 +8612,7 @@ var ShaderFactory = /*#__PURE__*/ function() {
|
|
|
8862
8612
|
for(var k in properties){
|
|
8863
8613
|
var property = properties[k];
|
|
8864
8614
|
// @todo: Separate array to speed performance.
|
|
8865
|
-
if (property &&
|
|
8615
|
+
if (property && _instanceof__default['default'](property, Texture)) {
|
|
8866
8616
|
property._addRefCount(value);
|
|
8867
8617
|
}
|
|
8868
8618
|
}
|
|
@@ -8873,7 +8623,7 @@ var ShaderFactory = /*#__PURE__*/ function() {
|
|
|
8873
8623
|
/**
|
|
8874
8624
|
* Light base class.
|
|
8875
8625
|
*/ var Light = /*#__PURE__*/ function(Component) {
|
|
8876
|
-
|
|
8626
|
+
_inherits__default['default'](Light, Component);
|
|
8877
8627
|
function Light() {
|
|
8878
8628
|
var _this;
|
|
8879
8629
|
_this = Component.apply(this, arguments) || this;
|
|
@@ -8887,9 +8637,9 @@ var ShaderFactory = /*#__PURE__*/ function() {
|
|
|
8887
8637
|
/** Shadow mapping normal-based bias. */ _this.shadowNormalBias = 1;
|
|
8888
8638
|
/** Near plane value to use for shadow frustums. */ _this.shadowNearPlane = 0.1;
|
|
8889
8639
|
/** Shadow intensity, the larger the value, the clearer and darker the shadow. */ _this.shadowStrength = 1.0;
|
|
8890
|
-
/** @internal */ _this._lightIndex = -1;
|
|
8891
8640
|
_this._color = new engineMath.Color(1, 1, 1, 1);
|
|
8892
8641
|
_this._lightColor = new engineMath.Color();
|
|
8642
|
+
/** @internal */ _this._lightIndex = -1;
|
|
8893
8643
|
return _this;
|
|
8894
8644
|
}
|
|
8895
8645
|
var _proto = Light.prototype;
|
|
@@ -8900,7 +8650,7 @@ var ShaderFactory = /*#__PURE__*/ function() {
|
|
|
8900
8650
|
this._lightColor.a = this.color.a * this.intensity;
|
|
8901
8651
|
return this._lightColor;
|
|
8902
8652
|
};
|
|
8903
|
-
|
|
8653
|
+
_create_class__default['default'](Light, [
|
|
8904
8654
|
{
|
|
8905
8655
|
key: "color",
|
|
8906
8656
|
get: /**
|
|
@@ -8937,19 +8687,17 @@ var ShaderFactory = /*#__PURE__*/ function() {
|
|
|
8937
8687
|
]);
|
|
8938
8688
|
return Light;
|
|
8939
8689
|
}(Component);
|
|
8940
|
-
|
|
8941
|
-
/**
|
|
8690
|
+
/**
|
|
8942
8691
|
* Each type of light source is at most 10, beyond which it will not take effect.
|
|
8943
8692
|
* */ Light._maxLight = 10;
|
|
8944
|
-
|
|
8945
|
-
__decorate([
|
|
8693
|
+
_ts_decorate__default['default']([
|
|
8946
8694
|
ignoreClone
|
|
8947
8695
|
], Light.prototype, "_lightIndex", void 0);
|
|
8948
8696
|
|
|
8949
8697
|
/**
|
|
8950
8698
|
* Directional light.
|
|
8951
8699
|
*/ var DirectLight = /*#__PURE__*/ function(Light) {
|
|
8952
|
-
|
|
8700
|
+
_inherits__default['default'](DirectLight, Light);
|
|
8953
8701
|
function DirectLight() {
|
|
8954
8702
|
var _this;
|
|
8955
8703
|
_this = Light.apply(this, arguments) || this;
|
|
@@ -8999,7 +8747,7 @@ __decorate([
|
|
|
8999
8747
|
shaderData.setFloatArray(DirectLight._colorProperty, data.color);
|
|
9000
8748
|
shaderData.setFloatArray(DirectLight._directionProperty, data.direction);
|
|
9001
8749
|
};
|
|
9002
|
-
|
|
8750
|
+
_create_class__default['default'](DirectLight, [
|
|
9003
8751
|
{
|
|
9004
8752
|
key: "direction",
|
|
9005
8753
|
get: /**
|
|
@@ -9030,27 +8778,19 @@ __decorate([
|
|
|
9030
8778
|
]);
|
|
9031
8779
|
return DirectLight;
|
|
9032
8780
|
}(Light);
|
|
9033
|
-
(
|
|
9034
|
-
|
|
9035
|
-
|
|
9036
|
-
|
|
9037
|
-
|
|
9038
|
-
|
|
9039
|
-
(
|
|
9040
|
-
|
|
9041
|
-
})();
|
|
9042
|
-
(function() {
|
|
9043
|
-
DirectLight._combinedData = {
|
|
9044
|
-
cullingMask: new Int32Array(Light._maxLight * 2),
|
|
9045
|
-
color: new Float32Array(Light._maxLight * 3),
|
|
9046
|
-
direction: new Float32Array(Light._maxLight * 3)
|
|
9047
|
-
};
|
|
9048
|
-
})();
|
|
8781
|
+
DirectLight._cullingMaskProperty = Shader.getPropertyByName("u_directLightCullingMask");
|
|
8782
|
+
DirectLight._colorProperty = Shader.getPropertyByName("u_directLightColor");
|
|
8783
|
+
DirectLight._directionProperty = Shader.getPropertyByName("u_directLightDirection");
|
|
8784
|
+
DirectLight._combinedData = {
|
|
8785
|
+
cullingMask: new Int32Array(Light._maxLight * 2),
|
|
8786
|
+
color: new Float32Array(Light._maxLight * 3),
|
|
8787
|
+
direction: new Float32Array(Light._maxLight * 3)
|
|
8788
|
+
};
|
|
9049
8789
|
|
|
9050
8790
|
/**
|
|
9051
8791
|
* Point light.
|
|
9052
8792
|
*/ var PointLight = /*#__PURE__*/ function(Light) {
|
|
9053
|
-
|
|
8793
|
+
_inherits__default['default'](PointLight, Light);
|
|
9054
8794
|
function PointLight() {
|
|
9055
8795
|
var _this;
|
|
9056
8796
|
_this = Light.apply(this, arguments) || this;
|
|
@@ -9102,7 +8842,7 @@ __decorate([
|
|
|
9102
8842
|
shaderData.setFloatArray(PointLight._positionProperty, data.position);
|
|
9103
8843
|
shaderData.setFloatArray(PointLight._distanceProperty, data.distance);
|
|
9104
8844
|
};
|
|
9105
|
-
|
|
8845
|
+
_create_class__default['default'](PointLight, [
|
|
9106
8846
|
{
|
|
9107
8847
|
key: "position",
|
|
9108
8848
|
get: /**
|
|
@@ -9123,31 +8863,21 @@ __decorate([
|
|
|
9123
8863
|
]);
|
|
9124
8864
|
return PointLight;
|
|
9125
8865
|
}(Light);
|
|
9126
|
-
(
|
|
9127
|
-
|
|
9128
|
-
|
|
9129
|
-
(
|
|
9130
|
-
|
|
9131
|
-
|
|
9132
|
-
(
|
|
9133
|
-
|
|
9134
|
-
|
|
9135
|
-
|
|
9136
|
-
PointLight._distanceProperty = Shader.getPropertyByName("u_pointLightDistance");
|
|
9137
|
-
})();
|
|
9138
|
-
(function() {
|
|
9139
|
-
PointLight._combinedData = {
|
|
9140
|
-
cullingMask: new Int32Array(Light._maxLight * 2),
|
|
9141
|
-
color: new Float32Array(Light._maxLight * 3),
|
|
9142
|
-
position: new Float32Array(Light._maxLight * 3),
|
|
9143
|
-
distance: new Float32Array(Light._maxLight)
|
|
9144
|
-
};
|
|
9145
|
-
})();
|
|
8866
|
+
PointLight._cullingMaskProperty = Shader.getPropertyByName("u_pointLightCullingMask");
|
|
8867
|
+
PointLight._colorProperty = Shader.getPropertyByName("u_pointLightColor");
|
|
8868
|
+
PointLight._positionProperty = Shader.getPropertyByName("u_pointLightPosition");
|
|
8869
|
+
PointLight._distanceProperty = Shader.getPropertyByName("u_pointLightDistance");
|
|
8870
|
+
PointLight._combinedData = {
|
|
8871
|
+
cullingMask: new Int32Array(Light._maxLight * 2),
|
|
8872
|
+
color: new Float32Array(Light._maxLight * 3),
|
|
8873
|
+
position: new Float32Array(Light._maxLight * 3),
|
|
8874
|
+
distance: new Float32Array(Light._maxLight)
|
|
8875
|
+
};
|
|
9146
8876
|
|
|
9147
8877
|
/**
|
|
9148
8878
|
* Spot light.
|
|
9149
8879
|
*/ var SpotLight = /*#__PURE__*/ function(Light) {
|
|
9150
|
-
|
|
8880
|
+
_inherits__default['default'](SpotLight, Light);
|
|
9151
8881
|
function SpotLight() {
|
|
9152
8882
|
var _this;
|
|
9153
8883
|
_this = Light.apply(this, arguments) || this;
|
|
@@ -9216,7 +8946,7 @@ __decorate([
|
|
|
9216
8946
|
shaderData.setFloatArray(SpotLight._angleCosProperty, data.angleCos);
|
|
9217
8947
|
shaderData.setFloatArray(SpotLight._penumbraCosProperty, data.penumbraCos);
|
|
9218
8948
|
};
|
|
9219
|
-
|
|
8949
|
+
_create_class__default['default'](SpotLight, [
|
|
9220
8950
|
{
|
|
9221
8951
|
key: "position",
|
|
9222
8952
|
get: /**
|
|
@@ -9258,38 +8988,22 @@ __decorate([
|
|
|
9258
8988
|
]);
|
|
9259
8989
|
return SpotLight;
|
|
9260
8990
|
}(Light);
|
|
9261
|
-
(
|
|
9262
|
-
|
|
9263
|
-
|
|
9264
|
-
(
|
|
9265
|
-
|
|
9266
|
-
|
|
9267
|
-
(
|
|
9268
|
-
|
|
9269
|
-
|
|
9270
|
-
(
|
|
9271
|
-
|
|
9272
|
-
|
|
9273
|
-
(
|
|
9274
|
-
|
|
9275
|
-
|
|
9276
|
-
|
|
9277
|
-
SpotLight._angleCosProperty = Shader.getPropertyByName("u_spotLightAngleCos");
|
|
9278
|
-
})();
|
|
9279
|
-
(function() {
|
|
9280
|
-
SpotLight._penumbraCosProperty = Shader.getPropertyByName("u_spotLightPenumbraCos");
|
|
9281
|
-
})();
|
|
9282
|
-
(function() {
|
|
9283
|
-
SpotLight._combinedData = {
|
|
9284
|
-
cullingMask: new Int32Array(Light._maxLight * 2),
|
|
9285
|
-
color: new Float32Array(Light._maxLight * 3),
|
|
9286
|
-
position: new Float32Array(Light._maxLight * 3),
|
|
9287
|
-
direction: new Float32Array(Light._maxLight * 3),
|
|
9288
|
-
distance: new Float32Array(Light._maxLight),
|
|
9289
|
-
angleCos: new Float32Array(Light._maxLight),
|
|
9290
|
-
penumbraCos: new Float32Array(Light._maxLight)
|
|
9291
|
-
};
|
|
9292
|
-
})();
|
|
8991
|
+
SpotLight._cullingMaskProperty = Shader.getPropertyByName("u_spotLightCullingMask");
|
|
8992
|
+
SpotLight._colorProperty = Shader.getPropertyByName("u_spotLightColor");
|
|
8993
|
+
SpotLight._positionProperty = Shader.getPropertyByName("u_spotLightPosition");
|
|
8994
|
+
SpotLight._directionProperty = Shader.getPropertyByName("u_spotLightDirection");
|
|
8995
|
+
SpotLight._distanceProperty = Shader.getPropertyByName("u_spotLightDistance");
|
|
8996
|
+
SpotLight._angleCosProperty = Shader.getPropertyByName("u_spotLightAngleCos");
|
|
8997
|
+
SpotLight._penumbraCosProperty = Shader.getPropertyByName("u_spotLightPenumbraCos");
|
|
8998
|
+
SpotLight._combinedData = {
|
|
8999
|
+
cullingMask: new Int32Array(Light._maxLight * 2),
|
|
9000
|
+
color: new Float32Array(Light._maxLight * 3),
|
|
9001
|
+
position: new Float32Array(Light._maxLight * 3),
|
|
9002
|
+
direction: new Float32Array(Light._maxLight * 3),
|
|
9003
|
+
distance: new Float32Array(Light._maxLight),
|
|
9004
|
+
angleCos: new Float32Array(Light._maxLight),
|
|
9005
|
+
penumbraCos: new Float32Array(Light._maxLight)
|
|
9006
|
+
};
|
|
9293
9007
|
|
|
9294
9008
|
/**
|
|
9295
9009
|
* Light manager.
|
|
@@ -9811,7 +9525,7 @@ __decorate([
|
|
|
9811
9525
|
/**
|
|
9812
9526
|
* Material.
|
|
9813
9527
|
*/ var Material = /*#__PURE__*/ function(RefObject) {
|
|
9814
|
-
|
|
9528
|
+
_inherits__default['default'](Material, RefObject);
|
|
9815
9529
|
function Material(engine, shader) {
|
|
9816
9530
|
var _this;
|
|
9817
9531
|
_this = RefObject.call(this, engine) || this;
|
|
@@ -9855,7 +9569,7 @@ __decorate([
|
|
|
9855
9569
|
this._renderStates.length = 0;
|
|
9856
9570
|
this._renderStates = null;
|
|
9857
9571
|
};
|
|
9858
|
-
|
|
9572
|
+
_create_class__default['default'](Material, [
|
|
9859
9573
|
{
|
|
9860
9574
|
key: "shaderData",
|
|
9861
9575
|
get: /**
|
|
@@ -9947,7 +9661,7 @@ var RenderElement = function RenderElement() {
|
|
|
9947
9661
|
/**
|
|
9948
9662
|
* Render element.
|
|
9949
9663
|
*/ var MeshRenderElement = /*#__PURE__*/ function(RenderElement) {
|
|
9950
|
-
|
|
9664
|
+
_inherits__default['default'](MeshRenderElement, RenderElement);
|
|
9951
9665
|
function MeshRenderElement() {
|
|
9952
9666
|
return RenderElement.apply(this, arguments);
|
|
9953
9667
|
}
|
|
@@ -9981,18 +9695,12 @@ var RenderElement = function RenderElement() {
|
|
|
9981
9695
|
};
|
|
9982
9696
|
return RenderContext;
|
|
9983
9697
|
}();
|
|
9984
|
-
(
|
|
9985
|
-
|
|
9986
|
-
|
|
9987
|
-
(function() {
|
|
9988
|
-
RenderContext._viewMatrixProperty = Shader.getPropertyByName("u_viewMat");
|
|
9989
|
-
})();
|
|
9990
|
-
(function() {
|
|
9991
|
-
RenderContext._projectionMatrixProperty = Shader.getPropertyByName("u_projMat");
|
|
9992
|
-
})();
|
|
9698
|
+
/** @internal */ RenderContext._vpMatrixProperty = Shader.getPropertyByName("u_VPMat");
|
|
9699
|
+
RenderContext._viewMatrixProperty = Shader.getPropertyByName("u_viewMat");
|
|
9700
|
+
RenderContext._projectionMatrixProperty = Shader.getPropertyByName("u_projMat");
|
|
9993
9701
|
|
|
9994
9702
|
var SpriteElement = /*#__PURE__*/ function(RenderElement) {
|
|
9995
|
-
|
|
9703
|
+
_inherits__default['default'](SpriteElement, RenderElement);
|
|
9996
9704
|
function SpriteElement() {
|
|
9997
9705
|
var _this;
|
|
9998
9706
|
_this = RenderElement.call(this) || this;
|
|
@@ -10015,7 +9723,7 @@ var SpriteElement = /*#__PURE__*/ function(RenderElement) {
|
|
|
10015
9723
|
}(RenderElement);
|
|
10016
9724
|
|
|
10017
9725
|
var SpriteMaskElement = /*#__PURE__*/ function(RenderElement) {
|
|
10018
|
-
|
|
9726
|
+
_inherits__default['default'](SpriteMaskElement, RenderElement);
|
|
10019
9727
|
function SpriteMaskElement() {
|
|
10020
9728
|
var _this;
|
|
10021
9729
|
_this = RenderElement.call(this) || this;
|
|
@@ -10035,9 +9743,6 @@ var SpriteMaskElement = /*#__PURE__*/ function(RenderElement) {
|
|
|
10035
9743
|
return SpriteMaskElement;
|
|
10036
9744
|
}(RenderElement);
|
|
10037
9745
|
|
|
10038
|
-
/**
|
|
10039
|
-
* Sprite mask interaction.
|
|
10040
|
-
*/ exports.SpriteMaskInteraction = void 0;
|
|
10041
9746
|
(function(SpriteMaskInteraction) {
|
|
10042
9747
|
SpriteMaskInteraction[SpriteMaskInteraction[/** The sprite will not interact with the masking system. */ "None"] = 0] = "None";
|
|
10043
9748
|
SpriteMaskInteraction[SpriteMaskInteraction[/** The sprite will be visible only in areas where a mask is present. */ "VisibleInsideMask"] = 1] = "VisibleInsideMask";
|
|
@@ -10046,10 +9751,11 @@ var SpriteMaskElement = /*#__PURE__*/ function(RenderElement) {
|
|
|
10046
9751
|
|
|
10047
9752
|
var _Renderer;
|
|
10048
9753
|
exports.Renderer = (_Renderer = /*#__PURE__*/ function(Component) {
|
|
10049
|
-
|
|
9754
|
+
_inherits__default['default'](Renderer1, Component);
|
|
10050
9755
|
function Renderer1(entity) {
|
|
10051
9756
|
var _this;
|
|
10052
9757
|
_this = Component.call(this, entity) || this;
|
|
9758
|
+
/** Whether cast shadow. */ _this.castShadows = true;
|
|
10053
9759
|
/** @internal */ _this._onUpdateIndex = -1;
|
|
10054
9760
|
/** @internal */ _this._rendererIndex = -1;
|
|
10055
9761
|
/** @internal */ _this._globalShaderMacro = new ShaderMacroCollection();
|
|
@@ -10066,12 +9772,11 @@ exports.Renderer = (_Renderer = /*#__PURE__*/ function(Component) {
|
|
|
10066
9772
|
_this._priority = 0;
|
|
10067
9773
|
_this._receiveShadows = true;
|
|
10068
9774
|
_this._rendererLayer = new engineMath.Vector4();
|
|
10069
|
-
/** Whether cast shadow. */ _this.castShadows = true;
|
|
10070
9775
|
var prototype = exports.Renderer.prototype;
|
|
10071
9776
|
var shaderData = _this.shaderData;
|
|
10072
9777
|
_this._overrideUpdate = _this.update !== prototype.update;
|
|
10073
9778
|
shaderData._addRefCount(1);
|
|
10074
|
-
_this._onTransformChanged = _this._onTransformChanged.bind(
|
|
9779
|
+
_this._onTransformChanged = _this._onTransformChanged.bind(_assert_this_initialized__default['default'](_this));
|
|
10075
9780
|
_this._registerEntityTransformListener();
|
|
10076
9781
|
shaderData.enableMacro(exports.Renderer._receiveShadowMacro);
|
|
10077
9782
|
shaderData.setVector4(exports.Renderer._rendererLayerProperty, _this._rendererLayer);
|
|
@@ -10275,7 +9980,7 @@ exports.Renderer = (_Renderer = /*#__PURE__*/ function(Component) {
|
|
|
10275
9980
|
_proto._onTransformChanged = function _onTransformChanged(type) {
|
|
10276
9981
|
this._dirtyUpdateFlag |= 0x1;
|
|
10277
9982
|
};
|
|
10278
|
-
|
|
9983
|
+
_create_class__default['default'](Renderer1, [
|
|
10279
9984
|
{
|
|
10280
9985
|
key: "shaderData",
|
|
10281
9986
|
get: /**
|
|
@@ -10349,83 +10054,65 @@ exports.Renderer = (_Renderer = /*#__PURE__*/ function(Component) {
|
|
|
10349
10054
|
}
|
|
10350
10055
|
]);
|
|
10351
10056
|
return Renderer1;
|
|
10352
|
-
}(Component),
|
|
10353
|
-
|
|
10354
|
-
}(), function() {
|
|
10355
|
-
_Renderer._receiveShadowMacro = Shader.getMacroByName("OASIS_RECEIVE_SHADOWS");
|
|
10356
|
-
}(), function() {
|
|
10357
|
-
_Renderer._localMatrixProperty = Shader.getPropertyByName("u_localMat");
|
|
10358
|
-
}(), function() {
|
|
10359
|
-
_Renderer._worldMatrixProperty = Shader.getPropertyByName("u_modelMat");
|
|
10360
|
-
}(), function() {
|
|
10361
|
-
_Renderer._mvMatrixProperty = Shader.getPropertyByName("u_MVMat");
|
|
10362
|
-
}(), function() {
|
|
10363
|
-
_Renderer._mvpMatrixProperty = Shader.getPropertyByName("u_MVPMat");
|
|
10364
|
-
}(), function() {
|
|
10365
|
-
_Renderer._mvInvMatrixProperty = Shader.getPropertyByName("u_MVInvMat");
|
|
10366
|
-
}(), function() {
|
|
10367
|
-
_Renderer._normalMatrixProperty = Shader.getPropertyByName("u_normalMat");
|
|
10368
|
-
}(), function() {
|
|
10369
|
-
_Renderer._rendererLayerProperty = Shader.getPropertyByName("oasis_RendererLayer");
|
|
10370
|
-
}(), _Renderer);
|
|
10371
|
-
__decorate([
|
|
10057
|
+
}(Component), _Renderer._tempVector0 = new engineMath.Vector3(), _Renderer._receiveShadowMacro = Shader.getMacroByName("OASIS_RECEIVE_SHADOWS"), _Renderer._localMatrixProperty = Shader.getPropertyByName("u_localMat"), _Renderer._worldMatrixProperty = Shader.getPropertyByName("u_modelMat"), _Renderer._mvMatrixProperty = Shader.getPropertyByName("u_MVMat"), _Renderer._mvpMatrixProperty = Shader.getPropertyByName("u_MVPMat"), _Renderer._mvInvMatrixProperty = Shader.getPropertyByName("u_MVInvMat"), _Renderer._normalMatrixProperty = Shader.getPropertyByName("u_normalMat"), _Renderer._rendererLayerProperty = Shader.getPropertyByName("oasis_RendererLayer"), _Renderer);
|
|
10058
|
+
_ts_decorate__default['default']([
|
|
10372
10059
|
ignoreClone
|
|
10373
10060
|
], exports.Renderer.prototype, "_distanceForSort", void 0);
|
|
10374
|
-
|
|
10061
|
+
_ts_decorate__default['default']([
|
|
10375
10062
|
ignoreClone
|
|
10376
10063
|
], exports.Renderer.prototype, "_onUpdateIndex", void 0);
|
|
10377
|
-
|
|
10064
|
+
_ts_decorate__default['default']([
|
|
10378
10065
|
ignoreClone
|
|
10379
10066
|
], exports.Renderer.prototype, "_rendererIndex", void 0);
|
|
10380
|
-
|
|
10067
|
+
_ts_decorate__default['default']([
|
|
10381
10068
|
ignoreClone
|
|
10382
10069
|
], exports.Renderer.prototype, "_globalShaderMacro", void 0);
|
|
10383
|
-
|
|
10070
|
+
_ts_decorate__default['default']([
|
|
10384
10071
|
deepClone
|
|
10385
10072
|
], exports.Renderer.prototype, "_bounds", void 0);
|
|
10386
|
-
|
|
10073
|
+
_ts_decorate__default['default']([
|
|
10387
10074
|
ignoreClone
|
|
10388
10075
|
], exports.Renderer.prototype, "_renderFrameCount", void 0);
|
|
10389
|
-
|
|
10076
|
+
_ts_decorate__default['default']([
|
|
10390
10077
|
ignoreClone
|
|
10391
10078
|
], exports.Renderer.prototype, "_overrideUpdate", void 0);
|
|
10392
|
-
|
|
10079
|
+
_ts_decorate__default['default']([
|
|
10393
10080
|
ignoreClone
|
|
10394
10081
|
], exports.Renderer.prototype, "_materials", void 0);
|
|
10395
|
-
|
|
10082
|
+
_ts_decorate__default['default']([
|
|
10396
10083
|
ignoreClone
|
|
10397
10084
|
], exports.Renderer.prototype, "_dirtyUpdateFlag", void 0);
|
|
10398
|
-
|
|
10085
|
+
_ts_decorate__default['default']([
|
|
10399
10086
|
deepClone
|
|
10400
10087
|
], exports.Renderer.prototype, "_shaderData", void 0);
|
|
10401
|
-
|
|
10088
|
+
_ts_decorate__default['default']([
|
|
10402
10089
|
ignoreClone
|
|
10403
10090
|
], exports.Renderer.prototype, "_mvMatrix", void 0);
|
|
10404
|
-
|
|
10091
|
+
_ts_decorate__default['default']([
|
|
10405
10092
|
ignoreClone
|
|
10406
10093
|
], exports.Renderer.prototype, "_mvpMatrix", void 0);
|
|
10407
|
-
|
|
10094
|
+
_ts_decorate__default['default']([
|
|
10408
10095
|
ignoreClone
|
|
10409
10096
|
], exports.Renderer.prototype, "_mvInvMatrix", void 0);
|
|
10410
|
-
|
|
10097
|
+
_ts_decorate__default['default']([
|
|
10411
10098
|
ignoreClone
|
|
10412
10099
|
], exports.Renderer.prototype, "_normalMatrix", void 0);
|
|
10413
|
-
|
|
10100
|
+
_ts_decorate__default['default']([
|
|
10414
10101
|
ignoreClone
|
|
10415
10102
|
], exports.Renderer.prototype, "_materialsInstanced", void 0);
|
|
10416
|
-
|
|
10103
|
+
_ts_decorate__default['default']([
|
|
10417
10104
|
ignoreClone
|
|
10418
10105
|
], exports.Renderer.prototype, "_priority", void 0);
|
|
10419
|
-
|
|
10106
|
+
_ts_decorate__default['default']([
|
|
10420
10107
|
assignmentClone
|
|
10421
10108
|
], exports.Renderer.prototype, "_receiveShadows", void 0);
|
|
10422
|
-
|
|
10109
|
+
_ts_decorate__default['default']([
|
|
10423
10110
|
ignoreClone
|
|
10424
10111
|
], exports.Renderer.prototype, "_rendererLayer", void 0);
|
|
10425
|
-
|
|
10112
|
+
_ts_decorate__default['default']([
|
|
10426
10113
|
ignoreClone
|
|
10427
10114
|
], exports.Renderer.prototype, "_onTransformChanged", null);
|
|
10428
|
-
exports.Renderer =
|
|
10115
|
+
exports.Renderer = _ts_decorate__default['default']([
|
|
10429
10116
|
dependentComponents(Transform)
|
|
10430
10117
|
], exports.Renderer);
|
|
10431
10118
|
var RendererUpdateFlags;
|
|
@@ -10497,19 +10184,15 @@ var SimpleSpriteAssembler = (_SimpleSpriteAssembler = /*#__PURE__*/ function() {
|
|
|
10497
10184
|
renderUVs[3].set(right, top);
|
|
10498
10185
|
};
|
|
10499
10186
|
return SimpleSpriteAssembler1;
|
|
10500
|
-
}(),
|
|
10501
|
-
|
|
10502
|
-
|
|
10503
|
-
|
|
10504
|
-
|
|
10505
|
-
|
|
10506
|
-
|
|
10507
|
-
|
|
10508
|
-
|
|
10509
|
-
}(), function() {
|
|
10510
|
-
_SimpleSpriteAssembler._worldMatrix = new engineMath.Matrix();
|
|
10511
|
-
}(), _SimpleSpriteAssembler);
|
|
10512
|
-
SimpleSpriteAssembler = __decorate([
|
|
10187
|
+
}(), _SimpleSpriteAssembler._rectangleTriangles = [
|
|
10188
|
+
0,
|
|
10189
|
+
1,
|
|
10190
|
+
2,
|
|
10191
|
+
2,
|
|
10192
|
+
1,
|
|
10193
|
+
3
|
|
10194
|
+
], _SimpleSpriteAssembler._worldMatrix = new engineMath.Matrix(), _SimpleSpriteAssembler);
|
|
10195
|
+
SimpleSpriteAssembler = _ts_decorate__default['default']([
|
|
10513
10196
|
StaticInterfaceImplement()
|
|
10514
10197
|
], SimpleSpriteAssembler);
|
|
10515
10198
|
|
|
@@ -10525,9 +10208,6 @@ SimpleSpriteAssembler = __decorate([
|
|
|
10525
10208
|
this.color = color;
|
|
10526
10209
|
};
|
|
10527
10210
|
|
|
10528
|
-
/**
|
|
10529
|
-
* Sprite mask layer.
|
|
10530
|
-
*/ exports.SpriteMaskLayer = void 0;
|
|
10531
10211
|
(function(SpriteMaskLayer) {
|
|
10532
10212
|
SpriteMaskLayer[SpriteMaskLayer[/** Mask layer 0. */ "Layer0"] = 0x1] = "Layer0";
|
|
10533
10213
|
SpriteMaskLayer[SpriteMaskLayer[/** Mask layer 1. */ "Layer1"] = 0x2] = "Layer1";
|
|
@@ -10581,7 +10261,7 @@ SimpleSpriteAssembler = __decorate([
|
|
|
10581
10261
|
/**
|
|
10582
10262
|
* A component for masking Sprites.
|
|
10583
10263
|
*/ var SpriteMask = /*#__PURE__*/ function(Renderer) {
|
|
10584
|
-
|
|
10264
|
+
_inherits__default['default'](SpriteMask, Renderer);
|
|
10585
10265
|
function SpriteMask(entity) {
|
|
10586
10266
|
var _this;
|
|
10587
10267
|
_this = Renderer.call(this, entity) || this;
|
|
@@ -10595,10 +10275,10 @@ SimpleSpriteAssembler = __decorate([
|
|
|
10595
10275
|
_this._flipY = false;
|
|
10596
10276
|
_this._alphaCutoff = 0.5;
|
|
10597
10277
|
_this._renderData = new RenderData2D(4, [], []);
|
|
10598
|
-
SimpleSpriteAssembler.resetData(
|
|
10278
|
+
SimpleSpriteAssembler.resetData(_assert_this_initialized__default['default'](_this));
|
|
10599
10279
|
_this.setMaterial(_this._engine._spriteMaskDefaultMaterial);
|
|
10600
10280
|
_this.shaderData.setFloat(SpriteMask._alphaCutoffProperty, _this._alphaCutoff);
|
|
10601
|
-
_this._onSpriteChange = _this._onSpriteChange.bind(
|
|
10281
|
+
_this._onSpriteChange = _this._onSpriteChange.bind(_assert_this_initialized__default['default'](_this));
|
|
10602
10282
|
return _this;
|
|
10603
10283
|
}
|
|
10604
10284
|
var _proto = SpriteMask.prototype;
|
|
@@ -10689,7 +10369,7 @@ SimpleSpriteAssembler = __decorate([
|
|
|
10689
10369
|
break;
|
|
10690
10370
|
}
|
|
10691
10371
|
};
|
|
10692
|
-
|
|
10372
|
+
_create_class__default['default'](SpriteMask, [
|
|
10693
10373
|
{
|
|
10694
10374
|
key: "width",
|
|
10695
10375
|
get: /**
|
|
@@ -10807,40 +10487,36 @@ SimpleSpriteAssembler = __decorate([
|
|
|
10807
10487
|
]);
|
|
10808
10488
|
return SpriteMask;
|
|
10809
10489
|
}(exports.Renderer);
|
|
10810
|
-
(
|
|
10811
|
-
|
|
10812
|
-
|
|
10813
|
-
(function() {
|
|
10814
|
-
/** @internal */ SpriteMask._alphaCutoffProperty = Shader.getPropertyByName("u_maskAlphaCutoff");
|
|
10815
|
-
})();
|
|
10816
|
-
__decorate([
|
|
10490
|
+
/** @internal */ SpriteMask._textureProperty = Shader.getPropertyByName("u_maskTexture");
|
|
10491
|
+
/** @internal */ SpriteMask._alphaCutoffProperty = Shader.getPropertyByName("u_maskAlphaCutoff");
|
|
10492
|
+
_ts_decorate__default['default']([
|
|
10817
10493
|
assignmentClone
|
|
10818
10494
|
], SpriteMask.prototype, "influenceLayers", void 0);
|
|
10819
|
-
|
|
10495
|
+
_ts_decorate__default['default']([
|
|
10820
10496
|
ignoreClone
|
|
10821
10497
|
], SpriteMask.prototype, "_sprite", void 0);
|
|
10822
|
-
|
|
10498
|
+
_ts_decorate__default['default']([
|
|
10823
10499
|
ignoreClone
|
|
10824
10500
|
], SpriteMask.prototype, "_automaticWidth", void 0);
|
|
10825
|
-
|
|
10501
|
+
_ts_decorate__default['default']([
|
|
10826
10502
|
ignoreClone
|
|
10827
10503
|
], SpriteMask.prototype, "_automaticHeight", void 0);
|
|
10828
|
-
|
|
10504
|
+
_ts_decorate__default['default']([
|
|
10829
10505
|
assignmentClone
|
|
10830
10506
|
], SpriteMask.prototype, "_customWidth", void 0);
|
|
10831
|
-
|
|
10507
|
+
_ts_decorate__default['default']([
|
|
10832
10508
|
assignmentClone
|
|
10833
10509
|
], SpriteMask.prototype, "_customHeight", void 0);
|
|
10834
|
-
|
|
10510
|
+
_ts_decorate__default['default']([
|
|
10835
10511
|
assignmentClone
|
|
10836
10512
|
], SpriteMask.prototype, "_flipX", void 0);
|
|
10837
|
-
|
|
10513
|
+
_ts_decorate__default['default']([
|
|
10838
10514
|
assignmentClone
|
|
10839
10515
|
], SpriteMask.prototype, "_flipY", void 0);
|
|
10840
|
-
|
|
10516
|
+
_ts_decorate__default['default']([
|
|
10841
10517
|
assignmentClone
|
|
10842
10518
|
], SpriteMask.prototype, "_alphaCutoff", void 0);
|
|
10843
|
-
|
|
10519
|
+
_ts_decorate__default['default']([
|
|
10844
10520
|
ignoreClone
|
|
10845
10521
|
], SpriteMask.prototype, "_onSpriteChange", null);
|
|
10846
10522
|
var /**
|
|
@@ -10853,9 +10529,6 @@ var /**
|
|
|
10853
10529
|
SpriteMaskUpdateFlags[SpriteMaskUpdateFlags[/** All. */ "All"] = 0x7] = "All";
|
|
10854
10530
|
})(SpriteMaskUpdateFlags || (SpriteMaskUpdateFlags = {}));
|
|
10855
10531
|
|
|
10856
|
-
/**
|
|
10857
|
-
* Vertex element format.
|
|
10858
|
-
*/ exports.VertexElementFormat = void 0;
|
|
10859
10532
|
(function(VertexElementFormat) {
|
|
10860
10533
|
VertexElementFormat[VertexElementFormat[/** 32-bit float */ "Float"] = 0] = "Float";
|
|
10861
10534
|
VertexElementFormat[VertexElementFormat[/** Two-dimensional 32-bit float */ "Vector2"] = 1] = "Vector2";
|
|
@@ -10875,18 +10548,12 @@ var /**
|
|
|
10875
10548
|
VertexElementFormat[VertexElementFormat[/** Four-dimensional 16-bit Normalized unsigned integer, range is [0, 1] */ "NormalizedUShort4"] = 15] = "NormalizedUShort4";
|
|
10876
10549
|
})(exports.VertexElementFormat || (exports.VertexElementFormat = {}));
|
|
10877
10550
|
|
|
10878
|
-
/**
|
|
10879
|
-
* Buffer usage.
|
|
10880
|
-
*/ exports.BufferUsage = void 0;
|
|
10881
10551
|
(function(BufferUsage) {
|
|
10882
10552
|
BufferUsage[BufferUsage[/** The buffer content are intended to be specified once, and used many times */ "Static"] = 0] = "Static";
|
|
10883
10553
|
BufferUsage[BufferUsage[/** The buffer contents are intended to be respecified repeatedly, and used many times */ "Dynamic"] = 1] = "Dynamic";
|
|
10884
10554
|
BufferUsage[BufferUsage[/** The buffer contents are intended to be specified once, and used at most a few times */ "Stream"] = 2] = "Stream";
|
|
10885
10555
|
})(exports.BufferUsage || (exports.BufferUsage = {}));
|
|
10886
10556
|
|
|
10887
|
-
/**
|
|
10888
|
-
* Index format.
|
|
10889
|
-
*/ exports.IndexFormat = void 0;
|
|
10890
10557
|
(function(IndexFormat) {
|
|
10891
10558
|
IndexFormat[IndexFormat[/** 8 bit */ "UInt8"] = 0] = "UInt8";
|
|
10892
10559
|
IndexFormat[IndexFormat[/** 16 bit */ "UInt16"] = 1] = "UInt16";
|
|
@@ -11026,7 +10693,7 @@ var BufferUtil = /*#__PURE__*/ function() {
|
|
|
11026
10693
|
this._glElementInfo = BufferUtil._getElementInfo(this.format);
|
|
11027
10694
|
this._instanceStepRate = Math.floor(instanceStepRate);
|
|
11028
10695
|
}
|
|
11029
|
-
|
|
10696
|
+
_create_class__default['default'](VertexElement, [
|
|
11030
10697
|
{
|
|
11031
10698
|
key: "semantic",
|
|
11032
10699
|
get: /**
|
|
@@ -11077,17 +10744,11 @@ var BufferUtil = /*#__PURE__*/ function() {
|
|
|
11077
10744
|
return VertexElement;
|
|
11078
10745
|
}();
|
|
11079
10746
|
|
|
11080
|
-
/**
|
|
11081
|
-
* Buffer binding flag.
|
|
11082
|
-
*/ exports.BufferBindFlag = void 0;
|
|
11083
10747
|
(function(BufferBindFlag) {
|
|
11084
10748
|
BufferBindFlag[BufferBindFlag[/** Vertex buffer binding flag */ "VertexBuffer"] = 0] = "VertexBuffer";
|
|
11085
10749
|
BufferBindFlag[BufferBindFlag[/** Index buffer binding flag */ "IndexBuffer"] = 1] = "IndexBuffer";
|
|
11086
10750
|
})(exports.BufferBindFlag || (exports.BufferBindFlag = {}));
|
|
11087
10751
|
|
|
11088
|
-
/**
|
|
11089
|
-
* Define update strategy when call bufferData/bufferSubData func.
|
|
11090
|
-
*/ exports.SetDataOptions = void 0;
|
|
11091
10752
|
(function(SetDataOptions) {
|
|
11092
10753
|
SetDataOptions[SetDataOptions[/** Can overwrite part of used buffer data and ensure correct rendering */ "None"] = 0] = "None";
|
|
11093
10754
|
SetDataOptions[SetDataOptions[/** Discard old buffer and create a new buffer, and won't affect the previous rendering */ "Discard"] = 1] = "Discard";
|
|
@@ -11096,7 +10757,7 @@ var BufferUtil = /*#__PURE__*/ function() {
|
|
|
11096
10757
|
/**
|
|
11097
10758
|
* Buffer.
|
|
11098
10759
|
*/ var Buffer = /*#__PURE__*/ function(RefObject) {
|
|
11099
|
-
|
|
10760
|
+
_inherits__default['default'](Buffer, RefObject);
|
|
11100
10761
|
function Buffer(engine, type, byteLengthOrData, bufferUsage) {
|
|
11101
10762
|
if (bufferUsage === void 0) bufferUsage = exports.BufferUsage.Static;
|
|
11102
10763
|
var _this;
|
|
@@ -11186,7 +10847,7 @@ var BufferUtil = /*#__PURE__*/ function() {
|
|
|
11186
10847
|
gl.bufferData(this._glBindTarget, dataLength, this._glBufferUsage);
|
|
11187
10848
|
this._byteLength = dataLength;
|
|
11188
10849
|
};
|
|
11189
|
-
|
|
10850
|
+
_create_class__default['default'](Buffer, [
|
|
11190
10851
|
{
|
|
11191
10852
|
key: "type",
|
|
11192
10853
|
get: /**
|
|
@@ -11215,9 +10876,6 @@ var BufferUtil = /*#__PURE__*/ function() {
|
|
|
11215
10876
|
return Buffer;
|
|
11216
10877
|
}(RefObject);
|
|
11217
10878
|
|
|
11218
|
-
/**
|
|
11219
|
-
* Mesh topology.
|
|
11220
|
-
*/ exports.MeshTopology = void 0;
|
|
11221
10879
|
(function(MeshTopology) {
|
|
11222
10880
|
MeshTopology[MeshTopology[/** Draws a single dot */ "Points"] = 0] = "Points";
|
|
11223
10881
|
MeshTopology[MeshTopology[/** Draws a line between a pair of vertices */ "Lines"] = 1] = "Lines";
|
|
@@ -11235,7 +10893,7 @@ var BufferUtil = /*#__PURE__*/ function() {
|
|
|
11235
10893
|
this._buffer = buffer;
|
|
11236
10894
|
this._format = format;
|
|
11237
10895
|
}
|
|
11238
|
-
|
|
10896
|
+
_create_class__default['default'](IndexBufferBinding, [
|
|
11239
10897
|
{
|
|
11240
10898
|
key: "buffer",
|
|
11241
10899
|
get: /**
|
|
@@ -11275,7 +10933,7 @@ var BufferUtil = /*#__PURE__*/ function() {
|
|
|
11275
10933
|
/**
|
|
11276
10934
|
* Mesh.
|
|
11277
10935
|
*/ var Mesh = /*#__PURE__*/ function(RefObject) {
|
|
11278
|
-
|
|
10936
|
+
_inherits__default['default'](Mesh, RefObject);
|
|
11279
10937
|
function Mesh(engine, name) {
|
|
11280
10938
|
var _this;
|
|
11281
10939
|
_this = RefObject.call(this, engine) || this;
|
|
@@ -11289,8 +10947,8 @@ var BufferUtil = /*#__PURE__*/ function() {
|
|
|
11289
10947
|
_this._bounds = new engineMath.BoundingBox();
|
|
11290
10948
|
_this._subMeshes = [];
|
|
11291
10949
|
_this.name = name;
|
|
11292
|
-
_this._platformPrimitive = _this._engine._hardwareRenderer.createPlatformPrimitive(
|
|
11293
|
-
_this._onBoundsChanged = _this._onBoundsChanged.bind(
|
|
10950
|
+
_this._platformPrimitive = _this._engine._hardwareRenderer.createPlatformPrimitive(_assert_this_initialized__default['default'](_this));
|
|
10951
|
+
_this._onBoundsChanged = _this._onBoundsChanged.bind(_assert_this_initialized__default['default'](_this));
|
|
11294
10952
|
var bounds = _this._bounds;
|
|
11295
10953
|
// @ts-ignore
|
|
11296
10954
|
bounds.min._onValueChanged = _this._onBoundsChanged;
|
|
@@ -11416,7 +11074,7 @@ var BufferUtil = /*#__PURE__*/ function() {
|
|
|
11416
11074
|
_proto._onBoundsChanged = function _onBoundsChanged() {
|
|
11417
11075
|
this._updateFlagManager.dispatch(0x1);
|
|
11418
11076
|
};
|
|
11419
|
-
|
|
11077
|
+
_create_class__default['default'](Mesh, [
|
|
11420
11078
|
{
|
|
11421
11079
|
key: "bounds",
|
|
11422
11080
|
get: /**
|
|
@@ -11462,7 +11120,7 @@ var MeshModifyFlags;
|
|
|
11462
11120
|
this._buffer = buffer;
|
|
11463
11121
|
this._stride = stride;
|
|
11464
11122
|
}
|
|
11465
|
-
|
|
11123
|
+
_create_class__default['default'](VertexBufferBinding, [
|
|
11466
11124
|
{
|
|
11467
11125
|
key: "buffer",
|
|
11468
11126
|
get: /**
|
|
@@ -11909,27 +11567,13 @@ var MeshModifyFlags;
|
|
|
11909
11567
|
};
|
|
11910
11568
|
return BlendShapeManager;
|
|
11911
11569
|
}();
|
|
11912
|
-
(
|
|
11913
|
-
|
|
11914
|
-
|
|
11915
|
-
(
|
|
11916
|
-
|
|
11917
|
-
|
|
11918
|
-
(
|
|
11919
|
-
BlendShapeManager._blendShapeNormalMacro = Shader.getMacroByName("OASIS_BLENDSHAPE_NORMAL");
|
|
11920
|
-
})();
|
|
11921
|
-
(function() {
|
|
11922
|
-
BlendShapeManager._blendShapeTangentMacro = Shader.getMacroByName("OASIS_BLENDSHAPE_TANGENT");
|
|
11923
|
-
})();
|
|
11924
|
-
(function() {
|
|
11925
|
-
BlendShapeManager._blendShapeWeightsProperty = Shader.getPropertyByName("u_blendShapeWeights");
|
|
11926
|
-
})();
|
|
11927
|
-
(function() {
|
|
11928
|
-
BlendShapeManager._blendShapeTextureProperty = Shader.getPropertyByName("u_blendShapeTexture");
|
|
11929
|
-
})();
|
|
11930
|
-
(function() {
|
|
11931
|
-
BlendShapeManager._blendShapeTextureInfoProperty = Shader.getPropertyByName("u_blendShapeTextureInfo");
|
|
11932
|
-
})();
|
|
11570
|
+
BlendShapeManager._blendShapeMacro = Shader.getMacroByName("OASIS_BLENDSHAPE");
|
|
11571
|
+
BlendShapeManager._blendShapeTextureMacro = Shader.getMacroByName("OASIS_BLENDSHAPE_TEXTURE");
|
|
11572
|
+
BlendShapeManager._blendShapeNormalMacro = Shader.getMacroByName("OASIS_BLENDSHAPE_NORMAL");
|
|
11573
|
+
BlendShapeManager._blendShapeTangentMacro = Shader.getMacroByName("OASIS_BLENDSHAPE_TANGENT");
|
|
11574
|
+
BlendShapeManager._blendShapeWeightsProperty = Shader.getPropertyByName("u_blendShapeWeights");
|
|
11575
|
+
BlendShapeManager._blendShapeTextureProperty = Shader.getPropertyByName("u_blendShapeTexture");
|
|
11576
|
+
BlendShapeManager._blendShapeTextureInfoProperty = Shader.getPropertyByName("u_blendShapeTextureInfo");
|
|
11933
11577
|
|
|
11934
11578
|
/**
|
|
11935
11579
|
* Vertex attribute types of a vertex in a ModelMesh.
|
|
@@ -11954,7 +11598,7 @@ var MeshModifyFlags;
|
|
|
11954
11598
|
/**
|
|
11955
11599
|
* Mesh containing common vertex elements of the model.
|
|
11956
11600
|
*/ var ModelMesh = /*#__PURE__*/ function(Mesh) {
|
|
11957
|
-
|
|
11601
|
+
_inherits__default['default'](ModelMesh, Mesh);
|
|
11958
11602
|
function ModelMesh(engine, name) {
|
|
11959
11603
|
var _this;
|
|
11960
11604
|
_this = Mesh.call(this, engine) || this;
|
|
@@ -11986,7 +11630,7 @@ var MeshModifyFlags;
|
|
|
11986
11630
|
_this._customVertexElements = [];
|
|
11987
11631
|
_this._vertexCountChanged = false;
|
|
11988
11632
|
_this.name = name;
|
|
11989
|
-
_this._blendShapeManager = new BlendShapeManager(engine,
|
|
11633
|
+
_this._blendShapeManager = new BlendShapeManager(engine, _assert_this_initialized__default['default'](_this));
|
|
11990
11634
|
return _this;
|
|
11991
11635
|
}
|
|
11992
11636
|
var _proto = ModelMesh.prototype;
|
|
@@ -12276,11 +11920,11 @@ var MeshModifyFlags;
|
|
|
12276
11920
|
}
|
|
12277
11921
|
if (this._indices !== indices) {
|
|
12278
11922
|
this._indices = indices;
|
|
12279
|
-
if (
|
|
11923
|
+
if (_instanceof__default['default'](indices, Uint8Array)) {
|
|
12280
11924
|
this._indicesFormat = exports.IndexFormat.UInt8;
|
|
12281
|
-
} else if (
|
|
11925
|
+
} else if (_instanceof__default['default'](indices, Uint16Array)) {
|
|
12282
11926
|
this._indicesFormat = exports.IndexFormat.UInt16;
|
|
12283
|
-
} else if (
|
|
11927
|
+
} else if (_instanceof__default['default'](indices, Uint32Array)) {
|
|
12284
11928
|
this._indicesFormat = exports.IndexFormat.UInt32;
|
|
12285
11929
|
}
|
|
12286
11930
|
}
|
|
@@ -12936,7 +12580,7 @@ var MeshModifyFlags;
|
|
|
12936
12580
|
this._uv7 = null;
|
|
12937
12581
|
this._blendShapeManager._releaseMemoryCache();
|
|
12938
12582
|
};
|
|
12939
|
-
|
|
12583
|
+
_create_class__default['default'](ModelMesh, [
|
|
12940
12584
|
{
|
|
12941
12585
|
key: "accessible",
|
|
12942
12586
|
get: /**
|
|
@@ -13004,21 +12648,11 @@ var MeshModifyFlags;
|
|
|
13004
12648
|
]);
|
|
13005
12649
|
return ModelMesh;
|
|
13006
12650
|
}(Mesh);
|
|
13007
|
-
(
|
|
13008
|
-
|
|
13009
|
-
|
|
13010
|
-
(
|
|
13011
|
-
|
|
13012
|
-
})();
|
|
13013
|
-
(function() {
|
|
13014
|
-
ModelMesh._tempVec2 = new engineMath.Vector3();
|
|
13015
|
-
})();
|
|
13016
|
-
(function() {
|
|
13017
|
-
ModelMesh._tempVec3 = new engineMath.Vector3();
|
|
13018
|
-
})();
|
|
13019
|
-
(function() {
|
|
13020
|
-
ModelMesh._tempVec4 = new engineMath.Vector3();
|
|
13021
|
-
})();
|
|
12651
|
+
ModelMesh._tempVec0 = new engineMath.Vector3();
|
|
12652
|
+
ModelMesh._tempVec1 = new engineMath.Vector3();
|
|
12653
|
+
ModelMesh._tempVec2 = new engineMath.Vector3();
|
|
12654
|
+
ModelMesh._tempVec3 = new engineMath.Vector3();
|
|
12655
|
+
ModelMesh._tempVec4 = new engineMath.Vector3();
|
|
13022
12656
|
var VertexChangedFlags;
|
|
13023
12657
|
(function(VertexChangedFlags) {
|
|
13024
12658
|
VertexChangedFlags[VertexChangedFlags["Position"] = 0x1] = "Position";
|
|
@@ -13041,7 +12675,7 @@ var VertexChangedFlags;
|
|
|
13041
12675
|
/**
|
|
13042
12676
|
* Mesh skin data, equal glTF skins define
|
|
13043
12677
|
*/ var Skin = /*#__PURE__*/ function(EngineObject) {
|
|
13044
|
-
|
|
12678
|
+
_inherits__default['default'](Skin, EngineObject);
|
|
13045
12679
|
function Skin(name) {
|
|
13046
12680
|
var _this;
|
|
13047
12681
|
_this = EngineObject.call(this, null) || this;
|
|
@@ -13057,12 +12691,12 @@ var VertexChangedFlags;
|
|
|
13057
12691
|
/**
|
|
13058
12692
|
* MeshRenderer Component.
|
|
13059
12693
|
*/ var MeshRenderer = /*#__PURE__*/ function(Renderer) {
|
|
13060
|
-
|
|
12694
|
+
_inherits__default['default'](MeshRenderer, Renderer);
|
|
13061
12695
|
function MeshRenderer(entity) {
|
|
13062
12696
|
var _this;
|
|
13063
12697
|
_this = Renderer.call(this, entity) || this;
|
|
13064
12698
|
_this._enableVertexColor = false;
|
|
13065
|
-
_this._onMeshChanged = _this._onMeshChanged.bind(
|
|
12699
|
+
_this._onMeshChanged = _this._onMeshChanged.bind(_assert_this_initialized__default['default'](_this));
|
|
13066
12700
|
return _this;
|
|
13067
12701
|
}
|
|
13068
12702
|
var _proto = MeshRenderer.prototype;
|
|
@@ -13167,7 +12801,7 @@ var VertexChangedFlags;
|
|
|
13167
12801
|
type & MeshModifyFlags.Bounds && (this._dirtyUpdateFlag |= RendererUpdateFlags.WorldVolume);
|
|
13168
12802
|
type & MeshModifyFlags.VertexElements && (this._dirtyUpdateFlag |= 0x2);
|
|
13169
12803
|
};
|
|
13170
|
-
|
|
12804
|
+
_create_class__default['default'](MeshRenderer, [
|
|
13171
12805
|
{
|
|
13172
12806
|
key: "mesh",
|
|
13173
12807
|
get: /**
|
|
@@ -13198,25 +12832,15 @@ var VertexChangedFlags;
|
|
|
13198
12832
|
]);
|
|
13199
12833
|
return MeshRenderer;
|
|
13200
12834
|
}(exports.Renderer);
|
|
13201
|
-
(
|
|
13202
|
-
|
|
13203
|
-
|
|
13204
|
-
(
|
|
13205
|
-
|
|
13206
|
-
|
|
13207
|
-
(function() {
|
|
13208
|
-
MeshRenderer._normalMacro = Shader.getMacroByName("O3_HAS_NORMAL");
|
|
13209
|
-
})();
|
|
13210
|
-
(function() {
|
|
13211
|
-
MeshRenderer._tangentMacro = Shader.getMacroByName("O3_HAS_TANGENT");
|
|
13212
|
-
})();
|
|
13213
|
-
(function() {
|
|
13214
|
-
MeshRenderer._vertexColorMacro = Shader.getMacroByName("O3_HAS_VERTEXCOLOR");
|
|
13215
|
-
})();
|
|
13216
|
-
__decorate([
|
|
12835
|
+
MeshRenderer._uvMacro = Shader.getMacroByName("O3_HAS_UV");
|
|
12836
|
+
MeshRenderer._uv1Macro = Shader.getMacroByName("O3_HAS_UV1");
|
|
12837
|
+
MeshRenderer._normalMacro = Shader.getMacroByName("O3_HAS_NORMAL");
|
|
12838
|
+
MeshRenderer._tangentMacro = Shader.getMacroByName("O3_HAS_TANGENT");
|
|
12839
|
+
MeshRenderer._vertexColorMacro = Shader.getMacroByName("O3_HAS_VERTEXCOLOR");
|
|
12840
|
+
_ts_decorate__default['default']([
|
|
13217
12841
|
ignoreClone
|
|
13218
12842
|
], MeshRenderer.prototype, "_mesh", void 0);
|
|
13219
|
-
|
|
12843
|
+
_ts_decorate__default['default']([
|
|
13220
12844
|
ignoreClone
|
|
13221
12845
|
], MeshRenderer.prototype, "_onMeshChanged", null);
|
|
13222
12846
|
var /**
|
|
@@ -13272,13 +12896,13 @@ var Utils = /*#__PURE__*/ function() {
|
|
|
13272
12896
|
};
|
|
13273
12897
|
Utils._stringToPath = function _stringToPath(string) {
|
|
13274
12898
|
var result = [];
|
|
13275
|
-
if (string.charCodeAt(0) === charCodeOfDot) {
|
|
12899
|
+
if (string.charCodeAt(0) === charCodeOfDot$1) {
|
|
13276
12900
|
result.push("");
|
|
13277
12901
|
}
|
|
13278
|
-
string.replace(rePropName, function(match, expression, quote, subString) {
|
|
12902
|
+
string.replace(rePropName$1, function(match, expression, quote, subString) {
|
|
13279
12903
|
var key = match;
|
|
13280
12904
|
if (quote) {
|
|
13281
|
-
key = subString.replace(reEscapeChar, "$1");
|
|
12905
|
+
key = subString.replace(reEscapeChar$1, "$1");
|
|
13282
12906
|
} else if (expression) {
|
|
13283
12907
|
key = expression.trim();
|
|
13284
12908
|
}
|
|
@@ -13288,9 +12912,9 @@ var Utils = /*#__PURE__*/ function() {
|
|
|
13288
12912
|
};
|
|
13289
12913
|
return Utils;
|
|
13290
12914
|
}();
|
|
13291
|
-
var charCodeOfDot = ".".charCodeAt(0);
|
|
13292
|
-
var reEscapeChar = /\\(\\)?/g;
|
|
13293
|
-
var rePropName = RegExp(// Match anything that isn't a dot or bracket.
|
|
12915
|
+
var charCodeOfDot$1 = ".".charCodeAt(0);
|
|
12916
|
+
var reEscapeChar$1 = /\\(\\)?/g;
|
|
12917
|
+
var rePropName$1 = RegExp(// Match anything that isn't a dot or bracket.
|
|
13294
12918
|
"[^.[\\]]+" + "|" + // Or match property names within brackets.
|
|
13295
12919
|
"\\[(?:" + // Match a non-string expression.
|
|
13296
12920
|
"([^\"'][^[]*)" + "|" + // Or match strings (supports escaping characters).
|
|
@@ -13300,7 +12924,7 @@ var rePropName = RegExp(// Match anything that isn't a dot or bracket.
|
|
|
13300
12924
|
/**
|
|
13301
12925
|
* SkinnedMeshRenderer.
|
|
13302
12926
|
*/ var SkinnedMeshRenderer = /*#__PURE__*/ function(MeshRenderer) {
|
|
13303
|
-
|
|
12927
|
+
_inherits__default['default'](SkinnedMeshRenderer, MeshRenderer);
|
|
13304
12928
|
function SkinnedMeshRenderer(entity) {
|
|
13305
12929
|
var _this;
|
|
13306
12930
|
_this = MeshRenderer.call(this, entity) || this;
|
|
@@ -13316,7 +12940,7 @@ var rePropName = RegExp(// Match anything that isn't a dot or bracket.
|
|
|
13316
12940
|
// 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.
|
|
13317
12941
|
maxVertexUniformVectors = Math.min(maxVertexUniformVectors, rhi._options._maxAllowSkinUniformVectorCount);
|
|
13318
12942
|
_this._maxVertexUniformVectors = maxVertexUniformVectors;
|
|
13319
|
-
_this._onLocalBoundsChanged = _this._onLocalBoundsChanged.bind(
|
|
12943
|
+
_this._onLocalBoundsChanged = _this._onLocalBoundsChanged.bind(_assert_this_initialized__default['default'](_this));
|
|
13320
12944
|
var localBounds = _this._localBounds;
|
|
13321
12945
|
// @ts-ignore
|
|
13322
12946
|
localBounds.min._onValueChanged = _this._onLocalBoundsChanged;
|
|
@@ -13540,7 +13164,7 @@ var rePropName = RegExp(// Match anything that isn't a dot or bracket.
|
|
|
13540
13164
|
_proto._onLocalBoundsChanged = function _onLocalBoundsChanged() {
|
|
13541
13165
|
this._dirtyUpdateFlag |= RendererUpdateFlags.WorldVolume;
|
|
13542
13166
|
};
|
|
13543
|
-
|
|
13167
|
+
_create_class__default['default'](SkinnedMeshRenderer, [
|
|
13544
13168
|
{
|
|
13545
13169
|
key: "blendShapeWeights",
|
|
13546
13170
|
get: /**
|
|
@@ -13605,52 +13229,44 @@ var rePropName = RegExp(// Match anything that isn't a dot or bracket.
|
|
|
13605
13229
|
]);
|
|
13606
13230
|
return SkinnedMeshRenderer;
|
|
13607
13231
|
}(MeshRenderer);
|
|
13608
|
-
(
|
|
13609
|
-
|
|
13610
|
-
|
|
13611
|
-
(
|
|
13612
|
-
|
|
13613
|
-
})();
|
|
13614
|
-
(function() {
|
|
13615
|
-
SkinnedMeshRenderer._jointSamplerProperty = Shader.getPropertyByName("u_jointSampler");
|
|
13616
|
-
})();
|
|
13617
|
-
(function() {
|
|
13618
|
-
SkinnedMeshRenderer._jointMatrixProperty = Shader.getPropertyByName("u_jointMatrix");
|
|
13619
|
-
})();
|
|
13620
|
-
__decorate([
|
|
13232
|
+
SkinnedMeshRenderer._tempMatrix = new engineMath.Matrix();
|
|
13233
|
+
SkinnedMeshRenderer._jointCountProperty = Shader.getPropertyByName("u_jointCount");
|
|
13234
|
+
SkinnedMeshRenderer._jointSamplerProperty = Shader.getPropertyByName("u_jointSampler");
|
|
13235
|
+
SkinnedMeshRenderer._jointMatrixProperty = Shader.getPropertyByName("u_jointMatrix");
|
|
13236
|
+
_ts_decorate__default['default']([
|
|
13621
13237
|
ignoreClone
|
|
13622
13238
|
], SkinnedMeshRenderer.prototype, "_supportSkinning", void 0);
|
|
13623
|
-
|
|
13239
|
+
_ts_decorate__default['default']([
|
|
13624
13240
|
ignoreClone
|
|
13625
13241
|
], SkinnedMeshRenderer.prototype, "_hasInitSkin", void 0);
|
|
13626
|
-
|
|
13242
|
+
_ts_decorate__default['default']([
|
|
13627
13243
|
ignoreClone
|
|
13628
13244
|
], SkinnedMeshRenderer.prototype, "_jointDataCreateCache", void 0);
|
|
13629
|
-
|
|
13245
|
+
_ts_decorate__default['default']([
|
|
13630
13246
|
ignoreClone
|
|
13631
13247
|
], SkinnedMeshRenderer.prototype, "_blendShapeWeights", void 0);
|
|
13632
|
-
|
|
13248
|
+
_ts_decorate__default['default']([
|
|
13633
13249
|
ignoreClone
|
|
13634
13250
|
], SkinnedMeshRenderer.prototype, "_maxVertexUniformVectors", void 0);
|
|
13635
|
-
|
|
13251
|
+
_ts_decorate__default['default']([
|
|
13636
13252
|
ignoreClone
|
|
13637
13253
|
], SkinnedMeshRenderer.prototype, "_rootBone", void 0);
|
|
13638
|
-
|
|
13254
|
+
_ts_decorate__default['default']([
|
|
13639
13255
|
ignoreClone
|
|
13640
13256
|
], SkinnedMeshRenderer.prototype, "_localBounds", void 0);
|
|
13641
|
-
|
|
13257
|
+
_ts_decorate__default['default']([
|
|
13642
13258
|
ignoreClone
|
|
13643
13259
|
], SkinnedMeshRenderer.prototype, "_jointMatrices", void 0);
|
|
13644
|
-
|
|
13260
|
+
_ts_decorate__default['default']([
|
|
13645
13261
|
ignoreClone
|
|
13646
13262
|
], SkinnedMeshRenderer.prototype, "_jointTexture", void 0);
|
|
13647
|
-
|
|
13263
|
+
_ts_decorate__default['default']([
|
|
13648
13264
|
ignoreClone
|
|
13649
13265
|
], SkinnedMeshRenderer.prototype, "_jointEntities", void 0);
|
|
13650
|
-
|
|
13266
|
+
_ts_decorate__default['default']([
|
|
13651
13267
|
ignoreClone
|
|
13652
13268
|
], SkinnedMeshRenderer.prototype, "_condensedBlendShapeWeights", void 0);
|
|
13653
|
-
|
|
13269
|
+
_ts_decorate__default['default']([
|
|
13654
13270
|
ignoreClone
|
|
13655
13271
|
], SkinnedMeshRenderer.prototype, "_onLocalBoundsChanged", null);
|
|
13656
13272
|
|
|
@@ -14342,7 +13958,7 @@ __decorate([
|
|
|
14342
13958
|
/**
|
|
14343
13959
|
* BufferMesh.
|
|
14344
13960
|
*/ var BufferMesh = /*#__PURE__*/ function(Mesh) {
|
|
14345
|
-
|
|
13961
|
+
_inherits__default['default'](BufferMesh, Mesh);
|
|
14346
13962
|
function BufferMesh() {
|
|
14347
13963
|
return Mesh.apply(this, arguments);
|
|
14348
13964
|
}
|
|
@@ -14385,7 +14001,7 @@ __decorate([
|
|
|
14385
14001
|
}
|
|
14386
14002
|
this._setIndexBufferBinding(binding);
|
|
14387
14003
|
};
|
|
14388
|
-
|
|
14004
|
+
_create_class__default['default'](BufferMesh, [
|
|
14389
14005
|
{
|
|
14390
14006
|
key: "instanceCount",
|
|
14391
14007
|
get: /**
|
|
@@ -14499,7 +14115,7 @@ __decorate([
|
|
|
14499
14115
|
this._layoutChangeManager.dispatch(0, this);
|
|
14500
14116
|
}
|
|
14501
14117
|
};
|
|
14502
|
-
|
|
14118
|
+
_create_class__default['default'](BlendShape, [
|
|
14503
14119
|
{
|
|
14504
14120
|
key: "frames",
|
|
14505
14121
|
get: /**
|
|
@@ -14660,15 +14276,11 @@ var Basic2DBatcher = /*#__PURE__*/ function() {
|
|
|
14660
14276
|
};
|
|
14661
14277
|
return Basic2DBatcher;
|
|
14662
14278
|
}();
|
|
14663
|
-
|
|
14664
|
-
|
|
14665
|
-
})();
|
|
14666
|
-
(function() {
|
|
14667
|
-
Basic2DBatcher._canUploadSameBuffer = true;
|
|
14668
|
-
})();
|
|
14279
|
+
/** The maximum number of vertex. */ Basic2DBatcher.MAX_VERTEX_COUNT = 4096;
|
|
14280
|
+
Basic2DBatcher._canUploadSameBuffer = true;
|
|
14669
14281
|
|
|
14670
14282
|
var SpriteMaskBatcher = /*#__PURE__*/ function(Basic2DBatcher) {
|
|
14671
|
-
|
|
14283
|
+
_inherits__default['default'](SpriteMaskBatcher, Basic2DBatcher);
|
|
14672
14284
|
function SpriteMaskBatcher() {
|
|
14673
14285
|
return Basic2DBatcher.apply(this, arguments);
|
|
14674
14286
|
}
|
|
@@ -14804,7 +14416,7 @@ var SpriteMaskBatcher = /*#__PURE__*/ function(Basic2DBatcher) {
|
|
|
14804
14416
|
}();
|
|
14805
14417
|
|
|
14806
14418
|
var TextRenderElement = /*#__PURE__*/ function(RenderElement) {
|
|
14807
|
-
|
|
14419
|
+
_inherits__default['default'](TextRenderElement, RenderElement);
|
|
14808
14420
|
function TextRenderElement() {
|
|
14809
14421
|
var _this;
|
|
14810
14422
|
_this = RenderElement.call(this) || this;
|
|
@@ -14820,18 +14432,12 @@ var TextRenderElement = /*#__PURE__*/ function(RenderElement) {
|
|
|
14820
14432
|
return TextRenderElement;
|
|
14821
14433
|
}(RenderElement);
|
|
14822
14434
|
|
|
14823
|
-
/**
|
|
14824
|
-
* The Background mode enumeration.
|
|
14825
|
-
*/ exports.BackgroundMode = void 0;
|
|
14826
14435
|
(function(BackgroundMode) {
|
|
14827
14436
|
BackgroundMode[BackgroundMode[/* Solid color. */ "SolidColor"] = 0] = "SolidColor";
|
|
14828
14437
|
BackgroundMode[BackgroundMode[/* Sky. */ "Sky"] = 1] = "Sky";
|
|
14829
14438
|
BackgroundMode[BackgroundMode[/** Texture */ "Texture"] = 2] = "Texture";
|
|
14830
14439
|
})(exports.BackgroundMode || (exports.BackgroundMode = {}));
|
|
14831
14440
|
|
|
14832
|
-
/**
|
|
14833
|
-
* Filling mode of background texture.
|
|
14834
|
-
*/ exports.BackgroundTextureFillMode = void 0;
|
|
14835
14441
|
(function(BackgroundTextureFillMode) {
|
|
14836
14442
|
BackgroundTextureFillMode[BackgroundTextureFillMode[/* Maintain the aspect ratio and scale the texture to fit the width of the canvas. */ "AspectFitWidth"] = 0] = "AspectFitWidth";
|
|
14837
14443
|
BackgroundTextureFillMode[BackgroundTextureFillMode[/* Maintain the aspect ratio and scale the texture to fit the height of the canvas. */ "AspectFitHeight"] = 1] = "AspectFitHeight";
|
|
@@ -14889,7 +14495,7 @@ var TextRenderElement = /*#__PURE__*/ function(RenderElement) {
|
|
|
14889
14495
|
rhi.drawPrimitive(mesh, mesh.subMesh, program);
|
|
14890
14496
|
cameraShaderData.setMatrix(RenderContext._vpMatrixProperty, originViewProjMatrix);
|
|
14891
14497
|
};
|
|
14892
|
-
|
|
14498
|
+
_create_class__default['default'](Sky, [
|
|
14893
14499
|
{
|
|
14894
14500
|
key: "material",
|
|
14895
14501
|
get: /**
|
|
@@ -14925,15 +14531,9 @@ var TextRenderElement = /*#__PURE__*/ function(RenderElement) {
|
|
|
14925
14531
|
]);
|
|
14926
14532
|
return Sky;
|
|
14927
14533
|
}();
|
|
14928
|
-
|
|
14929
|
-
|
|
14930
|
-
|
|
14931
|
-
(function() {
|
|
14932
|
-
Sky._viewProjMatrix = new engineMath.Matrix();
|
|
14933
|
-
})();
|
|
14934
|
-
(function() {
|
|
14935
|
-
Sky._projectionMatrix = new engineMath.Matrix(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, Sky._epsilon - 1, -1, 0, 0, 0, 0);
|
|
14936
|
-
})();
|
|
14534
|
+
Sky._epsilon = 1e-6;
|
|
14535
|
+
Sky._viewProjMatrix = new engineMath.Matrix();
|
|
14536
|
+
Sky._projectionMatrix = new engineMath.Matrix(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, Sky._epsilon - 1, -1, 0, 0, 0, 0);
|
|
14937
14537
|
|
|
14938
14538
|
/**
|
|
14939
14539
|
* Background of scene.
|
|
@@ -15031,7 +14631,7 @@ var TextRenderElement = /*#__PURE__*/ function(RenderElement) {
|
|
|
15031
14631
|
mesh.addSubMesh(0, indices.length);
|
|
15032
14632
|
return mesh;
|
|
15033
14633
|
};
|
|
15034
|
-
|
|
14634
|
+
_create_class__default['default'](Background, [
|
|
15035
14635
|
{
|
|
15036
14636
|
key: "texture",
|
|
15037
14637
|
get: /**
|
|
@@ -15071,9 +14671,6 @@ var TextRenderElement = /*#__PURE__*/ function(RenderElement) {
|
|
|
15071
14671
|
return Background;
|
|
15072
14672
|
}();
|
|
15073
14673
|
|
|
15074
|
-
/**
|
|
15075
|
-
* Fog Mode.
|
|
15076
|
-
*/ exports.FogMode = void 0;
|
|
15077
14674
|
(function(FogMode) {
|
|
15078
14675
|
FogMode[FogMode[/** Disable fog. */ "None"] = 0] = "None";
|
|
15079
14676
|
FogMode[FogMode[/** Linear fog. */ "Linear"] = 1] = "Linear";
|
|
@@ -15081,9 +14678,6 @@ var TextRenderElement = /*#__PURE__*/ function(RenderElement) {
|
|
|
15081
14678
|
FogMode[FogMode[/** Exponential squared fog. */ "ExponentialSquared"] = 3] = "ExponentialSquared";
|
|
15082
14679
|
})(exports.FogMode || (exports.FogMode = {}));
|
|
15083
14680
|
|
|
15084
|
-
/**
|
|
15085
|
-
* Diffuse mode.
|
|
15086
|
-
*/ exports.DiffuseMode = void 0;
|
|
15087
14681
|
(function(DiffuseMode) {
|
|
15088
14682
|
DiffuseMode[DiffuseMode[/** Solid color mode. */ "SolidColor"] = 0] = "SolidColor";
|
|
15089
14683
|
DiffuseMode[DiffuseMode[/**
|
|
@@ -15202,7 +14796,7 @@ var TextRenderElement = /*#__PURE__*/ function(RenderElement) {
|
|
|
15202
14796
|
out[25] = src[25] * 0.429042;
|
|
15203
14797
|
out[26] = src[26] * 0.429042;
|
|
15204
14798
|
};
|
|
15205
|
-
|
|
14799
|
+
_create_class__default['default'](AmbientLight, [
|
|
15206
14800
|
{
|
|
15207
14801
|
key: "specularTextureDecodeRGBM",
|
|
15208
14802
|
get: /**
|
|
@@ -15313,38 +14907,20 @@ var TextRenderElement = /*#__PURE__*/ function(RenderElement) {
|
|
|
15313
14907
|
]);
|
|
15314
14908
|
return AmbientLight;
|
|
15315
14909
|
}();
|
|
15316
|
-
(
|
|
15317
|
-
|
|
15318
|
-
|
|
15319
|
-
(
|
|
15320
|
-
|
|
15321
|
-
|
|
15322
|
-
(
|
|
15323
|
-
|
|
15324
|
-
|
|
15325
|
-
(function() {
|
|
15326
|
-
AmbientLight._diffuseColorProperty = Shader.getPropertyByName("u_envMapLight.diffuse");
|
|
15327
|
-
})();
|
|
15328
|
-
(function() {
|
|
15329
|
-
AmbientLight._diffuseSHProperty = Shader.getPropertyByName("u_env_sh");
|
|
15330
|
-
})();
|
|
15331
|
-
(function() {
|
|
15332
|
-
AmbientLight._diffuseIntensityProperty = Shader.getPropertyByName("u_envMapLight.diffuseIntensity");
|
|
15333
|
-
})();
|
|
15334
|
-
(function() {
|
|
15335
|
-
AmbientLight._specularTextureProperty = Shader.getPropertyByName("u_env_specularSampler");
|
|
15336
|
-
})();
|
|
15337
|
-
(function() {
|
|
15338
|
-
AmbientLight._specularIntensityProperty = Shader.getPropertyByName("u_envMapLight.specularIntensity");
|
|
15339
|
-
})();
|
|
15340
|
-
(function() {
|
|
15341
|
-
AmbientLight._mipLevelProperty = Shader.getPropertyByName("u_envMapLight.mipMapLevel");
|
|
15342
|
-
})();
|
|
14910
|
+
AmbientLight._shMacro = Shader.getMacroByName("O3_USE_SH");
|
|
14911
|
+
AmbientLight._specularMacro = Shader.getMacroByName("O3_USE_SPECULAR_ENV");
|
|
14912
|
+
AmbientLight._decodeRGBMMacro = Shader.getMacroByName("O3_DECODE_ENV_RGBM");
|
|
14913
|
+
AmbientLight._diffuseColorProperty = Shader.getPropertyByName("u_envMapLight.diffuse");
|
|
14914
|
+
AmbientLight._diffuseSHProperty = Shader.getPropertyByName("u_env_sh");
|
|
14915
|
+
AmbientLight._diffuseIntensityProperty = Shader.getPropertyByName("u_envMapLight.diffuseIntensity");
|
|
14916
|
+
AmbientLight._specularTextureProperty = Shader.getPropertyByName("u_env_specularSampler");
|
|
14917
|
+
AmbientLight._specularIntensityProperty = Shader.getPropertyByName("u_envMapLight.specularIntensity");
|
|
14918
|
+
AmbientLight._mipLevelProperty = Shader.getPropertyByName("u_envMapLight.mipMapLevel");
|
|
15343
14919
|
|
|
15344
14920
|
/**
|
|
15345
14921
|
* Scene.
|
|
15346
14922
|
*/ var Scene = /*#__PURE__*/ function(EngineObject) {
|
|
15347
|
-
|
|
14923
|
+
_inherits__default['default'](Scene, EngineObject);
|
|
15348
14924
|
function Scene(engine, name) {
|
|
15349
14925
|
var _this;
|
|
15350
14926
|
_this = EngineObject.call(this, engine) || this;
|
|
@@ -15370,7 +14946,7 @@ var TextRenderElement = /*#__PURE__*/ function(RenderElement) {
|
|
|
15370
14946
|
var shaderData = _this.shaderData;
|
|
15371
14947
|
shaderData._addRefCount(1);
|
|
15372
14948
|
_this.ambientLight = new AmbientLight();
|
|
15373
|
-
engine.sceneManager._allScenes.push(
|
|
14949
|
+
engine.sceneManager._allScenes.push(_assert_this_initialized__default['default'](_this));
|
|
15374
14950
|
shaderData.enableMacro("OASIS_FOG_MODE", _this._fogMode.toString());
|
|
15375
14951
|
shaderData.enableMacro("CASCADED_COUNT", _this.shadowCascades.toString());
|
|
15376
14952
|
shaderData.setColor(Scene._fogColorProperty, _this._fogColor);
|
|
@@ -15580,7 +15156,7 @@ var TextRenderElement = /*#__PURE__*/ function(RenderElement) {
|
|
|
15580
15156
|
this._fogParams.z = density / Math.LN2;
|
|
15581
15157
|
this._fogParams.w = density / Math.sqrt(Math.LN2);
|
|
15582
15158
|
};
|
|
15583
|
-
|
|
15159
|
+
_create_class__default['default'](Scene, [
|
|
15584
15160
|
{
|
|
15585
15161
|
key: "shaderData",
|
|
15586
15162
|
get: /**
|
|
@@ -15724,12 +15300,8 @@ var TextRenderElement = /*#__PURE__*/ function(RenderElement) {
|
|
|
15724
15300
|
]);
|
|
15725
15301
|
return Scene;
|
|
15726
15302
|
}(EngineObject);
|
|
15727
|
-
(
|
|
15728
|
-
|
|
15729
|
-
})();
|
|
15730
|
-
(function() {
|
|
15731
|
-
Scene._fogParamsProperty = Shader.getPropertyByName("oasis_FogParams");
|
|
15732
|
-
})();
|
|
15303
|
+
Scene._fogColorProperty = Shader.getPropertyByName("oasis_FogColor");
|
|
15304
|
+
Scene._fogParamsProperty = Shader.getPropertyByName("oasis_FogParams");
|
|
15733
15305
|
|
|
15734
15306
|
/**
|
|
15735
15307
|
* Scene manager.
|
|
@@ -15777,7 +15349,7 @@ var TextRenderElement = /*#__PURE__*/ function(RenderElement) {
|
|
|
15777
15349
|
}
|
|
15778
15350
|
allScenes.length = 0;
|
|
15779
15351
|
};
|
|
15780
|
-
|
|
15352
|
+
_create_class__default['default'](SceneManager, [
|
|
15781
15353
|
{
|
|
15782
15354
|
key: "activeScene",
|
|
15783
15355
|
get: /**
|
|
@@ -15812,7 +15384,7 @@ var pbrSpecularFs = "#define GLSLIFY 1\n#include <common>\n#include <camera_decl
|
|
|
15812
15384
|
|
|
15813
15385
|
var pbrVs = "#define GLSLIFY 1\n#include <common>\n#include <common_vert>\n#include <blendShape_input>\n#include <uv_share>\n#include <color_share>\n#include <normal_share>\n#include <worldpos_share>\n#include <ShadowVertexDeclaration>\n#include <FogVertexDeclaration>\nvoid main(){\n#include <begin_position_vert>\n#include <begin_normal_vert>\n#include <blendShape_vert>\n#include <skinning_vert>\n#include <uv_vert>\n#include <color_vert>\n#include <normal_vert>\n#include <worldpos_vert>\n#include <position_vert>\n#include <ShadowVertex>\n#include <FogVertex>\n}"; // eslint-disable-line
|
|
15814
15386
|
|
|
15815
|
-
var shadowMapFs = "#define GLSLIFY 1\n#ifdef OASIS_NO_DEPTH_TEXTURE\
|
|
15387
|
+
var shadowMapFs = "#define GLSLIFY 1\n#ifdef OASIS_NO_DEPTH_TEXTURE\n/***Decompose and save depth value.*/vec4 pack(float depth){const vec4 bitShift=vec4(1.0,256.0,256.0*256.0,256.0*256.0*256.0);const vec4 bitMask=vec4(1.0/256.0,1.0/256.0,1.0/256.0,0.0);vec4 rgbaDepth=fract(depth*bitShift);rgbaDepth-=rgbaDepth.gbaa*bitMask;return rgbaDepth;}\n#endif\nvoid main(){\n#ifdef OASIS_NO_DEPTH_TEXTURE\ngl_FragColor=pack(gl_FragCoord.z);\n#else\ngl_FragColor=vec4(0.0,0.0,0.0,0.0);\n#endif\n}"; // eslint-disable-line
|
|
15816
15388
|
|
|
15817
15389
|
var shadowMapVs = "#define GLSLIFY 1\n#include <common>\n#include <common_vert>\n#include <blendShape_input>\n#include <normal_share>\nuniform mat4 u_VPMat;uniform vec2 u_shadowBias;uniform vec3 u_lightDirection;vec3 applyShadowBias(vec3 positionWS){positionWS-=u_lightDirection*u_shadowBias.x;return positionWS;}vec3 applyShadowNormalBias(vec3 positionWS,vec3 normalWS){float invNdotL=1.0-clamp(dot(-u_lightDirection,normalWS),0.0,1.0);float scale=invNdotL*u_shadowBias.y;positionWS+=normalWS*vec3(scale);return positionWS;}void main(){\n#include <begin_position_vert>\n#include <begin_normal_vert>\n#include <blendShape_vert>\n#include <skinning_vert>\nvec4 positionWS=u_modelMat*position;positionWS.xyz=applyShadowBias(positionWS.xyz);\n#ifndef OMIT_NORMAL\n#ifdef O3_HAS_NORMAL\nvec3 normalWS=normalize(mat3(u_normalMat)*normal);positionWS.xyz=applyShadowNormalBias(positionWS.xyz,normalWS);\n#endif\n#endif\nvec4 positionCS=u_VPMat*positionWS;positionCS.z=max(positionCS.z,-1.0);gl_Position=positionCS;}"; // eslint-disable-line
|
|
15818
15390
|
|
|
@@ -15931,7 +15503,7 @@ ShaderPool.init();
|
|
|
15931
15503
|
/**
|
|
15932
15504
|
* Engine.
|
|
15933
15505
|
*/ var Engine = /*#__PURE__*/ function(EventDispatcher) {
|
|
15934
|
-
|
|
15506
|
+
_inherits__default['default'](Engine, EventDispatcher);
|
|
15935
15507
|
function Engine(canvas, hardwareRenderer, settings) {
|
|
15936
15508
|
var _this;
|
|
15937
15509
|
_this = EventDispatcher.call(this) || this;
|
|
@@ -15948,8 +15520,8 @@ ShaderPool.init();
|
|
|
15948
15520
|
/** @internal */ _this._canSpriteBatch = true;
|
|
15949
15521
|
/** @internal @todo: temporary solution */ _this._macroCollection = new ShaderMacroCollection();
|
|
15950
15522
|
_this._settings = {};
|
|
15951
|
-
_this._resourceManager = new ResourceManager(
|
|
15952
|
-
_this._sceneManager = new SceneManager(
|
|
15523
|
+
_this._resourceManager = new ResourceManager(_assert_this_initialized__default['default'](_this));
|
|
15524
|
+
_this._sceneManager = new SceneManager(_assert_this_initialized__default['default'](_this));
|
|
15953
15525
|
_this._vSyncCount = 1;
|
|
15954
15526
|
_this._targetFrameRate = 60;
|
|
15955
15527
|
_this._time = new Time();
|
|
@@ -15973,25 +15545,25 @@ ShaderPool.init();
|
|
|
15973
15545
|
};
|
|
15974
15546
|
_this._hardwareRenderer = hardwareRenderer;
|
|
15975
15547
|
_this._hardwareRenderer.init(canvas);
|
|
15976
|
-
_this.physicsManager = new PhysicsManager(
|
|
15548
|
+
_this.physicsManager = new PhysicsManager(_assert_this_initialized__default['default'](_this));
|
|
15977
15549
|
_this._canvas = canvas;
|
|
15978
|
-
_this._sceneManager.activeScene = new Scene(
|
|
15979
|
-
_this._spriteMaskManager = new SpriteMaskManager(
|
|
15550
|
+
_this._sceneManager.activeScene = new Scene(_assert_this_initialized__default['default'](_this), "DefaultScene");
|
|
15551
|
+
_this._spriteMaskManager = new SpriteMaskManager(_assert_this_initialized__default['default'](_this));
|
|
15980
15552
|
_this._spriteDefaultMaterial = _this._createSpriteMaterial();
|
|
15981
15553
|
_this._spriteMaskDefaultMaterial = _this._createSpriteMaskMaterial();
|
|
15982
|
-
_this._textDefaultFont = Font.createFromOS(
|
|
15554
|
+
_this._textDefaultFont = Font.createFromOS(_assert_this_initialized__default['default'](_this), "Arial");
|
|
15983
15555
|
_this._textDefaultFont.isGCIgnored = true;
|
|
15984
|
-
_this.inputManager = new InputManager(
|
|
15556
|
+
_this.inputManager = new InputManager(_assert_this_initialized__default['default'](_this));
|
|
15985
15557
|
var magentaPixel = new Uint8Array([
|
|
15986
15558
|
255,
|
|
15987
15559
|
0,
|
|
15988
15560
|
255,
|
|
15989
15561
|
255
|
|
15990
15562
|
]);
|
|
15991
|
-
var magentaTexture2D = new Texture2D(
|
|
15563
|
+
var magentaTexture2D = new Texture2D(_assert_this_initialized__default['default'](_this), 1, 1, exports.TextureFormat.R8G8B8A8, false);
|
|
15992
15564
|
magentaTexture2D.setPixelBuffer(magentaPixel);
|
|
15993
15565
|
magentaTexture2D.isGCIgnored = true;
|
|
15994
|
-
var magentaTextureCube = new TextureCube(
|
|
15566
|
+
var magentaTextureCube = new TextureCube(_assert_this_initialized__default['default'](_this), 1, exports.TextureFormat.R8G8B8A8, false);
|
|
15995
15567
|
magentaTextureCube.setPixelBuffer(exports.TextureCubeFace.PositiveX, magentaPixel);
|
|
15996
15568
|
magentaTextureCube.setPixelBuffer(exports.TextureCubeFace.NegativeX, magentaPixel);
|
|
15997
15569
|
magentaTextureCube.setPixelBuffer(exports.TextureCubeFace.PositiveY, magentaPixel);
|
|
@@ -16002,23 +15574,23 @@ ShaderPool.init();
|
|
|
16002
15574
|
if (!hardwareRenderer.canIUse(exports.GLCapabilityType.depthTexture)) {
|
|
16003
15575
|
_this._macroCollection.enable(Engine._noDepthTextureMacro);
|
|
16004
15576
|
} else {
|
|
16005
|
-
var depthTexture2D = new Texture2D(
|
|
15577
|
+
var depthTexture2D = new Texture2D(_assert_this_initialized__default['default'](_this), 1, 1, exports.TextureFormat.Depth16, false);
|
|
16006
15578
|
depthTexture2D.isGCIgnored = true;
|
|
16007
15579
|
_this._depthTexture2D = depthTexture2D;
|
|
16008
15580
|
}
|
|
16009
15581
|
_this._magentaTexture2D = magentaTexture2D;
|
|
16010
15582
|
_this._magentaTextureCube = magentaTextureCube;
|
|
16011
15583
|
if (hardwareRenderer.isWebGL2) {
|
|
16012
|
-
var magentaTexture2DArray = new Texture2DArray(
|
|
15584
|
+
var magentaTexture2DArray = new Texture2DArray(_assert_this_initialized__default['default'](_this), 1, 1, 1, exports.TextureFormat.R8G8B8A8, false);
|
|
16013
15585
|
magentaTexture2DArray.setPixelBuffer(0, magentaPixel);
|
|
16014
15586
|
magentaTexture2DArray.isGCIgnored = true;
|
|
16015
15587
|
_this._magentaTexture2DArray = magentaTexture2DArray;
|
|
16016
15588
|
}
|
|
16017
|
-
var magentaMaterial = new Material(
|
|
15589
|
+
var magentaMaterial = new Material(_assert_this_initialized__default['default'](_this), Shader.find("unlit"));
|
|
16018
15590
|
magentaMaterial.isGCIgnored = true;
|
|
16019
15591
|
magentaMaterial.shaderData.setColor("u_baseColor", new Color(1.0, 0.0, 1.01, 1.0));
|
|
16020
15592
|
_this._magentaMaterial = magentaMaterial;
|
|
16021
|
-
var backgroundTextureMaterial = new Material(
|
|
15593
|
+
var backgroundTextureMaterial = new Material(_assert_this_initialized__default['default'](_this), Shader.find("background-texture"));
|
|
16022
15594
|
backgroundTextureMaterial.isGCIgnored = true;
|
|
16023
15595
|
backgroundTextureMaterial.renderState.depthState.compareFunction = exports.CompareFunction.LessEqual;
|
|
16024
15596
|
_this._backgroundTextureMaterial = backgroundTextureMaterial;
|
|
@@ -16189,7 +15761,7 @@ ShaderPool.init();
|
|
|
16189
15761
|
material.isGCIgnored = true;
|
|
16190
15762
|
return material;
|
|
16191
15763
|
};
|
|
16192
|
-
|
|
15764
|
+
_create_class__default['default'](Engine, [
|
|
16193
15765
|
{
|
|
16194
15766
|
key: "settings",
|
|
16195
15767
|
get: /**
|
|
@@ -16277,20 +15849,14 @@ ShaderPool.init();
|
|
|
16277
15849
|
]);
|
|
16278
15850
|
return Engine;
|
|
16279
15851
|
}(EventDispatcher);
|
|
16280
|
-
(
|
|
16281
|
-
|
|
16282
|
-
|
|
16283
|
-
(function() {
|
|
16284
|
-
/** @internal */ Engine._noDepthTextureMacro = Shader.getMacroByName("OASIS_NO_DEPTH_TEXTURE");
|
|
16285
|
-
})();
|
|
16286
|
-
(function() {
|
|
16287
|
-
/** @internal Conversion of space units to pixel units for 2D. */ Engine._pixelsPerUnit = 100;
|
|
16288
|
-
})();
|
|
15852
|
+
/** @internal */ Engine._gammaMacro = Shader.getMacroByName("OASIS_COLORSPACE_GAMMA");
|
|
15853
|
+
/** @internal */ Engine._noDepthTextureMacro = Shader.getMacroByName("OASIS_NO_DEPTH_TEXTURE");
|
|
15854
|
+
/** @internal Conversion of space units to pixel units for 2D. */ Engine._pixelsPerUnit = 100;
|
|
16289
15855
|
|
|
16290
15856
|
/**
|
|
16291
15857
|
* Script class, used for logic writing.
|
|
16292
15858
|
*/ var Script = /*#__PURE__*/ function(Component) {
|
|
16293
|
-
|
|
15859
|
+
_inherits__default['default'](Script, Component);
|
|
16294
15860
|
function Script() {
|
|
16295
15861
|
var _this;
|
|
16296
15862
|
_this = Component.apply(this, arguments) || this;
|
|
@@ -16459,38 +16025,38 @@ ShaderPool.init();
|
|
|
16459
16025
|
};
|
|
16460
16026
|
return Script;
|
|
16461
16027
|
}(Component);
|
|
16462
|
-
|
|
16028
|
+
_ts_decorate__default['default']([
|
|
16463
16029
|
ignoreClone
|
|
16464
16030
|
], Script.prototype, "_started", void 0);
|
|
16465
|
-
|
|
16031
|
+
_ts_decorate__default['default']([
|
|
16466
16032
|
ignoreClone
|
|
16467
16033
|
], Script.prototype, "_onStartIndex", void 0);
|
|
16468
|
-
|
|
16034
|
+
_ts_decorate__default['default']([
|
|
16469
16035
|
ignoreClone
|
|
16470
16036
|
], Script.prototype, "_onUpdateIndex", void 0);
|
|
16471
|
-
|
|
16037
|
+
_ts_decorate__default['default']([
|
|
16472
16038
|
ignoreClone
|
|
16473
16039
|
], Script.prototype, "_onLateUpdateIndex", void 0);
|
|
16474
|
-
|
|
16040
|
+
_ts_decorate__default['default']([
|
|
16475
16041
|
ignoreClone
|
|
16476
16042
|
], Script.prototype, "_onPhysicsUpdateIndex", void 0);
|
|
16477
|
-
|
|
16043
|
+
_ts_decorate__default['default']([
|
|
16478
16044
|
ignoreClone
|
|
16479
16045
|
], Script.prototype, "_onPreRenderIndex", void 0);
|
|
16480
|
-
|
|
16046
|
+
_ts_decorate__default['default']([
|
|
16481
16047
|
ignoreClone
|
|
16482
16048
|
], Script.prototype, "_onPostRenderIndex", void 0);
|
|
16483
|
-
|
|
16049
|
+
_ts_decorate__default['default']([
|
|
16484
16050
|
ignoreClone
|
|
16485
16051
|
], Script.prototype, "_entityScriptsIndex", void 0);
|
|
16486
|
-
|
|
16052
|
+
_ts_decorate__default['default']([
|
|
16487
16053
|
ignoreClone
|
|
16488
16054
|
], Script.prototype, "_waitHandlingInValid", void 0);
|
|
16489
16055
|
|
|
16490
16056
|
/**
|
|
16491
16057
|
* @internal
|
|
16492
16058
|
*/ var SpriteBatcher = /*#__PURE__*/ function(Basic2DBatcher) {
|
|
16493
|
-
|
|
16059
|
+
_inherits__default['default'](SpriteBatcher, Basic2DBatcher);
|
|
16494
16060
|
function SpriteBatcher() {
|
|
16495
16061
|
return Basic2DBatcher.apply(this, arguments);
|
|
16496
16062
|
}
|
|
@@ -16600,9 +16166,7 @@ __decorate([
|
|
|
16600
16166
|
};
|
|
16601
16167
|
return SpriteBatcher;
|
|
16602
16168
|
}(Basic2DBatcher);
|
|
16603
|
-
(
|
|
16604
|
-
SpriteBatcher._textureProperty = Shader.getPropertyByName("u_spriteTexture");
|
|
16605
|
-
})();
|
|
16169
|
+
SpriteBatcher._textureProperty = Shader.getPropertyByName("u_spriteTexture");
|
|
16606
16170
|
|
|
16607
16171
|
/**
|
|
16608
16172
|
* Render queue.
|
|
@@ -17100,247 +16664,227 @@ var /**
|
|
|
17100
16664
|
};
|
|
17101
16665
|
return ShadowUtils;
|
|
17102
16666
|
}();
|
|
17103
|
-
(
|
|
17104
|
-
|
|
17105
|
-
|
|
17106
|
-
|
|
17107
|
-
|
|
17108
|
-
|
|
17109
|
-
|
|
17110
|
-
(
|
|
17111
|
-
|
|
17112
|
-
|
|
17113
|
-
|
|
17114
|
-
|
|
17115
|
-
|
|
17116
|
-
|
|
17117
|
-
|
|
17118
|
-
|
|
17119
|
-
|
|
17120
|
-
|
|
17121
|
-
|
|
17122
|
-
|
|
17123
|
-
|
|
17124
|
-
|
|
17125
|
-
|
|
17126
|
-
|
|
17127
|
-
|
|
17128
|
-
|
|
17129
|
-
|
|
17130
|
-
|
|
17131
|
-
|
|
17132
|
-
|
|
17133
|
-
|
|
17134
|
-
|
|
17135
|
-
|
|
16667
|
+
ShadowUtils._tempMatrix0 = new engineMath.Matrix();
|
|
16668
|
+
// prettier-ignore
|
|
16669
|
+
/** @internal */ ShadowUtils._shadowMapCoordMatrix = new engineMath.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);
|
|
16670
|
+
ShadowUtils._frustumCorners = [
|
|
16671
|
+
new engineMath.Vector3(),
|
|
16672
|
+
new engineMath.Vector3(),
|
|
16673
|
+
new engineMath.Vector3(),
|
|
16674
|
+
new engineMath.Vector3(),
|
|
16675
|
+
new engineMath.Vector3(),
|
|
16676
|
+
new engineMath.Vector3(),
|
|
16677
|
+
new engineMath.Vector3(),
|
|
16678
|
+
new engineMath.Vector3()
|
|
16679
|
+
];
|
|
16680
|
+
ShadowUtils._adjustNearPlane = new engineMath.Plane(new engineMath.Vector3());
|
|
16681
|
+
ShadowUtils._adjustFarPlane = new engineMath.Plane(new engineMath.Vector3());
|
|
16682
|
+
ShadowUtils._backPlaneFaces = new Array(5);
|
|
16683
|
+
ShadowUtils._edgePlanePoint2 = new engineMath.Vector3();
|
|
16684
|
+
/** near, far, left, right, bottom, top */ ShadowUtils._frustumPlaneNeighbors = [
|
|
16685
|
+
[
|
|
16686
|
+
engineMath.FrustumFace.Left,
|
|
16687
|
+
engineMath.FrustumFace.Right,
|
|
16688
|
+
engineMath.FrustumFace.Top,
|
|
16689
|
+
engineMath.FrustumFace.Bottom
|
|
16690
|
+
],
|
|
16691
|
+
[
|
|
16692
|
+
engineMath.FrustumFace.Left,
|
|
16693
|
+
engineMath.FrustumFace.Right,
|
|
16694
|
+
engineMath.FrustumFace.Top,
|
|
16695
|
+
engineMath.FrustumFace.Bottom
|
|
16696
|
+
],
|
|
16697
|
+
[
|
|
16698
|
+
engineMath.FrustumFace.Near,
|
|
16699
|
+
engineMath.FrustumFace.Far,
|
|
16700
|
+
engineMath.FrustumFace.Top,
|
|
16701
|
+
engineMath.FrustumFace.Bottom
|
|
16702
|
+
],
|
|
16703
|
+
[
|
|
16704
|
+
engineMath.FrustumFace.Near,
|
|
16705
|
+
engineMath.FrustumFace.Far,
|
|
16706
|
+
engineMath.FrustumFace.Top,
|
|
16707
|
+
engineMath.FrustumFace.Bottom
|
|
16708
|
+
],
|
|
16709
|
+
[
|
|
16710
|
+
engineMath.FrustumFace.Near,
|
|
16711
|
+
engineMath.FrustumFace.Far,
|
|
16712
|
+
engineMath.FrustumFace.Left,
|
|
16713
|
+
engineMath.FrustumFace.Right
|
|
16714
|
+
],
|
|
16715
|
+
[
|
|
16716
|
+
engineMath.FrustumFace.Near,
|
|
16717
|
+
engineMath.FrustumFace.Far,
|
|
16718
|
+
engineMath.FrustumFace.Left,
|
|
16719
|
+
engineMath.FrustumFace.Right
|
|
16720
|
+
]
|
|
16721
|
+
];
|
|
16722
|
+
/** near, far, left, right, bottom, top */ ShadowUtils._frustumTwoPlaneCorners = [
|
|
16723
|
+
[
|
|
16724
|
+
// near, far, left, right, bottom, top
|
|
17136
16725
|
[
|
|
17137
|
-
|
|
17138
|
-
|
|
17139
|
-
engineMath.FrustumFace.Top,
|
|
17140
|
-
engineMath.FrustumFace.Bottom
|
|
16726
|
+
8,
|
|
16727
|
+
8
|
|
17141
16728
|
],
|
|
17142
16729
|
[
|
|
17143
|
-
|
|
17144
|
-
|
|
17145
|
-
engineMath.FrustumFace.Top,
|
|
17146
|
-
engineMath.FrustumFace.Bottom
|
|
16730
|
+
8,
|
|
16731
|
+
8
|
|
17147
16732
|
],
|
|
17148
16733
|
[
|
|
17149
|
-
|
|
17150
|
-
|
|
17151
|
-
engineMath.FrustumFace.Top,
|
|
17152
|
-
engineMath.FrustumFace.Bottom
|
|
16734
|
+
4,
|
|
16735
|
+
5
|
|
17153
16736
|
],
|
|
17154
16737
|
[
|
|
17155
|
-
|
|
17156
|
-
|
|
17157
|
-
engineMath.FrustumFace.Top,
|
|
17158
|
-
engineMath.FrustumFace.Bottom
|
|
16738
|
+
6,
|
|
16739
|
+
7
|
|
17159
16740
|
],
|
|
17160
16741
|
[
|
|
17161
|
-
|
|
17162
|
-
|
|
17163
|
-
engineMath.FrustumFace.Left,
|
|
17164
|
-
engineMath.FrustumFace.Right
|
|
16742
|
+
7,
|
|
16743
|
+
4
|
|
17165
16744
|
],
|
|
17166
16745
|
[
|
|
17167
|
-
|
|
17168
|
-
|
|
17169
|
-
engineMath.FrustumFace.Left,
|
|
17170
|
-
engineMath.FrustumFace.Right
|
|
16746
|
+
5,
|
|
16747
|
+
6
|
|
17171
16748
|
]
|
|
17172
|
-
]
|
|
17173
|
-
|
|
17174
|
-
|
|
17175
|
-
/** near, far, left, right, bottom, top */ ShadowUtils._frustumTwoPlaneCorners = [
|
|
16749
|
+
],
|
|
16750
|
+
[
|
|
16751
|
+
// near, far, left, right, bottom, top
|
|
17176
16752
|
[
|
|
17177
|
-
|
|
17178
|
-
|
|
17179
|
-
8,
|
|
17180
|
-
8
|
|
17181
|
-
],
|
|
17182
|
-
[
|
|
17183
|
-
8,
|
|
17184
|
-
8
|
|
17185
|
-
],
|
|
17186
|
-
[
|
|
17187
|
-
4,
|
|
17188
|
-
5
|
|
17189
|
-
],
|
|
17190
|
-
[
|
|
17191
|
-
6,
|
|
17192
|
-
7
|
|
17193
|
-
],
|
|
17194
|
-
[
|
|
17195
|
-
7,
|
|
17196
|
-
4
|
|
17197
|
-
],
|
|
17198
|
-
[
|
|
17199
|
-
5,
|
|
17200
|
-
6
|
|
17201
|
-
]
|
|
16753
|
+
8,
|
|
16754
|
+
8
|
|
17202
16755
|
],
|
|
17203
16756
|
[
|
|
17204
|
-
|
|
17205
|
-
|
|
17206
|
-
8,
|
|
17207
|
-
8
|
|
17208
|
-
],
|
|
17209
|
-
[
|
|
17210
|
-
8,
|
|
17211
|
-
8
|
|
17212
|
-
],
|
|
17213
|
-
[
|
|
17214
|
-
1,
|
|
17215
|
-
0
|
|
17216
|
-
],
|
|
17217
|
-
[
|
|
17218
|
-
3,
|
|
17219
|
-
2
|
|
17220
|
-
],
|
|
17221
|
-
[
|
|
17222
|
-
0,
|
|
17223
|
-
3
|
|
17224
|
-
],
|
|
17225
|
-
[
|
|
17226
|
-
2,
|
|
17227
|
-
1
|
|
17228
|
-
]
|
|
16757
|
+
8,
|
|
16758
|
+
8
|
|
17229
16759
|
],
|
|
17230
16760
|
[
|
|
17231
|
-
|
|
17232
|
-
|
|
17233
|
-
5,
|
|
17234
|
-
4
|
|
17235
|
-
],
|
|
17236
|
-
[
|
|
17237
|
-
0,
|
|
17238
|
-
1
|
|
17239
|
-
],
|
|
17240
|
-
[
|
|
17241
|
-
8,
|
|
17242
|
-
8
|
|
17243
|
-
],
|
|
17244
|
-
[
|
|
17245
|
-
8,
|
|
17246
|
-
8
|
|
17247
|
-
],
|
|
17248
|
-
[
|
|
17249
|
-
4,
|
|
17250
|
-
0
|
|
17251
|
-
],
|
|
17252
|
-
[
|
|
17253
|
-
1,
|
|
17254
|
-
5
|
|
17255
|
-
]
|
|
16761
|
+
1,
|
|
16762
|
+
0
|
|
17256
16763
|
],
|
|
17257
16764
|
[
|
|
17258
|
-
|
|
17259
|
-
|
|
17260
|
-
7,
|
|
17261
|
-
6
|
|
17262
|
-
],
|
|
17263
|
-
[
|
|
17264
|
-
2,
|
|
17265
|
-
3
|
|
17266
|
-
],
|
|
17267
|
-
[
|
|
17268
|
-
8,
|
|
17269
|
-
8
|
|
17270
|
-
],
|
|
17271
|
-
[
|
|
17272
|
-
8,
|
|
17273
|
-
8
|
|
17274
|
-
],
|
|
17275
|
-
[
|
|
17276
|
-
3,
|
|
17277
|
-
7
|
|
17278
|
-
],
|
|
17279
|
-
[
|
|
17280
|
-
6,
|
|
17281
|
-
2
|
|
17282
|
-
]
|
|
16765
|
+
3,
|
|
16766
|
+
2
|
|
17283
16767
|
],
|
|
17284
16768
|
[
|
|
17285
|
-
|
|
17286
|
-
|
|
17287
|
-
4,
|
|
17288
|
-
7
|
|
17289
|
-
],
|
|
17290
|
-
[
|
|
17291
|
-
3,
|
|
17292
|
-
0
|
|
17293
|
-
],
|
|
17294
|
-
[
|
|
17295
|
-
0,
|
|
17296
|
-
4
|
|
17297
|
-
],
|
|
17298
|
-
[
|
|
17299
|
-
7,
|
|
17300
|
-
3
|
|
17301
|
-
],
|
|
17302
|
-
[
|
|
17303
|
-
8,
|
|
17304
|
-
8
|
|
17305
|
-
],
|
|
17306
|
-
[
|
|
17307
|
-
8,
|
|
17308
|
-
8
|
|
17309
|
-
]
|
|
16769
|
+
0,
|
|
16770
|
+
3
|
|
17310
16771
|
],
|
|
17311
16772
|
[
|
|
17312
|
-
|
|
17313
|
-
|
|
17314
|
-
6,
|
|
17315
|
-
5
|
|
17316
|
-
],
|
|
17317
|
-
[
|
|
17318
|
-
1,
|
|
17319
|
-
2
|
|
17320
|
-
],
|
|
17321
|
-
[
|
|
17322
|
-
5,
|
|
17323
|
-
1
|
|
17324
|
-
],
|
|
17325
|
-
[
|
|
17326
|
-
2,
|
|
17327
|
-
6
|
|
17328
|
-
],
|
|
17329
|
-
[
|
|
17330
|
-
8,
|
|
17331
|
-
8
|
|
17332
|
-
],
|
|
17333
|
-
[
|
|
17334
|
-
8,
|
|
17335
|
-
8
|
|
17336
|
-
]
|
|
16773
|
+
2,
|
|
16774
|
+
1
|
|
17337
16775
|
]
|
|
17338
|
-
]
|
|
17339
|
-
|
|
17340
|
-
|
|
17341
|
-
|
|
17342
|
-
|
|
17343
|
-
|
|
16776
|
+
],
|
|
16777
|
+
[
|
|
16778
|
+
// near, far, left, right, bottom, top
|
|
16779
|
+
[
|
|
16780
|
+
5,
|
|
16781
|
+
4
|
|
16782
|
+
],
|
|
16783
|
+
[
|
|
16784
|
+
0,
|
|
16785
|
+
1
|
|
16786
|
+
],
|
|
16787
|
+
[
|
|
16788
|
+
8,
|
|
16789
|
+
8
|
|
16790
|
+
],
|
|
16791
|
+
[
|
|
16792
|
+
8,
|
|
16793
|
+
8
|
|
16794
|
+
],
|
|
16795
|
+
[
|
|
16796
|
+
4,
|
|
16797
|
+
0
|
|
16798
|
+
],
|
|
16799
|
+
[
|
|
16800
|
+
1,
|
|
16801
|
+
5
|
|
16802
|
+
]
|
|
16803
|
+
],
|
|
16804
|
+
[
|
|
16805
|
+
// near, far, left, right, bottom, top
|
|
16806
|
+
[
|
|
16807
|
+
7,
|
|
16808
|
+
6
|
|
16809
|
+
],
|
|
16810
|
+
[
|
|
16811
|
+
2,
|
|
16812
|
+
3
|
|
16813
|
+
],
|
|
16814
|
+
[
|
|
16815
|
+
8,
|
|
16816
|
+
8
|
|
16817
|
+
],
|
|
16818
|
+
[
|
|
16819
|
+
8,
|
|
16820
|
+
8
|
|
16821
|
+
],
|
|
16822
|
+
[
|
|
16823
|
+
3,
|
|
16824
|
+
7
|
|
16825
|
+
],
|
|
16826
|
+
[
|
|
16827
|
+
6,
|
|
16828
|
+
2
|
|
16829
|
+
]
|
|
16830
|
+
],
|
|
16831
|
+
[
|
|
16832
|
+
// near, far, left, right, bottom, top
|
|
16833
|
+
[
|
|
16834
|
+
4,
|
|
16835
|
+
7
|
|
16836
|
+
],
|
|
16837
|
+
[
|
|
16838
|
+
3,
|
|
16839
|
+
0
|
|
16840
|
+
],
|
|
16841
|
+
[
|
|
16842
|
+
0,
|
|
16843
|
+
4
|
|
16844
|
+
],
|
|
16845
|
+
[
|
|
16846
|
+
7,
|
|
16847
|
+
3
|
|
16848
|
+
],
|
|
16849
|
+
[
|
|
16850
|
+
8,
|
|
16851
|
+
8
|
|
16852
|
+
],
|
|
16853
|
+
[
|
|
16854
|
+
8,
|
|
16855
|
+
8
|
|
16856
|
+
]
|
|
16857
|
+
],
|
|
16858
|
+
[
|
|
16859
|
+
// near, far, left, right, bottom, top
|
|
16860
|
+
[
|
|
16861
|
+
6,
|
|
16862
|
+
5
|
|
16863
|
+
],
|
|
16864
|
+
[
|
|
16865
|
+
1,
|
|
16866
|
+
2
|
|
16867
|
+
],
|
|
16868
|
+
[
|
|
16869
|
+
5,
|
|
16870
|
+
1
|
|
16871
|
+
],
|
|
16872
|
+
[
|
|
16873
|
+
2,
|
|
16874
|
+
6
|
|
16875
|
+
],
|
|
16876
|
+
[
|
|
16877
|
+
8,
|
|
16878
|
+
8
|
|
16879
|
+
],
|
|
16880
|
+
[
|
|
16881
|
+
8,
|
|
16882
|
+
8
|
|
16883
|
+
]
|
|
16884
|
+
]
|
|
16885
|
+
];
|
|
16886
|
+
//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.
|
|
16887
|
+
ShadowUtils.atlasBorderSize = 4.0;
|
|
17344
16888
|
|
|
17345
16889
|
/**
|
|
17346
16890
|
* Cascade shadow caster.
|
|
@@ -17581,45 +17125,19 @@ var /**
|
|
|
17581
17125
|
};
|
|
17582
17126
|
return CascadedShadowCasterPass;
|
|
17583
17127
|
}();
|
|
17584
|
-
(
|
|
17585
|
-
|
|
17586
|
-
|
|
17587
|
-
(
|
|
17588
|
-
|
|
17589
|
-
|
|
17590
|
-
(
|
|
17591
|
-
|
|
17592
|
-
|
|
17593
|
-
(
|
|
17594
|
-
|
|
17595
|
-
|
|
17596
|
-
(
|
|
17597
|
-
CascadedShadowCasterPass._shadowInfosProperty = Shader.getPropertyByName("u_shadowInfo");
|
|
17598
|
-
})();
|
|
17599
|
-
(function() {
|
|
17600
|
-
CascadedShadowCasterPass._shadowMapsProperty = Shader.getPropertyByName("u_shadowMap");
|
|
17601
|
-
})();
|
|
17602
|
-
(function() {
|
|
17603
|
-
CascadedShadowCasterPass._shadowSplitSpheresProperty = Shader.getPropertyByName("u_shadowSplitSpheres");
|
|
17604
|
-
})();
|
|
17605
|
-
(function() {
|
|
17606
|
-
CascadedShadowCasterPass._maxCascades = 4;
|
|
17607
|
-
})();
|
|
17608
|
-
(function() {
|
|
17609
|
-
CascadedShadowCasterPass._cascadesSplitDistance = new Array(CascadedShadowCasterPass._maxCascades + 1);
|
|
17610
|
-
})();
|
|
17611
|
-
(function() {
|
|
17612
|
-
CascadedShadowCasterPass._viewport = new engineMath.Vector4(0, 0, 1, 1);
|
|
17613
|
-
})();
|
|
17614
|
-
(function() {
|
|
17615
|
-
CascadedShadowCasterPass._clearColor = new engineMath.Color(1, 1, 1, 1);
|
|
17616
|
-
})();
|
|
17617
|
-
(function() {
|
|
17618
|
-
CascadedShadowCasterPass._tempVector = new engineMath.Vector3();
|
|
17619
|
-
})();
|
|
17620
|
-
(function() {
|
|
17621
|
-
CascadedShadowCasterPass._tempMatrix0 = new engineMath.Matrix();
|
|
17622
|
-
})();
|
|
17128
|
+
CascadedShadowCasterPass._lightShadowBiasProperty = Shader.getPropertyByName("u_shadowBias");
|
|
17129
|
+
CascadedShadowCasterPass._lightDirectionProperty = Shader.getPropertyByName("u_lightDirection");
|
|
17130
|
+
CascadedShadowCasterPass._shadowMatricesProperty = Shader.getPropertyByName("u_shadowMatrices");
|
|
17131
|
+
CascadedShadowCasterPass._shadowMapSize = Shader.getPropertyByName("u_shadowMapSize");
|
|
17132
|
+
CascadedShadowCasterPass._shadowInfosProperty = Shader.getPropertyByName("u_shadowInfo");
|
|
17133
|
+
CascadedShadowCasterPass._shadowMapsProperty = Shader.getPropertyByName("u_shadowMap");
|
|
17134
|
+
CascadedShadowCasterPass._shadowSplitSpheresProperty = Shader.getPropertyByName("u_shadowSplitSpheres");
|
|
17135
|
+
CascadedShadowCasterPass._maxCascades = 4;
|
|
17136
|
+
CascadedShadowCasterPass._cascadesSplitDistance = new Array(CascadedShadowCasterPass._maxCascades + 1);
|
|
17137
|
+
CascadedShadowCasterPass._viewport = new engineMath.Vector4(0, 0, 1, 1);
|
|
17138
|
+
CascadedShadowCasterPass._clearColor = new engineMath.Color(1, 1, 1, 1);
|
|
17139
|
+
CascadedShadowCasterPass._tempVector = new engineMath.Vector3();
|
|
17140
|
+
CascadedShadowCasterPass._tempMatrix0 = new engineMath.Matrix();
|
|
17623
17141
|
|
|
17624
17142
|
var passNum = 0;
|
|
17625
17143
|
/**
|
|
@@ -17696,7 +17214,7 @@ var passNum = 0;
|
|
|
17696
17214
|
if (typeof nameOrPass === "string") {
|
|
17697
17215
|
var renderPass = new RenderPass(nameOrPass, priority, renderTarget, replaceMaterial, mask);
|
|
17698
17216
|
this._renderPassArray.push(renderPass);
|
|
17699
|
-
} else if (
|
|
17217
|
+
} else if (_instanceof__default['default'](nameOrPass, RenderPass)) {
|
|
17700
17218
|
this._renderPassArray.push(nameOrPass);
|
|
17701
17219
|
}
|
|
17702
17220
|
this._renderPassArray.sort(function(p1, p2) {
|
|
@@ -17709,7 +17227,7 @@ var passNum = 0;
|
|
|
17709
17227
|
*/ _proto.removeRenderPass = function removeRenderPass(nameOrPass) {
|
|
17710
17228
|
var pass;
|
|
17711
17229
|
if (typeof nameOrPass === "string") pass = this.getRenderPass(nameOrPass);
|
|
17712
|
-
else if (
|
|
17230
|
+
else if (_instanceof__default['default'](nameOrPass, RenderPass)) pass = nameOrPass;
|
|
17713
17231
|
if (pass) {
|
|
17714
17232
|
var idx = this._renderPassArray.indexOf(pass);
|
|
17715
17233
|
this._renderPassArray.splice(idx, 1);
|
|
@@ -17852,7 +17370,7 @@ var passNum = 0;
|
|
|
17852
17370
|
renderer._prepareRender(context);
|
|
17853
17371
|
}
|
|
17854
17372
|
};
|
|
17855
|
-
|
|
17373
|
+
_create_class__default['default'](BasicRenderPipeline, [
|
|
17856
17374
|
{
|
|
17857
17375
|
key: "defaultRenderPass",
|
|
17858
17376
|
get: /**
|
|
@@ -17864,27 +17382,17 @@ var passNum = 0;
|
|
|
17864
17382
|
]);
|
|
17865
17383
|
return BasicRenderPipeline;
|
|
17866
17384
|
}();
|
|
17867
|
-
(
|
|
17868
|
-
|
|
17869
|
-
})();
|
|
17870
|
-
(function() {
|
|
17871
|
-
BasicRenderPipeline._tempVector1 = new engineMath.Vector3();
|
|
17872
|
-
})();
|
|
17385
|
+
BasicRenderPipeline._tempVector0 = new engineMath.Vector3();
|
|
17386
|
+
BasicRenderPipeline._tempVector1 = new engineMath.Vector3();
|
|
17873
17387
|
|
|
17874
17388
|
var _Camera;
|
|
17875
17389
|
var MathTemp = function MathTemp() {
|
|
17876
17390
|
};
|
|
17877
|
-
(
|
|
17878
|
-
|
|
17879
|
-
|
|
17880
|
-
(function() {
|
|
17881
|
-
MathTemp.tempVec3 = new engineMath.Vector3();
|
|
17882
|
-
})();
|
|
17883
|
-
(function() {
|
|
17884
|
-
MathTemp.tempVec2 = new engineMath.Vector2();
|
|
17885
|
-
})();
|
|
17391
|
+
MathTemp.tempVec4 = new engineMath.Vector4();
|
|
17392
|
+
MathTemp.tempVec3 = new engineMath.Vector3();
|
|
17393
|
+
MathTemp.tempVec2 = new engineMath.Vector2();
|
|
17886
17394
|
exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
|
|
17887
|
-
|
|
17395
|
+
_inherits__default['default'](Camera1, Component);
|
|
17888
17396
|
function Camera1(entity) {
|
|
17889
17397
|
var _this;
|
|
17890
17398
|
_this = Component.call(this, entity) || this;
|
|
@@ -17899,8 +17407,6 @@ exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
|
|
|
17899
17407
|
* @remarks Support bit manipulation, corresponding to `Layer`.
|
|
17900
17408
|
*/ _this.cullingMask = exports.Layer.Everything;
|
|
17901
17409
|
/** @internal */ _this._globalShaderMacro = new ShaderMacroCollection();
|
|
17902
|
-
/** @internal */ _this._frustum = new engineMath.BoundingFrustum();
|
|
17903
|
-
/** @internal */ _this._virtualCamera = new VirtualCamera();
|
|
17904
17410
|
_this._shaderData = new ShaderData(ShaderDataGroup.Camera);
|
|
17905
17411
|
_this._isProjMatSetting = false;
|
|
17906
17412
|
_this._nearClipPlane = 0.1;
|
|
@@ -17912,6 +17418,8 @@ exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
|
|
|
17912
17418
|
_this._isFrustumProjectDirty = true;
|
|
17913
17419
|
_this._customAspectRatio = undefined;
|
|
17914
17420
|
_this._renderTarget = null;
|
|
17421
|
+
/** @internal */ _this._frustum = new engineMath.BoundingFrustum();
|
|
17422
|
+
/** @internal */ _this._virtualCamera = new VirtualCamera();
|
|
17915
17423
|
_this._viewport = new engineMath.Vector4(0, 0, 1, 1);
|
|
17916
17424
|
_this._inverseProjectionMatrix = new engineMath.Matrix();
|
|
17917
17425
|
_this._lastAspectSize = new engineMath.Vector2(0, 0);
|
|
@@ -17921,7 +17429,7 @@ exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
|
|
|
17921
17429
|
_this._isViewMatrixDirty = transform.registerWorldChangeFlag();
|
|
17922
17430
|
_this._isInvViewProjDirty = transform.registerWorldChangeFlag();
|
|
17923
17431
|
_this._frustumViewChangeFlag = transform.registerWorldChangeFlag();
|
|
17924
|
-
_this._renderPipeline = new BasicRenderPipeline(
|
|
17432
|
+
_this._renderPipeline = new BasicRenderPipeline(_assert_this_initialized__default['default'](_this));
|
|
17925
17433
|
_this.shaderData._addRefCount(1);
|
|
17926
17434
|
return _this;
|
|
17927
17435
|
}
|
|
@@ -18152,7 +17660,7 @@ exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
|
|
|
18152
17660
|
}
|
|
18153
17661
|
return this._inverseProjectionMatrix;
|
|
18154
17662
|
};
|
|
18155
|
-
|
|
17663
|
+
_create_class__default['default'](Camera1, [
|
|
18156
17664
|
{
|
|
18157
17665
|
key: "shaderData",
|
|
18158
17666
|
get: /**
|
|
@@ -18324,45 +17832,41 @@ exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
|
|
|
18324
17832
|
}
|
|
18325
17833
|
]);
|
|
18326
17834
|
return Camera1;
|
|
18327
|
-
}(Component),
|
|
18328
|
-
|
|
18329
|
-
}(), function() {
|
|
18330
|
-
/** @internal */ _Camera._cameraPositionProperty = Shader.getPropertyByName("u_cameraPos");
|
|
18331
|
-
}(), _Camera);
|
|
18332
|
-
__decorate([
|
|
17835
|
+
}(Component), /** @internal */ _Camera._inverseViewMatrixProperty = Shader.getPropertyByName("u_viewInvMat"), /** @internal */ _Camera._cameraPositionProperty = Shader.getPropertyByName("u_cameraPos"), _Camera);
|
|
17836
|
+
_ts_decorate__default['default']([
|
|
18333
17837
|
deepClone
|
|
18334
17838
|
], exports.Camera.prototype, "_frustum", void 0);
|
|
18335
|
-
|
|
17839
|
+
_ts_decorate__default['default']([
|
|
18336
17840
|
ignoreClone
|
|
18337
17841
|
], exports.Camera.prototype, "_renderPipeline", void 0);
|
|
18338
|
-
|
|
17842
|
+
_ts_decorate__default['default']([
|
|
18339
17843
|
ignoreClone
|
|
18340
17844
|
], exports.Camera.prototype, "_virtualCamera", void 0);
|
|
18341
|
-
|
|
17845
|
+
_ts_decorate__default['default']([
|
|
18342
17846
|
ignoreClone
|
|
18343
17847
|
], exports.Camera.prototype, "_frustumViewChangeFlag", void 0);
|
|
18344
|
-
|
|
17848
|
+
_ts_decorate__default['default']([
|
|
18345
17849
|
ignoreClone
|
|
18346
17850
|
], exports.Camera.prototype, "_transform", void 0);
|
|
18347
|
-
|
|
17851
|
+
_ts_decorate__default['default']([
|
|
18348
17852
|
ignoreClone
|
|
18349
17853
|
], exports.Camera.prototype, "_isViewMatrixDirty", void 0);
|
|
18350
|
-
|
|
17854
|
+
_ts_decorate__default['default']([
|
|
18351
17855
|
ignoreClone
|
|
18352
17856
|
], exports.Camera.prototype, "_isInvViewProjDirty", void 0);
|
|
18353
|
-
|
|
17857
|
+
_ts_decorate__default['default']([
|
|
18354
17858
|
deepClone
|
|
18355
17859
|
], exports.Camera.prototype, "_viewport", void 0);
|
|
18356
|
-
|
|
17860
|
+
_ts_decorate__default['default']([
|
|
18357
17861
|
deepClone
|
|
18358
17862
|
], exports.Camera.prototype, "_inverseProjectionMatrix", void 0);
|
|
18359
|
-
|
|
17863
|
+
_ts_decorate__default['default']([
|
|
18360
17864
|
deepClone
|
|
18361
17865
|
], exports.Camera.prototype, "_lastAspectSize", void 0);
|
|
18362
|
-
|
|
17866
|
+
_ts_decorate__default['default']([
|
|
18363
17867
|
deepClone
|
|
18364
17868
|
], exports.Camera.prototype, "_invViewProjMat", void 0);
|
|
18365
|
-
exports.Camera =
|
|
17869
|
+
exports.Camera = _ts_decorate__default['default']([
|
|
18366
17870
|
dependentComponents(Transform)
|
|
18367
17871
|
], exports.Camera);
|
|
18368
17872
|
|
|
@@ -18396,18 +17900,10 @@ var defaultInterval = 500;
|
|
|
18396
17900
|
var _config_type;
|
|
18397
17901
|
config.type = (_config_type = config.type) != null ? _config_type : getMimeTypeFromUrl(url);
|
|
18398
17902
|
var realRequest = config.type === "image" ? requestImage : requestRes;
|
|
18399
|
-
var lastError;
|
|
18400
17903
|
var executor = new MultiExecutor(function() {
|
|
18401
|
-
return realRequest(url, config).onProgress(setProgress)
|
|
18402
|
-
resolve(res);
|
|
18403
|
-
executor.stop();
|
|
18404
|
-
}).catch(function(err) {
|
|
18405
|
-
return lastError = err;
|
|
18406
|
-
});
|
|
17904
|
+
return realRequest(url, config).onProgress(setProgress);
|
|
18407
17905
|
}, retryCount, retryInterval);
|
|
18408
|
-
executor.start(
|
|
18409
|
-
reject(lastError);
|
|
18410
|
-
});
|
|
17906
|
+
executor.start().onError(reject).onComplete(resolve);
|
|
18411
17907
|
});
|
|
18412
17908
|
}
|
|
18413
17909
|
function requestImage(url, config) {
|
|
@@ -18494,23 +17990,33 @@ var MultiExecutor = /*#__PURE__*/ function() {
|
|
|
18494
17990
|
this.exec = this.exec.bind(this);
|
|
18495
17991
|
}
|
|
18496
17992
|
var _proto = MultiExecutor.prototype;
|
|
18497
|
-
_proto.start = function start(
|
|
18498
|
-
this.done = done;
|
|
17993
|
+
_proto.start = function start() {
|
|
18499
17994
|
this.exec();
|
|
17995
|
+
return this;
|
|
18500
17996
|
};
|
|
18501
|
-
_proto.
|
|
18502
|
-
|
|
17997
|
+
_proto.onComplete = function onComplete(func) {
|
|
17998
|
+
this._onComplete = func;
|
|
17999
|
+
return this;
|
|
18000
|
+
};
|
|
18001
|
+
_proto.onError = function onError(func) {
|
|
18002
|
+
this._onError = func;
|
|
18003
|
+
return this;
|
|
18004
|
+
};
|
|
18005
|
+
_proto.cancel = function cancel() {
|
|
18006
|
+
window.clearTimeout(this._timeoutId);
|
|
18503
18007
|
};
|
|
18504
18008
|
_proto.exec = function exec() {
|
|
18505
18009
|
var _this = this;
|
|
18506
18010
|
if (this._currentCount >= this.totalCount) {
|
|
18507
|
-
this.
|
|
18011
|
+
this._onError && this._onError(this._error);
|
|
18508
18012
|
return;
|
|
18509
18013
|
}
|
|
18510
18014
|
this._currentCount++;
|
|
18511
|
-
this.execFunc(this._currentCount).then(function() {
|
|
18512
|
-
|
|
18513
|
-
|
|
18015
|
+
this.execFunc(this._currentCount).then(function(result) {
|
|
18016
|
+
return _this._onComplete && _this._onComplete(result);
|
|
18017
|
+
}).catch(function(e) {
|
|
18018
|
+
_this._error = e;
|
|
18019
|
+
_this._timeoutId = window.setTimeout(_this.exec, _this.interval);
|
|
18514
18020
|
});
|
|
18515
18021
|
};
|
|
18516
18022
|
return MultiExecutor;
|
|
@@ -18539,13 +18045,8 @@ var MultiExecutor = /*#__PURE__*/ function() {
|
|
|
18539
18045
|
};
|
|
18540
18046
|
return Loader;
|
|
18541
18047
|
}();
|
|
18542
|
-
|
|
18543
|
-
Loader._engineObjects = {};
|
|
18544
|
-
})();
|
|
18048
|
+
Loader._engineObjects = {};
|
|
18545
18049
|
|
|
18546
|
-
/**
|
|
18547
|
-
* Asset Type.
|
|
18548
|
-
*/ exports.AssetType = void 0;
|
|
18549
18050
|
(function(AssetType) {
|
|
18550
18051
|
AssetType[/**
|
|
18551
18052
|
* Plain text.
|
|
@@ -18577,17 +18078,11 @@ var MultiExecutor = /*#__PURE__*/ function() {
|
|
|
18577
18078
|
AssetType[/** Source Font, include ttf、 otf and woff. */ "SourceFont"] = "source-font";
|
|
18578
18079
|
})(exports.AssetType || (exports.AssetType = {}));
|
|
18579
18080
|
|
|
18580
|
-
/**
|
|
18581
|
-
* Alpha blend mode.
|
|
18582
|
-
*/ exports.BlendMode = void 0;
|
|
18583
18081
|
(function(BlendMode) {
|
|
18584
18082
|
BlendMode[BlendMode[/** SRC ALPHA * SRC + (1 - SRC ALPHA) * DEST */ "Normal"] = 0] = "Normal";
|
|
18585
18083
|
BlendMode[BlendMode[/** SRC ALPHA * SRC + ONE * DEST */ "Additive"] = 1] = "Additive";
|
|
18586
18084
|
})(exports.BlendMode || (exports.BlendMode = {}));
|
|
18587
18085
|
|
|
18588
|
-
/**
|
|
18589
|
-
* Set which face for render.
|
|
18590
|
-
*/ exports.RenderFace = void 0;
|
|
18591
18086
|
(function(RenderFace) {
|
|
18592
18087
|
RenderFace[RenderFace[/** Render front face. */ "Front"] = 0] = "Front";
|
|
18593
18088
|
RenderFace[RenderFace[/** Render back face. */ "Back"] = 1] = "Back";
|
|
@@ -18595,7 +18090,7 @@ var MultiExecutor = /*#__PURE__*/ function() {
|
|
|
18595
18090
|
})(exports.RenderFace || (exports.RenderFace = {}));
|
|
18596
18091
|
|
|
18597
18092
|
var BaseMaterial = /*#__PURE__*/ function(Material) {
|
|
18598
|
-
|
|
18093
|
+
_inherits__default['default'](BaseMaterial, Material);
|
|
18599
18094
|
function BaseMaterial(engine, shader) {
|
|
18600
18095
|
var _this;
|
|
18601
18096
|
_this = Material.call(this, engine, shader) || this;
|
|
@@ -18694,7 +18189,7 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
|
|
|
18694
18189
|
target._isTransparent = this._isTransparent;
|
|
18695
18190
|
target._blendMode = this._blendMode;
|
|
18696
18191
|
};
|
|
18697
|
-
|
|
18192
|
+
_create_class__default['default'](BaseMaterial, [
|
|
18698
18193
|
{
|
|
18699
18194
|
key: "shader",
|
|
18700
18195
|
get: /**
|
|
@@ -18794,50 +18289,24 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
|
|
|
18794
18289
|
]);
|
|
18795
18290
|
return BaseMaterial;
|
|
18796
18291
|
}(Material);
|
|
18797
|
-
(
|
|
18798
|
-
|
|
18799
|
-
|
|
18800
|
-
(
|
|
18801
|
-
|
|
18802
|
-
|
|
18803
|
-
(
|
|
18804
|
-
|
|
18805
|
-
|
|
18806
|
-
(
|
|
18807
|
-
|
|
18808
|
-
|
|
18809
|
-
(
|
|
18810
|
-
BaseMaterial._normalTextureProp = Shader.getPropertyByName("u_normalTexture");
|
|
18811
|
-
})();
|
|
18812
|
-
(function() {
|
|
18813
|
-
BaseMaterial._normalIntensityProp = Shader.getPropertyByName("u_normalIntensity");
|
|
18814
|
-
})();
|
|
18815
|
-
(function() {
|
|
18816
|
-
BaseMaterial._normalTextureMacro = Shader.getMacroByName("NORMALTEXTURE");
|
|
18817
|
-
})();
|
|
18818
|
-
(function() {
|
|
18819
|
-
BaseMaterial._emissiveColorProp = Shader.getPropertyByName("u_emissiveColor");
|
|
18820
|
-
})();
|
|
18821
|
-
(function() {
|
|
18822
|
-
BaseMaterial._emissiveTextureProp = Shader.getPropertyByName("u_emissiveTexture");
|
|
18823
|
-
})();
|
|
18824
|
-
(function() {
|
|
18825
|
-
BaseMaterial._emissiveTextureMacro = Shader.getMacroByName("EMISSIVETEXTURE");
|
|
18826
|
-
})();
|
|
18827
|
-
(function() {
|
|
18828
|
-
BaseMaterial._transparentMacro = Shader.getMacroByName("OASIS_TRANSPARENT");
|
|
18829
|
-
})();
|
|
18830
|
-
(function() {
|
|
18831
|
-
BaseMaterial._alphaCutoffProp = Shader.getPropertyByName("u_alphaCutoff");
|
|
18832
|
-
})();
|
|
18833
|
-
(function() {
|
|
18834
|
-
BaseMaterial._alphaCutoffMacro = Shader.getMacroByName("ALPHA_CUTOFF");
|
|
18835
|
-
})();
|
|
18292
|
+
BaseMaterial._baseColorProp = Shader.getPropertyByName("u_baseColor");
|
|
18293
|
+
BaseMaterial._baseTextureProp = Shader.getPropertyByName("u_baseTexture");
|
|
18294
|
+
BaseMaterial._baseTextureMacro = Shader.getMacroByName("BASETEXTURE");
|
|
18295
|
+
BaseMaterial._tilingOffsetProp = Shader.getPropertyByName("u_tilingOffset");
|
|
18296
|
+
BaseMaterial._normalTextureProp = Shader.getPropertyByName("u_normalTexture");
|
|
18297
|
+
BaseMaterial._normalIntensityProp = Shader.getPropertyByName("u_normalIntensity");
|
|
18298
|
+
BaseMaterial._normalTextureMacro = Shader.getMacroByName("NORMALTEXTURE");
|
|
18299
|
+
BaseMaterial._emissiveColorProp = Shader.getPropertyByName("u_emissiveColor");
|
|
18300
|
+
BaseMaterial._emissiveTextureProp = Shader.getPropertyByName("u_emissiveTexture");
|
|
18301
|
+
BaseMaterial._emissiveTextureMacro = Shader.getMacroByName("EMISSIVETEXTURE");
|
|
18302
|
+
BaseMaterial._transparentMacro = Shader.getMacroByName("OASIS_TRANSPARENT");
|
|
18303
|
+
BaseMaterial._alphaCutoffProp = Shader.getPropertyByName("u_alphaCutoff");
|
|
18304
|
+
BaseMaterial._alphaCutoffMacro = Shader.getMacroByName("ALPHA_CUTOFF");
|
|
18836
18305
|
|
|
18837
18306
|
/**
|
|
18838
18307
|
* Blinn-phong Material.
|
|
18839
18308
|
*/ var BlinnPhongMaterial = /*#__PURE__*/ function(BaseMaterial) {
|
|
18840
|
-
|
|
18309
|
+
_inherits__default['default'](BlinnPhongMaterial, BaseMaterial);
|
|
18841
18310
|
function BlinnPhongMaterial(engine) {
|
|
18842
18311
|
var _this;
|
|
18843
18312
|
_this = BaseMaterial.call(this, engine, Shader.find("blinn-phong")) || this;
|
|
@@ -18860,7 +18329,7 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
|
|
|
18860
18329
|
this.cloneTo(dest);
|
|
18861
18330
|
return dest;
|
|
18862
18331
|
};
|
|
18863
|
-
|
|
18332
|
+
_create_class__default['default'](BlinnPhongMaterial, [
|
|
18864
18333
|
{
|
|
18865
18334
|
key: "baseColor",
|
|
18866
18335
|
get: /**
|
|
@@ -19006,19 +18475,10 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
|
|
|
19006
18475
|
]);
|
|
19007
18476
|
return BlinnPhongMaterial;
|
|
19008
18477
|
}(BaseMaterial);
|
|
19009
|
-
(
|
|
19010
|
-
|
|
19011
|
-
|
|
19012
|
-
(function() {
|
|
19013
|
-
BlinnPhongMaterial._shininessProp = Shader.getPropertyByName("u_shininess");
|
|
19014
|
-
})();
|
|
19015
|
-
(function() {
|
|
19016
|
-
BlinnPhongMaterial._specularTextureProp = Shader.getPropertyByName("u_specularTexture");
|
|
19017
|
-
})();
|
|
18478
|
+
BlinnPhongMaterial._specularColorProp = Shader.getPropertyByName("u_specularColor");
|
|
18479
|
+
BlinnPhongMaterial._shininessProp = Shader.getPropertyByName("u_shininess");
|
|
18480
|
+
BlinnPhongMaterial._specularTextureProp = Shader.getPropertyByName("u_specularTexture");
|
|
19018
18481
|
|
|
19019
|
-
/**
|
|
19020
|
-
* Texture UV coordinate.
|
|
19021
|
-
*/ exports.TextureCoordinate = void 0;
|
|
19022
18482
|
(function(TextureCoordinate) {
|
|
19023
18483
|
TextureCoordinate[TextureCoordinate["UV0"] = 0] = "UV0";
|
|
19024
18484
|
TextureCoordinate[TextureCoordinate["UV1"] = 1] = "UV1";
|
|
@@ -19033,7 +18493,7 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
|
|
|
19033
18493
|
/**
|
|
19034
18494
|
* PBR (Physically-Based Rendering) Material.
|
|
19035
18495
|
*/ var PBRBaseMaterial = /*#__PURE__*/ function(BaseMaterial) {
|
|
19036
|
-
|
|
18496
|
+
_inherits__default['default'](PBRBaseMaterial, BaseMaterial);
|
|
19037
18497
|
function PBRBaseMaterial(engine, shader) {
|
|
19038
18498
|
var _this;
|
|
19039
18499
|
_this = BaseMaterial.call(this, engine, shader) || this;
|
|
@@ -19050,7 +18510,7 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
|
|
|
19050
18510
|
shaderData.setFloat(PBRBaseMaterial._clearCoatRoughnessProp, 0);
|
|
19051
18511
|
return _this;
|
|
19052
18512
|
}
|
|
19053
|
-
|
|
18513
|
+
_create_class__default['default'](PBRBaseMaterial, [
|
|
19054
18514
|
{
|
|
19055
18515
|
key: "baseColor",
|
|
19056
18516
|
get: /**
|
|
@@ -19274,35 +18734,19 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
|
|
|
19274
18734
|
]);
|
|
19275
18735
|
return PBRBaseMaterial;
|
|
19276
18736
|
}(BaseMaterial);
|
|
19277
|
-
(
|
|
19278
|
-
|
|
19279
|
-
|
|
19280
|
-
(
|
|
19281
|
-
|
|
19282
|
-
|
|
19283
|
-
(
|
|
19284
|
-
|
|
19285
|
-
})();
|
|
19286
|
-
(function() {
|
|
19287
|
-
PBRBaseMaterial._clearCoatProp = Shader.getPropertyByName("u_clearCoat");
|
|
19288
|
-
})();
|
|
19289
|
-
(function() {
|
|
19290
|
-
PBRBaseMaterial._clearCoatTextureProp = Shader.getPropertyByName("u_clearCoatTexture");
|
|
19291
|
-
})();
|
|
19292
|
-
(function() {
|
|
19293
|
-
PBRBaseMaterial._clearCoatRoughnessProp = Shader.getPropertyByName("u_clearCoatRoughness");
|
|
19294
|
-
})();
|
|
19295
|
-
(function() {
|
|
19296
|
-
PBRBaseMaterial._clearCoatRoughnessTextureProp = Shader.getPropertyByName("u_clearCoatRoughnessTexture");
|
|
19297
|
-
})();
|
|
19298
|
-
(function() {
|
|
19299
|
-
PBRBaseMaterial._clearCoatNormalTextureProp = Shader.getPropertyByName("u_clearCoatNormalTexture");
|
|
19300
|
-
})();
|
|
18737
|
+
PBRBaseMaterial._occlusionTextureIntensityProp = Shader.getPropertyByName("u_occlusionIntensity");
|
|
18738
|
+
PBRBaseMaterial._occlusionTextureCoordProp = Shader.getPropertyByName("u_occlusionTextureCoord");
|
|
18739
|
+
PBRBaseMaterial._occlusionTextureProp = Shader.getPropertyByName("u_occlusionTexture");
|
|
18740
|
+
PBRBaseMaterial._clearCoatProp = Shader.getPropertyByName("u_clearCoat");
|
|
18741
|
+
PBRBaseMaterial._clearCoatTextureProp = Shader.getPropertyByName("u_clearCoatTexture");
|
|
18742
|
+
PBRBaseMaterial._clearCoatRoughnessProp = Shader.getPropertyByName("u_clearCoatRoughness");
|
|
18743
|
+
PBRBaseMaterial._clearCoatRoughnessTextureProp = Shader.getPropertyByName("u_clearCoatRoughnessTexture");
|
|
18744
|
+
PBRBaseMaterial._clearCoatNormalTextureProp = Shader.getPropertyByName("u_clearCoatNormalTexture");
|
|
19301
18745
|
|
|
19302
18746
|
/**
|
|
19303
18747
|
* PBR (Metallic-Roughness Workflow) Material.
|
|
19304
18748
|
*/ var PBRMaterial = /*#__PURE__*/ function(PBRBaseMaterial) {
|
|
19305
|
-
|
|
18749
|
+
_inherits__default['default'](PBRMaterial, PBRBaseMaterial);
|
|
19306
18750
|
function PBRMaterial(engine) {
|
|
19307
18751
|
var _this;
|
|
19308
18752
|
_this = PBRBaseMaterial.call(this, engine, Shader.find("pbr")) || this;
|
|
@@ -19319,7 +18763,7 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
|
|
|
19319
18763
|
this.cloneTo(dest);
|
|
19320
18764
|
return dest;
|
|
19321
18765
|
};
|
|
19322
|
-
|
|
18766
|
+
_create_class__default['default'](PBRMaterial, [
|
|
19323
18767
|
{
|
|
19324
18768
|
key: "ior",
|
|
19325
18769
|
get: /**
|
|
@@ -19376,23 +18820,15 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
|
|
|
19376
18820
|
]);
|
|
19377
18821
|
return PBRMaterial;
|
|
19378
18822
|
}(PBRBaseMaterial);
|
|
19379
|
-
(
|
|
19380
|
-
|
|
19381
|
-
|
|
19382
|
-
(
|
|
19383
|
-
PBRMaterial._roughnessProp = Shader.getPropertyByName("u_roughness");
|
|
19384
|
-
})();
|
|
19385
|
-
(function() {
|
|
19386
|
-
PBRMaterial._roughnessMetallicTextureProp = Shader.getPropertyByName("u_roughnessMetallicTexture");
|
|
19387
|
-
})();
|
|
19388
|
-
(function() {
|
|
19389
|
-
PBRMaterial._iorProp = Shader.getPropertyByName("material_IOR");
|
|
19390
|
-
})();
|
|
18823
|
+
PBRMaterial._metallicProp = Shader.getPropertyByName("u_metal");
|
|
18824
|
+
PBRMaterial._roughnessProp = Shader.getPropertyByName("u_roughness");
|
|
18825
|
+
PBRMaterial._roughnessMetallicTextureProp = Shader.getPropertyByName("u_roughnessMetallicTexture");
|
|
18826
|
+
PBRMaterial._iorProp = Shader.getPropertyByName("material_IOR");
|
|
19391
18827
|
|
|
19392
18828
|
/**
|
|
19393
18829
|
* PBR (Specular-Glossiness Workflow) Material.
|
|
19394
18830
|
*/ var PBRSpecularMaterial = /*#__PURE__*/ function(PBRBaseMaterial) {
|
|
19395
|
-
|
|
18831
|
+
_inherits__default['default'](PBRSpecularMaterial, PBRBaseMaterial);
|
|
19396
18832
|
function PBRSpecularMaterial(engine) {
|
|
19397
18833
|
var _this;
|
|
19398
18834
|
_this = PBRBaseMaterial.call(this, engine, Shader.find("pbr-specular")) || this;
|
|
@@ -19408,7 +18844,7 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
|
|
|
19408
18844
|
this.cloneTo(dest);
|
|
19409
18845
|
return dest;
|
|
19410
18846
|
};
|
|
19411
|
-
|
|
18847
|
+
_create_class__default['default'](PBRSpecularMaterial, [
|
|
19412
18848
|
{
|
|
19413
18849
|
key: "specularColor",
|
|
19414
18850
|
get: /**
|
|
@@ -19454,23 +18890,15 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
|
|
|
19454
18890
|
]);
|
|
19455
18891
|
return PBRSpecularMaterial;
|
|
19456
18892
|
}(PBRBaseMaterial);
|
|
19457
|
-
(
|
|
19458
|
-
|
|
19459
|
-
|
|
19460
|
-
(
|
|
19461
|
-
PBRSpecularMaterial._glossinessProp = Shader.getPropertyByName("u_glossiness");
|
|
19462
|
-
})();
|
|
19463
|
-
(function() {
|
|
19464
|
-
PBRSpecularMaterial._specularGlossinessTextureProp = Shader.getPropertyByName("u_specularGlossinessTexture");
|
|
19465
|
-
})();
|
|
19466
|
-
(function() {
|
|
19467
|
-
PBRSpecularMaterial._specularGlossinessTextureMacro = Shader.getMacroByName("SPECULARGLOSSINESSTEXTURE");
|
|
19468
|
-
})();
|
|
18893
|
+
PBRSpecularMaterial._specularColorProp = Shader.getPropertyByName("u_PBRSpecularColor");
|
|
18894
|
+
PBRSpecularMaterial._glossinessProp = Shader.getPropertyByName("u_glossiness");
|
|
18895
|
+
PBRSpecularMaterial._specularGlossinessTextureProp = Shader.getPropertyByName("u_specularGlossinessTexture");
|
|
18896
|
+
PBRSpecularMaterial._specularGlossinessTextureMacro = Shader.getMacroByName("SPECULARGLOSSINESSTEXTURE");
|
|
19469
18897
|
|
|
19470
18898
|
/**
|
|
19471
18899
|
* Unlit Material.
|
|
19472
18900
|
*/ var UnlitMaterial = /*#__PURE__*/ function(BaseMaterial) {
|
|
19473
|
-
|
|
18901
|
+
_inherits__default['default'](UnlitMaterial, BaseMaterial);
|
|
19474
18902
|
function UnlitMaterial(engine) {
|
|
19475
18903
|
var _this;
|
|
19476
18904
|
_this = BaseMaterial.call(this, engine, Shader.find("unlit")) || this;
|
|
@@ -19489,7 +18917,7 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
|
|
|
19489
18917
|
this.cloneTo(dest);
|
|
19490
18918
|
return dest;
|
|
19491
18919
|
};
|
|
19492
|
-
|
|
18920
|
+
_create_class__default['default'](UnlitMaterial, [
|
|
19493
18921
|
{
|
|
19494
18922
|
key: "baseColor",
|
|
19495
18923
|
get: /**
|
|
@@ -19538,32 +18966,22 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
|
|
|
19538
18966
|
return UnlitMaterial;
|
|
19539
18967
|
}(BaseMaterial);
|
|
19540
18968
|
|
|
19541
|
-
/**
|
|
19542
|
-
* The horizontal alignment of the text.
|
|
19543
|
-
*/ exports.TextHorizontalAlignment = void 0;
|
|
19544
18969
|
(function(TextHorizontalAlignment) {
|
|
19545
18970
|
TextHorizontalAlignment[TextHorizontalAlignment[/** Align left horizontally */ "Left"] = 0] = "Left";
|
|
19546
18971
|
TextHorizontalAlignment[TextHorizontalAlignment[/** Align center horizontally */ "Center"] = 1] = "Center";
|
|
19547
18972
|
TextHorizontalAlignment[TextHorizontalAlignment[/** Align right horizontally */ "Right"] = 2] = "Right";
|
|
19548
18973
|
})(exports.TextHorizontalAlignment || (exports.TextHorizontalAlignment = {}));
|
|
19549
|
-
exports.TextVerticalAlignment = void 0;
|
|
19550
18974
|
(function(TextVerticalAlignment) {
|
|
19551
18975
|
TextVerticalAlignment[TextVerticalAlignment[/** Align top vertically */ "Top"] = 0] = "Top";
|
|
19552
18976
|
TextVerticalAlignment[TextVerticalAlignment[/** Align center vertically */ "Center"] = 1] = "Center";
|
|
19553
18977
|
TextVerticalAlignment[TextVerticalAlignment[/** Align bottom vertically */ "Bottom"] = 2] = "Bottom";
|
|
19554
18978
|
})(exports.TextVerticalAlignment || (exports.TextVerticalAlignment = {}));
|
|
19555
18979
|
|
|
19556
|
-
/**
|
|
19557
|
-
* The way to handle the situation where wrapped text is too tall to fit in the height.
|
|
19558
|
-
*/ exports.OverflowMode = void 0;
|
|
19559
18980
|
(function(OverflowMode) {
|
|
19560
18981
|
OverflowMode[OverflowMode[/** Overflow when the text is too tall */ "Overflow"] = 0] = "Overflow";
|
|
19561
18982
|
OverflowMode[OverflowMode[/** Truncate with height when the text is too tall */ "Truncate"] = 1] = "Truncate";
|
|
19562
18983
|
})(exports.OverflowMode || (exports.OverflowMode = {}));
|
|
19563
18984
|
|
|
19564
|
-
/**
|
|
19565
|
-
* The style of the font.
|
|
19566
|
-
*/ exports.FontStyle = void 0;
|
|
19567
18985
|
(function(FontStyle) {
|
|
19568
18986
|
FontStyle[FontStyle[/** Set font without style */ "None"] = 0x0] = "None";
|
|
19569
18987
|
FontStyle[FontStyle[/** Set font bold */ "Bold"] = 0x1] = "Bold";
|
|
@@ -19573,7 +18991,7 @@ exports.TextVerticalAlignment = void 0;
|
|
|
19573
18991
|
/**
|
|
19574
18992
|
* Sprite Atlas.
|
|
19575
18993
|
*/ var SpriteAtlas = /*#__PURE__*/ function(RefObject) {
|
|
19576
|
-
|
|
18994
|
+
_inherits__default['default'](SpriteAtlas, RefObject);
|
|
19577
18995
|
function SpriteAtlas(engine) {
|
|
19578
18996
|
var _this;
|
|
19579
18997
|
_this = RefObject.call(this, engine) || this;
|
|
@@ -19630,7 +19048,7 @@ exports.TextVerticalAlignment = void 0;
|
|
|
19630
19048
|
this._sprites = null;
|
|
19631
19049
|
this._spriteNamesToIndex = null;
|
|
19632
19050
|
};
|
|
19633
|
-
|
|
19051
|
+
_create_class__default['default'](SpriteAtlas, [
|
|
19634
19052
|
{
|
|
19635
19053
|
key: "sprites",
|
|
19636
19054
|
get: /**
|
|
@@ -19643,9 +19061,6 @@ exports.TextVerticalAlignment = void 0;
|
|
|
19643
19061
|
return SpriteAtlas;
|
|
19644
19062
|
}(RefObject);
|
|
19645
19063
|
|
|
19646
|
-
/**
|
|
19647
|
-
* Sprite's drawing mode enumeration.
|
|
19648
|
-
*/ exports.SpriteDrawMode = void 0;
|
|
19649
19064
|
(function(SpriteDrawMode) {
|
|
19650
19065
|
SpriteDrawMode[SpriteDrawMode[/** Overall scaling when modifying size. */ "Simple"] = 0] = "Simple";
|
|
19651
19066
|
SpriteDrawMode[SpriteDrawMode[/** When modifying the size, it is transformed according to the 9-slice settings (border). */ "Sliced"] = 1] = "Sliced";
|
|
@@ -19654,7 +19069,7 @@ exports.TextVerticalAlignment = void 0;
|
|
|
19654
19069
|
/**
|
|
19655
19070
|
* 2D sprite.
|
|
19656
19071
|
*/ var Sprite = /*#__PURE__*/ function(RefObject) {
|
|
19657
|
-
|
|
19072
|
+
_inherits__default['default'](Sprite, RefObject);
|
|
19658
19073
|
function Sprite(engine, texture, region, pivot, border, name) {
|
|
19659
19074
|
if (texture === void 0) texture = null;
|
|
19660
19075
|
if (region === void 0) region = null;
|
|
@@ -19830,7 +19245,7 @@ exports.TextVerticalAlignment = void 0;
|
|
|
19830
19245
|
}
|
|
19831
19246
|
this._updateFlagManager.dispatch(type);
|
|
19832
19247
|
};
|
|
19833
|
-
|
|
19248
|
+
_create_class__default['default'](Sprite, [
|
|
19834
19249
|
{
|
|
19835
19250
|
key: "texture",
|
|
19836
19251
|
get: /**
|
|
@@ -20144,17 +19559,15 @@ var SlicedSpriteAssembler = (_SlicedSpriteAssembler = /*#__PURE__*/ function() {
|
|
|
20144
19559
|
};
|
|
20145
19560
|
SlicedSpriteAssembler1.updateUVs = function updateUVs(renderer) {};
|
|
20146
19561
|
return SlicedSpriteAssembler1;
|
|
20147
|
-
}(),
|
|
20148
|
-
|
|
20149
|
-
}(), _SlicedSpriteAssembler);
|
|
20150
|
-
SlicedSpriteAssembler = __decorate([
|
|
19562
|
+
}(), _SlicedSpriteAssembler._worldMatrix = new engineMath.Matrix(), _SlicedSpriteAssembler);
|
|
19563
|
+
SlicedSpriteAssembler = _ts_decorate__default['default']([
|
|
20151
19564
|
StaticInterfaceImplement()
|
|
20152
19565
|
], SlicedSpriteAssembler);
|
|
20153
19566
|
|
|
20154
19567
|
/**
|
|
20155
19568
|
* Renders a Sprite for 2D graphics.
|
|
20156
19569
|
*/ var SpriteRenderer = /*#__PURE__*/ function(Renderer) {
|
|
20157
|
-
|
|
19570
|
+
_inherits__default['default'](SpriteRenderer, Renderer);
|
|
20158
19571
|
function SpriteRenderer(entity) {
|
|
20159
19572
|
var _this;
|
|
20160
19573
|
_this = Renderer.call(this, entity) || this;
|
|
@@ -20171,7 +19584,7 @@ SlicedSpriteAssembler = __decorate([
|
|
|
20171
19584
|
_this._renderData = new RenderData2D(4, [], [], null, _this._color);
|
|
20172
19585
|
_this.drawMode = exports.SpriteDrawMode.Simple;
|
|
20173
19586
|
_this.setMaterial(_this._engine._spriteDefaultMaterial);
|
|
20174
|
-
_this._onSpriteChange = _this._onSpriteChange.bind(
|
|
19587
|
+
_this._onSpriteChange = _this._onSpriteChange.bind(_assert_this_initialized__default['default'](_this));
|
|
20175
19588
|
return _this;
|
|
20176
19589
|
}
|
|
20177
19590
|
var _proto = SpriteRenderer.prototype;
|
|
@@ -20292,7 +19705,7 @@ SlicedSpriteAssembler = __decorate([
|
|
|
20292
19705
|
break;
|
|
20293
19706
|
}
|
|
20294
19707
|
};
|
|
20295
|
-
|
|
19708
|
+
_create_class__default['default'](SpriteRenderer, [
|
|
20296
19709
|
{
|
|
20297
19710
|
key: "drawMode",
|
|
20298
19711
|
get: /**
|
|
@@ -20457,49 +19870,47 @@ SlicedSpriteAssembler = __decorate([
|
|
|
20457
19870
|
]);
|
|
20458
19871
|
return SpriteRenderer;
|
|
20459
19872
|
}(exports.Renderer);
|
|
20460
|
-
(
|
|
20461
|
-
|
|
20462
|
-
})();
|
|
20463
|
-
__decorate([
|
|
19873
|
+
/** @internal */ SpriteRenderer._textureProperty = Shader.getPropertyByName("u_spriteTexture");
|
|
19874
|
+
_ts_decorate__default['default']([
|
|
20464
19875
|
ignoreClone
|
|
20465
19876
|
], SpriteRenderer.prototype, "_renderData", void 0);
|
|
20466
|
-
|
|
19877
|
+
_ts_decorate__default['default']([
|
|
20467
19878
|
ignoreClone
|
|
20468
19879
|
], SpriteRenderer.prototype, "_drawMode", void 0);
|
|
20469
|
-
|
|
19880
|
+
_ts_decorate__default['default']([
|
|
20470
19881
|
ignoreClone
|
|
20471
19882
|
], SpriteRenderer.prototype, "_assembler", void 0);
|
|
20472
|
-
|
|
19883
|
+
_ts_decorate__default['default']([
|
|
20473
19884
|
deepClone
|
|
20474
19885
|
], SpriteRenderer.prototype, "_color", void 0);
|
|
20475
|
-
|
|
19886
|
+
_ts_decorate__default['default']([
|
|
20476
19887
|
ignoreClone
|
|
20477
19888
|
], SpriteRenderer.prototype, "_sprite", void 0);
|
|
20478
|
-
|
|
19889
|
+
_ts_decorate__default['default']([
|
|
20479
19890
|
ignoreClone
|
|
20480
19891
|
], SpriteRenderer.prototype, "_automaticWidth", void 0);
|
|
20481
|
-
|
|
19892
|
+
_ts_decorate__default['default']([
|
|
20482
19893
|
ignoreClone
|
|
20483
19894
|
], SpriteRenderer.prototype, "_automaticHeight", void 0);
|
|
20484
|
-
|
|
19895
|
+
_ts_decorate__default['default']([
|
|
20485
19896
|
assignmentClone
|
|
20486
19897
|
], SpriteRenderer.prototype, "_customWidth", void 0);
|
|
20487
|
-
|
|
19898
|
+
_ts_decorate__default['default']([
|
|
20488
19899
|
assignmentClone
|
|
20489
19900
|
], SpriteRenderer.prototype, "_customHeight", void 0);
|
|
20490
|
-
|
|
19901
|
+
_ts_decorate__default['default']([
|
|
20491
19902
|
assignmentClone
|
|
20492
19903
|
], SpriteRenderer.prototype, "_flipX", void 0);
|
|
20493
|
-
|
|
19904
|
+
_ts_decorate__default['default']([
|
|
20494
19905
|
assignmentClone
|
|
20495
19906
|
], SpriteRenderer.prototype, "_flipY", void 0);
|
|
20496
|
-
|
|
19907
|
+
_ts_decorate__default['default']([
|
|
20497
19908
|
assignmentClone
|
|
20498
19909
|
], SpriteRenderer.prototype, "_maskLayer", void 0);
|
|
20499
|
-
|
|
19910
|
+
_ts_decorate__default['default']([
|
|
20500
19911
|
assignmentClone
|
|
20501
19912
|
], SpriteRenderer.prototype, "_maskInteraction", void 0);
|
|
20502
|
-
|
|
19913
|
+
_ts_decorate__default['default']([
|
|
20503
19914
|
ignoreClone
|
|
20504
19915
|
], SpriteRenderer.prototype, "_onSpriteChange", null);
|
|
20505
19916
|
var /**
|
|
@@ -20524,16 +19935,14 @@ var /**
|
|
|
20524
19935
|
];
|
|
20525
19936
|
this.renderData = new RenderData2D(4, positions, null, CharRenderData.triangles, null);
|
|
20526
19937
|
};
|
|
20527
|
-
|
|
20528
|
-
|
|
20529
|
-
|
|
20530
|
-
|
|
20531
|
-
|
|
20532
|
-
|
|
20533
|
-
|
|
20534
|
-
|
|
20535
|
-
];
|
|
20536
|
-
})();
|
|
19938
|
+
CharRenderData.triangles = [
|
|
19939
|
+
0,
|
|
19940
|
+
2,
|
|
19941
|
+
1,
|
|
19942
|
+
2,
|
|
19943
|
+
0,
|
|
19944
|
+
3
|
|
19945
|
+
];
|
|
20537
19946
|
|
|
20538
19947
|
/**
|
|
20539
19948
|
* @internal
|
|
@@ -20857,42 +20266,28 @@ var /**
|
|
|
20857
20266
|
};
|
|
20858
20267
|
return TextUtils;
|
|
20859
20268
|
}();
|
|
20860
|
-
|
|
20861
|
-
|
|
20862
|
-
|
|
20863
|
-
|
|
20864
|
-
|
|
20865
|
-
|
|
20866
|
-
|
|
20867
|
-
|
|
20868
|
-
|
|
20869
|
-
|
|
20870
|
-
|
|
20871
|
-
|
|
20872
|
-
|
|
20873
|
-
|
|
20874
|
-
|
|
20875
|
-
}
|
|
20876
|
-
|
|
20877
|
-
TextUtils._measureBaseline = "M";
|
|
20878
|
-
})();
|
|
20879
|
-
(function() {
|
|
20880
|
-
TextUtils._heightMultiplier = 2;
|
|
20881
|
-
})();
|
|
20882
|
-
(function() {
|
|
20883
|
-
TextUtils._baselineMultiplier = 1.4;
|
|
20884
|
-
})();
|
|
20885
|
-
(function() {
|
|
20886
|
-
TextUtils._fontSizeInfoCache = {};
|
|
20887
|
-
})();
|
|
20888
|
-
(function() {
|
|
20889
|
-
TextUtils._textContext = null;
|
|
20890
|
-
})();
|
|
20269
|
+
/** @internal */ TextUtils._genericFontFamilies = [
|
|
20270
|
+
"serif",
|
|
20271
|
+
"sans-serif",
|
|
20272
|
+
"monospace",
|
|
20273
|
+
"cursive",
|
|
20274
|
+
"fantasy",
|
|
20275
|
+
"system-ui",
|
|
20276
|
+
"math",
|
|
20277
|
+
"emoji",
|
|
20278
|
+
"fangsong"
|
|
20279
|
+
];
|
|
20280
|
+
/** These characters are all tall to help calculate the height required for text. */ TextUtils._measureString = "|\xc9q\xc5";
|
|
20281
|
+
TextUtils._measureBaseline = "M";
|
|
20282
|
+
TextUtils._heightMultiplier = 2;
|
|
20283
|
+
TextUtils._baselineMultiplier = 1.4;
|
|
20284
|
+
TextUtils._fontSizeInfoCache = {};
|
|
20285
|
+
TextUtils._textContext = null;
|
|
20891
20286
|
|
|
20892
20287
|
/**
|
|
20893
20288
|
* Renders a text for 2D graphics.
|
|
20894
20289
|
*/ var TextRenderer = /*#__PURE__*/ function(Renderer) {
|
|
20895
|
-
|
|
20290
|
+
_inherits__default['default'](TextRenderer, Renderer);
|
|
20896
20291
|
function TextRenderer(entity) {
|
|
20897
20292
|
var _this;
|
|
20898
20293
|
_this = Renderer.call(this, entity) || this;
|
|
@@ -20914,7 +20309,7 @@ var /**
|
|
|
20914
20309
|
_this._overflowMode = exports.OverflowMode.Overflow;
|
|
20915
20310
|
_this._maskInteraction = exports.SpriteMaskInteraction.None;
|
|
20916
20311
|
_this._maskLayer = exports.SpriteMaskLayer.Layer0;
|
|
20917
|
-
var engine =
|
|
20312
|
+
var engine = _assert_this_initialized__default['default'](_this).engine;
|
|
20918
20313
|
_this._font = engine._textDefaultFont;
|
|
20919
20314
|
_this._font._addRefCount(1);
|
|
20920
20315
|
_this.setMaterial(engine._spriteDefaultMaterial);
|
|
@@ -21154,7 +20549,7 @@ var /**
|
|
|
21154
20549
|
Renderer.prototype._onTransformChanged.call(this, bit);
|
|
21155
20550
|
this._setDirtyFlagTrue(0x4 | 0x8);
|
|
21156
20551
|
};
|
|
21157
|
-
|
|
20552
|
+
_create_class__default['default'](TextRenderer, [
|
|
21158
20553
|
{
|
|
21159
20554
|
key: "color",
|
|
21160
20555
|
get: /**
|
|
@@ -21367,67 +20762,61 @@ var /**
|
|
|
21367
20762
|
]);
|
|
21368
20763
|
return TextRenderer;
|
|
21369
20764
|
}(exports.Renderer);
|
|
21370
|
-
(
|
|
21371
|
-
|
|
21372
|
-
|
|
21373
|
-
(
|
|
21374
|
-
TextRenderer._tempVec30 = new engineMath.Vector3();
|
|
21375
|
-
})();
|
|
21376
|
-
(function() {
|
|
21377
|
-
TextRenderer._tempVec31 = new engineMath.Vector3();
|
|
21378
|
-
})();
|
|
21379
|
-
__decorate([
|
|
20765
|
+
TextRenderer._charRenderDataPool = new CharRenderDataPool(CharRenderData, 50);
|
|
20766
|
+
TextRenderer._tempVec30 = new engineMath.Vector3();
|
|
20767
|
+
TextRenderer._tempVec31 = new engineMath.Vector3();
|
|
20768
|
+
_ts_decorate__default['default']([
|
|
21380
20769
|
assignmentClone
|
|
21381
20770
|
], TextRenderer.prototype, "_subFont", void 0);
|
|
21382
|
-
|
|
20771
|
+
_ts_decorate__default['default']([
|
|
21383
20772
|
ignoreClone
|
|
21384
20773
|
], TextRenderer.prototype, "_charRenderDatas", void 0);
|
|
21385
|
-
|
|
20774
|
+
_ts_decorate__default['default']([
|
|
21386
20775
|
ignoreClone
|
|
21387
20776
|
], TextRenderer.prototype, "_dirtyFlag", void 0);
|
|
21388
|
-
|
|
20777
|
+
_ts_decorate__default['default']([
|
|
21389
20778
|
deepClone
|
|
21390
20779
|
], TextRenderer.prototype, "_color", void 0);
|
|
21391
|
-
|
|
20780
|
+
_ts_decorate__default['default']([
|
|
21392
20781
|
assignmentClone
|
|
21393
20782
|
], TextRenderer.prototype, "_text", void 0);
|
|
21394
|
-
|
|
20783
|
+
_ts_decorate__default['default']([
|
|
21395
20784
|
assignmentClone
|
|
21396
20785
|
], TextRenderer.prototype, "_width", void 0);
|
|
21397
|
-
|
|
20786
|
+
_ts_decorate__default['default']([
|
|
21398
20787
|
assignmentClone
|
|
21399
20788
|
], TextRenderer.prototype, "_height", void 0);
|
|
21400
|
-
|
|
20789
|
+
_ts_decorate__default['default']([
|
|
21401
20790
|
ignoreClone
|
|
21402
20791
|
], TextRenderer.prototype, "_localBounds", void 0);
|
|
21403
|
-
|
|
20792
|
+
_ts_decorate__default['default']([
|
|
21404
20793
|
assignmentClone
|
|
21405
20794
|
], TextRenderer.prototype, "_font", void 0);
|
|
21406
|
-
|
|
20795
|
+
_ts_decorate__default['default']([
|
|
21407
20796
|
assignmentClone
|
|
21408
20797
|
], TextRenderer.prototype, "_fontSize", void 0);
|
|
21409
|
-
|
|
20798
|
+
_ts_decorate__default['default']([
|
|
21410
20799
|
assignmentClone
|
|
21411
20800
|
], TextRenderer.prototype, "_fontStyle", void 0);
|
|
21412
|
-
|
|
20801
|
+
_ts_decorate__default['default']([
|
|
21413
20802
|
assignmentClone
|
|
21414
20803
|
], TextRenderer.prototype, "_lineSpacing", void 0);
|
|
21415
|
-
|
|
20804
|
+
_ts_decorate__default['default']([
|
|
21416
20805
|
assignmentClone
|
|
21417
20806
|
], TextRenderer.prototype, "_horizontalAlignment", void 0);
|
|
21418
|
-
|
|
20807
|
+
_ts_decorate__default['default']([
|
|
21419
20808
|
assignmentClone
|
|
21420
20809
|
], TextRenderer.prototype, "_verticalAlignment", void 0);
|
|
21421
|
-
|
|
20810
|
+
_ts_decorate__default['default']([
|
|
21422
20811
|
assignmentClone
|
|
21423
20812
|
], TextRenderer.prototype, "_enableWrapping", void 0);
|
|
21424
|
-
|
|
20813
|
+
_ts_decorate__default['default']([
|
|
21425
20814
|
assignmentClone
|
|
21426
20815
|
], TextRenderer.prototype, "_overflowMode", void 0);
|
|
21427
|
-
|
|
20816
|
+
_ts_decorate__default['default']([
|
|
21428
20817
|
assignmentClone
|
|
21429
20818
|
], TextRenderer.prototype, "_maskInteraction", void 0);
|
|
21430
|
-
|
|
20819
|
+
_ts_decorate__default['default']([
|
|
21431
20820
|
assignmentClone
|
|
21432
20821
|
], TextRenderer.prototype, "_maskLayer", void 0);
|
|
21433
20822
|
var DirtyFlag;
|
|
@@ -21582,9 +20971,7 @@ var DirtyFlag;
|
|
|
21582
20971
|
};
|
|
21583
20972
|
return AnimationCurveOwner;
|
|
21584
20973
|
}();
|
|
21585
|
-
(
|
|
21586
|
-
AnimationCurveOwner._assemblerMap = new Map();
|
|
21587
|
-
})();
|
|
20974
|
+
AnimationCurveOwner._assemblerMap = new Map();
|
|
21588
20975
|
|
|
21589
20976
|
/**
|
|
21590
20977
|
* @internal
|
|
@@ -21643,16 +21030,22 @@ AnimationCurveOwner.registerAssembler(Transform, "scale", ScaleAnimationCurveOwn
|
|
|
21643
21030
|
/**
|
|
21644
21031
|
* @internal
|
|
21645
21032
|
*/ var BlendShapeWeightsAnimationCurveOwnerAssembler = /*#__PURE__*/ function() {
|
|
21646
|
-
function BlendShapeWeightsAnimationCurveOwnerAssembler() {
|
|
21033
|
+
function BlendShapeWeightsAnimationCurveOwnerAssembler() {
|
|
21034
|
+
this._skinnedMeshRenderer = [];
|
|
21035
|
+
}
|
|
21647
21036
|
var _proto = BlendShapeWeightsAnimationCurveOwnerAssembler.prototype;
|
|
21648
21037
|
_proto.initialize = function initialize(owner) {
|
|
21649
|
-
|
|
21038
|
+
// @todo: Compatible with multiple SkinnedMeshRenderer in a entity, optimize later.
|
|
21039
|
+
owner.target.getComponents(SkinnedMeshRenderer, this._skinnedMeshRenderer);
|
|
21650
21040
|
};
|
|
21651
21041
|
_proto.getTargetValue = function getTargetValue() {
|
|
21652
|
-
return this._skinnedMeshRenderer.blendShapeWeights;
|
|
21042
|
+
return this._skinnedMeshRenderer[0].blendShapeWeights;
|
|
21653
21043
|
};
|
|
21654
21044
|
_proto.setTargetValue = function setTargetValue(value) {
|
|
21655
|
-
this._skinnedMeshRenderer
|
|
21045
|
+
var skinnedMeshRenderer = this._skinnedMeshRenderer;
|
|
21046
|
+
for(var i = 0, n = skinnedMeshRenderer.length; i < n; i++){
|
|
21047
|
+
skinnedMeshRenderer[i].blendShapeWeights = value;
|
|
21048
|
+
}
|
|
21656
21049
|
};
|
|
21657
21050
|
return BlendShapeWeightsAnimationCurveOwnerAssembler;
|
|
21658
21051
|
}();
|
|
@@ -21792,7 +21185,7 @@ AnimationCurveOwner.registerAssembler(SkinnedMeshRenderer, "blendShapeWeights",
|
|
|
21792
21185
|
}
|
|
21793
21186
|
}
|
|
21794
21187
|
};
|
|
21795
|
-
|
|
21188
|
+
_create_class__default['default'](AnimationClip, [
|
|
21796
21189
|
{
|
|
21797
21190
|
key: "events",
|
|
21798
21191
|
get: /**
|
|
@@ -21821,9 +21214,6 @@ AnimationCurveOwner.registerAssembler(SkinnedMeshRenderer, "blendShapeWeights",
|
|
|
21821
21214
|
return AnimationClip;
|
|
21822
21215
|
}();
|
|
21823
21216
|
|
|
21824
|
-
/**
|
|
21825
|
-
* Animation interpolation method.
|
|
21826
|
-
*/ exports.InterpolationType = void 0;
|
|
21827
21217
|
(function(InterpolationType) {
|
|
21828
21218
|
InterpolationType[InterpolationType[/** Linear interpolation */ "Linear"] = 0] = "Linear";
|
|
21829
21219
|
InterpolationType[InterpolationType[/** Cubic spline interpolation */ "CubicSpine"] = 1] = "CubicSpine";
|
|
@@ -21941,7 +21331,7 @@ AnimationCurveOwner.registerAssembler(SkinnedMeshRenderer, "blendShapeWeights",
|
|
|
21941
21331
|
var result = this._evaluate(time, evaluateData);
|
|
21942
21332
|
return this._type._subtractValue(result, this.keys[0].value, evaluateData.value);
|
|
21943
21333
|
};
|
|
21944
|
-
|
|
21334
|
+
_create_class__default['default'](AnimationCurve, [
|
|
21945
21335
|
{
|
|
21946
21336
|
key: "interpolation",
|
|
21947
21337
|
get: /**
|
|
@@ -21972,7 +21362,7 @@ AnimationCurveOwner.registerAssembler(SkinnedMeshRenderer, "blendShapeWeights",
|
|
|
21972
21362
|
|
|
21973
21363
|
var _AnimationArrayCurve;
|
|
21974
21364
|
exports.AnimationArrayCurve = (_AnimationArrayCurve = /*#__PURE__*/ function(AnimationCurve) {
|
|
21975
|
-
|
|
21365
|
+
_inherits__default['default'](AnimationArrayCurve, AnimationCurve);
|
|
21976
21366
|
function AnimationArrayCurve() {
|
|
21977
21367
|
var _this;
|
|
21978
21368
|
_this = AnimationCurve.call(this) || this;
|
|
@@ -22056,18 +21446,14 @@ exports.AnimationArrayCurve = (_AnimationArrayCurve = /*#__PURE__*/ function(Ani
|
|
|
22056
21446
|
return out;
|
|
22057
21447
|
};
|
|
22058
21448
|
return AnimationArrayCurve;
|
|
22059
|
-
}(AnimationCurve),
|
|
22060
|
-
|
|
22061
|
-
}(), function() {
|
|
22062
|
-
/** @internal */ _AnimationArrayCurve._isInterpolationType = true;
|
|
22063
|
-
}(), _AnimationArrayCurve);
|
|
22064
|
-
exports.AnimationArrayCurve = __decorate([
|
|
21449
|
+
}(AnimationCurve), /** @internal */ _AnimationArrayCurve._isReferenceType = true, /** @internal */ _AnimationArrayCurve._isInterpolationType = true, _AnimationArrayCurve);
|
|
21450
|
+
exports.AnimationArrayCurve = _ts_decorate__default['default']([
|
|
22065
21451
|
StaticInterfaceImplement()
|
|
22066
21452
|
], exports.AnimationArrayCurve);
|
|
22067
21453
|
|
|
22068
21454
|
var _AnimationBoolCurve;
|
|
22069
21455
|
exports.AnimationBoolCurve = (_AnimationBoolCurve = /*#__PURE__*/ function(AnimationCurve) {
|
|
22070
|
-
|
|
21456
|
+
_inherits__default['default'](AnimationBoolCurve, AnimationCurve);
|
|
22071
21457
|
function AnimationBoolCurve() {
|
|
22072
21458
|
var _this;
|
|
22073
21459
|
_this = AnimationCurve.call(this) || this;
|
|
@@ -22118,18 +21504,14 @@ exports.AnimationBoolCurve = (_AnimationBoolCurve = /*#__PURE__*/ function(Anima
|
|
|
22118
21504
|
return frame.value;
|
|
22119
21505
|
};
|
|
22120
21506
|
return AnimationBoolCurve;
|
|
22121
|
-
}(AnimationCurve),
|
|
22122
|
-
|
|
22123
|
-
}(), function() {
|
|
22124
|
-
/** @internal */ _AnimationBoolCurve._isInterpolationType = false;
|
|
22125
|
-
}(), _AnimationBoolCurve);
|
|
22126
|
-
exports.AnimationBoolCurve = __decorate([
|
|
21507
|
+
}(AnimationCurve), /** @internal */ _AnimationBoolCurve._isReferenceType = false, /** @internal */ _AnimationBoolCurve._isInterpolationType = false, _AnimationBoolCurve);
|
|
21508
|
+
exports.AnimationBoolCurve = _ts_decorate__default['default']([
|
|
22127
21509
|
StaticInterfaceImplement()
|
|
22128
21510
|
], exports.AnimationBoolCurve);
|
|
22129
21511
|
|
|
22130
21512
|
var _AnimationColorCurve;
|
|
22131
21513
|
exports.AnimationColorCurve = (_AnimationColorCurve = /*#__PURE__*/ function(AnimationCurve) {
|
|
22132
|
-
|
|
21514
|
+
_inherits__default['default'](AnimationColorCurve, AnimationCurve);
|
|
22133
21515
|
function AnimationColorCurve() {
|
|
22134
21516
|
var _this;
|
|
22135
21517
|
_this = AnimationCurve.call(this) || this;
|
|
@@ -22220,18 +21602,14 @@ exports.AnimationColorCurve = (_AnimationColorCurve = /*#__PURE__*/ function(Ani
|
|
|
22220
21602
|
return out;
|
|
22221
21603
|
};
|
|
22222
21604
|
return AnimationColorCurve;
|
|
22223
|
-
}(AnimationCurve),
|
|
22224
|
-
|
|
22225
|
-
}(), function() {
|
|
22226
|
-
/** @internal */ _AnimationColorCurve._isInterpolationType = true;
|
|
22227
|
-
}(), _AnimationColorCurve);
|
|
22228
|
-
exports.AnimationColorCurve = __decorate([
|
|
21605
|
+
}(AnimationCurve), /** @internal */ _AnimationColorCurve._isReferenceType = true, /** @internal */ _AnimationColorCurve._isInterpolationType = true, _AnimationColorCurve);
|
|
21606
|
+
exports.AnimationColorCurve = _ts_decorate__default['default']([
|
|
22229
21607
|
StaticInterfaceImplement()
|
|
22230
21608
|
], exports.AnimationColorCurve);
|
|
22231
21609
|
|
|
22232
21610
|
var _AnimationFloatArrayCurve;
|
|
22233
21611
|
exports.AnimationFloatArrayCurve = (_AnimationFloatArrayCurve = /*#__PURE__*/ function(AnimationCurve) {
|
|
22234
|
-
|
|
21612
|
+
_inherits__default['default'](AnimationFloatArrayCurve, AnimationCurve);
|
|
22235
21613
|
function AnimationFloatArrayCurve() {
|
|
22236
21614
|
return AnimationCurve.apply(this, arguments);
|
|
22237
21615
|
}
|
|
@@ -22326,18 +21704,14 @@ exports.AnimationFloatArrayCurve = (_AnimationFloatArrayCurve = /*#__PURE__*/ fu
|
|
|
22326
21704
|
return out;
|
|
22327
21705
|
};
|
|
22328
21706
|
return AnimationFloatArrayCurve;
|
|
22329
|
-
}(AnimationCurve),
|
|
22330
|
-
|
|
22331
|
-
}(), function() {
|
|
22332
|
-
/** @internal */ _AnimationFloatArrayCurve._isInterpolationType = true;
|
|
22333
|
-
}(), _AnimationFloatArrayCurve);
|
|
22334
|
-
exports.AnimationFloatArrayCurve = __decorate([
|
|
21707
|
+
}(AnimationCurve), /** @internal */ _AnimationFloatArrayCurve._isReferenceType = true, /** @internal */ _AnimationFloatArrayCurve._isInterpolationType = true, _AnimationFloatArrayCurve);
|
|
21708
|
+
exports.AnimationFloatArrayCurve = _ts_decorate__default['default']([
|
|
22335
21709
|
StaticInterfaceImplement()
|
|
22336
21710
|
], exports.AnimationFloatArrayCurve);
|
|
22337
21711
|
|
|
22338
21712
|
var _AnimationFloatCurve;
|
|
22339
21713
|
exports.AnimationFloatCurve = (_AnimationFloatCurve = /*#__PURE__*/ function(AnimationCurve) {
|
|
22340
|
-
|
|
21714
|
+
_inherits__default['default'](AnimationFloatCurve, AnimationCurve);
|
|
22341
21715
|
function AnimationFloatCurve() {
|
|
22342
21716
|
var _this;
|
|
22343
21717
|
_this = AnimationCurve.call(this) || this;
|
|
@@ -22400,18 +21774,14 @@ exports.AnimationFloatCurve = (_AnimationFloatCurve = /*#__PURE__*/ function(Ani
|
|
|
22400
21774
|
}
|
|
22401
21775
|
};
|
|
22402
21776
|
return AnimationFloatCurve;
|
|
22403
|
-
}(AnimationCurve),
|
|
22404
|
-
|
|
22405
|
-
}(), function() {
|
|
22406
|
-
/** @internal */ _AnimationFloatCurve._isInterpolationType = true;
|
|
22407
|
-
}(), _AnimationFloatCurve);
|
|
22408
|
-
exports.AnimationFloatCurve = __decorate([
|
|
21777
|
+
}(AnimationCurve), /** @internal */ _AnimationFloatCurve._isReferenceType = false, /** @internal */ _AnimationFloatCurve._isInterpolationType = true, _AnimationFloatCurve);
|
|
21778
|
+
exports.AnimationFloatCurve = _ts_decorate__default['default']([
|
|
22409
21779
|
StaticInterfaceImplement()
|
|
22410
21780
|
], exports.AnimationFloatCurve);
|
|
22411
21781
|
|
|
22412
21782
|
var _AnimationQuaternionCurve;
|
|
22413
21783
|
exports.AnimationQuaternionCurve = (_AnimationQuaternionCurve = /*#__PURE__*/ function(AnimationCurve) {
|
|
22414
|
-
|
|
21784
|
+
_inherits__default['default'](AnimationQuaternionCurve1, AnimationCurve);
|
|
22415
21785
|
function AnimationQuaternionCurve1() {
|
|
22416
21786
|
var _this;
|
|
22417
21787
|
_this = AnimationCurve.call(this) || this;
|
|
@@ -22507,20 +21877,14 @@ exports.AnimationQuaternionCurve = (_AnimationQuaternionCurve = /*#__PURE__*/ fu
|
|
|
22507
21877
|
return out;
|
|
22508
21878
|
};
|
|
22509
21879
|
return AnimationQuaternionCurve1;
|
|
22510
|
-
}(AnimationCurve),
|
|
22511
|
-
|
|
22512
|
-
}(), function() {
|
|
22513
|
-
/** @internal */ _AnimationQuaternionCurve._isReferenceType = true;
|
|
22514
|
-
}(), function() {
|
|
22515
|
-
/** @internal */ _AnimationQuaternionCurve._tempConjugateQuat = new engineMath.Quaternion();
|
|
22516
|
-
}(), _AnimationQuaternionCurve);
|
|
22517
|
-
exports.AnimationQuaternionCurve = __decorate([
|
|
21880
|
+
}(AnimationCurve), /** @internal */ _AnimationQuaternionCurve._isInterpolationType = true, /** @internal */ _AnimationQuaternionCurve._isReferenceType = true, /** @internal */ _AnimationQuaternionCurve._tempConjugateQuat = new engineMath.Quaternion(), _AnimationQuaternionCurve);
|
|
21881
|
+
exports.AnimationQuaternionCurve = _ts_decorate__default['default']([
|
|
22518
21882
|
StaticInterfaceImplement()
|
|
22519
21883
|
], exports.AnimationQuaternionCurve);
|
|
22520
21884
|
|
|
22521
21885
|
var _AnimationVector2Curve;
|
|
22522
21886
|
exports.AnimationVector2Curve = (_AnimationVector2Curve = /*#__PURE__*/ function(AnimationCurve) {
|
|
22523
|
-
|
|
21887
|
+
_inherits__default['default'](AnimationVector2Curve, AnimationCurve);
|
|
22524
21888
|
function AnimationVector2Curve() {
|
|
22525
21889
|
var _this;
|
|
22526
21890
|
_this = AnimationCurve.call(this) || this;
|
|
@@ -22599,18 +21963,14 @@ exports.AnimationVector2Curve = (_AnimationVector2Curve = /*#__PURE__*/ function
|
|
|
22599
21963
|
return out;
|
|
22600
21964
|
};
|
|
22601
21965
|
return AnimationVector2Curve;
|
|
22602
|
-
}(AnimationCurve),
|
|
22603
|
-
|
|
22604
|
-
}(), function() {
|
|
22605
|
-
/** @internal */ _AnimationVector2Curve._isInterpolationType = true;
|
|
22606
|
-
}(), _AnimationVector2Curve);
|
|
22607
|
-
exports.AnimationVector2Curve = __decorate([
|
|
21966
|
+
}(AnimationCurve), /** @internal */ _AnimationVector2Curve._isReferenceType = true, /** @internal */ _AnimationVector2Curve._isInterpolationType = true, _AnimationVector2Curve);
|
|
21967
|
+
exports.AnimationVector2Curve = _ts_decorate__default['default']([
|
|
22608
21968
|
StaticInterfaceImplement()
|
|
22609
21969
|
], exports.AnimationVector2Curve);
|
|
22610
21970
|
|
|
22611
21971
|
var _AnimationVector3Curve;
|
|
22612
21972
|
exports.AnimationVector3Curve = (_AnimationVector3Curve = /*#__PURE__*/ function(AnimationCurve) {
|
|
22613
|
-
|
|
21973
|
+
_inherits__default['default'](AnimationVector3Curve, AnimationCurve);
|
|
22614
21974
|
function AnimationVector3Curve() {
|
|
22615
21975
|
var _this;
|
|
22616
21976
|
_this = AnimationCurve.call(this) || this;
|
|
@@ -22701,18 +22061,14 @@ exports.AnimationVector3Curve = (_AnimationVector3Curve = /*#__PURE__*/ function
|
|
|
22701
22061
|
return out;
|
|
22702
22062
|
};
|
|
22703
22063
|
return AnimationVector3Curve;
|
|
22704
|
-
}(AnimationCurve),
|
|
22705
|
-
|
|
22706
|
-
}(), function() {
|
|
22707
|
-
/** @internal */ _AnimationVector3Curve._isInterpolationType = true;
|
|
22708
|
-
}(), _AnimationVector3Curve);
|
|
22709
|
-
exports.AnimationVector3Curve = __decorate([
|
|
22064
|
+
}(AnimationCurve), /** @internal */ _AnimationVector3Curve._isReferenceType = true, /** @internal */ _AnimationVector3Curve._isInterpolationType = true, _AnimationVector3Curve);
|
|
22065
|
+
exports.AnimationVector3Curve = _ts_decorate__default['default']([
|
|
22710
22066
|
StaticInterfaceImplement()
|
|
22711
22067
|
], exports.AnimationVector3Curve);
|
|
22712
22068
|
|
|
22713
22069
|
var _AnimationVector4Curve;
|
|
22714
22070
|
exports.AnimationVector4Curve = (_AnimationVector4Curve = /*#__PURE__*/ function(AnimationCurve) {
|
|
22715
|
-
|
|
22071
|
+
_inherits__default['default'](AnimationVector4Curve, AnimationCurve);
|
|
22716
22072
|
function AnimationVector4Curve() {
|
|
22717
22073
|
var _this;
|
|
22718
22074
|
_this = AnimationCurve.call(this) || this;
|
|
@@ -22803,24 +22159,16 @@ exports.AnimationVector4Curve = (_AnimationVector4Curve = /*#__PURE__*/ function
|
|
|
22803
22159
|
return out;
|
|
22804
22160
|
};
|
|
22805
22161
|
return AnimationVector4Curve;
|
|
22806
|
-
}(AnimationCurve),
|
|
22807
|
-
|
|
22808
|
-
}(), function() {
|
|
22809
|
-
/** @internal */ _AnimationVector4Curve._isInterpolationType = true;
|
|
22810
|
-
}(), _AnimationVector4Curve);
|
|
22811
|
-
exports.AnimationVector4Curve = __decorate([
|
|
22162
|
+
}(AnimationCurve), /** @internal */ _AnimationVector4Curve._isReferenceType = true, /** @internal */ _AnimationVector4Curve._isInterpolationType = true, _AnimationVector4Curve);
|
|
22163
|
+
exports.AnimationVector4Curve = _ts_decorate__default['default']([
|
|
22812
22164
|
StaticInterfaceImplement()
|
|
22813
22165
|
], exports.AnimationVector4Curve);
|
|
22814
22166
|
|
|
22815
|
-
/**
|
|
22816
|
-
* Animator culling mode.
|
|
22817
|
-
*/ exports.AnimatorCullingMode = void 0;
|
|
22818
22167
|
(function(AnimatorCullingMode) {
|
|
22819
22168
|
AnimatorCullingMode[AnimatorCullingMode[/** Disable Culling. */ "None"] = 0] = "None";
|
|
22820
22169
|
AnimatorCullingMode[AnimatorCullingMode[/** Completely disabled when renderers are all culled. */ "Complete"] = 1] = "Complete";
|
|
22821
22170
|
})(exports.AnimatorCullingMode || (exports.AnimatorCullingMode = {}));
|
|
22822
22171
|
|
|
22823
|
-
exports.AnimatorLayerBlendingMode = void 0;
|
|
22824
22172
|
(function(AnimatorLayerBlendingMode) {
|
|
22825
22173
|
AnimatorLayerBlendingMode[AnimatorLayerBlendingMode["Override"] = 0] = "Override";
|
|
22826
22174
|
AnimatorLayerBlendingMode[AnimatorLayerBlendingMode["Additive"] = 1] = "Additive";
|
|
@@ -22867,9 +22215,6 @@ exports.AnimatorLayerBlendingMode = void 0;
|
|
|
22867
22215
|
/** ExitTime represents the exact time at which the transition can take effect. This is represented in normalized time. */ this.exitTime = 1;
|
|
22868
22216
|
};
|
|
22869
22217
|
|
|
22870
|
-
/**
|
|
22871
|
-
* Animation wrap mode.
|
|
22872
|
-
*/ exports.WrapMode = void 0;
|
|
22873
22218
|
(function(WrapMode) {
|
|
22874
22219
|
WrapMode[WrapMode[/** Play once */ "Once"] = 0] = "Once";
|
|
22875
22220
|
WrapMode[WrapMode[/** Loop play */ "Loop"] = 1] = "Loop";
|
|
@@ -22941,10 +22286,11 @@ exports.AnimatorLayerBlendingMode = void 0;
|
|
|
22941
22286
|
this.eventHandlers = [];
|
|
22942
22287
|
};
|
|
22943
22288
|
|
|
22289
|
+
var _curveOwnerPool, _instanceId, _propertyOwners, _property, _layerCurveOwnerPool, _instanceId1, _layerPropertyOwners, _property1;
|
|
22944
22290
|
/**
|
|
22945
22291
|
* The controller of the animation system.
|
|
22946
22292
|
*/ var Animator = /*#__PURE__*/ function(Component) {
|
|
22947
|
-
|
|
22293
|
+
_inherits__default['default'](Animator, Component);
|
|
22948
22294
|
function Animator(entity) {
|
|
22949
22295
|
var _this;
|
|
22950
22296
|
_this = Component.call(this, entity) || this;
|
|
@@ -23133,7 +22479,6 @@ exports.AnimatorLayerBlendingMode = void 0;
|
|
|
23133
22479
|
var curve = curves[i];
|
|
23134
22480
|
var targetEntity = curve.relativePath === "" ? entity : entity.findByPath(curve.relativePath);
|
|
23135
22481
|
if (targetEntity) {
|
|
23136
|
-
var _curveOwnerPool, _instanceId, _propertyOwners, _property, _layerCurveOwnerPool, _instanceId1, _layerPropertyOwners, _property1;
|
|
23137
22482
|
var property = curve.property;
|
|
23138
22483
|
var instanceId = targetEntity.instanceId;
|
|
23139
22484
|
// Get owner
|
|
@@ -23567,7 +22912,7 @@ exports.AnimatorLayerBlendingMode = void 0;
|
|
|
23567
22912
|
}
|
|
23568
22913
|
owner.updateMark = this._updateMark;
|
|
23569
22914
|
};
|
|
23570
|
-
|
|
22915
|
+
_create_class__default['default'](Animator, [
|
|
23571
22916
|
{
|
|
23572
22917
|
key: "animatorController",
|
|
23573
22918
|
get: /**
|
|
@@ -23587,28 +22932,28 @@ exports.AnimatorLayerBlendingMode = void 0;
|
|
|
23587
22932
|
]);
|
|
23588
22933
|
return Animator;
|
|
23589
22934
|
}(Component);
|
|
23590
|
-
|
|
22935
|
+
_ts_decorate__default['default']([
|
|
23591
22936
|
assignmentClone
|
|
23592
22937
|
], Animator.prototype, "speed", void 0);
|
|
23593
|
-
|
|
22938
|
+
_ts_decorate__default['default']([
|
|
23594
22939
|
ignoreClone
|
|
23595
22940
|
], Animator.prototype, "_controllerUpdateFlag", void 0);
|
|
23596
|
-
|
|
22941
|
+
_ts_decorate__default['default']([
|
|
23597
22942
|
ignoreClone
|
|
23598
22943
|
], Animator.prototype, "_updateMark", void 0);
|
|
23599
|
-
|
|
22944
|
+
_ts_decorate__default['default']([
|
|
23600
22945
|
ignoreClone
|
|
23601
22946
|
], Animator.prototype, "_animatorLayersData", void 0);
|
|
23602
|
-
|
|
22947
|
+
_ts_decorate__default['default']([
|
|
23603
22948
|
ignoreClone
|
|
23604
22949
|
], Animator.prototype, "_curveOwnerPool", void 0);
|
|
23605
|
-
|
|
22950
|
+
_ts_decorate__default['default']([
|
|
23606
22951
|
ignoreClone
|
|
23607
22952
|
], Animator.prototype, "_animationEventHandlerPool", void 0);
|
|
23608
|
-
|
|
22953
|
+
_ts_decorate__default['default']([
|
|
23609
22954
|
ignoreClone
|
|
23610
22955
|
], Animator.prototype, "_tempAnimatorStateInfo", void 0);
|
|
23611
|
-
|
|
22956
|
+
_ts_decorate__default['default']([
|
|
23612
22957
|
ignoreClone
|
|
23613
22958
|
], Animator.prototype, "_controlledRenderers", void 0);
|
|
23614
22959
|
|
|
@@ -23658,7 +23003,7 @@ __decorate([
|
|
|
23658
23003
|
*/ _proto._registerChangeFlag = function _registerChangeFlag() {
|
|
23659
23004
|
return this._updateFlagManager.createFlag(BoolUpdateFlag);
|
|
23660
23005
|
};
|
|
23661
|
-
|
|
23006
|
+
_create_class__default['default'](AnimatorController, [
|
|
23662
23007
|
{
|
|
23663
23008
|
key: "layers",
|
|
23664
23009
|
get: /**
|
|
@@ -23792,7 +23137,7 @@ __decorate([
|
|
|
23792
23137
|
index2 !== -1 && this._onStateExitScripts.splice(index2, 1);
|
|
23793
23138
|
}
|
|
23794
23139
|
};
|
|
23795
|
-
|
|
23140
|
+
_create_class__default['default'](AnimatorState, [
|
|
23796
23141
|
{
|
|
23797
23142
|
key: "transitions",
|
|
23798
23143
|
get: /**
|
|
@@ -23895,7 +23240,6 @@ __decorate([
|
|
|
23895
23240
|
return AnimatorStateMachine;
|
|
23896
23241
|
}();
|
|
23897
23242
|
|
|
23898
|
-
exports.AnimatorConditionMode = void 0;
|
|
23899
23243
|
(function(AnimatorConditionMode) {
|
|
23900
23244
|
AnimatorConditionMode[AnimatorConditionMode["If"] = 0] = "If";
|
|
23901
23245
|
AnimatorConditionMode[AnimatorConditionMode["IfNot"] = 1] = "IfNot";
|
|
@@ -23914,7 +23258,7 @@ exports.AnimatorConditionMode = void 0;
|
|
|
23914
23258
|
/**
|
|
23915
23259
|
* SkyboxMaterial
|
|
23916
23260
|
*/ var SkyBoxMaterial = /*#__PURE__*/ function(Material) {
|
|
23917
|
-
|
|
23261
|
+
_inherits__default['default'](SkyBoxMaterial, Material);
|
|
23918
23262
|
function SkyBoxMaterial(engine) {
|
|
23919
23263
|
var _this;
|
|
23920
23264
|
_this = Material.call(this, engine, Shader.find("skybox")) || this;
|
|
@@ -23924,7 +23268,7 @@ exports.AnimatorConditionMode = void 0;
|
|
|
23924
23268
|
_this.shaderData.setVector4("u_cubeDecodeParam", _this._decodeParam);
|
|
23925
23269
|
return _this;
|
|
23926
23270
|
}
|
|
23927
|
-
|
|
23271
|
+
_create_class__default['default'](SkyBoxMaterial, [
|
|
23928
23272
|
{
|
|
23929
23273
|
key: "textureDecodeRGBM",
|
|
23930
23274
|
get: /**
|
|
@@ -23977,7 +23321,6 @@ var DirtyFlagType;
|
|
|
23977
23321
|
DirtyFlagType[DirtyFlagType["Scale"] = 0x400] = "Scale";
|
|
23978
23322
|
DirtyFlagType[DirtyFlagType["Everything"] = 0xffffffff] = "Everything";
|
|
23979
23323
|
})(DirtyFlagType || (DirtyFlagType = {}));
|
|
23980
|
-
exports.ParticleRendererBlendMode = void 0;
|
|
23981
23324
|
(function(ParticleRendererBlendMode) {
|
|
23982
23325
|
ParticleRendererBlendMode[ParticleRendererBlendMode["Transparent"] = 0] = "Transparent";
|
|
23983
23326
|
ParticleRendererBlendMode[ParticleRendererBlendMode["Additive"] = 1] = "Additive";
|
|
@@ -23985,7 +23328,7 @@ exports.ParticleRendererBlendMode = void 0;
|
|
|
23985
23328
|
/**
|
|
23986
23329
|
* Particle Renderer Component.
|
|
23987
23330
|
*/ var ParticleRenderer = /*#__PURE__*/ function(MeshRenderer) {
|
|
23988
|
-
|
|
23331
|
+
_inherits__default['default'](ParticleRenderer, MeshRenderer);
|
|
23989
23332
|
function ParticleRenderer(props) {
|
|
23990
23333
|
var _this;
|
|
23991
23334
|
_this = MeshRenderer.call(this, props) || this;
|
|
@@ -24023,7 +23366,7 @@ exports.ParticleRendererBlendMode = void 0;
|
|
|
24023
23366
|
_this._isFadeOut = false;
|
|
24024
23367
|
_this._playOnEnable = true;
|
|
24025
23368
|
_this._blendMode = 0;
|
|
24026
|
-
_this._onColorChanged = _this._onColorChanged.bind(
|
|
23369
|
+
_this._onColorChanged = _this._onColorChanged.bind(_assert_this_initialized__default['default'](_this));
|
|
24027
23370
|
//@ts-ignore
|
|
24028
23371
|
_this._color._onValueChanged = _this._onColorChanged;
|
|
24029
23372
|
_this.setMaterial(_this._createMaterial());
|
|
@@ -24300,7 +23643,7 @@ exports.ParticleRendererBlendMode = void 0;
|
|
|
24300
23643
|
ParticleRenderer._getRandom = function _getRandom() {
|
|
24301
23644
|
return Math.random() - 0.5;
|
|
24302
23645
|
};
|
|
24303
|
-
|
|
23646
|
+
_create_class__default['default'](ParticleRenderer, [
|
|
24304
23647
|
{
|
|
24305
23648
|
key: "texture",
|
|
24306
23649
|
get: /**
|
|
@@ -24731,10 +24074,8 @@ exports.ParticleRendererBlendMode = void 0;
|
|
|
24731
24074
|
]);
|
|
24732
24075
|
return ParticleRenderer;
|
|
24733
24076
|
}(MeshRenderer);
|
|
24734
|
-
|
|
24735
|
-
|
|
24736
|
-
})();
|
|
24737
|
-
__decorate([
|
|
24077
|
+
/** The max number of indices that Uint16Array can support. */ ParticleRenderer._uint16VertexLimit = 65535;
|
|
24078
|
+
_ts_decorate__default['default']([
|
|
24738
24079
|
ignoreClone
|
|
24739
24080
|
], ParticleRenderer.prototype, "_onColorChanged", null);
|
|
24740
24081
|
|
|
@@ -24744,7 +24085,7 @@ var VERT_SHADER = "#define GLSLIFY 1\nattribute vec3 POSITION;attribute vec2 TEX
|
|
|
24744
24085
|
|
|
24745
24086
|
Shader.create("trail", VERT_SHADER, FRAG_SHADER);
|
|
24746
24087
|
var TrailMaterial = /*#__PURE__*/ function(Material) {
|
|
24747
|
-
|
|
24088
|
+
_inherits__default['default'](TrailMaterial, Material);
|
|
24748
24089
|
function TrailMaterial(engine) {
|
|
24749
24090
|
var _this;
|
|
24750
24091
|
_this = Material.call(this, engine, Shader.find("trail")) || this;
|
|
@@ -24762,7 +24103,7 @@ var _tempVector3 = new engineMath.Vector3();
|
|
|
24762
24103
|
/**
|
|
24763
24104
|
* @deprecated
|
|
24764
24105
|
*/ var TrailRenderer = /*#__PURE__*/ function(MeshRenderer) {
|
|
24765
|
-
|
|
24106
|
+
_inherits__default['default'](TrailRenderer, MeshRenderer);
|
|
24766
24107
|
function TrailRenderer(entity, props) {
|
|
24767
24108
|
var _this;
|
|
24768
24109
|
_this = MeshRenderer.call(this, entity) || this;
|
|
@@ -24950,7 +24291,7 @@ var _tempVector3 = new engineMath.Vector3();
|
|
|
24950
24291
|
* }
|
|
24951
24292
|
* ```
|
|
24952
24293
|
*/ var Probe = /*#__PURE__*/ function(Script) {
|
|
24953
|
-
|
|
24294
|
+
_inherits__default['default'](Probe, Script);
|
|
24954
24295
|
function Probe() {
|
|
24955
24296
|
var _this;
|
|
24956
24297
|
_this = Script.apply(this, arguments) || this;
|
|
@@ -25003,7 +24344,7 @@ var _tempVector3 = new engineMath.Vector3();
|
|
|
25003
24344
|
this._camera.renderTarget = this._oriCameraRenderTarget;
|
|
25004
24345
|
this._camera.cullingMask = this._oriCameraCullingMask;
|
|
25005
24346
|
};
|
|
25006
|
-
|
|
24347
|
+
_create_class__default['default'](Probe, [
|
|
25007
24348
|
{
|
|
25008
24349
|
key: "_texture",
|
|
25009
24350
|
get: function get() {
|
|
@@ -25021,7 +24362,7 @@ var cacheDir = new engineMath.Vector3();
|
|
|
25021
24362
|
/**
|
|
25022
24363
|
* Cube probe, generate cubeTexture, used for dynamic environment reflection and other effects.
|
|
25023
24364
|
*/ var CubeProbe = /*#__PURE__*/ function(Probe) {
|
|
25024
|
-
|
|
24365
|
+
_inherits__default['default'](CubeProbe, Probe);
|
|
25025
24366
|
function CubeProbe() {
|
|
25026
24367
|
var _this;
|
|
25027
24368
|
_this = Probe.apply(this, arguments) || this;
|