@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.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.0-beta.
|
|
6
|
+
* Version: v2.4.0-beta.2
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import * as EFFECTS from '@galacean/effects';
|
|
@@ -1863,6 +1863,13 @@ var ModelMeshComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
1863
1863
|
*/ _proto.fromData = function fromData(data) {
|
|
1864
1864
|
RendererComponent.prototype.fromData.call(this, data);
|
|
1865
1865
|
this.data = data;
|
|
1866
|
+
data.rootBone = data.rootBone ? this.engine.findObject(data.rootBone) : undefined;
|
|
1867
|
+
data.geometry = this.engine.findObject(data.geometry);
|
|
1868
|
+
if (data.materials) {
|
|
1869
|
+
for(var i = 0; i < data.materials.length; i++){
|
|
1870
|
+
data.materials[i] = this.engine.findObject(data.materials[i]);
|
|
1871
|
+
}
|
|
1872
|
+
}
|
|
1866
1873
|
};
|
|
1867
1874
|
/**
|
|
1868
1875
|
* 创建内部对象
|
|
@@ -1966,6 +1973,8 @@ var ModelSkyboxComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
1966
1973
|
* @param data - 组件参数
|
|
1967
1974
|
*/ _proto.fromData = function fromData(data) {
|
|
1968
1975
|
RendererComponent.prototype.fromData.call(this, data);
|
|
1976
|
+
data.diffuseImage = data.diffuseImage ? this.engine.findObject(data.diffuseImage) : undefined;
|
|
1977
|
+
data.specularImage = this.engine.findObject(data.specularImage);
|
|
1969
1978
|
this.data = data;
|
|
1970
1979
|
};
|
|
1971
1980
|
/**
|
|
@@ -2184,7 +2193,8 @@ var AnimationComponent = /*#__PURE__*/ function(Behaviour) {
|
|
|
2184
2193
|
this.clips = [];
|
|
2185
2194
|
data.animationClips.forEach(function(clipData) {
|
|
2186
2195
|
var clipObj = new ModelAnimationClip(_this.engine);
|
|
2187
|
-
|
|
2196
|
+
var animationClip = _this.engine.findObject(clipData);
|
|
2197
|
+
clipObj.setFromAnimationClip(animationClip);
|
|
2188
2198
|
_this.clips.push(clipObj);
|
|
2189
2199
|
});
|
|
2190
2200
|
};
|
|
@@ -13189,7 +13199,7 @@ var GLTFHelper = /*#__PURE__*/ function() {
|
|
|
13189
13199
|
registerPlugin("model", ModelPlugin, VFXItem);
|
|
13190
13200
|
/**
|
|
13191
13201
|
* 插件版本号
|
|
13192
|
-
*/ var version = "2.4.0-beta.
|
|
13202
|
+
*/ var version = "2.4.0-beta.2";
|
|
13193
13203
|
logger.info("Plugin model version: " + version + ".");
|
|
13194
13204
|
if (version !== EFFECTS.version) {
|
|
13195
13205
|
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!");
|