@galacean/effects-plugin-model 2.4.5 → 2.4.7
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 +1 -1
- package/dist/alipay.js.map +1 -1
- package/dist/alipay.mjs +1 -1
- package/dist/alipay.mjs.map +1 -1
- package/dist/douyin.js +1 -1
- package/dist/douyin.js.map +1 -1
- package/dist/douyin.mjs +1 -1
- package/dist/douyin.mjs.map +1 -1
- package/dist/index.js +8 -6
- 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 +8 -6
- package/dist/index.mjs.map +1 -1
- package/dist/loader.mjs +8 -6
- package/dist/loader.mjs.map +1 -1
- package/dist/weapp.js +1 -1
- package/dist/weapp.js.map +1 -1
- package/dist/weapp.mjs +1 -1
- package/dist/weapp.mjs.map +1 -1
- package/package.json +4 -4
package/dist/loader.mjs
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.4.
|
|
6
|
+
* Version: v2.4.7
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import * as EFFECTS from '@galacean/effects';
|
|
@@ -2096,7 +2096,7 @@ var CameraGestureHandlerImp = /*#__PURE__*/ function() {
|
|
|
2096
2096
|
registerPlugin("model", ModelPlugin, VFXItem);
|
|
2097
2097
|
/**
|
|
2098
2098
|
* 插件版本号
|
|
2099
|
-
*/ var version = "2.4.
|
|
2099
|
+
*/ var version = "2.4.7";
|
|
2100
2100
|
logger.info("Plugin model version: " + version + ".");
|
|
2101
2101
|
if (version !== EFFECTS.version) {
|
|
2102
2102
|
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!");
|
|
@@ -2219,12 +2219,14 @@ var ModelMeshComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
2219
2219
|
* @param data - 组件参数
|
|
2220
2220
|
*/ _proto.fromData = function fromData(data) {
|
|
2221
2221
|
RendererComponent.prototype.fromData.call(this, data);
|
|
2222
|
-
this.data = data
|
|
2223
|
-
|
|
2224
|
-
|
|
2222
|
+
this.data = _extends({}, data, {
|
|
2223
|
+
materials: []
|
|
2224
|
+
});
|
|
2225
|
+
this.data.rootBone = data.rootBone ? this.engine.findObject(data.rootBone) : undefined;
|
|
2226
|
+
this.data.geometry = this.engine.findObject(data.geometry);
|
|
2225
2227
|
if (data.materials) {
|
|
2226
2228
|
for(var i = 0; i < data.materials.length; i++){
|
|
2227
|
-
data.materials[i] = this.engine.findObject(data.materials[i]);
|
|
2229
|
+
this.data.materials[i] = this.engine.findObject(data.materials[i]);
|
|
2228
2230
|
}
|
|
2229
2231
|
}
|
|
2230
2232
|
};
|