@galacean/effects-plugin-model 2.2.4 → 2.2.6
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/alipay.js +9 -8
- package/dist/alipay.js.map +1 -1
- package/dist/alipay.mjs +9 -8
- package/dist/alipay.mjs.map +1 -1
- package/dist/douyin.js +9 -8
- package/dist/douyin.js.map +1 -1
- package/dist/douyin.mjs +9 -8
- package/dist/douyin.mjs.map +1 -1
- package/dist/index.js +10 -9
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +2 -2
- package/dist/index.min.js.map +1 -1
- package/dist/index.mjs +10 -9
- package/dist/index.mjs.map +1 -1
- package/dist/loader.mjs +10 -9
- package/dist/loader.mjs.map +1 -1
- package/dist/weapp.js +9 -8
- package/dist/weapp.js.map +1 -1
- package/dist/weapp.mjs +9 -8
- package/dist/weapp.mjs.map +1 -1
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Description: Galacean Effects player model plugin
|
|
4
4
|
* Author: Ant Group CO., Ltd.
|
|
5
5
|
* Contributors: 飂兮
|
|
6
|
-
* Version: v2.2.
|
|
6
|
+
* Version: v2.2.6
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
'use strict';
|
|
@@ -1322,7 +1322,6 @@ function GetNum2GLName(ctx) {
|
|
|
1322
1322
|
*/ _proto.update = function update(modelMatrix, viewProjMatrix, positions, lineColor) {
|
|
1323
1323
|
var material = this.mesh.material;
|
|
1324
1324
|
material.setMatrix("effects_ObjectToWorld", modelMatrix);
|
|
1325
|
-
material.setMatrix("effects_MatrixVP", viewProjMatrix);
|
|
1326
1325
|
for(var i = 0; i < positions.length; i += 3){
|
|
1327
1326
|
material.setVector3("_PositionList[" + i / 3 + "]", Vector3.fromArray(positions, i));
|
|
1328
1327
|
}
|
|
@@ -8657,7 +8656,6 @@ function _assert_this_initialized(self) {
|
|
|
8657
8656
|
};
|
|
8658
8657
|
_proto.updateUniformsByScene = function updateUniformsByScene(sceneStates) {
|
|
8659
8658
|
var material = this.getEffectsMaterial();
|
|
8660
|
-
material.setMatrix("effects_MatrixVP", sceneStates.viewProjectionMatrix);
|
|
8661
8659
|
material.setVector3("_Camera", sceneStates.cameraPosition);
|
|
8662
8660
|
//
|
|
8663
8661
|
if (!this.isUnlitMaterial()) {
|
|
@@ -9545,6 +9543,7 @@ exports.ModelPluginComponent = /*#__PURE__*/ function(Behaviour) {
|
|
|
9545
9543
|
* 组件初始化,初始化场景管理器并更新合成相机
|
|
9546
9544
|
* @param sceneParams - 场景参数
|
|
9547
9545
|
*/ _proto.initial = function initial(sceneParams) {
|
|
9546
|
+
var _this_item_composition;
|
|
9548
9547
|
var _sceneParams_runtimeEnv;
|
|
9549
9548
|
this.runtimeEnv = (_sceneParams_runtimeEnv = sceneParams["runtimeEnv"]) != null ? _sceneParams_runtimeEnv : this.runtimeEnv;
|
|
9550
9549
|
var _sceneParams_compatibleMode;
|
|
@@ -9562,6 +9561,7 @@ exports.ModelPluginComponent = /*#__PURE__*/ function(Behaviour) {
|
|
|
9562
9561
|
var _sceneParams_renderMode3DUVGridSize;
|
|
9563
9562
|
this.renderMode3DUVGridSize = (_sceneParams_renderMode3DUVGridSize = sceneParams["renderMode3DUVGridSize"]) != null ? _sceneParams_renderMode3DUVGridSize : this.renderMode3DUVGridSize;
|
|
9564
9563
|
var component = this.item.composition;
|
|
9564
|
+
var _this_item_composition_items;
|
|
9565
9565
|
this.scene.initial({
|
|
9566
9566
|
componentName: "" + component.id,
|
|
9567
9567
|
renderer: this.engine.renderer,
|
|
@@ -9574,7 +9574,7 @@ exports.ModelPluginComponent = /*#__PURE__*/ function(Behaviour) {
|
|
|
9574
9574
|
renderMode3DUVGridSize: this.renderMode3DUVGridSize,
|
|
9575
9575
|
renderSkybox: this.renderSkybox,
|
|
9576
9576
|
lightItemCount: this.getLightItemCount(),
|
|
9577
|
-
maxJointCount: this.getMaxJointCount()
|
|
9577
|
+
maxJointCount: this.getMaxJointCount((_this_item_composition_items = (_this_item_composition = this.item.composition) == null ? void 0 : _this_item_composition.items) != null ? _this_item_composition_items : [])
|
|
9578
9578
|
});
|
|
9579
9579
|
this.updateSceneCamera(component);
|
|
9580
9580
|
};
|
|
@@ -9598,11 +9598,9 @@ exports.ModelPluginComponent = /*#__PURE__*/ function(Behaviour) {
|
|
|
9598
9598
|
});
|
|
9599
9599
|
return lightItemCount;
|
|
9600
9600
|
};
|
|
9601
|
-
_proto.getMaxJointCount = function getMaxJointCount() {
|
|
9602
|
-
var
|
|
9601
|
+
_proto.getMaxJointCount = function getMaxJointCount(items) {
|
|
9602
|
+
var _this = this;
|
|
9603
9603
|
var maxJointCount = 0;
|
|
9604
|
-
var _this_item_composition_items;
|
|
9605
|
-
var items = (_this_item_composition_items = (_this_item_composition = this.item.composition) == null ? void 0 : _this_item_composition.items) != null ? _this_item_composition_items : [];
|
|
9606
9604
|
items.forEach(function(item) {
|
|
9607
9605
|
var meshComp = item.getComponent(exports.ModelMeshComponent);
|
|
9608
9606
|
if (meshComp && meshComp.data) {
|
|
@@ -9614,6 +9612,9 @@ exports.ModelPluginComponent = /*#__PURE__*/ function(Behaviour) {
|
|
|
9614
9612
|
}
|
|
9615
9613
|
}
|
|
9616
9614
|
}
|
|
9615
|
+
if (item.children.length !== 0) {
|
|
9616
|
+
maxJointCount = Math.max(_this.getMaxJointCount(item.children), maxJointCount);
|
|
9617
|
+
}
|
|
9617
9618
|
});
|
|
9618
9619
|
return maxJointCount;
|
|
9619
9620
|
};
|
|
@@ -13294,7 +13295,7 @@ var GLTFHelper = /*#__PURE__*/ function() {
|
|
|
13294
13295
|
EFFECTS.registerPlugin("model", ModelPlugin, EFFECTS.VFXItem);
|
|
13295
13296
|
/**
|
|
13296
13297
|
* 插件版本号
|
|
13297
|
-
*/ var version = "2.2.
|
|
13298
|
+
*/ var version = "2.2.6";
|
|
13298
13299
|
EFFECTS.logger.info("Plugin model version: " + version + ".");
|
|
13299
13300
|
if (version !== EFFECTS__namespace.version) {
|
|
13300
13301
|
console.error("注意:请统一 Model 插件与 Player 版本,不统一的版本混用会有不可预知的后果!", "\nAttention: Please ensure the Model plugin is synchronized with the Player version. Mixing and matching incompatible versions may result in unpredictable consequences!");
|