@galacean/engine-physics-lite 0.0.0-experimental-0.9-plus.7 → 0.0.0-experimental-0.9-plus.8
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.map +1 -1
- package/dist/miniprogram.js +195 -53
- package/dist/module.js.map +1 -1
- package/package.json +4 -4
package/dist/miniprogram.js
CHANGED
|
@@ -3503,6 +3503,28 @@ var /** @internal */ PromiseState;
|
|
|
3503
3503
|
* @remarks The release principle is that it is not referenced by the components, including direct and indirect reference.
|
|
3504
3504
|
*/ _proto.gc = function gc() {
|
|
3505
3505
|
this._gc(false);
|
|
3506
|
+
var engine = this.engine;
|
|
3507
|
+
engine._renderElementPool.garbageCollection();
|
|
3508
|
+
engine._spriteElementPool.garbageCollection();
|
|
3509
|
+
engine._spriteMaskElementPool.garbageCollection();
|
|
3510
|
+
engine._textElementPool.garbageCollection();
|
|
3511
|
+
var _componentsManager = engine._componentsManager, _lightManager = engine._lightManager;
|
|
3512
|
+
_componentsManager._renderers.garbageCollection();
|
|
3513
|
+
// @ts-ignore
|
|
3514
|
+
_componentsManager._onStartScripts.garbageCollection();
|
|
3515
|
+
// @ts-ignore
|
|
3516
|
+
_componentsManager._onUpdateScripts.garbageCollection();
|
|
3517
|
+
// @ts-ignore
|
|
3518
|
+
_componentsManager._onLateUpdateScripts.garbageCollection();
|
|
3519
|
+
// @ts-ignore
|
|
3520
|
+
_componentsManager._onPhysicsUpdateScripts.garbageCollection();
|
|
3521
|
+
// @ts-ignore
|
|
3522
|
+
_componentsManager._onUpdateAnimations.garbageCollection();
|
|
3523
|
+
// @ts-ignore
|
|
3524
|
+
_componentsManager._onUpdateRenderers.garbageCollection();
|
|
3525
|
+
_lightManager._spotLights.garbageCollection();
|
|
3526
|
+
_lightManager._pointLights.garbageCollection();
|
|
3527
|
+
_lightManager._directLights.garbageCollection();
|
|
3506
3528
|
};
|
|
3507
3529
|
/**
|
|
3508
3530
|
* @internal
|
|
@@ -5333,6 +5355,11 @@ var TransformModifyFlags;
|
|
|
5333
5355
|
* @returns Cloned entity
|
|
5334
5356
|
*/ _proto.clone = function clone() {
|
|
5335
5357
|
var cloneEntity = new Entity(this._engine, this.name);
|
|
5358
|
+
var _this = this, hookResource = _this._hookResource;
|
|
5359
|
+
if (hookResource) {
|
|
5360
|
+
cloneEntity._hookResource = hookResource;
|
|
5361
|
+
hookResource._addRefCount(1);
|
|
5362
|
+
}
|
|
5336
5363
|
cloneEntity._isActive = this._isActive;
|
|
5337
5364
|
cloneEntity.transform.localMatrix = this.transform.localMatrix;
|
|
5338
5365
|
var children = this._children;
|
|
@@ -5357,6 +5384,10 @@ var TransformModifyFlags;
|
|
|
5357
5384
|
return;
|
|
5358
5385
|
}
|
|
5359
5386
|
EngineObject.prototype.destroy.call(this);
|
|
5387
|
+
if (this._hookResource) {
|
|
5388
|
+
this._hookResource._addRefCount(-1);
|
|
5389
|
+
this._hookResource = null;
|
|
5390
|
+
}
|
|
5360
5391
|
var components = this._components;
|
|
5361
5392
|
for(var i = components.length - 1; i >= 0; i--){
|
|
5362
5393
|
components[i].destroy();
|
|
@@ -9706,9 +9737,9 @@ __decorate$1([
|
|
|
9706
9737
|
var Material = function Material(engine, shader) {
|
|
9707
9738
|
var _this;
|
|
9708
9739
|
_this = RefObject.call(this, engine) || this;
|
|
9709
|
-
/** Shader data. */ _this.shaderData = new ShaderData(ShaderDataGroup.Material);
|
|
9710
9740
|
/** @internal */ _this._renderStates = [] // todo: later will as a part of shaderData when shader effect frame is OK, that is more powerful and flexible.
|
|
9711
9741
|
;
|
|
9742
|
+
_this._shaderData = new ShaderData(ShaderDataGroup.Material);
|
|
9712
9743
|
_this.shader = shader;
|
|
9713
9744
|
return _this;
|
|
9714
9745
|
};
|
|
@@ -9741,8 +9772,21 @@ __decorate$1([
|
|
|
9741
9772
|
*/ _proto._preRender = function _preRender(renderElement) {};
|
|
9742
9773
|
/**
|
|
9743
9774
|
* @override
|
|
9744
|
-
*/ _proto._onDestroy = function _onDestroy() {
|
|
9775
|
+
*/ _proto._onDestroy = function _onDestroy() {
|
|
9776
|
+
this._shader = null;
|
|
9777
|
+
this._shaderData = null;
|
|
9778
|
+
this._renderStates.length = 0;
|
|
9779
|
+
this._renderStates = null;
|
|
9780
|
+
};
|
|
9745
9781
|
_create_class$2(Material, [
|
|
9782
|
+
{
|
|
9783
|
+
key: "shaderData",
|
|
9784
|
+
get: /**
|
|
9785
|
+
* Shader data.
|
|
9786
|
+
*/ function get() {
|
|
9787
|
+
return this._shaderData;
|
|
9788
|
+
}
|
|
9789
|
+
},
|
|
9746
9790
|
{
|
|
9747
9791
|
key: "shader",
|
|
9748
9792
|
get: /**
|
|
@@ -9810,6 +9854,12 @@ __decorate$1([
|
|
|
9810
9854
|
*/ _proto.resetPool = function resetPool() {
|
|
9811
9855
|
this._elementPoolIndex = 0;
|
|
9812
9856
|
};
|
|
9857
|
+
_proto.garbageCollection = function garbageCollection() {
|
|
9858
|
+
var _this = this, pool = _this._elementPool;
|
|
9859
|
+
for(var i = pool.length - 1; i >= 0; i--){
|
|
9860
|
+
pool[i].dispose && pool[i].dispose();
|
|
9861
|
+
}
|
|
9862
|
+
};
|
|
9813
9863
|
return ClassPool;
|
|
9814
9864
|
}();
|
|
9815
9865
|
var RenderElement = function RenderElement() {};
|
|
@@ -9829,6 +9879,9 @@ var RenderElement = function RenderElement() {};
|
|
|
9829
9879
|
this.renderState = renderState;
|
|
9830
9880
|
this.shaderPass = shaderPass;
|
|
9831
9881
|
};
|
|
9882
|
+
_proto.dispose = function dispose() {
|
|
9883
|
+
this.component = this.mesh = this.subMesh = this.material = this.renderState = this.shaderPass = null;
|
|
9884
|
+
};
|
|
9832
9885
|
return MeshRenderElement;
|
|
9833
9886
|
}(RenderElement);
|
|
9834
9887
|
/**
|
|
@@ -9872,6 +9925,9 @@ var SpriteElement = /*#__PURE__*/ function(RenderElement) {
|
|
|
9872
9925
|
this.renderState = renderState;
|
|
9873
9926
|
this.shaderPass = shaderPass;
|
|
9874
9927
|
};
|
|
9928
|
+
_proto.dispose = function dispose() {
|
|
9929
|
+
this.component = this.renderData = this.material = this.texture = this.renderState = this.shaderPass = null;
|
|
9930
|
+
};
|
|
9875
9931
|
return SpriteElement;
|
|
9876
9932
|
}(RenderElement);
|
|
9877
9933
|
var SpriteMaskElement = /*#__PURE__*/ function(RenderElement) {
|
|
@@ -9889,6 +9945,9 @@ var SpriteMaskElement = /*#__PURE__*/ function(RenderElement) {
|
|
|
9889
9945
|
this.renderData = renderData;
|
|
9890
9946
|
this.material = material;
|
|
9891
9947
|
};
|
|
9948
|
+
_proto.dispose = function dispose() {
|
|
9949
|
+
this.component = this.renderData = this.material = null;
|
|
9950
|
+
};
|
|
9892
9951
|
return SpriteMaskElement;
|
|
9893
9952
|
}(RenderElement);
|
|
9894
9953
|
/**
|
|
@@ -9904,7 +9963,6 @@ exports.Renderer = (_Renderer = /*#__PURE__*/ function(Component) {
|
|
|
9904
9963
|
var Renderer1 = function Renderer1(entity) {
|
|
9905
9964
|
var _this;
|
|
9906
9965
|
_this = Component.call(this, entity) || this;
|
|
9907
|
-
/** ShaderData related to renderer. */ _this.shaderData = new ShaderData(ShaderDataGroup.Renderer);
|
|
9908
9966
|
/** @internal */ _this._onUpdateIndex = -1;
|
|
9909
9967
|
/** @internal */ _this._rendererIndex = -1;
|
|
9910
9968
|
/** @internal */ _this._globalShaderMacro = new ShaderMacroCollection();
|
|
@@ -9912,6 +9970,7 @@ exports.Renderer = (_Renderer = /*#__PURE__*/ function(Component) {
|
|
|
9912
9970
|
_this._overrideUpdate = false;
|
|
9913
9971
|
_this._materials = [];
|
|
9914
9972
|
_this._dirtyUpdateFlag = 0;
|
|
9973
|
+
_this._shaderData = new ShaderData(ShaderDataGroup.Renderer);
|
|
9915
9974
|
_this._mvMatrix = new miniprogram$7.Matrix();
|
|
9916
9975
|
_this._mvpMatrix = new miniprogram$7.Matrix();
|
|
9917
9976
|
_this._mvInvMatrix = new miniprogram$7.Matrix();
|
|
@@ -10059,6 +10118,17 @@ exports.Renderer = (_Renderer = /*#__PURE__*/ function(Component) {
|
|
|
10059
10118
|
var _materials_i;
|
|
10060
10119
|
(_materials_i = materials[i]) == null ? void 0 : _materials_i._addRefCount(-1);
|
|
10061
10120
|
}
|
|
10121
|
+
this._entity = null;
|
|
10122
|
+
this._globalShaderMacro = null;
|
|
10123
|
+
this._bounds = null;
|
|
10124
|
+
this._materials = null;
|
|
10125
|
+
this._shaderData = null;
|
|
10126
|
+
this._mvMatrix = null;
|
|
10127
|
+
this._mvpMatrix = null;
|
|
10128
|
+
this._mvInvMatrix = null;
|
|
10129
|
+
this._normalMatrix = null;
|
|
10130
|
+
this._materialsInstanced = null;
|
|
10131
|
+
this._rendererLayer = null;
|
|
10062
10132
|
};
|
|
10063
10133
|
_proto._updateShaderData = function _updateShaderData(context) {
|
|
10064
10134
|
var entity = this.entity;
|
|
@@ -10120,6 +10190,14 @@ exports.Renderer = (_Renderer = /*#__PURE__*/ function(Component) {
|
|
|
10120
10190
|
this._dirtyUpdateFlag |= 0x1;
|
|
10121
10191
|
};
|
|
10122
10192
|
_create_class$2(Renderer1, [
|
|
10193
|
+
{
|
|
10194
|
+
key: "shaderData",
|
|
10195
|
+
get: /**
|
|
10196
|
+
* ShaderData related to renderer.
|
|
10197
|
+
*/ function get() {
|
|
10198
|
+
return this._shaderData;
|
|
10199
|
+
}
|
|
10200
|
+
},
|
|
10123
10201
|
{
|
|
10124
10202
|
key: "isCulled",
|
|
10125
10203
|
get: /**
|
|
@@ -10204,9 +10282,6 @@ exports.Renderer = (_Renderer = /*#__PURE__*/ function(Component) {
|
|
|
10204
10282
|
}(), function() {
|
|
10205
10283
|
_Renderer._rendererLayerProperty = Shader.getPropertyByName("oasis_RendererLayer");
|
|
10206
10284
|
}(), _Renderer);
|
|
10207
|
-
__decorate$1([
|
|
10208
|
-
deepClone
|
|
10209
|
-
], exports.Renderer.prototype, "shaderData", void 0);
|
|
10210
10285
|
__decorate$1([
|
|
10211
10286
|
ignoreClone
|
|
10212
10287
|
], exports.Renderer.prototype, "_distanceForSort", void 0);
|
|
@@ -10234,6 +10309,9 @@ __decorate$1([
|
|
|
10234
10309
|
__decorate$1([
|
|
10235
10310
|
ignoreClone
|
|
10236
10311
|
], exports.Renderer.prototype, "_dirtyUpdateFlag", void 0);
|
|
10312
|
+
__decorate$1([
|
|
10313
|
+
deepClone
|
|
10314
|
+
], exports.Renderer.prototype, "_shaderData", void 0);
|
|
10237
10315
|
__decorate$1([
|
|
10238
10316
|
ignoreClone
|
|
10239
10317
|
], exports.Renderer.prototype, "_mvMatrix", void 0);
|
|
@@ -10481,6 +10559,7 @@ SimpleSpriteAssembler = __decorate$1([
|
|
|
10481
10559
|
sprite._addRefCount(-1);
|
|
10482
10560
|
sprite._updateFlagManager.removeListener(this._onSpriteChange);
|
|
10483
10561
|
}
|
|
10562
|
+
this._entity = null;
|
|
10484
10563
|
this._sprite = null;
|
|
10485
10564
|
this._renderData = null;
|
|
10486
10565
|
};
|
|
@@ -11075,14 +11154,19 @@ var BufferUtil = /*#__PURE__*/ function() {
|
|
|
11075
11154
|
}();
|
|
11076
11155
|
/**
|
|
11077
11156
|
* Sub-mesh, mainly contains drawing information.
|
|
11078
|
-
*/ var SubMesh = function
|
|
11079
|
-
|
|
11080
|
-
|
|
11081
|
-
|
|
11082
|
-
|
|
11083
|
-
|
|
11084
|
-
|
|
11085
|
-
|
|
11157
|
+
*/ var SubMesh = /*#__PURE__*/ function() {
|
|
11158
|
+
var SubMesh = function SubMesh(start, count, topology) {
|
|
11159
|
+
if (start === void 0) start = 0;
|
|
11160
|
+
if (count === void 0) count = 0;
|
|
11161
|
+
if (topology === void 0) topology = exports.MeshTopology.Triangles;
|
|
11162
|
+
this.start = start;
|
|
11163
|
+
this.count = count;
|
|
11164
|
+
this.topology = topology;
|
|
11165
|
+
};
|
|
11166
|
+
var _proto = SubMesh.prototype;
|
|
11167
|
+
_proto.dispose = function dispose() {};
|
|
11168
|
+
return SubMesh;
|
|
11169
|
+
}();
|
|
11086
11170
|
/**
|
|
11087
11171
|
* Mesh.
|
|
11088
11172
|
*/ var Mesh = /*#__PURE__*/ function(RefObject) {
|
|
@@ -11197,6 +11281,7 @@ var BufferUtil = /*#__PURE__*/ function() {
|
|
|
11197
11281
|
this._indexBufferBinding = null;
|
|
11198
11282
|
this._vertexElements = null;
|
|
11199
11283
|
this._vertexElementMap = null;
|
|
11284
|
+
this._updateFlagManager = null;
|
|
11200
11285
|
this._platformPrimitive.destroy();
|
|
11201
11286
|
};
|
|
11202
11287
|
_proto._setVertexElements = function _setVertexElements(elements) {
|
|
@@ -12876,8 +12961,8 @@ var VertexChangedFlags;
|
|
|
12876
12961
|
*/ _proto._onDestroy = function _onDestroy() {
|
|
12877
12962
|
Renderer.prototype._onDestroy.call(this);
|
|
12878
12963
|
var mesh = this._mesh;
|
|
12879
|
-
if (mesh
|
|
12880
|
-
mesh._addRefCount(-1);
|
|
12964
|
+
if (mesh) {
|
|
12965
|
+
mesh.destroyed || mesh._addRefCount(-1);
|
|
12881
12966
|
mesh._updateFlagManager.removeListener(this._onMeshChanged);
|
|
12882
12967
|
this._mesh = null;
|
|
12883
12968
|
}
|
|
@@ -13211,10 +13296,21 @@ var rePropName = RegExp("[^.[\\]]+" + "|" + // Or match property names within br
|
|
|
13211
13296
|
* @internal
|
|
13212
13297
|
* @override
|
|
13213
13298
|
*/ _proto._onDestroy = function _onDestroy() {
|
|
13214
|
-
var
|
|
13299
|
+
var _this__rootBone, _this__jointTexture;
|
|
13215
13300
|
MeshRenderer.prototype._onDestroy.call(this);
|
|
13216
|
-
(
|
|
13301
|
+
(_this__rootBone = this._rootBone) == null ? void 0 : _this__rootBone.transform._updateFlagManager.removeListener(this._onTransformChanged);
|
|
13302
|
+
this._rootBone = null;
|
|
13303
|
+
this._jointDataCreateCache = null;
|
|
13304
|
+
this._skin = null;
|
|
13305
|
+
this._blendShapeWeights = null;
|
|
13306
|
+
this._localBounds = null;
|
|
13307
|
+
this._jointMatrices = null;
|
|
13217
13308
|
(_this__jointTexture = this._jointTexture) == null ? void 0 : _this__jointTexture.destroy();
|
|
13309
|
+
this._jointTexture = null;
|
|
13310
|
+
if (this._jointEntities) {
|
|
13311
|
+
this._jointEntities.length = 0;
|
|
13312
|
+
this._jointEntities = null;
|
|
13313
|
+
}
|
|
13218
13314
|
};
|
|
13219
13315
|
/**
|
|
13220
13316
|
* @internal
|
|
@@ -14589,6 +14685,11 @@ var TextRenderElement = /*#__PURE__*/ function(RenderElement) {
|
|
|
14589
14685
|
return _this;
|
|
14590
14686
|
};
|
|
14591
14687
|
_inherits$2(TextRenderElement, RenderElement);
|
|
14688
|
+
var _proto = TextRenderElement.prototype;
|
|
14689
|
+
_proto.dispose = function dispose() {
|
|
14690
|
+
this.component = this.material = this.renderState = this.shaderPass = null;
|
|
14691
|
+
this.charElements.length = 0;
|
|
14692
|
+
};
|
|
14592
14693
|
return TextRenderElement;
|
|
14593
14694
|
}(RenderElement);
|
|
14594
14695
|
/**
|
|
@@ -14732,7 +14833,6 @@ var TextRenderElement = /*#__PURE__*/ function(RenderElement) {
|
|
|
14732
14833
|
this.texture = null;
|
|
14733
14834
|
this.solidColor = null;
|
|
14734
14835
|
this.sky.destroy();
|
|
14735
|
-
this._engine = null;
|
|
14736
14836
|
};
|
|
14737
14837
|
/**
|
|
14738
14838
|
* @internal
|
|
@@ -15113,8 +15213,6 @@ var TextRenderElement = /*#__PURE__*/ function(RenderElement) {
|
|
|
15113
15213
|
function Scene(engine, name) {
|
|
15114
15214
|
var _this;
|
|
15115
15215
|
_this = EngineObject.call(this, engine) || this;
|
|
15116
|
-
/** The background of the scene. */ _this.background = new Background(_this._engine);
|
|
15117
|
-
/** Scene-related shader data. */ _this.shaderData = new ShaderData(ShaderDataGroup.Scene);
|
|
15118
15216
|
/** If cast shadows. */ _this.castShadows = true;
|
|
15119
15217
|
/** The resolution of the shadow maps. */ _this.shadowResolution = exports.ShadowResolution.Medium;
|
|
15120
15218
|
/** The splits of two cascade distribution. */ _this.shadowTwoCascadeSplits = 1.0 / 3.0;
|
|
@@ -15124,6 +15222,8 @@ var TextRenderElement = /*#__PURE__*/ function(RenderElement) {
|
|
|
15124
15222
|
/** @internal */ _this._isActiveInEngine = false;
|
|
15125
15223
|
/** @internal */ _this._globalShaderMacro = new ShaderMacroCollection();
|
|
15126
15224
|
/** @internal */ _this._rootEntities = [];
|
|
15225
|
+
_this._background = new Background(_this._engine);
|
|
15226
|
+
_this._shaderData = new ShaderData(ShaderDataGroup.Scene);
|
|
15127
15227
|
_this._shadowCascades = exports.ShadowCascadesMode.NoCascades;
|
|
15128
15228
|
_this._fogMode = exports.FogMode.None;
|
|
15129
15229
|
_this._fogColor = new miniprogram$7.Color(0.5, 0.5, 0.5, 1.0);
|
|
@@ -15294,6 +15394,8 @@ var TextRenderElement = /*#__PURE__*/ function(RenderElement) {
|
|
|
15294
15394
|
shaderData.setVector3(Scene._sunlightColorProperty, this._sunlightVector3);
|
|
15295
15395
|
shaderData.setVector3(Scene._sunlightDirectionProperty, sunlight.direction);
|
|
15296
15396
|
this._sunLight = sunlight;
|
|
15397
|
+
} else {
|
|
15398
|
+
this._sunLight = null;
|
|
15297
15399
|
}
|
|
15298
15400
|
if (this.castShadows && this._sunLight && this._sunLight.shadowType !== exports.ShadowType.None) {
|
|
15299
15401
|
shaderData.enableMacro("SHADOW_TYPE", this._sunLight.shadowType.toString());
|
|
@@ -15353,6 +15455,22 @@ var TextRenderElement = /*#__PURE__*/ function(RenderElement) {
|
|
|
15353
15455
|
this._fogParams.w = density / Math.sqrt(Math.LN2);
|
|
15354
15456
|
};
|
|
15355
15457
|
_create_class$2(Scene, [
|
|
15458
|
+
{
|
|
15459
|
+
key: "shaderData",
|
|
15460
|
+
get: /**
|
|
15461
|
+
* Scene-related shader data.
|
|
15462
|
+
*/ function get() {
|
|
15463
|
+
return this._shaderData;
|
|
15464
|
+
}
|
|
15465
|
+
},
|
|
15466
|
+
{
|
|
15467
|
+
key: "background",
|
|
15468
|
+
get: /**
|
|
15469
|
+
* The background of the scene.
|
|
15470
|
+
*/ function get() {
|
|
15471
|
+
return this._background;
|
|
15472
|
+
}
|
|
15473
|
+
},
|
|
15356
15474
|
{
|
|
15357
15475
|
key: "shadowCascades",
|
|
15358
15476
|
get: /**
|
|
@@ -17615,7 +17733,6 @@ exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
|
|
|
17615
17733
|
var Camera1 = function Camera1(entity) {
|
|
17616
17734
|
var _this;
|
|
17617
17735
|
_this = Component.call(this, entity) || this;
|
|
17618
|
-
/** Shader data. */ _this.shaderData = new ShaderData(ShaderDataGroup.Camera);
|
|
17619
17736
|
/** Rendering priority - A Camera with higher priority will be rendered on top of a camera with lower priority. */ _this.priority = 0;
|
|
17620
17737
|
/** Whether to enable frustum culling, it is enabled by default. */ _this.enableFrustumCulling = true;
|
|
17621
17738
|
/**
|
|
@@ -17629,6 +17746,7 @@ exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
|
|
|
17629
17746
|
/** @internal */ _this._globalShaderMacro = new ShaderMacroCollection();
|
|
17630
17747
|
/** @internal */ _this._frustum = new miniprogram$7.BoundingFrustum();
|
|
17631
17748
|
/** @internal */ _this._virtualCamera = new VirtualCamera();
|
|
17749
|
+
_this._shaderData = new ShaderData(ShaderDataGroup.Camera);
|
|
17632
17750
|
_this._isProjMatSetting = false;
|
|
17633
17751
|
_this._nearClipPlane = 0.1;
|
|
17634
17752
|
_this._farClipPlane = 100;
|
|
@@ -17828,6 +17946,20 @@ exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
|
|
|
17828
17946
|
this._isInvViewProjDirty.destroy();
|
|
17829
17947
|
this._isViewMatrixDirty.destroy();
|
|
17830
17948
|
this.shaderData._addRefCount(-1);
|
|
17949
|
+
this._entity = null;
|
|
17950
|
+
this._globalShaderMacro = null;
|
|
17951
|
+
this._frustum = null;
|
|
17952
|
+
this._renderPipeline = null;
|
|
17953
|
+
this._virtualCamera = null;
|
|
17954
|
+
this._shaderData = null;
|
|
17955
|
+
this._frustumViewChangeFlag = null;
|
|
17956
|
+
this._transform = null;
|
|
17957
|
+
this._isViewMatrixDirty = null;
|
|
17958
|
+
this._isInvViewProjDirty = null;
|
|
17959
|
+
this._viewport = null;
|
|
17960
|
+
this._inverseProjectionMatrix = null;
|
|
17961
|
+
this._lastAspectSize = null;
|
|
17962
|
+
this._invViewProjMat = null;
|
|
17831
17963
|
};
|
|
17832
17964
|
_proto._projMatChange = function _projMatChange() {
|
|
17833
17965
|
this._isFrustumProjectDirty = true;
|
|
@@ -17867,6 +17999,14 @@ exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
|
|
|
17867
17999
|
return this._inverseProjectionMatrix;
|
|
17868
18000
|
};
|
|
17869
18001
|
_create_class$2(Camera1, [
|
|
18002
|
+
{
|
|
18003
|
+
key: "shaderData",
|
|
18004
|
+
get: /**
|
|
18005
|
+
* Shader data.
|
|
18006
|
+
*/ function get() {
|
|
18007
|
+
return this._shaderData;
|
|
18008
|
+
}
|
|
18009
|
+
},
|
|
17870
18010
|
{
|
|
17871
18011
|
key: "nearClipPlane",
|
|
17872
18012
|
get: /**
|
|
@@ -19915,6 +20055,7 @@ SlicedSpriteAssembler = __decorate$1([
|
|
|
19915
20055
|
sprite._addRefCount(-1);
|
|
19916
20056
|
sprite._updateFlagManager.removeListener(this._onSpriteChange);
|
|
19917
20057
|
}
|
|
20058
|
+
this._entity = null;
|
|
19918
20059
|
this._color = null;
|
|
19919
20060
|
this._sprite = null;
|
|
19920
20061
|
this._assembler = null;
|
|
@@ -22431,9 +22572,16 @@ exports.AnimatorLayerBlendingMode = void 0;
|
|
|
22431
22572
|
})(LayerState || (LayerState = {}));
|
|
22432
22573
|
/**
|
|
22433
22574
|
* @internal
|
|
22434
|
-
*/ var AnimationEventHandler = function
|
|
22435
|
-
|
|
22436
|
-
|
|
22575
|
+
*/ var AnimationEventHandler = /*#__PURE__*/ function() {
|
|
22576
|
+
var AnimationEventHandler = function AnimationEventHandler() {
|
|
22577
|
+
this.handlers = [];
|
|
22578
|
+
};
|
|
22579
|
+
var _proto = AnimationEventHandler.prototype;
|
|
22580
|
+
_proto.dispose = function dispose() {
|
|
22581
|
+
this.handlers.length = 0;
|
|
22582
|
+
};
|
|
22583
|
+
return AnimationEventHandler;
|
|
22584
|
+
}();
|
|
22437
22585
|
/**
|
|
22438
22586
|
* Transitions define when and how the state machine switch from on state to another. AnimatorTransition always originate from a StateMachine or a StateMachine entry.
|
|
22439
22587
|
*/ var AnimatorStateTransition = function AnimatorStateTransition() {
|
|
@@ -26241,6 +26389,10 @@ var GLTFEntityParser = /*#__PURE__*/ function(GLTFParser) {
|
|
|
26241
26389
|
}
|
|
26242
26390
|
glTFResource.sceneRoots = sceneRoots;
|
|
26243
26391
|
glTFResource.defaultSceneRoot = sceneRoots[sceneID];
|
|
26392
|
+
// @ts-ignore
|
|
26393
|
+
glTFResource.defaultSceneRoot._hookResource = glTFResource;
|
|
26394
|
+
// @ts-ignore
|
|
26395
|
+
glTFResource._addRefCount(1);
|
|
26244
26396
|
};
|
|
26245
26397
|
return GLTFEntityParser;
|
|
26246
26398
|
}(GLTFParser);
|
|
@@ -26962,36 +27114,20 @@ var GLTFValidator = /*#__PURE__*/ function(GLTFParser1) {
|
|
|
26962
27114
|
})();
|
|
26963
27115
|
/**
|
|
26964
27116
|
* Product after GLTF parser, usually, `defaultSceneRoot` is only needed to use.
|
|
26965
|
-
*/ var GLTFResource = /*#__PURE__*/ function(
|
|
27117
|
+
*/ var GLTFResource = /*#__PURE__*/ function(RefObject) {
|
|
26966
27118
|
var GLTFResource = function GLTFResource(engine, url) {
|
|
26967
27119
|
var _this;
|
|
26968
|
-
_this =
|
|
27120
|
+
_this = RefObject.call(this, engine) || this;
|
|
26969
27121
|
_this.url = url;
|
|
26970
27122
|
return _this;
|
|
26971
27123
|
};
|
|
26972
|
-
_inherits$1(GLTFResource,
|
|
27124
|
+
_inherits$1(GLTFResource, RefObject);
|
|
26973
27125
|
var _proto = GLTFResource.prototype;
|
|
26974
27126
|
/**
|
|
26975
|
-
* @
|
|
26976
|
-
*/ _proto.
|
|
26977
|
-
if (this._destroyed) {
|
|
26978
|
-
return;
|
|
26979
|
-
}
|
|
26980
|
-
EngineObject.prototype.destroy.call(this);
|
|
26981
|
-
this.defaultSceneRoot.destroy();
|
|
26982
|
-
this.textures = null;
|
|
26983
|
-
this.materials = null;
|
|
26984
|
-
this.meshes = null;
|
|
26985
|
-
this.skins = null;
|
|
26986
|
-
this.animations = null;
|
|
26987
|
-
this.entities = null;
|
|
26988
|
-
this.cameras = null;
|
|
26989
|
-
this.lights = null;
|
|
26990
|
-
this.sceneRoots = null;
|
|
26991
|
-
this.extensionsData = null;
|
|
26992
|
-
};
|
|
27127
|
+
* @internal
|
|
27128
|
+
*/ _proto._onDestroy = function _onDestroy() {};
|
|
26993
27129
|
return GLTFResource;
|
|
26994
|
-
}(miniprogram$5.
|
|
27130
|
+
}(miniprogram$5.RefObject);
|
|
26995
27131
|
var GLTFLoader = /*#__PURE__*/ function(Loader) {
|
|
26996
27132
|
var GLTFLoader = function GLTFLoader() {
|
|
26997
27133
|
return Loader.apply(this, arguments);
|
|
@@ -27015,8 +27151,14 @@ var GLTFLoader = /*#__PURE__*/ function(Loader) {
|
|
|
27015
27151
|
}
|
|
27016
27152
|
});
|
|
27017
27153
|
((params == null ? void 0 : params.pipeline) || GLTFPipeline.defaultPipeline)._parse(context).then(masterPromiseInfo.resolve).catch(function(e) {
|
|
27018
|
-
|
|
27019
|
-
|
|
27154
|
+
var msg = "Error loading glTF model from " + url + " .";
|
|
27155
|
+
miniprogram$5.Logger.error(msg);
|
|
27156
|
+
masterPromiseInfo.reject(msg);
|
|
27157
|
+
context.defaultSceneRootPromiseInfo.reject(e);
|
|
27158
|
+
context.texturesPromiseInfo.reject(e);
|
|
27159
|
+
context.materialsPromiseInfo.reject(e);
|
|
27160
|
+
context.meshesPromiseInfo.reject(e);
|
|
27161
|
+
context.animationClipsPromiseInfo.reject(e);
|
|
27020
27162
|
});
|
|
27021
27163
|
return context.promiseMap;
|
|
27022
27164
|
};
|
|
@@ -28545,7 +28687,7 @@ exports.MeshLoader = /*#__PURE__*/ function(Loader) {
|
|
|
28545
28687
|
decode(data, resourceManager.engine).then(function(mesh) {
|
|
28546
28688
|
resolve(mesh);
|
|
28547
28689
|
});
|
|
28548
|
-
});
|
|
28690
|
+
}).catch(reject);
|
|
28549
28691
|
});
|
|
28550
28692
|
};
|
|
28551
28693
|
return MeshLoader;
|
|
@@ -28563,14 +28705,14 @@ exports.EditorTextureLoader = /*#__PURE__*/ function(Loader) {
|
|
|
28563
28705
|
var _proto = EditorTextureLoader.prototype;
|
|
28564
28706
|
_proto.load = function load(item, resourceManager) {
|
|
28565
28707
|
var _this = this;
|
|
28566
|
-
return new miniprogram$5.AssetPromise(function(resolve) {
|
|
28708
|
+
return new miniprogram$5.AssetPromise(function(resolve, reject) {
|
|
28567
28709
|
_this.request(item.url, {
|
|
28568
28710
|
type: "arraybuffer"
|
|
28569
28711
|
}).then(function(data) {
|
|
28570
28712
|
decode(data, resourceManager.engine).then(function(texture) {
|
|
28571
28713
|
resolve(texture);
|
|
28572
28714
|
});
|
|
28573
|
-
});
|
|
28715
|
+
}).catch(reject);
|
|
28574
28716
|
});
|
|
28575
28717
|
};
|
|
28576
28718
|
return EditorTextureLoader;
|
|
@@ -36149,7 +36291,7 @@ function _interopNamespace(e) {
|
|
|
36149
36291
|
}
|
|
36150
36292
|
var CoreObjects__namespace = /*#__PURE__*/ _interopNamespace(CoreObjects);
|
|
36151
36293
|
//@ts-ignore
|
|
36152
|
-
var version = "0.0.0-experimental-0.9-plus.
|
|
36294
|
+
var version = "0.0.0-experimental-0.9-plus.8";
|
|
36153
36295
|
console.log("Galacean engine version: " + version);
|
|
36154
36296
|
for(var key in CoreObjects__namespace){
|
|
36155
36297
|
CoreObjects.Loader.registerClass(key, CoreObjects__namespace[key]);
|