@galacean/engine 1.1.0-beta.14 → 1.1.0-beta.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser.js +56 -39
- package/dist/browser.min.js +1 -1
- package/dist/main.js +1 -1
- package/dist/miniprogram.js +1 -1
- package/dist/module.js +1 -1
- package/package.json +5 -5
package/dist/browser.js
CHANGED
|
@@ -2759,22 +2759,17 @@
|
|
|
2759
2759
|
var m11 = e[0];
|
|
2760
2760
|
var m12 = e[1];
|
|
2761
2761
|
var m13 = e[2];
|
|
2762
|
-
var m14 = e[3];
|
|
2763
2762
|
var m21 = e[4];
|
|
2764
2763
|
var m22 = e[5];
|
|
2765
2764
|
var m23 = e[6];
|
|
2766
|
-
var m24 = e[7];
|
|
2767
2765
|
var m31 = e[8];
|
|
2768
2766
|
var m32 = e[9];
|
|
2769
2767
|
var m33 = e[10];
|
|
2770
|
-
var m34 = e[11];
|
|
2771
2768
|
translation.set(e[12], e[13], e[14]);
|
|
2772
|
-
var
|
|
2773
|
-
var
|
|
2774
|
-
var
|
|
2775
|
-
|
|
2776
|
-
var sy = ys * Math.sqrt(m21 * m21 + m22 * m22 + m23 * m23);
|
|
2777
|
-
var sz = zs * Math.sqrt(m31 * m31 + m32 * m32 + m33 * m33);
|
|
2769
|
+
var sx = Math.sqrt(m11 * m11 + m12 * m12 + m13 * m13);
|
|
2770
|
+
var sy = Math.sqrt(m21 * m21 + m22 * m22 + m23 * m23);
|
|
2771
|
+
var sz = Math.sqrt(m31 * m31 + m32 * m32 + m33 * m33);
|
|
2772
|
+
if (this.determinant() < 0) sx = -sx;
|
|
2778
2773
|
scale.set(sx, sy, sz);
|
|
2779
2774
|
if (Math.abs(sx) < MathUtil$1.zeroTolerance || Math.abs(sy) < MathUtil$1.zeroTolerance || Math.abs(sz) < MathUtil$1.zeroTolerance) {
|
|
2780
2775
|
rotation.identity();
|
|
@@ -5532,6 +5527,9 @@
|
|
|
5532
5527
|
if (sourceProperty._cloneTo) {
|
|
5533
5528
|
sourceProperty._cloneTo(targetOProperty);
|
|
5534
5529
|
}
|
|
5530
|
+
if (sourceProperty.copyFrom) {
|
|
5531
|
+
targetOProperty.copyFrom(sourceProperty);
|
|
5532
|
+
}
|
|
5535
5533
|
break;
|
|
5536
5534
|
}
|
|
5537
5535
|
} else {
|
|
@@ -9133,7 +9131,11 @@
|
|
|
9133
9131
|
}
|
|
9134
9132
|
cloneEntity.layer = srcEntity.layer;
|
|
9135
9133
|
cloneEntity._isActive = srcEntity._isActive;
|
|
9136
|
-
|
|
9134
|
+
var cloneTransform = cloneEntity.transform;
|
|
9135
|
+
var srcTransform = srcEntity.transform;
|
|
9136
|
+
cloneTransform.position = srcTransform.position;
|
|
9137
|
+
cloneTransform.rotation = srcTransform.rotation;
|
|
9138
|
+
cloneTransform.scale = srcTransform.scale;
|
|
9137
9139
|
var children = srcEntity._children;
|
|
9138
9140
|
for(var i = 0, n = srcEntity._children.length; i < n; i++){
|
|
9139
9141
|
cloneEntity.addChild(this._createCloneEntity(children[i]));
|
|
@@ -16555,8 +16557,8 @@
|
|
|
16555
16557
|
var SkinnedMeshRenderer = function SkinnedMeshRenderer(entity) {
|
|
16556
16558
|
var _this;
|
|
16557
16559
|
_this = MeshRenderer1.call(this, entity) || this;
|
|
16558
|
-
_this._jointDataCreateCache = new Vector2(-1, -1);
|
|
16559
16560
|
_this._localBounds = new BoundingBox();
|
|
16561
|
+
_this._jointDataCreateCache = new Vector2(-1, -1);
|
|
16560
16562
|
_this._skin = null;
|
|
16561
16563
|
var rhi = _this.entity.engine._hardwareRenderer;
|
|
16562
16564
|
var maxVertexUniformVectors = rhi.renderStates.getParameter(rhi.gl.MAX_VERTEX_UNIFORM_VECTORS);
|
|
@@ -16861,6 +16863,9 @@
|
|
|
16861
16863
|
(function() {
|
|
16862
16864
|
SkinnedMeshRenderer._jointMatrixProperty = ShaderProperty.getByName("renderer_JointMatrix");
|
|
16863
16865
|
})();
|
|
16866
|
+
__decorate$1([
|
|
16867
|
+
deepClone
|
|
16868
|
+
], SkinnedMeshRenderer.prototype, "_localBounds", void 0);
|
|
16864
16869
|
__decorate$1([
|
|
16865
16870
|
ignoreClone
|
|
16866
16871
|
], SkinnedMeshRenderer.prototype, "_jointDataCreateCache", void 0);
|
|
@@ -16873,9 +16878,6 @@
|
|
|
16873
16878
|
__decorate$1([
|
|
16874
16879
|
ignoreClone
|
|
16875
16880
|
], SkinnedMeshRenderer.prototype, "_rootBone", void 0);
|
|
16876
|
-
__decorate$1([
|
|
16877
|
-
ignoreClone
|
|
16878
|
-
], SkinnedMeshRenderer.prototype, "_localBounds", void 0);
|
|
16879
16881
|
__decorate$1([
|
|
16880
16882
|
ignoreClone
|
|
16881
16883
|
], SkinnedMeshRenderer.prototype, "_jointMatrices", void 0);
|
|
@@ -17991,12 +17993,12 @@
|
|
|
17991
17993
|
*/ ResourceManager._addLoader = function _addLoader(type, loader, extNames) {
|
|
17992
17994
|
this._loaders[type] = loader;
|
|
17993
17995
|
for(var i = 0, len = extNames.length; i < len; i++){
|
|
17994
|
-
this._extTypeMapping[extNames[i]] = type;
|
|
17996
|
+
this._extTypeMapping[extNames[i].toLowerCase()] = type;
|
|
17995
17997
|
}
|
|
17996
17998
|
};
|
|
17997
17999
|
ResourceManager._getTypeByUrl = function _getTypeByUrl(url) {
|
|
17998
18000
|
var path = url.split("?")[0];
|
|
17999
|
-
return this._extTypeMapping[path.substring(path.lastIndexOf(".") + 1)];
|
|
18001
|
+
return this._extTypeMapping[path.substring(path.lastIndexOf(".") + 1).toLowerCase()];
|
|
18000
18002
|
};
|
|
18001
18003
|
return ResourceManager;
|
|
18002
18004
|
}();
|
|
@@ -29131,7 +29133,7 @@
|
|
|
29131
29133
|
this.component = target.getComponent(type);
|
|
29132
29134
|
this.cureType = cureType;
|
|
29133
29135
|
var isBlendShape = _instanceof1$2(this.component, SkinnedMeshRenderer);
|
|
29134
|
-
// @todo: Temp solution with blendShape
|
|
29136
|
+
// @todo: Temp solution with blendShape bug when multi SkinnedMeshRenderer in a entity. we need to run setTargetValue to solve it.
|
|
29135
29137
|
this._isCopyMode = cureType._isCopyMode && !isBlendShape;
|
|
29136
29138
|
var assemblerType = AnimationCurveOwner.getAssemblerType(type, property);
|
|
29137
29139
|
this._assembler = new assemblerType();
|
|
@@ -29209,7 +29211,8 @@
|
|
|
29209
29211
|
cureType._lerpValue(targetValue, value, weight, targetValue);
|
|
29210
29212
|
} else {
|
|
29211
29213
|
var originValue1 = this._assembler.getTargetValue();
|
|
29212
|
-
|
|
29214
|
+
// @todo: Temp solution in PR: https://github.com/galacean/engine/pull/1840
|
|
29215
|
+
var lerpValue = cureType._lerpValue(originValue1, value, weight, originValue1);
|
|
29213
29216
|
this._assembler.setTargetValue(lerpValue);
|
|
29214
29217
|
}
|
|
29215
29218
|
}
|
|
@@ -29219,7 +29222,8 @@
|
|
|
29219
29222
|
if (this._isCopyMode) {
|
|
29220
29223
|
return this.cureType._lerpValue(srcValue, destValue, crossWeight, this.baseEvaluateData.value);
|
|
29221
29224
|
} else {
|
|
29222
|
-
|
|
29225
|
+
// @todo: Temp solution in PR: https://github.com/galacean/engine/pull/1840
|
|
29226
|
+
this.baseEvaluateData.value = this.cureType._lerpValue(srcValue, destValue, crossWeight, this.baseEvaluateData.value);
|
|
29223
29227
|
return this.baseEvaluateData.value;
|
|
29224
29228
|
}
|
|
29225
29229
|
};
|
|
@@ -32029,6 +32033,7 @@
|
|
|
32029
32033
|
context.camera._renderPipeline.pushRenderData(context, renderData);
|
|
32030
32034
|
};
|
|
32031
32035
|
_proto._onDestroy = function _onDestroy() {
|
|
32036
|
+
Renderer1.prototype._onDestroy.call(this);
|
|
32032
32037
|
this.generator._destroy();
|
|
32033
32038
|
};
|
|
32034
32039
|
_create_class$3(ParticleRenderer, [
|
|
@@ -32617,8 +32622,8 @@
|
|
|
32617
32622
|
/** The rate of particle emission. */ _this.rateOverTime = new ParticleCompositeCurve(10);
|
|
32618
32623
|
/** The rate at which the emitter spawns new particles over distance. */ _this.rateOverDistance = new ParticleCompositeCurve(0);
|
|
32619
32624
|
/** @internal */ _this._shapeRand = new Rand(0, ParticleRandomSubSeeds.Shape);
|
|
32625
|
+
/** @internal */ _this._frameRateTime = 0;
|
|
32620
32626
|
_this._bursts = [];
|
|
32621
|
-
_this._frameRateTime = 0;
|
|
32622
32627
|
_this._currentBurstIndex = 0;
|
|
32623
32628
|
_this._burstRand = new Rand(0, ParticleRandomSubSeeds.Burst);
|
|
32624
32629
|
return _this;
|
|
@@ -32668,7 +32673,8 @@
|
|
|
32668
32673
|
};
|
|
32669
32674
|
/**
|
|
32670
32675
|
* @internal
|
|
32671
|
-
*/ _proto.
|
|
32676
|
+
*/ _proto._reset = function _reset() {
|
|
32677
|
+
this._frameRateTime = 0;
|
|
32672
32678
|
this._currentBurstIndex = 0;
|
|
32673
32679
|
};
|
|
32674
32680
|
_proto._emitByRateOverTime = function _emitByRateOverTime(playTime) {
|
|
@@ -33618,7 +33624,7 @@
|
|
|
33618
33624
|
this._firstActiveElement = firstFreeElement;
|
|
33619
33625
|
this._firstNewElement = firstFreeElement;
|
|
33620
33626
|
this._playTime = 0;
|
|
33621
|
-
this.emission.
|
|
33627
|
+
this.emission._reset();
|
|
33622
33628
|
}
|
|
33623
33629
|
}
|
|
33624
33630
|
};
|
|
@@ -33653,19 +33659,23 @@
|
|
|
33653
33659
|
/**
|
|
33654
33660
|
* @internal
|
|
33655
33661
|
*/ _proto._update = function _update(elapsedTime) {
|
|
33662
|
+
var _this = this, main = _this.main, emission = _this.emission;
|
|
33663
|
+
var duration = main.duration;
|
|
33656
33664
|
var lastPlayTime = this._playTime;
|
|
33657
33665
|
this._playTime += elapsedTime;
|
|
33658
33666
|
this._retireActiveParticles();
|
|
33659
33667
|
this._freeRetiredParticles();
|
|
33660
|
-
if (
|
|
33661
|
-
|
|
33662
|
-
if (!
|
|
33668
|
+
if (emission.enabled && this._isPlaying) {
|
|
33669
|
+
emission._emit(lastPlayTime, this._playTime);
|
|
33670
|
+
if (!main.isLoop && this._playTime > duration) {
|
|
33663
33671
|
this._isPlaying = false;
|
|
33664
33672
|
}
|
|
33665
33673
|
}
|
|
33666
33674
|
// Reset play time when is not playing and no active particles to avoid potential precision problems in GPU
|
|
33667
33675
|
if (!this.isAlive) {
|
|
33668
|
-
this._playTime
|
|
33676
|
+
var discardTime = Math.min(emission._frameRateTime, Math.floor(this._playTime / duration) * duration);
|
|
33677
|
+
this._playTime -= discardTime;
|
|
33678
|
+
emission._frameRateTime -= discardTime;
|
|
33669
33679
|
}
|
|
33670
33680
|
// Add new particles to vertex buffer when has wait process retired element or new particle
|
|
33671
33681
|
//
|
|
@@ -40175,14 +40185,6 @@
|
|
|
40175
40185
|
});
|
|
40176
40186
|
};
|
|
40177
40187
|
_proto._isKhronosSupported = function _isKhronosSupported(priorityFormats, engine) {
|
|
40178
|
-
if (priorityFormats === void 0) priorityFormats = [
|
|
40179
|
-
exports.KTX2TargetFormat.ASTC,
|
|
40180
|
-
exports.KTX2TargetFormat.ETC,
|
|
40181
|
-
exports.KTX2TargetFormat.BC7,
|
|
40182
|
-
exports.KTX2TargetFormat.BC1_BC3,
|
|
40183
|
-
exports.KTX2TargetFormat.PVRTC,
|
|
40184
|
-
exports.KTX2TargetFormat.R8G8B8A8
|
|
40185
|
-
];
|
|
40186
40188
|
return !!KhronosTranscoder.transcoderMap[exports.KTX2Loader._detectSupportedFormat(engine._hardwareRenderer, priorityFormats)];
|
|
40187
40189
|
};
|
|
40188
40190
|
/**
|
|
@@ -40266,10 +40268,21 @@
|
|
|
40266
40268
|
};
|
|
40267
40269
|
KTX2Loader1._detectSupportedFormat = function _detectSupportedFormat(renderer, priorityFormats) {
|
|
40268
40270
|
for(var i = 0; i < priorityFormats.length; i++){
|
|
40269
|
-
var
|
|
40270
|
-
|
|
40271
|
-
|
|
40272
|
-
|
|
40271
|
+
var format = priorityFormats[i];
|
|
40272
|
+
var capabilities = this._supportedMap[format];
|
|
40273
|
+
if (capabilities) {
|
|
40274
|
+
for(var j = 0; j < capabilities.length; j++){
|
|
40275
|
+
if (renderer.canIUse(capabilities[j])) {
|
|
40276
|
+
return format;
|
|
40277
|
+
}
|
|
40278
|
+
}
|
|
40279
|
+
} else {
|
|
40280
|
+
switch(priorityFormats[i]){
|
|
40281
|
+
case exports.KTX2TargetFormat.R8G8B8A8:
|
|
40282
|
+
return format;
|
|
40283
|
+
case exports.KTX2TargetFormat.R8:
|
|
40284
|
+
case exports.KTX2TargetFormat.R8G8:
|
|
40285
|
+
if (renderer.isWebGL2) return format;
|
|
40273
40286
|
}
|
|
40274
40287
|
}
|
|
40275
40288
|
}
|
|
@@ -40783,6 +40796,10 @@
|
|
|
40783
40796
|
relativePath = relativePath === "" ? "" + entity.name : entity.name + "/" + relativePath;
|
|
40784
40797
|
entity = entity.parent;
|
|
40785
40798
|
}
|
|
40799
|
+
// If the target node is in the default scene, relativePath will be empty
|
|
40800
|
+
if (entity !== context.glTFResource.defaultSceneRoot) {
|
|
40801
|
+
continue;
|
|
40802
|
+
}
|
|
40786
40803
|
var ComponentType = void 0;
|
|
40787
40804
|
var propertyName = void 0;
|
|
40788
40805
|
switch(target.path){
|
|
@@ -43324,7 +43341,7 @@
|
|
|
43324
43341
|
], GALACEAN_animation_event);
|
|
43325
43342
|
|
|
43326
43343
|
//@ts-ignore
|
|
43327
|
-
var version = "1.1.0-beta.
|
|
43344
|
+
var version = "1.1.0-beta.15";
|
|
43328
43345
|
console.log("Galacean engine version: " + version);
|
|
43329
43346
|
for(var key in CoreObjects){
|
|
43330
43347
|
Loader.registerClass(key, CoreObjects[key]);
|