@galacean/effects-plugin-model 2.4.0-beta.0 → 2.4.0-beta.2
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 +13 -3
- 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 +13 -3
- package/dist/index.mjs.map +1 -1
- package/dist/loader.mjs +13 -3
- 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/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.4.0-beta.
|
|
6
|
+
* Version: v2.4.0-beta.2
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
'use strict';
|
|
@@ -1886,6 +1886,13 @@ exports.ModelMeshComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
1886
1886
|
*/ _proto.fromData = function fromData(data) {
|
|
1887
1887
|
RendererComponent.prototype.fromData.call(this, data);
|
|
1888
1888
|
this.data = data;
|
|
1889
|
+
data.rootBone = data.rootBone ? this.engine.findObject(data.rootBone) : undefined;
|
|
1890
|
+
data.geometry = this.engine.findObject(data.geometry);
|
|
1891
|
+
if (data.materials) {
|
|
1892
|
+
for(var i = 0; i < data.materials.length; i++){
|
|
1893
|
+
data.materials[i] = this.engine.findObject(data.materials[i]);
|
|
1894
|
+
}
|
|
1895
|
+
}
|
|
1889
1896
|
};
|
|
1890
1897
|
/**
|
|
1891
1898
|
* 创建内部对象
|
|
@@ -1989,6 +1996,8 @@ exports.ModelSkyboxComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
1989
1996
|
* @param data - 组件参数
|
|
1990
1997
|
*/ _proto.fromData = function fromData(data) {
|
|
1991
1998
|
RendererComponent.prototype.fromData.call(this, data);
|
|
1999
|
+
data.diffuseImage = data.diffuseImage ? this.engine.findObject(data.diffuseImage) : undefined;
|
|
2000
|
+
data.specularImage = this.engine.findObject(data.specularImage);
|
|
1992
2001
|
this.data = data;
|
|
1993
2002
|
};
|
|
1994
2003
|
/**
|
|
@@ -2207,7 +2216,8 @@ exports.AnimationComponent = /*#__PURE__*/ function(Behaviour) {
|
|
|
2207
2216
|
this.clips = [];
|
|
2208
2217
|
data.animationClips.forEach(function(clipData) {
|
|
2209
2218
|
var clipObj = new ModelAnimationClip(_this.engine);
|
|
2210
|
-
|
|
2219
|
+
var animationClip = _this.engine.findObject(clipData);
|
|
2220
|
+
clipObj.setFromAnimationClip(animationClip);
|
|
2211
2221
|
_this.clips.push(clipObj);
|
|
2212
2222
|
});
|
|
2213
2223
|
};
|
|
@@ -13212,7 +13222,7 @@ var GLTFHelper = /*#__PURE__*/ function() {
|
|
|
13212
13222
|
EFFECTS.registerPlugin("model", ModelPlugin, EFFECTS.VFXItem);
|
|
13213
13223
|
/**
|
|
13214
13224
|
* 插件版本号
|
|
13215
|
-
*/ var version = "2.4.0-beta.
|
|
13225
|
+
*/ var version = "2.4.0-beta.2";
|
|
13216
13226
|
EFFECTS.logger.info("Plugin model version: " + version + ".");
|
|
13217
13227
|
if (version !== EFFECTS__namespace.version) {
|
|
13218
13228
|
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!");
|