@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/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.0-beta.
|
|
6
|
+
* Version: v2.4.0-beta.2
|
|
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.0-beta.
|
|
2099
|
+
*/ var version = "2.4.0-beta.2";
|
|
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!");
|
|
@@ -2220,6 +2220,13 @@ var ModelMeshComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
2220
2220
|
*/ _proto.fromData = function fromData(data) {
|
|
2221
2221
|
RendererComponent.prototype.fromData.call(this, data);
|
|
2222
2222
|
this.data = data;
|
|
2223
|
+
data.rootBone = data.rootBone ? this.engine.findObject(data.rootBone) : undefined;
|
|
2224
|
+
data.geometry = this.engine.findObject(data.geometry);
|
|
2225
|
+
if (data.materials) {
|
|
2226
|
+
for(var i = 0; i < data.materials.length; i++){
|
|
2227
|
+
data.materials[i] = this.engine.findObject(data.materials[i]);
|
|
2228
|
+
}
|
|
2229
|
+
}
|
|
2223
2230
|
};
|
|
2224
2231
|
/**
|
|
2225
2232
|
* 创建内部对象
|
|
@@ -2323,6 +2330,8 @@ var ModelSkyboxComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
2323
2330
|
* @param data - 组件参数
|
|
2324
2331
|
*/ _proto.fromData = function fromData(data) {
|
|
2325
2332
|
RendererComponent.prototype.fromData.call(this, data);
|
|
2333
|
+
data.diffuseImage = data.diffuseImage ? this.engine.findObject(data.diffuseImage) : undefined;
|
|
2334
|
+
data.specularImage = this.engine.findObject(data.specularImage);
|
|
2326
2335
|
this.data = data;
|
|
2327
2336
|
};
|
|
2328
2337
|
/**
|
|
@@ -2541,7 +2550,8 @@ var AnimationComponent = /*#__PURE__*/ function(Behaviour) {
|
|
|
2541
2550
|
this.clips = [];
|
|
2542
2551
|
data.animationClips.forEach(function(clipData) {
|
|
2543
2552
|
var clipObj = new ModelAnimationClip(_this.engine);
|
|
2544
|
-
|
|
2553
|
+
var animationClip = _this.engine.findObject(clipData);
|
|
2554
|
+
clipObj.setFromAnimationClip(animationClip);
|
|
2545
2555
|
_this.clips.push(clipObj);
|
|
2546
2556
|
});
|
|
2547
2557
|
};
|