@galacean/engine-core 0.0.0-experimental-animator-additive.2 → 0.0.0-experimental-animator-additive.3
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 +318 -3
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +25 -10
- package/dist/module.js +377 -62
- package/dist/module.js.map +1 -1
- package/package.json +3 -3
- package/types/mesh/SkinnedMeshRenderer.d.ts +1 -0
package/dist/miniprogram.js
CHANGED
|
@@ -13126,6 +13126,7 @@ var rePropName = RegExp(// Match anything that isn't a dot or bracket.
|
|
|
13126
13126
|
function SkinnedMeshRenderer(entity) {
|
|
13127
13127
|
var _this;
|
|
13128
13128
|
_this = MeshRenderer.call(this, entity) || this;
|
|
13129
|
+
_this._supportSkinning = false;
|
|
13129
13130
|
_this._hasInitSkin = false;
|
|
13130
13131
|
_this._jointDataCreateCache = new miniprogram.Vector2(-1, -1);
|
|
13131
13132
|
_this._localBounds = new miniprogram.BoundingBox();
|
|
@@ -13135,7 +13136,7 @@ var rePropName = RegExp(// Match anything that isn't a dot or bracket.
|
|
|
13135
13136
|
// Limit size to 256 to avoid some problem:
|
|
13136
13137
|
// For renderer is "Apple GPU", when uniform is large than 256 the skeleton matrix array access in shader very slow in Safari or WKWebview. This may be a apple bug, Chrome and Firefox is OK!
|
|
13137
13138
|
// 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.
|
|
13138
|
-
maxVertexUniformVectors = Math.min(maxVertexUniformVectors,
|
|
13139
|
+
maxVertexUniformVectors = Math.min(maxVertexUniformVectors, rhi._options._maxAllowSkinUniformVectorCount);
|
|
13139
13140
|
_this._maxVertexUniformVectors = maxVertexUniformVectors;
|
|
13140
13141
|
_this._onLocalBoundsChanged = _this._onLocalBoundsChanged.bind(_assert_this_initialized(_this));
|
|
13141
13142
|
var localBounds = _this._localBounds;
|
|
@@ -13153,9 +13154,8 @@ var rePropName = RegExp(// Match anything that isn't a dot or bracket.
|
|
|
13153
13154
|
this._initSkin();
|
|
13154
13155
|
this._hasInitSkin = true;
|
|
13155
13156
|
}
|
|
13156
|
-
|
|
13157
|
-
|
|
13158
|
-
var ibms = skin.inverseBindMatrices;
|
|
13157
|
+
if (this._supportSkinning) {
|
|
13158
|
+
var ibms = this._skin.inverseBindMatrices;
|
|
13159
13159
|
var worldToLocal = this._rootBone.getInvModelMatrix();
|
|
13160
13160
|
var _this = this, joints = _this._jointEntities, jointMatrices = _this._jointMatrices;
|
|
13161
13161
|
for(var i = joints.length - 1; i >= 0; i--){
|
|
@@ -13174,8 +13174,6 @@ var rePropName = RegExp(// Match anything that isn't a dot or bracket.
|
|
|
13174
13174
|
* @override
|
|
13175
13175
|
*/ _proto._updateShaderData = function _updateShaderData(context) {
|
|
13176
13176
|
var entity = this.entity;
|
|
13177
|
-
var worldMatrix = this._rootBone ? this._rootBone.transform.worldMatrix : entity.transform.worldMatrix;
|
|
13178
|
-
this._updateTransformShaderData(context, worldMatrix);
|
|
13179
13177
|
var shaderData = this.shaderData;
|
|
13180
13178
|
var mesh = this.mesh;
|
|
13181
13179
|
var blendShapeManager = mesh._blendShapeManager;
|
|
@@ -13202,12 +13200,18 @@ var rePropName = RegExp(// Match anything that isn't a dot or bracket.
|
|
|
13202
13200
|
shaderData.disableMacro("O3_JOINTS_NUM");
|
|
13203
13201
|
shaderData.enableMacro("O3_USE_JOINT_TEXTURE");
|
|
13204
13202
|
shaderData.setTexture(SkinnedMeshRenderer._jointSamplerProperty, this._jointTexture);
|
|
13203
|
+
this._supportSkinning = true;
|
|
13205
13204
|
} else {
|
|
13206
|
-
|
|
13205
|
+
var _this__jointTexture1;
|
|
13206
|
+
this._supportSkinning = false;
|
|
13207
|
+
(_this__jointTexture1 = this._jointTexture) == null ? void 0 : _this__jointTexture1.destroy();
|
|
13208
|
+
shaderData.disableMacro("O3_HAS_SKIN");
|
|
13209
|
+
Logger.warn("component's joints count(" + jointCount + ") greater than device's MAX_VERTEX_UNIFORM_VECTORS number " + this._maxVertexUniformVectors + ", and don't support jointTexture in this device. suggest joint count less than " + remainUniformJointCount + ".", this);
|
|
13207
13210
|
}
|
|
13208
13211
|
} else {
|
|
13209
|
-
var
|
|
13210
|
-
|
|
13212
|
+
var _this__jointTexture2;
|
|
13213
|
+
this._supportSkinning = true;
|
|
13214
|
+
(_this__jointTexture2 = this._jointTexture) == null ? void 0 : _this__jointTexture2.destroy();
|
|
13211
13215
|
shaderData.disableMacro("O3_USE_JOINT_TEXTURE");
|
|
13212
13216
|
shaderData.enableMacro("O3_JOINTS_NUM", remainUniformJointCount.toString());
|
|
13213
13217
|
shaderData.setFloatArray(SkinnedMeshRenderer._jointMatrixProperty, this._jointMatrices);
|
|
@@ -13218,6 +13222,8 @@ var rePropName = RegExp(// Match anything that isn't a dot or bracket.
|
|
|
13218
13222
|
this._jointTexture.setPixelBuffer(this._jointMatrices);
|
|
13219
13223
|
}
|
|
13220
13224
|
}
|
|
13225
|
+
var worldMatrix = this._supportSkinning && this._rootBone ? this._rootBone.transform.worldMatrix : entity.transform.worldMatrix;
|
|
13226
|
+
this._updateTransformShaderData(context, worldMatrix);
|
|
13221
13227
|
var layer = entity.layer;
|
|
13222
13228
|
this._rendererLayer.set(layer & 65535, layer >>> 16 & 65535, 0, 0);
|
|
13223
13229
|
};
|
|
@@ -13412,6 +13418,9 @@ var rePropName = RegExp(// Match anything that isn't a dot or bracket.
|
|
|
13412
13418
|
(function() {
|
|
13413
13419
|
SkinnedMeshRenderer._jointMatrixProperty = Shader.getPropertyByName("u_jointMatrix");
|
|
13414
13420
|
})();
|
|
13421
|
+
__decorate([
|
|
13422
|
+
ignoreClone
|
|
13423
|
+
], SkinnedMeshRenderer.prototype, "_supportSkinning", void 0);
|
|
13415
13424
|
__decorate([
|
|
13416
13425
|
ignoreClone
|
|
13417
13426
|
], SkinnedMeshRenderer.prototype, "_hasInitSkin", void 0);
|
|
@@ -22522,7 +22531,13 @@ exports.AnimatorLayerBlendingMode = void 0;
|
|
|
22522
22531
|
var _this__animatorLayersData_i = this._animatorLayersData[i1], srcPlayData = _this__animatorLayersData_i.srcPlayData, destPlayData = _this__animatorLayersData_i.destPlayData;
|
|
22523
22532
|
this._revertCurveOwners(srcPlayData == null ? void 0 : (_srcPlayData_stateData = srcPlayData.stateData) == null ? void 0 : _srcPlayData_stateData.curveOwners);
|
|
22524
22533
|
this._revertCurveOwners(destPlayData == null ? void 0 : (_destPlayData_stateData = destPlayData.stateData) == null ? void 0 : _destPlayData_stateData.curveOwners);
|
|
22525
|
-
|
|
22534
|
+
}
|
|
22535
|
+
for(var i2 = 0, n2 = animatorController.layers.length; i2 < n2; i2++){
|
|
22536
|
+
var animatorLayerData1 = this._getAnimatorLayerData(i2);
|
|
22537
|
+
if (animatorLayerData1.layerState === LayerState.Standby) {
|
|
22538
|
+
continue;
|
|
22539
|
+
}
|
|
22540
|
+
this._updateLayer(i2, i2 === 0, deltaTime / 1000, animationUpdate);
|
|
22526
22541
|
}
|
|
22527
22542
|
};
|
|
22528
22543
|
/**
|